/* ==========================================
   1. RESET GENERALE & IMPOSTAZIONI DI BASE
   ========================================== */
* {
    margin: 0;
    padding: 0;
    /* BORDER-BOX: Include padding e bordi nella larghezza totale degli elementi.
       Evita che un div con width: 100% e padding esca dallo schermo. */
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    /* SCROLL-BEHAVIOR: Fa scorrere la pagina in modo morbido (smooth) 
       quando clicchi sui link del menu invece di "saltare" all'improvviso. */
    scroll-behavior: smooth;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ==========================================
   2. VARIABILI CSS (Tavolozza Colori)
   ========================================== */
:root {
    --bg-color: #fcf7d9;
    /* Sfondo principale */
    --snd-bg-color: #f3e1e1;
    /* Sfondo secondario (per creare contrasto tra sezioni) */
    --text-color: #5f051c;
    /* Colore del testo */
    --main-color: #c0c673;
    /* Colore di accento/firma */
}

/* ==========================================
   3. TRUCCO DEL REM & STRUTTURA HTML
   ========================================== */
html {
    /* TRUCCO DEI 10 PIXEL:
       Di default 1rem = 16px. Impostando il font-size al 62.5% (16 * 0.625 = 10px),
       1rem diventa esattamente uguale a 10px. 
       Esempi: 1.6rem = 16px, 3rem = 30px, 6rem = 60px. Semplifica tutti i calcoli! */
    font-size: 62.5%;

    /* Previene la comparsa della barra di scorrimento orizzontale in basso */
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

/* ==========================================
   4. SEZIONI GENERALI
   ========================================== */
section {
    /* 100vh = 100% della Viewport Height (altezza dello schermo). 
       Ogni sezione occuperà almeno l'intera altezza del display del lettore. */
    min-height: 100vh;
    /* Padding: 10rem (100px) in alto per lasciare spazio alla Navbar fissa, 
       9% di margine ai lati e 2rem in basso. */
    padding: 10rem 9% 2rem;
}

/* ==========================================
   5. HEADER & NAVBAR (Fissa in alto)
   ========================================== */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    right: 0;
    /* Z-INDEX: Funziona come i livelli di Photoshop. Un valore alto (1000) 
       garantisce che l'header stia SEMPRE sopra agli altri elementi mentre scorri. */
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 5%;
    background: var(--main-color);

    /* BACKDROP-FILTER: Crea un elegante effetto "vetro satinato" (sfocatura) 
       sui contenuti che passano sotto la barra di navigazione. */
    backdrop-filter: blur(10px);
    transition: all 0.5s ease;
}

.logo {
    font-size: 3rem;
    color: var(--bg-color);
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.navbar a {
    font-size: 1.9rem;
    color: var(--bg-color);
    margin-left: 4rem;
    font-weight: 700;
    transition: 0.3s ease;
}

.navbar a:hover,
.navbar a.active {
    color: var(--text-color);
}

/* ICONA MENU HAMBURGER (Nascosta di default su desktop) */
#menu-icon {
    font-size: 3.6rem;
    color: var(--bg-color);
    cursor: pointer;
    display: none;
}

/* ==========================================
   6. HOME SECTION & ANIMAZIONE IMMAGINE
   ========================================== */
.home {
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-img img {
    /* 25vw = 25% della larghezza della finestra (Viewport Width) */
    width: 25vw;
    border-radius: 50%;
    box-shadow: 0 0 25px var(--main-color);
    cursor: pointer;
    /* ANIMAZIONE: Applica la sequenza "float-image" definita sotto nei @keyframes.
       Dura 4 secondi, con movimento morbido (ease-in-out) e si ripete all'infinito (infinite). */
    animation: float-image 4s ease-in-out infinite;
    transition: 0.4s ease;
}

.home-img img:hover {
    /* Effetto bagliore (glow) stratificato al passaggio del mouse */
    box-shadow: 0 0 25px var(--main-color),
        0 0 35px var(--main-color),
        0 0 45px var(--main-color);
}

/* KEYFRAMES: Definisce le fasi dell'animazione di "galleggiamento" dell'immagine */
@keyframes float-image {
    0% {
        transform: translateY(0);
        /* Posizione di partenza */
    }

    50% {
        transform: translateY(-2.4rem);
        /* Sale di 24px a metà animazione */
    }

    100% {
        transform: translateY(0);
        /* Ritorna alla posizione base */
    }
}

.home-content {
    margin-left: 5rem;
}

.home-content h3 {
    font-size: 3.7rem;
    font-weight: 700;
}

.home-content h3:nth-of-type(2) {
    margin-bottom: 2rem;
}

span {
    color: var(--main-color);
}

.home-content h1 {
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-content p {
    font-size: 1.6rem;
}

/* ICONE SOCIAL */
.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 0.2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.3s ease;
}

.social-media a:hover {
    transform: scale(1.2) translateY(-10px);
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--main-color);
}

/* PULSANTE GENERALE (BTN) */
.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.6rem;
    color: var(--bg-color);
    letter-spacing: 0.1rem;
    font-weight: 600;
    transition: 0.5s ease;
    margin-top: 2rem;
    cursor: pointer;
}

.btn:hover {
    box-shadow: none;
    background: var(--text-color);
    color: var(--bg-color);
}

/* ==========================================
   7. ABOUT SECTION
   ========================================== */
.about {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background: var(--snd-bg-color);
}

.about-img img {
    width: 25vw;
    border: 2px solid var(--main-color);
    border-radius: 50%;
    box-shadow: 0 0 25px var(--main-color);
    cursor: pointer;
    transition: 0.4s ease;
}

.about-img img:hover {
    box-shadow: 0 0 25px var(--main-color),
        0 0 35px var(--main-color),
        0 0 45px var(--main-color);
}

.heading {
    font-size: 6rem;
    text-align: left;
}

.about-content {
    padding: 0 4rem;
}

.about-content h2 {
    text-align: left;
    line-height: 1.2;
}

.about-content h3 {
    font-size: 3rem;
}

.about-content p {
    font-size: 1.6rem;
    margin: 2rem 0 3rem;
}

/* ==========================================
   8. SERVICES SECTION (Layout Flessibile)
   ========================================== */
.services h2 {
    text-align: center;
    margin-bottom: 5rem;
}

.services-container {
    display: flex;
    justify-content: center;
    align-items: center;
    /* FLEX-WRAP: Consente alle schedine dei servizi di andare a capo 
       automaticamente se lo schermo diventa troppo stretto (es. su smartphone). */
    flex-wrap: wrap;
    gap: 2rem;
}

.services-container .services-box {
    /* FLEX SHORTHAND: flex-grow: 1, flex-shrink: 1, flex-basis: 30rem.
       Significa che la card cercherà di essere larga 300px, ma si espanderà 
       o rimpicciolirà in modo fluido per riempire lo spazio disponibile. */
    flex: 1 1 30rem;
    background: var(--snd-bg-color);
    padding: 6rem 2rem;
    border-radius: 2rem;
    text-align: center;
    border: 0.3rem solid var(--bg-color);
    transition: 0.3s ease;
}

.services-container .services-box:hover {
    border-color: var(--main-color);
    transform: scale(1.03);
}

.services-box i {
    font-size: 7rem;
    color: var(--main-color);
}

.services-box h3 {
    font-size: 2.6rem;
}

.services-box p {
    font-size: 1.6rem;
    margin: 1rem 0 3rem;
}

/* ==========================================
   9. BEAUTY GAZETTE SECTION (Altezza fissa e stabile)
   ========================================== */
.gazette {
    background: var(--snd-bg-color);
}

.gazette .heading {
    text-align: center;
    margin-bottom: 5rem;
}

.gazette-slider {
    width: 100%;
    padding: 2rem 0 5rem 0;
}

/* Stile unificato per ogni singola card (Invariato) */
.swiper-slide.gazette-card {
    background: var(--bg-color);
    border: 0.3rem solid var(--bg-color);
    border-radius: 2rem;
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    transition: 0.3s ease;
    
    min-height: 48rem;
    height: 100%;
}

.swiper-slide.gazette-card:hover {
    border-color: var(--main-color);
    transform: scale(1.03);
}

/* Contenitore dell'immagine di anteprima (Modificato solo l'altezza e il margine inferiore) */
.gazette-thumb {
    width: 100%;
    height: 22rem; /* Portato a 22rem per allungare solo l'anteprima dell'immagine */
    border-radius: 1.5rem;
    overflow: hidden;
    position: relative;
    margin-bottom: 1.5rem; /* Leggermente ridotto per compensare l'altezza dell'immagine */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.gazette-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Tipografia con spaziature stabili (Invariata) */
.swiper-slide.gazette-card h3 {
    font-size: 2.4rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.swiper-slide.gazette-card p {
    font-size: 1.5rem;
    color: var(--text-color);
    margin: 0;
    line-height: 1.4;
}

.pdf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.pdf-open-btn {
    background: var(--main-color);
    color: var(--bg-color);
    padding: 0.6rem 1.2rem;
    border-radius: 0.8rem;
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.3s ease;
}

.pdf-open-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* CONTACT SECTION */
.contact {
    background-color: var(--bg-color);
}

.contact h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.contact form {
    max-width: 70rem;
    /* Limita la larghezza massima del form per centrarlo bene */
    margin: 1rem auto;
    text-align: center;
    margin-bottom: 3rem;
}

/* Gestione delle due righe da 2 input ciascuna */
.contact form .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* Ogni input prende il 49% della larghezza della riga */
.contact form .input-box input {
    width: 49%;
}

/* Stile unico per tutti gli input e la textarea */
.contact form .input-box input,
.contact form textarea {
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--bg-color);
    /* Sfondo chiaro come nello screenshot */
    border-radius: 0.8rem;
    border: 0.25rem solid var(--main-color);
    /* Bordo colorato arrotondato */
    margin: 0.7rem 0;
}

/* La textarea prende il 100% della larghezza */
.contact form textarea {
    width: 100%;
    resize: none;
    /* Impedisce di ridimensionare la scatola rompi-layout */
}

/* Pulsante Send Message */
.contact form .btn {
    margin-top: 2rem;
    cursor: pointer;
}

/* ==========================================
   11. FOOTER SECTION
   ========================================== */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
    background: var(--main-color);
}

.footer-content {
    text-align: center;
    width: 100%;
    margin-bottom: 1.5rem;
}

.footer-content h3 {
    font-size: 2.5rem;
    color: var(--bg-color);
}

.footer-content p {
    font-size: 1.4rem;
    color: var(--bg-color);
    margin: 1rem 0;
}

.footer-content .socials {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.footer-content .socials a {
    font-size: 2rem;
    color: var(--bg-color);
    transition: 0.3s ease;
}

.footer-content .socials a:hover {
    transform: scale(1.2) translateY(-5px);
    color: var(--text-color);
}

.footer-bottom {
    width: 100%;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
}

.footer-bottom p {
    font-size: 1.4rem;
    color: var(--bg-color);
}

/* ==========================================
   12. RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================== */

@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media (max-width: 991px) {
    #menu-icon {
        display: block;
    }

    .navbar {
        position: absolute;
        top: 100%;
        right: -100%;
        width: 255px;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        background: var(--main-color);
        transition: all 0.5s ease;
        backdrop-filter: blur(10px);
    }

    .navbar a {
        display: block;
        padding: 1.5rem 2rem;
        font-size: 2rem;
        margin-left: 0;
    }

    .navbar.active {
        right: 0;
    }

    .home {
        flex-direction: column;
    }

    .home-content h3 {
        font-size: 2.6rem;
    }

    .home-content h1 {
        font-size: 5rem;
    }

    .multiple-text {
        color: var(--main-color);
    }

    .home-content {
        order: 2;
        margin-left: 0;
        text-align: center;
    }

    .home-content h3:nth-of-type(2) {
        margin-bottom: 2rem;
        min-height: 5rem;
    }

    .home-img img {
        width: 60vw;
        margin-top: 4rem;
    }

    .about {
        flex-direction: column-reverse;
        text-align: center;
    }

    .about-content h2,
    .about-content h3 {
        text-align: center;
    }

    .about-img img {
        width: 60vw;
        margin-top: 2rem;
    }

    .services h2 {
        margin-bottom: 3rem;
    }
}

@media (max-width: 617px) {
    html {
        font-size: 50%;
    }

    .home-img img,
    .about-img img {
        width: 75vw;
    }

    .contact form .input-box input {
        width: 100%;
    }
}

/* ==========================================
   BEAUTY GAZETTE CAROUSEL & MODAL STYLES
   ========================================== */
.gazette {
    /* CORRETTO: Uso della variabile corretta --snd-bg-color (invece di second-bg-color inesistente) */
    background: var(--snd-bg-color);
    position: relative;
    z-index: 1;
    padding: 8rem 9% 6rem;
}

.gazette-slider {
    padding: 2rem 1rem 4rem;
    width: 100%;
}

.gazette-card {
    background: var(--bg-color);
    border-radius: 2rem;
    padding: 2rem;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.4s ease;
    cursor: pointer;
}

.gazette-card:hover {
    border-color: var(--main-color);
    transform: translateY(-5px);
    box-shadow: 0 0 1.5rem rgba(0, 0, 0, 0.3);
}

.gazette-thumb {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden; /* Fondamentale: maschera l'immagine e la tiene dentro i bordi arrotondati */
    margin-bottom: 1.5rem;
    height: 200px;    /* Altezza fissa ottimizzata per il riquadro */
    width: 100%;
}

.gazette-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;    /* Riempie il box ritagliando l'eccesso senza deformare l'immagine */
    object-position: center; /* Centra l'immagine nel riquadro */
    display: block;
    transition: transform 0.5s ease;
}

.gazette-card:hover .gazette-thumb img {
    transform: scale(1.08);
}

.gazette-thumb .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.6rem;
    font-weight: 600;
    gap: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gazette-card:hover .overlay {
    opacity: 1;
}

.gazette-card h3 {
    font-size: 2.2rem;
    color: var(--text-color);
    margin-bottom: 0.8rem;
}

.gazette-card p {
    font-size: 1.4rem;
    color: #aaa;
    line-height: 1.4;
}

/* Stili del Modale Ingrandito PDF */
.pdf-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.pdf-modal-content {
    background: var(--bg-color);
    width: 90%;
    max-width: 1000px;
    height: 85vh;
    border-radius: 2rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 25px rgba(0,0,0,0.5);
}

.pdf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2.5rem;
    background: var(--snd-bg-color);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.pdf-modal-header h3 {
    font-size: 2rem;
    color: var(--text-color);
}

.close-modal {
    font-size: 3rem;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--main-color);
}

.pdf-viewer-container {
    flex: 1;
    width: 100%;
    height: 100%;
}

.pdf-viewer-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}