/* ===== CSS VARIABLES & DESIGN TOKENS ===== */
:root {
    /* Colors */
    --primary-dark: #0F2E1F;
    --secondary-dark: #1D4D3A;
    --accent-green: #3E684A;
    --bg-light: #F5E6C8;
    --accent-gold: #DAA017;
    --accent-brown: #8B5E34;
    --surface-light: #F4F6F8;
    --text-dark: #222222;
    --text-muted: #4A4A4A;
    --white: #FFFFFF;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;

    /* Spacing */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;

    /* Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.12);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--surface-light);
    background-image: radial-gradient(rgba(29, 77, 58, 0.05) 1.5px, transparent 1.5px);
    background-size: 25px 25px;
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    line-height: 1.3;
    margin-bottom: var(--space-md);
    letter-spacing: -0.01em;
}

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

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

ul {
    list-style: none;
}

/* ===== TYPOGRAPHY UTILITIES ===== */
.text-center { text-align: center; }
.text-gold { color: var(--accent-gold); }
.text-muted { color: var(--text-muted); }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.12s cubic-bezier(0.1, 0.8, 0.2, 1);
}

/* Touch optimization & zero mobile tap delays */
.btn, a, button, input[type="submit"], input[type="button"], .filter-tab, .mode-btn, .mobile-nav-item, .nav-item {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Snappy tactile physical clicky effect */
.btn:active, button:active, a:active, .filter-tab:active, .mode-btn:active, .mobile-nav-item:active, .nav-item:active {
    transform: scale(0.96) translateY(0) !important;
    transition: transform 0.05s ease-out !important;
    box-shadow: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold), #FFC633);
    color: var(--primary-dark);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(218, 160, 23, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(218, 160, 23, 0.5);
}

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

.btn-secondary:hover {
    background-color: var(--accent-green);
    color: var(--white);
}

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

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

/* ===== LAYOUT & NAVIGATION ===== */
.navbar {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color var(--transition-normal);
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-text h1 {
    font-size: 1.25rem;
    margin-bottom: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.brand-text p {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.logo-icon {
    font-size: 2rem;
    color: var(--secondary-dark);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-item {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-gold);
    transition: width var(--transition-normal);
}

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

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

/* ===== MAIN CONTENT ===== */
main {
    min-height: calc(100vh - 400px); /* Adjust based on header/footer */
}

.section {
    padding: var(--space-xl) 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* ===== CARDS & UI ELEMENTS ===== */
.card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(29, 77, 58, 0.1);
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-image: url('/assets/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 0 4rem;
    color: var(--primary-dark);
    overflow: hidden;
    margin-top: -80px; /* Offset for navbar height to push background to top */
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0.85) 30%, rgba(255,255,255,0) 70%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    padding-top: 80px;
    padding-bottom: 120px;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--primary-dark);
    margin-bottom: 2.5rem;
    font-family: var(--font-body);
    font-weight: 500;
}

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


/* ===== FOOTER ===== */
.footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: var(--space-xl) 2rem 1rem;
}

.footer h2, .footer h3, .footer .brand-text h2 {
    color: var(--white);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2rem;
    margin-bottom: var(--space-xl);
}

.footer-brand .brand-text p {
    color: rgba(255,255,255,0.7);
}

.footer-mission {
    margin-top: 1rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.footer-links h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    display: block;
    color: rgba(255,255,255,0.8);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent-gold);
    padding-left: 5px;
}

.footer-newsletter p {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    border: none;
    outline: none;
}

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

.social-links a {
}

/* --- ADMIN PORTAL & DASHBOARD --- */
.admin-layout {
    display: flex;
    min-height: 80vh;
    background: #f4f6f8;
    position: relative;
    overflow: hidden;
}

.admin-layout::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(16,79,61,0.05) 0%, rgba(212,175,55,0.02) 50%, transparent 100%);
    animation: rotateBg 30s linear infinite;
    z-index: 0;
}

@keyframes rotateBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.admin-sidebar {
    width: 250px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1;
}

.admin-tab {
    padding: 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    text-align: left;
}

.admin-tab:hover, .admin-tab.active {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(16,79,61,0.2);
}

.admin-content {
    flex: 1;
    padding: 2rem;
    z-index: 1;
    overflow-y: auto;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.tab-pane.active {
    display: block;
}

.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-box {
    background: linear-gradient(135deg, var(--primary-dark), #1a7458);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: 0 10px 20px rgba(16,79,61,0.3);
}

.stat-box h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent-gold);
}

/* --- TASKS --- */
.task-item {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--accent-gold);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.task-item.completed {
    border-left-color: var(--accent-green);
    opacity: 0.6;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.social-links a:hover {
    color: var(--accent-gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* ===== INTERACTIVE ENHANCEMENTS ===== */
.animated-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 15% 50%, rgba(212,175,55,0.08), transparent 25%),
                radial-gradient(circle at 85% 30%, rgba(16,79,61,0.08), transparent 25%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Floating Elements */
.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: floatAnim 6s ease-in-out infinite;
    z-index: 10;
}

.floating-card.delay-1 { animation-delay: 2s; }
.floating-card.delay-2 { animation-delay: 4s; }

@keyframes floatAnim {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* Enhanced Buttons */
.btn:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* ===== ABOUT PAGE ENHANCEMENTS ===== */
.about-hero {
    position: relative;
    padding: 8rem 2rem 6rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(16,79,61,0.85), rgba(16,79,61,0.95)), url('/assets/about_outdoor_reading_1783152130531.png') center/cover;
    color: white;
    overflow: hidden;
    margin-bottom: 4rem;
}

.about-hero-title {
    font-size: 3.5rem;
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
    color: var(--accent-gold);
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 6rem;
}

.about-image {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.about-image:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 50px rgba(0,0,0,0.2);
}

.guideline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.guideline-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-top: 4px solid var(--accent-gold);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.guideline-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(212,175,55,0.05), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.guideline-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.guideline-card:hover::before {
    opacity: 1;
}

.founder-highlight {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    background: rgba(212,175,55,0.15);
    border-radius: 100px;
    color: var(--primary-dark);
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(212,175,55,0.3);
}

.founder-highlight:hover {
    background: var(--accent-gold);
    color: white;
    box-shadow: 0 5px 15px rgba(212,175,55,0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        text-align: center;
        gap: 0.5rem;
    }
    .nav-links.show {
        display: flex;
    }
    .mobile-menu-btn {
        display: block;
    }
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.4);
        padding: 1rem;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    .admin-sidebar div:first-child {
        width: 100%;
    }
    .admin-tab {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    .admin-content {
        padding: 1rem;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
}

/* ===== CIRCULAR REVEAL ===== */
.cr-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: #e6e6e6;
    box-shadow: 16px 16px 32px #bebebe, -16px -16px 32px #ffffff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 5s ease-in-out infinite;
    transition: all 0.5s ease-out;
    margin: 0 auto;
}
.cr-wrapper:hover {
    box-shadow: 20px 20px 40px #bebebe, -20px -20px 40px #ffffff;
    transform: scale(0.98);
}
.cr-wrapper::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: #e6e6e6;
    box-shadow: inset 6px 6px 12px #d1d1d1, inset -6px -6px 12px #ffffff;
    z-index: 1;
}
.cr-center-content {
    position: relative;
    z-index: 10;
    padding: 1.5rem;
    border-radius: 1.5rem;
    background: #e6e6e6;
    box-shadow: inset 3px 3px 6px #d1d1d1, inset -3px -3px 6px #ffffff;
    text-align: center;
    transition: opacity 0.3s ease;
}
.cr-wrapper:hover .cr-center-content {
    opacity: 0;
}
.cr-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
    filter: brightness(0.85);
}
.cr-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    animation: spin 30s linear infinite;
}
.circular-text {
    font-size: 14px;
    letter-spacing: 0.25em;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}
.circular-text textPath {
    fill: url(#textGradient);
    transition: fill 0.3s ease;
}
.circular-text:hover textPath {
    fill: var(--accent-gold);
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ===== HANDWRITTEN TEXT COMPONENT (Kokonut UI) ===== */
@keyframes draw-line {
    from {
        stroke-dashoffset: 4000;
    }
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hw-container {
    position: relative;
    width: 100%;
    max-width: 56rem;
    margin: 0 auto;
    padding: 6rem 0;
}

.hw-svg-wrapper {
    position: absolute;
    inset: 0;
}

.hw-svg {
    width: 100%;
    height: 100%;
}

.hw-path {
    fill: none;
    stroke-width: 14;
    stroke: url(#goldGradient);
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.6; 
    filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.4));
    stroke-dasharray: 4000;
    stroke-dashoffset: 4000;
    animation: draw-line 3.5s cubic-bezier(0.43, 0.13, 0.23, 0.96) forwards;
}

.hw-content {
    position: relative;
    text-align: center;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.hw-title {
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--primary-dark);
    letter-spacing: -0.02em;
    font-weight: 800;
    text-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fade-in-up 1s ease forwards;
    animation-delay: 0.5s;
}

.hw-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--text-dark);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.85);
    padding: 0.75rem 2rem;
    border-radius: 100px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 1);
    margin-top: 1rem;
    opacity: 0;
    animation: fade-in-up 1s ease forwards;
    animation-delay: 1.2s;
}

/* ===== AESTHETIC POLISH & MICRO-ANIMATIONS ===== */

/* 1. Button Enhancements */
.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}
.btn-secondary:hover {
    box-shadow: 0 8px 25px rgba(16, 79, 61, 0.2);
}

/* 2. Card Hover Effects */
.card {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease !important;
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* 3. Navigation Polish */
.nav-item {
    position: relative;
}
.nav-item::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-gold);
    transition: width 0.3s ease;
}
.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}
.logo img {
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.logo:hover img {
    transform: scale(1.1) rotate(5deg);
}

/* 4. Modal Animations */
@keyframes modalBackdropFade {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes modalContentScale {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal {
    animation: modalBackdropFade 0.3s ease forwards;
    z-index: 10000 !important;
}
.modal > div {
    animation: modalContentScale 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

/* 5. Home Hero Ken Burns */
@keyframes kenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}
.hero::before {
    animation: kenBurns 20s ease-out forwards;
}

/* 6. Chat Online Pulse */
@keyframes statusPulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.chat-status-dot {
    animation: statusPulse 2s infinite;
}

/* Ensure smooth page transitions in JS router */
#app > section, #app > div:not(.modal) {
    animation: modalBackdropFade 0.4s ease forwards;
}

/* ===== LITERARY LIBRARY ===== */

/* Filter Tabs */
.filter-tab {
    padding: 0.5rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 100px;
    transition: all 0.3s ease;
}
.filter-tab:hover {
    background: rgba(0,0,0,0.04);
    color: var(--text-dark);
}
.filter-tab.active {
    background: var(--primary-dark);
    color: var(--white);
}

/* Genre & Tag Pills */
.genre-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--accent-gold), #e8b830);
    color: var(--white);
}
.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: lowercase;
    background: var(--surface-light);
    color: var(--text-muted);
    border: 1px solid rgba(0,0,0,0.06);
}

/* Writer Card enhancements */
.writer-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease !important;
}
.writer-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 35px rgba(0,0,0,0.08);
}

/* Featured Card */
.featured-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid rgba(212, 175, 55, 0.15);
}
.featured-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 35px rgba(212, 175, 55, 0.12);
}

/* ===== COMMUNITY CODE TIMELINE ===== */
.cc-timeline {
    position: relative;
    max-width: 850px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* The center gold line */
.cc-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, transparent, var(--accent-gold) 10%, var(--accent-gold) 90%, transparent);
    transform: translateX(-50%);
}

.cc-timeline-item {
    position: relative;
    width: 50%;
    padding: 0 3rem;
    margin-bottom: 3rem;
}
.cc-timeline-item:last-child {
    margin-bottom: 0;
}

/* Left-aligned items */
.cc-left {
    left: 0;
    text-align: right;
}

/* Right-aligned items */
.cc-right {
    left: 50%;
    text-align: left;
}

/* The gold dot on the center line */
.cc-timeline-dot {
    position: absolute;
    top: 0.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-gold), #e8b830);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 5px rgba(212, 175, 55, 0.15), 0 4px 15px rgba(212, 175, 55, 0.3);
    z-index: 2;
}
.cc-left .cc-timeline-dot {
    right: -22px;
}
.cc-right .cc-timeline-dot {
    left: -22px;
}

/* The content card */
.cc-timeline-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.cc-timeline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .cc-timeline::before {
        left: 22px;
    }
    .cc-timeline-item {
        width: 100%;
        padding: 0 0 0 4rem;
        text-align: left;
    }
    .cc-left, .cc-right {
        left: 0;
        text-align: left;
    }
    .cc-left .cc-timeline-dot,
    .cc-right .cc-timeline-dot {
        left: 0;
        right: auto;
    }
}

/* ===== FAQ ACCORDION ===== */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(212, 175, 55, 0.3);
}

.faq-header {
    width: 100%;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    outline: none;
}

.faq-header h3 {
    margin-bottom: 0;
    font-size: 1.1rem;
    color: var(--primary-dark);
    font-family: var(--font-body);
    font-weight: 600;
}

.faq-icon {
    transition: transform var(--transition-normal);
    color: var(--accent-gold);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0 1.5rem;
}

.faq-item.active .faq-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.faq-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== FOUNDER SPOTLIGHT ===== */
.founder-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
    color: var(--white);
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
}

.founder-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(218, 160, 23, 0.1), transparent 50%);
    pointer-events: none;
}

.founder-card {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 3rem;
    align-items: center;
}

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

/* ===== MOBILE BOTTOM NAVIGATION BAR & RESPONSIVE APP-LIKE UI ===== */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    /* Hide top join button only, keeping hamburger button */
    #nav-join-btn {
        display: none !important;
    }
    
    .mobile-menu-btn {
        display: block !important;
        color: var(--primary-dark);
    }
    
    .nav-links {
        /* Reset any force-hidden desktop styles, letting active transitions control display */
        z-index: 1100;
    }
    
    /* Keep space-between branding and hamburger menu on mobile */
    .navbar {
        padding: 0.75rem 1.5rem;
        background-color: rgba(255, 255, 255, 0.95) !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }
    
    .nav-container {
        justify-content: space-between !important;
    }

    /* Fixed bottom navigation bar with forest green glassmorphic design */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 65px;
        background: rgba(15, 46, 31, 0.96); /* matching --primary-dark */
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid rgba(218, 160, 23, 0.25); /* matching --accent-gold */
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
        z-index: 9999;
        justify-content: space-around;
        align-items: center;
        padding: 0 0.25rem;
    }

    /* Individual navigation tab */
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: rgba(255, 255, 255, 0.6);
        text-decoration: none;
        font-family: var(--font-body);
        font-size: 0.72rem;
        font-weight: 500;
        transition: color var(--transition-fast), transform var(--transition-fast);
        flex: 1;
        height: 100%;
        gap: 2px;
    }

    .mobile-nav-item span.material-symbols-outlined {
        font-size: 1.45rem;
        transition: transform var(--transition-fast);
    }

    /* Active state styling */
    .mobile-nav-item.active {
        color: var(--accent-gold);
    }
    
    .mobile-nav-item.active span.material-symbols-outlined {
        transform: translateY(-2px);
    }

    /* Push main view content upward to prevent bottom nav overlay */
    #app {
        padding-bottom: 80px;
    }
    
    /* mobile hero enhancements */
    .hero-section {
        padding: 6rem 1.25rem 4rem 1.25rem !important;
        text-align: center;
        min-height: auto !important;
    }
    
    .hero-title {
        font-size: 2.6rem !important;
        line-height: 1.2 !important;
    }
    
    .hero-subtitle {
        font-size: 0.95rem !important;
        margin-bottom: 2.5rem !important;
        line-height: 1.6 !important;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        width: 100%;
    }
    
    .hero-buttons a {
        width: 100%;
        justify-content: center;
    }

    /* Floating support button adjusted upwards to avoid overlapping bottom navigation */
    #ai-chat-widget {
        bottom: 80px !important;
        right: 16px !important;
    }
    
    #ai-chat-window {
        width: calc(100vw - 32px) !important;
        max-width: 360px !important;
        right: 0 !important;
        bottom: 56px !important;
    }
}

/* --- Advanced Premium AI Chat Widget Styles --- */

/* Sidebar open state */
#ai-chat-window.sidebar-open #ai-chat-sidebar {
    width: 260px !important;
    opacity: 1 !important;
    border-right-width: 1px !important;
}

#ai-chat-window.sidebar-open #ai-toggle-history {
    transform: rotate(180deg);
}

/* History list items */
.chat-history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s;
    margin-bottom: 4px;
    position: relative;
}
.chat-history-item:hover {
    background-color: #e5e7eb;
}
.chat-history-item.active {
    background-color: #e5e7eb;
}

/* Tools popover styling */
.tools-popover {
    border-color: #e5e7eb;
}
.tool-item-btn:hover {
    background-color: #f3f4f6 !important;
}
.tool-item-btn.active {
    background-color: #e5e7eb !important;
}

/* Active tool pill styling */
.tool-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    color: #4b5563;
    font-weight: 500;
}
.tool-pill button {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    padding: 0;
}
.tool-pill button:hover {
    color: #ef4444;
}

/* Call Overlay Pulsing Rings & Animation */
@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.call-pulse-ring {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(26, 77, 46, 0.2); /* var(--primary-dark) matching */
    animation: pulse 2s infinite;
    z-index: 1;
}

.call-control-btn:hover {
    background-color: #f3f4f6 !important;
    border-color: #9ca3af !important;
}
.call-control-btn.active {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
}

/* Keyframes for animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* AI Message Markdown/Code/Thinking formatting */
.thinking-accordion {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin: 6px 0;
    overflow: hidden;
    background: #fafafa;
}
.thinking-accordion-header {
    background: #f3f4f6;
    padding: 8px 12px;
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.thinking-accordion-content {
    padding: 12px;
    font-size: 11px;
    color: #4b5563;
    line-height: 1.6;
    border-top: 1px solid #e5e7eb;
    white-space: pre-line;
    font-style: italic;
    background: #fdfdfd;
}

.ai-message-text img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}


