/* ==========================================================================
   BED & BREAKFAST DINASTIA - FOGLIO DI STILE PRINCIPALE
   ========================================================================== */

/* --- 1. PALETTE COLORI & VARIABILI GLOBALI --- */
:root {
    --dinastia-red: #8C181B;
    --dinastia-red-hover: #6D1114;
    --dinastia-dark: #222222;
    --dinastia-light: #F9F8F6;
}

/* --- 2. IMPOSTAZIONI GENERALI (SINGLE PAGE) --- */
html {
    scroll-behavior: smooth;
    /* La spaziatura evita che l'header copra i titoli quando si clicca sulle ancore */
    scroll-padding-top: 80px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dinastia-dark);
    background-color: #ffffff;
}

/* --- 3. PULSANTI --- */
.btn-dinastia-primary {
    background-color: var(--dinastia-red);
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    border: none;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

    .btn-dinastia-primary:hover,
    .btn-dinastia-primary:focus {
        background-color: var(--dinastia-red-hover);
        color: #ffffff;
        box-shadow: 0 4px 10px rgba(140, 24, 27, 0.3);
    }

/* --- 4. HEADER TRASPARENTE SOVRAPPOSTO --- */
.dinastia-header-modern {
    position: absolute; /* Fondamentale per posizionarsi SOPRA l'immagine */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
    background-color: transparent;
    padding-top: 20px;
    padding-bottom: 20px;
}

.logo-img-modern {
    max-height: 75px;
    width: auto;
    /* Un leggero contorno bianco sfumato aiuta il logo scuro a staccarsi dal cielo */
    filter: drop-shadow(0px 2px 4px rgba(255,255,255,0.8));
}

/* --- 5. MENU DI NAVIGAZIONE --- */
.dinastia-nav-modern .nav-link {
    color: #ffffff !important;
    font-weight: 500;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 15px !important; /* Padding leggermente ridotto per recuperare spazio */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    transition: color 0.3s ease;
    white-space: nowrap; /* FONDAMENTALE: Impedisce al testo di andare a capo */
}

    .dinastia-nav-modern .nav-link:hover {
        color: var(--dinastia-red) !important;
    }

/* --- 6. HERO SECTION (FOTOGRAFIA A TUTTO SCHERMO) --- */
.dinastia-hero {
    /* Aggiorna il nome con quello della tua foto finale */
    background-image: url('../images/monterosso-panoramica.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    min-height: 100vh; /* Occupa esattamente il 100% dell'altezza della finestra visibile */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Gradiente sfumato per il contrasto del testo */
.hero-overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Più chiaro in alto (dove c'è il cielo), più scuro in basso (dove c'è il paese) */
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 100%);
}

/* --- 7. UTILITIES --- */
/* Assicura che i contenuti rimangano sempre sopra i filtri e gli overlay */
.z-index-1 {
    z-index: 1;
}
/* --- FIX MENU MOBILE (Sfondo scuro per leggibilità) --- */
@media (max-width: 991.98px) {
    #modernNav {
        background-color: rgba(0, 0, 0, 0.9); /* Sfondo scuro semi-trasparente */
        border-radius: 8px;
        padding: 15px;
        margin-top: 15px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }

    /* Disabilita l'ombra sul testo su mobile perché lo sfondo è già scuro */
    .dinastia-nav-modern .nav-link {
        text-shadow: none;
        padding: 12px 20px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Rimuove la linea di demarcazione dall'ultimo elemento (il pulsante) */
    .dinastia-nav-modern .nav-item:last-child .nav-link,
    .dinastia-nav-modern .nav-item:last-child {
        border-bottom: none;
    }

    /* Adatta il pulsante prenota alla larghezza del menu mobile */
    .btn-dinastia-primary {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }
}
/* --- 8. GALLERIA FOTOGRAFICA --- */
.gallery-section {
    background-color: var(--dinastia-light); /* Uno sfondo chiaro per far risaltare le foto */
}

.gallery-item {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

    .gallery-item img {
        transition: transform 0.5s ease;
        width: 100%;
        height: 280px; /* Altezza fissa per avere una griglia perfettamente ordinata */
        object-fit: cover; /* Ritaglia in automatico le foto senza deformarle */
    }

    /* Effetto Zoom al passaggio del mouse */
    .gallery-item:hover img {
        transform: scale(1.1);
    }

    /* Velo rosso semitrasparente al passaggio del mouse */
    .gallery-item::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(140, 24, 27, 0.3); /* Utilizza il rosso Dinastia */
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }

    .gallery-item:hover::after {
        opacity: 1;
    }
/* --- 9. SCOPRI MONTEROSSO ALMO --- */
.monterosso-section {
    position: relative;
    /* Un bordo superiore sottilissimo per staccare leggermente dalla galleria */
    border-top: 1px solid #f0f0f0;
}

.monterosso-image-wrapper {
    border-radius: 12px;
    overflow: hidden;
    margin-top: 20px;
}

    .monterosso-image-wrapper img {
        width: 100%;
        max-height: 550px; /* Evita che l'immagine diventi esageratamente alta su schermi giganti */
        object-fit: cover;
        transition: transform 1.2s ease; /* Transizione molto lenta ed elegante */
    }

    /* Effetto zoom lento al passaggio del mouse */
    .monterosso-image-wrapper:hover img {
        transform: scale(1.04);
    }
/* --- 10. SERVIZI E COMFORT --- */
.servizi-section {
    background-color: var(--dinastia-light); /* Riprendiamo lo sfondo leggermente opaco per staccare dal blocco precedente */
    border-top: 1px solid #eaeaea;
}

.servizio-box {
    padding: 25px 15px;
    border-radius: 8px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

    /* Effetto di sollevamento al passaggio del mouse */
    .servizio-box:hover {
        transform: translateY(-8px);
        background-color: #ffffff;
        box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    }

.servizio-icona {
    font-size: 3.5rem;
    color: var(--dinastia-red); /* Qui riprendiamo la nostra variabile del colore rosso Dinastia */
    margin-bottom: 15px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.servizio-box:hover .servizio-icona {
    transform: scale(1.15); /* L'icona si ingrandisce leggermente */
}
/* --- 11. LE VOCI DEI NOSTRI OSPITI (RECENSIONI) --- */
.recensioni-section {
    background-color: var(--dinastia-red);
    color: #ffffff;
}

.recensione-box {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.recensione-testo {
    font-style: italic;
    opacity: 0.95;
    font-size: 1.1rem;
    line-height: 1.6;
}

.stelle {
    color: #FFD700; /* Giallo Oro per simulare il punteggio massimo */
    font-size: 1.2rem;
    margin: 15px 0;
}

.recensione-autore {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    opacity: 0.8;
}

/* Pulsante TripAdvisor Trasparente */
.btn-tripadvisor {
    border: 2px solid #ffffff;
    color: #ffffff;
    background: transparent;
    transition: all 0.3s ease;
}

    .btn-tripadvisor:hover {
        background-color: #ffffff;
        color: var(--dinastia-red);
        transform: translateY(-3px);
    }
/* --- 11. FOOTER PREMIUM --- */
.dinastia-footer {
    background-color: var(--dinastia-dark); /* Sfondo scuro e profondo */
    color: #ffffff;
}

/* Trucco grafico: se il tuo logo ha scritte nere, questa riga inverte i colori e lo fa diventare bianco! */
.footer-logo {
    max-height: 70px;
    filter: brightness(0) invert(1);
}

/* Animazione dei link di navigazione */
.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
}

    .footer-links a:hover {
        color: var(--dinastia-red);
        padding-left: 8px; /* Effetto slittamento molto elegante */
    }

/* Colore rosso per le icone del footer */
.text-dinastia-red {
    color: var(--dinastia-red) !important;
}

/* Effetto hover per Privacy e Cookies */
.footer-legal a {
    transition: color 0.3s ease;
}

    .footer-legal a:hover {
        color: #ffffff !important;
    }