/* ==========================================
   IMPOSTAZIONI GLOBALI
   ========================================== */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
    overflow-x: hidden; /* Previene lo scorrimento orizzontale su mobile */
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    width: 100%;
    overflow-x: hidden;
}

/* Immagini sempre adattabili agli schermi */
img {
    max-width: 100%;
    height: auto;
}

/* ==========================================
   STILI COMPONENTI & FORM
   ========================================== */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ==========================================
   STILI LOGO E BANNER OTTIMIZZATI
   ========================================== */
/* 1. Logo Squadrato/Stampa (Piccolo ed elegante) */
.logo-grande {
    width: 100%;
    max-width: 80px;
    height: auto;
    border-radius: 8px;
    margin: 0 auto 15px auto;
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 2. Banner Logo Lungo Principale (NCI Nuovo Centro Informatica) */
.logo-banner-stretto {
    width: 100%;
    max-width: 380px;
    height: auto;
    object-fit: contain;
    margin: 0 auto 25px auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

/* Media Query Mobile (< 576px) */
@media (max-width: 575.98px) {
    .logo-grande {
        max-width: 65px;
        margin-bottom: 10px;
    }

    .logo-banner-stretto {
        max-width: 280px;
        margin-bottom: 20px;
    }
}

/* ==========================================
   CONTENITORE IMMAGINI PRODOTTI (HARDWARE)
   ========================================== */
.product-image-box {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
}

    .product-image-box img {
        max-height: 100%;
        max-width: 100%;
        object-fit: contain;
    }

/* ==========================================
   OTTIMIZZAZIONI MOBILE (SMARTPHONE)
   ========================================== */
@media (max-width: 991.98px) {
    .navbar-nav .nav-item {
        border-bottom: 1px solid #f8f9fa;
    }

        .navbar-nav .nav-item:last-child {
            border-bottom: none;
        }

    .navbar-nav .nav-link {
        padding-top: 0.8rem;
        padding-bottom: 0.8rem;
    }
}

@media (max-width: 575.98px) {
    .card {
        padding: 1.25rem !important;
    }

    /* Riduzione proporzionale dei titoli per smartphone */
    h1, .display-5 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.4rem !important;
    }

    h3, h4 {
        font-size: 1.2rem !important;
    }

    .lead {
        font-size: 1rem !important;
    }

    /* Bottoni e modali a tutta larghezza per facilitare il tocco */
    .btn-mobile-full,
    .modal-footer .btn {
        width: 100% !important;
        margin-bottom: 0.5rem;
    }

    .position-absolute.top-0.end-0 {
        position: relative !important;
        float: right;
        margin-bottom: 1rem !important;
    }
}
