/* =========================================
   1. VARIABILI E RESET
   ========================================= */
:root {
    --primary-blue: #005B96;
    --light-blue: #B3CDE0;
    --dark-footer: #011F4B;
    --accent-gold: #D4AF37;
    --white: #FFFFFF;
    --text-dark: #333333;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Lora', serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    top: 0px !important;
    position: static !important;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
}

/* =========================================
   2. HEADER E NAVIGAZIONE
   ========================================= */
header.site-header {
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--dark-footer);
}

.nav-container {
    display: flex;
    justify-content: center;
    padding: 20px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: 0.3s;
}

nav a:hover {
    color: var(--light-blue);
}

/* pulsante hamburger per mobile */
.hamburger {
    display: none;
    /* solo su desktop rimane nascosto */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger span {
    display: block;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.nav-cta {
    background: var(--accent-gold);
    padding: 8px 20px;
    border-radius: 5px;
    color: var(--dark-footer) !important;
}

/* =========================================
   3. HERO SECTION - SFONDO ABBASSATO SUL MARE
   ========================================= */
.home-bg {
    /* Zoom 130% e posizione BOTTOM per inquadrare il mare ed eliminare il cielo in eccesso */
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3)),
        url('../img/hero-mare.jpg') no-repeat center bottom / 130%;
    height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    text-align: center;
    background-attachment: fixed;
    overflow: visible;
    /* consente al menu assoluto di uscire */
}

.hero-tag {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 50px;
    margin-bottom: 20px;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    margin: 0;
}

/* =========================================
   4. SEZIONE CARDS E SERVIZI
   ========================================= */
.full-description {
    padding: 80px 20px;
    background: linear-gradient(to bottom, #ffffff, #fcfdfe);
}

.description-content {
    max-width: 1100px;
    margin: auto;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.subtitle {
    color: var(--accent-gold);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
}

.divider {
    width: 60px;
    height: 3px;
    background: var(--primary-blue);
    margin: 20px auto;
}

.lead-text {
    text-align: center;
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 60px;
    color: #555;
}

/* Griglia Servizi */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: auto;
}

.grid-item {
    background: #f9fbfd;
    padding: 30px;
    border-radius: 15px;
    border-top: 4px solid var(--primary-blue);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Card Home Page */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    transition: 0.4s;
    border: 1px solid #f0f0f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 91, 150, 0.1);
}

.card-image-placeholder {
    font-size: 3rem;
    margin-bottom: 20px;
    background: #f0f7ff;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto;
}

/* =========================================
   5. PAGINA PRENOTA (BOTTONI)
   ========================================= */
.booking-page {
    padding: 60px 20px;
    background: #f4f7f9;
    min-height: 70vh;
    text-align: center;
}

.booking-container {
    max-width: 500px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-booking {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    transition: 0.3s;
}

.subito {
    background: #ff5023;
}

.airbnb {
    background: #FF5A5F;
}

.booking {
    background: #003580;
}

.logo-s,
.logo-b {
    margin-right: 15px;
    font-weight: bold;
}

footer {
    background: var(--dark-footer);
    color: white;
    text-align: center;
    padding: 40px;
}

/* =========================================
   6. PAGINA DINTORNI (MAPPA E GUIDA)
   ========================================= */

/* Sezione Mappa Interattiva */
.map-section {
    padding: 80px 20px;
    text-align: center;
    background: #fdfdfd;
}

.map-container {
    position: relative;
    max-width: 1000px;
    margin: 50px auto;
    background: #e3f2fd;
    /* Richiamo colore mare per l'area mappa */
    height: 500px;
    border-radius: 20px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 4px solid white;
}

/* La Vignetta (Pin cliccabile) */
.vignetta {
    position: absolute;
    background: var(--white);
    padding: 10px 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, background 0.3s, color 0.3s;
    cursor: pointer;
    border: 1px solid var(--light-blue);
    z-index: 2;
}

.vignetta:hover {
    transform: scale(1.1) translateY(-5px);
    z-index: 10;
    background: var(--primary-blue);
    color: var(--white);
}

.vignetta span {
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Posizionamento delle vignette (Esempi di classi da usare nel HTML) */
.pos-casa {
    top: 50%;
    left: 50%;
    background: var(--accent-gold);
    color: var(--white);
    border: 2px solid var(--white);
}

/* Iframe Mappa Standard (se usi Google Maps Embed) */
.map-iframe-wrapper {
    margin-bottom: 60px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.map-iframe-wrapper iframe {
    width: 100%;
    height: 450px;
    border: 0;
    display: block;
}

/* Griglia Attrazioni / Guide */
.tourist-guide {
    margin-top: 40px;
}

.attraction-card {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #eee;
    transition: 0.3s;
    text-align: left;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.attraction-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.attraction-card h3 {
    color: var(--primary-blue);
    margin-top: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.attraction-card p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0;
}


.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.grid-item {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--primary-blue);
}

.grid-item h3 {
    margin-top: 0;
    color: var(--primary-blue);
}

/* Allineamento del selettore lingua nel menu */
.nav-container {
    display: flex;
    align-items: center;
    /* Centra verticalmente il menu e il traduttore */
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* Nasconde la barra superiore di Google (opzionale per pulizia estetica) */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body {
    top: 0px !important;
}

/* =========================================
   7. SWITCH LINGUA IPHONE STYLE (TRASPARENTE)
   ========================================= */

/* Container dello switch */
.language-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
}

.lang-label {
    color: var(--white);
    font-size: 0.75rem;
    font-weight: bold;
    font-family: sans-serif;
    letter-spacing: 1px;
}

/* Struttura base dello switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Lo sfondo dello switch (Effetto Vetro) */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    transition: .4s;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 34px;
}

/* Il pallino dello switch */
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-radius: 50%;
}

/* Quando attivato (ENG) - Verde iPhone */
input:checked+.slider {
    background-color: rgba(46, 204, 113, 0.6);
}

input:checked+.slider:before {
    transform: translateX(20px);
}


/* BLOCCO TOTALE BARRA GOOGLE */
html {
    padding-top: 0px !important;
}

body {
    top: 0px !important;
    position: static !important;
}

/* Rende invisibili tutti i componenti che Google inietta nel sito */
.goog-te-banner-frame,
.goog-te-banner,
.skiptranslate,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-te-gadget-icon {
    display: none !important;
    visibility: hidden !important;
}

/* Nasconde il widget originale (che serve per far funzionare lo script) */
#google_translate_element {
    display: none !important;
}

/* Toglie l'effetto evidenziatore sui testi tradotti */
.goog-text-highlight {
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* =========================================
   8. FIX DEFINITIVI PER MOBILE E TABLET
   ========================================= */
@media (max-width: 768px) {

    /* hamburger visibile su mobile, nav chiusa di default */
    .hamburger {
        display: flex;
    }

    .nav-container {
        padding: 10px;
        flex-direction: column;
        position: relative;
        /* necessario per il menu assoluto */
        /* Mette nav e switch lingua uno sotto l'altro */
    }

    .nav-container ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 8px;
        /* Spazio ridotto tra le voci */
        padding: 15px 0;
        text-align: center;
        width: 100%;
        background: var(--dark-footer);
        z-index: 1002;
        max-height: calc(100vh - 60px);
        /* evita che superi viewport */
        overflow-y: auto;
    }

    .nav-container ul.open {
        display: flex;
    }

    /* Navigazione: Testi centrati e più compatti */

    nav a {
        font-size: 0.8rem !important;
        /* Leggermente più grande del 0.75 per leggibilità */
        display: block;
        padding: 5px 0;
    }

    header.site-header {
        position: relative;
        /* Non copre la Hero su mobile */
        background: var(--dark-footer);
        z-index: 1001;
        /* sopra tutto per visualizzare il menu */
    }

    /* Hero: Adattamento proporzioni */
    .home-bg {
        height: 55vh;
        /* Ancora un po' più bassa per usabilità */
        background-attachment: scroll !important;
        /* Fix obbligatorio per iOS */
        background-size: cover !important;
        background-position: center center !important;
    }

    /* Cards: Riduzione padding per schermi stretti */
    .feature-card {
        padding: 25px 15px;
    }

    /* Galleria e Media: Altezze umane */
    #main-img {
        height: 280px !important;
    }

    .nav-arrow {
        padding: 8px 12px;
        font-size: 16px;
    }

    .map-section iframe,
    main iframe {
        height: 280px !important;
    }

    /* Switch Lingua: Centrato sotto il menu */
    .language-switch {
        margin: 10px 0;
        justify-content: center;
        width: 100%;
    }
}

/* Container per il video, simile alla galleria */
.video-container {
    max-width: 900px;
    margin: 40px auto;
    /* Spazio sotto la galleria */
    padding: 0 20px;
    /* Margine laterale su mobile */
    text-align: center;
}

.video-wrapper {
    position: relative;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    line-height: 0;
    /* Rimuove spazi vuoti sotto il video */
}

video {
    width: 100%;
    height: auto;
    /* Fondamentale per mantenere le proporzioni su mobile */
    display: block;
}

/* Titolo opzionale per la sezione video */
.video-title {
    color: #4A3728;
    /* Colore cioccolato come il resto del sito */
    margin-bottom: 20px;
    font-family: 'Lora', serif;
}