/* ============================================
   CAMBODIAN CSLC - STYLE SYSTEM
   ============================================ */

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

/* ============================================
   1. CSS VARIABLES & THEMES
   ============================================ */

:root {
    /* Dark Theme (Default) */
    --bg-body: #0a1628;
    --bg-card: #111d2e;
    --bg-lighter: #182a3e;
    --bg-input: #0d1926;
    
    --text-main: #f1f5f9;
    --text-muted: #8b9cb3;
    
    --accent-gold: #f5a623;
    --accent-gold-hover: #ffb84d;
    --accent-gold-subtle: rgba(245, 166, 35, 0.1);
    
    --divider: rgba(255, 255, 255, 0.08);
    --divider-strong: rgba(255, 255, 255, 0.12);
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-gold: 0 0 20px rgba(245, 166, 35, 0.15);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 50%;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* Light Theme */
body.light-mode,
:root:has(.light-mode),
html.light-mode {
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-lighter: #f1f5f9;
    --bg-input: #ffffff;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    
    --accent-gold: #d97706;
    --accent-gold-hover: #b45309;
    --accent-gold-subtle: rgba(217, 119, 6, 0.08);
    
    --divider: rgba(0, 0, 0, 0.06);
    --divider-strong: rgba(0, 0, 0, 0.1);
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-gold: 0 0 20px rgba(217, 119, 6, 0.1);
}

/* ============================================
   2. RESET & BASE STYLES
   ============================================ */

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-body);
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

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

ul, ol {
    list-style: none;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ============================================
   3. LAYOUT & CONTAINERS
   ============================================ */

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 48px 24px;
}

hr {
    border: none;
    height: 1px;
    background: var(--divider);
    margin: 36px 0;
}

/* ============================================
   4. HEADER & NAVIGATION
   ============================================ */

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 64px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--divider);
    display: flex;
    align-items: center;
    transition: background-color var(--transition-normal);
    backdrop-filter: blur(12px);
}

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

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-main);
}

.logo-img {
    height: 36px;
    width: auto;
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--text-main);
    background: var(--bg-lighter);
}

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

/* Theme Toggle */
.theme-toggle {
    width: 38px;
    height: 38px;
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--text-muted);
    background: var(--bg-lighter);
    border: 1px solid var(--divider);
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    font-size: 1.5rem;
    color: var(--text-main);
    padding: 8px;
    cursor: pointer;
}

/* ============================================
   5. HERO SECTION
   ============================================ */

.hero {
    text-align: center;
    padding: 72px 24px;
    background: var(--bg-body);
    border-bottom: 1px solid var(--divider);
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    color: var(--text-main);
}

.hero p {
    max-width: 600px;
    margin: 0 auto 28px;
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ============================================
   6. GRID LAYOUTS
   ============================================ */

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

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

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

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

/* ============================================
   7. CARDS
   ============================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: transform var(--transition-fast), 
                border-color var(--transition-fast), 
                box-shadow var(--transition-fast);
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-md), 0 0 0 1px var(--accent-gold);
}

.card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: var(--accent-gold-subtle);
    border-radius: var(--radius-sm);
    color: var(--accent-gold);
    font-size: 0.85rem;
    font-weight: 600;
}

.card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ============================================
   8. BUTTONS
   ============================================ */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bg-body);
    background: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.btn-primary:hover {
    background: var(--accent-gold-hover);
    transform: translateY(-1px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--divider-strong);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.btn-outline:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* ============================================
   9. ACCORDION
   ============================================ */

.accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.accordion-item:hover {
    border-color: var(--divider-strong);
}

.accordion-item.active {
    border-color: var(--accent-gold);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.accordion-header span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 4px 10px;
    background: var(--bg-lighter);
    border-radius: var(--radius-sm);
}

.accordion-item.active .accordion-header {
    color: var(--accent-gold);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.accordion-content p {
    padding: 20px 22px;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    background: var(--bg-lighter);
    border-top: 1px solid var(--divider);
}

.accordion-item.active .accordion-content {
    max-height: 300px;
}

/* ============================================
   10. BREADCRUMB
   ============================================ */

.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--accent-gold);
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 10px;
    color: var(--divider-strong);
}

.breadcrumb .current {
    color: var(--accent-gold);
    font-weight: 600;
}

/* ============================================
   11. COUNTDOWN TIMER
   ============================================ */

.countdown-container {
    background: var(--bg-card);
    border: 1px solid var(--accent-gold);
    border-radius: var(--radius-md);
    padding: 28px;
    text-align: center;
    margin-bottom: 36px;
    box-shadow: var(--shadow-gold);
}

.countdown-container h3 {
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-gold);
}

.timer-flex {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.time-val {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

.time-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* ============================================
   12. NEWSLETTER SECTION
   ============================================ */

.newsletter-section {
    background: var(--bg-card);
    border-top: 1px solid var(--divider);
    border-bottom: 1px solid var(--divider);
    padding: 56px 24px;
    text-align: center;
    margin-top: 48px;
}

.newsletter-section h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.newsletter-section > p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    justify-content: center;
    max-width: 460px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-main);
    background: var(--bg-input);
    border: 1px solid var(--divider-strong);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.newsletter-input::placeholder {
    color: var(--text-muted);
}

.newsletter-input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px var(--accent-gold-subtle);
}

/* ============================================
   13. PARTNER MARQUEE
   ============================================ */

.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    padding: 24px 0;
    background: var(--bg-lighter);
    border-top: 1px solid var(--divider);
    border-bottom: 1px solid var(--divider);
    margin-top: 48px;
}

.marquee-content {
    display: inline-block;
    animation: marquee-scroll 25s linear infinite;
}

.partner-logo {
    display: inline-block;
    margin: 0 48px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    opacity: 0.6;
    transition: opacity var(--transition-fast), color var(--transition-fast);
}

.partner-logo:hover {
    opacity: 1;
    color: var(--accent-gold);
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   14. SEARCH BAR
   ============================================ */

.search-wrapper {
    position: relative;
    margin-bottom: 24px;
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-main);
    background: var(--bg-card);
    border: 1px solid var(--divider-strong);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px var(--accent-gold-subtle);
}

.search-icon-symbol {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

/* ============================================
   15. BACK TO TOP BUTTON
   ============================================ */

.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--bg-body);
    background: var(--accent-gold);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal), transform var(--transition-fast);
    z-index: 999;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-gold);
}

/* ============================================
   16. FOOTER
   ============================================ */

footer {
    background: var(--bg-card);
    border-top: 1px solid var(--divider);
    padding: 48px 24px;
    text-align: center;
    margin-top: 48px;
}

footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

footer a {
    color: var(--accent-gold);
    font-weight: 600;
}

footer a:hover {
    color: var(--accent-gold-hover);
    text-decoration: underline;
}

/* ============================================
   17. TEAM PAGE STYLES
   ============================================ */

.team-photo {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    object-fit: cover;
    background: var(--bg-lighter);
    border: 2px solid var(--accent-gold);
    margin-right: 20px;
}

.team-card-flex {
    display: flex;
    align-items: center;
    text-align: left;
}

.role-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   18. MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    /* Layout */
    .container {
        padding: 36px 20px;
    }
    
    /* Hero */
    .hero {
        padding: 48px 20px;
    }
    
    .hero h1 {
        font-size: 1.85rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* Navigation */
    .hamburger {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        flex-direction: column;
        padding: 20px;
        background: var(--bg-card);
        border-bottom: 1px solid var(--divider);
        box-shadow: var(--shadow-lg);
        gap: 4px;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 14px;
        font-size: 1rem;
    }
    
    .theme-toggle {
        margin: 12px auto 0;
    }
    
    /* Cards */
    .card {
        padding: 24px;
    }
    
    /* Team */
    .team-card-flex {
        flex-direction: column;
        text-align: center;
    }
    
    .team-photo {
        margin: 0 0 16px 0;
    }
    
    /* Countdown */
    .timer-flex {
        gap: 16px;
    }
    
    .time-val {
        font-size: 1.4rem;
    }
    
    /* Newsletter */
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form .btn-primary {
        width: 100%;
    }
    
    /* Footer */
    footer {
        padding: 36px 20px;
    }
}

/* ============================================
   19. UTILITY CLASSES
   ============================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--accent-gold); }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }