/* ============================================================
   DESIGN REFRESH (v94) — sitewide polish layer.
   Loaded last. Colours/shape/motion only: it never changes layout of
   existing Astra/Elementor structure or the mobile-menu mechanics.
   Tokens: blue #005BAC · deep #003D75 · green #00A651 · amber #F9A825
   ============================================================ */
:root {
    --up-blue: #005BAC; --up-blue-deep: #003D75; --up-blue-soft: #EAF1FB;
    --up-green: #00A651; --up-amber: #F9A825; --up-navy: #0F172A;
    --up-line: #E3EAF3; --up-radius: 18px;
    --up-shadow: 0 6px 20px rgba(0, 61, 117, .08);
    --up-shadow-hover: 0 16px 34px rgba(0, 61, 117, .18);
}
html { scroll-behavior: smooth; }
::selection { background: rgba(0, 91, 172, .2); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 3px solid rgba(0, 91, 172, .45); outline-offset: 2px; border-radius: 8px;
}
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* ---- Header: soft shadow once the page is scrolled ---- */
#masthead, .main-header-bar { transition: box-shadow .25s ease, background-color .25s ease; }
body.up-scrolled #masthead, body.up-scrolled .main-header-bar { box-shadow: 0 6px 24px rgba(15, 23, 42, .12); }

/* ---- Desktop top menu: gentle hover affordance (no layout change) ---- */
@media (min-width: 922px) {
    .main-header-menu > .menu-item > a { transition: color .2s ease, box-shadow .2s ease; }
    .main-header-menu > .menu-item:hover > a,
    .main-header-menu > .menu-item.current-menu-item > a { box-shadow: inset 0 -3px 0 var(--up-amber); }
}

/* ---- Buttons: one consistent pill style ---- */
.up-btn, .up-btn-primary, .up-btn-outline, .elementor-button, .ast-button,
.wp-block-button__link, .up-quiz-submit {
    border-radius: 999px !important;
    font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.up-btn-primary, .up-quiz-submit {
    background: linear-gradient(135deg, var(--up-blue), #0A74D6) !important; color: #fff !important;
    border: none; box-shadow: 0 6px 16px rgba(0, 91, 172, .3);
}
.up-btn-outline { border: 2px solid var(--up-blue) !important; color: var(--up-blue) !important; background: transparent; }
.up-btn-outline:hover { background: var(--up-blue); color: #fff !important; }
.elementor-button { box-shadow: 0 6px 16px rgba(0, 91, 172, .25); }
.up-btn:hover, .up-btn-primary:hover, .elementor-button:hover, .ast-button:hover, .up-quiz-submit:hover {
    transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0, 91, 172, .35);
}
.up-btn:active, .elementor-button:active { transform: translateY(0); }

/* ---- Cards: unified radius, border, shadow, lift ---- */
.up-chapter-card, .up-content-card, .up-pdf-card, .up-quiz-directory-card, .up-active-class-card,
.up-category-card, .up-about-tile, .up-sidebar-widget {
    border-radius: var(--up-radius); border: 1px solid var(--up-line); box-shadow: var(--up-shadow);
}
.up-chapter-card:hover, .up-content-card:hover, .up-pdf-card:hover, .up-quiz-directory-card:hover,
.up-active-class-card:hover, .up-about-tile:hover { box-shadow: var(--up-shadow-hover); }

/* ---- HOME SHOWCASE ---- */
.up-home-showcase { max-width: 1180px; margin: 0 auto; padding: 14px 16px 6px; direction: rtl; }
.up-home-showcase small { font-weight: 600; opacity: .8; }

.up-hero {
    position: relative; overflow: hidden; border-radius: 28px; color: #fff; text-align: center;
    padding: 56px 22px 48px;
    background: radial-gradient(1200px 400px at 85% -10%, rgba(249, 168, 37, .35), transparent 60%),
                radial-gradient(900px 420px at 0% 110%, rgba(0, 166, 81, .45), transparent 60%),
                linear-gradient(135deg, #003D75 0%, #005BAC 55%, #0A74D6 100%);
    box-shadow: 0 20px 50px rgba(0, 61, 117, .3);
}
.up-hero::before, .up-hero::after {
    content: ""; position: absolute; border-radius: 50%; pointer-events: none; opacity: .14; background: #fff;
}
.up-hero::before { width: 320px; height: 320px; top: -120px; left: -90px; animation: up-float 9s ease-in-out infinite; }
.up-hero::after { width: 220px; height: 220px; bottom: -90px; right: -60px; animation: up-float 11s ease-in-out infinite reverse; }
@keyframes up-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(18px); } }
.up-hero-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.up-hero-badge {
    display: inline-block; padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 700;
    background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); backdrop-filter: blur(6px);
}
.up-hero-title { color: #fff; font-size: clamp(38px, 7vw, 64px); line-height: 1.15; margin: 18px 0 6px; font-weight: 800; letter-spacing: .5px; }
.up-hero-ur { font-size: clamp(22px, 3.6vw, 32px); line-height: 2.1; margin: 0; color: #FFE9B8; font-weight: 700; }
.up-hero-en { font-size: clamp(15px, 2.2vw, 18px); line-height: 1.7; margin: 6px auto 0; max-width: 560px; opacity: .92; }
.up-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }
.up-hero-btn {
    display: inline-flex; flex-direction: column; align-items: center; gap: 1px; padding: 13px 28px; border-radius: 999px;
    text-decoration: none; font-weight: 800; font-size: 17px; line-height: 1.5; transition: transform .2s ease, box-shadow .2s ease;
}
.up-hero-btn small { font-size: 11.5px; }
.up-hero-btn:hover { transform: translateY(-3px); }
.up-hero-btn-primary { background: #fff; color: var(--up-blue-deep); box-shadow: 0 10px 26px rgba(0, 0, 0, .25); }
.up-hero-btn-primary:hover { box-shadow: 0 16px 34px rgba(0, 0, 0, .32); color: var(--up-blue-deep); }
.up-hero-btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; border: 2px solid rgba(255, 255, 255, .7); }
.up-hero-btn-ghost:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.up-hero-continue { margin-top: 20px; }
.up-hero-continue a {
    display: inline-block; max-width: 100%; padding: 10px 18px; border-radius: 14px; text-decoration: none;
    background: rgba(255, 255, 255, .16); color: #fff; font-weight: 700; font-size: 15px; border: 1px dashed rgba(255, 255, 255, .55);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.up-hero-continue a:hover { background: rgba(255, 255, 255, .26); }

.up-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: -26px 18px 0; position: relative; z-index: 2; }
.up-stat {
    background: #fff; border-radius: 18px; padding: 16px 12px; text-align: center;
    border: 1px solid var(--up-line); box-shadow: var(--up-shadow);
}
.up-stat b { display: block; font-size: 30px; line-height: 1.2; color: var(--up-blue); font-weight: 800; }
.up-stat span { font-size: 13.5px; color: #475569; font-weight: 600; }

.up-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 26px 0 8px; }
.up-action-card {
    --ac: var(--up-blue); --ac-soft: var(--up-blue-soft);
    display: block; text-decoration: none; color: var(--up-navy); background: #fff; border-radius: 22px;
    padding: 22px 18px; border: 1px solid var(--up-line); border-top: 5px solid var(--ac); box-shadow: var(--up-shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}
.up-action-card:hover { transform: translateY(-6px); box-shadow: var(--up-shadow-hover); color: var(--up-navy); }
.up-ac-green { --ac: var(--up-green); --ac-soft: #E8F8EE; }
.up-ac-amber { --ac: var(--up-amber); --ac-soft: #FFF4DC; }
.up-ac-purple { --ac: #7C3AED; --ac-soft: #F1EAFE; }
.up-action-icon {
    display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 16px;
    font-size: 30px; background: var(--ac-soft); margin-bottom: 10px;
}
.up-action-card h3 { margin: 0 0 6px; font-size: 20px; color: var(--up-navy); }
.up-action-card p { margin: 0; font-size: 14px; line-height: 1.8; color: #475569; }

@media (max-width: 900px) { .up-actions { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) {
    .up-home-showcase { padding: 10px 12px 4px; }
    .up-hero { border-radius: 22px; padding: 38px 16px 44px; }
    .up-hero-btn { width: 100%; justify-content: center; }
    .up-stats { margin: -22px 8px 0; gap: 10px; }
    .up-stat b { font-size: 24px; }
    .up-actions { gap: 12px; }
    .up-action-card { padding: 16px 12px; border-radius: 18px; }
    .up-action-icon { width: 48px; height: 48px; font-size: 25px; }
    .up-action-card h3 { font-size: 17px; }
    .up-action-card p { font-size: 12.5px; }
}

/* Showcase without its own hero (the site's existing Elementor banner stays on top) */
.up-no-hero .up-stats { margin: 4px 0 0; }
.up-continue-standalone { text-align: center; margin: 0 0 14px; }
.up-continue-standalone a {
    display: inline-block; max-width: 100%; padding: 10px 18px; border-radius: 14px; text-decoration: none;
    background: var(--up-blue-soft); color: var(--up-blue); border: 1px dashed rgba(0, 91, 172, .45); font-weight: 700; font-size: 15px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.up-continue-standalone a:hover { background: #dbe8f8; }

/* ---- Scroll progress bar + back-to-top ---- */
.up-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100000; pointer-events: none; }
.up-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--up-blue), var(--up-green), var(--up-amber)); }
.up-totop {
    position: fixed; bottom: 24px; right: 18px; z-index: 9980; width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
    background: linear-gradient(135deg, var(--up-blue), #0A74D6); color: #fff; font-size: 20px; line-height: 1;
    box-shadow: 0 8px 20px rgba(0, 91, 172, .4); opacity: 0; visibility: hidden; transform: translateY(12px);
    transition: opacity .25s, transform .25s, visibility .25s;
}
.up-totop.show { opacity: 1; visibility: visible; transform: none; }

/* ---- Mobile bottom navigation ---- */
.up-bnav { display: none; }
@media (max-width: 768px) {
    .up-bnav {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; direction: rtl;
        background: rgba(255, 255, 255, .97); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
        border-top: 1px solid var(--up-line); box-shadow: 0 -6px 22px rgba(15, 23, 42, .1);
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    }
    .up-bnav a {
        flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border-radius: 14px;
        text-decoration: none; color: #475569; font-size: 11.5px; font-weight: 700; line-height: 1.5; transition: background .2s, color .2s;
    }
    .up-bnav a span { font-size: 21px; line-height: 1.2; }
    .up-bnav a.active { color: var(--up-blue); background: var(--up-blue-soft); }
    body.up-has-bnav { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
    .up-totop { bottom: calc(80px + env(safe-area-inset-bottom)); }
    body #up-em-browse-btn { bottom: calc(82px + env(safe-area-inset-bottom)) !important; }
}

/* ---- Scroll reveal (class is added by JS only, so no-JS = fully visible) ---- */
.up-reveal { opacity: 0; translate: 0 18px; transition: opacity .6s ease, translate .6s ease; }
.up-reveal.up-in { opacity: 1; translate: 0 0; }

/* ---- Dark mode ---- */
body.dark-mode { --up-line: #2A3647; --up-navy: #E5ECF6; }
body.dark-mode .up-stat, body.dark-mode .up-action-card, body.dark-mode .up-bnav { background: #162033; }
body.dark-mode .up-stat span, body.dark-mode .up-action-card p, body.dark-mode .up-bnav a { color: #A9B6C9; }
body.dark-mode .up-bnav a.active { background: #1E2D46; color: #8CC4FF; }
body.dark-mode .up-action-card h3, body.dark-mode .up-stat b { color: #E5ECF6; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .up-hero::before, .up-hero::after { animation: none; }
    .up-reveal { opacity: 1; translate: none; transition: none; }
}
@media print { .up-progress, .up-totop, .up-bnav { display: none !important; } body.up-has-bnav { padding-bottom: 0; } }

/* ---- HERO SKIN: add the CSS class  up-hero-skin  to the existing Elementor
   hero section (Advanced -> CSS Classes) and it gets the new look. ---- */
.up-hero-skin {
    position: relative; overflow: hidden; color: #fff; border-radius: 26px;
    background: radial-gradient(1000px 360px at 85% -10%, rgba(249, 168, 37, .35), transparent 60%),
                radial-gradient(800px 380px at 0% 110%, rgba(0, 166, 81, .45), transparent 60%),
                linear-gradient(135deg, #003D75 0%, #005BAC 55%, #0A74D6 100%) !important;
    box-shadow: 0 20px 50px rgba(0, 61, 117, .28);
}
.up-hero-skin .elementor-heading-title, .up-hero-skin h1, .up-hero-skin h2, .up-hero-skin h3 { color: #fff !important; }
.up-hero-skin p, .up-hero-skin .elementor-widget-text-editor, .up-hero-skin .elementor-widget-text-editor * { color: rgba(255, 255, 255, .94) !important; }
.up-hero-skin .elementor-button { background: #fff !important; color: #003D75 !important; box-shadow: 0 10px 26px rgba(0, 0, 0, .25); }
.up-hero-skin .elementor-button:hover { background: #FFE9B8 !important; color: #003D75 !important; }

/* =====================================================
   v96 — overflow guard, hidden honeypot, filter bar, footer
   ===================================================== */
html, body { overflow-x: clip; }
.up-hp { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; white-space: nowrap; }

/* Filter bar (class / subject pages): always-visible selected text */
.up-filter-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: center; background: #fff; border: 1px solid var(--up-line, #E2E8F0); border-radius: 16px; padding: 16px; box-shadow: 0 6px 20px rgba(15,23,42,.06); margin: 16px 0 24px; }
.up-filter-bar .up-filter-input,
.up-filter-bar .up-filter-select { width: 100%; min-height: 48px; box-sizing: border-box; padding: 10px 14px; font-size: 16px; line-height: 1.4; color: #0F172A !important; -webkit-text-fill-color: #0F172A; background-color: #fff !important; border: 1.5px solid #CBD5E1; border-radius: 12px; opacity: 1; }
.up-filter-bar .up-filter-select option { color: #0F172A; background: #fff; }
.up-filter-bar .up-filter-input::placeholder { color: #64748B; opacity: 1; -webkit-text-fill-color: #64748B; }
.up-filter-bar .up-filter-input:focus,
.up-filter-bar .up-filter-select:focus { outline: none; border-color: var(--up-blue, #005BAC); box-shadow: 0 0 0 3px rgba(0,91,172,.18); }
.up-filter-bar #up-filter-btn { min-height: 48px; font-size: 16px; font-weight: 700; color: #fff !important; background: var(--up-blue, #005BAC) !important; border: 0; border-radius: 12px; cursor: pointer; }
.up-filter-bar #up-filter-btn:hover { background: var(--up-deep, #003D75) !important; }
@media (max-width: 600px) { .up-filter-bar { grid-template-columns: 1fr; } }

/* Professional footer */
body.up-custom-footer .site-footer, body.up-custom-footer #colophon { display: none !important; }
.up-site-footer { direction: ltr; text-align: left; background: #0F172A; color: #CBD5E1; margin-top: 48px; font-size: 15px; line-height: 1.7; }
.up-sf-wrap { max-width: 1200px; margin: 0 auto; padding: 48px 20px 28px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.up-sf-logo { }
.up-sf-logo::after { content: ""; display: block; width: 44px; height: 3px; background: var(--up-green, #00A651); border-radius: 2px; margin-top: 8px; }
.up-sf-col p { margin: 8px 0; color: #94A3B8; }
.up-sf-urdu { font-size: 18px; color: #F9A825 !important; }
.up-sf-col h4 { color: #fff; font-size: 16px; margin: 0 0 14px; text-transform: uppercase; letter-spacing: 1px; }
.up-sf-col ul { list-style: none; margin: 0; padding: 0; }
.up-sf-col li { margin: 0 0 8px; }
.up-sf-col a { color: #CBD5E1; text-decoration: none; transition: color .2s, padding .2s; }
.up-sf-col a:hover { color: #fff; padding-inline-start: 4px; }
.up-sf-bar { border-top: 1px solid #1E293B; max-width: 1200px; margin: 0 auto; padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 13px; color: #94A3B8; }
@media (max-width: 900px) { .up-sf-wrap { grid-template-columns: 1fr 1fr; padding-top: 36px; } .up-sf-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .up-sf-wrap { grid-template-columns: 1fr 1fr; gap: 24px; } .up-sf-bar { flex-direction: column; text-align: center; } }
@media (max-width: 768px) { body.up-has-bnav .up-site-footer { padding-bottom: 8px; } }

/* English info pages (About Us / Privacy Policy): whole page LTR, left-aligned, incl. title */
body.up-ltr-page .entry-header, body.up-ltr-page .entry-title, body.up-ltr-page .entry-content, body.up-ltr-page .site-content, body.up-ltr-page .ast-container { direction: ltr; text-align: left; }
body.up-ltr-page .up-info-page, body.up-ltr-page .up-info-page * { text-align: left; }
body.up-ltr-page .up-info-page ul, body.up-ltr-page .up-info-page ol { padding-left: 22px; padding-right: 0; }
body.up-ltr-page .up-info-page [dir="rtl"] { text-align: right; }

/* =====================================================
   v98 — stronger filter text, About CTA, footer robustness, Latin font
   ===================================================== */
body .up-filter-bar { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
body .up-filter-bar select.up-filter-select,
body .up-filter-bar input.up-filter-input {
    -webkit-appearance: menulist; appearance: auto;
    display: block; width: 100% !important; height: 52px !important; min-height: 52px !important; box-sizing: border-box !important;
    margin: 0 !important; padding: 0 14px !important;
    font-size: 17px !important; font-weight: 600 !important; line-height: 52px !important; text-indent: 0 !important;
    color: #0F172A !important; -webkit-text-fill-color: #0F172A !important;
    background-color: #FFFFFF !important; border: 2px solid #94A3B8 !important; border-radius: 12px !important;
    opacity: 1 !important; text-shadow: none !important; text-align: start; overflow: hidden; text-overflow: ellipsis;
}
body .up-filter-bar select.up-filter-select option { font-size: 17px; line-height: 1.6; color: #0F172A !important; background: #FFFFFF !important; }
body .up-filter-bar input.up-filter-input::placeholder { color: #475569 !important; -webkit-text-fill-color: #475569 !important; opacity: 1; font-weight: 500; }
body .up-filter-bar select.up-filter-select:focus, body .up-filter-bar input.up-filter-input:focus { border-color: #005BAC !important; box-shadow: 0 0 0 3px rgba(0,91,172,.2) !important; }
body .up-filter-bar #up-filter-btn { height: 52px; line-height: 1; padding: 0 18px; font-size: 17px; }
@media (max-width: 600px) { body .up-filter-bar select.up-filter-select, body .up-filter-bar input.up-filter-input { font-size: 16px !important; } }

/* About CTA buttons: clean, no overlap, no underline */
.up-about-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; padding: 28px 10px; }
.up-about-cta p { flex: 0 0 100%; margin: 0 0 4px; }
.up-about-cta .up-btn, .up-about-cta a { display: inline-flex; align-items: center; justify-content: center; height: auto !important; min-height: 48px; margin: 0 !important; padding: 12px 28px !important; line-height: 1.3 !important; text-decoration: none !important; border-radius: 30px; font-weight: 700; position: static !important; transform: none; }
.up-about-cta .up-btn-primary { background: #005BAC; color: #fff !important; border: 2px solid #005BAC; }
.up-about-cta .up-btn-outline { background: #fff; color: #005BAC !important; border: 2px solid #005BAC; }

/* Latin text on English pages / footer: readable sans-serif, normal spacing */
.up-info-ltr, .up-info-ltr *, .up-site-footer, .up-site-footer *:not([dir="rtl"]):not(.up-sf-urdu), body.up-ltr-page .entry-title {
    font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; word-spacing: normal; letter-spacing: normal;
}
.up-info-ltr li, .up-info-ltr p { line-height: 1.7; }
.up-info-ltr a:not(.up-btn) { text-decoration: underline; text-underline-offset: 2px; }

/* Footer: never wider than the screen */
.up-site-footer { width: 100%; max-width: 100%; box-sizing: border-box; position: relative; left: 0; right: 0; clear: both; overflow: hidden; }
.up-sf-wrap { width: 100%; max-width: 1200px; box-sizing: border-box; margin: 0 auto; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); }
.up-sf-bar { box-sizing: border-box; width: 100%; }
.up-sf-col { min-width: 0; overflow-wrap: anywhere; }
.up-bi-link { white-space: nowrap; }
.up-bi-sep { opacity: .6; margin: 0 2px; }
@media (max-width: 900px) { .up-sf-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* =====================================================
   v99 — info-page layout, subject tags, select font, footer
   ===================================================== */
.up-info-main { display: block; width: 100%; max-width: 100%; margin: 0; padding: 24px 16px 8px; box-sizing: border-box; float: none; }
.up-info-wrap { width: 100%; max-width: 960px; margin: 0 auto; box-sizing: border-box; }
.up-info-title { font-size: clamp(24px, 4vw, 36px); line-height: 1.4; margin: 8px 0 18px; color: #0F172A; font-weight: 800; }
body.up-info-body-page #secondary, body.up-info-body-page .widget-area, body.up-info-body-page .ast-breadcrumbs-wrapper { display: none !important; }
body.up-info-body-page .up-info-page, body.up-info-body-page .up-info-card { max-width: 100%; box-sizing: border-box; }
.up-info-body img { max-width: 100%; height: auto; }

/* Kan SL / Eng TL tag (shown everywhere the subject name appears) */
.up-subject-short-tag { display: inline-block; margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px; background: #E0F2FE; color: #075985; font: 700 11px/1.7 Inter, "Segoe UI", Arial, sans-serif; letter-spacing: .2px; vertical-align: middle; white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
option .up-subject-short-tag { all: unset; }

/* Dropdowns: Nastaliq clips inside <select>, so use a compact Arabic-script font there */
select, select option, .up-filter-select { font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Noto Sans Arabic", Arial, sans-serif !important; }
body .up-filter-bar select.up-filter-select { font-size: 18px !important; font-weight: 600 !important; line-height: normal !important; padding-top: 0 !important; padding-bottom: 0 !important; }

/* Footer: hide every Astra footer bar; keep our footer clear of the mobile bottom nav */
body.up-custom-footer .site-footer, body.up-custom-footer #colophon, body.up-custom-footer .ast-small-footer, body.up-custom-footer .site-below-footer-wrap, body.up-custom-footer .site-primary-footer-wrap, body.up-custom-footer .ast-footer-copyright { display: none !important; }
@media (max-width: 768px) {
  body.up-has-bnav { padding-bottom: 0 !important; }
  .up-site-footer { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* =====================================================
   v100 — RehbarNova logo (header + footer)
   Header: the plain "rehbarnova.com" text is replaced by the SVG logo via CSS
   (text stays in the DOM for screen readers/SEO).
   ===================================================== */
.site-header .site-title a, .ast-site-identity .site-title a, .ast-site-title-wrap .site-title a {
  display: block; width: 214px; height: 48px; font-size: 0 !important; line-height: 0 !important; color: transparent !important; overflow: hidden; text-indent: 0;
  background: url("../img/logo-full.svg") no-repeat center / contain;
}
.site-header .site-description, .ast-site-identity .site-description { display: none !important; }
@media (max-width: 768px) { .site-header .site-title a, .ast-site-identity .site-title a { width: 168px; height: 40px; } }
.up-sf-logo { display: inline-block; margin-bottom: 8px; }
.up-sf-logo::after { display: none; }
.up-sf-logo img { height: 52px; width: auto; display: block; }

/* ===== v111: Teacher Corner / download cards — clean, no overlap ===== */
.up-download-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 18px; align-items: stretch; }
.up-download-grid > .up-download-card {
    width: auto !important; margin: 0 !important; box-sizing: border-box;
    display: flex; flex-direction: column; gap: 10px;
    padding: 20px 18px 18px; background: #fff; border: 1px solid #E5EDF7; border-radius: 16px;
    box-shadow: 0 4px 16px rgba(15, 55, 110, .07); position: relative; overflow: hidden;
}
.up-download-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, #005BAC, #16A34A); }
.up-download-card h3 { margin: 4px 0 0 !important; font-size: 17px !important; line-height: 2 !important; overflow-wrap: anywhere; }
.up-download-card p { margin: 0 !important; font-size: 13.5px; line-height: 2; color: #475569; overflow-wrap: anywhere; max-height: 6.2em; overflow: hidden; }
.up-download-card p:empty { display: none; }
.up-download-card .up-card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }
.up-download-card .up-card-actions .up-btn { flex: 1 1 calc(50% - 5px); min-width: 120px; }
.up-download-card .up-card-actions .up-print-branded-btn { flex: 1 1 100%; }
.up-download-card .up-btn, .up-download-card .up-print-branded-btn {
    display: flex !important; align-items: center; justify-content: center; text-align: center;
    box-sizing: border-box; margin: 0 !important; min-height: 44px;
    padding: 8px 14px !important; line-height: 1.9 !important; white-space: normal; float: none !important;
}
.up-download-card .up-print-branded-btn { font-size: 13.5px; border-radius: 10px; }
.up-related-download-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.up-related-download-label { flex: 1 1 160px; min-width: 0; line-height: 1.9; overflow-wrap: anywhere; }
.up-related-download-item .up-btn, .up-related-download-item .up-print-branded-btn { line-height: 1.8; white-space: normal; }
.up-chapter-card h3, .up-content-card h3, .up-quiz-card h3, .up-tool-card h3 { line-height: 1.95; overflow-wrap: anywhere; }
.up-chapter-card p, .up-content-card p { line-height: 1.95; }

/* =====================================================================
   v113 — Premium header / main menu (colour, shape, motion only; the
   dropdown + mobile-accordion mechanics in menu-accordion.css untouched)
   ===================================================================== */
#masthead { position: relative; background: rgba(255, 255, 255, .92) !important; -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid rgba(0, 91, 172, .10); z-index: 1000; }
#masthead::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; z-index: 2; background: linear-gradient(90deg, #005BAC 0%, #00A651 50%, #F9A825 100%); background-size: 200% 100%; animation: up-hdr-flow 9s linear infinite; }
@keyframes up-hdr-flow { 0% { background-position: 0 0; } 100% { background-position: 200% 0; } }
#masthead .main-header-bar, #masthead .ast-primary-header-bar, #masthead .site-primary-header-wrap { background: transparent !important; border-bottom: 0 !important; }
.site-header .site-title a, .ast-site-identity .site-title a { transition: transform .3s cubic-bezier(.2, .8, .2, 1), filter .3s ease; filter: drop-shadow(0 3px 5px rgba(0, 61, 117, .18)); }
.site-header .site-title a:hover { transform: translateY(-2px) scale(1.04); filter: drop-shadow(0 8px 12px rgba(0, 61, 117, .30)); }
@media (min-width: 922px) {
    #masthead { position: sticky; top: 0; }
    body.admin-bar #masthead { top: 32px; }
    .main-header-menu { gap: 4px; align-items: center; }
    .main-header-menu > .menu-item > a {
        position: relative; font-weight: 700 !important; letter-spacing: .1px;
        padding: 9px 16px !important; margin: 0 2px; border-radius: 999px; line-height: 1.7 !important;
        color: #0F2A4A; box-shadow: none !important;
        transition: color .25s ease, background-color .25s ease, transform .25s ease, box-shadow .25s ease;
    }
    .main-header-menu > .menu-item > a::after {
        content: ""; position: absolute; left: 50%; bottom: 3px; width: 0; height: 3px; border-radius: 3px;
        transform: translateX(-50%); background: linear-gradient(90deg, #00A651, #F9A825); transition: width .3s ease;
    }
    .main-header-menu > .menu-item:hover > a { background: linear-gradient(135deg, #EAF3FF, #F2FBF6); color: #003D75; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0, 61, 117, .14) !important; }
    .main-header-menu > .menu-item:hover > a::after { width: 46%; }
    .main-header-menu > .menu-item.current-menu-item > a,
    .main-header-menu > .menu-item.current-menu-ancestor > a,
    .main-header-menu > .menu-item.current_page_item > a {
        color: #fff !important; background: linear-gradient(135deg, #005BAC, #0A7BD1 55%, #00A651);
        box-shadow: 0 8px 20px rgba(0, 91, 172, .35) !important;
    }
    .main-header-menu > .menu-item.current-menu-item > a::after, .main-header-menu > .menu-item.current-menu-ancestor > a::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { #masthead::before { animation: none; } .main-header-menu > .menu-item > a, .site-header .site-title a { transition: none; } }
@media (max-width: 921px) {
    #masthead .ast-mobile-menu-buttons .menu-toggle, #masthead .ast-button-wrap .menu-toggle { border-radius: 12px; }
}

/* ===== v116: YouTube video on resource cards + responsive embeds ===== */
.up-card-video { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #0B1F3A; margin: 4px 0 2px; box-shadow: 0 6px 16px rgba(0, 20, 60, .18); }
.up-card-video img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-card-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.up-card-video-play { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: rgba(220, 38, 38, .92); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; padding-left: 4px; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); transition: transform .2s ease; }
.up-card-video:hover .up-card-video-play { transform: scale(1.1); }
.up-card-video-tag { position: absolute; right: 8px; top: 8px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; line-height: 1.8; padding: 0 10px; border-radius: 999px; }
.up-card-video.is-playing .up-card-video-play, .up-card-video.is-playing .up-card-video-tag { display: none; }
.up-chapter-content iframe, .up-chapter-content .wp-block-embed__wrapper iframe, .up-chapter-content .wp-block-embed iframe { max-width: 100%; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 12px; }
.up-chapter-content .wp-block-embed, .up-chapter-content figure.wp-block-embed { margin: 18px 0; max-width: 100%; }

/* ===== v117: Kannada / English subjects are written left-to-right ===== */
.up-card-ltr h3, .up-card-ltr h3 a, .up-card-ltr p,
.up-card-ltr .up-quiz-card-type { direction: ltr; text-align: left; }
.up-chapter-card.up-card-ltr h3 { margin-top: 30px; } /* clears the number badge in the corner */
.up-quiz-directory-card.up-card-ltr { text-align: left; }
.up-quiz-directory-card.up-card-ltr .up-quiz-card-badges { justify-content: flex-start; }
.up-content-dir-ltr .up-chapter-hero h1, .up-content-dir-ltr .up-short-description,
.up-content-dir-ltr .up-chapter-content, .up-content-dir-ltr .up-chapter-block h2 { direction: ltr; text-align: left; }
.up-content-dir-ltr .up-chapter-hero { text-align: left; }

/* ===== v117: English names beside Urdu (menu, bottom bar, Team Quiz) ===== */
.main-header-menu > .menu-item > a .up-nav-en { display: block; font: 600 10.5px/1.25 "Segoe UI", Roboto, Arial, sans-serif; letter-spacing: .3px; text-align: center; opacity: .72; margin-top: 1px; direction: ltr; }
.main-header-menu > .menu-item.current-menu-item > a .up-nav-en { opacity: .95; }
.main-header-menu .sub-menu .up-nav-en, .ast-mobile-popup-drawer .up-nav-en, .ast-mobile-header-wrap .up-nav-en {
    display: inline-block; font: 600 11px/1.4 "Segoe UI", Roboto, Arial, sans-serif; opacity: .65; margin-inline-start: 8px; direction: ltr; unicode-bidi: isolate;
}
.up-bnav a small { display: block; font: 600 9.5px/1.2 "Segoe UI", Roboto, Arial, sans-serif; letter-spacing: .2px; opacity: .75; margin-top: -1px; }
.tq-hero h1 .up-en-sub { display: block; font: 600 .42em/1.6 "Segoe UI", Roboto, Arial, sans-serif; letter-spacing: .6px; opacity: .85; margin-top: 4px; }
.tq-hero .up-en-line { display: inline-block; font: 500 13px/1.7 "Segoe UI", Roboto, Arial, sans-serif; opacity: .8; margin-top: 6px; }
@media (max-width: 768px) { .up-bnav a { padding: 5px 1px; } }

/* ===== v117: Teacher Corner — tools tiles + arrange-by switch ===== */
.up-en-sub { display: inline-block; font: 600 .55em/1.5 "Segoe UI", Roboto, Arial, sans-serif; letter-spacing: .5px; opacity: .7; margin-inline-start: 8px; vertical-align: middle; }
.up-tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-top: 16px; }
.up-tool-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; border-radius: 18px; text-decoration: none !important; color: #0F2A4A;
    background: linear-gradient(145deg, #fff, #F1F7FF); border: 1px solid #DCE8F7; box-shadow: 0 6px 18px rgba(0, 61, 117, .08); transition: transform .25s ease, box-shadow .25s ease; position: relative; overflow: hidden; }
.up-tool-tile::after { content: ""; position: absolute; inset: auto -30px -30px auto; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 166, 81, .16), rgba(0, 166, 81, 0) 70%); }
.up-tool-tile:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(0, 61, 117, .16); }
.up-tool-tile-icon { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; background: linear-gradient(135deg, #005BAC, #0A7BD1 60%, #00A651); box-shadow: 0 8px 16px rgba(0, 91, 172, .28); }
.up-tool-tile-title { font-size: 18px; font-weight: 800; line-height: 1.9; }
.up-tool-tile-en { font: 700 12.5px/1.4 "Segoe UI", Roboto, Arial, sans-serif; color: #005BAC; letter-spacing: .3px; margin-top: -4px; }
.up-tool-tile-desc { font-size: 13px; line-height: 1.9; color: #475569; }
.up-tool-tile-go { margin-top: auto; font-size: 13.5px; font-weight: 800; color: #00853F; padding-top: 6px; }
.up-view-switch { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 22px 0 6px; padding: 10px; border-radius: 16px; background: #F1F7FF; border: 1px solid #DCE8F7; }
.up-view-switch-label { font-size: 13px; font-weight: 700; color: #475569; padding: 0 8px; }
.up-view-switch a { display: inline-flex; flex-direction: column; align-items: center; padding: 6px 16px; border-radius: 999px; text-decoration: none !important; color: #0F2A4A; font-weight: 700; font-size: 14px; line-height: 1.7; background: #fff; border: 1px solid #DCE8F7; transition: all .2s ease; }
.up-view-switch a small { font: 600 10.5px/1.2 "Segoe UI", Roboto, Arial, sans-serif; opacity: .7; }
.up-view-switch a:hover { border-color: #005BAC; transform: translateY(-1px); }
.up-view-switch a.is-active { color: #fff; background: linear-gradient(135deg, #005BAC, #0A7BD1 55%, #00A651); border-color: transparent; box-shadow: 0 8px 18px rgba(0, 91, 172, .3); }
.up-teacher-group > h2 { display: flex; align-items: center; gap: 10px; }
.up-tool-page .up-tool-body { margin: 18px 0; }
.up-tool-page .up-tool-body > * { max-width: 100%; }
.up-tool-page .up-tool-body iframe { width: 100%; min-height: 70vh; border: 0; border-radius: 12px; }
.up-tool-back { margin-top: 24px; }
body.dark-mode .up-tool-tile, body.dark-mode .up-view-switch { background: #162033; border-color: #263754; color: #E5ECF6; }
body.dark-mode .up-tool-tile-title, body.dark-mode .up-view-switch a { color: #E5ECF6; background: #1B2A44; }

/* ===== v118: quiz-card class/subject tags, Medium strip, dark-mode polish ===== */
.up-quiz-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.up-qm { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 1.9; padding: 0 10px; border-radius: 999px; background: #EAF3FF; color: #0F4C8A; font-weight: 700; }
.up-qm-subj { background: #E9F8EF; color: #0B6B3A; }
.up-qm b { font: 800 10.5px/1.4 "Segoe UI", Roboto, Arial, sans-serif; background: rgba(0, 0, 0, .08); border-radius: 6px; padding: 0 5px; }
.up-quiz-directory-card.up-card-ltr .up-quiz-card-meta { justify-content: flex-start; }
.up-medium-strip { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 0 14px; }
.up-medium-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 999px; text-decoration: none !important; color: #0F2A4A; background: #fff; border: 1px solid #DCE8F7; box-shadow: 0 4px 12px rgba(0, 61, 117, .08); font-size: 15px; line-height: 1.8; transition: transform .2s ease, box-shadow .2s ease; }
a.up-medium-chip:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0, 61, 117, .16); }
.up-medium-chip small { font: 600 11px/1.3 "Segoe UI", Roboto, Arial, sans-serif; opacity: .7; }
.up-medium-soon { opacity: .75; border-style: dashed; cursor: default; }
body.dark-mode .up-download-card, body.dark-mode .up-chapter-card, body.dark-mode .up-content-card, body.dark-mode .up-quiz-directory-card, body.dark-mode .up-medium-chip { background: #162033; border-color: #263754; color: #E5ECF6; }
body.dark-mode .up-download-card h3, body.dark-mode .up-chapter-card h3 a, body.dark-mode .up-quiz-directory-card h3 { color: #E5ECF6; }
body.dark-mode .up-download-card p, body.dark-mode .up-chapter-card p { color: #A9B6C9; }
body.dark-mode .up-qm { background: #1E2D46; color: #9CC8FF; }
body.dark-mode .up-qm-subj { background: #173A2A; color: #8BE0B0; }

/* ===== v118: Team Quiz Competition — featured banner ===== */
.up-tq-banner { display: flex; align-items: center; gap: 16px; margin: 18px auto; max-width: 1100px; padding: 16px 20px; border-radius: 20px; text-decoration: none !important; color: #fff;
    background: linear-gradient(120deg, #F59E0B, #EF6C00 45%, #C2410C); box-shadow: 0 12px 28px rgba(194, 65, 12, .32); position: relative; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.up-tq-banner::after { content: ""; position: absolute; left: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 70%); }
.up-tq-banner:hover { transform: translateY(-3px); box-shadow: 0 18px 34px rgba(194, 65, 12, .4); }
.up-tq-banner-icon { font-size: 40px; width: 64px; height: 64px; flex: 0 0 64px; display: flex; align-items: center; justify-content: center; border-radius: 18px; background: rgba(255, 255, 255, .2); }
.up-tq-banner-text { flex: 1; display: flex; flex-direction: column; gap: 2px; line-height: 1.9; font-size: 14px; }
.up-tq-banner-text b { font-size: 20px; }
.up-tq-banner-text b small, .up-tq-banner-text small { font: 600 12px/1.5 "Segoe UI", Roboto, Arial, sans-serif; letter-spacing: .4px; opacity: .92; }
.up-tq-banner-go { font-weight: 800; background: #fff; color: #C2410C; padding: 8px 18px; border-radius: 999px; white-space: nowrap; line-height: 1.8; }
@media (max-width: 600px) { .up-tq-banner { flex-wrap: wrap; padding: 14px; } .up-tq-banner-go { width: 100%; text-align: center; } }
body.dark-mode .up-quiz-card-meta .up-qm { background: #1B2A44; color: #E5ECF6; }
body.dark-mode .up-nav-en, body.dark-mode .up-bnav a small { opacity: .85; }

/* v120: class / subject / lesson tags on Teacher Resource cards + page */
.up-tr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; justify-content: center; }
.up-tr-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; line-height: 1.8; background: #EEF4FF; color: #1E3A8A; border: 1px solid #D6E3FF; }
.up-tr-chip small { font-size: 10.5px; opacity: .75; }
.up-tr-chip-subject { background: #ECFDF5; color: #065F46; border-color: #CFEFE0; }
.up-tr-chip-lesson { background: #FFF7E6; color: #92400E; border-color: #F6E2B8; }
body.dark-mode .up-tr-chip { background: #1B2A44; color: #CFE0FF; border-color: #2B3F63; }
body.dark-mode .up-tr-chip-subject { background: #12332A; color: #A7F0D0; border-color: #1F4C3E; }
body.dark-mode .up-tr-chip-lesson { background: #3A2A10; color: #FFD99A; border-color: #5A431C; }

/* v121: English line next to every Urdu button / link (text comes from data-en, see bilingual-ui.js) */
.up-en { direction: ltr; unicode-bidi: isolate; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-weight: 500; letter-spacing: .01em; }
.up-en::after { content: attr(data-en); }
.up-quiz-card-cta .up-en, .up-quiz-card-type .up-en, .up-notice-label .up-en, .up-breadcrumb .up-en { display: inline-block; margin-inline-start: .45em; font-size: .78em; opacity: .85; }
.up-btn .up-en, button .up-en, .up-print-branded-btn .up-en, .up-card-actions a .up-en, .up-view-switch a .up-en { display: block; margin: 0; font-size: .74em; line-height: 1.3; opacity: .9; text-align: center; }
.up-btn[data-up-en], button[data-up-en], .up-print-branded-btn[data-up-en] { flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.up-quiz-card-cta[data-up-en] { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.5; }
.up-quiz-card-footer span .up-en { display: inline-block; margin-inline-start: .4em; font-size: .78em; opacity: .85; }

/* v122: English next to class / subject names (chips, popup rows, tabs) */
.up-en { margin-inline: .45em; font-size: .78em; opacity: .85; }
summary .up-en, .up-em-class summary .up-en { font-weight: 600; color: #005BAC; opacity: 1; }
body.dark-mode summary .up-en { color: #9CC8FF; }
.up-quiz-class-tab .up-en, .up-quiz-subject-tab .up-en { display: block; margin: 0; }

/* v123: English Medium shows English names only (Quiz Center tabs, popup); Urdu Medium keeps Urdu + small English line */
.up-lbl-sub { display: block; font-size: .72em; line-height: 1.3; opacity: .85; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.up-lbl-en { display: none; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-weight: 600; }
.up-medium-en .up-lbl-ur, .up-medium-en .up-lbl-sub { display: none; }
.up-medium-en .up-lbl-en { display: inline; }
.up-medium-en .up-subject-short-tag { display: none; }
.up-medium-en .up-quiz-class-tabs, .up-medium-en .up-quiz-subject-tabs, .up-medium-en .up-quiz-category-tabs { direction: ltr; }
.up-em-browse-box { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* =====================================================================
   v128 — English labels made prominent (bold, high-contrast pill) so a teacher who
   does not read English can still match every button to its English name,
   and an English-medium teacher finds it at a glance.
   ===================================================================== */
.up-btn .up-en, button .up-en, .up-print-branded-btn .up-en, .up-card-actions a .up-en, .up-view-switch a .up-en {
    font-size: .84em; font-weight: 800; letter-spacing: .02em; line-height: 1.35; opacity: 1;
    margin: 3px 0 0; padding: 1px 10px; border-radius: 999px; background: rgba(0,91,172,.10); color: #0B4A8F;
}
.up-btn-primary .up-en, .up-btn.up-quiz-submit .up-en, .tq-start-btn .up-en, button.up-btn-primary .up-en { background: rgba(255,255,255,.22); color: #fff; }
.up-btn-outline .up-en { background: rgba(0,91,172,.10); color: #0B4A8F; }
body.dark-mode .up-btn .up-en, body.dark-mode button .up-en { background: rgba(255,255,255,.14); color: #DCEBFF; }
.up-quiz-card-cta .up-en { font-weight: 800; color: #0B4A8F; }
.up-quiz-class-tab .up-lbl-sub, .up-quiz-subject-tab .up-lbl-sub, .up-quiz-class-tab .up-lbl-en, .up-quiz-subject-tab .up-lbl-en { font-weight: 800; }
.up-lbl-sub { font-weight: 700; opacity: 1; font-size: .78em; }

/* Team Quiz — dropdowns were clipped (Nastaliq font inside <select>) */
.tq-setup-card select, .up-team-quiz-page .up-form-grid select {
    width: 100%; min-height: 50px; height: auto; box-sizing: border-box; padding: 10px 14px; font-size: 16px !important; font-weight: 600;
    line-height: 1.5 !important; color: #0F172A !important; background-color: #fff !important; border: 1.5px solid #CBD5E1; border-radius: 12px;
    font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Noto Sans Arabic", Arial, sans-serif !important; overflow: visible; text-overflow: ellipsis;
}
.tq-setup-card select option { font-size: 16px; line-height: 1.6; color: #0F172A; background: #fff; }
.tq-setup-card select:focus { outline: none; border-color: #005BAC; box-shadow: 0 0 0 3px rgba(0,91,172,.18); }
.up-team-quiz-page .up-form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 700px) { .up-team-quiz-page .up-form-grid { grid-template-columns: repeat(3, 1fr); } }
.up-team-quiz-page .up-form-grid label { display: block; font-weight: 700; color: #0F172A; }
.up-team-quiz-page .up-form-grid label select { margin-top: 6px; }
.tq-lbl-en { margin-inline-start: .5em; padding: 1px 8px; border-radius: 999px; background: rgba(0,91,172,.10); color: #0B4A8F; font: 800 .78em/1.5 system-ui, "Segoe UI", Roboto, sans-serif; }
body.dark-mode .tq-setup-card select { color: #0F172A !important; }

/* Team Quiz with a Kannada / English / English-Medium quiz: buttons show ONLY the bold English label */
body.up-ui-en .up-team-quiz-page button[data-up-en], body.up-ui-en .up-team-quiz-page .up-btn[data-up-en] { font-size: 0 !important; line-height: 0; }
body.up-ui-en .up-team-quiz-page button[data-up-en] .up-en, body.up-ui-en .up-team-quiz-page .up-btn[data-up-en] .up-en {
    font-size: 17px !important; font-weight: 800; line-height: 1.4; background: transparent !important; color: inherit !important; padding: 0; margin: 0; letter-spacing: .01em;
}
body.up-ui-en .up-team-quiz-page { direction: ltr; }
body.up-ui-en .up-team-quiz-page .tq-question-text, body.up-ui-en .up-team-quiz-page .tq-options { direction: ltr; text-align: left; }

/* =====================================================================
   v130 — HSTR exam hub (/hstr/) + home card
   ===================================================================== */
.up-hstr-page { max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; }
.up-hstr-hero { text-align: center; padding: 26px 16px 22px; margin: 12px 0 18px; border-radius: 22px; color: #fff;
    background: linear-gradient(135deg, #0B4A8F 0%, #005BAC 45%, #00A651 120%); box-shadow: 0 14px 34px rgba(0,91,172,.25); }
.up-hstr-hero h1 { color: #fff; margin: 6px 0 8px; font-size: clamp(24px, 6vw, 34px); line-height: 1.8; }
.up-hstr-hero p { margin: 0 auto; max-width: 640px; opacity: .95; line-height: 1.9; }
.up-hstr-hero p small { display: block; opacity: .9; font-size: .85em; font-family: system-ui, "Segoe UI", Roboto, sans-serif; }
.up-hstr-hero .up-breadcrumb, .up-hstr-hero .up-breadcrumb a { color: rgba(255,255,255,.9); }
.up-hstr-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.up-hstr-hero .up-btn-outline { background: #fff; }
.up-hstr-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0 0 16px; }
@media (min-width: 700px) { .up-hstr-tiles { grid-template-columns: repeat(4, 1fr); } }
.up-hstr-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 16px 10px; border-radius: 18px;
    background: #fff; border: 2px solid #E2E8F0; color: #0F172A; text-decoration: none; box-shadow: 0 6px 16px rgba(15,23,42,.06); transition: transform .15s, box-shadow .15s, border-color .15s; }
.up-hstr-tile:hover, .up-hstr-tile.is-active { transform: translateY(-2px); border-color: #005BAC; box-shadow: 0 10px 22px rgba(0,91,172,.18); }
.up-hstr-tile.is-active { background: linear-gradient(180deg, #EAF3FF, #fff); }
.up-hstr-tile-ico { font-size: 30px; line-height: 1.3; }
.up-hstr-tile b { font-size: 17px; line-height: 1.8; }
.up-hstr-tile small { font: 800 12px/1.4 system-ui, "Segoe UI", Roboto, sans-serif; color: #0B4A8F; background: rgba(0,91,172,.10); padding: 1px 10px; border-radius: 999px; }
.up-hstr-tile em { font-style: normal; font-size: 12.5px; color: #64748B; margin-top: 4px; }
.up-hstr-search input { width: 100%; box-sizing: border-box; min-height: 48px; padding: 10px 16px; border-radius: 14px; border: 1.5px solid #CBD5E1; font-size: 16px; background: #fff; color: #0F172A; }
.up-hstr-search { margin-bottom: 8px; }
.up-hstr-section { margin-top: 24px; }
.up-hstr-section h2 { font-size: clamp(20px, 4.6vw, 26px); line-height: 1.9; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 3px solid #00A651; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.up-hstr-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .up-hstr-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .up-hstr-grid { grid-template-columns: repeat(3, 1fr); } }
.up-hstr-card { position: relative; padding: 16px 16px 14px; border-radius: 18px; background: #fff; border: 1.5px solid #E2E8F0; box-shadow: 0 6px 16px rgba(15,23,42,.06); display: flex; flex-direction: column; gap: 6px; }
.up-hstr-card-type { position: absolute; top: 12px; inset-inline-end: 14px; font-size: 22px; opacity: .85; }
.up-hstr-card h3 { margin: 0; padding-inline-end: 34px; font-size: 17px; line-height: 2; }
.up-hstr-card h3 a { color: #0F172A; text-decoration: none; }
.up-hstr-meta { margin: 0; font-size: 13.5px; color: #475569; }
.up-hstr-card .up-card-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.up-hstr-card.up-card-ltr { direction: ltr; text-align: left; }
.up-hstr-card.up-card-ltr h3 { padding-inline-end: 0; padding-inline-start: 0; padding-right: 34px; }
.up-hstr-card.up-card-ltr .up-hstr-card-type { inset-inline-end: auto; right: 14px; }
/* home card */
.up-action-card.up-ac-teal { background: linear-gradient(135deg, #0F766E, #0B4A8F); color: #fff; }
.up-action-card.up-ac-teal h3, .up-action-card.up-ac-teal p, .up-action-card.up-ac-teal small { color: #fff; }
.up-ac-wide { grid-column: 1 / -1; }
body.dark-mode .up-hstr-tile, body.dark-mode .up-hstr-card, body.dark-mode .up-hstr-search input { background: #14213A; border-color: #27385C; color: #E5ECF6; }
body.dark-mode .up-hstr-card h3 a, body.dark-mode .up-hstr-tile { color: #E5ECF6; }
body.dark-mode .up-hstr-tile small { background: rgba(255,255,255,.14); color: #DCEBFF; }
body.dark-mode .up-hstr-meta, body.dark-mode .up-hstr-tile em { color: #A9B8D0; }

.up-card-actions .up-btn-primary .up-en, .up-card-actions a.up-btn-primary .up-en { background: rgba(255,255,255,.22); color: #fff; }
.up-hstr-hero .up-btn-outline .up-en { background: rgba(0,91,172,.10); color: #0B4A8F; }

/* =====================================================================
   v136 — English-only interface (HSTR, Kannada, English, English Medium):
   BIG bold designer buttons. Applies to quiz buttons, cards and the HSTR hub.
   ===================================================================== */
.up-quiz-widget.up-quiz-dir-ltr .up-btn, .up-hstr-page .up-btn, .up-card-ltr .up-btn {
    min-height: 54px; padding: 12px 26px; border-radius: 16px; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
    font-size: 17px !important; font-weight: 800 !important; letter-spacing: .02em; line-height: 1.3; text-transform: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 6px 16px rgba(0,60,120,.14);
    transition: transform .15s ease, box-shadow .15s ease;
}
.up-quiz-widget.up-quiz-dir-ltr .up-btn:hover, .up-hstr-page .up-btn:hover, .up-card-ltr .up-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,60,120,.2); }
.up-quiz-widget.up-quiz-dir-ltr .up-btn-primary, .up-hstr-page .up-btn-primary, .up-card-ltr .up-btn-primary,
.up-quiz-widget.up-quiz-dir-ltr .up-quiz-submit { background: linear-gradient(135deg, #0A6CC8, #003D75) !important; color: #fff !important; border: 0 !important; }
.up-quiz-widget.up-quiz-dir-ltr .up-btn-outline, .up-hstr-page .up-btn-outline, .up-card-ltr .up-btn-outline,
.up-quiz-widget.up-quiz-dir-ltr .up-quiz-review-btn, .up-quiz-widget.up-quiz-dir-ltr .up-quiz-retry {
    background: #fff !important; color: #0B4A8F !important; border: 2.5px solid #0B6BC9 !important;
}
.up-quiz-widget.up-quiz-dir-ltr .up-quiz-submit, .up-quiz-widget.up-quiz-dir-ltr .up-quiz-result-actions .up-btn { width: 100%; max-width: 420px; margin: 8px auto; }
.up-quiz-widget.up-quiz-dir-ltr .up-quiz-result-actions { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.up-card-ltr .up-quiz-card-cta { font-size: 16px; font-weight: 800; color: #0B4A8F; letter-spacing: .02em; }
.up-card-ltr .up-quiz-card-type, .up-card-ltr .up-quiz-card-footer span { font-weight: 700; }
.up-quiz-modal-loading { font-weight: 700; }
body.dark-mode .up-quiz-widget.up-quiz-dir-ltr .up-btn-outline, body.dark-mode .up-hstr-page .up-btn-outline, body.dark-mode .up-card-ltr .up-btn-outline { background: #10233F !important; color: #DCEBFF !important; border-color: #5EA4F0 !important; }

/* =====================================================================
   v137 — Quiz Center cleaned up (Medium → Class → Subject) + Competitive Exams page
   ===================================================================== */
.up-quiz-center-page .up-quiz-medium-tabs, .up-quiz-center-page .up-quiz-class-tabs, .up-quiz-center-page .up-quiz-subject-tabs {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 980px; margin: 18px auto 0; padding: 0 14px; }
.up-quiz-center-page .up-quiz-medium-tab, .up-quiz-center-page .up-quiz-class-tab, .up-quiz-center-page .up-quiz-subject-tab {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; box-sizing: border-box;
    min-height: 62px; min-width: 100px; padding: 8px 16px; line-height: 1.35; text-align: center; font-size: 15px; font-weight: 700; touch-action: manipulation; }
.upq-ico { font-size: 20px; line-height: 1.25; }
.upq-ur { display: block; font-size: 1.05em; }
.upq-short, .upq-full { display: block; font: 800 .82em/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: .01em; }
.upq-full { display: none; }
.up-medium-en .upq-ur, .up-medium-en .upq-short { display: none; }
.up-medium-en .upq-full { display: block; font-size: 1em; }
.up-medium-en .up-quiz-medium-tabs, .up-medium-en .up-quiz-class-tabs, .up-medium-en .up-quiz-subject-tabs { direction: ltr; }
.up-quiz-center-page .up-quiz-subject-tab.active .upq-short, .up-quiz-center-page .up-quiz-subject-tab.active .upq-full,
.up-quiz-center-page .up-quiz-class-tab.active .upq-short { color: inherit; }
.up-quiz-center-page .up-quiz-medium-tab.active { background: linear-gradient(135deg, #005BAC, #003D75); color: #fff; border-color: transparent; }

.upq-banners { display: grid; grid-template-columns: 1fr; gap: 12px; max-width: 980px; margin: 18px auto 0; padding: 0 14px; }
@media (min-width: 760px) { .upq-banners { grid-template-columns: 1fr 1fr; } }
.upq-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; text-decoration: none !important; color: #fff !important;
    box-shadow: 0 10px 24px rgba(15,23,42,.18); transition: transform .2s, box-shadow .2s; direction: ltr; }
.upq-banner:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(15,23,42,.24); }
.upq-banner-exam { background: linear-gradient(135deg, #5B21B6, #2563EB); }
.upq-banner-team { background: linear-gradient(135deg, #F59E0B, #C2410C); }
.upq-banner-ico { font-size: 34px; line-height: 1; }
.upq-banner-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.upq-banner-txt b { font-size: 17px; font-weight: 800; }
.upq-banner-txt small { font-size: 13px; opacity: .92; }
.upq-banner-go { padding: 8px 16px; border-radius: 999px; background: #fff; color: #1E293B; font: 800 15px/1.2 system-ui, sans-serif; white-space: nowrap; }

/* Competitive Exams page */
.upx-page { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.upx-hero { background: linear-gradient(135deg, #5B21B6, #2563EB 60%, #00A651); }
.upx-hero h1 { font-weight: 800; }
.upx-hero-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.upx-hero-links .up-btn { background: rgba(255,255,255,.95); color: #1E3A8A !important; border-color: transparent; }
.upx-group { max-width: 980px; margin: 18px auto 0; padding: 0 14px; }
.upx-label { font-weight: 800; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: #475569; margin: 0 0 8px 4px; }
.upx-tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.upx-tab { min-height: 56px; padding: 10px 22px; border-radius: 999px; border: 2.5px solid #2563EB; background: #fff; color: #1E40AF; cursor: pointer;
    font: 800 17px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; touch-action: manipulation; transition: transform .15s, background .15s, box-shadow .15s; }
.upx-tab:hover { background: #EFF6FF; transform: translateY(-2px); }
.upx-tab.active { background: linear-gradient(135deg, #2563EB, #1E3A8A); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(37,99,235,.35); }
#upx-subjects .upx-tab { border-color: #F59E0B; color: #92400E; }
#upx-subjects .upx-tab:hover { background: #FFF7E6; }
#upx-subjects .upx-tab.active { background: linear-gradient(135deg, #F59E0B, #C2410C); color: #fff; box-shadow: 0 8px 18px rgba(245,158,11,.4); }
.upx-page .up-empty { text-align: center; padding: 28px 10px; font-weight: 700; color: #475569; }
body.dark-mode .upx-tab { background: #0F172A; color: #BFDBFE; }
body.dark-mode #upx-subjects .upx-tab { color: #FDE68A; }
body.dark-mode .upx-label { color: #CBD5E1; }
.upx-page{direction:ltr}

/* v138 — language subjects (Kannada / English): English name only, bold */
.upq-en-name { display: block; font: 800 1.02em/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.up-medium-en .upq-en-name { font-size: 1em; }

/* v139 — chapter videos: always 16:9, never stretched/cropped; many videos in a tidy grid */
.up-video-wrap { overflow: hidden; }
.up-video-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 8px; }
@media (min-width: 760px) { .up-video-grid.is-multi { grid-template-columns: 1fr 1fr; } .up-video-grid.is-multi .up-video-item:first-child { grid-column: 1 / -1; } }
.up-video-item { margin: 0; }
.up-video-item .up-card-video { margin: 0; border-radius: 16px; box-shadow: 0 10px 24px rgba(0,20,60,.22); }
.up-video-item .up-card-video-play { width: 68px; height: 68px; margin: -34px 0 0 -34px; font-size: 26px; }
.up-video-item figcaption { margin-top: 8px; font-weight: 800; font-size: 15px; line-height: 1.6; text-align: center; color: #0F172A; }
body.dark-mode .up-video-item figcaption { color: #E2E8F0; }
.up-video-embed { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; }
.up-video-embed iframe, .up-video-embed video { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }
.up-chapter-video iframe { max-width: 100%; }
