/* ============================================================
   AKJ PaisaGyan - Main Stylesheet
   ============================================================ */

/* ---- Root Variables ---- */
:root {
    --primary:       #0a2342;
    --secondary:     #6b2fa0;
    --accent:        #f4a261;
    --success:       #2d6a4f;
    --warning:       #f9c74f;
    --danger:        #e85d04;
    --body-bg:       #ffffff;
    --text:          #1a1a2e;
    --text-muted:    #6c757d;
    --border:        #e2e8f0;
    --card-shadow:   0 2px 12px rgba(0,0,0,.06);
    --font-main:     'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, 'Arial Unicode MS';
    --font-heading:  'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, 'Arial Unicode MS';
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-main);
    color: var(--text);
    background: var(--body-bg);
    font-size: 16px;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.3;
}

.fw-700 { font-weight: 700 !important; }
.fw-600 { font-weight: 600 !important; }
.fw-500 { font-weight: 500 !important; }
.min-vh-60 { min-height: 60vh; }
.min-vh-80 { min-height: 80vh; }

/* ---- Text Gradient ---- */
.text-gradient {
    background: linear-gradient(135deg, #6b2fa0, #f4a261);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Hover Effects ---- */
.hover-lift { transition: transform .2s ease, box-shadow .2s ease; }
.hover-lift:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12) !important; }
.hover-light:hover { color: white !important; }
.footer-link { transition: color .15s; }
.footer-link:hover { color: #ffffff !important; }

/* ---- Navbar ---- */
.navbar { z-index: 1030; }
.navbar-brand { font-family: var(--font-heading); }
.logo-icon { font-size: 28px; }
.nav-link { font-weight: 500; color: var(--text) !important; transition: color .2s; }
.nav-link:hover, .nav-link.active { color: #0d6efd !important; }
.dropdown-menu { min-width: 220px; border-radius: 12px !important; }
.dropdown-item { border-radius: 8px; transition: background .15s; }

/* ---- Logo animated wrapper ---- */
.logo-anim-wrap {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}
.logo-anim-wrap .site-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    display: block;
}
.logo-tagline {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #f59e0b;
    text-align: center;
    margin-top: 2px;
    white-space: nowrap;
    font-family: 'Noto Sans Devanagari', sans-serif;
    opacity: 0.95;
    line-height: 1;
}
[data-theme="dark"]  .logo-tagline { color: #fbbf24; }
[data-theme="sepia"] .logo-tagline { color: #b45309; }
[data-theme="ocean"] .logo-tagline { color: #38bdf8; }
[data-theme="sage"]  .logo-tagline { color: #4ade80; }


/* ---- Hero Section ---- */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, #16213e 50%, #0f3460 100%);
    color: white;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #6b2fa015 0%, transparent 70%);
    pointer-events: none;
}

.hero-title { color: white; }
.hero-wave { position: absolute; bottom: -1px; left: 0; right: 0; }
.hero-visual { position: relative; padding: 40px; }
.hero-cards { position: relative; height: 300px; }
.hero-card { position: absolute; }
.card-1 { top: 0; right: 0; width: 220px; }
.card-2 { top: 90px; left: 0; width: 240px; }
.card-3 { bottom: 0; right: 20px; width: 200px; }

/* ---- Section Headers ---- */
.section-header h2 { font-size: 2rem; color: var(--text); }

/* ---- Academy Cards ---- */
.academy-card { transition: all .25s ease; border-radius: 12px !important; overflow: hidden; }
.academy-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,.12) !important; }
.academy-card-header { border-radius: 0 !important; }

/* ---- Calculator Cards ---- */
.calc-card { border-radius: 12px !important; }
.calc-icon { transition: transform .2s; }
.calc-card:hover .calc-icon { transform: scale(1.1); }

/* ---- Article Cards ---- */
.article-card { border-radius: 12px !important; }
.article-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.1) !important; }
.article-placeholder { border-radius: 0 !important; background: linear-gradient(135deg, #0a2342, #6b2fa0) !important; }

/* ---- Blog Article Content ---- */
.prose, .article-content {
    font-size: 17px;
    line-height: 1.9;
    color: #2d3748;
}

/* ── Empty paragraph collapse (Quill editor artifacts) ── */
.prose p:empty,
.article-content p:empty { display: none; }
.prose p:has(> br:only-child),
.article-content p:has(> br:only-child) { display: none; }

/* ── Headings ── */
.prose h2, .article-content h2 {
    font-size: 1.55rem;
    margin: 2.4rem 0 .9rem;
    color: var(--primary);
    padding-bottom: .4rem;
    border-bottom: 2px solid var(--border);
}
.prose h3, .article-content h3 {
    font-size: 1.2rem;
    margin: 1.8rem 0 .6rem;
    color: var(--text);
    font-weight: 700;
}

/* ── Paragraphs ── */
.prose p, .article-content p { margin-bottom: 1.1rem; }

/* ── Lists ── */
.prose ul, .prose ol,
.article-content ul, .article-content ol {
    padding-left: 1.6rem;
    margin: .5rem 0 1.2rem;
}
.prose li, .article-content li {
    margin-bottom: .55rem;
    line-height: 1.75;
}
.prose ul li::marker { color: var(--primary); }

/* ── Blockquote ── */
.prose blockquote, .article-content blockquote {
    border-left: 4px solid var(--primary);
    background: var(--card-bg);
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 1.8rem 0;
    font-style: italic;
    opacity: .9;
}

/* ── Strong ── */
.prose strong, .article-content strong { font-weight: 700; color: inherit; }

/* ── Images ── */
.prose img, .article-content img { max-width: 100%; border-radius: 8px; margin: 1.2rem 0; }

/* ── Tables ── */
.prose table, .article-content table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: 15px; }
.prose th, .article-content th { background: #f8f9fa; font-weight: 600; }
.prose td, .prose th, .article-content td, .article-content th { padding: .75rem 1rem; border: 1px solid var(--border); }
.prose tr:nth-child(even), .article-content tr:nth-child(even) { background: #fafafa; }

/* ── Code ── */
.prose code, .article-content code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: .9em; color: #6b2fa0; }
.prose pre, .article-content pre { background: #1a1a2e; color: #a8dadc; padding: 1rem; border-radius: 8px; overflow-x: auto; }

/* ---- Formula Box ---- */
.formula-box { font-size: 15px; }

/* ---- Takeaways Box ---- */
.takeaways-box {
    background: linear-gradient(135deg, #fff9e6, #fffdf4);
    border-left: 4px solid var(--warning);
    padding: 1.25rem 1.5rem;
    border-radius: 0 12px 12px 0;
}
.takeaways-box ul { padding-left: 1.2rem; margin: .5rem 0 0; }
.takeaways-box li { margin-bottom: .4rem; }

/* ---- Disclaimer Box ---- */
.disclaimer-box { border-left: 4px solid var(--warning) !important; }

/* ---- Complete Box ---- */
.complete-box { border: 2px dashed #28a745; border-radius: 12px; }

/* ---- Notes Section ---- */
.notes-section { background: #f8f9fa; }

/* ---- Author Box ---- */
.author-box { border: 1px solid var(--border); }

/* ---- CTA Box ---- */
.cta-box { overflow: hidden; }

/* ---- Suggest Widget ---- */
.suggest-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    z-index: 9999;
    transition: transform .2s, background .2s;
}
.suggest-btn:hover { transform: scale(1.1); }
[data-theme="dark"]  .suggest-btn { background: #1e3a5f; }
[data-theme="sepia"] .suggest-btn { background: #6b3a1f; }
[data-theme="ocean"] .suggest-btn { background: #0a3060; }
[data-theme="sage"]  .suggest-btn { background: #2d5a32; }

.suggest-modal {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 300px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
    z-index: 9999;
    padding: 0;
    overflow: hidden;
}
.suggest-modal-inner { padding: 1rem; }

/* ---- Letter Filter ---- */
.letter-filter .btn { min-width: 40px; }

/* ---- Progress Bar ---- */
.progress { border-radius: 10px; }
.progress-bar { border-radius: 10px; transition: width .6s ease; }

/* ---- Dashboard ---- */
.dashboard-sidebar .nav-link { border-radius: 8px; margin-bottom: 2px; color: var(--text); }
.dashboard-sidebar .nav-link:hover, .dashboard-sidebar .nav-link.active { background: #e7f0ff; color: #0d6efd; }

/* ---- Forms ---- */
.form-control, .form-select { border-radius: 8px; border-color: var(--border); }
.form-control:focus, .form-select:focus { border-color: #6b2fa0; box-shadow: 0 0 0 .2rem rgba(107,47,160,.15); }
.input-group-text { border-radius: 8px 0 0 8px; background: #f8f9fa; }

/* ---- Buttons ---- */
.btn { font-weight: 500; border-radius: 8px; }
.btn-primary { background: #0d6efd; border-color: #0d6efd; }
.btn-lg { padding: .75rem 1.5rem; }

/* ---- Cards ---- */
.card { border-radius: 12px !important; }

/* ---- Breadcrumbs ---- */
.breadcrumb-bar { font-size: 13px; }
.breadcrumb { margin-bottom: 0; padding: 0; background: transparent; }
.breadcrumb-item a { color: #0d6efd; text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: #6c757d; }
.breadcrumb-item + .breadcrumb-item::before { color: #adb5bd; }

/* Breadcrumb theme overrides — bg comes from .bg-light per theme */
[data-theme="dark"]  .breadcrumb-item a { color: #93c5fd !important; }
[data-theme="dark"]  .breadcrumb-item.active { color: #94a3b8 !important; }
[data-theme="dark"]  .breadcrumb-item + .breadcrumb-item::before { color: #475569 !important; }

[data-theme="sepia"] .breadcrumb-item a { color: #c8853c !important; }
[data-theme="sepia"] .breadcrumb-item.active { color: #8b6f5e !important; }
[data-theme="sepia"] .breadcrumb-item + .breadcrumb-item::before { color: #c4a882 !important; }

[data-theme="ocean"] .breadcrumb-item a { color: #60a5fa !important; }
[data-theme="ocean"] .breadcrumb-item.active { color: #64748b !important; }
[data-theme="ocean"] .breadcrumb-item + .breadcrumb-item::before { color: #334155 !important; }

[data-theme="sage"]  .breadcrumb-item a { color: #86efac !important; }
[data-theme="sage"]  .breadcrumb-item.active { color: #6b8f72 !important; }
[data-theme="sage"]  .breadcrumb-item + .breadcrumb-item::before { color: #2d5a32 !important; }

/* ---- Footer ---- */
footer a:hover { color: white !important; }

/* ---- Font Resizer Pill ---- */
.font-resizer-pill {
    background: rgba(0,0,0,.06);
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 30px;
    padding: 3px 6px;
    gap: 0;
    user-select: none;
}
[data-theme="dark"] .font-resizer-pill {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.15);
}
.font-resizer-btn {
    background: none;
    border: none;
    padding: 3px 7px;
    cursor: pointer;
    color: #495057;
    font-size: 14px;
    line-height: 1;
    border-radius: 20px;
    transition: background .15s, color .15s;
    display: flex;
    align-items: center;
}
[data-theme="dark"] .font-resizer-btn { color: #adb5bd; }
.font-resizer-btn:hover { background: rgba(13,110,253,.12); color: #0d6efd; }
.font-resizer-label {
    font-size: 12px;
    font-weight: 700;
    color: #6c757d;
    padding: 0 6px;
    cursor: pointer;
    letter-spacing: .5px;
    transition: color .15s;
}
[data-theme="dark"] .font-resizer-label { color: #adb5bd; }
.font-resizer-label:hover { color: #0d6efd; }
.font-resizer-divider {
    width: 1px;
    height: 16px;
    background: rgba(0,0,0,.1);
    display: block;
}
[data-theme="dark"] .font-resizer-divider { background: rgba(255,255,255,.15); }

/* ---- Newsletter Section ---- */
.newsletter-section { background: linear-gradient(135deg, #0a2342 0%, #1d3557 50%, #6b2fa0 100%); }
.newsletter-box { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); }
.newsletter-icon { font-size: 40px; line-height: 1; }
.newsletter-input { background: rgba(255,255,255,.12) !important; border: 1px solid rgba(255,255,255,.25) !important; color: #fff !important; border-radius: 8px !important; }
.newsletter-input::placeholder { color: rgba(255,255,255,.5) !important; }
.newsletter-input:focus { background: rgba(255,255,255,.18) !important; box-shadow: 0 0 0 .2rem rgba(249,199,79,.25) !important; }

/* Newsletter subscribe button */
.btn-newsletter { background: #f4a261; color: #0a2342; border: none; }
.btn-newsletter:hover { background: #e8894a; color: #0a2342; }
[data-theme="dark"]  .btn-newsletter { background: #f9c74f; color: #0f1525; }
[data-theme="dark"]  .btn-newsletter:hover { background: #f3b500; color: #0f1525; }
[data-theme="sepia"] .btn-newsletter { background: #f4a261; color: #2c1810; }
[data-theme="ocean"] .btn-newsletter { background: #60a5fa; color: #020e1c; }
[data-theme="ocean"] .btn-newsletter:hover { background: #3b82f6; color: #020e1c; }
[data-theme="sage"]  .btn-newsletter { background: #86efac; color: #0a1f0d; }
[data-theme="sage"]  .btn-newsletter:hover { background: #4ade80; color: #0a1f0d; }

/* ---- Newsletter + Footer per-theme overrides ---- */
/* Sepia */
[data-theme="sepia"] .newsletter-section { background: linear-gradient(135deg, #4a2c0a 0%, #6b3a1f 50%, #8b5e3c 100%); }
[data-theme="sepia"] footer.bg-dark { background: #1c0f07 !important; }

/* Ocean */
[data-theme="ocean"] .newsletter-section { background: linear-gradient(135deg, #020e1c 0%, #051e38 50%, #0a3060 100%); }
[data-theme="ocean"] footer.bg-dark { background: #040c18 !important; }

/* Sage */
[data-theme="sage"] .newsletter-section { background: linear-gradient(135deg, #0a1f0d 0%, #1a3a1e 50%, #2d5a32 100%); }
[data-theme="sage"] footer.bg-dark { background: #071510 !important; }

/* Dark */
[data-theme="dark"] .newsletter-section { background: linear-gradient(135deg, #060d1a 0%, #0f1525 50%, #2a0f4a 100%); }
[data-theme="dark"] footer.bg-dark { background: #080c14 !important; }

/* ---- Theme Switcher ---- */
.theme-switcher .form-check-input { background-color: rgba(255,255,255,.3); border-color: rgba(255,255,255,.3); }
.theme-switcher .form-check-input:checked { background-color: #6b2fa0; border-color: #6b2fa0; }

/* ---- Poll Widget ---- */
.poll-widget-wrap {
    position: fixed; bottom: 24px; right: 24px; z-index: 1050;
    animation: poll-slide-in .4s ease;
}
@keyframes poll-slide-in { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.poll-widget-card {
    width: 280px; background: #fff; border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18); overflow: hidden; position: relative;
}
[data-theme="dark"] .poll-widget-card { background: #1e2530; }
.poll-close-btn {
    position: absolute; top: 8px; right: 10px;
    background: none; border: none; font-size: 20px; color: rgba(255,255,255,.7);
    cursor: pointer; line-height: 1; padding: 0;
}
.poll-close-btn:hover { color: #fff; }
.poll-header {
    background: linear-gradient(135deg,#0a2342,#6b2fa0);
    color: #fff; padding: 12px 16px; font-weight: 700; font-size: 14px;
}
.poll-body { padding: 14px 16px; }
.poll-question { font-weight: 600; font-size: 14px; margin-bottom: 12px; line-height: 1.4; }
.poll-option-label {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px;
    border: 1px solid #dee2e6; border-radius: 8px; cursor: pointer;
    font-size: 13px; transition: border-color .15s, background .15s;
}
.poll-option-label:hover { border-color: #0d6efd; background: #f0f5ff; }
.poll-option-label:has(.poll-radio:checked) { border-color: #0d6efd; background: #e8f0ff; }
.poll-radio { accent-color: #0d6efd; flex-shrink: 0; }
.poll-vote-btn {
    width: 100%; background: linear-gradient(135deg,#0d6efd,#6b2fa0);
    color: #fff; border: none; border-radius: 8px; padding: 8px;
    font-weight: 600; font-size: 13px; cursor: pointer;
}
.poll-vote-btn:hover { opacity: .9; }
.poll-result-row { margin-bottom: 10px; }
.poll-result-bar-wrap { background: #e9ecef; border-radius: 4px; height: 8px; overflow: hidden; }
.poll-result-bar { background: linear-gradient(90deg,#0d6efd,#6b2fa0); height: 100%; border-radius: 4px; transition: width .5s; }

/* ---- Dark Theme ---- */
[data-theme="dark"] { --body-bg: #0f1117; --text: #e2e8f0; --border: #2d3748; }
[data-theme="dark"] body { background: #0f1117; color: #e2e8f0; }
[data-theme="dark"] .navbar { background: #1a1f2e !important; border-bottom: 1px solid #2d3748 !important; }
[data-theme="dark"] .navbar-brand span, [data-theme="dark"] .nav-link { color: #e2e8f0 !important; }
[data-theme="dark"] .nav-link:hover, [data-theme="dark"] .nav-link.active { color: #93c5fd !important; }
[data-theme="dark"] .card { background: #1a1f2e !important; border-color: #2d3748 !important; color: #e2e8f0; }
[data-theme="dark"] .dropdown-menu { background: #1e2333 !important; border-color: #2d3748 !important; }
[data-theme="dark"] .dropdown-item { color: #cbd5e1 !important; }
[data-theme="dark"] .dropdown-item:hover { background: #2d3748 !important; color: #fff !important; }
[data-theme="dark"] .form-control, [data-theme="dark"] .form-select { background: #1a1f2e; color: #e2e8f0; border-color: #2d3748; }
[data-theme="dark"] .bg-light, [data-theme="dark"] .bg-white { background: #1a1f2e !important; }
[data-theme="dark"] .text-dark { color: #e2e8f0 !important; }
[data-theme="dark"] .text-muted { color: #94a3b8 !important; }
[data-theme="dark"] .border, [data-theme="dark"] .border-bottom { border-color: #2d3748 !important; }
[data-theme="dark"] .table { --bs-table-bg: #1a1f2e; --bs-table-striped-bg: #202637; color: #e2e8f0; }
[data-theme="dark"] .prose, [data-theme="dark"] .article-content { color: #cbd5e1; }
[data-theme="dark"] .prose h2, [data-theme="dark"] .article-content h2 { color: #93c5fd; border-bottom-color: #334155; }
[data-theme="dark"] .prose th, [data-theme="dark"] .article-content th { background: #1e2a3a; }
[data-theme="dark"] .prose tr:nth-child(even), [data-theme="dark"] .article-content tr:nth-child(even) { background: #161f2e; }
[data-theme="dark"] .alert-light { background: #1e2333; color: #e2e8f0; }
[data-theme="dark"] .btn-outline-secondary { color: #94a3b8; border-color: #475569; }
[data-theme="dark"] .btn-outline-secondary:hover { background: #334155; color: #fff; }
[data-theme="dark"] .input-group-text { background: #1e2333; border-color: #2d3748; color: #94a3b8; }
[data-theme="dark"] .hero-section { background: linear-gradient(135deg, #060d1a 0%, #0f1117 50%, #1a0530 100%); }

/* ---- Sepia Theme ---- */
[data-theme="sepia"] body { background: #f5efe6; color: #3d2b1f; }
[data-theme="sepia"] .navbar { background: #faf4eb !important; border-bottom: 1px solid #d4b896 !important; }
[data-theme="sepia"] .navbar-brand span { color: #8b5e3c !important; }
[data-theme="sepia"] .nav-link { color: #5a3e2b !important; }
[data-theme="sepia"] .nav-link:hover, [data-theme="sepia"] .nav-link.active { color: #c8853c !important; }
[data-theme="sepia"] .card { background: #fdf8f0 !important; border-color: #e0cdb3 !important; color: #3d2b1f; }
[data-theme="sepia"] .dropdown-menu { background: #fdf8f0 !important; border-color: #d4b896 !important; }
[data-theme="sepia"] .dropdown-item { color: #5a3e2b !important; }
[data-theme="sepia"] .dropdown-item:hover { background: #f0e4d0 !important; color: #3d2b1f !important; }
[data-theme="sepia"] .form-control, [data-theme="sepia"] .form-select { background: #fdf8f0; color: #3d2b1f; border-color: #d4b896; }
[data-theme="sepia"] .bg-light, [data-theme="sepia"] .bg-white { background: #fdf8f0 !important; }
[data-theme="sepia"] .text-dark { color: #3d2b1f !important; }
[data-theme="sepia"] .text-muted { color: #8b6f5e !important; }
[data-theme="sepia"] .border, [data-theme="sepia"] .border-bottom { border-color: #d4b896 !important; }
[data-theme="sepia"] .table { --bs-table-bg: #fdf8f0; color: #3d2b1f; }
[data-theme="sepia"] .prose, [data-theme="sepia"] .article-content { color: #4a3728; }
[data-theme="sepia"] .alert-light { background: #f5ede0; color: #3d2b1f; }
[data-theme="sepia"] .btn-outline-secondary { color: #8b6f5e; border-color: #c4a882; }
[data-theme="sepia"] .input-group-text { background: #f5ede0; border-color: #d4b896; color: #8b6f5e; }
[data-theme="sepia"] .hero-section { background: linear-gradient(135deg, #f0e4d0 0%, #f5efe6 100%); }
[data-theme="sepia"] .accordion-button { background: #fdf8f0 !important; color: #3d2b1f !important; }
[data-theme="sepia"] .accordion-item { background: #fdf8f0; border-color: #d4b896; }
[data-theme="sepia"] .sticky-top { background: #fdf8f0; }

/* ---- Ocean Theme (deep navy) ---- */
[data-theme="ocean"] body { background: #0b1929; color: #cdd9e5; }
[data-theme="ocean"] .navbar { background: #071523 !important; border-bottom: 1px solid #1e3a5f !important; }
[data-theme="ocean"] .navbar-brand span { color: #5eb8ff !important; }
[data-theme="ocean"] .nav-link { color: #a8c8e8 !important; }
[data-theme="ocean"] .nav-link:hover, [data-theme="ocean"] .nav-link.active { color: #5eb8ff !important; }
[data-theme="ocean"] .card { background: #0f2035 !important; border-color: #1e3a5f !important; color: #cdd9e5; }
[data-theme="ocean"] .dropdown-menu { background: #0f2035 !important; border-color: #1e3a5f !important; }
[data-theme="ocean"] .dropdown-item { color: #a8c8e8 !important; }
[data-theme="ocean"] .dropdown-item:hover { background: #1e3a5f !important; color: #fff !important; }
[data-theme="ocean"] .form-control, [data-theme="ocean"] .form-select { background: #0f2035; color: #cdd9e5; border-color: #1e3a5f; }
[data-theme="ocean"] .bg-light, [data-theme="ocean"] .bg-white { background: #0f2035 !important; }
[data-theme="ocean"] .text-dark { color: #cdd9e5 !important; }
[data-theme="ocean"] .text-muted { color: #6b9bc4 !important; }
[data-theme="ocean"] .border, [data-theme="ocean"] .border-bottom { border-color: #1e3a5f !important; }
[data-theme="ocean"] .table { --bs-table-bg: #0f2035; --bs-table-striped-bg: #122438; color: #cdd9e5; }
[data-theme="ocean"] .prose, [data-theme="ocean"] .article-content { color: #b8d0e8; }
[data-theme="ocean"] .prose h2, [data-theme="ocean"] .article-content h2 { color: #5eb8ff; }
[data-theme="ocean"] .alert-light { background: #0f2035; color: #cdd9e5; }
[data-theme="ocean"] .btn-outline-secondary { color: #6b9bc4; border-color: #1e3a5f; }
[data-theme="ocean"] .btn-outline-secondary:hover { background: #1e3a5f; color: #fff; }
[data-theme="ocean"] .input-group-text { background: #0f2035; border-color: #1e3a5f; color: #6b9bc4; }
[data-theme="ocean"] .hero-section { background: linear-gradient(135deg, #040e1a 0%, #0b1929 50%, #071e38 100%); }
[data-theme="ocean"] .accordion-button { background: #0f2035 !important; color: #cdd9e5 !important; }
[data-theme="ocean"] .accordion-item { background: #0f2035; border-color: #1e3a5f; }
[data-theme="ocean"] .poll-widget-card { background: #0f2035; }
[data-theme="ocean"] .sticky-top { background: #0b1929; }

/* ---- Sage/Forest Theme (green reading) ---- */
[data-theme="sage"] body { background: #f0f4f1; color: #1c2b1e; }
[data-theme="sage"] .navbar { background: #f8fbf8 !important; border-bottom: 1px solid #b2cbb5 !important; }
[data-theme="sage"] .navbar-brand span { color: #2e7d32 !important; }
[data-theme="sage"] .nav-link { color: #2d4a2f !important; }
[data-theme="sage"] .nav-link:hover, [data-theme="sage"] .nav-link.active { color: #2e7d32 !important; }
[data-theme="sage"] .card { background: #f8fbf8 !important; border-color: #c8ddc9 !important; color: #1c2b1e; }
[data-theme="sage"] .dropdown-menu { background: #f8fbf8 !important; border-color: #b2cbb5 !important; }
[data-theme="sage"] .dropdown-item { color: #2d4a2f !important; }
[data-theme="sage"] .dropdown-item:hover { background: #e0eee1 !important; color: #1c2b1e !important; }
[data-theme="sage"] .form-control, [data-theme="sage"] .form-select { background: #f8fbf8; color: #1c2b1e; border-color: #b2cbb5; }
[data-theme="sage"] .bg-light, [data-theme="sage"] .bg-white { background: #f8fbf8 !important; }
[data-theme="sage"] .text-dark { color: #1c2b1e !important; }
[data-theme="sage"] .text-muted { color: #5a7a5c !important; }
[data-theme="sage"] .border, [data-theme="sage"] .border-bottom { border-color: #b2cbb5 !important; }
[data-theme="sage"] .table { --bs-table-bg: #f8fbf8; color: #1c2b1e; }
[data-theme="sage"] .prose, [data-theme="sage"] .article-content { color: #263b28; }
[data-theme="sage"] .alert-light { background: #eaf2eb; color: #1c2b1e; }
[data-theme="sage"] .btn-outline-secondary { color: #5a7a5c; border-color: #8fad91; }
[data-theme="sage"] .input-group-text { background: #eaf2eb; border-color: #b2cbb5; color: #5a7a5c; }
[data-theme="sage"] .hero-section { background: linear-gradient(135deg, #e0ede1 0%, #f0f4f1 100%); }
[data-theme="sage"] .accordion-button { background: #f8fbf8 !important; color: #1c2b1e !important; }
[data-theme="sage"] .accordion-item { background: #f8fbf8; border-color: #b2cbb5; }

/* ---- Dark theme: font resizer poll widget ---- */
[data-theme="dark"] .poll-widget-card { background: #1e2530; }

/* ---- FAQ Hero Section: theme overrides (inline style override needs !important) ---- */
[data-theme="dark"]  .faq-hero-section { background: linear-gradient(135deg, #060d1a 0%, #0f1117 55%, #1a0530 100%) !important; }
[data-theme="sepia"] .faq-hero-section { background: linear-gradient(135deg, #3d1a06 0%, #5c2e10 55%, #7a4828 100%) !important; }
[data-theme="ocean"] .faq-hero-section { background: linear-gradient(135deg, #020e1c 0%, #051e38 55%, #0a3060 100%) !important; }
[data-theme="sage"]  .faq-hero-section { background: linear-gradient(135deg, #0a1f0d 0%, #1a3a1e 55%, #2d5a32 100%) !important; }

/* ---- Polls Hero Section: theme overrides ---- */
[data-theme="dark"]  .polls-hero-section { background: linear-gradient(135deg, #0d1b2a11, #0d1b2a05) !important; border-color: #2d3748 !important; }
[data-theme="sepia"] .polls-hero-section { background: linear-gradient(135deg, #8b5e3c11, #8b5e3c05) !important; border-color: #d4b896 !important; }
[data-theme="ocean"] .polls-hero-section { background: linear-gradient(135deg, #5eb8ff11, #5eb8ff05) !important; border-color: #1e3a5f !important; }
[data-theme="sage"]  .polls-hero-section { background: linear-gradient(135deg, #2e7d3211, #2e7d3205) !important; border-color: #b2cbb5 !important; }

/* ---- bg-primary per theme (poll card headers, badges etc.) ---- */
[data-theme="dark"]  .bg-primary { background-color: #3730a3 !important; }
[data-theme="sepia"] .bg-primary { background-color: #7c3217 !important; }
[data-theme="ocean"] .bg-primary { background-color: #1e5799 !important; }
[data-theme="sage"]  .bg-primary { background-color: #2e7d32 !important; }

/* ---- btn-primary per theme (navbar search button, all CTA buttons) ---- */
[data-theme="dark"]  .btn-primary { background-color: #3730a3 !important; border-color: #3730a3 !important; }
[data-theme="dark"]  .btn-primary:hover { background-color: #4f46e5 !important; border-color: #4f46e5 !important; }
[data-theme="sepia"] .btn-primary { background-color: #7c3217 !important; border-color: #7c3217 !important; }
[data-theme="sepia"] .btn-primary:hover { background-color: #9c4422 !important; border-color: #9c4422 !important; }
[data-theme="ocean"] .btn-primary { background-color: #1e5799 !important; border-color: #1e5799 !important; }
[data-theme="ocean"] .btn-primary:hover { background-color: #2468b5 !important; border-color: #2468b5 !important; }
[data-theme="sage"]  .btn-primary { background-color: #2e7d32 !important; border-color: #2e7d32 !important; }
[data-theme="sage"]  .btn-primary:hover { background-color: #388e3c !important; border-color: #388e3c !important; }

/* ---- btn-outline-primary per theme ---- */
[data-theme="dark"]  .btn-outline-primary { color: #818cf8 !important; border-color: #818cf8 !important; }
[data-theme="dark"]  .btn-outline-primary:hover { background-color: #3730a3 !important; border-color: #3730a3 !important; color: #fff !important; }
[data-theme="sepia"] .btn-outline-primary { color: #7c3217 !important; border-color: #7c3217 !important; }
[data-theme="sepia"] .btn-outline-primary:hover { background-color: #7c3217 !important; border-color: #7c3217 !important; color: #fff !important; }
[data-theme="ocean"] .btn-outline-primary { color: #1e5799 !important; border-color: #1e5799 !important; }
[data-theme="ocean"] .btn-outline-primary:hover { background-color: #1e5799 !important; border-color: #1e5799 !important; color: #fff !important; }
[data-theme="sage"]  .btn-outline-primary { color: #2e7d32 !important; border-color: #2e7d32 !important; }
[data-theme="sage"]  .btn-outline-primary:hover { background-color: #2e7d32 !important; border-color: #2e7d32 !important; color: #fff !important; }

/* ---- form-control: force !important so Bootstrap doesn't override theme ---- */
[data-theme="dark"]  .form-control, [data-theme="dark"]  .form-select { background: #1a1f2e !important; color: #e2e8f0 !important; border-color: #2d3748 !important; }
[data-theme="sepia"] .form-control, [data-theme="sepia"] .form-select { background: #fdf8f0 !important; color: #3d2b1f !important; border-color: #d4b896 !important; }
[data-theme="ocean"] .form-control, [data-theme="ocean"] .form-select { background: #0f2035 !important; color: #cdd9e5 !important; border-color: #1e3a5f !important; }
[data-theme="sage"]  .form-control, [data-theme="sage"]  .form-select { background: #f8fbf8 !important; color: #1c2b1e !important; border-color: #b2cbb5 !important; }

/* ---- Quizzes Hero ---- */
[data-theme="dark"]  .quizzes-hero-section { background: linear-gradient(135deg, #060d1a 0%, #0f1117 55%, #1a0530 100%) !important; }
[data-theme="sepia"] .quizzes-hero-section { background: linear-gradient(135deg, #3d1a06 0%, #5c2e10 55%, #7a4828 100%) !important; }
[data-theme="ocean"] .quizzes-hero-section { background: linear-gradient(135deg, #020e1c 0%, #051e38 55%, #0a3060 100%) !important; }
[data-theme="sage"]  .quizzes-hero-section { background: linear-gradient(135deg, #0a1f0d 0%, #1a3a1e 55%, #2d5a32 100%) !important; }

/* ---- AMA Hero ---- */
[data-theme="dark"]  .ama-hero { background: linear-gradient(135deg, #060d1a 0%, #0f1117 55%, #1a0530 100%) !important; }
[data-theme="sepia"] .ama-hero { background: linear-gradient(135deg, #3d1a06 0%, #5c2e10 55%, #7a4828 100%) !important; }
[data-theme="ocean"] .ama-hero { background: linear-gradient(135deg, #020e1c 0%, #051e38 55%, #0a3060 100%) !important; }
[data-theme="sage"]  .ama-hero { background: linear-gradient(135deg, #0a1f0d 0%, #1a3a1e 55%, #2d5a32 100%) !important; }

/* ---- Checkups Hero ---- */
[data-theme="dark"]  .checkups-hero-section { background: linear-gradient(135deg, #060d1a 0%, #0f1117 55%, #1a0530 100%) !important; }
[data-theme="sepia"] .checkups-hero-section { background: linear-gradient(135deg, #3d1a06 0%, #5c2e10 55%, #7a4828 100%) !important; }
[data-theme="ocean"] .checkups-hero-section { background: linear-gradient(135deg, #020e1c 0%, #051e38 55%, #0a3060 100%) !important; }
[data-theme="sage"]  .checkups-hero-section { background: linear-gradient(135deg, #0a1f0d 0%, #1a3a1e 55%, #2d5a32 100%) !important; }

/* ---- About Hero ---- */
[data-theme="dark"]  .about-hero { background: linear-gradient(135deg, #060d1a 0%, #0f1117 40%, #1a0530 100%) !important; }
[data-theme="sepia"] .about-hero { background: linear-gradient(135deg, #3d1a06 0%, #5c2e10 40%, #7a4828 100%) !important; }
[data-theme="ocean"] .about-hero { background: linear-gradient(135deg, #020e1c 0%, #051e38 40%, #0a3060 100%) !important; }
[data-theme="sage"]  .about-hero { background: linear-gradient(135deg, #0a1f0d 0%, #1a3a1e 40%, #2d5a32 100%) !important; }

/* ---- Contact Hero ---- */
[data-theme="dark"]  .contact-hero-bg { background: linear-gradient(135deg, #060d1a 0%, #0f1117 40%, #1a0530 100%) !important; }
[data-theme="sepia"] .contact-hero-bg { background: linear-gradient(135deg, #3d1a06 0%, #5c2e10 40%, #7a4828 100%) !important; }
[data-theme="ocean"] .contact-hero-bg { background: linear-gradient(135deg, #020e1c 0%, #051e38 40%, #0a3060 100%) !important; }
[data-theme="sage"]  .contact-hero-bg { background: linear-gradient(135deg, #0a1f0d 0%, #1a3a1e 40%, #2d5a32 100%) !important; }

/* ---- FAQ bottom CTA box ---- */
[data-theme="dark"]  .faq-cta-box { background: linear-gradient(135deg, #1a1f2e, #0f1525) !important; }
[data-theme="sepia"] .faq-cta-box { background: linear-gradient(135deg, #fdf8f0, #f5ece0) !important; }
[data-theme="ocean"] .faq-cta-box { background: linear-gradient(135deg, #0f2035, #071523) !important; }
[data-theme="sage"]  .faq-cta-box { background: linear-gradient(135deg, #eaf2eb, #f0f4f1) !important; }

/* ---- Theme Dropdown ---- */
.theme-dropdown-btn {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.18);
    color: #e2e8f0;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .15s;
}
.theme-dropdown-btn:hover { background: rgba(255,255,255,.14); }
.theme-dropdown-menu {
    background: #1e2333;
    border: 1px solid #2d3748;
    border-radius: 12px;
    padding: 6px;
    min-width: 170px;
}
.theme-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    color: #cbd5e1;
    font-size: 13px;
    transition: background .12s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}
.theme-opt:hover { background: rgba(255,255,255,.08); color: #fff; }
.theme-opt.active { background: rgba(255,255,255,.1); color: #fff; font-weight: 600; }
.theme-swatch {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.3);
    flex-shrink: 0;
}

/* ================================================================
   ADMIN TABLE — unified style, edit here to change all admin tables
   ================================================================ */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
/* Card wrapper — use on every admin list card */
.admin-card {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 6px rgba(0,0,0,0.07) !important;
    overflow: hidden;
}
/* Thead */
.admin-table thead tr {
    background: #f4f6fa;
    border-bottom: 2px solid #e5e9f0;
}
.admin-table thead th {
    padding: 11px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    border: none;
    white-space: nowrap;
}
/* Tbody */
.admin-table tbody tr {
    border-bottom: 1px solid #f0f2f5;
    transition: background 0.12s;
}
.admin-table tbody tr:last-child { border-bottom: none; }
.admin-table tbody tr:hover { background: #f8f9ff; }
.admin-table tbody td {
    padding: 13px 16px;
    border: none;
    vertical-align: middle;
}
/* Action buttons in admin tables */
.admin-table .at-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    font-size: 13px;
    border: 1px solid #e5e9f0;
    background: #fff;
    color: #6b7280;
    transition: all 0.15s;
    text-decoration: none;
}
.admin-table .at-btn:hover           { background: #f0f4ff; border-color: #c7d2fe; color: #4f46e5; }
.admin-table .at-btn.at-btn-edit:hover  { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.admin-table .at-btn.at-btn-del:hover   { background: #fff1f2; border-color: #fca5a5; color: #dc2626; }
.admin-table .at-btn.at-btn-view:hover  { background: #f0fdf4; border-color: #86efac; color: #16a34a; }
.admin-table .at-btn.at-btn-warn:hover  { background: #fffbeb; border-color: #fcd34d; color: #d97706; }
/* Status pill badges */
.at-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.6;
}
.at-badge-success { background: #d1fae5; color: #065f46; }
.at-badge-warning { background: #fef3c7; color: #92400e; }
.at-badge-danger  { background: #fee2e2; color: #991b1b; }
.at-badge-info    { background: #dbeafe; color: #1e40af; }
.at-badge-muted   { background: #f1f5f9; color: #475569; }
.at-badge-dot::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero-section { padding: 50px 0 40px; }
    .hero-title { font-size: 2rem; }
    .section-header h2 { font-size: 1.5rem; }
    .suggest-btn { bottom: 16px; right: 16px; }
    .suggest-modal { right: 16px; width: calc(100vw - 32px); }
}

/* ---- Lazy Loading ---- */
img[loading="lazy"] { background: #f0f0f0; }

/* ---- Accessibility ---- */
:focus-visible { outline: 3px solid #6b2fa0; outline-offset: 2px; }
a:focus-visible { outline: 3px solid #6b2fa0; }

/* ---- Badge Colors (not covered by Bootstrap) ---- */
.bg-primary-subtle { background: rgba(13,110,253,.1) !important; }
.bg-success-subtle { background: rgba(45,106,79,.1) !important; }
.bg-warning-subtle { background: rgba(249,199,79,.1) !important; }
.bg-danger-subtle  { background: rgba(232,93,4,.1) !important; }
.bg-info-subtle    { background: rgba(13,202,240,.1) !important; }
.bg-secondary-subtle { background: rgba(108,117,125,.1) !important; }

/* ---- Utility ---- */
.border-bottom { border-color: var(--border) !important; }
.shadow-sm { box-shadow: var(--card-shadow) !important; }
.rounded-3 { border-radius: 12px !important; }
