/* =============================================================================
   pages/exams.css
   ----
   Loaded by:  exams_home.html  +  exams_category.html  +  exam_search_advanced_page.html
   All selectors are scoped under `.xr` so styles never leak outside.

   Sections:
     1. Wrapper, hero (text + art), breadcrumbs, title, stats
     2. Decorative art (medal, orbital arcs, floating chips)
     3. Main grid (main + aside)
     4. Search bar + filter row + sort chips
     5. Category cards (exams_home)
     6. Exam cards (exams_category)
     7. Aside widgets (tip card, brand card, features panel, stats list, topics)
     8. Empty state
     9. Advanced-search post cards (re-uses post-card patterns from articles.css)
   ========================================================================== */

/* =============================================================================
   1. WRAPPER  +  HERO
   ========================================================================== */
.xr {
    --xr-gold-300: var(--gold-300);
    --xr-gold-400: var(--gold-400);
    --xr-gold-500: var(--gold-500);
    --xr-gold-line: var(--gold-line);
    --xr-navy: var(--navy-200);
    --xr-ink: var(--ink-white);
    --xr-ink-soft: var(--ink-soft);
    --xr-ink-muted: var(--ink-muted);
}

.xr-hero {
    position: relative;
    overflow: hidden;
    padding: 56px 0 44px;
    background:
        radial-gradient(ellipse 1000px 400px at 80% 0%, rgba(255, 194, 24, .07), transparent 70%),
        radial-gradient(ellipse 800px 400px at 10% 100%, rgba(65, 84, 173, .14), transparent 65%);
    border-bottom: 1px solid var(--line);
}
.xr-hero::before {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 194, 24, .35) 50%, transparent);
}

.xr-hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 2;
}
@media (max-width: 980px) {
    .xr-hero__inner { grid-template-columns: 1fr; gap: 30px; }
    .xr-home-art,
    .xr-cat-art { order: 2; }
}

.xr-hero__text { min-width: 0; }

.xr-breadcrumbs {
    display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px;
    padding: 7px 14px;
    margin: 0 0 18px;
    border-radius: var(--r-pill);
    background: var(--surface-1);
    border: 1px solid var(--line);
    backdrop-filter: blur(8px);
    font-size: .8rem;
    color: var(--ink-muted);
}
.xr-breadcrumbs a {
    color: var(--ink-soft);
    text-decoration: none;
    padding: 2px 6px; border-radius: 999px;
    transition: color var(--t-fast);
}
.xr-breadcrumbs a:hover { color: var(--gold-300); }
.xr-sep { color: var(--ink-faint); }
.xr-current { color: var(--gold-300); font-weight: 700; }

.xr-page-title {
    font-family: var(--ff-display);
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    font-weight: 900;
    line-height: 1.25;
    color: var(--ink-white);
    letter-spacing: -.012em;
    margin: 0 0 14px;
}
.xr-accent {
    background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    position: relative;
    white-space: nowrap;
}
.xr-accent::after {
    content: ""; position: absolute;
    left: 0; right: 0; bottom: -2px; height: 3px;
    background: linear-gradient(90deg,
        rgba(255, 194, 24, 0), rgba(255, 194, 24, .55) 30%,
        rgba(255, 194, 24, .75) 70%, rgba(255, 194, 24, 0));
    border-radius: 999px;
}

.xr-page-subtitle {
    color: var(--ink-soft);
    font-size: 1rem;
    line-height: 1.95;
    max-width: 64ch;
    margin: 0 0 22px;
    padding-right: 14px;
    border-right: 3px solid var(--gold-500);
}
.xr-page-subtitle__num {
    display: inline-block;
    color: var(--gold-300);
    font-weight: 800;
    margin-inline: 2px;
}
.xr-cat-card__summary {
    font-size: .79rem;
    /* line-height: 1.85; */
    color: var(--ink-soft);
    font-weight: 300;
    }

.xr-stats {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin-top: 6px;
}
.xr-stat {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px;
    border-radius: var(--r-pill);
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    color: var(--ink-soft);
    font-size: .82rem;
    font-weight: 600;
    transition: all var(--t-fast);
}
.xr-stat:hover {
    border-color: var(--gold-line);
    background: var(--surface-gold);
    color: var(--gold-300);
}
.xr-stat__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: rgba(255, 194, 24, .12);
    color: var(--gold-300);
    font-size: .85rem;
}
.xr-stat__num {
    color: var(--gold-300);
    font-weight: 800;
    margin-inline-end: 2px;
}

/* =============================================================================
   2. DECORATIVE ART  Ã¢â‚¬â€  medal + orbital arcs + floating chips
   ----
   Used by exams_home (xr-home-*) and exams_category (xr-cat-*).
   ========================================================================== */
.xr-home-art,
.xr-cat-art {
    position: relative;
    aspect-ratio: 360 / 320;
    width: 100%;
    max-width: 460px;
    justify-self: center;
}
@media (max-width: 980px) {
    .xr-home-art, .xr-cat-art { max-width: 380px; }
}

.xr-home-art__bg,
.xr-cat-art__bg {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 60% 60% at 50% 50%,
        rgba(255, 194, 24, .07),
        rgba(65, 84, 173, .07),
        transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
}

.xr-home-art__arcs,
.xr-cat-art__arcs {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    animation: xrArcsRotate 80s linear infinite;
    transform-origin: center;
}
@keyframes xrArcsRotate { to { transform: rotate(360deg); } }

.xr-home-art__dots {
    position: absolute;
    width: 80px; height: 60px;
    background-image: radial-gradient(circle, rgba(255, 194, 24, .35) 1px, transparent 1.5px);
    background-size: 12px 12px;
    opacity: .4;
}
.xr-home-art__dots--tr { top: 20px; right: 20px; }
.xr-home-art__dots--bl { bottom: 20px; left: 20px; }

/* Ã¢â‚¬â€ Central medal (Home) Ã¢â‚¬â€ */
.xr-home-medal,
.xr-cat-medal {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 180px; height: 180px;
    border-radius: 50%;
    display: grid; place-items: center;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 211, 74, .35), transparent 60%),
        linear-gradient(135deg, var(--navy-700) 0%, var(--navy-900) 100%);
    border: 1px solid rgba(255, 194, 24, .35);
    box-shadow:
        0 30px 70px rgba(0, 0, 0, .55),
        0 0 0 1px rgba(255, 255, 255, .04) inset,
        0 0 60px rgba(255, 194, 24, .15);
    animation: xrMedalFloat 6s ease-in-out infinite;
}
@keyframes xrMedalFloat {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50%      { transform: translate(-50%, -50%) translateY(-6px); }
}

.xr-home-medal__ring,
.xr-cat-medal__ring {
    position: absolute; inset: -8px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 194, 24, .42);
    animation: xrMedalRing 30s linear infinite;
}
@keyframes xrMedalRing { to { transform: rotate(360deg); } }

.xr-home-medal__inner,
.xr-cat-medal__inner {
    text-align: center;
    color: var(--ink-white);
    padding: 16px;
    z-index: 2;
}

.xr-home-medal__icon {
    display: block;
    color: var(--gold-300);
    font-size: 2rem;
    margin-bottom: 6px;
    text-shadow: 0 0 18px rgba(255, 194, 24, .6);
}
.xr-home-medal__title,
.xr-cat-medal__brand {
    display: block;
    font-weight: 900;
    font-size: 1.05rem;
    color: var(--ink-white);
    line-height: 1.2;
}
.xr-home-medal__subtitle {
    display: block;
    font-size: .76rem;
    color: var(--gold-300);
    margin-top: 3px;
    font-weight: 700;
}
.xr-cat-medal__tag {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    background: rgba(255, 194, 24, .16);
    border: 1px solid var(--gold-line);
    color: var(--gold-300);
    font-size: .72rem;
    font-weight: 700;
    margin-bottom: 8px;
}

/* Ã¢â‚¬â€ Sparkles Ã¢â‚¬â€ */
.xr-home-medal__sparkle,
.xr-cat-medal__sparkle {
    position: absolute;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--gold-400);
    box-shadow: 0 0 12px rgba(255, 194, 24, .85);
    animation: xrSparkle 2.5s ease-in-out infinite;
}
@keyframes xrSparkle {
    0%, 100% { opacity: 0; transform: scale(.6); }
    50%      { opacity: 1; transform: scale(1.2); }
}
.xr-home-medal__sparkle--1 { top: 10%;  left: 15%; animation-delay: 0s; }
.xr-home-medal__sparkle--2 { bottom: 15%; right: 12%; animation-delay: .8s; }
.xr-home-medal__sparkle--3 { top: 50%; right: -4%; animation-delay: 1.6s; }
.xr-cat-medal__sparkle--1  { top: 14%; left: 18%; animation-delay: 0s; }
.xr-cat-medal__sparkle--2  { bottom: 18%; right: 14%; animation-delay: 1s; }

/* Ã¢â‚¬â€ Floating chips around medal Ã¢â‚¬â€ */
.xr-home-chip,
.xr-cat-chip {
    position: absolute;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 14px;
    border-radius: var(--r-pill);
    background: linear-gradient(180deg, rgba(28, 36, 71, .85), rgba(19, 25, 50, .85));
    border: 1px solid var(--line-strong);
    backdrop-filter: blur(10px);
    color: var(--ink-white);
    font-size: .78rem;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .45);
    animation: xrChipFloat 5s ease-in-out infinite;
    white-space: nowrap;
    z-index: 3;
}
@keyframes xrChipFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}
.xr-home-chip__label,
.xr-cat-chip__num,
.xr-home-chip__value {
    display: inline-block;
}
.xr-home-chip__value,
.xr-cat-chip__num {
    color: var(--gold-300);
    font-weight: 900;
}
.xr-home-chip i,
.xr-cat-chip i {
    color: var(--gold-300);
    font-size: .9em;
}

.xr-home-chip--1 { top: 8%;   right: 0; animation-delay: 0s; }
.xr-home-chip--2 { bottom: 18%; right: -4%; animation-delay: .8s; }
.xr-home-chip--3 { top: 14%;  left: -2%; animation-delay: 1.4s; }
.xr-home-chip--4 { bottom: 8%; left: 4%; animation-delay: 2.2s; }

.xr-cat-chip--1 { top: 10%; right: -2%; animation-delay: 0s; }
.xr-cat-chip--2 { bottom: 18%; right: 0; animation-delay: 1s; }
.xr-cat-chip--3 { top: 16%; left: 0; animation-delay: 1.8s; }

@media (max-width: 560px) {
    .xr-home-medal, .xr-cat-medal { width: 140px; height: 140px; }
    .xr-home-chip, .xr-cat-chip { font-size: .7rem; padding: 7px 11px; }
}

/* =============================================================================
   3. MAIN GRID  (main right + aside left in RTL)
   ========================================================================== */
.xr-main {
    padding: 36px 0 64px;
    position: relative;
    z-index: 1;
}
.xr-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
    align-items: start;
}
@media (max-width: 980px) {
    .xr-grid { grid-template-columns: 1fr; gap: 22px; }
    .xr-aside { order: 2; }
}

/* =============================================================================
   4. SEARCH BAR  +  FILTER ROW  +  SORT CHIPS
   ========================================================================== */
.xr-searchbar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface-1);
    border: 1.5px solid var(--line-strong);
    border-radius: var(--r-pill);
    padding: 4px 6px 4px 14px;
    margin-bottom: 16px;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.xr-searchbar:focus-within {
    border-color: var(--gold-500);
    box-shadow: 0 0 0 4px rgba(255, 194, 24, .12);
}
.xr-searchbar input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 8px;
    color: var(--ink-white);
    font-family: inherit;
    font-size: .92rem;
}
.xr-searchbar input:focus { outline: none; }
.xr-searchbar input::placeholder { color: var(--ink-faint); }

.xr-search-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px;
    border-radius: var(--r-pill);
    background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
    color: var(--navy-900);
    border: none;
    font-family: inherit;
    font-weight: 800; font-size: .85rem;
    cursor: pointer;
    box-shadow: var(--shadow-gold);
    transition: transform var(--t-fast);
}
.xr-search-btn:hover { transform: translateY(-1px); }

.xr-clear-search {
    color: var(--ink-faint);
    font-size: .82rem;
    text-decoration: none;
    padding: 4px 10px;
    transition: color var(--t-fast);
}
.xr-clear-search:hover { color: var(--gold-300); }

/* Ã¢â‚¬â€ Advanced-search filter row (exam_search_advanced_page only) Ã¢â‚¬â€ */
.exm-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
@media (max-width: 720px) { .exm-row { grid-template-columns: 1fr; } }

.exm-field select,
.exm-field input {
    width: 100%;
    padding: 11px 14px;
    background: var(--surface-1);
    color: var(--ink-white);
    border: 1.5px solid var(--line-strong);
    border-radius: var(--r);
    font-family: inherit;
    font-size: .9rem;
    -webkit-appearance: none; appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
        linear-gradient(-45deg, transparent 50%, var(--ink-soft) 50%);
    background-position:
        calc(0% + 12px) 50%,
        calc(0% + 18px) 50%;
    background-size: 6px 6px;
    background-repeat: no-repeat;
    padding-left: 32px;
    transition: border-color var(--t-fast), background-color var(--t-fast);
}
.exm-field select option {
    background: var(--navy-900);
    color: var(--ink-white);
}
.exm-field select:focus,
.exm-field input:focus {
    outline: none;
    border-color: var(--gold-500);
    background-color: var(--surface-2);
    box-shadow: 0 0 0 3px rgba(255, 194, 24, .12);
}

.exm-btn {
    padding: 11px 18px;
    border-radius: var(--r);
    font-family: inherit;
    font-weight: 700;
    font-size: .88rem;
    cursor: pointer;
    border: 1.5px solid var(--line-strong);
    background: var(--surface-2);
    color: var(--ink-soft);
    transition: all var(--t-fast);
}
.exm-btn--ghost:hover {
    border-color: var(--gold-line);
    color: var(--gold-300);
    background: var(--surface-gold);
}

/* Ã¢â‚¬â€ Sort chips (mybutton2) Ã¢â‚¬â€ */
.exm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mybutton2 {
    padding: 8px 16px;
    border-radius: var(--r-pill);
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    color: var(--ink-soft);
    font-family: inherit;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--t-fast);
}
.mybutton2:hover {
    border-color: var(--gold-line);
    color: var(--gold-300);
    background: var(--surface-gold);
}
.mybutton2[aria-pressed="true"] {
    background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
    border-color: transparent;
    color: var(--navy-900);
    box-shadow: var(--shadow-gold);
}

/* =============================================================================
   5. CATEGORY CARDS  (exams_home)
   ========================================================================== */
.xr-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}


@media (max-width: 1200px) {.xr-cat-grid {

    grid-template-columns: repeat(3, minmax(0, 1fr));

} }

@media (max-width: 720px) { .xr-cat-grid { grid-template-columns: 1fr; } }

.xr-cat-card {
    display: flex; flex-direction: column;
    border-radius: var(--r);
    background: var(--surface-1);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
.xr-cat-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-line);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35),
                0 0 0 1px rgba(255, 194, 24, .08) inset;
}
/* Ã¢â‚¬â€ Cover area (handles white-background brand logos as intentional "logo plates") Ã¢â‚¬â€ */
.xr-cat-card__cover {
    display: block;
    aspect-ratio: 16 / 9;
    /* background: linear-gradient(135deg, var(--navy-800), var(--navy-900)); */
    position: relative;
    overflow: hidden;
    text-decoration: none;
    isolation: isolate;
    padding: 14px;
}
.xr-cat-card__cover img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    /* gold ring + drop shadow give the plate a "framed photo" look */
    box-shadow:
        0 0 0 1px rgba(255, 194, 24, .22),
        0 8px 22px rgba(0, 0, 0, .40),
        0 2px 6px rgba(0, 0, 0, .25);
    /* gentle tonal harmony with the dark theme */
    filter: saturate(.85) brightness(.93);
    transition: transform .5s var(--t-slow), filter var(--t);
}
/* Inner shadow on the plate Ã¢â‚¬â€ gives it a "pressed-down" depth */
.xr-cat-card__cover::before {
    content: "";
    position: absolute; inset: 14px;
    border-radius: 10px;
    box-shadow: inset 0 -20px 40px -20px rgba(12, 17, 36, .25),
                inset 0  20px 40px -20px rgba(12, 17, 36, .15);
    pointer-events: none;
    z-index: 2;
}
/* Gold hairline accent below the plate, inside the navy bezel */
.xr-cat-card__cover::after {
    content: "";
    position: absolute; left: 22%; right: 22%; bottom: 5px;
    height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
    pointer-events: none;
    z-index: 3;
    opacity: .7;
    transition: opacity var(--t);
}
.xr-cat-card:hover .xr-cat-card__cover img {
    transform: scale(1.03);
    filter: saturate(1) brightness(1);
}
.xr-cat-card:hover .xr-cat-card__cover::after {
    opacity: 1;
    left: 18%;
    right: 18%;
}
.xr-cat-card__cover-fallback {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    color: var(--gold-300);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: .04em;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 194, 24, .22), transparent 60%),
        linear-gradient(135deg, var(--navy-700), var(--navy-900));
}

.xr-cat-card__body {
    padding: 16px 18px 18px;
    display: flex; flex-direction: column; gap: 10px;
}
.xr-cat-card__name {
    margin: 0;
    font-size: 1.05rem; font-weight: 800;
    color: var(--ink-white);
    line-height: 1.4;
}
.xr-cat-card__name a {
    color: inherit; text-decoration: none;
    transition: color var(--t-fast);
}
.xr-cat-card__name a:hover { color: var(--gold-300); }

.xr-cat-card__count {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .85rem;
    color: var(--ink-muted);
}
.xr-cat-card__count i { color: var(--gold-400); }
.xr-cat-card__count-num {
    color: var(--gold-300);
    font-weight: 800;
}

.xr-cat-card__action {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: 4px;
    padding: 9px 16px;
    border-radius: var(--r-pill);
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    color: var(--ink-white);
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--t-fast);
}
.xr-cat-card__action:hover {
    border-color: var(--gold-line);
    color: var(--gold-300);
    background: var(--surface-gold);
}
.xr-cat-card__action i { transition: transform var(--t-fast); }
.xr-cat-card__action:hover i { transform: translateX(-3px); }

/* =============================================================================
   6. EXAM CARDS  (exams_category)
   ========================================================================== */
.xr-exam-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.xr-exam-grid22 {

   grid-template-columns: repeat(4, minmax(0, 1fr));
    
}


@media (max-width: 1200px) { .xr-exam-grid {
   
    grid-template-columns: repeat(2, minmax(0, 1fr));
   
} }
@media (max-width: 720px) { .xr-exam-grid { grid-template-columns: 1fr; } }

.xr-exam-card {
    display: flex; flex-direction: column;
    border-radius: var(--r);
    background: var(--surface-1);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
.xr-exam-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-line);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}

.xr-exam-card__top {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
    overflow: hidden;
    display: block;
}
.xr-exam-card__top img,
.xr-exam-card__logo {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 18px;
    filter: brightness(.95);
    transition: transform .6s var(--t-slow);
}
.xr-exam-card:hover .xr-exam-card__logo {
    transform: scale(1.04);
}

.xr-exam-card__tag {
    position: absolute;
    top: 10px; right: 10px;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 10px;
    border-radius: var(--r-pill);
    background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
    color: var(--navy-900);
    font-size: .72rem;
    font-weight: 800;
    box-shadow: var(--shadow-gold);
    z-index: 2;
}
.xr-exam-card__tag--blue {
    background: linear-gradient(135deg, var(--navy-500), var(--navy-700));
    color: var(--ink-white);
	 display: none !important;
}

.xr-exam-card__badge {
    position: absolute; inset: 0;
    display: grid; place-items: center; gap: 4px;
    color: var(--ink-white);
    text-align: center;
    padding: 16px;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 194, 24, .12), transparent 60%),
        linear-gradient(135deg, var(--navy-700), var(--navy-900));
}
.xr-exam-card__badge-brand {
    font-size: .76rem;
    font-weight: 700;
    color: var(--gold-300);
    text-transform: uppercase;
    letter-spacing: .04em;
    display: inline-flex; align-items: center; gap: 4px;
}
.xr-exam-card__badge-name {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--ink-white);
    letter-spacing: .02em;
}
.xr-exam-card__badge-shield {
    color: var(--gold-400);
    font-size: 1.4rem;
    margin-top: 4px;
}

.xr-exam-card__body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}
.xr-exam-card__name {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--ink-white);
    line-height: 1.5;
    text-align: center;
    direction: ltr;
}
.xr-exam-card__name a {
    color: inherit;
    text-decoration: none;
    transition: color var(--t-fast);
    text-align: center;
}
.xr-exam-card__name a:hover { color: var(--gold-300); }

.xr-exam-card__desc {
    line-height: 1.85;
    margin: 0;
    flex: 1;
    font-size: .79rem;
    color: var(--ink-soft);
    font-weight: 300;
}
.xr-exam-card__desc--empty {
    color: var(--ink-faint);
    font-style: italic;
}

.xr-exam-card__chips {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.xr-chip-stat {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    color: var(--ink-soft);
    font-size: .76rem;
    font-weight: 700;
}
.xr-chip-stat i { color: var(--gold-400); font-size: .82em; }
.xr-chip-stat__num { color: var(--gold-300); }
.xr-chip-stat--code {
    background: var(--surface-gold);
    border-color: var(--gold-line);
    color: var(--gold-300);
    direction: ltr;
}
.xr-chip-stat--rating { color: var(--gold-300); }
.xr-chip-stat--rating i { color: var(--gold-400); }

.xr-exam-card__actions {
    display: flex; gap: 8px;
    margin-top: 4px;
}
.xr-btn-primary,
.xr-btn-secondary {
    flex: 1;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 14px;
    border-radius: var(--r-pill);
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform var(--t-fast);
}
.xr-btn-primary {
    background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
    color: var(--navy-900);
    box-shadow: var(--shadow-gold);
    border: none;
}
.xr-btn-primary:hover { transform: translateY(-2px); }
.xr-btn-secondary {
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    color: var(--ink-white);
}
.xr-btn-secondary:hover {
    border-color: var(--gold-line);
    color: var(--gold-300);
    background: var(--surface-gold);
    transform: translateY(-1px);
}

/* =============================================================================
   7. ASIDE WIDGETS
   ========================================================================== */
.xr-aside {
    display: flex; flex-direction: column; gap: 14px;
}

.xr-search-adv-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 18px;
    border-radius: var(--r);
    background: linear-gradient(135deg, var(--navy-500), var(--navy-700));
    color: var(--ink-white);
    border: 1px solid rgba(255, 255, 255, .12);
    font-weight: 700;
    box-shadow: 0 14px 32px rgba(65, 84, 173, .40);
    text-decoration: none;
    transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.xr-search-adv-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(65, 84, 173, .55);
}
.xr-search-adv-btn i { color: var(--gold-300); font-size: 1.1em; }

/* Ã¢â‚¬â€ Tip card Ã¢â‚¬â€ */
.xr-tip-card {
    padding: 18px 20px;
    border-radius: var(--r);
    background: linear-gradient(135deg,
        rgba(255, 194, 24, .06),
        rgba(255, 194, 24, .02));
    border: 1px solid var(--gold-line);
}
.xr-tip-card__title {
    margin: 0 0 8px;
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .92rem;
    font-weight: 800;
    color: var(--gold-300);
}
.xr-tip-card__title i { color: var(--gold-400); }
.xr-tip-card__body {
    margin: 0;
    font-size: .85rem;
    line-height: 1.85;
    color: var(--ink-soft);
}

/* Ã¢â‚¬â€ Brand card (category page) Ã¢â‚¬â€ */
.xr-brand-card {
    padding: 22px 18px;
    border-radius: var(--r);
    background: linear-gradient(180deg,
        rgba(65, 84, 173, .12),
        rgba(28, 36, 71, .35));
    border: 1px solid var(--line);
    text-align: center;
}
.xr-brand-card__logo {
    width: 150px;
    height: 81px;
    margin: 0 auto 12px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    /* background: linear-gradient(135deg, var(--gold-300), var(--gold-500)); */
    /* box-shadow: var(--shadow-gold); */
    overflow: hidden;
    /* filter: sepia(.8); */
}
.xr-brand-card__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.xr-brand-card__name {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--ink-white);
}
.xr-brand-card__tagline {
    margin: 0;
    font-size: .82rem;
    color: var(--ink-muted);
    line-height: 1.85;
}
.xr-en { font-family: var(--ff-display); }

/* Ã¢â‚¬â€ Stats list Ã¢â‚¬â€ */
.xr-stats-list {
    padding: 16px 18px;
    border-radius: var(--r);
    background: var(--surface-1);
    border: 1px solid var(--line);
}
.xr-stat-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
    font-size: .85rem;
}
.xr-stat-row:last-child { border-bottom: 0; }
.xr-stat-row__label {
    color: var(--ink-soft);
    display: inline-flex; align-items: center; gap: 6px;
    font-weight: 600;
}
.xr-stat-row__label i { color: var(--gold-400); }
.xr-stat-row__value {
    color: var(--gold-300);
    font-weight: 900;
    font-size: 1rem;
}
.xr-stat-row__value--text {
    font-size: .82rem;
    color: var(--ink-white);
    font-weight: 700;
}

/* Ã¢â‚¬â€ Features panel Ã¢â‚¬â€ */
.xr-features-panel {
    padding: 18px 20px;
    border-radius: var(--r);
    background: var(--surface-1);
    border: 1px solid var(--line);
}
.xr-features-panel__title {
    margin: 0 0 12px;
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .95rem;
    font-weight: 800;
    color: var(--ink-white);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
    width: 100%;
    position: relative;
}
.xr-features-panel__title i { color: var(--gold-400); }
.xr-features-panel__title::after {
    content: ""; position: absolute;
    bottom: -1px; right: 0;
    width: 28px; height: 2px;
    background: linear-gradient(90deg, var(--gold-500), transparent);
}
.xr-features-panel__list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 10px;
}
.xr-features-panel__list li {
    display: flex; align-items: center; gap: 10px;
    font-size: .88rem;
    color: var(--ink-soft);
    line-height: 1.7;
}
.xr-features-panel__list i {
    display: inline-grid; place-items: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(255, 194, 24, .14);
    border: 1px solid var(--gold-line);
    color: var(--gold-400);
    font-size: .72rem;
    margin-top: 0;
    flex-shrink: 0;
    line-height: 1;
}

/* Ã¢â‚¬â€ Topics Ã¢â‚¬â€ */
.xr-topics {
    padding: 18px 20px;
    border-radius: var(--r);
    background: var(--surface-1);
    border: 1px solid var(--line);
}
.xr-topics__title {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--line);
    font-size: .92rem;
    font-weight: 800;
    color: var(--ink-white);
    display: inline-flex; align-items: center; gap: 6px;
    width: 100%;
}
.xr-topics__title i { color: var(--gold-400); }
.xr-topics__list {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.xr-topic-chip {
    padding: 6px 14px;
    border-radius: var(--r-pill);
    background: rgba(255, 194, 24, .10);
    border: 1px solid var(--gold-line);
    color: var(--gold-300);
    font-size: .8rem;
    font-weight: 700;
    transition: all var(--t-fast);
    cursor: default;
}
.xr-topic-chip:hover {
    background: rgba(255, 194, 24, .18);
    border-color: var(--gold-500);
    transform: translateY(-1px);
}

/* Light mode Ã¢â‚¬â€ gold-300 on light gold has zero contrast.
   Switch to navy text on a clearer gold-tinted pill. */
[data-theme="light"] .xr-topic-chip {
    background: rgba(255, 194, 24, .14);
    border-color: rgba(200, 149, 0, .35);
    color: var(--navy-900);
}
[data-theme="light"] .xr-topic-chip:hover {
    background: rgba(255, 194, 24, .25);
    border-color: var(--gold-600);
    color: var(--navy-900);
}
[data-theme="light"] .xr-topics__title i { color: var(--gold-700); }

/* =============================================================================
   8. EMPTY STATE
   ========================================================================== */
.xr-empty {
    padding: 40px 24px;
    text-align: center;
    border-radius: var(--r);
    background: var(--surface-1);
    border: 1px dashed var(--line-strong);
    color: var(--ink-muted);
}
.xr-empty p { margin: 0; }

/* =============================================================================
   9. ADVANCED-SEARCH POST CARDS  (used by exam_search_advanced_page JS)
   These re-use post-card patterns but with subexam variations.
   ========================================================================== */
.posts-grid3 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
@media (max-width: 720px) { .posts-grid3 { grid-template-columns: 1fr; } }

.post-card-subexam {
    display: flex; flex-direction: column;
    border-radius: var(--r);
    background: var(--surface-1);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: transform var(--t), border-color var(--t);
}
.post-card-subexam:hover {
    transform: translateY(-4px);
    border-color: var(--gold-line);
}
.post-card-subexam .post-cover {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
}
.post-card-subexam .post-cover img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 16px;
}
.post-card-subexam .cover-fallback {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    color: var(--gold-300);
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
}
.subexam-meta {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-bottom: 8px;
}

/* additional chip styles used in advanced-search */
.chip2,
.stat-chip {
    background: var(--surface-2);
    border-color: var(--line-strong);
    color: var(--ink-soft);
}
.chip4 i { color: var(--gold-400); }
.chip6 {
    background: var(--surface-2);
    border-color: var(--line-strong);
    color: var(--ink-soft);
}

/* =============================================================================
   10. LIGHT-MODE OVERRIDES
   ----
   In light mode the white-bg brand logos look natural Ã¢â‚¬â€ so we DROP the
   navy bezel and frame treatment from the cover area.
   ========================================================================== */
[data-theme="light"] .xr-hero {
    background:
        radial-gradient(ellipse 1000px 400px at 80% 0%, rgba(255, 194, 24, .12), transparent 70%),
        radial-gradient(ellipse 800px 400px at 10% 100%, rgba(65, 84, 173, .08), transparent 65%);
}
/* === LIGHT THEME â€” CARDS, CHIPS & BUTTONS  ================================
   Fixes for:
   1. Cat-card cover merging with white body (no visible frame for logos)
   2. "Ù…Ø´Ø§Ù‡Ø¯Ù‡ Ø¢Ø²Ù…ÙˆÙ†â€ŒÙ‡Ø§" pill bg = white on white card â†’ invisible
   3. Stat chips (CGRC, CCSP, CC) gold-on-gold â†’ near-zero contrast
   4. "ØªØ³Øª Ø±Ø§ÛŒÚ¯Ø§Ù†" secondary button â†’ invisible like the action pill
   5. Exam-card cover same as #1
   ========================================================================= */

/* --- 1. CAT CARD: solid white card + gray-blue cover plate --- */
[data-theme="light"] .xr-cat-card {
    background: #ffffff;
    border-color: rgba(28, 36, 71, .10);
    box-shadow: 0 4px 14px rgba(28, 36, 71, .05);
}
[data-theme="light"] .xr-cat-card:hover {
    border-color: rgba(255, 194, 24, .55);
    box-shadow: 0 18px 36px rgba(28, 36, 71, .12),
                0 0 0 1px rgba(255, 194, 24, .15) inset;
}
[data-theme="light"] .xr-cat-card__cover {
    /* background: linear-gradient(180deg, #f1f4fa 0%, #e6ecf5 100%); */
    /* border-bottom: 1px solid rgba(28, 36, 71, .08); */
    /* padding: 0; */
    /* box-shadow: none !important; */
}
[data-theme="light"] .xr-cat-card__cover img {
    border-radius: 0;
    box-shadow: none;
    filter: none;
}
[data-theme="light"] .xr-cat-card__cover::before {
    box-shadow: none;
}
[data-theme="light"] .xr-cat-card__cover::after {
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 5%, rgba(255, 194, 24, .55) 50%, transparent 95%);
    opacity: .9;
}
[data-theme="light"] .xr-cat-card:hover .xr-cat-card__cover::after {
    left: 0; right: 0;
    height: 2.5px;
    background: linear-gradient(90deg, transparent 5%, rgba(255, 194, 24, .85) 50%, transparent 95%);
}
[data-theme="light"] .xr-cat-card__cover-fallback {
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 194, 24, .14), transparent 60%),
        linear-gradient(135deg, #f1f4fa, #e6ecf5);
    color: var(--gold-700);
}
[data-theme="light"] .xr-cat-card__name a:hover { color: var(--gold-700); }
[data-theme="light"] .xr-cat-card__count i,
[data-theme="light"] .xr-cat-card__count-num { color: var(--gold-700); }

/* --- 2. "Ù…Ø´Ø§Ù‡Ø¯Ù‡ Ø¢Ø²Ù…ÙˆÙ†â€ŒÙ‡Ø§" pill needs visible bg on white card --- */
[data-theme="light"] .xr-cat-card__action {
    background: rgba(28, 36, 71, .04);
    border-color: rgba(28, 36, 71, .12);
    color: var(--navy-900);
}
[data-theme="light"] .xr-cat-card__action:hover {
    background: rgba(255, 194, 24, .12);
    border-color: rgba(255, 194, 24, .55);
    color: var(--gold-700);
}

/* --- 5. EXAM CARD COVER â€” same gray-blue plate logic --- */
[data-theme="light"] .xr-exam-card__top {
    background: linear-gradient(135deg, #f1f4fa 0%, #e6ecf5 100%);
    border-bottom: 1px solid rgba(28, 36, 71, .08);
}
[data-theme="light"] .xr-exam-card__logo,
[data-theme="light"] .xr-exam-card__top img { filter: none; }
[data-theme="light"] .xr-exam-card__badge {
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 194, 24, .14), transparent 60%),
        linear-gradient(135deg, #f1f4fa, #e6ecf5);
}
[data-theme="light"] .xr-exam-card__badge-brand { color: var(--gold-700); }
[data-theme="light"] .xr-exam-card__badge-name { color: var(--navy-900); }

/* --- 3. STAT CHIPS â€” fix gold-on-gold contrast --- */
[data-theme="light"] .xr-chip-stat {
    background: rgba(28, 36, 71, .04);
    border-color: rgba(28, 36, 71, .12);
    color: var(--navy-900);
}
[data-theme="light"] .xr-chip-stat i { color: var(--gold-700); }
[data-theme="light"] .xr-chip-stat__num { color: var(--gold-700); }

/* The exam-code chip (CGRC, CCSP, CC) â€” needs proper contrast on white */
[data-theme="light"] .xr-chip-stat--code {
    background: rgba(255, 194, 24, .14);
    border-color: rgba(200, 149, 0, .35);
    color: var(--navy-900);
}
[data-theme="light"] .xr-chip-stat--rating { color: var(--gold-700); }
[data-theme="light"] .xr-chip-stat--rating i { color: var(--gold-700); }

/* --- 4. SECONDARY BUTTON ("ØªØ³Øª Ø±Ø§ÛŒÚ¯Ø§Ù†") --- */
[data-theme="light"] .xr-btn-secondary {
    background: rgba(28, 36, 71, .04);
    border-color: rgba(28, 36, 71, .12);
    color: var(--navy-900);
}
[data-theme="light"] .xr-btn-secondary:hover {
    background: rgba(255, 194, 24, .12);
    border-color: rgba(255, 194, 24, .55);
    color: var(--gold-700);
}

/* Medal art Ã¢â‚¬â€ gold seal in light mode (instead of dark navy) so it
   feels integrated with the light page rather than out of place */
[data-theme="light"] .xr-home-medal,
[data-theme="light"] .xr-cat-medal {
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .8), transparent 60%),
        linear-gradient(135deg, var(--gold-300), var(--gold-500));
    border: 2px solid rgba(255, 194, 24, .55);
    color: var(--navy-900);
    box-shadow:
        0 30px 70px rgba(28, 36, 71, .18),
        0 0 0 6px rgba(255, 194, 24, .12),
        0 0 60px rgba(255, 194, 24, .25);
}
[data-theme="light"] .xr-home-medal__title,
[data-theme="light"] .xr-cat-medal__brand { color: var(--navy-900); }
[data-theme="light"] .xr-home-medal__icon {
    color: var(--navy-900);
    text-shadow: none;
}
[data-theme="light"] .xr-home-medal__subtitle { color: var(--navy-700); }
[data-theme="light"] .xr-cat-medal__tag {
    background: rgba(255, 255, 255, .7);
    color: var(--navy-900);
    border-color: rgba(28, 36, 71, .25);
}
[data-theme="light"] .xr-home-medal__ring,
[data-theme="light"] .xr-cat-medal__ring {
    border-color: rgba(28, 36, 71, .35);
}

/* Floating chips Ã¢â‚¬â€ use light translucent bg in light mode */
[data-theme="light"] .xr-home-chip,
[data-theme="light"] .xr-cat-chip {
    background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .82));
    border-color: rgba(28, 36, 71, .14);
    color: var(--navy-900);
    box-shadow: 0 14px 30px rgba(28, 36, 71, .14);
}

/* Aside widgets in light mode */
[data-theme="light"] .xr-search-adv-btn {color: var(--ink-white) !important;background: var(--surface-1);}
[data-theme="light"] .xr-tip-card { color: var(--ink-soft); }
[data-theme="light"] .xr-tip-card__title { color: var(--gold-700); }
[data-theme="light"] .xr-brand-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .8), #f7f9fc);
}
[data-theme="light"] .xr-stat-row__label i { color: var(--gold-700); }
[data-theme="light"] .xr-stat-row__value { color: var(--gold-700); }
[data-theme="light"] .xr-features-panel__list i {
    color: var(--gold-700);
    background: rgba(255, 194, 24, .12);
    border-color: rgba(200, 149, 0, .35);
}
[data-theme="light"] .xr-current { color: var(--gold-700); }

/* Search button in light mode keeps its gold; sort button text */
[data-theme="light"] .mybutton2 { color: var(--navy-700); }
[data-theme="light"] .mybutton2:hover { color: var(--gold-700); }


.xr-brand-card__logo {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.xr-brand-logo-mask {
    display: block;
    width: 210px;
    max-width: 82%;
    height: 85px;

    /* Ø±Ù†Ú¯ Ù„ÙˆÚ¯Ùˆ Ø§ÛŒÙ†Ø¬Ø§Ø³Øª */
    background-color: #15203a;
    mask-image: var(--logo-url);
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-image: var(--logo-url);
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    transition: background-color 0.25s ease, transform 0.25s ease;
    margin: 0 auto;
}

.xr-brand-logo-mask {
    background-color: #fff;
}

[data-theme="light"] .xr-brand-logo-mask {
    background-color: #1c2447;
    /* border: 0px !important; */
}


[data-theme="light"] .xr-exam-card {background:#fff;}
[data-theme="light"] .xr-search-adv-btn i {    color: var(--ink-white) !important;}