/* ================================
   LUXURY VILLA LIDIA - FINAL VERSION
   Mobile Optimized & Premium Animations
================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Premium Color Palette */
    --primary-blue: #5B9BD5;
    --light-blue: #E8F4F8;
    --dark-blue: #2C5F7C;
    --accent-blue: #87CEEB;
    --gold-accent: #D4AF37;
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --text-dark: #2d2d2d;
    --text-light: #6c757d;
    --overlay: rgba(0, 0, 0, 0.4);
    --overlay-dark: rgba(0, 0, 0, 0.6);

    /* Typography */
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;

    /* Spacing */
    --section-padding: 120px;
    --section-padding-mobile: 60px;

    /* GPU-Accelerated Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dark);
    background: var(--white);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 80px;
}

/* 2. Body quando menu è aperto - NO blur */
body.menu-open {
    overflow: hidden;
    /* Niente filter: blur() */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ================================
   GPU-ACCELERATED ANIMATIONS
================================ */

.reveal {
    opacity: 0;
    transform: translateY(40px) translateZ(0);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) translateZ(0);
    will-change: auto;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px) translateZ(0);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0) translateZ(0);
    will-change: auto;
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px) translateZ(0);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0) translateZ(0);
    will-change: auto;
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.95) translateZ(0);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1) translateZ(0);
    will-change: auto;
}

.stagger-item {
    opacity: 0;
    transform: translateY(30px) translateZ(0);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-item.active {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}

.stagger-item:nth-child(1) {
    transition-delay: 0.1s;
}

.stagger-item:nth-child(2) {
    transition-delay: 0.2s;
}

.stagger-item:nth-child(3) {
    transition-delay: 0.3s;
}

.stagger-item:nth-child(4) {
    transition-delay: 0.4s;
}

.stagger-item:nth-child(5) {
    transition-delay: 0.5s;
}

.stagger-item:nth-child(6) {
    transition-delay: 0.6s;
}

.floating {
    animation: floating 4s ease-in-out infinite;
    transform: translateZ(0);
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0) translateZ(0);
    }

    50% {
        transform: translateY(-15px) translateZ(0);
    }
}

.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(91, 155, 213, 0.5);
        transform: scale(1) translateZ(0);
    }

    50% {
        box-shadow: 0 0 15px 5px rgba(91, 155, 213, 0);
        transform: scale(1.03) translateZ(0);
    }
}

.gradient-text {
    background: linear-gradient(45deg, var(--primary-blue), var(--accent-blue), var(--gold-accent));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (min-width: 1024px) {
    .gradient-text {
        animation: gradientShift 3s ease infinite;
    }
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@media (min-width: 768px) {
    .shimmer {
        position: relative;
        overflow: hidden;
    }

    .shimmer::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        animation: shimmer 3s infinite;
    }

    @keyframes shimmer {
        0% {
            left: -100%;
        }

        100% {
            left: 100%;
        }
    }
}

/* ================================
   HEADER & NAVIGATION
================================ */

header {
    background: var(--white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: fixed;
    /* ← CAMBIA QUI */
    top: 0;
    left: 0;
    /* ← AGGIUNGI */
    right: 0;
    /* ← AGGIUNGI */
    width: 100%;
    /* ← AGGIUNGI */
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}


header.scrolled {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding-bottom: 10px;
}


nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition-smooth);
    position: relative;
    z-index: 1001;
}


.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 35px;
    align-items: center;
}

nav ul li a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.5px;
    transition: var(--transition-smooth);
    position: relative;
    padding: 5px 0;
}

header.scrolled nav ul li a {
    color: var(--text-dark);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gold-accent);
    transition: width 0.3s ease;
    transform: translateX(-50%);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.lang-switcher {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 8px 15px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition-smooth);
}

header.scrolled .lang-switcher {
    background: rgba(91, 155, 213, 0.1);
    border-color: var(--primary-blue);
}

.lang-switcher button {
    background: transparent;
    border: 2px solid var(--text-dark);
    /* ← AGGIUNGI BORDO SCURO */
    color: var(--text-dark);
    /* ← SEMPRE SCURO */
    font-weight: 600;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-size: 13px;
}

header.scrolled .lang-switcher button {
    color: var(--text-dark);
    /* ← RIMANE SCURO */
}

.lang-switcher button.active {
    background: var(--primary-blue);
    /* ← BLU al posto di ORO */
    color: var(--white);
    border-color: var(--primary-blue);
}


.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 997;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
    padding: 10px;
    position: relative;
}

.hamburger span {
    width: 26px;
    height: 2.5px;
    background: var(--text-dark);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 3px;
    transform-origin: center;
    display: block;
}

header.scrolled .hamburger span {
    background: var(--dark-blue);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
    background: var(--white);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
    background: var(--white);
}

@keyframes hamburgerPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(91, 155, 213, 0.7);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(91, 155, 213, 0);
    }
}

.hamburger:not(.active):hover {
    animation: hamburgerPulse 1s ease-in-out;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    /* ← Ridotto da 0.7 a 0.3 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 996;
    /* ← Ridotto da 997 a 996 */
    pointer-events: none;
    /* ← Sempre disattivo */
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    /* ← RIMANE disattivo */
}

/* ================================
   HERO SECTION
================================ */

.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 900px;
    padding: 0 20px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1 {
    font-family: var(--font-serif);
    font-size: clamp(40px, 8vw, 72px);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: clamp(16px, 3vw, 24px);
    font-weight: 300;
    margin-bottom: 30px;
    letter-spacing: 1px;
    opacity: 0.95;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hero-feature-icon {
    font-size: clamp(32px, 5vw, 40px);
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3));
}

.hero-feature-text {
    font-size: clamp(13px, 2vw, 16px);
    font-weight: 500;
}

.hero-cta {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    display: inline-block;
    min-height: 44px;
    transform: translateZ(0);
    will-change: transform;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
    color: var(--white);
    box-shadow: 0 6px 25px rgba(91, 155, 213, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    backdrop-filter: blur(10px);
}

@media (hover: hover) {
    .btn-primary:hover {
        transform: translateY(-3px) translateZ(0);
        box-shadow: 0 10px 35px rgba(91, 155, 213, 0.4);
    }

    .btn-secondary:hover {
        background: var(--white);
        color: var(--primary-blue);
        transform: translateY(-3px) translateZ(0);
        box-shadow: 0 10px 35px rgba(255, 255, 255, 0.3);
    }
}

.btn-primary:active,
.btn-secondary:active {
    transform: scale(0.98) translateZ(0);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--white);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

.scroll-indicator span {
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ================================
   SECTIONS
================================ */

section {
    padding: var(--section-padding) 5%;
    position: relative;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary-blue);
    margin-bottom: 12px;
    font-weight: 600;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(32px, 5vw, 48px);
    color: var(--text-dark);
    margin-bottom: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.section-description {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ================================
   FEATURES GRID
================================ */

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

.feature-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue));
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

@media (hover: hover) {
    .feature-card:hover {
        transform: translateY(-8px) translateZ(0);
        box-shadow: 0 15px 50px rgba(91, 155, 213, 0.12);
    }

    .feature-card:hover::before {
        transform: scaleX(1);
    }

    .feature-card:hover .feature-icon {
        transform: scale(1.1) translateZ(0);
    }
}

.feature-icon {
    font-size: 50px;
    margin-bottom: 20px;
    color: var(--primary-blue);
    display: inline-block;
    transition: transform 0.3s ease;
}

.feature-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.feature-description {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.7;
}

/* ================================
   IMAGE GALLERY GRID
================================ */

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

.gallery-image-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transform: translateZ(0);
}

.gallery-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

@media (hover: hover) {
    .gallery-image-item:hover img {
        transform: scale(1.08) translateZ(0);
    }
}

.gallery-image-item:active {
    transform: scale(0.98) translateZ(0);
}

/* ================================
   IMAGE CONTENT SECTIONS
================================ */

.image-content-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
}

.image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
    aspect-ratio: 4/3;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

@media (hover: hover) {
    .image-wrapper:hover img {
        transform: scale(1.05) translateZ(0);
    }
}

.content-wrapper {
    padding: 20px;
}

.content-wrapper h2 {
    font-family: var(--font-serif);
    font-size: clamp(28px, 4vw, 42px);
    margin-bottom: 20px;
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.3;
}

.content-wrapper p {
    font-size: clamp(15px, 2vw, 17px);
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 18px;
}

.content-features {
    display: grid;
    gap: 18px;
    margin: 30px 0;
}

.content-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 18px;
    background: var(--light-blue);
    border-radius: 15px;
    transition: var(--transition-smooth);
}

@media (hover: hover) {
    .content-feature-item:hover {
        transform: translateX(8px) translateZ(0);
        background: rgba(91, 155, 213, 0.15);
    }
}

.content-feature-icon {
    font-size: 26px;
    color: var(--primary-blue);
    min-width: 26px;
}

.content-feature-text h4 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.content-feature-text p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

/* ================================
   SOCIAL PROOF TICKER
================================ */

.social-proof-ticker {
    background: var(--light-blue);
    padding: 12px 0;
    overflow: hidden;
    position: relative;
}

.ticker-content {
    display: flex;
    gap: 50px;
    animation: scroll 30s linear infinite;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    font-size: 14px;
    color: var(--text-dark);
}

.ticker-icon {
    color: var(--primary-blue);
    font-size: 18px;
}

/* ================================
   URGENCY BANNER
================================ */

.urgency-banner {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    color: var(--white);
    padding: 20px 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 35px 0;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.25);
    flex-wrap: wrap;
}

.urgency-icon {
    font-size: 28px;
}

.urgency-text {
    flex: 1;
    min-width: 200px;
}

.urgency-text strong {
    font-size: clamp(16px, 2.5vw, 18px);
    display: block;
    margin-bottom: 5px;
}

.urgency-text span {
    font-size: clamp(13px, 2vw, 14px);
    opacity: 0.9;
}

/* ================================
   TESTIMONIALS
================================ */

.testimonials-section {
    background: linear-gradient(135deg, var(--light-blue), var(--white));
}

.testimonial-card {
    background: var(--white);
    padding: 50px 40px;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-stars {
    color: var(--gold-accent);
    font-size: 20px;
    margin-bottom: 20px;
}

.testimonial-quote {
    font-size: clamp(18px, 3vw, 24px);
    line-height: 1.7;
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 30px;
    position: relative;
}

.testimonial-author h4 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.testimonial-author p {
    font-size: 14px;
    color: var(--text-light);
}

/* ================================
   WHATSAPP FLOATING BUTTON
================================ */

.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999;
}

.whatsapp-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s ease;
    transform: translateZ(0);
    min-width: 60px;
    min-height: 60px;
}

.whatsapp-button:active {
    transform: scale(0.95) translateZ(0);
}

@media (hover: hover) {
    .whatsapp-button:hover {
        transform: scale(1.1) translateZ(0);
        box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
    }
}

/* ================================
   GALLERY & LIGHTBOX
================================ */

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

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transform: translateZ(0);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

@media (hover: hover) {
    .gallery-item:hover img {
        transform: scale(1.08) translateZ(0);
    }
}

.gallery-item:active {
    transform: scale(0.98) translateZ(0);
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
}

/* ================================
   FOOTER
================================ */

footer {
    background: linear-gradient(135deg, var(--dark-blue), #1a3f55);
    color: var(--white);
    padding: 60px 5% 25px;
}

.footer-content {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-family: var(--font-serif);
    font-size: 22px;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-section p {
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: 15px;
    font-size: 14px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--white);
    opacity: 0.9;
    text-decoration: none;
    transition: opacity 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.footer-section ul li a:hover {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.social-link {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    text-decoration: none;
    transition: var(--transition-smooth);
}

@media (hover: hover) {
    .social-link:hover {
        background: var(--gold-accent);
        transform: translateY(-3px) translateZ(0);
    }
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    text-align: center;
    opacity: 0.8;
    font-size: 13px;
}

/* ================================
MOBILE RESPONSIVE - OTTIMIZZATO
================================ */

/* Navbar più piccola su mobile */
@media (max-width: 1024px) {
    header {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    nav {
        padding: 12px 4%;
        /* Leggermente più grande */
    }

    /* Logo Desktop nascosto su mobile */
    .logo .logo-desktop {
        display: none;
    }

    /* Logo Mobile visibile */
    .logo .logo-mobile {
        display: block;
        height: 55px;
        /* Navbar più grande */
        width: auto;
    }
}

@media (max-width: 768px) {

    /* NAVBAR COMPATTA */
    nav {
        padding: 14px 4%;
    }

    header {
        padding: 0;
        min-height: 70px;
        /* Navbar più alta */
    }

    /* Logo Mobile rettangolare */
    .logo .logo-mobile {
        height: 50px;
        /* Adatto per logo rettangolare */
        max-width: 150px;
        width: auto;
    }

    header {
        padding: 0;
    }

    /* HERO SECTION - Ottimizzato */
    .hero {
        min-height: 70vh;
        height: 70vh;
        margin-top: 70px;
        /* Compensa navbar */
    }

    .hero-content h1 {
        font-size: clamp(32px, 8vw, 48px);
        margin-bottom: 15px;
    }

    .hero-subtitle {
        font-size: clamp(14px, 3vw, 18px);
        margin-bottom: 25px;
    }

    /* IMMAGINI OTTIMIZZATE */
    .room-image,
    .gallery-image-item,
    .gallery-item {
        width: 100%;
        height: 250px;
        min-height: 250px;
    }

    .room-image img,
    .gallery-image-item img,
    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    /* SEZIONI PIÙ COMPATTE */
    section {
        padding: 40px 5%;
    }

    .section-header {
        margin-bottom: 30px;
    }

    .section-title {
        font-size: clamp(24px, 6vw, 32px);
        margin-bottom: 15px;
    }

    .section-description {
        font-size: 15px;
        line-height: 1.6;
    }

    /* GRID MOBILE */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-card {
        padding: 25px 20px;
    }

    /* GALLERY MOBILE OPTIMIZED */
    .gallery-grid,
    .image-gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .gallery-item,
    .gallery-image-item {
        aspect-ratio: 16/9;
        height: auto;
    }

    /* MENU HAMBURGER */
    .hamburger {
        display: flex;
        width: 40px;
        height: 40px;
        padding: 8px;
    }

    .hamburger span {
        width: 24px;
        height: 2px;
    }

    /* MOBILE MENU */
    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        max-width: 80vw;
        background: linear-gradient(135deg,
                rgba(44, 95, 124, 0.98) 0%,
                rgba(91, 155, 213, 0.95) 100%);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        gap: 0;
        padding: 70px 20px 40px;
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
        z-index: 999;
    }

    nav ul.active {
        right: 0;
    }

    nav ul li {
        width: 100%;
        opacity: 0;
        transform: translateX(30px);
        transition: all 0.3s ease;
    }

    nav ul.active li {
        opacity: 1;
        transform: translateX(0);
    }

    nav ul.active li:nth-child(1) {
        transition-delay: 0.1s;
    }

    nav ul.active li:nth-child(2) {
        transition-delay: 0.15s;
    }

    nav ul.active li:nth-child(3) {
        transition-delay: 0.2s;
    }

    nav ul.active li:nth-child(4) {
        transition-delay: 0.25s;
    }

    nav ul.active li:nth-child(5) {
        transition-delay: 0.3s;
    }

    nav ul li a {
        color: var(--white);
        font-size: 18px;
        padding: 15px 20px;
        display: block;
        border-radius: 12px;
        background: transparent;
    }

    nav ul li a:hover,
    nav ul li a.active {
        background: rgba(255, 255, 255, 0.15);
        transform: translateX(10px);
    }

    nav ul li a::after {
        display: none;
    }

    /* BUTTONS MOBILE */
    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
        padding: 15px 30px;
        font-size: 15px;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    /* WHATSAPP BUTTON */
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-button {
        width: 55px;
        height: 55px;
        font-size: 26px;
    }

    /* FOOTER MOBILE */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-section {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    /* LIGHTBOX MOBILE */
    .lightbox-prev,
    .lightbox-next {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}

@media (max-width: 480px) {

    /* EXTRA SMALL DEVICES */
    nav {
        padding: 12px 3%;
    }

    header {
        min-height: 65px;
    }

    .logo .logo-mobile {
        height: 45px;
        max-width: 140px;
    }

    .hero {
        margin-top: 65px;
    }

    .hero-content h1 {
        font-size: clamp(28px, 7vw, 36px);
    }

    /* Logo Desktop visibile per default */
    .logo .logo-desktop {
        display: block;
        height: 130px;
        /* Desktop logo */
        width: auto;
    }

    .logo .logo-mobile {
        display: none;
        /* Nascosto per default */
    }

    .section-title {
        font-size: clamp(22px, 5vw, 28px);
    }

    .feature-card {
        padding: 20px 15px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 14px 25px;
        font-size: 14px;
    }

    .whatsapp-button {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

/* ================================
FIX IMMAGINI - FORZA CARICAMENTO
================================ */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded,
img[loading="eager"] {
    opacity: 1;
}

/* GALLERY IMAGES - ASPECT RATIO */
.gallery-item,
.gallery-image-item,
.room-image {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.gallery-item img,
.gallery-image-item img,
.room-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* PREVENT LAYOUT SHIFT */
.room-image::before,
.gallery-item::before,
.gallery-image-item::before {
    content: "";
    display: block;
    padding-top: 75%;
    /* 4:3 aspect ratio */
}

@media (max-width: 768px) {

    .room-image::before,
    .gallery-item::before,
    .gallery-image-item::before {
        padding-top: 56.25%;
        /* 16:9 su mobile */
    }
}

/* ================================
   ACCESSIBILITY
================================ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ================================
   MOBILE MENU ELEMENTS - HIDE ON DESKTOP
================================ */

/* Nascondi elementi che devono apparire SOLO su mobile */
.menu-close-text,
.menu-decoration,
.menu-social-links {
    display: none;
}

/* Mostra solo su mobile (sotto 768px) */
@media (max-width: 768px) {
    .menu-close-text {
        display: block;
        position: absolute;
        top: 25px;
        right: 70px;
        color: rgba(255, 255, 255, 0.8);
        font-size: 14px;
        font-weight: 500;
        letter-spacing: 1px;
        text-transform: uppercase;
        opacity: 0;
        transition: opacity 0.3s ease 0.4s;
    }

    nav ul.active .menu-close-text {
        opacity: 1;
    }

    .menu-decoration {
        display: block;
        position: absolute;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.05);
        pointer-events: none;
    }

    .menu-decoration-1 {
        width: 200px;
        height: 200px;
        top: -50px;
        right: -50px;
        animation: float 6s ease-in-out infinite;
    }

    .menu-decoration-2 {
        width: 150px;
        height: 150px;
        bottom: -30px;
        left: -30px;
        animation: float 8s ease-in-out infinite reverse;
    }

    .menu-social-links {
        display: flex;
        justify-content: center;
        gap: 20px;
        margin-top: 40px;
        padding-top: 30px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    .menu-social-links a {
        width: 50px;
        height: 50px;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--white);
        text-decoration: none;
        transition: all 0.3s ease;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .menu-social-links a svg {
        width: 24px;
        height: 24px;
        fill: currentColor;
    }

    .menu-social-links a:hover {
        background: var(--gold-accent);
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
    }

    /* Animazione entrata icone social */
    nav ul.active .menu-social-links {
        animation: fadeInUp 0.6s ease 0.5s backwards;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================
   GALLERY OVERLAY STYLE
================================ */

.gallery-image-item {
    position: relative;
    overflow: hidden;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-image-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
    color: white;
}

.gallery-overlay p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    color: white;
}

/* Mobile: mostra sempre l'overlay */
@media (max-width: 768px) {
    .gallery-overlay {
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.3) 100%);
        padding: 20px 15px 15px;
    }

    .gallery-overlay h3 {
        font-size: 18px;
    }

    .gallery-overlay p {
        font-size: 13px;
    }
}

/* ================================
MOBILE NAVBAR - LOGO CENTRATO CON SPAZIO
================================ */

@media (max-width: 768px) {
    nav {
        display: grid;
        grid-template-columns: 1fr auto 1fr; /* Sinistra | Centro | Destra */
        align-items: center;
        padding: 14px 4%;
        gap: 20px; /* Spazio tra colonne */
    }
    
    .logo {
        grid-column: 2; /* Colonna centrale */
        justify-self: center;
        margin: 0;
    }
    
    .nav-right {
        grid-column: 3; /* Colonna destra */
        justify-self: end;
        display: flex;
        gap: 15px; /* Spazio tra bandiere e hamburger */
        padding-left: 20px; /* Spazio extra dal logo */
    }
}

@media (max-width: 480px) {
    nav {
        gap: 15px; /* Meno spazio su schermi piccoli */
    }
    
    .nav-right {
        padding-left: 15px;
        gap: 10px;
    }
}

/* ================================
MOBILE - IMMAGINI CAMERE OTTIMIZZATE
================================ */

@media (max-width: 768px) {
    /* ROOM IMAGES - MOBILE */
    .room-image,
    .gallery-image-item,
    .gallery-item {
        width: 100%;
        height: 250px;
        min-height: 250px;
        position: relative;
        overflow: hidden;
        background: #f0f0f0;
    }
    
    .room-image img,
    .gallery-image-item img,
    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
    }
    
    /* FORZA CARICAMENTO IMMAGINI */
    .room-image img,
    .gallery-image-item img {
        loading: eager !important;
    }
    
    /* ASPECT RATIO 16:9 */
    .room-image::before,
    .gallery-item::before,
    .gallery-image-item::before {
        content: "";
        display: block;
        padding-top: 56.25%; /* 16:9 aspect ratio */
    }
}

@media (max-width: 480px) {
    .room-image,
    .gallery-image-item,
    .gallery-item {
        height: 220px;
        min-height: 220px;
    }
}

/* ================================
   MOBILE - CAMERE LAYOUT VERTICALE
   ================================ */

@media (max-width: 768px) {
    /* Layout verticale: descrizione sopra, immagine sotto */
    .image-content-section {
        display: flex !important;
        flex-direction: column-reverse !important;
        gap: 0 !important;
        margin-bottom: 50px !important;
    }
    
    /* Immagine camera - piena larghezza */
    .image-wrapper {
        width: 100% !important;
        height: 280px !important;
        min-height: 280px !important;
        margin: 0 !important;
        border-radius: 0 0 20px 20px !important;
        order: 2; /* Immagine va sotto */
    }
    
    .image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    /* Contenuto descrizione - sopra l'immagine */
    .content-wrapper {
        width: 100% !important;
        padding: 25px 20px !important;
        order: 1; /* Descrizione va sopra */
    }
    
    .content-wrapper h2 {
        font-size: 26px !important;
        margin-bottom: 15px !important;
    }
    
    .content-wrapper p {
        font-size: 15px !important;
        line-height: 1.7 !important;
        margin-bottom: 20px !important;
    }
    
    /* Features delle camere */
    .content-features {
        gap: 12px !important;
        margin: 20px 0 !important;
    }
    
    .content-feature-item {
        padding: 15px !important;
    }
}

@media (max-width: 480px) {
    .image-wrapper {
        height: 250px !important;
        min-height: 250px !important;
    }
    
    .content-wrapper {
        padding: 20px 15px !important;
    }
    
    .content-wrapper h2 {
        font-size: 24px !important;
    }
}

/* ================================
   GALLERIA - IMMAGINE COPERTINA
================================ */

.gallery-hero-section {
    padding: var(--section-padding-mobile) 0;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--white) 100%);
}

.gallery-hero-content {
    text-align: center;
    margin-bottom: 50px;
}

.gallery-hero-content h2 {
    font-family: var(--font-serif);
    font-size: 48px;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.gallery-hero-content p {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* IMMAGINE COPERTINA */
.gallery-cover-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.gallery-cover-image {
    position: relative;
    width: 100%;
    height: 600px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-cover-image:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

.gallery-cover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s ease;
}

.gallery-cover-image:hover img {
    transform: scale(1.05);
}

/* OVERLAY */
.gallery-cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.4) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-cover-image:hover .gallery-cover-overlay {
    opacity: 1;
}

/* ICONA */
.gallery-cover-icon {
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* TESTO */
.gallery-cover-text {
    font-size: 24px;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
}

.gallery-photo-count {
    font-size: 16px;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

/* MOBILE */
@media (max-width: 768px) {
    .gallery-hero-content h2 {
        font-size: 36px;
    }
    
    .gallery-cover-image {
        height: 400px;
        border-radius: 15px;
    }
    
    .gallery-cover-overlay {
        opacity: 1; /* Sempre visibile su mobile */
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.6) 100%
        );
    }
    
    .gallery-cover-text {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .gallery-cover-image {
        height: 350px;
    }
    
    .gallery-hero-content h2 {
        font-size: 28px;
    }
    
    .gallery-cover-text {
        font-size: 18px;
    }
}