/* =========================================
   IMPOSTAZIONI GLOBALI: FONT UNICO
   ========================================= */
html, body, *, *::before, *::after {
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif !important;
}

body {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    margin: 0 !important;
    background-color: #fafafa;
    color: #555555;
    line-height: 1.7;
}

header.header {
    display: none !important;
}

main.main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

hr {
    border: 0;
    border-top: 1px solid #eaeaea;
    margin: 40px 0;
}

/* =========================================
   HERO VIDEO FULLSCREEN (HOME)
   ========================================= */
.hero-video-wrapper {
    position: relative;
    width: 100vw;
    height: 65vh;
    left: 50%;
    margin-left: -50vw;
    overflow: hidden;
    background-color: #000000;
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.hero-video-bg iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;
    min-height: 100vh;
    min-width: 177.77vh;
    transform: translate(-50%, -50%) scale(1.35);
    border: 0;
}

.hero-overlay {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 40px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.5) 100%);
    box-sizing: border-box;
    pointer-events: none;
}

/* =========================================
   HEADER E NAVIGAZIONE (CONDIVISO HOME + INTERNE)
   ========================================= */
.hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    pointer-events: auto;
}

.hero-header-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Variante header per pagine interne (!.IsHome) */
body:not(.list) .hero-header,
.hero-header:has(.hero-header-inner) {
    max-width: 100%;
    height: 280px;
    min-height: 280px;
    padding: 15px 40px;
    box-sizing: border-box;
    background:
        linear-gradient(rgba(0, 0, 0, 0.50), rgba(0, 0, 0, 0.50)),
        url('/images/logo/back.jpg') center top / cover no-repeat;
    z-index: 10;
}

.hero-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none !important;
    pointer-events: auto;
    padding-top: 20px;
}

.hero-header-inner .hero-brand {
    padding-top: 0;
}

.hero-brand-logo {
    display: block;
    height: 150px !important;
    width: auto !important;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, 0.7));
}

.hero-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 25px;
    flex-wrap: wrap;
    pointer-events: auto;
}

.hero-nav a {
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    transition: color 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
}

.hero-nav a:hover {
    color: #dddddd !important;
}

.btn-book,
.hero-nav .btn-book {
    background-color: #2563eb !important;
    color: #ffffff !important;
    padding: 10px 20px !important;
    border-radius: 4px;
    font-weight: 700 !important;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: background-color 0.2s ease !important;
}

.btn-book:hover,
.hero-nav .btn-book:hover {
    background-color: #1d4ed8 !important;
    color: #ffffff !important;
}

.hero-nav .lang-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
}

.hero-nav .lang-switch a {
    font-weight: 600;
}

/* =========================================
   STRUTTURE DI PAGINA E CONTENITORI
   ========================================= */
.ref-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
}

.ref-title {
    font-weight: 700;
    margin: 0 0 16px 0;
    color: var(--primary, #222222);
    letter-spacing: -0.5px;
}

.ref-subtitle {
    color: var(--secondary, #555555);
    margin: 0 auto 20px auto;
    line-height: 1.6;
    max-width: 900px;
}

.ref-hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin: 30px 0 80px 0;
}

.btn-primary {
    background: var(--primary, #333333);
    color: var(--theme, #ffffff);
    padding: 14px 28px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none !important;
    transition: opacity 0.2s ease, transform 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.ref-sublink {
    color: var(--secondary, #666666);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.ref-sublink:hover {
    color: var(--primary, #111111);
}

/* =========================================
   SEZIONI TESTO E IMMAGINE AFFIANCATI
   ========================================= */
.section-container {
    display: flex;
    align-items: center;
    gap: 50px;
    max-width: 1100px;
    margin: 80px auto;
    padding: 0 20px;
    text-align: left;
}

.content-box {
    flex: 1;
    color: #555555;
    line-height: 1.7;
}

.content-box h2 {
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 24px;
}

.content-box p {
    margin-bottom: 16px;
}

.btn-action {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 28px;
    background-color: #2563eb;
    color: #ffffff;
    text-decoration: none !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.btn-action:hover {
    background-color: #1d4ed8;
}

.image-box {
    flex: 1;
}

.image-box img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* =========================================
   SEZIONE CENTRATA
   ========================================= */
.section-centered {
    max-width: 850px;
    margin: 80px auto;
    padding: 0 20px;
    text-align: center;
    line-height: 1.7;
    color: #555555;
}

.section-centered h2 {
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-centered .subtitle {
    color: #444444;
    margin-bottom: 28px;
    font-style: italic;
}

.section-centered p {
    margin-bottom: 16px;
}

/* =========================================
   GRID CARD (2 COLONNE CONSOLIDATO)
   ========================================= */
.ref-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    text-align: left;
    margin: 80px auto;
    max-width: 1100px;
}

.ref-card {
    display: flex;
    flex-direction: column;
    padding: 30px;
    background-color: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    text-decoration: none !important;
    color: inherit !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ref-card:hover {
    transform: translateY(-4px);
    border-color: #2563eb;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.ref-tag {
    display: block;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #2563eb;
    margin-bottom: 12px;
}

.ref-card strong {
    display: block;
    margin-bottom: 12px;
    color: var(--primary, #111111);
}

.ref-card p {
    line-height: 1.6;
    color: var(--secondary, #555555);
    margin: 0 0 20px 0;
    flex-grow: 1;
}

.ref-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    margin-top: auto;
}

/* =========================================
   FOOTER CTA & MEDIA QUERIES RESPONSIVE
   ========================================= */
footer.footer {
    flex-shrink: 0 !important;
    padding: 40px 20px !important;
    margin-top: auto !important;
    background-color: #111111;
    color: #ffffff;
    text-align: center;
}

footer.footer p {
    color: #aaaaaa;
    max-width: 800px;
    margin: 0 auto;
}

footer.footer .copyright {
    margin-top: 10px;
}

#backToTop {
    display: none;
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#backToTop:hover {
    background: #1d4ed8;
}

@media (max-width: 900px) {
    .hero-header:has(.hero-header-inner) {
        padding: 15px 20px;
    }

    .hero-header-inner {
        gap: 15px;
    }

    .hero-nav {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .hero-nav a:not(.btn-book) {
        display: none;
    }

    .hero-brand-logo {
        height: 80px !important;
    }

    .hero-header:has(.hero-header-inner) {
        padding: 15px;
    }

    .hero-header-inner {
        flex-direction: column;
        justify-content: center;
        gap: 12px;
    }

    .hero-nav {
        justify-content: center;
        gap: 12px;
    }

    .hero-nav .lang-switch {
        width: 100%;
        justify-content: center;
        margin-top: 5px;
    }

    .section-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .ref-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
