/* --- IMPOSTAZIONI GLOBALI --- */
@font-face {
    font-family: 'Gustera';
    src: url('../lib/fonts/gustera.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

html, body {
    /* FIX DEFINITIVO BORDO BIANCO: impedisce lo scroll laterale su ogni dispositivo */
    max-width: 100%;
    overflow-x: hidden !important;
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 60px;
    background-color: #fff;
    color: #333;
}

/* --- NAVBAR RESPONSIVE (MOBILE & TABLET) --- */
@media (max-width: 991.98px) {
    .navbar-brand {
        max-width: 70%; /* Ridotto leggermente per dare più spazio al menu */
        flex-direction: column !important;
        align-items: flex-start !important;
        display: flex !important;
        min-height: 80px;
    }

    .brand-separator {
        display: none !important;
    }

    .brand-main {
        font-size: 3.5rem !important;
        line-height: 1 !important;
        margin-bottom: 0 !important;
        display: block;
        position: relative;
        z-index: 2;
    }

    .brand-sub {
        font-size: 0.6rem !important;
        letter-spacing: 2.5px !important;
        display: block !important;
        position: relative !important;
        top: 15px !important;
        margin-left: 0 !important;
        padding-bottom: 20px !important;
        z-index: 1;
        white-space: normal; /* Permette il wrap se il titolo è troppo lungo */
    }

    .navbar {
        padding-top: 25px !important;
        padding-bottom: 45px !important;
    }
}

/* --- NAVBAR & BRAND (DESKTOP) --- */
.navbar {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
    background-color: #fff !important;
    border-bottom: 1px solid #f2f2f2;
}

.navbar-brand {
    display: flex;
    align-items: baseline;
    text-decoration: none;
    line-height: 1;
    padding: 0;
    margin: 0;
}

.brand-main {
    font-family: 'Gustera', cursive;
    font-size: 3.8rem;
    color: #1a1a1a;
    line-height: 1;
    margin: 0;
}

.brand-separator {
    font-size: 1.5rem;
    color: #ddd;
    font-weight: 100;
}

.brand-sub {
    font-family: "Autour One", system-ui;
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: #888;
    text-transform: uppercase;
    white-space: nowrap;
    padding-bottom: 8px;
}

/* --- MENU DI NAVIGAZIONE --- */
.navbar-nav .nav-link {
    font-family: "Autour One", system-ui;
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #444 !important;
    padding: 0.5rem 1.2rem !important;
    transition: all 0.3s ease;
    position: relative;
}

    .navbar-nav .nav-link:hover {
        color: #000 !important;
    }

    .navbar-nav .nav-link::after {
        content: '';
        position: absolute;
        width: 0;
        height: 1px;
        bottom: 5px;
        left: 1.2rem;
        background-color: #000;
        transition: width 0.3s ease;
    }

    .navbar-nav .nav-link:hover::after {
        width: calc(100% - 2.4rem);
    }

/* --- SWIPER SLIDER (FIXED PER IPHONE) --- */
.mySwiper {
    width: 100%;
    /* Usiamo un'altezza minima fissa per sicurezza su mobile */
    min-height: 400px;
    height: calc(100vh - 200px);
    padding: 30px 0;
    position: relative;
    overflow: hidden;
    /* Ottimizzazione per scrolling iOS */
    -webkit-overflow-scrolling: touch;
}

    .mySwiper img {
        /* Fondamentale per evitare l'effetto sgranato su Android */
        image-rendering: -webkit-optimize-contrast;
        image-rendering: smooth;
        /* Forza l'accelerazione hardware per rendere lo scroll fluido */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        /* Evita artefatti durante il ridimensionamento */
        backface-visibility: hidden;
    }

.swiper-slide {
    /* Su mobile, se slidesPerView è auto, serve una larghezza base */
    width: auto !important;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    /* Evita sfarfallii su Safari */
    -webkit-backface-visibility: hidden;
}

    .swiper-slide img {
        height: 100%;
        width: auto;
        max-width: 100%; /* Impedisce all'immagine di uscire dallo schermo */
        display: block;
        /* Fondamentale per Safari: mantiene le proporzioni */
        object-fit: contain;
        border-radius: 2px;
        transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
        box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    }

/* --- SWIPER RESPONSIVE FIXES --- */

/* Prima definiamo la regola generale per Tablet e Smartphone (sotto i 768px) */
@media (max-width: 768px) {
    .mySwiper {
        padding: 20px 0;
        height: 75vh;
        min-height: 400px;
    }
}

/* Poi definiamo la regola più specifica per Smartphone piccoli (sotto i 576px) */
/* Questa vince sulla precedente perché è scritta DOPO */
@media (max-width: 576px) {
    .mySwiper {
        height: 70vh;
        min-height: 350px;
    }
}

/* --- UTILITY & FIXES --- */


.navbar-toggler {
    border: none;
}

    .navbar-toggler:focus {
        box-shadow: none;
        outline: none;
    }

.btn:focus, .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(0,0,0,0.05);
    border-color: #333;
}

/* --- JOURNAL & PRIVACY --- */
.about-title {
    font-family: "Autour One", system-ui;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    margin-bottom: 20px;
}

.privacy-title {
    font-family: "Autour One", system-ui;
    font-size: 2.2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
}

.privacy-subtitle {
    font-family: "Autour One", system-ui;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.privacy-content p, .privacy-content li {
    line-height: 1.8;
    color: #555;
}

.privacy-content ul {
    padding-left: 20px;
    margin-bottom: 1.5rem;
}

.copyright-text {
    color: #888;
    letter-spacing: 1px;
}

.privacy-link {
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
}

    .privacy-link:hover {
        color: #1a1a1a;
        text-decoration: underline;
    }

/* --- SOCIAL & SHARING --- */
.share-box .btn-outline-success {
    color: #25D366;
    border-color: #25D366;
}

    .share-box .btn-outline-success:hover {
        background-color: #25D366;
        color: white;
    }

.share-box .btn-outline-primary {
    color: #1877F2;
    border-color: #1877F2;
}

    .share-box .btn-outline-primary:hover {
        background-color: #1877F2;
        color: white;
    }

.share-box .btn {
    transition: all 0.3s ease;
    font-family: 'Autour One', sans-serif;
    font-size: 0.8rem;
}

.footer-nav-links a {
    transition: opacity 0.3s ease;
}

    .footer-nav-links a:hover {
        opacity: 0.6;
    }

/* --- ARTICOLO DETTAGLIO --- */
.articolo-content strong {
    color: #000;
    font-weight: 600;
}

.articolo-contenuto h3 {
    font-family: 'Bodoni Moda', serif;
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    color: #1a1a1a;
    letter-spacing: 1px;
}


#btn-spinner {
    margin-left: 10px;
}