/* ==========================================================================
   Kelava EdTech Platform - Production Stylesheet (Pure CSS)
   Theme: 100% Pure Crisp White & Emerald/Mint (Light) | Deep Twilight Slate (Dark)
   Font: Vazirmatn & Plus Jakarta Sans (RTL Optimized)
   Zero Width Blowouts - Fully Constrained Layout (Mobile, Tablet, Desktop)
   ========================================================================== */

@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

/* ==========================================
   1. Design System Tokens & Color Variables
   ========================================== */
:root {
    /* Brand Palettes */
    --primary-teal: #0d6e6e;
    --primary-teal-hover: #095050;
    --primary-teal-subtle: #f0fdf9;
    --primary-teal-border: #a7f3d0;
    --accent-emerald: #059669;
    --accent-mint: #10b981;
    --accent-mint-light: #34d399;
    --accent-cyan: #0891b2;
    /* Day / Light Mode: 100% PURE CRISP WHITE for ALL Sections (No Gray / No Slate) */
    --bg-body: #ffffff;
    --bg-surface: #ffffff;
    --bg-surface-alt: #ffffff;
    --bg-surface-elevated: #ffffff;
    --bg-subtle-mint: #ecfdf5;
    --bg-banner: #ffffff;
    --text-heading: #064e3b;
    --text-body: #0f172a;
    --text-muted: #1e3a34;
    --text-subtle: #475569;
    --border-color: #e2e8f0;
    --border-color-subtle: #f1f5f9;
    --border-input: #cbd5e1;
    --border-accent: #a7f3d0;
    --navbar-bg-scrolled: rgba(255, 255, 255, 0.98);
    --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
    --card-shadow-hover: 0 20px 35px -4px rgba(13, 110, 110, 0.12), 0 8px 12px -2px rgba(5, 150, 105, 0.06);
    --footer-bg: #061515;
}

body.dark-mode {
    /* Dark Theme (Twilight Slate / Emerald Glow) */
    --bg-body: #090d16;
    --bg-surface: #0f172a;
    --bg-surface-alt: #131c31;
    --bg-surface-elevated: #1e293b;
    --bg-subtle-mint: rgba(20, 184, 166, 0.12);
    --bg-banner: #0f172a;
    --text-heading: #f8fafc;
    --text-body: #e2e8f0;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    --border-color: #1e293b;
    --border-color-subtle: #1e293b;
    --border-input: #334155;
    --border-accent: #14b8a6;
    --navbar-bg-scrolled: rgba(15, 23, 42, 0.96);
    --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
    --card-shadow-hover: 0 20px 35px -4px rgba(0, 0, 0, 0.6), 0 0 25px -4px rgba(20, 184, 166, 0.15);
    --footer-bg: #05070d;
}

/* ==========================================
   2. Global Reset & Width-Constrained Base
   ========================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    direction: rtl;
    text-align: right;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    background-color: var(--bg-body);
    color: var(--text-body);
    font-family: 'Vazirmatn', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    line-height: 1.65;
    transition: background-color 0.3s ease, color 0.3s ease;
}

img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    max-width: 100%;
    height: auto;
}

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

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ==========================================
   Custom Pure Black Scrollbar (In All Modes: Day & Night)
   ========================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #000000 !important;
    border-left: 1px solid #18181b;
}

body.dark-mode ::-webkit-scrollbar-track {
    background: #000000 !important;
    border-left: 1px solid #18181b;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #10b981 0%, #0d6e6e 100%);
    border-radius: 9999px;
    border: 2px solid #000000;
}

    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(180deg, #34d399 0%, #059669 100%);
    }

/* Firefox Scrollbar Support */
* {
    scrollbar-width: thin;
    scrollbar-color: #059669 #000000;
}

/* ==========================================
   3. Layout Grid & Container (Strict Bounds)
   ========================================== */
.kelava-container {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .kelava-container {
        padding-left: 1.75rem;
        padding-right: 1.75rem;
    }
}

@media (min-width: 1024px) {
    .kelava-container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Section Wrapper: PURE WHITE in Day Mode */
.kelava-section {
    width: 100%;
    max-width: 100%;
    padding-top: 5rem;
    padding-bottom: 5rem;
    position: relative;
    background-color: var(--bg-surface);
    box-sizing: border-box;
    overflow: hidden;
}

@media (min-width: 768px) {
    .kelava-section {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

/* Clean White Section Divider with subtle border line */
.kelava-section-alt {
    background-color: var(--bg-surface-alt);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

/* ==========================================
   4. Fixed Main Header & Underline Navbar
   ========================================== */
.kelava-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    z-index: 1030;
    padding: 1.15rem 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

    .kelava-navbar.scrolled {
        background-color: var(--navbar-bg-scrolled);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 0.75rem 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
        border-bottom: 1px solid var(--border-color);
    }

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.navbar-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.brand-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #ffffff;
    color: var(--primary-teal);
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease;
}

body.dark-mode .brand-icon-box {
    background: #1e293b;
    color: var(--accent-mint-light);
    border-color: #334155;
}

.navbar-brand-logo:hover .brand-icon-box {
    transform: scale(1.06);
}

.brand-name {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.kelava-navbar:not(.scrolled) .brand-name {
    color: #ffffff;
}

.kelava-navbar.scrolled .brand-name {
    color: var(--text-heading);
}

/* Nav Menu & Active Underline */
.nav-menu-wrapper {
    position: relative;
    display: none;
}

@media (min-width: 992px) {
    .nav-menu-wrapper {
        display: flex;
        align-items: center;
        gap: 1.25rem;
    }
}

@media (min-width: 1200px) {
    .nav-menu-wrapper {
        gap: 1.6rem;
    }
}

/* Mobile Hamburger Toggle Button */
.mobile-menu-toggle-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

@media (min-width: 992px) {
    .mobile-menu-toggle-btn {
        display: none !important;
    }
}

/* Navbar CTA Button Responsive Display */
.nav-cta-btn {
    display: none !important;
}

@media (min-width: 640px) {
    .nav-cta-btn {
        display: inline-flex !important;
    }
}

.nav-link-item {
    position: relative;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.5rem 0.5rem;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.kelava-navbar:not(.scrolled) .nav-link-item {
    color: rgba(255, 255, 255, 0.88);
}

    .kelava-navbar:not(.scrolled) .nav-link-item:hover,
    .kelava-navbar:not(.scrolled) .nav-link-item.active {
        color: #ffffff;
        font-weight: 700;
    }

.kelava-navbar.scrolled .nav-link-item {
    color: var(--text-body);
}

    .kelava-navbar.scrolled .nav-link-item:hover,
    .kelava-navbar.scrolled .nav-link-item.active {
        color: var(--primary-teal);
        font-weight: 700;
    }

body.dark-mode .kelava-navbar.scrolled .nav-link-item:hover,
body.dark-mode .kelava-navbar.scrolled .nav-link-item.active {
    color: var(--accent-mint-light);
}

.nav-underline-indicator {
    position: absolute;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #0d6e6e);
    border-radius: 9999px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    opacity: 0;
}

    .nav-underline-indicator.visible {
        opacity: 1;
    }

/* ==========================================
   5. Buttons, Badges & Interactive Controls
   ========================================== */
.btn-kelava-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #10b981 0%, #0d6e6e 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 20px -2px rgba(13, 110, 110, 0.3);
    transition: all 0.25s ease;
    white-space: nowrap;
}

    .btn-kelava-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 25px -2px rgba(13, 110, 110, 0.45);
        color: #ffffff;
    }

.btn-kelava-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

    .btn-kelava-outline:hover {
        background: rgba(255, 255, 255, 0.25);
        border-color: rgba(255, 255, 255, 0.6);
        color: #ffffff;
    }

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    background-color: var(--bg-subtle-mint);
    border: 1px solid var(--border-accent);
    color: var(--text-heading);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-body);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

body.dark-mode .theme-toggle-btn {
    background: #1e293b;
    border-color: #334155;
    color: #ffffff;
}

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

/* ==========================================
   6. Hero Section (Bounded & Responsive)
   ========================================== */
.kelava-home-slider{padding:1.25rem 0;background:var(--bg-surface,#fff)}.home-slider-track{display:flex;gap:1rem;overflow-x:auto;scroll-snap-type:x mandatory;padding:.25rem}.home-slider-item{display:block;min-width:min(100%,760px);scroll-snap-align:center;border-radius:1rem;overflow:hidden;box-shadow:0 10px 28px rgba(15,57,53,.12)}.home-slider-item img{width:100%;height:clamp(150px,25vw,260px);object-fit:cover;display:block}
.kelava-hero-section {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: linear-gradient(135deg, #093b3b 0%, #064e3b 45%, #022c22 100%);
    color: #ffffff;
    padding-top: 8.5rem;
    padding-bottom: 5.5rem;
    overflow: hidden;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .kelava-hero-section {
        padding-top: 10rem;
        padding-bottom: 7rem;
    }
}

.hero-glow-blob {
    position: absolute;
    border-radius: 9999px;
    filter: blur(80px);
    pointer-events: none;
    opacity: 0.35;
    max-width: 100%;
}

.hero-glow-1 {
    top: 5%;
    right: 0%;
    width: 380px;
    height: 380px;
    background: #34d399;
}

.hero-glow-2 {
    bottom: 5%;
    left: 0%;
    width: 420px;
    height: 420px;
    background: #0d6e6e;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 100%;
}

@media (min-width: 992px) {
    .hero-grid {
        grid-template-columns: 1.15fr 0.85fr;
        gap: 3.5rem;
    }
}

.hero-title {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.35;
    margin-bottom: 1.25rem;
    word-break: break-word;
}

@media (min-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (min-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
}

.hero-title-gradient {
    background: linear-gradient(90deg, #55efc4, #81ecec);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.hero-image-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
}

    .hero-image-card img {
        width: 100%;
        height: 320px;
        object-fit: cover;
        display: block;
    }

@media (min-width: 640px) {
    .hero-image-card img {
        height: 380px;
    }
}

/* Floating Stats Inside Boundaries with Subtle Float Keyframes */
.hero-floating-stat {
    position: absolute;
    padding: 0.85rem 1.1rem;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 3;
    max-width: 90%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .hero-floating-stat:hover {
        transform: translateY(-4px) scale(1.02);
        box-shadow: 0 18px 36px rgba(0, 0, 0, 0.25);
    }

body.dark-mode .hero-floating-stat {
    background: rgba(15, 23, 42, 0.94);
    color: #ffffff;
    border: 1px solid #334155;
}

.hero-stat-top {
    top: 10px;
    right: 10px;
    animation: kelava-float-slow 5s ease-in-out infinite alternate;
}

.hero-stat-bottom {
    bottom: 10px;
    left: 10px;
    animation: kelava-float-reverse 6s ease-in-out infinite alternate;
}

@media (min-width: 768px) {
    .hero-stat-top {
        top: -18px;
        right: -15px;
    }

    .hero-stat-bottom {
        bottom: -18px;
        left: -15px;
    }
}

/* Floating EdTech Icons in Hero Background (Math, Science, AI, Books) */
.hero-floating-icon {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #55efc4;
    font-size: 1.25rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 2;
    transition: all 0.3s ease;
}

.hero-float-icon-1 {
    top: 15%;
    left: 6%;
    animation: kelava-float-icon-1 7s ease-in-out infinite alternate;
}

.hero-float-icon-2 {
    bottom: 18%;
    right: 48%;
    color: #ffd166;
    animation: kelava-float-icon-2 8s ease-in-out infinite alternate;
}

.hero-float-icon-3 {
    top: 22%;
    right: 6%;
    color: #70d6ff;
    animation: kelava-float-icon-3 6.5s ease-in-out infinite alternate;
}

.hero-float-icon-4 {
    bottom: 12%;
    left: 45%;
    color: #a78bfa;
    animation: kelava-float-icon-4 9s ease-in-out infinite alternate;
}

@keyframes kelava-float-slow {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    100% {
        transform: translateY(-10px) rotate(1deg);
    }
}

@keyframes kelava-float-reverse {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    100% {
        transform: translateY(12px) rotate(-1deg);
    }
}

@keyframes kelava-float-icon-1 {
    0% {
        transform: translateY(0px) rotate(0deg) scale(1);
    }

    50% {
        transform: translateY(-16px) rotate(8deg) scale(1.05);
    }

    100% {
        transform: translateY(6px) rotate(-6deg) scale(0.95);
    }
}

@keyframes kelava-float-icon-2 {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(14px) rotate(-10deg);
    }

    100% {
        transform: translateY(-12px) rotate(6deg);
    }
}

@keyframes kelava-float-icon-3 {
    0% {
        transform: translateY(0px) scale(1);
    }

    50% {
        transform: translateY(-18px) rotate(-8deg) scale(1.08);
    }

    100% {
        transform: translateY(8px) rotate(4deg) scale(0.98);
    }
}

@keyframes kelava-float-icon-4 {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-14px) rotate(12deg);
    }

    100% {
        transform: translateY(10px) rotate(-8deg);
    }
}

/* ==========================================
   7. Section Headers & Grids (Responsive)
   ========================================== */
.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 3rem auto;
    width: 100%;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-heading);
    letter-spacing: -0.5px;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }
}

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

/* Grids with Zero-Overflow Guarantees */
.cards-grid-4 {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    width: 100%;
}

@media (min-width: 640px) {
    .cards-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .cards-grid-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.cards-grid-3 {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
    width: 100%;
}

@media (min-width: 768px) {
    .cards-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .cards-grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ==========================================
   8. White Cards & Components (Day Mode Pure White)
   ========================================== */
.kelava-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    width: 100%;
    min-width: 0;
}

    .kelava-card:hover {
        transform: translateY(-5px);
        border-color: var(--accent-mint);
        box-shadow: var(--card-shadow-hover);
    }

.card-top-gradient {
    height: 85px;
    background: linear-gradient(135deg, #0d6e6e 0%, #10b981 100%);
    position: relative;
    padding: 1rem 1.25rem;
    width: 100%;
}

.card-icon-floating {
    position: absolute;
    bottom: -20px;
    right: 1.25rem;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #ffffff;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-teal);
    font-size: 1.3rem;
}

body.dark-mode .card-icon-floating {
    background: #1e293b;
    border-color: #334155;
    color: var(--accent-mint-light);
}

.card-body {
    padding: 1.75rem 1.25rem 1.25rem 1.25rem;
    width: 100%;
    min-width: 0;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.card-text {
    font-size: 0.85rem;
    color: var(--text-body);
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.feature-list {
    list-style: none;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color-subtle);
    margin-bottom: 1.25rem;
}

    .feature-list li {
        font-size: 0.8rem;
        color: var(--text-muted);
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.45rem;
    }

        .feature-list li i {
            color: var(--accent-emerald);
            flex-shrink: 0;
        }

.card-footer-action {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color-subtle);
    background: #ffffff;
    width: 100%;
}

body.dark-mode .card-footer-action {
    background: var(--bg-surface-alt);
}

.card-btn {
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--primary-teal);
    font-weight: 700;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.dark-mode .card-btn {
    background: #1e293b;
    border-color: #334155;
    color: var(--accent-mint-light);
}

.card-btn:hover {
    background: var(--primary-teal);
    color: #ffffff;
    border-color: var(--primary-teal);
}

/* ==========================================
   9. Courses Filter & Course Cards
   ========================================== */
.filter-tabs-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    width: 100%;
}

.filter-tab-btn {
    padding: 0.55rem 1.15rem;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-body);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.dark-mode .filter-tab-btn {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

.filter-tab-btn:hover {
    border-color: var(--accent-emerald);
}

.filter-tab-btn.active {
    background: var(--primary-teal);
    color: #ffffff;
    border-color: var(--primary-teal);
    box-shadow: 0 4px 12px rgba(13, 110, 110, 0.25);
}

.course-card-img-wrap {
    position: relative;
    height: 190px;
    overflow: hidden;
    width: 100%;
}

    .course-card-img-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s ease;
    }

.kelava-card:hover .course-card-img-wrap img {
    transform: scale(1.05);
}

.course-badge-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary-teal);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.dark-mode .course-badge-overlay {
    background: rgba(15, 23, 42, 0.9);
    color: var(--accent-mint-light);
}

/* Faculty Avatar */
.faculty-avatar-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid var(--border-color);
    margin-bottom: 1rem;
    flex-shrink: 0;
}

    .faculty-avatar-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* ==========================================
   10. FAQ Accordion (Day Mode Pure White)
   ========================================== */
.kelava-faq-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 0.85rem;
    overflow: hidden;
    transition: all 0.2s ease;
    width: 100%;
}

body.dark-mode .kelava-faq-item {
    background: var(--bg-surface);
}

.faq-question-btn {
    width: 100%;
    padding: 1.15rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-heading);
    text-align: right;
}

.faq-icon-chevron {
    transition: transform 0.3s ease;
    color: var(--accent-emerald);
    flex-shrink: 0;
}

.kelava-faq-item.open .faq-icon-chevron {
    transform: rotate(180deg);
}

.faq-answer-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    border-top: 1px solid transparent;
}

body.dark-mode .faq-answer-content {
    background: var(--bg-surface-alt);
}

.kelava-faq-item.open .faq-answer-content {
    border-top-color: var(--border-color-subtle);
}

.faq-answer-inner {
    padding: 1.15rem 1.25rem;
    font-size: 0.88rem;
    color: var(--text-body);
    line-height: 1.7;
}

/* Form Inputs */
.kelava-input {
    width: 100%;
    padding: 0.8rem 1.15rem;
    border-radius: 12px;
    border: 1px solid var(--border-input);
    background: #ffffff;
    color: var(--text-body);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

body.dark-mode .kelava-input {
    background: #1e293b;
    border-color: #334155;
    color: #ffffff;
}

.kelava-input:focus {
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 3px rgba(13, 110, 110, 0.15);
}

/* ==========================================
   11. Mobile Drawer Navigation (Safe Offscreen)
   ========================================== */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1039;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

    .drawer-backdrop.open {
        opacity: 1;
        pointer-events: auto;
    }

.drawer-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 290px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    border-left: 1px solid var(--border-color);
    z-index: 1040;
    padding: 0;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}

body.dark-mode .drawer-nav {
    background: #0f172a;
}

.drawer-nav.open {
    transform: translateX(0);
}

.drawer-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding: 1.75rem 1.25rem 1rem;
}

.drawer-footer {
    flex: 0 0 auto;
    padding: 0.85rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border-color);
    background: inherit;
}

.drawer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

    .drawer-links a {
        text-decoration: none;
        color: var(--text-body);
        font-weight: 700;
        font-size: 0.92rem;
        padding: 0.6rem 0.75rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        border-radius: 10px;
        transition: all 0.2s ease;
    }

        .drawer-links a:hover {
            background: #f0fdf4;
            color: var(--primary-teal);
        }

body.dark-mode .drawer-links a:hover {
    background: #1e293b;
    color: var(--accent-mint-light);
}

/* ==========================================
   12. Loading Overlay & Toast
   ========================================== */
.kelava-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(9, 13, 22, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

    .kelava-loading-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

.loading-modal-box {
    position: relative;
    padding: 2rem 2rem;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 360px;
    width: 100%;
}

body.dark-mode .loading-modal-box {
    background: #0f172a;
}

.loading-spinner-logo {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, #0d6e6e 0%, #10b981 50%, #34d399 100%);
    color: #ffffff;
    font-size: 2rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    box-shadow: 0 10px 25px rgba(13, 110, 110, 0.35);
}

.loading-ring-dashed {
    position: absolute;
    inset: -6px;
    border-radius: 26px;
    border: 2px dashed #34d399;
    animation: kelava-spin 8s linear infinite;
    pointer-events: none;
}

@keyframes kelava-spin {
    100% {
        transform: rotate(360deg);
    }
}

.loading-progress-track {
    width: 200px;
    height: 5px;
    border-radius: 9999px;
    background: var(--border-color);
    overflow: hidden;
    margin-top: 1rem;
    margin-bottom: 0.75rem;
}

.loading-progress-bar {
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #0d6e6e, #34d399);
    animation: kelava-pulse 1.5s ease-in-out infinite;
}

@keyframes kelava-pulse {
    0%, 100% {
        transform: scaleX(0.2);
        transform-origin: left;
    }

    50% {
        transform: scaleX(1);
        transform-origin: left;
    }
}

.kelava-toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1050;
    padding: 0.85rem 1.25rem;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: calc(100vw - 40px);
}

body.dark-mode .kelava-toast {
    background: #0f172a;
}

.kelava-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ==========================================
   13. Footer & Back-to-Top Button
   ========================================== */
.kelava-footer {
    background-color: var(--footer-bg);
    color: #e2e8f0;
    padding-top: 4.5rem;
    padding-bottom: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    margin-bottom: 3.5rem;
    width: 100%;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    }
}

.footer-heading {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
}

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

    .footer-links a {
        color: #94a3b8;
        text-decoration: none;
        font-size: 0.85rem;
        transition: color 0.2s ease;
    }

        .footer-links a:hover {
            color: #34d399;
        }

.back-to-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary-teal);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(13, 110, 110, 0.3);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1020;
}

    .back-to-top-btn.visible {
        opacity: 1;
        pointer-events: auto;
    }

    .back-to-top-btn:hover {
        transform: translateY(-3px);
        background: var(--primary-teal-hover);
    }

/* ==========================================
   14. Advanced Mobile & Desktop Optimization Suite
   ========================================== */

/* Mobile Phones (Screens < 640px) */
@media (max-width: 639.98px) {
    html {
        font-size: 15px;
    }

    .kelava-container {
        padding-left: 1.1rem;
        padding-right: 1.1rem;
    }

    .kelava-hero-section {
        padding-top: 6.8rem;
        padding-bottom: 3.5rem;
    }

    .hero-title {
        font-size: 1.85rem;
        line-height: 1.4;
    }

    .hero-desc {
        font-size: 0.92rem;
        line-height: 1.75;
    }

    .hero-floating-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        border-radius: 12px;
    }

    .hero-float-icon-1 {
        top: 8%;
        left: 3%;
    }

    .hero-float-icon-2 {
        display: none;
    }

    .hero-float-icon-3 {
        top: 12%;
        right: 3%;
    }

    .hero-float-icon-4 {
        display: none;
    }

    .hero-floating-stat {
        padding: 0.65rem 0.85rem;
        border-radius: 14px;
        font-size: 0.8rem;
    }

    .hero-stat-top {
        top: 8px;
        right: 8px;
    }

    .hero-stat-bottom {
        bottom: 8px;
        left: 8px;
    }

    .cards-grid-4, .cards-grid-3 {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .filter-tabs-wrapper {
        padding: 0.35rem;
        gap: 0.4rem;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    .filter-tab-btn {
        padding: 0.45rem 0.85rem;
        font-size: 0.78rem;
        flex-shrink: 0;
    }

    .btn-kelava-primary, .btn-kelava-outline {
        width: 100%;
        justify-content: center;
        padding: 0.8rem 1.25rem;
    }

    .kelava-toast {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: calc(100% - 24px);
        justify-content: center;
    }

    .back-to-top-btn {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
}

/* Tablets (Screens 640px to 1023px) */
@media (min-width: 640px) and (max-width: 1023.98px) {
    .cards-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .hero-floating-icon {
        width: 44px;
        height: 44px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Large Desktop Displays (Screens >= 1024px) */
@media (min-width: 1024px) {
    .kelava-container {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .nav-link-item {
        font-size: 0.95rem;
        padding: 0.5rem 0.95rem;
    }

    .cards-grid-4 {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .cards-grid-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.75rem;
    }

    .hero-floating-icon {
        width: 52px;
        height: 52px;
        font-size: 1.35rem;
    }
}

/* High-DPI / Retina Optimization & Touch Target Constraints */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .kelava-card, .btn-kelava-primary, .theme-toggle-btn {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print Optimization */
@media print {
    .kelava-navbar, .kelava-loading-overlay, .kelava-toast, .back-to-top-btn, .theme-toggle-btn {
        display: none !important;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
}
