/* --- Variables & Theme --- */
:root {
    --color-bg-primary: #FFFFFF;
    --color-bg-secondary: #f6e6ea;
    /* Soft Minimalist Pink */
    --color-text-main: #111111;
    /* Deep Black */
    --color-text-muted: #666666;
    --color-accent-gold: #c6a75e;
    /* Gold */
    --color-accent-pink: #f6e6ea;
    --color-footer-bg: #111111;

    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;

    --radius-card: 14px;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.1);

    --transition-speed: 280ms;
    --transition-timing: cubic-bezier(0.25, 1, 0.5, 1);
    /* Premium fluid easing */
}

/* --- Reset & Global --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
    /* Remove tap flash on Android/iOS */
}

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-bg-primary);
    line-height: 1.6;
    overflow-x: clip;
    /* Replaced hidden to allow native scrolling */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html,
body {
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 100%;
    overflow-x: clip;
    /* Replaced hidden with clip */
    overflow-y: visible !important;
    /* Explicit vertical scroll */
    -webkit-overflow-scrolling: touch;
    /* Flawless momentum scrolling */
    position: relative;
}

::-webkit-scrollbar {
    display: none;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg-primary);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
    pointer-events: none;
    /* Make sure it never blocks touch events after load */
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--color-bg-secondary);
    border-top-color: var(--color-accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    /* Elegant glassy light pink/gray gradient */
    background: linear-gradient(135deg, rgba(230, 140, 160, 0.8) 0%, rgba(180, 160, 180, 0.75) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--color-bg-primary);
    z-index: 1000;
    transition: padding var(--transition-speed) var(--transition-timing), box-shadow var(--transition-speed), transform 0.4s ease;
    padding: 24px 0;
}

.navbar.hidden-nav {
    transform: translateY(-100%);
}

.navbar.scrolled {
    padding: 16px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.header-logo-img {
    height: 40px;
    /* Adjust height to fit cleanly in navbar */
    width: auto;
    /* Removed filter so the original colors of the new logo show properly */
}



.logo-link {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color var(--transition-speed);
    min-height: 44px;
    /* Touch target size */
    display: flex;
    align-items: center;
}

.nav-links a:hover {
    color: var(--color-accent-gold);
}

.hamburger-menu {
    display: none;
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
        position: relative;
        z-index: 1001;
    }

    .nav-links {
        /* Floating container - GPU-accelerated open/close */
        position: absolute;
        top: 68px;
        right: 16px;
        left: auto;
        width: 220px;
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: none;
        box-shadow: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        z-index: 1200;
        display: flex !important;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-15px) scale(0.98);
        transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
            transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
            visibility 0.3s;
        pointer-events: none;
        max-height: none;
        overflow: visible;
        padding: 0;
    }

    .nav-links.active {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) scale(1) !important;
        pointer-events: auto;
    }

    /* Each nav link becomes its own distinct dark pill */
    .nav-links a {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 0.85rem;
        letter-spacing: 1.5px;
        color: #fff;
        background-color: #111111;
        border-radius: 50px;
        border-bottom: none;
        text-align: center;
        /* Staggered entrance: start hidden and shifted down */
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 400ms cubic-bezier(0.25, 1, 0.5, 1),
            transform 400ms cubic-bezier(0.25, 1, 0.5, 1),
            background-color 200ms ease;
    }

    /* Stagger delays for each pill */
    .nav-links a:nth-child(1) {
        transition-delay: 0ms;
    }

    .nav-links a:nth-child(2) {
        transition-delay: 60ms;
    }

    .nav-links a:nth-child(3) {
        transition-delay: 120ms;
    }

    .nav-links a:nth-child(4) {
        transition-delay: 180ms;
    }

    /* When menu is open, animate pills in */
    .nav-links.active a {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }
}

/* --- Hero Section --- */
.hero {
    min-height: 100dvh;
    /* Accounts for mobile browser chrome */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 24px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s ease-out forwards;
    position: relative;
    transition: min-height 0.4s cubic-bezier(0.25, 1, 0.5, 1), padding 0.4s ease-out;
}

.hero-content {
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.hero-title {
    font-size: clamp(1.75rem, 6vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 24px;
}

.sub-headline {
    display: block;
    font-family: var(--font-body);
    font-size: clamp(0.85rem, 3vw, 1.15rem);
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
}

.hero-underline {
    width: 150px;
    height: 3px;
    background-color: var(--color-accent-gold);
    margin-bottom: 32px;
}

.hero-quote-container {
    max-width: 90%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 4vh, 32px);
    /* Responsive gap to protect spacing */
}

.hero-subtitle {
    font-size: clamp(0.85rem, 3.5vw, 1.1rem);
    color: #444444;
    line-height: 1.5;
    font-weight: 300;
    text-align: center;
    margin: 0;
    /* Reset default p margin, handled by container gap */
}

.hero-actions {
    margin-top: 48px;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeUp 1s ease-out 0.5s forwards;
    opacity: 0;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

/* --- Hero Partners Strip --- */
.hero-partners {
    position: absolute;
    bottom: 40px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 50px;
    padding: 15px 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeUp 1s ease-out 0.7s forwards;
    opacity: 0;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    pointer-events: none;
}

.partners-overline {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-right: -4px;
    /* Perfectly offsets letter-spacing so the word sits perfectly dead-center in the pill */
    color: var(--color-text-main);
    /* Deep black */
    margin-bottom: 12px;
    font-family: var(--font-heading);
    text-align: center;
    font-weight: 500;
}

.partners-logo-strip {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.partner-logo {
    height: 60px;
    /* Noticeably larger logos */
    width: auto;
    object-fit: contain;
    filter: brightness(0) opacity(1);
    /* Unified SOLID black by default */
    transition: filter 400ms ease, transform 400ms ease, opacity 400ms ease;
    cursor: pointer;
    pointer-events: auto;
}

/* Make Spa Ceylon noticeably taller specifically */
img[alt="Spa Ceylon"] {
    height: 75px;
    margin-left: 30px;
}

/* Specific hover override for LuvEsence to turn it Pink instead of returning to white */
@media (hover: hover) {
    img[alt="LuvEsence"]:hover {
        /* This filter chain turns white/black pixels into the soft pink brand color var(--color-bg-secondary) #f6e6ea */
        filter: brightness(0) invert(83%) sepia(21%) saturate(996%) hue-rotate(301deg) brightness(101%) contrast(98%) !important;
        transform: translateY(-3px) scale(1.05);
    }
}

img[alt="LuvEsence"]:active {
    filter: brightness(0) invert(83%) sepia(21%) saturate(996%) hue-rotate(301deg) brightness(101%) contrast(98%) !important;
    transform: scale(0.96);
}

/* For white logo overrides on light backgrounds, unused here due to black ribbon approach */

@media (max-width: 768px) {
    /* 2. SMART SCALE THE LOGO (The Overlap Fix) */
    .header-logo-img {
        max-height: clamp(50px, 12vh, 110px);
        width: auto;
        object-fit: contain;
        margin: 0 auto;
    }

    /* 1. RESTORE THE PERFECT CENTER (Mobile Container) */
    .hero {
        /* Reserve space for the fixed pill so justify-content:center never overlaps it */
        padding-bottom: 160px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        margin: 0 auto;
        gap: clamp(1rem, 3vh, 2.5rem);
    }

    /* 3. ENFORCE TEXT CENTERING */
    .hero-content {
        text-align: center;
        margin: 0 auto;
    }

    .hero-actions {
        margin: 0 auto;
        margin-top: clamp(1.5rem, 4vh, 3rem);
    }

    .hero-partners {
        position: fixed !important;
        flex-direction: column !important;
        width: 82vw !important;
        max-width: 340px;
        padding: 16px 16px !important;
        border-radius: 24px;
        /* Use left/right: 0 + margin: auto instead of transform (animation conflicts with transform) */
        left: 0 !important;
        right: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        bottom: 5px !important;
        top: auto !important;
        transform: none !important;
        /* Kill the animation transform that steals translateX */
        animation: none !important;
        /* Kill fadeUp animation that overrides transform */
        opacity: 1 !important;
        /* Force visible since animation was setting opacity */
        gap: 0 !important;
        align-items: center;
        text-align: center;
        z-index: 100;
    }

    .partners-overline {
        margin-bottom: 20px !important;
        margin-right: 0;
        font-size: 10px !important;
        letter-spacing: 3px;
        white-space: nowrap;
        text-align: center;
        width: 100%;
    }

    .partners-logo-strip {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        gap: 9vw;
        width: 100%;
    }

    .partner-logo {
        height: 36px !important;
        /* 30px × 1.2 */
        margin: 0 !important;
    }

    img[alt="Janet Ayurveda"] {
        margin-left: 15px !important;
    }

    img[alt="LuvEsence"] {
        margin-left: -15px !important;
    }

    img[alt="Spa Ceylon"] {
        height: 54px !important;
        /* 45px × 1.2 */
        margin-left: -5px !important;
    }
}

/* 1. THE IPHONE SE FIX (Short & Narrow Screens) */
@media (max-width: 380px) and (max-height: 700px) {
    .hero {
        gap: 16px !important;
        padding-top: 20px !important;
    }
    
    .header-logo-img {
        max-height: 65px !important;
    }
    
    .hero-content {
        font-size: 0.9rem !important;
        margin-top: 0 !important;
    }
}

/* 2. THE PRO MAX & S25 ULTRA FIX (Tall & Wide Screens) */
@media (min-width: 412px) and (min-height: 890px) {
    .hero {
        gap: 40px !important;
    }
    
    .header-logo-img {
        max-height: 120px !important;
    }
    
    .hero-content, .hero-actions {
        max-width: 85% !important;
    }
}

@media (hover: hover) {
    .partner-logo:hover {
        /* Reveal the true colors from the transparent PNGs on hover */
        filter: none;
        opacity: 1;
        transform: translateY(-3px) scale(1.05);
    }

    /* Specific overrides */
    img[alt="LuvEsence"]:hover {
        /* A deeper, richer rose/pink color for better contrast and elegance */
        filter: brightness(0) saturate(100%) invert(48%) sepia(31%) saturate(1637%) hue-rotate(303deg) brightness(95%) contrast(89%) !important;
    }
}

.partner-logo:active {
    filter: none;
    opacity: 1;
    transform: scale(0.96);
}

img[alt="LuvEsence"]:active {
    filter: brightness(0) saturate(100%) invert(48%) sepia(31%) saturate(1637%) hue-rotate(303deg) brightness(95%) contrast(89%) !important;
}

/* --- Scroll Reveal Sections --- */
.reveal-section {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
    /* Reduced from 30px for snappier feel */
    transition: opacity 0.45s ease-out, transform 0.45s ease-out;
    /* Faster: was 0.7s */
    backface-visibility: hidden;
    /* will-change removed from base state — applying it to ALL elements hogs GPU memory
       and causes the main-thread stutter the user experiences */
}

.reveal-section.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    will-change: auto;
    /* Release GPU layer after animation completes */
}

/* --- Sections --- */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
    /* Reduced from 60px for tighter premium density */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.details-section,
.agenda-section,
.speakers-section,
.featured-section,
.categories-section {
    scroll-margin-top: 80px;
    /* Tell the browser each section is self-contained — no layout recalc spills across sections */
    contain: content;
}

.featured-section .section-container {
    max-width: 1600px;
    padding: 60px 24px 16px;
    /* Reduced bottom from 40px to 16px */
    /* Tighter padding for featured */
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 32px;
    position: relative;
    display: inline-block;
}

/* --- Global Elements & Buttons --- */
.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: 4px;
    /* Sharper, minimal look */
    font-size: 0.85rem;
    font-family: var(--font-heading);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: transform 0.4s ease, opacity 0.4s ease, background-color 0.4s ease, color 0.4s ease;
    cursor: pointer;
    min-height: 44px;
    touch-action: manipulation;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.gold-btn {
    background-color: var(--color-accent-gold);
    color: var(--color-bg-primary);
    border: 1px solid var(--color-accent-gold);
    box-shadow: none;
}

.outline-btn {
    background-color: transparent;
    color: var(--color-accent-gold);
    border: 1px solid var(--color-accent-gold);
}

@media (hover: hover) {
    .gold-btn:hover {
        background-color: #b59853;
        color: var(--color-bg-primary);
        transform: translateY(-2px);
    }

    .outline-btn:hover {
        background-color: var(--color-accent-gold);
        color: var(--color-bg-primary);
        transform: translateY(-2px);
    }
}

.gold-btn:active,
.outline-btn:active {
    transform: scale(0.98);
}

/* --- Event Details Section --- */
.details-section {
    background-color: var(--color-bg-secondary);
    /* Entire huge section gets the soft pink for massive clean contrast */
}

.details-card {
    background: var(--color-bg-primary);
    /* Pure white card pops cleanly completely off the pink layout */
    border: 1px solid rgba(198, 167, 94, 0.15);
    /* Delicate gold trim */
    border-radius: var(--radius-card);
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    /* Stronger premium drop shadow */
}

.event-meta {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin: 30px 0;
}

.meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text-main);
}

.meta-item i {
    color: var(--color-accent-gold);
    width: 28px;
    height: 28px;
}

.event-about {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .details-card {
        padding: 24px;
        text-align: center;
    }

    .event-meta {
        flex-direction: column;
        gap: 24px;
    }

    .event-details-content .primary-btn {
        width: 100%;
    }
}

/* --- Agenda Section --- */
.agenda-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.agenda-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 170px;
    transform: translateX(-50%);
    height: 100%;
    width: 2px;
    background: rgba(198, 167, 94, 0.3);
    /* Soft Gold Line */
}

.agenda-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 24px;
    /* Reduced from 40px for tighter schedule */
    position: relative;
}

.agenda-item:last-child {
    margin-bottom: 0;
}

.agenda-time {
    width: 160px;
    min-width: 160px;
    text-align: right;
    padding-right: 30px;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-accent-gold);
    flex-shrink: 0;
    white-space: nowrap;
    padding-top: 26px;
}

.agenda-content {
    flex-grow: 1;
    background: #fff;
    padding: 24px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    position: relative;
    margin-left: 40px;
    border-left: 4px solid var(--color-accent-gold);
}

.agenda-content::before {
    content: '';
    position: absolute;
    top: 26px;
    left: -34px;
    /* Nudged 10px right */
    transform: translateX(-50%);
    box-sizing: border-box;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-bg-primary);
    border: 3px solid var(--color-accent-gold);
    z-index: 1;
}

.agenda-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--color-text-main);
}

.agenda-speaker {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--color-accent-gold);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.agenda-speaker i {
    width: 16px;
    height: 16px;
}

.agenda-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .agenda-timeline::before {
        display: none;
        /* Hide main vertical line */
    }

    .agenda-item {
        flex-direction: column;
        margin-bottom: 24px;
        width: 100%;
        box-sizing: border-box;
    }

    .agenda-time {
        text-align: left;
        width: 100%;
        padding: 0;
        margin-bottom: 8px;
    }

    .agenda-content {
        margin-left: 0;
        border-left: 4px solid var(--color-accent-gold);
        /* Gold indicator */
        padding: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .agenda-content::before {
        display: none;
    }

    .agenda-time::before {
        display: none;
        /* Hide dot */
    }
}

/* Stagger Utilities for Agenda etc */
.delay-0 {
    transition-delay: 0ms;
}

.delay-1 {
    transition-delay: 100ms;
}

.delay-2 {
    transition-delay: 200ms;
}

.delay-3 {
    transition-delay: 300ms;
}

.delay-4 {
    transition-delay: 400ms;
}

/* --- Popup Tooltip Hint --- */
.interaction-hint-popup {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--color-accent-gold) 0%, #E6C25B 100%);
    color: var(--color-bg-primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    z-index: 9999 !important;
    pointer-events: none;
    opacity: 1;
    animation: bounceTooltip 2s infinite;
    transition: opacity 0.5s ease;
}

/* Little triangle pointing down */
.interaction-hint-popup::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #E6C25B transparent transparent transparent;
}

@keyframes bounceTooltip {

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

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

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

/* --- Featured Section --- */
.featured-section {
    background-color: rgba(212, 175, 55, 0.12);
    /* Light gold instead of pink */
    overflow: visible !important;
    /* Let the Click Me popup float above */
    position: relative;
    z-index: 20;
    /* Lower than speakers section so popup from cards paints above this section's heading */
}

.featured-section .section-container {
    overflow: visible !important;
}

/* Featured section popup breathing room: only top, no extra bottom */
@media (max-width: 768px) {
    .featured-section {
        padding-bottom: 24px !important;
        /* Removed excessive 80px that caused dead space */
    }
}

/* Hidden scrollbars on normal elements, momentum scrolling */
.featured-scroll-container {
    width: 100%;
    overflow: visible;
    /* Desktop: let popup float. Mobile: overridden to overflow-x:auto */
    padding-bottom: 32px;
    /* Space for shadow */
    /* Hide scrollbar for cleaner look but keep functionality */
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    transform: translateZ(0);
    /* GPU layer for smooth scroll */
}

.featured-scroll-container::-webkit-scrollbar {
    display: none;
}

.featured-grid {
    display: flex;
    gap: 20px;
    padding: 50px 10px 10px 10px;
    width: 100%;
    overflow: visible;
    margin: 0 auto;
    align-items: flex-start;
    min-height: 280px;
    /* Reserve space during API fetch to prevent CLS */
}

.featured-grid .card {
    width: auto;
    max-width: none;
    flex: 1 1 0;
    /* Ensures 5 columns distribute space equally on desktop */
    min-width: 0;
    position: relative;
    z-index: 30;
    /* Ensures card + popup paints above section heading */
}

/* --- Cards --- */
.card {
    background: #111111;
    /* Explicit background to stop bleed */
    outline: 1px solid transparent;
    border: none;
    /* overflow: visible intentionally — overflow:hidden was clipping the floating 'Click me' tooltip.
       Black bar bleed is already prevented by the explicit #111111 background + outline trick. */
    color: #FFFFFF;
    /* White text */
    border-radius: var(--radius-card);
    padding: 24px;
    width: clamp(240px, 18vw, 320px);
    /* Removed fixed height to eliminate whitespace */
    /* Fluid width: fits 5 on big screens, scales down nicely */
    max-width: 85vw;
    /* Ensure it never overblows on tiny phones */
    box-shadow: none;
    /* Removed shadow on multiple elements to reduce render lag */
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Replace shadow with subtle border */
    transition: transform var(--transition-speed) var(--transition-timing), opacity var(--transition-speed) var(--transition-timing);
    display: flex;
    flex-direction: column;
    position: relative;
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    cursor: pointer;
    /* Indicate it's clickable for the modal */
    backface-visibility: hidden;
    will-change: auto;
    /* Removed will-change to save GPU memory on many items */
}

.card.visible {
    animation: fadeUpCard 0.6s ease-out forwards;
}

@media (hover: hover) {
    .card:hover {
        transform: translate3d(0, -4px, 0);
    }
}

.card:active {
    transform: scale3d(0.98, 0.98, 1);
    background: #111111;
}

.card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    width: 100%;
}

.card-logo-container {
    width: 80px;
    height: 80px;
    aspect-ratio: 1 / 1;
    /* Reserves exact space before image loads — prevents CLS */
    border-radius: 50%;
    overflow: hidden;
    background-color: #ffffff;
    flex-shrink: 0;
    /* Never collapse during layout */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.card-logo-placeholder {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-text-muted);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0;
    font-family: var(--font-heading);
    overflow: hidden;
    width: 100%;
    text-align: center;
    margin-top: 16px;
    line-height: 1.3;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* --- Modal Overlay --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 24px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(30, 30, 30, 0.85);
    /* Deep dark glassy consistent popup */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(198, 167, 94, 0.15);
    /* Subtle gold hint */
    border-radius: var(--radius-card);
    padding: 32px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    color: #FFF;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 0 40px rgba(198, 167, 94, 0.05), 0 20px 40px rgba(0, 0, 0, 0.5);

    /* Hide scrollbar but keep scroll functionality */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-content::-webkit-scrollbar {
    display: none;
}

.modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    /* Floating inside the modal frame */
    right: 16px;
    background: rgba(42, 42, 42, 0.4);
    /* Dark glassy */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFF;
    width: 44px;
    /* Minimum 44x44 for touch */
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
}

@media (max-width: 600px) {
    .modal-close-btn {
        top: 12px;
        right: 12px;
    }
}

@media (hover: hover) {
    .modal-close-btn:hover {
        background: var(--color-accent-gold);
        transform: rotate(90deg);
    }
}

.modal-close-btn:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.9);
}



.modal-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: contain;
    background: #FFF;
    padding: 8px;
    margin-bottom: 24px;
    border: 2px solid var(--color-accent-gold);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 12px;
    color: #FFF;
}

.modal-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #CCCCCC;
    margin-bottom: 24px;
}

.modal-socials {
    display: flex;
    gap: 16px;
    justify-content: center;
    width: 100%;
    /* Ensure it spans the middle */
}

.social-link {
    color: var(--color-accent-gold);
    /* Make them gold by default */
    transition: color 0.2s, transform 0.2s;
    padding: 10px;
    margin: -10px;
}

.card.highlight-spa-ceylon .social-link {
    color: var(--color-accent-gold);
}

@media (hover: hover) {
    .social-link:hover {
        color: var(--color-text-main);
        transform: translateY(-2px);
    }

    .card.highlight-spa-ceylon .social-link:hover {
        color: #FFF;
    }

    .card.highlight-spa-ceylon:hover {
        box-shadow: 0 12px 30px rgba(212, 175, 55, 0.2);
        /* Gold glow */
    }
}

/* --- Category Sections --- */
.category-block {
    margin-bottom: 24px;
    border-radius: var(--radius-card);
    background: linear-gradient(145deg, #1f1f1f 0%, #111111 100%);
    /* Matching Dark Gray Gradient */
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.category-header {
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    background-color: transparent;
    /* Let the block gradient show through */
    color: var(--color-bg-primary);
    /* White text */
    transition: background-color var(--transition-speed);
    min-height: 60px;
    /* Touch target size */
}

@media (hover: hover) {
    .category-header:hover {
        background-color: rgba(255, 255, 255, 0.05);
        /* Subtle highlight on hover */
    }
}

.category-header:active {
    background-color: rgba(255, 255, 255, 0.02);
}

.category-title {
    /* Fluid font: scales from 1rem on tiny screens to 1.5rem on wider ones */
    font-size: clamp(0.85rem, 3.5vw, 1.5rem);
    font-family: var(--font-heading);
    margin-bottom: 0;
    /* Allow the title to shrink within the flex row without overflowing */
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-icon {
    transition: transform var(--transition-speed);
    padding: 12px;
    margin: -12px;
    flex-shrink: 0;
    /* Never let the chevron get squeezed by a long title */
}

.category-header.active .category-icon {
    transform: rotate(180deg);
}

.category-content-wrapper {
    max-height: 0;
    transition: max-height 500ms cubic-bezier(0.25, 1, 0.5, 1);
    /* Premium smooth expand */
    transform: translateZ(0);
    /* Force GPU layer */
    backface-visibility: hidden;
    will-change: max-height;
}

.category-content-wrapper.open {
    max-height: 25000px;
    /* Arbitrary large number to allow full expansion */
}

.category-inner {
    overflow: hidden;
    min-height: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: translate3d(0, 0, 0);
    will-change: transform, opacity;
}

.category-content-wrapper.open .category-inner {
    background: rgba(246, 230, 234, 0.4);
    /* Very light glassy pink */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 var(--radius-card) var(--radius-card);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    padding: 32px;
    background: rgba(255, 255, 255, 0.05);
    /* Darkened glass */
    align-items: start;
    /* Prevent row height expansion */
    transform: translateZ(0);
    /* Hardware accelerate the grid */
}

@media (max-width: 768px) {
    /* Mobile-specific overrides */
}

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

@media (max-width: 600px) {
    .category-grid {
        grid-template-columns: 1fr;
        padding: 24px;
    }
}

.category-grid .card {
    width: 100%;
    max-width: none;
    min-width: 0;
    box-sizing: border-box;
}

/* --- Desktop-only: Hero Partners Pill tweaks --- */
@media (min-width: 769px) {
    .hero-partners {
        bottom: 16px;
        padding: 10px 22px;
    }

    .hero-partners .partner-logo {
        height: 48px;
    }

    .hero-partners img[alt="Spa Ceylon"] {
        height: 60px;
        margin-left: 24px;
    }
}

/* --- Deep Mobile Optimization --- */
@media (max-width: 480px) {
    .modal-content {
        padding: 24px 20px;
        max-height: 85vh;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }

    .primary-btn {
        width: 100%;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }
}



/* --- Background Animations --- */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-animation .shape {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.8;
    /* GPU compositing — prevents shape animation from affecting scroll framerate */
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.shape-1 {
    width: 55vw;
    height: 55vw;
    max-width: 700px;
    max-height: 700px;
    background: rgba(255, 182, 193, 0.6);
    /* Soft Pink (Stronger) */
    top: -10%;
    left: -10%;
    animation: drift1 11s infinite alternate ease-in-out;
}

.shape-2 {
    width: 65vw;
    height: 65vw;
    max-width: 800px;
    max-height: 800px;
    background: rgba(212, 175, 55, 0.4);
    /* Soft Gold (Stronger) */
    bottom: -20%;
    right: -10%;
    animation: drift2 13.75s infinite alternate ease-in-out;
}

.shape-3 {
    width: 45vw;
    height: 45vw;
    max-width: 600px;
    max-height: 600px;
    background: rgba(255, 245, 247, 0.9);
    /* Blush Pink (Stronger) */
    top: 30%;
    left: 40%;
    animation: drift3 12.1s infinite alternate ease-in-out;
}

.shape-4 {
    width: 50vw;
    height: 50vw;
    max-width: 650px;
    max-height: 650px;
    background: rgba(255, 182, 193, 0.6);
    /* Soft Pink (Right side balance - Stronger) */
    top: 40%;
    right: -10%;
    animation: drift4 14s infinite alternate ease-in-out;
}

@keyframes drift1 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(5%, 5%) scale(1.05);
    }
}

@keyframes drift2 {
    0% {
        transform: translate(0, 0) scale(1.05);
    }

    100% {
        transform: translate(-5%, -5%) scale(1);
    }
}

@keyframes drift3 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-5%, 5%) scale(1.05);
    }
}

@keyframes drift4 {
    0% {
        transform: translate(0, 0) scale(1.05);
    }

    100% {
        transform: translate(-5%, -5%) scale(1);
    }
}

/* --- Entrance Animations --- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

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

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

/* --- Responsive --- */
@media (max-width: 992px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    /* TIGHTEN SECTION WHITESPACE (Mobile) */
    .details-section .section-container,
    .agenda-section .section-container {
        padding: 32px 16px !important;
    }

    /* Featured section needs extra top padding so "Click me" popup isn't clipped */
    .featured-section .section-container {
        padding: 70px 16px 40px !important;
        overflow: visible !important;
    }

    .section-container {
        padding: 50px 20px;
    }

    .hero {
        padding: 100px 16px 50px;
    }

    .nav-container {
        justify-content: space-between;
        /* Space between logo and hamburger */
        padding: 0 16px;
    }

    .header-logo-img {
        height: 36px;
        /* Compact logo for sticky mobile nav */
    }

    .hero-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
        /* Extra scaling down for tiny screens if needed */
        line-height: 1.1;
        white-space: normal;
    }

    .card {
        padding: 20px 16px;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-description {
        font-size: 0.95rem;
    }

    .category-grid {
        grid-template-columns: 1fr;
        padding: 24px 16px;
    }

    /* .nav-links shows/hides via max-height animation on hamburger toggle - see lines 188-211 for the dropdown CSS */

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-logo-text {
        display: none;
        /* Hide text on mobile */
    }

    .footer-logo-img {
        display: block;
        /* Show image on mobile */
        width: 120px;
        height: auto;
        margin: 0 auto;
    }

    .floating-logo-container {
        display: none;
        /* Hide floating corner logo on mobile entirely */
    }

    .featured-grid {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 24px 16px 0 16px;
        /* Crush whitespace above featured boxes */
        gap: 20px;
    }

    .featured-grid .card {
        width: 100%;
        min-width: 0;
        flex: 1 1 auto;
        max-width: none;
    }

    /* Mobile UI & Performance Fixes */
    /* NOTE: featured-section excluded — contain:content clips the .interaction-hint-popup tooltip */
    /* NOTE: speakers-section excluded — contain:content creates stacking context that clips the popup */
    .categories-section {
        contain: content;
        /* Isolate GPU repaints */
    }

    /* Featured brands are a vertical stack on mobile — no horizontal scroll needed.
       overflow: visible ensures the popup isn't clipped (overflow-x:auto implicitly clips overflow-y) */
    .featured-scroll-container {
        overflow: visible !important;
    }

    /* PERFORMANCE NUKES - remove all heavy painting on mobile */
    .card,
    .agenda-content {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: none !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
        will-change: auto !important;
    }

    .featured-scroll-container,
    .featured-grid {
        transform: translateZ(0);
        /* Force GPU layer */
    }

}