/* The Rise Theme - Design System
 * Color Palette: Midnight Blue/Slate + Gold/Emerald
 * Typography: Inter (body), Geometric Sans-Serif (headers)
 * Supports: Dark/Light mode, Tamil script, Hardware-accelerated animations
 */

/* ============================================
   CSS Custom Properties - Light Mode
   ============================================ */
:root,
:root[data-theme="light"] {
    /* Backgrounds */
    --tr-bg: #FAFBF8;
    --tr-bg-elevated: #ffffff;
    --tr-bg-muted: #EAF2EC;
    --tr-bg-inverse: #062016;

    /* Text Colors */
    --tr-text: #1C2B23;
    --tr-text-strong: #062016;
    --tr-text-muted: #4A6357;
    --tr-text-inverse: #ffffff;

    /* Footer */
    --tr-footer-bottom-text: rgba(255, 255, 255, 0.65);

    /* Brand Colors */
    --tr-gold: #D4AF37;
    --tr-gold-light: #F3C623;
    --tr-gold-dark: #B8942D;
    --tr-emerald: #0b6e38;
    --tr-emerald-light: #10B981;
    --tr-emerald-dark: #074a25;

    /* Emerald Forest Slate */
    --tr-midnight: #062016;
    --tr-slate: #0C3325;
    --tr-slate-light: #144A36;

    /* Accent (configurable) */
    --tr-accent: #D4AF37;
    --tr-accent-contrast: #ffffff;
    --tr-link: #0b6e38;
    --tr-link-hover: #074a25;
    --tr-focus-ring: color-mix(in oklab, #D4AF37 45%, transparent);

    /* Borders */
    --tr-border: rgba(11, 110, 56, 0.12);
    --tr-border-strong: rgba(11, 110, 56, 0.22);
    --tr-divider: rgba(11, 110, 56, 0.08);

    /* Shadows */
    --tr-shadow-sm: 0 1px 2px rgba(6, 32, 22, 0.05);
    --tr-shadow-md: 0 4px 6px -1px rgba(6, 32, 22, 0.08), 0 2px 4px -2px rgba(6, 32, 22, 0.06);
    --tr-shadow-lg: 0 10px 15px -3px rgba(6, 32, 22, 0.1), 0 4px 6px -4px rgba(6, 32, 22, 0.08);
    --tr-shadow-xl: 0 20px 25px -5px rgba(6, 32, 22, 0.12), 0 8px 10px -6px rgba(6, 32, 22, 0.08);

    /* Radii */
    --tr-radius-sm: 0.25rem;
    --tr-radius-md: 0.5rem;
    --tr-radius-lg: 0.75rem;
    --tr-radius-xl: 1rem;
    --tr-radius-full: 9999px;

    /* Navigation */
    --tr-nav-bg: rgba(250, 251, 248, 0.97);
    --tr-nav-border: rgba(11, 110, 56, 0.1);
}

/* ============================================
   CSS Custom Properties - Dark Mode
   ============================================ */
:root[data-theme="dark"] {
    /* Backgrounds */
    --tr-bg: #062016;
    --tr-bg-elevated: #0C3325;
    --tr-bg-muted: #144A36;
    --tr-bg-inverse: #FAFBF8;

    /* Text Colors */
    --tr-text: #E2EFE8;
    --tr-text-strong: #F4FBF7;
    --tr-text-muted: #8FB4A2;
    --tr-text-inverse: #062016;

    /* Footer */
    --tr-footer-bottom-text: #F4FBF7;

    /* Brand Colors */
    --tr-gold: #F59E0B;
    --tr-gold-light: #FCD34D;
    --tr-gold-dark: #D4AF37;
    --tr-emerald: #10B981;
    --tr-emerald-light: #34D399;
    --tr-emerald-dark: #059669;

    /* Emerald Forest Slate */
    --tr-midnight: #03140D;
    --tr-slate: #062016;
    --tr-slate-light: #0C3325;

    /* Accent (configurable) */
    --tr-accent: #E8C84A;
    --tr-accent-contrast: #0f172a;
    --tr-link: #E8C84A;
    --tr-link-hover: #F0D85C;
    --tr-focus-ring: color-mix(in oklab, #E8C84A 45%, transparent);

    /* Borders */
    --tr-border: rgba(226, 232, 240, 0.1);
    --tr-border-strong: rgba(226, 232, 240, 0.2);
    --tr-divider: rgba(226, 232, 240, 0.06);

    /* Shadows */
    --tr-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --tr-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --tr-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --tr-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);

    /* Navigation */
    --tr-nav-bg: rgba(15, 23, 42, 0.95);
    --tr-nav-border: rgba(226, 232, 240, 0.08);
}

/* ============================================
   Base Reset & Typography
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', 'Noto Sans Tamil', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--tr-text);
    background-color: var(--tr-bg);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', 'Noto Sans Tamil', -apple-system, sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--tr-text-strong);
    margin-bottom: 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 2rem); }
h4 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }
h5 { font-size: 1.125rem; }
h6 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--tr-text-muted); }

p {
    margin-bottom: 1em;
    color: var(--tr-text);
}

a {
    color: var(--tr-link);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--tr-link-hover);
}

/* ============================================
   Layout System
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-narrow {
    max-width: 100%;
    width: 100%;
}

.section {
    padding: clamp(3rem, 8vw, 6rem) 0;
}

.section-tight {
    padding: clamp(2rem, 5vw, 3.5rem) 0;
}

/* Grid System */
.columns {
    display: grid;
    gap: 2rem;
}

.columns-2 { grid-template-columns: repeat(2, 1fr); }
.columns-3 { grid-template-columns: repeat(3, 1fr); }
.columns-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .columns-2,
    .columns-3,
    .columns-4 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Header & Navigation
   ============================================ */
#header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--tr-nav-bg);
    border-bottom: 1px solid var(--tr-nav-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

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

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.navbar-section {
    display: flex;
    align-items: center;
}

.logo img,
.logo svg {
    height: 2.5rem;
    width: auto;
}

.desktop-menu {
    display: flex;
    align-items: center;
}

@media (max-width: 860px) {
    .desktop-menu {
        display: none;
    }
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 200;
    width: 3rem;
    height: 3rem;
    padding: 0.5rem;
    background: var(--tr-bg-elevated);
    border: 1px solid var(--tr-border);
    border-radius: var(--tr-radius-lg);
    cursor: pointer;
    box-shadow: var(--tr-shadow-md);
}

@media (max-width: 860px) {
    .mobile-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.375rem;
    }
}

.mobile-toggle span {
    display: block;
    width: 1.5rem;
    height: 2px;
    background: var(--tr-text);
    transition: all 0.3s ease;
}

/* Mobile Navigation */
.mobile-container {
    display: none;
}

@media (max-width: 860px) {
    .mobile-container {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 150;
        background: var(--tr-bg);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }

    .mobile-container.active {
        transform: translateX(0);
    }
}

.overlay {
    padding: 5rem 1.5rem 2rem;
}

.overlay ul {
    list-style: none;
}

.overlay ul li {
    border-bottom: 1px solid var(--tr-divider);
}

.overlay ul li a {
    display: block;
    padding: 1rem 0;
    color: var(--tr-text);
    font-size: 1.125rem;
}

.overlay ul ul {
    padding-left: 1.5rem;
}

/* ============================================
   Ecosystem Cards
   ============================================ */
.ecosystem-logo {
    display: block;
    margin: 0 auto 1rem;
    width: 110px;
    height: auto;
    transition: transform 0.2s ease;
}

.ecosystem-logo:hover {
    transform: scale(1.1);
}

/* ============================================
   Dropdown Navigation
   ============================================ */
.dropmenu {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
}

.dropmenu li {
    position: relative;
}

/* Keep submenu open when hovering over the submenu itself */
.dropmenu li:hover > ul,
.dropmenu li ul:hover,
.dropmenu li.menu-open > ul {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropmenu li a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--tr-text);
    text-decoration: none;
    border-radius: var(--tr-radius-md);
    transition: all 0.2s ease;
}

.dropmenu li a:hover,
.dropmenu li a.active {
    color: var(--tr-accent);
    background: var(--tr-bg-muted);
}

/* Dropdown submenu */
.dropmenu li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--tr-bg-elevated);
    border: 1px solid var(--tr-border);
    border-radius: var(--tr-radius-lg);
    box-shadow: var(--tr-shadow-lg);
    list-style: none;
    padding: 0.75rem 0;
    margin: 0;
    top: calc(100% - 0.25rem);
    z-index: 110;

}

.dropmenu li:hover > ul {
    display: block;
}

/* Keep a clicked submenu open while selecting a child link. */
.dropmenu li.menu-open > ul {
    display: block;
}

/* Events mega menu: show Upcoming and Past events as stable columns. */
.dropmenu > li.mega-menu > ul {
    left: 50%;
    min-width: 560px;
    padding: 1rem;
    transform: translateX(-50%);
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.dropmenu > li.mega-menu:hover > ul,
.dropmenu > li.mega-menu.menu-open > ul {
    display: grid;
    transform: translateX(-50%);
}

.dropmenu > li.mega-menu > ul > li > a {
    padding: 0.5rem 0.75rem;
    color: var(--tr-accent);
    font-size: 0.95rem;
    font-weight: 700;
}

.dropmenu > li.mega-menu > ul > li > ul {
    position: static;
    display: block;
    min-width: 0;
    padding: 0.25rem 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.dropmenu > li.mega-menu > ul > li > ul > li > a {
    padding: 0.55rem 0.75rem;
    white-space: normal;
}

.dropmenu li ul li {
    position: relative;
}

.dropmenu li ul li a {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    border-radius: 0;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.dropmenu li ul li a:hover {
    background: var(--tr-bg-muted);
}

/* Register Now CTA button in the nav */
.dropmenu li a.nav-cta {
    margin-left: 0.35rem;
    padding: 0.45rem 1.1rem;
    color: var(--tr-accent-contrast);
    background: var(--tr-accent);
    border-radius: var(--tr-radius-md);
    font-weight: 600;
    box-shadow: var(--tr-shadow-sm);
}

.dropmenu li a.nav-cta:hover,
.dropmenu li a.nav-cta.active {
    color: var(--tr-accent-contrast);
    background: var(--tr-accent);
    filter: brightness(0.92);
}

/* Mobile overlay variant */
.overlay ul li:has(a.nav-cta) {
    border-bottom: none;
}

.overlay ul li a.nav-cta {
    display: inline-block;
    margin: 0.75rem 0;
    padding: 0.75rem 1.5rem;
    color: var(--tr-accent-contrast);
    background: var(--tr-accent);
    border-radius: var(--tr-radius-md);
    font-weight: 600;
}

.overlay ul li a.nav-cta:hover,
.overlay ul li a.nav-cta.active {
    color: var(--tr-accent-contrast);
    background: var(--tr-accent);
    filter: brightness(0.92);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    padding: clamp(3rem, 8vw, 6rem) 0;
    background: linear-gradient(135deg, var(--tr-midnight) 0%, var(--tr-slate) 100%), url('../images/backgrounds/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    text-align: center;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.hero h1,
.hero h2,
.hero h3,
.hero h4,
.hero h5,
.hero h6 {
    color: #ffffff;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.8) 100%);
    z-index: 1;
}

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

.hero .eyebrow {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tr-gold);
    margin-bottom: 1rem;
}

.hero .lead {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: rgba(255, 255, 255, 0.85);
    max-width: 700px;
    margin: 1.5rem auto;
}

/* ============================================
   Homepage Sections - Full Width
   ============================================ */
.hero-fullwidth {
    position: relative;
    padding: clamp(5rem, 12vw, 10rem) 0;
    background: linear-gradient(135deg, var(--tr-midnight) 0%, var(--tr-slate) 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    text-align: center;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.hero-fullwidth h1,
.hero-fullwidth h2,
.hero-fullwidth h3,
.hero-fullwidth h4,
.hero-fullwidth h5,
.hero-fullwidth h6 {
    color: #ffffff;
}

.hero-fullwidth .eyebrow {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tr-gold);
    margin-bottom: 1rem;
}

.hero-fullwidth .lead {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: rgba(255, 255, 255, 0.85);
    max-width: 750px;
    margin: 1.5rem auto;
}

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

.hero-logo {
    display: block;
    margin: 0 auto;
    max-width: 280px;
    height: auto;
}

/* Hero Variants & Utilities */
.hero-compact {
    padding: clamp(3rem, 8vw, 6rem) 0;
}

.hero-medium {
    padding: clamp(4rem, 10vw, 7rem) 0;
}

.hero-subtitle {
    color: var(--tr-gold);
    margin-bottom: 1rem;
}

.hero-subtitle-emerald {
    color: var(--tr-emerald);
    margin-bottom: 1rem;
}

.hero-subtitle-blue {
    color: var(--tr-blue);
    margin-bottom: 1rem;
}

.hero-lead-wide {
    max-width: 900px;
}

.hero-lead-full {
    max-width: none;
}

.hero-lead-date {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tr-gold);
    margin-bottom: 1.5rem;
}

.hero-icon-grid {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    gap: 1.5rem;
}

.hero-icon {
    font-size: 1.8rem;
}

.hero-icon-label {
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.hero-cta {
    margin-top: 2.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Section Full Width */
.section-fullwidth {
    padding: clamp(3rem, 8vw, 6rem) 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* Section Split - Two Column with Background */
.section-split {
    position: relative;
    padding: clamp(4rem, 8vw, 6rem) 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.section-split h1,
.section-split h2,
.section-split h3,
.section-split h4,
.section-split h5,
.section-split h6 {
    color: var(--tr-text-strong);
}

.split-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.92) 100%);
    z-index: 1;
}

@media (prefers-color-scheme: dark) {
    :root[data-theme="dark"] .split-overlay {
        background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.92) 100%);
    }
    :root[data-theme="dark"] .section-split h1,
    :root[data-theme="dark"] .section-split h2,
    :root[data-theme="dark"] .section-split h3,
    :root[data-theme="dark"] .section-split h4,
    :root[data-theme="dark"] .section-split h5,
    :root[data-theme="dark"] .section-split h6 {
        color: #ffffff;
    }
}

:root[data-theme="dark"] .split-overlay {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.92) 100%);
}

:root[data-theme="dark"] .section-split h1,
:root[data-theme="dark"] .section-split h2,
:root[data-theme="dark"] .section-split h3,
:root[data-theme="dark"] .section-split h4,
:root[data-theme="dark"] .section-split h5,
:root[data-theme="dark"] .section-split h6 {
    color: #ffffff;
}

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

.split-media {
    position: relative;
    z-index: 2;
}

.split-4-8 {
    grid-template-columns: 2fr 4fr;
    align-items: center;
    gap: 3rem;
}

/* Split layout container */
.split-container {
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .split-4-8 {
        grid-template-columns: 1fr;
    }
}

.about-logo {
    max-width: 320px;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
}

.about-logo:hover {
    transform: scale(1.03);
}

.founder-photo {
    max-width: 350px;
    width: 100%;
    height: auto;
    border-radius: var(--tr-radius-xl);
    box-shadow: var(--tr-shadow-xl);
    border: 3px solid var(--tr-gold);
    transition: transform 0.3s ease;
}

.founder-photo:hover {
    transform: scale(1.02);
}

/* ============================================
   Event Category Badges
   ============================================ */
.event-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.event-badge-general {
    background: var(--tr-emerald);
    color: white;
}

.event-badge-pre-summit {
    background: #3B82F6;
    color: white;
}

.event-badge-summit {
    background: var(--tr-gold);
    color: var(--tr-bg-inverse);
}

/* ============================================
   Event Cards
   ============================================ */
.event-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.event-card-featured {
    border: 2px solid var(--tr-gold);
}

/* ============================================
   Pre-Summit Progress
   ============================================ */
.pre-summit-tracker {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pre-summit-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--tr-bg-elevated);
    border-radius: var(--radius-full);
    border: 2px solid var(--tr-border);
}

.pre-summit-step.completed {
    background: var(--tr-emerald);
    color: white;
    border-color: var(--tr-emerald);
}

.pre-summit-step.current {
    background: #3B82F6;
    color: white;
    border-color: #3B82F6;
}

.pre-summit-step.future {
    background: var(--tr-bg-muted);
    color: var(--tr-text-muted);
}

@media (max-width: 768px) {
    .hero-fullwidth {
        margin-left: 0;
        width: 100%;
    }
    .hero {
        margin-left: 0;
        width: 100%;
    }
    .section-fullwidth {
        margin-left: 0;
        width: 100%;
    }
    .split-media {
        margin-top: 2rem;
    }
    .about-logo {
        max-width: 220px;
    }
    .founder-photo {
        max-width: 280px;
    }
    .pre-summit-tracker {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ============================================
   Form Styling
   ============================================ */
.form-wrapper {
    max-width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--tr-text-strong);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--tr-text);
    background-color: var(--tr-bg);
    border: 1px solid var(--tr-border);
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--tr-accent);
    box-shadow: 0 0 0 3px var(--tr-focus-ring);
}

.form-control::placeholder {
    color: var(--tr-text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--tr-bg-elevated);
    border-radius: var(--tr-radius-lg);
    box-shadow: var(--tr-shadow-sm);
    padding: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--tr-text-muted);
    font-size: 0.9375rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--tr-radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--tr-accent);
    color: var(--tr-accent-contrast);
    border-color: var(--tr-accent);
}

.btn-primary:hover {
    background: var(--tr-link-hover);
    border-color: var(--tr-link-hover);
    color: var(--tr-accent-contrast);
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border-color: #ffffff;
}

.btn-secondary:hover {
    background: #ffffff;
    color: var(--tr-midnight);
}

.btn-ghost {
    background: transparent;
    color: var(--tr-accent);
    border-color: var(--tr-accent);
}

.btn-ghost:hover {
    background: var(--tr-accent);
    color: var(--tr-accent-contrast);
}

/* ============================================
    Footer
   ============================================ */
#footer {
    background: var(--tr-midnight);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 3rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-logo img {
    max-width: 150px;
    height: auto;
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--tr-gold);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.footer-description {
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
}

.footer-heading {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-links-list a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links-list a:hover {
    color: var(--tr-gold);
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.footer-contact-item i {
    color: var(--tr-gold);
    margin-top: 0.25rem;
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
}

.footer-contact-item a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contact-item a:hover {
    color: var(--tr-gold);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-social a:hover {
    background: var(--tr-gold);
    color: var(--tr-midnight);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8125rem;
    color: var(--tr-footer-bottom-text, rgba(255, 255, 255, 0.5));
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

#footer .footer-legal a {
    color: var(--tr-footer-bottom-text, rgba(255, 255, 255, 0.6));
    text-decoration: none;
    transition: color 0.2s ease;
}

#footer .footer-legal a:hover {
    color: var(--tr-gold);
}

#footer a {
    color: var(--tr-gold);
}

#footer a:hover {
    color: var(--tr-gold-light);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

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

    .footer-logo img {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-contact-item {
        justify-content: center;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
    }
}

/* ============================================
   Theme Toggle Button
   ============================================ */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    background: transparent;
    border: 1px solid var(--tr-border);
    border-radius: var(--tr-radius-full);
    cursor: pointer;
    color: var(--tr-text);
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--tr-bg-muted);
    border-color: var(--tr-border-strong);
}

.theme-toggle .icon {
    font-size: 1.125rem;
}

/* ============================================
   Language Switcher
   ============================================ */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-right: 0.75rem;
    padding: 0.25rem;
    background: var(--tr-bg-muted);
    border-radius: var(--tr-radius-full);
    border: 1px solid var(--tr-border);
}

.lang-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tr-text-muted);
    border-radius: var(--tr-radius-full);
    text-decoration: none;
    transition: all 0.2s ease;
}

.lang-option:hover {
    color: var(--tr-text);
}

.lang-option.active {
    background: var(--tr-accent);
    color: var(--tr-accent-contrast);
}

/* ============================================
   Mobile Navigation Overrides
   ============================================ */
@media (max-width: 860px) {
    /* Keep lang switcher + theme toggle clear of the fixed hamburger button */
    .navbar-section.actions {
        margin-right: 3.5rem;
    }

    .lang-switcher {
        padding: 0.2rem;
        gap: 0.15rem;
    }

    .lang-option {
        padding: 0.3rem 0.55rem;
        font-size: 0.7rem;
    }

    /* Vertical stacked mobile menu */
    .mobile-container .dropmenu {
        display: block;
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    .mobile-container .dropmenu li ul {
        position: static;
        display: none;
        min-width: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
    }

    /* Keep the mega menu mobile-friendly: one section below the other. */
    .mobile-container .dropmenu > li.mega-menu > ul {
        display: none;
        min-width: 0;
        grid-template-columns: 1fr;
        gap: 0;
        transform: none;
    }

    .mobile-container .dropmenu > li.mega-menu.menu-open > ul {
        display: block;
    }

    .mobile-container .dropmenu li.has-children.menu-open > ul {
        display: block;
    }

    .mobile-container .dropmenu li ul li a {
        white-space: normal;
        padding: 0.75rem 0;
        font-size: 1rem;
    }
}

/* Theme Toggle Icons */
:root[data-theme-preference="auto"] .icon-auto,
:root[data-theme-preference="light"] .icon-sun,
:root[data-theme-preference="dark"] .icon-moon {
    display: inline-block;
}

:root[data-theme-preference="auto"] .icon-sun,
:root[data-theme-preference="auto"] .icon-moon,
:root[data-theme-preference="light"] .icon-auto,
:root[data-theme-preference="light"] .icon-moon,
:root[data-theme-preference="dark"] .icon-auto,
:root[data-theme-preference="dark"] .icon-sun {
    display: none;
}

/* ============================================
   Messages / Toasts
   ============================================ */
.toast {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: var(--tr-radius-md);
    font-size: 0.9375rem;
}

.toast-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--tr-emerald-dark);
    border-left: 4px solid var(--tr-emerald);
}

.toast-error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-left: 4px solid #ef4444;
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-gold { color: var(--tr-gold); }
.text-emerald { color: var(--tr-emerald); }
.text-muted { color: var(--tr-text-muted); }

.bg-midnight { 
    background: var(--tr-midnight); 
    color: #ffffff;
}
.bg-midnight h1,
.bg-midnight h2,
.bg-midnight h3,
.bg-midnight h4,
.bg-midnight h5 {
    color: #ffffff;
}
.bg-slate { background: var(--tr-slate); }
.bg-light { background: var(--tr-bg-elevated); }
.bg-white { background: var(--tr-bg); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.list-unstyled {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.lead {
    font-size: 1.25rem;
    color: var(--tr-text-muted);
}

.legal-content > h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--tr-divider);
}

.legal-content > h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.legal-content > h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--tr-gold);
}

.legal-content > p {
    margin-bottom: 1rem;
}

.legal-content > ul,
.legal-content > ol {
    margin: 0 0 1.5rem 1.25rem;
    padding-left: 1rem;
}

.legal-content > li,
.legal-content li {
    margin-bottom: 0.625rem;
}

.label {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--tr-radius-full);
    background: var(--tr-bg-muted);
    color: var(--tr-text-muted);
}

.label-gold {
    background: rgba(212, 175, 55, 0.15);
    color: var(--tr-gold-dark);
}

.label-emerald {
    background: rgba(16, 185, 129, 0.15);
    color: var(--tr-emerald-dark);
}

/* ============================================
    Component Utility Classes
    ============================================ */

/* Dark Card - for cards on dark backgrounds */
.card-dark {
    background: var(--tr-slate);
    border: 1px solid var(--tr-slate-light);
    color: #ffffff;
}

.card-dark .card-text {
    color: rgba(255, 255, 255, 0.8);
}

/* Badge variants */
.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--tr-radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.badge-gold {
    background: var(--tr-gold);
    color: var(--tr-bg-inverse);
}

.badge-blue {
    background: #3B82F6;
    color: white;
}

.badge-green {
    background: var(--tr-emerald);
    color: white;
}

/* Card as clickable link */
.card-link {
    text-decoration: none;
}

.card-link:hover {
    text-decoration: none;
}

/* CTA button row */
.cta-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Split layout columns */
.split-layout {
    align-items: center;
    gap: 3rem;
}

/* Small button variant */
.btn-sm {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Button with left margin */
.btn-gap {
    margin-left: 1rem;
}

/* Stat number */
.stat-number {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--tr-gold);
    line-height: 1;
}

/* Stat label */
.stat-label {
    color: rgba(255, 255, 255, 0.85);
    margin-top: 0.5rem;
}

/* Large icon */
.icon-lg {
    font-size: 2.5rem;
}

/* Card left borders */
.border-left-gold {
    border-left: 4px solid var(--tr-gold);
}

.border-left-emerald {
    border-left: 4px solid var(--tr-emerald);
}

/* Card body text */
.card-body-text {
    color: var(--tr-text);
    font-size: 1.0625rem;
    line-height: 1.8;
}

/* Card muted text */
.card-muted-text {
    color: var(--tr-text-muted);
    font-size: 0.9375rem;
}

/* Mission list */
.mission-list {
    margin-top: 1rem;
    padding-left: 1.25rem;
    color: var(--tr-text-muted);
    font-size: 0.9375rem;
}

.mission-list li {
    margin-bottom: 0.5rem;
}

/* Dark section text color */
.text-inverse {
    color: #ffffff;
}

/* Light paragraph text on dark backgrounds */
.text-light {
    color: rgba(255, 255, 255, 0.85);
}

/* Lighter paragraph text on dark backgrounds */
.text-lighter {
    color: rgba(255, 255, 255, 0.7);
}

/* Blue accent text */
.text-blue {
    color: #3B82F6;
}

/* Strong text color */
.text-strong {
    color: var(--tr-text-strong);
}

/* Ecosystem icon circle */
.icon-circle {
    background: var(--tr-emerald);
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    font-weight: 700;
}

/* Card button wrapper */
.card-action {
    margin-top: 1rem;
}

/* White background section */
.section-white {
    background: white;
    color: var(--tr-text);
}

/* Quote text */
.quote-text {
    font-style: italic;
}

/* Social icons container */
.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

/* Contact details list */
.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--tr-text);
}

.contact-list i {
    width: 1.25rem;
    text-align: center;
    color: var(--tr-gold);
}

.contact-list a {
    word-break: break-word;
}

/* Completed event text */
.completed-text {
    color: var(--tr-text-muted);
    font-size: 0.875rem;
}

/* Milestone box (past summit) */
.milestone-box {
    background: var(--tr-slate);
    padding: 2rem;
    border-radius: var(--tr-radius-lg);
    border: 2px solid var(--tr-gold);
}

.milestone-number {
    color: var(--tr-gold);
    font-size: 3rem;
    font-weight: 800;
    margin: 0;
}

.milestone-subtitle {
    color: #ffffff;
    margin: 0.5rem 0 0;
}

.milestone-year {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

/* Section color override */
.section-midnight {
    color: #ffffff;
}
.section-midnight h1,
.section-midnight h2,
.section-midnight h3,
.section-midnight h4,
.section-midnight h5 {
    color: #ffffff;
}

/* Card with white background */
.card-white {
    text-decoration: none;
    background: var(--tr-bg);
}

/* Ecosystem overview text */
.ecosystem-overview {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--tr-text-strong);
}

/* Section subtitle container */
.section-subtitle {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Stat container */
.stat-container {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
    Animations
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
