/* Reset e Base - Design fedele a PartyNow */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevenire scroll orizzontale su mobile */
html, body {
    overflow-x: hidden;
    width: 100%;
}

:root {
    /* Colori PartyNow esatti dall'app */
    --primary-red: #f24b3f;
    --primary-yellow: #fecd3f;
    --primary-green: #5ccc6b;
    --primary-blue: #4a91f2;
    --primary-violet: #a44ccf;
    
    /* Colori neutri fedeli all'app */
    --white: #ffffff;
    --black: #000000;
    --surface: #ffffff;
    --text-primary: #000000;
    --text-secondary: #606469;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Gradienti esperienziali fedeli all'app */
    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-violet) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-yellow) 100%);
    --gradient-accent: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-yellow) 100%);
    
    /* Gradiente esperienziale verticale (come nell'app) */
    --gradient-experiential: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 25%,
        rgba(74, 145, 242, 0.1) 40%,
        rgba(74, 145, 242, 0.3) 60%,
        rgba(74, 145, 242, 0.6) 80%,
        rgba(74, 145, 242, 0.9) 100%
    );
    
    /* Ombre Material 3 fedeli all'app */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.12);
    
    /* Transizioni fluide come nell'app */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --color-transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Border radius fedeli all'app */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Marquee measurements (leggermente più grandi ma ancora compatti) */
    --marquee-gap: 12px;
    --marquee-card-width: 185px;
    --marquee-card-height: calc(var(--marquee-card-width) * 320 / 260);
}

/* Theme color system */
:root {
    --theme-color: var(--primary-blue);
}

.theme-red    { --theme-color: var(--primary-red); }
.theme-yellow { --theme-color: var(--primary-yellow); }
.theme-green  { --theme-color: var(--primary-green); }
.theme-blue   { --theme-color: var(--primary-blue); }
.theme-violet { --theme-color: var(--primary-violet); }

/* Highlight solid color (no gradient) */
.highlight {
    background: none;
    color: var(--theme-color);
    -webkit-text-fill-color: var(--theme-color);
}

/* Primary button solid color (no gradient) */
.btn-primary {
    background: var(--theme-color);
    color: var(--white);
    box-shadow: var(--shadow-md);
    animation: none;
    background-image: none;
    transition: var(--color-transition);
}

.btn-primary:hover {
    background: var(--primary-violet);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    overflow-x: hidden;
}

/* Header e Navigation - Stile Material 3 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ffffff; /* bianco pieno */
    border-bottom: 1px solid var(--gray-200);
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    will-change: background-color, box-shadow;
}

.header.scrolled {
    background: #ffffff;
    box-shadow: var(--shadow-md);
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo .logo {
    height: 31px;
    width: 170px;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--color-transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-secondary);
    transition: var(--transition);
    border-radius: 2px;
}

/* Bottoni - Stile Material 3 fedele all'app */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: none;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    color: var(--white);
    background-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--text-secondary);
    border: 1px solid var(--gray-200);
    transition: var(--color-transition);
}

.btn-secondary:hover {
    background: var(--gray-200);
    color: var(--text-primary);
    border-color: var(--gray-300);
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Spaziatore per header fixed */
.header-spacer {
    height: 70px;
    background: #fff;
    width: 100%;
}

@media (max-width: 768px) {
    .header-spacer {
        height: 64px;
    }
}

/* Capodanno banner mini */
.ny-banner-mini {
    background: #000;
    color: #fff;
    padding: 15px 0;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 10;
}

.ny-mini-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding-top: 2px;
    padding-bottom: 2px;
    margin-top: 38px;
}

.ny-mini-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.6);
}

.ny-mini-countdown {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    letter-spacing: 1px;
    margin: 2px 0;
}

.ny-mini-link {
    font-size: 0.9rem;
    color: var(--primary-yellow);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.ny-mini-link:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .ny-banner-mini {
        padding: 12px 0;
    }
    .ny-mini-countdown {
        font-size: 1.5rem;
    }
}


/* Hero Section - Design esperienziale */
.hero {
    padding: 140px 0 100px 0;
    height: 652px;
    min-height: 652px;
    background: var(--white);
    position: relative;
    overflow: hidden;
}

/* IMPORTANTE: Su mobile, la hero section deve essere completamente visibile */
@media (max-width: 768px) {
    .hero {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        padding: 60px 0 60px 0 !important;
        overflow: visible !important;
        visibility: visible !important;
        opacity: 1 !important;
        display: block !important;
    }
    
    .hero::before {
        display: none !important;
    }
    
    .hero-container {
        display: block !important;
        visibility: visible !important;
    }
    
    .hero-content {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Su mobile, la hero section si adatta al contenuto */
@media (max-width: 768px) {
    .hero {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 60px 0 60px 0 !important;
    }
    
    .hero::before {
        display: none; /* Rimuovi overlay che potrebbe nascondere contenuto */
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none;
    opacity: 0;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    position: relative;
    z-index: 1;
}

/* Assicura che su desktop il hero-visual sia visibile */
@media (min-width: 769px) {
    .hero-visual {
        display: block !important;
    }
    
    .hero-marquee {
        display: block !important;
    }
    
    .hero-mobile-events {
        display: none !important;
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* Highlight testo - usa stesso gradiente dei bottoni */
.highlight {
    font-weight: 800;
    background: none;
    -webkit-text-fill-color: currentColor;
}



.hero-badge {
    margin-bottom: 1.5rem;
}

.badge-text {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-red);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    animation: brandCycleBg 30s linear infinite;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 28px;
}

.hero-organizer-note {
    margin-top: .5rem;
    font-size: .95rem;
    color: var(--gray-500);
}
.hero-organizer-note .text-muted { color: var(--gray-500); }
.hero-organizer-note a { text-decoration: underline; }
.desktop-note { display: block; }
.mobile-note { display: none; }

.hero-search {
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 2px solid var(--gray-200);
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(74, 145, 242, 0.1);
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-primary);
    background: transparent;
}

.search-input::placeholder {
    color: var(--gray-400);
}

.search-btn {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: var(--color-transition);
    /* animate like other buttons */
    animation: brandCycleBg 30s linear infinite;
}

.search-btn:hover {
    background: var(--primary-violet);
    transform: translateY(-2px);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Responsive visibility helpers */
.show-desktop { display: inline-flex; }
.show-mobile { display: none; }

.hero-visual { 
    position: relative; 
    display: block;
}

/* HERO MARQUEE */
.hero-marquee {
    position: relative;
    height: calc(var(--marquee-card-height) * 2 + var(--marquee-gap));
    overflow: hidden;
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
    display: block;
}

.hero-marquee:hover { transform: none; }

.marquee { 
    position: absolute; 
    left: 0; 
    right: 0; 
    height: var(--marquee-card-height);
    overflow: hidden;
}
.marquee.row-left { top: 0; }
.marquee.row-right { bottom: 0; }

.marquee-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: var(--marquee-gap);
    will-change: transform;
}

/* Hero marquee: forza dimensioni ridotte anche con featured-event-card */
.hero-marquee .featured-event-card,
.hero-marquee .event-card.vertical { 
    flex: 0 0 var(--marquee-card-width);
    width: var(--marquee-card-width);
    height: var(--marquee-card-height);
    border-radius: 18px;
    margin-right: 0 !important; /* gap gestito da flex gap */
}

.hero-marquee .featured-event-image img,
.hero-marquee .event-card.vertical .event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
}

/* Adjust content for smaller cards */
.marquee-track .event-card.vertical .event-content {
    left: 12px;
    right: 12px;
    bottom: 12px;
}

.marquee-track .event-card.vertical .event-title {
    font-size: 14px;
    line-height: 1.1;
    margin-bottom: 3px;
    text-align: left;
}

.marquee-track .event-card.vertical .event-date {
    font-size: 11px;
    margin-bottom: 4px;
    text-align: left;
}

.marquee-track .event-card.vertical .event-location {
    font-size: 11px;
    margin-bottom: 8px;
    text-align: left;
}

.marquee-track .event-card.vertical .details-btn {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 10px;
    transition: var(--color-transition);
}

.marquee-track .event-card.vertical .event-category {
    top: 10px;
    left: 10px;
    padding: 3px 6px;
    border-radius: 12px;
    font-size: 9px;
}

/* Edge fades */
.hero-marquee::before,
.hero-marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px; /* ridotto per mostrare più card senza tagli */
    z-index: 10;
    pointer-events: none;
}

.hero-marquee::before {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0.8) 30%, rgba(255,255,255,0) 100%);
}

.hero-marquee::after {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,1) 0%, rgba(255,255,255,0.8) 30%, rgba(255,255,255,0) 100%);
}

/* Features Section - Card Material 3 */
.features {
    padding: 100px 0;
    background: var(--white);
    overflow: visible;
    height: auto;
}

#why-partynow {
    padding-top: 22px;
    padding-bottom: 22px;
    overflow: visible;
    height: 2019px;
    min-height: auto;
    max-height: none;
    position: relative;
}

#why-partynow .container {
    overflow: visible;
    height: auto;
}

#why-partynow .features-grid {
    overflow: visible;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.swipe-content .section-title {
    line-height: 1.1;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    overflow: visible;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid transparent;
    /* default border (overridden by gradient variants below) */
    background-origin: border-box;
    background-clip: padding-box, border-box;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

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

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-secondary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
    transition: var(--transition);
}

/* Feature icon gradient utilities (brand pairs) */
.gradient-blue-violet { background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-violet) 100%) !important; }
.gradient-red-yellow { background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-yellow) 100%) !important; }
.gradient-green-yellow { background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-yellow) 100%) !important; }
.gradient-blue-green { background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%) !important; }
.gradient-violet-red { background: linear-gradient(135deg, var(--primary-violet) 0%, var(--primary-red) 100%) !important; }

/* Feature-card gradient variants: align top line and border with icon gradient */
.feature-card.feature-blue-violet {
    background-image: linear-gradient(#ffffff,#ffffff), linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-violet) 100%);
}
.feature-card.feature-blue-violet::before { background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-violet) 100%); }

.feature-card.feature-red-yellow {
    background-image: linear-gradient(#ffffff,#ffffff), linear-gradient(135deg, var(--primary-red) 0%, var(--primary-yellow) 100%);
}
.feature-card.feature-red-yellow::before { background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-yellow) 100%); }

.feature-card.feature-green-yellow {
    background-image: linear-gradient(#ffffff,#ffffff), linear-gradient(135deg, var(--primary-green) 0%, var(--primary-yellow) 100%);
}
.feature-card.feature-green-yellow::before { background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-yellow) 100%); }

.feature-card.feature-blue-green {
    background-image: linear-gradient(#ffffff,#ffffff), linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%);
}
.feature-card.feature-blue-green::before { background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%); }

.feature-card.feature-violet-red {
    background-image: linear-gradient(#ffffff,#ffffff), linear-gradient(135deg, var(--primary-violet) 0%, var(--primary-red) 100%);
}
.feature-card.feature-violet-red::before { background: linear-gradient(135deg, var(--primary-violet) 0%, var(--primary-red) 100%); }

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Swipe Discovery Section */
.swipe-discovery {
    padding: 100px 0;
    background: var(--white);
}

.swipe-discovery-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.swipe-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.swipe-image-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swipe-mockup-image {
    width: 100%;
    height: auto;
    max-width: 600px;
    object-fit: contain;
}

.swipe-content {
    max-width: 500px;
}

.swipe-features {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.swipe-feature {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.swipe-feature-icon {
    width: 48px;
    height: 48px;
    background: var(--gray-100);
    border: 1px solid currentColor;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    animation: brandCycle 30s linear infinite;
    flex-shrink: 0;
}

.swipe-feature-text h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.swipe-feature-text p {
    color: var(--text-secondary);
    line-height: 16px;
}

.swipe-link {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.swipe-link:hover {
    text-decoration: underline;
}

/* Testimonials Section */
.testimonials {
    padding: 100px 0;
    background: var(--gray-50);
    display: none; /* Temporaneamente nascosta */
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.testimonial-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.testimonial-stars {
    color: var(--primary-yellow);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.testimonial-text {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-violet) 100%);
    flex-shrink: 0;
}

.testimonial-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.testimonial-role {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Popular Events Section */
.popular-events {
    padding: 100px 0;
    background: var(--gray-50);
}

/* Nascondi sezione popular-events su mobile */
@media (max-width: 768px) {
    .popular-events {
        display: none;
    }
}

/* Mobile popular events section moved to hero */
.hero-mobile-events {
    display: none;
}

@media (max-width: 768px) {
    /* Hero-mobile-events: contenitore normale dentro hero-content */
    .hero-mobile-events {
        display: block;
        width: 100%;
        margin-top: 2rem;
        margin-bottom: 1rem;
        position: relative;
        overflow: visible;
    }
    
    /* Viewport fissa: le card scorrono dentro una finestra */
    .hero-mobile-events .events-viewport {
        position: relative;
        width: calc(100% + 40px); /* annulla il padding orizzontale della hero */
        overflow: hidden;
        padding: 0; /* nessun padding laterale: la lista tocca i bordi */
        margin: 0 -20px; /* estende la viewport a tutto lo schermo */
        min-height: 340px;
    }
    
    /* Track orizzontale animato */
    .hero-mobile-events .events-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow: visible;
        gap: 16px;
        padding: 10px 0;
        margin: 0;
        width: max-content;
        will-change: transform;
    }
    
    /* Forza le card ad avere larghezza fissa */
    .hero-mobile-events .events-grid > * {
        flex: 0 0 220px;
        width: 220px;
        min-width: 220px;
        max-width: 220px;
    }
    
    /* Stessa dimensione card delle featured */
    .hero-mobile-events .featured-event-card {
        flex: 0 0 220px;
        width: 220px;
        height: 320px;
        min-height: 320px;
        border-radius: 28px;
        display: block;
    }

    /* Bottone FUORI dal contenitore scrollabile - NON scorre mai */
    .hero-mobile-actions {
        padding: 0;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 1.5rem;
        margin-bottom: 0;
        position: relative; /* Flusso normale */
        overflow: visible;
    }
    
    .hero-mobile-actions .btn {
        margin: 0 auto;
    }
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

/* When events-grid contains featured-event-card, use flex layout */
.events-grid.has-featured-cards {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
}

.events-grid.has-featured-cards::-webkit-scrollbar {
    display: none;
}

@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    /* Hide entire marquee on mobile */
    .hero-marquee {
        display: none;
    }
}

/* Featured Event Card - Exact Flutter FeaturedEventCard structure */
.featured-event-card {
    position: relative;
    width: 220px;
    height: 320px;
    border-radius: 28px;
    overflow: hidden;
    background: #e5e7eb; /* Colors.grey[200] from Flutter */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10); /* Flutter: blurRadius: 12, offset: (0, 4), opacity: 0.10 */
    margin-right: 16px; /* Flutter: EdgeInsets.only(right: 16) */
    flex-shrink: 0;
    display: block; /* Ensure card is visible */
}

/* Full-bleed image */
.featured-event-image {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.featured-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Gradient overlay - positioned at bottom, height ~66% (featuredGradientHeightRatio + 0.06) */
.featured-gradient-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 75%; /* Copertura maggiore per arrivare più in alto come richiesto */
    border-radius: 0 0 28px 28px; /* Flutter: BorderRadius.vertical(bottom: Radius.circular(28)) */
    z-index: 1;
}

/* Allinea overlay con raggio ridotto nella hero */
.hero-marquee .featured-gradient-overlay {
    border-radius: 0 0 18px 18px;
}

/* Date chip with backdrop blur - top left */
.featured-date-chip {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.15); /* Flutter: Colors.white.withOpacity(0.15) */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 22px; /* Flutter: BorderRadius.circular(22) */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Flutter: Colors.white.withOpacity(0.2) */
    color: white;
    font-size: 12px;
    font-weight: 700; /* Flutter: FontWeight.w700 */
    line-height: 1;
}

.featured-date-chip svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Content positioned at bottom */
.featured-event-content {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 2;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Titolo evento: una sola riga con ellissi */
.featured-event-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

/* Hero: testo più compatto e spazi ridotti */
.hero-marquee .featured-event-content {
    left: 14px;
    right: 14px;
    bottom: 12px;
    gap: 2px;
}

.hero-marquee .featured-event-title {
    font-size: 16px;
    line-height: 1.15;
}

.hero-marquee .featured-event-type {
    font-size: 12px;
}

.hero-marquee .featured-event-location span {
    font-size: 12px;
}

/* Event type (subtitle) */
.featured-event-type {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
    opacity: 0.9;
    text-align: left;
}

/* Event title - max 2 lines */
.featured-event-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

/* Location with icon */
.featured-event-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
    margin-top: 4px;
}

.featured-event-location svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.featured-event-location span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Details button */
.featured-details-btn {
    margin-top: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    display: inline-block;
    width: fit-content;
}

.featured-details-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Vertical Event Card (like Flutter featured - exact structure) */
.event-card.vertical {
    position: relative;
    height: 320px;
    width: 260px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-right: 12px;
    background: #e0e0e0;
}

/* Full-bleed image */
.event-card.vertical .event-image { 
    position: absolute; 
    inset: 0; 
}
.event-card.vertical .event-image img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    filter: saturate(105%); 
}

/* Gradient overlay - uses dominant color from Firebase, opaque from bottom to 75% */
.event-card.vertical .gradient-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 75%; /* Extended higher to cover more area */
    /* Default gradient - will be overridden by dynamic color */
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,1) 25%,
        rgba(0,0,0,1) 100%
    );
}

/* Marquee cards have smaller radius */
.marquee-track .event-card.vertical .gradient-overlay {
    border-radius: 0 0 20px 20px;
}

/* Content positioned over gradient */
.event-card.vertical .event-content {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    color: white;
    z-index: 2;
}

/* Date chip with backdrop blur */
.event-card.vertical .event-date {
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 6px;
    line-height: 1.1;
}

/* Event title */
.event-card.vertical .event-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 4px;
    max-height: 2.2em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Location with icon */
.event-card.vertical .event-location {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.1;
}

.event-card.vertical .event-location .location-icon {
    width: 15px;
    height: 15px;
    opacity: 1;
}

.event-card.vertical .event-location .location-text {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Details button - white with black text, full width with padding */
.event-card.vertical .details-btn {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: white;
    color: black;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--color-transition);
}

.event-card.vertical .details-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

/* Event category chip - top left */
.event-card.vertical .event-category {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    color: #333;
    padding: 4px 8px;
    border-radius: 16px;
    font-size: 10px;
    font-weight: 600;
    z-index: 3;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

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

/* Cities Section - Design esperienziale */
.cities {
    padding: 100px 0;
    background: var(--black);
    color: var(--white);
    overflow: visible;
    min-height: auto;
    height: auto;
    max-height: none;
}

.cities .container {
    overflow: visible;
    height: auto;
    max-height: none;
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    justify-items: center;
    overflow: visible;
    height: auto;
    max-height: none;
}

/* Quando c'è solo una città, centra la card */
.cities-grid:has(.city-card:only-child) {
    justify-content: center;
}

.city-card {
    text-decoration: none;
    color: inherit;
    background: var(--white);
    padding: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
}

.city-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.city-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.city-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        transparent 100%
    );
}

.city-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.city-content {
    padding: 1.5rem;
    position: relative;
    z-index: 1;
    background: var(--white);
    border-radius: 0 0 calc(var(--radius-lg)) calc(var(--radius-lg));
}

.city-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.city-events {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Cities section header on dark background */
.cities .section-title { color: var(--white); }
.cities .section-subtitle { color: var(--gray-200); }

/* CTA Section - Gradiente esperienziale */
.cta {
    padding: 100px 0;
    background: none;
    background-image: none;
    background-color: rgba(255, 255, 255, 1);
    color: rgba(255, 255, 255, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before { content: none; }

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 34px;
    margin-bottom: 1.5rem;
    color: var(--black);
}

.cta-subtitle {
    font-size: 1.125rem;
    line-height: 25px;
    margin-bottom: 2rem;
    opacity: 0.9;
    color: var(--black);
}

.cta-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--white);
    opacity: 0.8;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta .btn-outline { 
    color: var(--primary-blue); 
    border-color: var(--primary-blue); 
    transition: var(--color-transition);
}
.cta .btn-outline:hover { 
    background: var(--primary-blue); 
    color: var(--white); 
    transform: translateY(-2px);
}

/* Footer - Design pulito */
.footer {
    background: var(--black);
    color: var(--white);
    padding: 80px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo .logo {
    height: 40px;
    margin-bottom: 1rem;
}

.footer-description {
    color: var(--gray-400);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: var(--color-transition);
}

.social-link:hover {
    background: var(--primary-blue);
    transform: translateY(-2px);
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--color-transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: var(--gray-400);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    .show-desktop { display: none; }
    .show-mobile { display: block; } /* Block per contenitori come hero-mobile-events */
    
    .nav-toggle {
        display: flex;
    }
    
    .hero {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        padding: 60px 0 60px 0 !important;
        overflow: visible !important;
    }
    
    .hero::before {
        display: none !important;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0 auto;
        justify-items: center;
        overflow-x: visible !important; /* IMPORTANTE: non taglia orizzontalmente */
        overflow-y: visible !important;
    }
    
    .hero-content {
        width: 100%;
        max-width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 0 auto;
        padding: 0 20px; /* Padding per mostrare tutto il contenuto */
        box-sizing: border-box;
        overflow-x: visible !important;
        overflow-y: visible !important;
    }
    
    .hero-badge {
        text-align: center;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
        text-align: center;
        width: 100%;
    }
    
    .hero-subtitle {
        text-align: center;
        width: 100%;
    }
    
    .hero-actions {
        justify-content: center;
        width: 100%;
    }
    
    .hero-organizer-note {
        text-align: center;
        width: 100%;
    }
    .desktop-note { display: none; }
    .mobile-note { display: block; }
    
    .features-grid {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }
    
    .cities-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        width: 100%;
        max-width: 100%;
        overflow: visible;
        height: auto;
        max-height: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        width: 100%;
        max-width: 100%;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .swipe-discovery-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .swipe-visual {
        order: 2;
    }
    
    .swipe-content {
        order: 1;
        max-width: 100%;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .swipe-mockup-image {
        max-width: 100%;
    }
    
    .swipe-discovery,
    .testimonials {
        padding: 60px 0;
    }
    
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
    
    /* Prevenire overflow orizzontale su mobile */
    .features, .cities, .cta, .footer, .swipe-discovery, .testimonials {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        overflow-y: visible;
    }
    
    /* Hero section NON deve avere overflow hidden su mobile */
    .hero {
        overflow-x: visible !important;
        overflow-y: visible !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* Animazioni fluide */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card,
.city-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Focus States per accessibilità */
.btn:focus,
.nav-link:focus,
.search-input:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Hover Effects avanzati */
.feature-card:hover {
    border-color: var(--primary-blue);
}

.city-card:hover .city-name {
    color: var(--black);
}

/* Blob gradient layer (più "a macchie", meno sfumato, colori vividi) */
.blob-gradient {
    position: absolute;
    inset: -15% -10% -10% -10%;
    filter: blur(24px) saturate(150%);
    pointer-events: none;
    opacity: 0.7;
    z-index: 0;
}

.blob-gradient .blob {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    mix-blend-mode: screen;
    animation: floatBlob 16s ease-in-out infinite;
}

.blob.red { background: radial-gradient(circle at 30% 30%, rgba(242,75,63,0.95) 0%, rgba(242,75,63,0.2) 38%, transparent 46%); }
.blob.yellow { background: radial-gradient(circle at 70% 40%, rgba(254,205,63,0.95) 0%, rgba(254,205,63,0.2) 38%, transparent 46%); }
.blob.green { background: radial-gradient(circle at 40% 60%, rgba(92,204,107,0.95) 0%, rgba(92,204,107,0.2) 38%, transparent 46%); }
.blob.blue { background: radial-gradient(circle at 60% 70%, rgba(74,145,242,0.95) 0%, rgba(74,145,242,0.2) 38%, transparent 46%); }
.blob.violet { background: radial-gradient(circle at 50% 50%, rgba(164,76,207,0.95) 0%, rgba(164,76,207,0.2) 38%, transparent 46%); }

/* initial positions */
.blob.red { top: -8%; left: -6%; animation-delay: 0s; }
.blob.yellow { top: -12%; right: -10%; animation-delay: 2.5s; }
.blob.green { bottom: -8%; left: -4%; animation-delay: 5s; }
.blob.blue { bottom: -12%; right: -6%; animation-delay: 7.5s; }
.blob.violet { top: 18%; left: 35%; animation-delay: 10s; }

@keyframes floatBlob {
    0%, 100% { transform: translate3d(0,0,0) scale(1); }
    25% { transform: translate3d(26px, -18px, 0) scale(1.04); }
    50% { transform: translate3d(-18px, 22px, 0) scale(0.98); }
    75% { transform: translate3d(14px, 14px, 0) scale(1.02); }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .blob-gradient .blob, .highlight, .btn-primary { animation: none; }
}

/* Layering on hero and CTA */
.hero, .cta { position: relative; }
.hero .blob-gradient, .cta .blob-gradient { opacity: 0.65; }

/* Su mobile, hero NON deve avere overflow hidden */
@media (max-width: 768px) {
    .hero {
        overflow: visible !important;
    }
}

/* 5-color cycling animations (continuous, slow) */
.cycle-colors, .cycle-stroke { animation: brandCycle 30s linear infinite; }
.cycle-bg { animation: brandCycleBg 30s linear infinite; color: var(--white) !important; -webkit-text-fill-color: var(--white) !important; }

/* Ensure cycle classes override gradient styles */
.highlight.cycle-colors { background: none; -webkit-text-fill-color: currentColor; animation: brandCycle 30s linear infinite !important; }

/* Apply cycling by default to main buttons */
.btn-primary { background-image: none; animation: brandCycleBg 30s linear infinite; color: var(--white) !important; -webkit-text-fill-color: var(--white) !important; }
.btn-outline { animation: brandCycle 30s linear infinite; }
.btn-secondary { animation: brandCycle 30s linear infinite; }

@keyframes brandCycle { /* stroke/text only */
    0%   { color: var(--primary-red); border-color: var(--primary-red); }
    25%  { color: var(--primary-yellow); border-color: var(--primary-yellow); }
    50%  { color: var(--primary-green); border-color: var(--primary-green); }
    75%  { color: var(--primary-blue); border-color: var(--primary-blue); }
    100% { color: var(--primary-violet); border-color: var(--primary-violet); }
}

@keyframes brandCycleBg { /* filled buttons keep white text */
    0%   { background-color: var(--primary-red); border-color: var(--primary-red); }
    25%  { background-color: var(--primary-yellow); border-color: var(--primary-yellow); }
    50%  { background-color: var(--primary-green); border-color: var(--primary-green); }
    75%  { background-color: var(--primary-blue); border-color: var(--primary-blue); }
    100% { background-color: var(--primary-violet); border-color: var(--primary-violet); }
}

@media (prefers-reduced-motion: reduce) { .cycle-colors, .cycle-bg, .cycle-stroke, .btn-primary, .btn-outline, .btn-secondary { animation: none !important; } }

/* Remove overlays that hide text */

.highlight.cycle-colors { text-shadow: -1px -1px 0 rgba(255,255,255,0.25); }

/* Depth: internal gradient for any animated color element */
.cycle-bg,
.btn-primary,
.btn-secondary,
.search-btn { position: relative; color: var(--white) !important; -webkit-text-fill-color: var(--white) !important; }

/* Remove overlays that hide text */

/* Outline elements - remove shadows that may hide text */
.cycle-stroke,
.btn-outline { box-shadow: none; }

/* Text with animated color - no overlay */
.cycle-colors { position: relative; display: inline-block; }

.nowrap { white-space: nowrap; }
