:root {
    /* Color Palette */
    --primary-color: #003829;    /* Deep Oxford Green */
    --primary-light: #004d38;
    --secondary-color: #c5a059;  /* Antique Gold */
    --secondary-light: #d4b572;
    --accent-color: #cb2027;     /* Heritage Crimson */
    --bg-color: #f4f6f5;         /* Alabaster White Refined */
    --surface-color: #ffffff;    /* Solid White */
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --border-color: #e0e0dc;
    --badge-bg: rgba(0, 56, 41, 0.04); /* Light green for icon backgrounds */
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.03);
    --shadow-md: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
    --shadow-glow: 0 0 20px rgba(197, 160, 89, 0.3);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
}

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

a:hover {
    color: var(--primary-color);
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* Header & Nav Refinement */
header {
    background: var(--surface-color);
    color: var(--primary-color);
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left, .header-right {
    flex: 1;
}

.header-center {
    flex: 0;
    text-align: center;
}

.header-right {
    text-align: right;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s;
}

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

.search-trigger {
    cursor: pointer;
    color: var(--primary-color);
    transition: color 0.2s;
}
.search-trigger:hover {
    color: var(--secondary-color);
}

/* Main Content */
main {
    padding: 3rem 0;
    min-height: 80vh;
}

/* High-Impact Hero */
.hero-impact {
    padding: 10rem 2rem 8rem;
    background: var(--primary-color);
    background-image: 
        radial-gradient(circle at 100% 0%, rgba(197, 160, 89, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(0, 77, 56, 0.8) 0%, transparent 40%),
        linear-gradient(135deg, var(--primary-color) 0%, #00120d 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, #004533 0%, var(--primary-color) 100%);
    color: white;
    padding: 8rem 0 6rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

/* Floating Elements Background */
.hero-floating-elements {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-icon {
    position: absolute;
    color: rgba(197, 160, 89, 0.15); /* Very subtle gold */
    font-size: 3rem;
    animation: float 20s infinite ease-in-out alternate;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(20px, -30px) rotate(15deg); }
    100% { transform: translate(-20px, 30px) rotate(-15deg); }
}

@keyframes drift {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-30px, 20px) rotate(-10deg); }
    100% { transform: translate(30px, -20px) rotate(10deg); }
}

.icon-1 { top: 15%; left: 10%; font-size: 4rem; animation-duration: 25s; animation-name: float; }
.icon-2 { top: 60%; left: 5%; font-size: 3rem; animation-duration: 30s; animation-name: drift; animation-delay: -5s; }
.icon-3 { top: 25%; left: 25%; font-size: 2.5rem; animation-duration: 22s; animation-name: float; animation-delay: -10s; }
.icon-4 { top: 75%; left: 30%; font-size: 3.5rem; animation-duration: 28s; animation-name: drift; animation-delay: -2s; }
.icon-5 { top: 10%; right: 25%; font-size: 5rem; animation-duration: 35s; animation-name: float; animation-delay: -15s; }
.icon-6 { top: 40%; right: 10%; font-size: 3.5rem; animation-duration: 24s; animation-name: drift; animation-delay: -8s; }
.icon-7 { top: 80%; right: 20%; font-size: 2.5rem; animation-duration: 20s; animation-name: float; animation-delay: -12s; }
.icon-8 { top: 50%; left: 15%; font-size: 4.5rem; animation-duration: 32s; animation-name: drift; animation-delay: -18s; }
.icon-9 { top: 20%; right: 5%; font-size: 3rem; animation-duration: 26s; animation-name: float; animation-delay: -4s; }
.icon-10 { top: 65%; right: 35%; font-size: 4rem; animation-duration: 29s; animation-name: drift; animation-delay: -7s; }
.icon-11 { top: 85%; left: 45%; font-size: 3rem; animation-duration: 33s; animation-name: float; animation-delay: -20s; }
.icon-12 { top: 5%; right: 45%; font-size: 2.8rem; animation-duration: 27s; animation-name: drift; animation-delay: -14s; }
.icon-13 { top: 35%; left: 38%; font-size: 4.2rem; animation-duration: 38s; animation-name: float; animation-delay: -6s; }
.icon-14 { top: 70%; right: 8%; font-size: 2.2rem; animation-duration: 21s; animation-name: float; animation-delay: -9s; }
.icon-15 { top: 18%; left: 42%; font-size: 3.6rem; animation-duration: 31s; animation-name: drift; animation-delay: -11s; }
.icon-16 { top: 55%; right: 25%; font-size: 4.8rem; animation-duration: 34s; animation-name: float; animation-delay: -3s; }
.icon-17 { top: 88%; left: 12%; font-size: 2.6rem; animation-duration: 23s; animation-name: drift; animation-delay: -17s; }
.icon-18 { top: 12%; right: 12%; font-size: 3.2rem; animation-duration: 28s; animation-name: float; animation-delay: -1s; }
.icon-19 { top: 45%; left: 8%; font-size: 3.8rem; animation-duration: 36s; animation-name: drift; animation-delay: -13s; }
.icon-20 { top: 30%; right: 38%; font-size: 2.4rem; animation-duration: 25s; animation-name: float; animation-delay: -19s; }

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-badge {
    display: inline-block;
    background: rgba(197, 160, 89, 0.15);
    color: var(--secondary-color);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 2rem;
    border: 1px solid rgba(197, 160, 89, 0.3);
}

.hero-impact h1 {
    color: white;
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-impact h1 span {
    color: var(--secondary-color);
    background: linear-gradient(to right, #c5a059, #e8cd94);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-impact p {
    font-size: 1.25rem;
    max-width: 650px;
    margin: 0 auto 3rem;
    opacity: 0.9;
    font-weight: 300;
}

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

.btn-large {
    padding: 1.2rem 3rem;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.btn-large:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
}

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

.btn-gold {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-gold:hover {
    background: #e8cd94;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.4);
}

/* Stats Ribbon */
.stats-ribbon {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

.ribbon-flex {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.stat-item {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stat-item strong {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-right: 5px;
}

/* Daily Nexus Boost */
.daily-nexus {
    margin-top: 5rem;
    margin-bottom: 5rem;
}

.section-title {
    margin-bottom: 3rem;
    text-align: center;
}

.section-title h2 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.interactive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

/* Common Card Styling */
.card-base {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Flashcard Specific - Bulletproof 3D Flip */
.card-container {
    perspective: 1200px;
    height: 310px;
    width: 100%;
}

.flashcard {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flashcard.flipped { transform: rotateY(180deg); }

.card-front, .card-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    padding: 2.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    transform-style: preserve-3d;
}

.card-front {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    z-index: 2;
    transform: translateZ(1px);
}

.card-back {
    background: var(--primary-color);
    color: white;
    transform: rotateY(180deg) translateZ(1px);
    border: 1px solid var(--primary-color);
    text-align: center;
}

.card-back p { color: white; margin-bottom: 1rem; }
.card-back strong { color: var(--secondary-color); }

.card-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary-color);
    letter-spacing: 1.5px;
    margin-bottom: 1.5rem;
}

.word {
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
    text-align: center;
    line-height: 1.25;
}

/* Bulletproof Pinned Hint for Flashcards */
.card-front small, .card-back small {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    opacity: 0.8;
}
.card-back small {
    color: rgba(255, 255, 255, 0.6);
}
.pos { font-style: italic; color: var(--text-secondary); margin-bottom: 1rem; }

/* Quick Study Tools */
.quick-tools-card {
    padding: 2.5rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s;
}

.tool-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.tool-btn .material-icons {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

/* Fact Card */
.fact-card { padding: 3rem 2rem; }
.fact-card h3 { margin: 1rem 0; font-size: 1.5rem; }
.fact-details {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Subject Grid */
.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.subject-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    text-align: left;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
}

.subject-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

.subject-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    background: var(--badge-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 1.5rem 0 0;
    color: var(--secondary-color);
    transition: background 0.3s;
}

.subject-card:hover .subject-icon {
    background: rgba(197, 160, 89, 0.1);
}

.subject-icon .material-icons {
    font-size: 2rem;
}

.subject-content {
    flex: 1;
}

.subject-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.subject-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.subject-arrow {
    margin-left: 1rem;
    color: var(--border-color);
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
}

.subject-card:hover .subject-arrow {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.8rem 1.6rem;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

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

/* Smart Search */
.search-container {
    max-width: 600px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 2.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    z-index: 10;
    pointer-events: none;
}

.search-container input {
    width: 100%;
    padding: 1.25rem 1.5rem 1.25rem 3.5rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    outline: none;
    transition: all 0.3s;
    font-family: inherit;
    border: 2px solid var(--border-color);
}

.search-container input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-md);
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 1rem;
    right: 1rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    margin-top: 0.5rem;
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    text-align: left;
}

.search-item {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: var(--bg-color);
}

.search-item strong {
    display: block;
    color: var(--primary-color);
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
}

.search-item small {
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.search-item-empty {
    padding: 1.5rem;
    color: var(--text-secondary);
    text-align: center;
    font-style: italic;
}

.search-container input {
    width: 100%;
    padding: 1.25rem 1.5rem 1.25rem 3.5rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    font-family: var(--font-body);
    background: var(--surface-color);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-container input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-md);
}

/* About/Mission Section */
.about-nexus {
    margin-top: 6rem;
    padding-bottom: 2rem;
}

.about-card {
    padding: 4rem;
    text-align: center;
}

.about-card h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-card p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 3rem;
    color: var(--text-secondary);
}

.mission-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
}

.m-stat .material-icons {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.m-stat p {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary-color);
    margin: 0;
}

/* Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface-color);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    border-top: 1px solid var(--border-color);
}

.nav-item {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    width: 33.33%;
}

.nav-icon { font-size: 1.25rem; line-height: 1; margin-bottom: 4px; }
.nav-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; }

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 3rem 0;
    border-top: 4px solid var(--secondary-color);
    margin-top: 4rem;
}

/* Global utility for hiding mobile elements on desktop */
.show-mobile-only {
    display: none !important;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
    .show-mobile-only { display: inline-flex !important; }
    main { padding-bottom: 2rem; }
    footer { padding-bottom: 3rem; }
    
    .hero-impact { padding: 5rem 1.25rem; }
    .hero-impact h1 { font-size: 2.5rem; }
    .hero-impact p { font-size: 1rem; line-height: 1.5; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .btn { width: 100%; display: block; text-align: center; }

    /* Space out the Daily Nexus section from the hero section on mobile */
    .daily-nexus {
        margin-top: 4.5rem;
        margin-bottom: 4rem;
    }

    /* Keep search bar beautiful, un-overlapped and perfectly sized on mobile */
    .search-container {
        padding: 0 0.5rem;
    }
    .search-container input {
        padding: 1.1rem 1.25rem 1.1rem 3rem !important;
        font-size: 0.95rem !important;
    }
    .search-icon {
        left: 1.6rem !important;
        font-size: 1.35rem !important;
    }

    /* Scaling down and hiding background hero icons to prevent overlap on small viewports */
    .floating-icon {
        font-size: 2rem !important;
    }
    .icon-3, .icon-4, .icon-5, .icon-10, .icon-11, .icon-12, .icon-13, .icon-15, .icon-16, .icon-20 {
        display: none !important;
    }

    .ribbon-flex {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    
    .interactive-grid, .subject-grid { grid-template-columns: 1fr; }
    
    .about-card { padding: 3rem 1.5rem; }
    .mission-stats { flex-direction: column; gap: 2rem; }
}

@media (min-width: 769px) {
    .bottom-nav { display: none; }
}

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

.animate-fade-up {
    opacity: 0;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* Quick Links Styling for Subject Indexes */
.gk-quicklinks {
    margin-top: 4rem;
    margin-bottom: 3rem;
}

.gk-quicklinks h2 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.gk-ql-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.gk-ql-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 1.5rem;
    align-items: center;
    background: white;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.gk-ql-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

.gk-ql-card span:first-child {
    grid-row: 1 / 3;
    grid-column: 1;
    font-size: 2.5rem;
    background: rgba(0, 56, 41, 0.05);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.gk-ql-card strong {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.gk-ql-card span:last-child {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Data Viewer Global Styles */
.bcdv-card, .dv-card {
    padding: 1.8rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.bcdv-card:hover, .dv-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.bcdv-title, .dv-title {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--border-color);
    line-height: 1.4;
    font-weight: 700;
}

.bcdv-row, .dv-row {
    display: block;
    margin-bottom: 0.5rem;
}

.bcdv-row:last-child, .dv-row:last-child {
    margin-bottom: 0;
}

.bcdv-key, .dv-key {
    display: inline-block;
    background: rgba(197, 160, 89, 0.15);
    color: var(--secondary-color);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 0.75rem;
    vertical-align: text-bottom;
}

.bcdv-val, .dv-val {
    display: inline;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.6;
}


/* Mobile Slide-out Menu Overlay Drawer Styles */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-drawer {
    position: absolute;
    top: 0;
    left: -280px; /* Start offscreen left */
    width: 280px;
    height: 100%;
    background: var(--surface-color);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-overlay.active .mobile-menu-drawer {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-header .logo {
    font-size: 1.5rem;
}

.close-menu {
    cursor: pointer;
    color: var(--primary-color);
    font-size: 1.75rem;
    transition: color 0.2s;
}

.close-menu:hover {
    color: var(--secondary-color);
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mobile-nav-links li a {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-nav-links li a .material-icons {
    color: var(--secondary-color);
    font-size: 1.4rem;
}

.mobile-nav-links li a:hover {
    background: rgba(197, 160, 89, 0.08);
    color: var(--secondary-color);
}

.mobile-menu-footer {
    margin-top: auto;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

/* Encyclopedia Main Subject Library Styles */
.encyclopedia-hero {
    background: radial-gradient(circle at center, #004533 0%, var(--primary-color) 100%);
    color: white;
    padding: 5rem 1.5rem;
    text-align: center;
    border-bottom: 4px solid var(--secondary-color);
    position: relative;
    overflow: hidden;
    margin-bottom: 4rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.encyclopedia-hero h1 {
    font-size: 3rem;
    font-family: var(--font-heading);
    color: white;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.encyclopedia-hero p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.enc-subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

@media (max-width: 768px) {
    .enc-subject-grid {
        grid-template-columns: 1fr;
    }
    .encyclopedia-hero {
        padding: 4rem 1.25rem;
        margin-bottom: 2.5rem;
    }
    .encyclopedia-hero h1 {
        font-size: 2.25rem;
    }
    .encyclopedia-hero p {
        font-size: 0.95rem;
    }
}

.enc-subject-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 380px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.enc-subject-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color);
}

.enc-card-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.enc-icon-container {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(197, 160, 89, 0.1);
    border: 1px solid rgba(197, 160, 89, 0.3);
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.enc-subject-card:hover .enc-icon-container {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: scale(1.05);
}

.enc-icon-container .material-icons {
    font-size: 1.85rem;
}

.enc-header-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.enc-category-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary-color);
    background: rgba(197, 160, 89, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    align-self: flex-start;
}

.enc-header-text h3 {
    font-size: 1.35rem;
    color: var(--primary-color);
    margin: 0;
    font-weight: 750;
    font-family: var(--font-heading);
}

.enc-description {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.enc-focus-area {
    margin-bottom: 1.75rem;
}

.focus-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.focus-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.focus-tag {
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(0, 56, 41, 0.05);
    color: var(--primary-color);
    border: 1px solid rgba(0, 56, 41, 0.1);
    padding: 4px 10px;
    border-radius: 30px;
    transition: all 0.2s ease;
}

.enc-subject-card:hover .focus-tag {
    background: rgba(197, 160, 89, 0.05);
    border-color: rgba(197, 160, 89, 0.2);
}

.enc-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 1px solid var(--primary-color);
}

.enc-action-btn:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.enc-action-btn .material-icons {
    font-size: 1.15rem;
    transition: transform 0.2s ease;
}

.enc-action-btn:hover .material-icons {
    transform: translateX(4px);
}
