/* style.css - MediaFrank */

body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4 {
    color: #ffffff;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* Card layout */
.card {
    border: none;
    border-radius: 8px;
    background-color: #2a2a2a;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* NON USATA PIÙ (commentata per chiarezza)
.card-img-top {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    aspect-ratio: auto;
}
*/

.card-body {
    flex: 1 1 auto;
    padding: 0.75rem;
}

.card-footer {
    background-color: transparent;
    border-top: 1px solid #444;
    text-align: center;
}

/* Logo */
#site-logo {
    max-height: 60px;
    width: auto;
    display: block;
}

/* Pulsanti */
.btn-primary {
    background-color: #007bff;
    border: none;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-outline-light:hover {
    background-color: #ffffff;
    color: #000;
}

/* Tabelle */
.table-dark th,
.table-dark td {
    vertical-align: middle;
    border-color: #444;
}

/* Overlay per immagini */
.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.7);
}

.overlay-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* Preview immagini proporzionate nel rettangolo */
.card-img-wrapper {
    width: 100%;
    height: 180px; /* rettangolo fisso */
    background-color: #1c1c1c;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.img-preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* immagine intera */
    display: block;
    cursor: pointer;
}

/* Rimuovi altezza fissa per immagini su mobile */
@media (max-width: 576px) {
    .card-img-wrapper {
        height: auto;
    }

    .img-preview {
        max-height: 200px;
        object-fit: contain;
    }

    .card-body, .card-footer {
        padding: 0.5rem;
    }

    h1, h2, h3, h4 {
        font-size: 1.25rem;
    }

    .overlay-close {
        font-size: 1.5rem;
        top: 10px;
        right: 15px;
    }

    .btn {
        font-size: 0.95rem;
        padding: 0.4rem 0.75rem;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
/* Responsive login form */
@media (max-width: 576px) {
    .login-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
    }

    .login-wrapper .card {
        width: 100%;
        border-radius: 10px;
    }

    #site-logo {
        max-height: 50px;
        margin-bottom: 1.5rem;
    }

    input.form-control,
    button.btn {
        font-size: 1rem;
    }
}
