@import url('https://fonts.googleapis.com/css2?family=Della+Respira&family=Inter:wght@400;700;800&display=swap');

/* Logo-Centric Sponsor Styles */
.sponsor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 60px;
    justify-content: center;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.logo-bubble-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    padding: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-decoration: none;
    height: 100%;
}

.logo-bubble-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(17, 89, 52, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(17, 89, 52, 0.2);
}

.logo-container {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.logo-container.dark {
    background: #111;
}

.logo-bubble-card:hover .logo-container {
    transform: scale(1.05);
}

.logo-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sponsor-info h3 {
    font-family: var(--font-title);
    color: white;
    font-size: 1.4rem;
    margin-bottom: 8px;
    font-weight: 400;
    letter-spacing: -0.5px;
}

.sponsor-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(10px);
}

.logo-bubble-card:hover .sponsor-info p {
    opacity: 1;
    max-height: 100px;
    margin-top: 10px;
    transform: translateY(0);
}

.sponsor-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(17, 89, 52, 0.12);
    color: var(--primary-color);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

/* Mobile-Specific Bubble Refinements */
@media (max-width: 768px) {
    .bubble-card {
        padding: 25px;
        min-height: 480px;
        /* More 'story' like height on mobile */
        border-radius: 35px;
    }

    .bubble-card h3 {
        font-size: 2.2rem;
        /* Better scaling for mobile */
    }

    .bubble-text {
        padding: 12px 20px;
        font-size: 0.95rem;
        border-radius: 25px;
    }

    .countdown-bubbles {
        gap: 8px;
    }

    .countdown-bubble {
        width: 55px;
        height: 55px;
    }

    .countdown-bubble .value {
        font-size: 1rem;
    }

    .bubble-btn {
        padding: 10px 25px;
        font-size: 0.85rem;
    }
}

/* Enhancing Mobile Typography & Spacing */
@media (max-width: 991px) {
    .section-header h2 {
        font-size: 2.5rem;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    /* Hide desktop nav on small screens if needed or adjust it */
    .navbar-toggler {
        display: block;
        /* Ensure hamburger is visible */
    }
}

/* Floating Action Button — sempre visibile */
.fab-container {
    position: fixed;
    bottom: 40px;
    right: 30px;
    z-index: 1000;
    display: block;
}

@media (max-width: 768px) {
    .fab-container {
        bottom: 25px;
        right: 20px;
    }
}

.floating-btn {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 10px 25px rgba(17, 89, 52, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.floating-btn:hover {
    transform: scale(1.1) rotate(5deg);
}

:root {
    /* Colors - More vibrant & harmonious */
    --primary-color: #115934;
    --primary-hover: #0d4024;
    --primary-glow: rgba(17, 89, 52, 0.5);
    --secondary-color: rgba(17, 89, 52, 0.1);
    --accent-color: #ff2d55;
    --accent-glow: rgba(255, 45, 85, 0.5);

    /* Neutral Colors */
    --text-dark: #0f172a;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;

    /* Backgrounds */
    --bg-light: #ffffff;
    --bg-off-white: #f8fafc;
    --bg-dark: #0f172a;
    --bg-card-dark: rgba(30, 41, 59, 0.7);
    --bg-footer: #020617;

    /* Typography */
    --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-title: "Della Respira", serif;

    /* Borders & Radius */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-xl: 48px;
    --radius-full: 9999px;

    /* Shadows - More layered and soft */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px var(--primary-glow);

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-dark-bg: rgba(15, 23, 42, 0.7);
    --glass-dark-border: rgba(255, 255, 255, 0.1);

    /* Utilities */
    --bg-glass: rgba(248, 250, 252, 0.85);
    --border-light: rgba(0, 0, 0, 0.06);
}

/* Glassmorphism Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
}

.glass-dark {
    background: var(--glass-dark-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-dark-border);
    box-shadow: var(--shadow-xl);
}

/* Reveal Animations */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Base Smoothing */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    scroll-snap-type: y mandatory;
}

/* Sponsor Tiers */
.sponsor-tier {
    margin-bottom: 80px;
}

.tier-title {
    font-family: var(--font-title);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.tier-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.tier-gold .logo-bubble-card {
    border-color: rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.05);
}

.tier-gold .sponsor-tag {
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
}

.tier-silver .logo-bubble-card {
    border-color: rgba(192, 192, 192, 0.3);
}

.tier-silver .sponsor-tag {
    background: rgba(192, 192, 192, 0.2);
    color: #C0C0C0;
}



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

/* Prevent horizontal scroll on mobile */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.5;
    background-color: var(--bg-light);
}

body.menu-open {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

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

iframe, video {
    max-width: 100%;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px; /* slightly smaller padding for mobile */
}

@media (min-width: 768px) {
    .container {
        padding: 0 20px;
    }
}


.section-header {
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-family: var(--font-title);
    font-size: 2.8rem;
    font-weight: 400;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

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

.mt-4 {
    margin-top: 1.5rem;
}

/* Buttons & Badges */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-weight: 600;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
    font-size: 0.95rem;
    text-align: center;
    gap: 8px;
}

.btn.sm {
    padding: 8px 24px;
    font-size: 0.85rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(17, 89, 52, 0.4);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

.btn-outline-rounded {
    background-color: transparent;
    border: 1px solid #ddd;
    color: var(--text-dark);
    padding: 10px 30px;
    border-radius: var(--radius-full);
}

.btn-black {
    background-color: #000;
    color: #fff;
    width: 100%;
}

.btn-black:hover {
    background-color: #333;
}

.badge {
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.badge-blue {
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 1px;
}

/* Header */
.header {
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition-fast);
}

.header.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-md);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-title);
    font-weight: 400;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.nav-list {
    display: flex;
    gap: 24px;
}

.nav-list a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
}

.nav-list a:hover {
    color: var(--text-dark);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* Hero Container */
.hero-container {
    display: flex;
    flex-direction: column-reverse;
    gap: 40px;
}

@media (min-width: 768px) {
    .hero-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
}

.image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-card {
    background: white;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-md);
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 10;
    transition: transform var(--transition-fast);
}

.hero-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Mobile & Tablet Overrides for Hero Card */
@media (max-width: 1024px) {
    .hero-card {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 0;
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        border-top: 1px solid #eee;
    }
}

.hero-card .icon {
    background: #FEF3C7;
    padding: 8px;
    border-radius: 50%;
    font-size: 1.2rem;
}

.hero-card .text {
    display: flex;
    flex-direction: column;
}

.hero-card .text strong {
    font-size: 0.9rem;
}

.hero-card .text span {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Hero Section Refinement */
.hero {
    position: relative;
    overflow: hidden;
    background-color: var(--bg-light);
}

.hero-glass {
    padding: 40px;
    border-radius: var(--radius-xl);
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-family: var(--font-title);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin: 20px 0;
    font-weight: 400;
    letter-spacing: -2px;
}

.hero-content p {
    font-size: 1.1rem;
    max-width: 500px;
    color: var(--text-light);
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-image .image-wrapper {
    box-shadow: var(--shadow-xl);
    transform: perspective(1000px) rotateY(-5deg);
    transition: var(--transition-smooth);
}

.hero-image:hover .image-wrapper {
    transform: perspective(1000px) rotateY(0deg);
}

.hero-bg-accent {
    position: absolute;
    top: -10%;
    right: -5%;
    width: 50%;
    height: 70%;
    background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
    z-index: 1;
    opacity: 0.6;
    pointer-events: none;
}

/* Page Hero Shared — unified definition (light green for inner pages) */
.page-hero-accent {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 85% 15%, rgba(17, 89, 52, 0.08) 0%, transparent 55%);
    z-index: 1;
    pointer-events: none;
}


/* History */
.history {
    padding: 80px 0;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #eee;
}

.timeline-item {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
    position: relative;
    width: 100%;
}

.timeline-icon {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.05);
    z-index: 1;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-icon {
    transform: rotate(-5deg) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.timeline-content {
    background: white;
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.03);
    flex-grow: 1;
    transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-content {
    background: var(--bg-off-white);
    transform: translateX(10px);
}

.timeline-content .year {
    background: var(--secondary-color);
    color: var(--primary-color);
    font-weight: 800;
    font-size: 0.8rem;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-content h3 {
    font-family: var(--font-title);
    margin-bottom: 10px;
    font-size: 1.5rem;
    font-weight: 400;
}

.timeline-content p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
}


/* Event Section */
.event-section {
    padding: 80px 0;
    background-color: var(--bg-dark);
    color: white;
}

/* Event Container */
.event-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

@media (min-width: 768px) {
    .event-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
}

/* Bubble & Photo Hybrid Layout */
.hybrid-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 50px;
}

@media (min-width: 992px) {
    .hybrid-grid {
        grid-template-columns: 2fr 1fr;
        align-items: stretch;
    }

    .hybrid-stack {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }
}

.bubble-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 50px;
    color: white;
    transition: var(--transition-smooth);
    text-decoration: none;
    height: 100%;
    min-height: 450px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.bubble-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 0;
}

.bubble-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    z-index: 1;
}

/* Photo Backgrounds */
.bg-notturna::before {
    background-image: url('images/notturna.png');
}

.bg-principale::before {
    background-image: url('images/principale.png');
}

.bg-camminate::before {
    background-image: url('images/camminate.png');
}

.bubble-card:hover::before {
    transform: scale(1.05);
}

.bubble-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 20px var(--primary-glow);
    border-color: var(--primary-color);
}

.bubble-content {
    position: relative;
    z-index: 2;
}

/* Bubble UI Elements */
.bubble-tag {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.bubble-card h3 {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 15px;
    line-height: 1;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.bubble-card.small h3 {
    font-size: 1.8rem;
}

.bubble-text {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 20px 25px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: block;
    transition: var(--transition-smooth);
}

.bubble-card:hover .bubble-text {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

/* Countdown Bubbles */
.countdown-bubbles {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.countdown-bubble {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.countdown-bubble .value {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1;
}

.countdown-bubble .label {
    font-size: 0.6rem;
    font-weight: 600;
    opacity: 0.7;
    text-transform: uppercase;
}

/* Bubble Buttons */
.bubble-btn {
    background: white;
    color: black;
    padding: 12px 30px;
    border-radius: 100px;
    font-weight: 800;
    font-size: 0.9rem;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bubble-btn:hover {
    transform: scale(1.05);
    background: var(--primary-color);
    color: white;
    box-shadow: 0 10px 20px rgba(17, 89, 52, 0.35);
}

.bubble-btn.outline {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

.bubble-btn.outline:hover {
    background: white;
    color: black;
}

.card-info-item span {
    font-size: 1.2rem;
}

.event-info h2 {
    font-size: 3rem;
    line-height: 1;
    margin: 10px 0 20px 0;
}

.event-info p {
    color: #9CA3AF;
    margin-bottom: 30px;
}

.event-details {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .event-details {
        flex-direction: column;
        gap: 16px;
    }
}

.detail-item {
    display: flex;
    gap: 12px;
}

.detail-item .icon {
    font-size: 1.5rem;
}

.detail-item strong {
    display: block;
    font-size: 1.1rem;
}

.detail-item span {
    color: #9CA3AF;
    font-size: 0.9rem;
}

.countdown {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.count-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    border-radius: var(--radius-md);
    text-align: center;
    min-width: 80px;
}

.count-box .number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.count-box .label {
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: #9CA3AF;
}

.full-width {
    width: 100%;
    display: block;
    text-align: center;
}

.event-map {
    height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.map-placeholder {
    width: 100%;
    height: 100%;
    position: relative;
}

.btn-map-overlay {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

/* Gallery */
.gallery {
    padding: 80px 0;
}

/* Gallery - Fluid Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
}

/* Annulla le posizioni esplicite a tablet — le colonne sono solo 2 */
@media (min-width: 600px) and (max-width: 1023px) {
    .gallery-item.large,
    .gallery-item.medium,
    .gallery-item.small-top,
    .gallery-item.small-bottom {
        grid-column: auto;
        grid-row: auto;
        min-height: 260px;
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
        grid-template-rows: 250px 250px;
    }
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
}

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

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

.gallery-item.large {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.gallery-item.medium {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
}

.gallery-item.small-top {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}

.gallery-item.small-bottom {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
}

.gallery-overlay h3 {
    font-size: 1.2rem;
}

.gallery-overlay .tag {
    background: var(--primary-color);
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 5px;
    display: inline-block;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Membership */
.membership {
    padding: 80px 0;
    background-color: var(--bg-off-white);
}

.membership-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
}

.membership-info {
    max-width: 500px;
}

.membership-info h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

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

.benefits-list li {
    margin-bottom: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.membership-card {
    background: white;
    padding: 30px;
    /* Reduced padding for mobile safety */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    /* Ensure it fits container */
    max-width: 400px;
    /* Cap width for larger screens */
    margin: 0 auto;
    /* Center on mobile */
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.card-header span {
    font-size: 0.8rem;
    font-weight: 700;
    color: #9CA3AF;
    text-transform: uppercase;
}

.price {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.price small {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 400;
}

.input-field {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
    font-size: 1rem;
}

.small-text {
    font-size: 0.75rem;
    color: #9CA3AF;
    text-align: center;
    margin-top: 15px;
}

/* Footer */
.footer {
    background-color: var(--bg-footer);
    color: #D1D5DB;
    padding: 60px 0 20px 0;
    font-size: 0.9rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 640px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .footer-content {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
    }
}

.footer-logo {
    color: white;
    margin-bottom: 20px;
}

.footer-col h4 {
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

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

.footer-col ul li a:hover {
    color: white;
}

.footer-col ul li a[href^="tel:"],
.footer-col ul li a[href^="mailto:"] {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-col ul li a[href^="tel:"]:hover,
.footer-col ul li a[href^="mailto:"]:hover {
    color: white;
    text-decoration: underline;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.social-icons svg {
    width: 20px;
    height: 20px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

/* Gallery Tagline */
.gallery-tagline {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-top: 40px;
}

.highlight-mention {
    color: var(--primary-color);
    font-weight: 700;
    background: var(--secondary-color);
    padding: 2px 10px;
    border-radius: 6px;
    display: inline-block;
}

.footer-bottom .container {
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

/* Generic dark background helper used by multiple sections */
.dark-bg {
    background-color: var(--bg-dark);
    color: #ffffff;
}

.dark-bg .section-header h2,
.dark-bg h2,
.dark-bg h3,
.dark-bg h4 {
    color: #ffffff;
}

.dark-bg p {
    color: #D1D5DB;
}




/* Page Hero Shared — full-viewport slide */
.page-hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 0 40px;
    background-color: #f4fdf4;
    text-align: center;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.page-hero h1 {
    font-family: 'Della Respira', serif;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 400;
    color: #115934;
    margin-top: 10px;
    letter-spacing: 0;
    line-height: 1.1;
}

.page-hero p {
    color: #4b5563;
    max-width: 620px;
    margin: 20px auto 0 auto;
    font-size: 1.15rem;
    line-height: 1.7;
}

/* Active nav link */
.nav-list a.active {
    color: var(--primary-color);
    font-weight: 700;
}

/* Event Detail Page Styles */
.event-detail-featured {
    padding: 80px 0;
}

.event-grid,
.paths-info,
.directions-grid,
.gallery-grid-full,
.sponsor-grid {
    display: grid;
    gap: 30px;
}

.event-grid {
    grid-template-columns: 1fr;
}

.directions-grid,
.sponsor-grid,
.gallery-grid-full {
    grid-template-columns: 1fr;
}

.info-blocks {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .event-grid {
        grid-template-columns: 1.2fr 1fr;
    }

    .directions-grid,
    .sponsor-grid,
    .gallery-grid-full {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-blocks {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {

    .directions-grid,
    .sponsor-grid,
    .gallery-grid-full {
        grid-template-columns: repeat(3, 1fr);
    }
}

.event-content h2 {
    font-size: 2.5rem;
    margin-top: 10px;
}

.info-blocks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 40px 0;
}

.info-block strong {
    display: block;
    color: var(--text-dark);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.info-block p {
    font-size: 1rem;
    color: var(--text-light);
}

.paths-info h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.path-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.path-dist {
    background: var(--bg-dark);
    color: white;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.img-rounded {
    border-radius: var(--radius-lg);
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.route-map-box {
    background: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid #eee;
}

.directions {
    padding: 80px 0;
}

.directions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.directions-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.directions-card .icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 20px;
}

.directions-card h3 {
    margin-bottom: 15px;
    color: white;
}

/* Gallery Full Page */
.gallery-full {
    padding: 80px 0 60px;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 50px;
}

.filter-tabs .btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.gallery-grid-full {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-img-box {
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 300px;
}

.gallery-img-box.wide {
    grid-column: auto / span 2;
}

.gallery-img-box {
    transition: opacity 0.3s ease;
}

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

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

/* ── SPONSOR PAGE — dark background, tutto diventa visibile ── */
.sponsor-section {
    padding: 80px 0 80px;
    background: var(--bg-dark);
    color: white;
}

/* Titoli tier su sfondo scuro */
.sponsor-section .tier-title {
    color: white;
}

/* Grid sponsor: 4 colonne fisse — nessun orfano */
.sponsor-section .sponsor-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: none;
    gap: 24px;
    margin-top: 40px;
}

@media (max-width: 991px) {
    .sponsor-section .sponsor-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .sponsor-section .sponsor-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/* Card sponsor su dark bg: più visibili */
.sponsor-section .logo-bubble-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.sponsor-section .logo-bubble-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(17, 89, 52, 0.6);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(17,89,52,0.2);
}

/* Tier Gold: bordo dorato sottile, niente fill giallo */
.sponsor-section .tier-gold .logo-bubble-card {
    border-color: rgba(255, 215, 0, 0.25);
    background: rgba(255, 215, 0, 0.05);
}

/* Tier Silver: bordo argento */
.sponsor-section .tier-silver .logo-bubble-card {
    border-color: rgba(200, 200, 200, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

/* Sponsor tag su dark */
.sponsor-section .sponsor-tag {
    background: rgba(17, 89, 52, 0.25);
    color: #4ade80;
}

/* Sostenitori su dark bg */
.sponsor-section .supporters-list {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.sponsor-section .supporter-item {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.sponsor-section .supporter-item h4 {
    color: white !important;
}

.sponsor-section .supporter-item p {
    color: rgba(255, 255, 255, 0.55) !important;
}

.sponsor-section .supporter-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.sponsor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.sponsor-card {
    text-align: center;
    padding: 30px;
    border-radius: var(--radius-lg);
    background: var(--bg-off-white);
    transition: transform 0.3s;
}

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

.sponsor-logo {
    height: 100px;
    background: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 1px solid #eee;
    color: #9ca3af;
    font-weight: 700;
}

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

/* Result Cards Refinement */
.result-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 35px;
    border-radius: var(--radius-lg);
    transition: var(--transition-smooth);
    gap: 20px;
}

@media (max-width: 600px) {
    .result-card {
        padding: 20px;
        flex-wrap: wrap;
    }
    .result-info h3 {
        font-size: 1.1rem;
    }
}

.result-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.result-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-circle {
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.result-info h3 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    margin-bottom: 5px;
    font-weight: 400;
}

.result-info p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.tier-title {
    font-family: var(--font-title);
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 20px;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 400;
}

.tier-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.become-sponsor {
    padding: 100px 0;
}

.cta-box h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

/* Responsive Updates */
@media (max-width: 1024px) {
    .container {
        max-width: 960px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .gallery-grid,
    .gallery-grid-full {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-item.large,
    .gallery-img-box.wide {
        grid-column: 1 / 3;
    }

    .sponsor-grid {
        grid-template-columns: 1fr 1fr;
    }

    .directions-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: calc(100% + 15px);
        right: 15px;
        left: 15px;
        padding: 16px 20px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
        border-radius: 16px;
        z-index: 1001;
    }

    .nav.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 16px;
    }

    .nav-list a {
        display: block;
        padding: 8px 0;
        font-size: 1.1rem;
    }

    /* Event Section & Grids */
    .event-container {
        gap: 40px; /* Reduced gap for mobile */
    }

    /* Fix image scaling in gallery */
    .gallery-grid {
        gap: 10px;
    }

    .gallery-img-box {
        height: 200px; /* Shorter images on mobile */
    }

    /* Footer Mobile Adjustments */
    .footer-content {
        gap: 30px;
        text-align: center;
    }

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

    /* Hide header button on mobile to save space */
    .header .btn.sm {
        display: none;
    }

    .logo-text {
        font-size: 0.9rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-container,
    .event-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content,
    .event-content {
        margin-bottom: 40px;
    }

    .hero-content p,
    .event-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .info-blocks {
        grid-template-columns: 1fr;
    }

    .path-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .gallery-grid,
    .gallery-grid-full,
    .sponsor-grid,
    .directions-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item.large,
    .gallery-img-box.wide {
        grid-column: 1;
    }

    .sponsor-grid {
        grid-template-columns: 1fr;
    }

    .page-hero h1 {
        font-size: 2.2rem;
    }
}

/* Grid a 2 colonne uguale — usato in eventi.html "altri appuntamenti" */
.event-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 50px;
}

@media (min-width: 640px) {
    .event-cards-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Gallery item min-height su mobile */
@media (max-width: 599px) {
    .gallery-item {
        min-height: 220px;
    }
    .gallery-item.large,
    .gallery-item.medium,
    .gallery-item.small-top,
    .gallery-item.small-bottom {
        grid-column: auto;
        grid-row: auto;
    }
}

/* Base styling for very small screens (e.g. 320px-375px) */
@media (max-width: 480px) {
    .section-header h2 {
        font-size: 2rem;
    }

    /* Prevent giant words from breaking viewport */
    h1, h2, h3 {
        word-wrap: break-word;
        hyphens: auto;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .bubble-card {
        padding: 20px;
        border-radius: 25px;
    }

    .bubble-card h3 {
        font-size: 1.8rem;
    }
    
    .countdown-bubbles {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Ensure hero buttons stack if they don't fit */
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }

    .timeline-item {
        gap: 15px;
    }
    .timeline::before {
        left: 19px;
    }
    .timeline-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}


/* Supporter item in sponsor.html local list */
.supporter-item {
    padding: 18px 20px;
    border-radius: var(--radius-sm);
    background: white;
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition-fast);
}

.supporter-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Scroll to Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-lg);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px);
}

/* Font utility */
.font-title {
    font-family: var(--font-title);
}

/* Utility Layout Classes */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.glass-hover {
    transition: var(--transition-smooth);
}

.glass-hover:hover {
    background: var(--glass-bg);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

/* ── SCROLL SNAP SLIDES ─────────────────────────────────────────────────────
   Ogni sezione principale è una slide full-viewport con snap al top.
   Il footer non è una snap-section: si raggiunge scrollando dall'ultima slide.
   ────────────────────────────────────────────────────────────────────────── */

.event-section,
.gallery,
.history,
.map-section,
.gallery-full,
.sponsor-section,
.results-section,
#principale,
.altri-eventi-section {
    scroll-snap-align: start;
    min-height: 100vh;
    min-height: 100svh;
}

#principale {
    padding: 80px 0 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.altri-eventi-section {
    padding: 80px 0 60px;
    background-color: var(--bg-off-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Sezioni con poco contenuto: centrato verticalmente */
.history,
.results-section,
.gallery-full {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Sovrascrive il padding inline della map-section per snap corretto */
.map-section {
    padding: 80px 0 60px;
    background: var(--bg-off-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Gallery homepage: griglia più alta per riempire lo schermo */
.gallery {
    padding: 80px 0;
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-rows: 210px 210px;
    }
}

/* Event section: la dark section come slide */
.event-section {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 80px 0 30px;
}

/* Griglia 3 card affiancate */
.events-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

@media (max-width: 991px) {
    .events-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Desktop: evento occupa esattamente 100svh — le card si espandono */
@media (min-width: 992px) {
    .event-section {
        height: 100vh;
        height: 100svh;
    }

    .event-section > .container {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .event-section .section-header {
        flex-shrink: 0;
        margin-bottom: 16px;
    }

    .event-section .events-row {
        flex: 1;
        min-height: 0;
        align-items: stretch;
        margin-top: 16px;
    }

    .event-section .bubble-card {
        min-height: unset;
        height: 100%;
    }
}

/* Footer: snap solo alla fine — raggiunge il fondo senza forzare 100vh */
.footer {
    scroll-snap-align: start;
}

/* Map section responsive grid — sovrascrivibile da media query (no inline style) */
.map-info-grid {
    gap: 40px;
    margin-bottom: 50px;
    align-items: start;
}

@media (min-width: 768px) {
    .map-info-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Result action container in risultati.html */
.result-action {
    flex-shrink: 0;
}

/* Event section main title — responsive, no inline style */
.event-section .section-header h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

/* eventi.html — titolo gara principale responsive */
.event-main-title {
    font-size: clamp(1.8rem, 6vw, 3.5rem);
    margin: 20px 0 30px 0;
    line-height: 1.15;
    hyphens: none;
    overflow-wrap: break-word;
}

/* eventi.html — lista percorsi responsive */
.percorsi-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}

.percorsi-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.percorsi-list li i {
    flex-shrink: 0;
    margin-top: 3px;
}

.percorsi-list li span {
    flex: 1;
    line-height: 1.5;
}

.percorsi-full {
    grid-column: span 2;
}

@media (max-width: 480px) {
    .percorsi-list {
        grid-template-columns: 1fr;
    }
    .percorsi-full {
        grid-column: span 1;
    }
}