:root {
    /* Trullo Rustic Palette */
    --color-primary: #556b2f;
    /* Dark Olive Green */
    --color-primary-dark: #3a4a20;
    /* Deep Moss */
    --color-primary-light: #7e8f5a;
    /* Sage */

    --color-secondary: #fefcf5;
    /* Warm Cream */
    --color-secondary-warm: #f5f0e6;
    /* Linen */

    /* Earthy Accents */
    --color-accent: #8b5a2b;
    /* Wood/Leather */
    --color-accent-light: #a67c52;
    /* Sandstone */

    --color-gold: #c5a059;
    /* Muted Gold */
    --color-gold-light: #dbbf85;

    --color-text: #3e3b36;
    /* Warm Charcoal */
    --color-text-light: #6b665f;
    /* Taupe */
    --color-text-muted: #948f87;
    --color-white: #ffffff;

    /* Typography - Keeping fonts but adjusting weights in usage */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;

    /* Spacing */
    --spacing-container: 1200px;
    --spacing-section: 120px 0;

    /* Rustic Shadows - Softer, less "digital" */
    --shadow-soft: 0 2px 10px rgba(62, 59, 54, 0.05);
    --shadow-medium: 0 4px 15px rgba(62, 59, 54, 0.08);
    --shadow-elevated: 0 10px 30px rgba(62, 59, 54, 0.1);
    --shadow-glow: 0 0 20px rgba(197, 160, 89, 0.15);
    /* Subtler gold glow */

    /* Radii - Reduced for more traditional feel */
    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 12px;
    /* Was 60px - making buttons less pill-like */

    /* Transitions */
    --transition-smooth: all 0.3s ease-out;
    --transition-bounce: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.8;
    background: linear-gradient(180deg, var(--color-secondary) 0%, var(--color-secondary-warm) 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    image-rendering: auto;
    /* Default for better photo blending */
}

.container {
    max-width: var(--spacing-container);
    margin: 0 auto;
    padding: 0 40px;
    /* More horizontal padding */
}

.section-padding {
    padding: var(--spacing-section);
}

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

.mb-5 {
    margin-bottom: 4rem;
}

.bg-light {
    background-color: var(--color-secondary);
}

/* Buttons - Rustic & Matte */
.btn {
    display: inline-block;
    padding: 14px 32px;
    /* Slightly smaller padding */
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    border-radius: var(--radius-xl);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

/* Remove glossy sheen */
.btn::before {
    display: none;
}

.btn-primary {
    background-color: var(--color-primary);
    background: var(--color-primary);
    /* Solid color */
    color: var(--color-white);
    box-shadow: var(--shadow-soft);
    border: 1px solid transparent;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: var(--color-white);
}

.btn-outline:hover {
    background: var(--color-white);
    color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--color-white);
}

.btn-sm {
    padding: 10px 24px;
    font-size: 0.75rem;
    border: 1px solid var(--color-text);
}

.btn-link {
    color: var(--color-primary);
    border-bottom: 1px solid var(--color-primary);
    padding: 0;
    font-style: italic;
    /* Adding italic for rustic feel */
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-secondary-warm);
    /* Solid warm background initially? Or keep transparent? */
    background-color: rgba(254, 252, 245, 0.95);
    /* Warm rustic white */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 8px 0;
    z-index: 1000;
    transition: var(--transition-smooth);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

/* Scrolled State - Rustic */
.site-header.scrolled {
    background: rgba(254, 252, 245, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 0;
    box-shadow: var(--shadow-medium);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-header-phone {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: transparent;
    color: var(--color-primary-dark);
    border: 1px solid var(--color-primary);
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: var(--radius-xl);
    transition: all 0.3s ease;
}

.btn-header-phone svg {
    transition: transform 0.3s ease;
}

.btn-header-phone:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-header-phone:hover svg {
    transform: rotate(-10deg);
}


/* Logo */
.logo a {
    display: block;
}

.logo img {
    max-height: 60px;
    /* Reduced from 160px to prevent huge header */
    width: auto;
    transition: max-height 0.4s ease;
}

.site-header.scrolled .logo img {
    max-height: 60px;
    /* Consistent size on scroll */
}

/* Nav Links */
.main-nav ul {
    display: flex;
    gap: 50px;
}

.main-nav a {
    text-transform: uppercase;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--color-text);
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
    opacity: 0.8;
}

.site-header.scrolled .main-nav a {
    color: var(--color-text);
    opacity: 1;
}

/* Nav Link Hover Effect (Underline) */
.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    bottom: 0;
    left: 50%;
    background-color: var(--color-accent);
    /* Use accent color for rustic feel */
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.site-header.scrolled .main-nav a::after {
    background-color: var(--color-accent);
}

.main-nav a:hover::after {
    width: 80%;
    /* Don't go full width for a softer look */
}

.main-nav a:hover {
    opacity: 1;
    color: var(--color-primary-dark);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 24px;
    position: relative;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-text);
    margin-bottom: 6px;
    transition: all 0.3s ease;
    position: absolute;
    left: 0;
}

.mobile-menu-toggle span:nth-child(1) {
    top: 0;
}

.mobile-menu-toggle span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-toggle span:nth-child(3) {
    bottom: 0;
}

/* Hamburger to X animation */
.mobile-menu-toggle.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

.site-header.scrolled .mobile-menu-toggle span {
    background-color: var(--color-primary);
}

.section-title {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 400;
    font-size: 2.5rem;
    color: var(--color-primary-dark);
    margin-bottom: 40px;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Lighter backdrop */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 400px;
    height: 100%;
    background: #fdfaf5;
    /* Cream background from design */
    padding: 100px 30px 40px;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    overflow-y: auto;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    border-radius: 40px 0 0 40px;
    /* Rounded edge on the left */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-menu-overlay.active .mobile-nav {
    transform: translateX(0);
}

.mobile-menu-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: #fdfaf5;
    border: 1px solid #e0ddd5;
    font-size: 1.8rem;
    color: #4a4a4a;
    cursor: pointer;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.3s ease;
    z-index: 10;
}

.mobile-menu-close:hover {
    background: #f5f0e6;
    transform: rotate(90deg);
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 40px 0;
    width: 100%;
    text-align: center;
}

.mobile-nav ul li {
    margin-bottom: 5px;
    position: relative;
}

.mobile-nav ul li a {
    display: inline-block;
    padding: 15px 30px;
    color: #2c2c2c;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.mobile-nav ul li a:hover {
    color: var(--color-primary);
    background: transparent;
    text-shadow: 0 0 20px rgba(85, 107, 47, 0.2);
}

/* Olive Decoration Positioning */
.has-olive-decoration {
    display: flex;
    justify-content: center;
    align-items: center;
}

.olive-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    z-index: 1;
    pointer-events: none;
    color: var(--color-primary);
}

.mobile-menu-cta {
    margin-top: auto;
    width: 100%;
}

.btn-call-us {
    background-color: var(--color-primary) !important;
    color: #fff !important;
    border-radius: 12px !important;
    padding: 15px !important;
    text-decoration: none;
    display: block;
    box-shadow: 0 4px 15px rgba(85, 107, 47, 0.2);
}

.btn-call-us .btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.btn-call-us .btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.btn-call-us .label {
    font-size: 0.7rem;
    font-family: var(--font-body);
    font-weight: 400;
    letter-spacing: 1.5px;
    opacity: 0.9;
}

.btn-call-us .number {
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 700;
}

.icon-phone {
    opacity: 0.9;
}

/* Hero - Cinematic Experience */
.hero {
    height: 100vh;
    min-height: 700px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    padding-top: 80px;
    padding-bottom: 0;
    margin-bottom: 250px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.05);
    /* Ridotto ulteriormente per massima chiarezza */
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 850px;
    /* Ridotto per un aspetto più centrato e compatto */
    margin: 0 auto;
    padding: 50px 60px;
    background: rgba(255, 255, 255, 0.55);
    /* Leggermente più opaco per leggerezza */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(50%);
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    /* Ridotto da 3rem-5.5rem a 2.5rem-4rem */
    margin-bottom: 20px;
    font-weight: 700;
    font-style: italic;
    color: var(--color-primary-dark);
    text-shadow: none;
    line-height: 1.1;
    letter-spacing: -0.02em;
    animation: fadeInUp 1s ease-out;
}

.hero-description {
    font-family: var(--font-body);
    font-size: 1.15rem;
    /* Ridotto da 1.35rem a 1.15rem */
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto;
    color: #000000;
    font-weight: 400;
    animation: fadeInUp 1.2s ease-out;
    letter-spacing: 0.01em;
}

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

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

/* Intro Section Refined */
.intro {
    background-color: var(--color-secondary);
    position: relative;
    overflow: hidden;
}

.intro-container {
    display: flex;
    align-items: center;
    gap: 80px;
    /* Increased gap */
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.intro-text {
    flex: 0 0 40%;
    padding-left: max(40px, calc((100vw - var(--spacing-container)) / 2 + 40px));
    position: relative;
    z-index: 2;
}

.intro .section-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 400;
    line-height: 1.1;
    color: var(--color-primary-dark);
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.intro-description {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 50px;
    line-height: 1.8;
    max-width: 500px;
}

.unique-label {
    font-family: var(--font-heading);
    color: var(--color-gold);
    font-size: 1.2rem;
    font-style: italic;
    font-weight: 400;
    margin-bottom: 25px;
}

/* Tags/Pills */
.tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.usp-tag {
    background-color: var(--color-white);
    color: var(--color-primary);
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-soft);
    white-space: nowrap;
    transition: transform 0.3s ease;
}

.usp-tag:hover {
    transform: translateY(-2px);
}

/* Gallery Slider (Right Column) */
.intro-gallery {
    flex: 1;
    min-width: 0;
    position: relative;
    padding-bottom: 60px;
    /* Space for dots */
}

/* Post-cleanup of gallery scroller padding logic */
.gallery-scroller {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 40px;
    padding: 20px 0 40px 0;
    padding-right: 80px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    user-select: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

/* While dragging */
.gallery-scroller.active {
    cursor: grabbing;
    cursor: -webkit-grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
}

.gallery-scroller::-webkit-scrollbar {
    display: none;
}

.gallery-item {
    flex: 0 0 340px;
    scroll-snap-align: start;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.gallery-item:hover {
    transform: translateY(-12px);
}

.gallery-img {
    width: 100%;
    height: 480px;
    overflow: hidden;
    margin-bottom: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-medium);
    position: relative;
}

.gallery-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(45, 48, 40, 0.4) 0%, transparent 50%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.gallery-item:hover .gallery-img::before {
    opacity: 1;
}

.gallery-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 70%, rgba(0, 0, 0, 0.25));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.gallery-item:hover .gallery-img::after {
    opacity: 1;
}

.gallery-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item:hover .gallery-img img {
    transform: scale(1.1);
}



/* Navigation Dots - Premium Style */
.gallery-nav {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    width: fit-content;
}

.dot {
    width: 10px;
    height: 10px;
    background-color: var(--color-text-muted);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-bounce);
}

.dot:hover {
    background-color: var(--color-primary-light);
    transform: scale(1.3);
}

.dot.active {
    width: 32px;
    border-radius: 5px;
    background: var(--color-primary);
    /* Solid rustic color */
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .intro-container {
        flex-direction: column;
        align-items: stretch;
        gap: 50px;
    }

    .intro-text {
        flex: auto;
        padding: 0 20px;
        text-align: center;
    }

    .intro-description {
        margin-left: auto;
        margin-right: auto;
    }

    .tags-wrapper {
        justify-content: center;
    }

    .intro .section-title {
        font-size: 2.8rem;
    }

    .gallery-scroller {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Location/Pool */
.image-text-block {
    display: flex;
    align-items: center;
    gap: 50px;
}

.block-image {
    flex: 1;
}

.block-image img {
    border-radius: 4px;
}

.block-content {
    flex: 1;
}

.block-content h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--color-primary-dark);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 400;
}

.block-content p {
    margin-bottom: 30px;
    color: var(--color-text-light);
}

/* Experiences Section Refined */
.experiences-block {
    display: flex;
    justify-content: center;
    text-align: center;
    width: 100%;
    margin: 0;
    padding: 0;
}

.experiences-block .block-content {
    flex: 0 0 100%;
    max-width: 800px;
    padding: 0 40px;
}

/* Gallery wrapper in experiences block */
.experiences-block .intro-gallery {
    padding-bottom: 60px;
}

.experiences-block .gallery-scroller {
    padding-left: 0;
}

/* Fix gallery-nav width in experiences block */
.experiences-block .gallery-nav {
    display: inline-flex;
    width: auto !important;
    max-width: none;
    left: 50%;
    transform: translateX(-50%);
}

.experiences-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 400;
    line-height: 1.1;
    color: var(--color-primary-dark);
    margin-bottom: 30px;
}

.btn-experiences {
    background-color: var(--color-primary);
    color: white;
    padding: 16px 36px;
    border: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.btn-experiences:hover {
    background-color: var(--color-primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.experiences-block .gallery-nav {
    justify-content: center;
    position: absolute;
    bottom: 0;
    width: 100%;
    left: 0;
    transform: none;
    margin-top: 0;
}

/* Rooms Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
}

.card-image {
    height: 250px;
    overflow: hidden;
}

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

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

.card-body {
    padding: 25px;
}

.card-body h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--color-primary);
}

/* Footer */
.site-footer {
    background-color: #3d4636;
    color: #f4f1ea;
    padding: 40px 0 20px;
}

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

.footer-col h3,
.footer-col h4 {
    font-family: var(--font-heading);
    margin-bottom: 20px;
    color: #ffffff;
}

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

.footer-col a:hover {
    color: #ffffff;
    text-decoration: underline;
}

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

/* Header CTA Button - Initial (Transparent Header) */
/* Header CTA Button - Initial & Scrolled (Always Green) */
.header-actions .btn-primary {
    background-color: var(--color-primary);
    border: 1px solid var(--color-primary);
    color: var(--color-white);
    transition: all 0.3s ease;
}

.header-actions .btn-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
}

/* Scrolled State - Same as initial now */
.site-header.scrolled .header-actions .btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.site-header.scrolled .header-actions .btn-primary:hover {
    background-color: var(--color-primary-dark);
}





/* Events Section - Premium Cards */
.events-section {
    position: relative;
    z-index: 10;
    background: linear-gradient(180deg, var(--color-white) 0%, var(--color-secondary) 100%);
    padding-bottom: 120px;
}

.events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 35px;
}

@media (min-width: 768px) {
    .events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.event-card {
    background: var(--color-white);
    padding: 45px 35px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition-smooth);
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle border */
    position: relative;
    overflow: hidden;
}

/* Remove the modern top gradient line */
.event-card::before {
    display: none;
}

.event-card:hover {
    transform: translateY(-5px);
    /* Less movement */
    box-shadow: var(--shadow-medium);
    border-color: var(--color-primary-light);
}

.event-date {
    background: linear-gradient(135deg, var(--color-secondary-warm) 0%, var(--color-white) 100%);
    color: var(--color-text);
    padding: 20px;
    text-align: center;
    margin-bottom: 25px;
    border-radius: var(--radius-sm);
    position: relative;
}

.event-date .day {
    font-size: 3rem;
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1;
    display: block;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.event-date .month {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
    color: var(--color-text-muted);
    display: block;
    margin-top: 8px;
}

.event-details h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--color-text);
}

.event-description {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin-bottom: 20px;
    line-height: 1.5;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.event-time {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 25px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.03);
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
}

.btn-link-event {
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-decoration: none;
    position: relative;
    padding-bottom: 5px;
    transition: all 0.3s ease;
}

.btn-link-event::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 50%;
    background-color: var(--color-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.event-card:hover .btn-link-event::after {
    width: 100%;
}

/* Location Grid Refined - Switched to Grid for consistent order */
.location-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (min-width: 768px) {
    .location-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .location-grid {
        grid-template-columns: repeat(4, 1fr);
        /* 4 cols looks more balanced */
        gap: 30px;
    }
}

.location-grid .grid-item {
    width: 100%;
    margin-bottom: 0;
    /* Handled by grid gap */
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}

.location-grid .grid-item:hover {
    box-shadow: var(--shadow-elevated);
    transform: translateZ(0) scale(1.02);
}

.location-grid .grid-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: var(--radius-md);
    image-rendering: smooth;
    /* Ensures high-quality downscaling for large photos */
    backface-visibility: hidden;
    /* Fixes slight blur during transitions */
}

.location-grid .grid-item:hover img {
    transform: scale(1.08);
}

/* Wide grid item - spans full width */
.location-grid .grid-item.wide {
    grid-column: 1 / -1;
    max-height: 400px;
    /* Limit height to maintain horizontal aspect */
}

.location-grid .grid-item.wide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}


/* Map Section */
.map-section {
    background-color: var(--color-secondary);
}

.map-container {
    position: relative;
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.map-container iframe {
    display: block;
    width: 100%;
}

.map-info strong {
    color: var(--color-primary-dark);
    font-size: 1.3rem;
}

/* Footer - Rustic Dark */
.site-footer {
    background: #2b2e25;
    /* Solid dark rustic green/grey */
    color: rgba(255, 255, 255, 0.85);
    padding: 40px 0 20px;
    position: relative;
    border-top: 5px solid var(--color-primary);
    /* Simple top border */
}

.site-footer::before {
    display: none;
}

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

.footer-col h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--color-white);
    letter-spacing: -0.02em;
}

.footer-col h4 {
    font-family: var(--font-body);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 3px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.4);
}

.footer-col ul li {
    margin-bottom: 15px;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    position: relative;
}

.footer-col a:hover {
    color: var(--color-gold);
}

.contact-info p {
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.7);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: var(--transition-smooth);
}

.social-links a:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    opacity: 0.5;
    letter-spacing: 1.5px;
}

/* Footer Funding Box */
.footer-funding {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.funding-text {
    font-family: var(--font-body);
    font-weight: bold;
    color: #333333;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
}

.funding-cup {
    font-family: var(--font-body);
    font-weight: 500;
    color: #666666;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-top: -8px;
    text-align: center;
}

.funding-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.funding-logos img {
    height: 45px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* =============================================
   LIGHTBOX STYLES (New)
   ============================================= */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(43, 46, 37, 0.95);
    /* Dark rustic olive tint */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    /* Minimal radius for photo feel */
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-img {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

.lightbox-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.lightbox-content:hover .lightbox-caption {
    transform: translateY(0);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 2001;
}

.lightbox-close::before,
.lightbox-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 2px;
    background: var(--color-white);
    transform: translate(-50%, -50%) rotate(45deg);
    transition: all 0.3s ease;
}

.lightbox-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.lightbox-close:hover::before,
.lightbox-close:hover::after {
    background: var(--color-gold);
    transform: translate(-50%, -50%) rotate(135deg);
}

.lightbox-close:hover::after {
    transform: translate(-50%, -50%) rotate(45deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2001;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--color-white);
    color: var(--color-primary-dark);
    transform: translateY(-50%) scale(1.1);
}

/* Gallery Interaction & Badges */
.gallery-item,
.location-grid .grid-item {
    /* ... existing content ... */
    position: relative;
}

/* Mobile Hero Adjustments */
@media (max-width: 768px) {
    .hero-content {
        padding: 30px 20px;
        background: rgba(255, 255, 255, 0.15);
        /* Slightly more visible on small screens */
    }

    .hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
        margin-bottom: 20px;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* =============================================
   COMPREHENSIVE MOBILE RESPONSIVE STYLES
   ============================================= */

/* Tablet and smaller */
@media (max-width: 992px) {
    :root {
        --spacing-section: 80px 0;
    }

    .container {
        padding: 0 30px;
    }

    .section-padding {
        padding: 80px 0;
    }

    /* Section titles */
    .section-title {
        font-size: 2.2rem !important;
    }

    /* Cards grid improvement */
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    :root {
        --spacing-section: 60px 0;
    }

    .container {
        padding: 0 20px;
    }

    .section-padding {
        padding: 60px 0;
    }

    /* Header Mobile */
    .site-header {
        padding: 15px 0;
    }

    .site-header.scrolled {
        padding: 12px 0;
    }

    .header-container {
        padding: 0 20px;
    }

    .logo img {
        max-height: 50px;
    }

    .site-header.scrolled .logo img {
        max-height: 45px;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
        width: 50px;
        height: 50px;
        position: relative;
        z-index: 1100;
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid rgba(139, 90, 43, 0.2);
        border-radius: 50%;
        padding: 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    }

    .mobile-menu-toggle:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    }

    .mobile-menu-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        border-radius: 2px;
        transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        background-color: var(--color-primary-dark);
        position: absolute;
        left: 13px;
        /* Centering: (50-24)/2 */
        transform-origin: center;
    }

    /* Override standard positioning for the circle layout */
    .mobile-menu-toggle span:nth-child(1) {
        top: 17px;
    }

    .mobile-menu-toggle span:nth-child(2) {
        top: 24px;
        transform: none;
        /* Reset global translateY */
    }

    .mobile-menu-toggle span:nth-child(3) {
        bottom: auto;
        top: 31px;
    }

    /* Active Animation Override */
    .mobile-menu-toggle.active span:nth-child(1) {
        top: 24px;
        transform: rotate(45deg);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        top: 24px;
        bottom: auto;
        transform: rotate(-45deg);
    }

    .header-actions .btn-primary {
        display: none;
    }

    /* Hero Mobile */
    .hero {
        min-height: 100vh;
        min-height: 100svh;
        padding-top: 70px;
        background-position: center;
        background-image: url('foto%20t/IMG_2997.JPG') !important;
        margin-bottom: 200px;
    }

    .hero-content {
        padding: 35px 25px;
        max-width: 95%;
        background: rgba(255, 255, 255, 0.55);
        transform: translateY(50%);
    }

    .hero h1 {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        margin-bottom: 20px;
        line-height: 1.2;
    }

    .hero-description {
        font-size: 0.95rem;
        line-height: 1.65;
    }

    .hero .btn-outline {
        padding: 14px 28px;
        font-size: 0.7rem;
    }

    /* Buttons Mobile */
    .btn {
        padding: 14px 28px;
        font-size: 0.7rem;
        letter-spacing: 1.5px;
    }

    /* Intro Section Mobile */
    .intro-container {
        flex-direction: column;
        gap: 40px;
    }

    .intro-text {
        padding: 0 !important;
        text-align: center;
    }

    .intro .section-title {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .intro-description {
        font-size: 1rem;
        margin-bottom: 30px;
        max-width: 100%;
    }

    .unique-label {
        font-size: 1rem;
    }

    .tags-wrapper {
        justify-content: center;
        gap: 10px;
    }

    .usp-tag {
        padding: 10px 18px;
        font-size: 0.75rem;
    }

    /* Gallery Mobile */
    .intro-gallery {
        padding-bottom: 50px;
    }

    .gallery-scroller {
        gap: 20px;
        padding: 15px 20px 35px 20px;
    }

    .gallery-item {
        flex: 0 0 280px;
    }

    .gallery-img {
        height: 380px;
        margin-bottom: 15px;
    }

    .gallery-item h4 {
        font-size: 1.2rem;
    }

    .gallery-nav {
        padding: 10px 16px;
        gap: 8px;
    }

    .dot {
        width: 8px;
        height: 8px;
    }

    .dot.active {
        width: 24px;
    }

    /* Experiences Block Mobile */
    .experiences-block {
        flex-direction: column;
        gap: 40px;
    }

    .experiences-block .block-content {
        padding-right: 0 !important;
        text-align: center;
        order: -1;
    }

    .experiences-title {
        font-size: 2rem;
    }

    .experiences-block .block-content p {
        max-width: 100%;
    }

    .btn-experiences {
        padding: 14px 28px;
        font-size: 0.75rem;
    }

    /* Image Text Blocks Mobile */
    .image-text-block {
        flex-direction: column;
        gap: 30px;
    }

    .block-content {
        text-align: center;
    }

    .block-content h3 {
        font-size: 1.8rem;
    }

    /* Section Titles Mobile */
    .section-title {
        font-size: 2rem !important;
        margin-bottom: 35px !important;
    }

    /* Laboratori Cards Mobile */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card {
        border-radius: var(--radius-md);
    }

    .card-body {
        padding: 30px 25px;
    }

    .card-body h3 {
        font-size: 1.4rem !important;
        color: var(--color-primary-dark);
    }

    .card-body h4 {
        font-size: 0.95rem !important;
    }

    .card-body p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    /* Events Section Mobile */
    .events-section {
        padding-bottom: 80px;
    }

    .events-grid {
        gap: 20px;
    }

    .event-card {
        padding: 35px 28px;
    }

    .event-date {
        padding: 18px;
        margin-bottom: 20px;
    }

    .event-date .day {
        font-size: 2.8rem;
    }

    .event-date .month {
        font-size: 0.7rem;
        letter-spacing: 2.5px;
    }

    .event-details h3 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }

    .event-description {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .event-time {
        font-size: 0.85rem;
        padding: 6px 14px;
    }

    /* Location Gallery Mobile */
    .location-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .location-grid .grid-item {
        margin-bottom: 10px;
        border-radius: var(--radius-md);
    }

    /* Map Section Mobile */
    .map-container iframe {
        height: 350px !important;
    }

    .map-info {
        margin-top: 25px !important;
    }

    .map-info p {
        font-size: 1rem !important;
    }

    /* Lightbox Mobile */
    .lightbox-content {
        max-width: 95%;
        max-height: 80vh;
    }

    .lightbox-img {
        max-height: 80vh;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .lightbox-prev {
        left: 15px;
    }

    .lightbox-next {
        right: 15px;
    }

    /* Footer Mobile */
    .site-footer {
        padding: 60px 0 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
        margin-bottom: 50px;
    }

    .footer-col h3 {
        font-size: 1.8rem;
        color: var(--color-primary-dark);
    }

    .footer-col h4 {
        font-size: 0.7rem;
    }

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

    .social-links a {
        padding: 10px 16px;
        font-size: 0.75rem;
    }

    .footer-bottom {
        font-size: 0.7rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .section-padding {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.75rem !important;
        margin-bottom: 28px !important;
    }

    /* Header Extra Small */
    .header-container {
        padding: 0 16px;
    }

    .header-actions .btn-primary {
        padding: 10px 16px;
        font-size: 0.6rem;
    }

    /* Hero Extra Small */
    .hero-content {
        padding: 30px 20px;
    }

    .hero h1 {
        font-size: clamp(1.6rem, 6.5vw, 2rem);
    }

    .hero-description {
        font-size: 0.9rem;
    }

    /* Cards */
    .card-body {
        padding: 25px 20px;
    }

    .card-body h3 {
        font-size: 1.25rem !important;
    }

    /* Gallery */
    .gallery-item {
        flex: 0 0 240px;
    }

    .gallery-img {
        height: 300px;
    }

    /* Events */
    .event-card {
        padding: 28px 22px;
    }

    .event-date .day {
        font-size: 2.3rem;
    }

    .event-details h3 {
        font-size: 1.15rem;
    }

    /* Location Grid */
    .location-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .location-grid .grid-item {
        margin-bottom: 12px;
    }

    /* Map */
    .map-container iframe {
        height: 300px !important;
    }

    /* Footer */
    .footer-col h3 {
        font-size: 1.6rem;
    }

    .footer-bottom {
        font-size: 0.65rem;
    }

    /* Mobile Menu */
    .mobile-nav {
        width: 90%;
        padding: 70px 30px 30px;
    }

    .mobile-nav ul li a {
        font-size: 1rem;
        padding: 14px 18px;
    }
}