/**
 * RailwayExams Quiz — Frontend Styles
 * Matches GeneratePress theme + railwayexams.com branding
 * Version: 1.7.0
 */

/* ═══════════════════════════════════════════
   CSS VARIABLES (theme colors)
   ═══════════════════════════════════════════ */
:root {
    --re-primary: #0055CC;
    --re-primary-dark: #003d99;
    --re-accent: #FFB81C;
    --re-accent-dark: #e5a300;
    --re-success: #2e7d32;
    --re-success-light: #e8f5e9;
    --re-error: #c62828;
    --re-error-light: #ffebee;
    --re-neutral: #f9fafb;
    --re-text: #1f2937;
    --re-text-light: #6b7280;
    --re-border: #e5e7eb;
    --re-radius: 10px;
    --re-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --re-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
}

/* ═══════════════════════════════════════════
   HIDE WP PAGE TITLE on quiz pages
   ═══════════════════════════════════════════ */
body.re-quiz-page .entry-title,
body.re-quiz-page .page-title,
body.re-quiz-page article > header .entry-title,
body.re-quiz-page .inside-article > header,
body.re-quiz-page h1.entry-title,
body.re-quiz-page .page-header {
    display: none !important;
}

/* ═══════════════════════════════════════════
   HIDE share / follow widgets on quiz pages
   (both before-content and after-content)
   ═══════════════════════════════════════════ */
body.re-quiz-page .re-share-bar,
body.re-quiz-page .re-follow-bar,
body.re-quiz-page .re-share-follow,
body.re-quiz-page .sharedaddy,
body.re-quiz-page .jp-relatedposts,
body.re-quiz-page .entry-content > .re-share-bar,
body.re-quiz-page .entry-content > .re-follow-bar {
    display: none !important;
}

/* ═══════════════════════════════════════════
   QUESTIONS: hidden via JS before start
   HTML stays in source for crawlers/SEO
   ═══════════════════════════════════════════ */

/* ═══════════════════════════════════════════
   AD SLOTS
   ═══════════════════════════════════════════ */
.re-quiz-ad {
    margin: 16px 0;
    text-align: center;
    min-height: 50px;
}


/* ═══════════════════════════════════════════
   KILL ALL WP/GeneratePress spacing on quiz pages
   ═══════════════════════════════════════════ */
body.re-quiz-page .site-content,
body.re-quiz-page .content-area,
body.re-quiz-page .inside-article,
body.re-quiz-page .entry-content,
body.re-quiz-page #primary,
body.re-quiz-page #content,
body.re-quiz-page .site-main {
    padding-top: 0 !important;
    margin-top: 0 !important;
    padding-bottom: 0 !important;
}
body.re-quiz-page .inside-article {
    padding: 20px 0 0 !important;
    margin: 0 !important;
}

/* ═══════════════════════════════════════════
   QUIZ CONTAINER
   ═══════════════════════════════════════════ */
.re-quiz {
    max-width: 800px;
    margin: 0 auto;
    font-family: var(--re-font);
    color: var(--re-text);
    line-height: 1.7;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════
   QUIZ HEADER (Hero)
   ═══════════════════════════════════════════ */
.re-quiz-header {
    background: linear-gradient(135deg, #0a47a0 0%, var(--re-primary-dark) 50%, #001840 100%) !important;
    color: #fff !important;
    padding: 24px 24px 20px;
    border-radius: var(--re-radius);
    margin-bottom: 0;
}

.re-quiz-header,
.re-quiz-header * {
    color: #fff !important;
}

.re-quiz-header h2.re-quiz-title-en {
    margin: 0 0 2px;
    padding: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.re-quiz-header .re-quiz-title-hi {
    margin: 0 0 12px;
    padding: 0;
    font-size: 15px;
    opacity: 0.7;
    font-weight: 400;
}

/* Meta pills */
.re-quiz-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
    font-size: 12px;
}

.re-meta-item {
    background: rgba(255,255,255,0.15);
    padding: 3px 11px;
    border-radius: 20px;
    white-space: nowrap;
    font-weight: 500;
}

/* "Topics Covered" label */
.re-topics-heading {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.6;
    margin-bottom: 6px;
    font-weight: 600;
}

/* Topic chips */
.re-quiz-topics-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.re-topic-chip {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.4);
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.re-topic-more {
    background: var(--re-accent);
    border-color: var(--re-accent);
    color: #1a1a1a !important;
    font-weight: 700;
}

/* Difficulty bar */
.re-quiz-diff-bar {
    display: flex;
    height: 26px;
    border-radius: 13px;
    overflow: hidden;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    gap: 2px;
}

.re-diff-seg-easy,
.re-diff-seg-mod,
.re-diff-seg-hard {
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    min-width: 0;
}

.re-diff-seg-easy {
    background: #4caf50;
    border-radius: 13px 0 0 13px;
}
.re-diff-seg-mod {
    background: #ff9800;
}
.re-diff-seg-hard {
    background: #f44336;
    border-radius: 0 13px 13px 0;
}

/* Topic tag on each question */
.re-q-topic-tag {
    display: inline-block;
    background: #eef2ff;
    color: var(--re-primary) !important;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: auto;
    white-space: nowrap;
}

/* Report Error button + form */
.re-q-report {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--re-border);
}

.re-btn-report {
    background: none;
    border: 1px solid #d1d5db;
    color: var(--re-text-light);
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.re-btn-report:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: var(--re-error);
}

.re-report-form {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.re-report-type {
    font-size: 12px;
    padding: 4px 8px;
    border: 1px solid var(--re-border);
    border-radius: 6px;
}

.re-report-msg {
    font-size: 12px;
    padding: 4px 8px;
    border: 1px solid var(--re-border);
    border-radius: 6px;
    flex: 1;
    min-width: 120px;
}

.re-btn-report-submit {
    background: var(--re-primary);
    color: #fff;
    border: none;
    font-size: 12px;
    padding: 5px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.re-btn-report-submit:hover { background: var(--re-primary-dark); }
.re-btn-report-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.re-report-thanks {
    font-size: 12px;
    color: var(--re-success);
    font-weight: 500;
}

/* ═══════════════════════════════════════════
   START SCREEN
   ═══════════════════════════════════════════ */
.re-quiz-start {
    background: #fff;
    border: 1px solid var(--re-border);
    border-top: none;
    padding: 24px;
    border-radius: 0 0 var(--re-radius) var(--re-radius);
}

/* Quiz Info Grid — appealing card layout */
.re-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.re-info-card {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
    border: 1px solid #d0e3f7;
    border-radius: var(--re-radius);
    padding: 16px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.re-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,85,204,0.12);
}

.re-info-card.re-info-neg {
    background: linear-gradient(135deg, #fff8e8 0%, #fff3d0 100%);
    border-color: #f0d68a;
}

.re-info-icon {
    font-size: 24px;
    line-height: 1;
}

.re-info-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--re-primary);
    line-height: 1.1;
}

.re-info-card.re-info-neg .re-info-value {
    color: #b45309;
}

.re-info-label {
    font-size: 12px;
    color: var(--re-text-light);
    font-weight: 500;
    line-height: 1.3;
}

.re-info-label .re-hi {
    display: block;
    font-size: 11px;
    opacity: 0.8;
}

.re-info-pass {
    text-align: center;
    font-size: 13px;
    color: var(--re-text-light);
    padding: 8px 0 4px;
    border-top: 1px solid var(--re-border);
    margin-bottom: 16px;
}

.re-start-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.re-input {
    padding: 12px 16px;
    border: 1px solid var(--re-border);
    border-radius: var(--re-radius);
    font-size: 14px;
    font-family: var(--re-font);
    flex: 1;
    min-width: 200px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.re-input:focus {
    outline: none;
    border-color: var(--re-primary);
    box-shadow: 0 0 0 3px rgba(0,85,204,0.12);
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.re-btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--re-radius);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--re-font);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.re-btn-start {
    background: linear-gradient(135deg, var(--re-primary), var(--re-primary-dark));
    color: #fff;
    font-size: 17px;
    padding: 16px 32px;
    width: 100%;
    margin-top: 8px;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 14px rgba(0,85,204,0.3);
}

.re-btn-start:hover { background: linear-gradient(135deg, #0060e0, #004db8); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,85,204,0.35); }

.re-btn-submit {
    background: var(--re-success);
    color: #fff;
}

.re-btn-submit:hover { background: #1b5e20; }

.re-btn-clear {
    background: #f3f4f6;
    color: var(--re-text);
}

.re-btn-clear:hover { background: #e5e7eb; }

.re-btn-share {
    background: var(--re-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    padding: 10px 20px;
}

.re-btn-share:hover { background: var(--re-primary-dark); }

.re-btn-wa { background: #25D366; color: #fff; }
.re-btn-wa:hover { background: #1da851; }
.re-btn-tg { background: #0088cc; color: #fff; }
.re-btn-tg:hover { background: #006fa3; }
.re-btn-copy { background: #6b7280; color: #fff; }
.re-btn-copy:hover { background: #4b5563; }

/* Reattempt button */
.re-reattempt-section {
    text-align: center;
    margin: 24px 0;
}

.re-btn-reattempt {
    background: linear-gradient(135deg, var(--re-primary), var(--re-primary-dark));
    color: #fff;
    font-size: 17px;
    padding: 16px 40px;
    border: none;
    border-radius: var(--re-radius);
    font-weight: 700;
    font-family: var(--re-font);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,85,204,0.3);
    transition: all 0.2s;
    letter-spacing: 0.01em;
}

.re-btn-reattempt:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,85,204,0.35);
}

.re-btn-review {
    background: #fff;
    color: var(--re-primary);
    font-size: 14px;
    padding: 12px 28px;
    border: 2px solid var(--re-primary);
    border-radius: var(--re-radius);
    font-weight: 600;
    font-family: var(--re-font);
    cursor: pointer;
    transition: all 0.2s;
}

.re-btn-review:hover {
    background: var(--re-primary);
    color: #fff;
}

.re-reattempt-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* ═══════════════════════════════════════════
   TIMER
   ═══════════════════════════════════════════ */
.re-quiz-timer {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    padding: 10px 16px;
    border: 1px solid var(--re-border);
    border-radius: var(--re-radius);
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--re-shadow);
}

.re-timer-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.re-timer-fill {
    height: 100%;
    background: var(--re-success);
    border-radius: 4px;
    width: 100%;
    transition: width 1s linear;
}

.re-timer-fill.re-timer-warning { background: var(--re-accent); }
.re-timer-fill.re-timer-danger { background: var(--re-error); animation: re-pulse 1s infinite; }

@keyframes re-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.re-timer-text {
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 60px;
    text-align: right;
}

/* ═══════════════════════════════════════════
   LANGUAGE TOGGLE
   ═══════════════════════════════════════════ */
.re-lang-toggle {
    display: flex;
    gap: 4px;
    margin: 12px 0;
    background: #f3f4f6;
    border-radius: var(--re-radius);
    padding: 4px;
    width: fit-content;
}

.re-lang-btn {
    padding: 7px 16px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    font-family: var(--re-font);
    font-weight: 500;
    background: transparent;
    color: var(--re-text-light);
    transition: all 0.2s;
}

.re-lang-btn.re-lang-active {
    background: #fff;
    color: var(--re-primary);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ═══════════════════════════════════════════
   QUESTIONS
   ═══════════════════════════════════════════ */
.re-quiz-questions { margin-top: 12px; }

.re-q {
    background: #fff;
    border: 1px solid var(--re-border);
    border-radius: var(--re-radius);
    padding: 22px;
    margin-bottom: 14px;
    transition: border-color 0.2s;
}

.re-q:hover { border-color: #d1d5db; }

.re-q-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.re-q-num {
    font-weight: 700;
    font-size: 15px;
    color: var(--re-primary);
}

.re-q-diff {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.re-diff-easy { background: #e8f5e9; color: #2e7d32; }
.re-diff-moderate { background: #fff3e0; color: #e65100; }
.re-diff-medium { background: #fff3e0; color: #e65100; }
.re-diff-hard { background: #ffebee; color: #c62828; }

.re-q-text {
    margin-bottom: 14px;
    font-size: 15px;
    line-height: 1.7;
}

.re-q-en { margin-bottom: 4px; font-weight: 700; }
.re-q-hi { color: var(--re-text-light); font-size: 14px; font-weight: 600; }

.re-q-image {
    margin: 10px 0;
    text-align: center;
}

.re-q-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid var(--re-border);
}

/* ═══════════════════════════════════════════
   OPTIONS
   ═══════════════════════════════════════════ */
.re-q-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.re-opt {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 16px;
    border: 2px solid var(--re-border);
    border-radius: var(--re-radius);
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}

.re-opt:hover { border-color: var(--re-primary); background: rgba(0,85,204,0.03); }

.re-opt input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.re-opt-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--re-neutral);
    font-weight: 700;
    font-size: 13px;
    color: var(--re-text-light);
    flex-shrink: 0;
    transition: all 0.15s;
    border: 2px solid transparent;
}

.re-opt-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
}

.re-opt-en { display: block; font-weight: 500; }
.re-opt-hi { display: block; color: var(--re-text-light); font-size: 13px; margin-top: 2px; }

.re-opt-img {
    max-width: 120px;
    height: auto;
    border-radius: 4px;
    margin-top: 4px;
}

/* Selected state */
.re-opt.re-selected {
    border-color: var(--re-primary);
    background: rgba(0,85,204,0.05);
}

.re-opt.re-selected .re-opt-letter {
    background: var(--re-primary);
    color: #fff;
}

/* Answer reveal states */
.re-opt.re-correct {
    border-color: var(--re-success);
    background: var(--re-success-light);
}

.re-opt.re-correct .re-opt-letter {
    background: var(--re-success);
    color: #fff;
}

.re-opt.re-wrong {
    border-color: var(--re-error);
    background: var(--re-error-light);
}

.re-opt.re-wrong .re-opt-letter {
    background: var(--re-error);
    color: #fff;
}

.re-opt.re-unanswered-correct {
    border-color: var(--re-success);
    background: rgba(46,125,50,0.05);
}

.re-opt.re-unanswered-correct .re-opt-letter {
    background: var(--re-success);
    color: #fff;
}

/* ═══════════════════════════════════════════
   EXPLANATION
   ═══════════════════════════════════════════ */
.re-q-explanation {
    margin-top: 14px;
    padding: 14px 18px;
    background: #f0f7ff;
    border-left: 4px solid var(--re-primary);
    border-radius: 0 var(--re-radius) var(--re-radius) 0;
    font-size: 14px;
    line-height: 1.7;
    text-align: justify;
}

.re-q-explanation .re-exp-en { margin-bottom: 4px; text-align: justify; }
.re-q-explanation .re-exp-hi { color: var(--re-text-light); font-size: 13px; text-align: justify; }

/* Question reviewed indicator */
.re-q.re-q-correct { border-left: 4px solid var(--re-success); }
.re-q.re-q-wrong { border-left: 4px solid var(--re-error); }
.re-q.re-q-unanswered { border-left: 4px solid #9e9e9e; }

/* ═══════════════════════════════════════════
   NAVIGATION + SUBMIT
   ═══════════════════════════════════════════ */
.re-quiz-nav {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 12px 16px;
    border: 1px solid var(--re-border);
    border-radius: var(--re-radius);
    margin: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    z-index: 50;
}

.re-nav-progress { font-size: 14px; color: var(--re-text-light); font-weight: 500; }

.re-nav-buttons { display: flex; gap: 8px; }

/* ═══════════════════════════════════════════
   RESULTS
   ═══════════════════════════════════════════ */
.re-quiz-results {
    background: #fff;
    border: 1px solid var(--re-border);
    border-radius: var(--re-radius);
    padding: 28px;
    margin: 16px 0;
}

.re-results-header {
    text-align: center;
    margin-bottom: 24px;
}

.re-results-header h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
}

.re-results-passed { color: var(--re-success); }
.re-results-failed { color: var(--re-error); }

.re-score-circle {
    width: 150px;
    height: 150px;
    margin: 16px auto;
    position: relative;
}

.re-score-circle svg { width: 100%; height: 100%; }

.re-score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.re-score-pct {
    font-size: 30px;
    font-weight: 800;
    display: block;
}

.re-score-marks {
    font-size: 13px;
    color: var(--re-text-light);
    font-weight: 500;
}

.re-results-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 24px 0;
}

.re-stat {
    text-align: center;
    padding: 14px 8px;
    background: var(--re-neutral);
    border-radius: var(--re-radius);
    border: 1px solid var(--re-border);
}

.re-stat-value {
    font-size: 22px;
    font-weight: 800;
    display: block;
}

.re-stat-label {
    font-size: 11px;
    color: var(--re-text-light);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-top: 2px;
}

.re-stat-correct .re-stat-value { color: var(--re-success); }
.re-stat-wrong .re-stat-value { color: var(--re-error); }
.re-stat-rank .re-stat-value { color: var(--re-accent-dark); }

/* Share section */
.re-share-section {
    margin-top: 24px;
    padding: 20px;
    background: var(--re-neutral);
    border-radius: var(--re-radius);
    border: 1px solid var(--re-border);
    text-align: center;
}

.re-share-section h3 {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 700;
    color: var(--re-text);
}

.re-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.re-share-text {
    width: 100%;
    margin-top: 14px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--re-border);
    border-radius: var(--re-radius);
    font-size: 13px;
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
    white-space: pre-wrap;
    text-align: left;
    max-height: 180px;
    overflow-y: auto;
    line-height: 1.7;
    color: var(--re-text);
}

/* Leaderboard in results */
.re-leaderboard {
    margin-top: 24px;
}

.re-leaderboard h3 { margin: 0 0 14px; font-weight: 700; }

.re-lb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.re-lb-table th, .re-lb-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid var(--re-border);
}

.re-lb-table th {
    font-weight: 700;
    color: #fff;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--re-primary-dark);
}
.re-lb-table thead tr th:first-child { border-radius: 8px 0 0 0; }
.re-lb-table thead tr th:last-child { border-radius: 0 8px 0 0; }
.re-lb-table tr.re-lb-you { background: rgba(0,85,204,0.08); font-weight: 600; }
.re-lb-table tbody tr:nth-child(even) { background: #f9fafb; }
.re-lb-rank-1 { color: #FFB81C; font-weight: 700; }
.re-lb-rank-2 { color: #94a3b8; font-weight: 700; }
.re-lb-rank-3 { color: #b45309; font-weight: 700; }

/* ═══════════════════════════════════════════
   LANGUAGE VISIBILITY
   ═══════════════════════════════════════════ */
.re-quiz.re-lang-en .re-q-hi,
.re-quiz.re-lang-en .re-opt-hi,
.re-quiz.re-lang-en .re-exp-hi,
.re-quiz.re-lang-en .re-quiz-title-hi { display: none; }

.re-quiz.re-lang-hi .re-q-en,
.re-quiz.re-lang-hi .re-opt-en,
.re-quiz.re-lang-hi .re-exp-en,
.re-quiz.re-lang-hi .re-quiz-title-en { display: none; }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 640px) {
    .re-quiz-header { padding: 16px 14px 14px; }
    .re-quiz-header h2.re-quiz-title-en { font-size: 18px; }
    .re-quiz-meta { gap: 5px; font-size: 11px; }
    .re-meta-item { padding: 2px 9px; }
    .re-quiz-topics-bar { gap: 4px; }
    .re-topic-chip { font-size: 10px; padding: 2px 7px; }
    .re-quiz-diff-bar { height: 20px; font-size: 10px; }
    .re-q-topic-tag { font-size: 9px; padding: 1px 6px; }
    .re-info-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .re-info-value { font-size: 22px; }
    .re-info-card { padding: 12px 8px; }
    .re-q { padding: 16px; }
    .re-opt { padding: 10px 12px; }
    .re-opt-letter { width: 26px; height: 26px; font-size: 12px; }
    .re-quiz-nav { flex-direction: column; gap: 8px; }
    .re-results-stats { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .re-stat { padding: 10px 4px; }
    .re-stat-value { font-size: 18px; }
    .re-start-form { flex-direction: column; }
    .re-input { min-width: 100%; }
    .re-quiz-timer { flex-direction: row; }
    .re-timer-text { font-size: 16px; }
    .re-share-buttons { flex-direction: column; }
    .re-btn-share { width: 100%; justify-content: center; }
}

/* ═══════════════════════════════════════════
   QUIZ GRID CARDS — Matching Dynamic Grid design
   ═══════════════════════════════════════════ */
.re-quiz-grid-wrap {
    max-width: 900px;
    margin: 0 auto;
}

.re-grid-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e3a8a;
    margin: 0 0 4px;
}

.re-grid-count {
    font-size: 0.85rem;
    color: #94a3b8;
    margin: 0 0 16px;
    text-align: center;
}

.re-quiz-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
@media (min-width: 768px) {
    .re-quiz-grid { grid-template-columns: 1fr 1fr; }
}

/* Card — matches .re-grid-card from Dynamic Grid */
.re-grid-card {
    display: block;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 16px;
    text-decoration: none !important;
    color: inherit !important;
    transition: all 0.2s ease;
    border-left: 4px solid #2563eb;
}

.re-grid-card:hover {
    border-left-color: #dc2626;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateX(3px);
}

.re-grid-card-top { margin-bottom: 8px; }

.re-grid-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e3a8a;
    margin: 0 0 2px;
    line-height: 1.4;
    text-align: justify;
}

.re-grid-card:hover .re-grid-card-title { color: #1e40af; }

.re-grid-card-hi {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0 0 8px;
    font-style: italic;
}

/* Meta badges — matches .re-badge style */
.re-grid-card-meta {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.re-grid-qs {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    background: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.re-grid-mode {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    background: #059669;
    text-transform: uppercase;
}

.re-grid-attempts {
    font-size: 0.76rem;
    color: #94a3b8;
    font-style: italic;
    margin-left: auto;
}

/* Difficulty bar */
.re-grid-diff-bar {
    display: flex;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
    gap: 1px;
}

.re-gd-easy { background: #22c55e; }
.re-gd-mod  { background: #f59e0b; }
.re-gd-hard { background: #ef4444; }

/* Topic/Section tags */
.re-grid-card-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.re-grid-tag {
    font-size: 0.72rem;
    background: #eff6ff;
    color: #2563eb;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.re-grid-tag-topic {
    background: #fef3c7;
    color: #92400e;
}

.re-grid-card-date {
    font-size: 0.8rem;
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Footer row — matches Dynamic Grid card footer */
.re-grid-card-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563eb;
}

.re-grid-card-cta::after {
    content: '\2192';
    font-size: 1.1rem;
}

.re-grid-card:hover .re-grid-card-cta { color: #1e3a8a; }

/* Pagination */
.re-grid-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 20px;
}

.re-grid-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    background: #fff;
    border: 1px solid #e5e7eb;
    text-decoration: none;
}

.re-grid-page:hover { border-color: #2563eb; color: #2563eb; }
.re-grid-page-active { background: #2563eb; color: #fff; border-color: #2563eb; }

/* ═══════════════════════════════════════════
   QUIZ HUB — [re_quiz_hub] shortcode
   Matching Dynamic Grid design language
   ═══════════════════════════════════════════ */
.re-quiz-hub {
    max-width: 900px;
    margin: 0 auto;
}

.re-hub-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e3a8a;
    margin: 0 0 16px;
}

.re-hub-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 24px 0 10px;
}

/* CA special card — gradient header */
.re-hub-ca-card {
    display: block;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #fff !important;
    padding: 18px 22px;
    border-radius: 8px;
    text-decoration: none !important;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(30,58,138,0.15);
}

.re-hub-ca-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(30,58,138,0.25); }
.re-hub-ca-label { font-size: 1.1rem; font-weight: 700; color: #fff; }
.re-hub-ca-count { font-size: 0.8rem; color: rgba(255,255,255,0.7); margin-top: 4px; }

/* Hub grid — 2 col like Dynamic Grid */
.re-hub-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
@media (min-width: 768px) {
    .re-hub-grid { grid-template-columns: 1fr 1fr; }
}

/* Hub card — matches Dynamic Grid card */
.re-hub-card {
    display: block;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 16px;
    text-decoration: none !important;
    color: inherit !important;
    transition: all 0.2s ease;
    border-left: 4px solid #2563eb;
    position: relative;
}

.re-hub-card:hover {
    border-left-color: #dc2626;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateX(3px);
}

.re-hub-card h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e3a8a;
    line-height: 1.4;
}

.re-hub-card:hover h4 { color: #1e40af; }

.re-hub-card small {
    display: block;
    font-size: 0.76rem;
    color: #94a3b8;
    margin-top: 2px;
    font-style: italic;
}

.re-hub-card-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: #2563eb;
    font-weight: 700;
}

.re-hub-card-mock { border-left-color: #f59e0b; }

/* ═══════════════════════════════════════════
   ORGANIZED QUIZ PAGE — [re_quiz_page]
   Matching Dynamic Grid design language
   ═══════════════════════════════════════════ */
.re-qp {
    max-width: 900px;
    margin: 0 auto;
}

/* Stats bar */
.re-qp-stats {
    display: flex;
    gap: 16px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    flex-wrap: wrap;
}

.re-qp-stat {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e3a8a;
}

/* Topic navigation — matches Dynamic Grid tab style */
.re-qp-nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    position: sticky;
    top: 60px;
    z-index: 10;
}

.re-qp-nav-item {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none !important;
}

.re-qp-nav-item:hover {
    color: #2563eb;
    background: rgba(255,255,255,0.6);
}

/* Subject title — blue gradient header style */
.re-qp-subject-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin: 24px 0 12px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    border-radius: 8px;
}

/* Section title */
.re-qp-section { margin-bottom: 16px; }

.re-qp-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e3a8a;
    margin: 16px 0 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid #2563eb;
    display: inline-block;
}

/* Topic title */
.re-qp-topic-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    margin: 12px 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.re-qp-topic-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    background: #2563eb;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Quiz grid inside organized page — 2 cols like Dynamic Grid */
.re-qp .re-qp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 6px;
}
@media (min-width: 768px) {
    .re-qp .re-qp-grid { grid-template-columns: 1fr 1fr; }
}

.re-qp-card-hidden { display: none !important; }

/* Load More — matches Dynamic Grid button */
.re-qp-load-more {
    display: inline-block !important;
    background: #2563eb;
    color: #ffffff !important;
    border: none;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
    margin: 8px 0 16px;
}

.re-qp-load-more:hover {
    background: #1e3a8a;
    transform: translateY(-1px);
    color: #ffffff !important;
}

@media (max-width: 640px) {
    .re-qp-nav { top: 50px; gap: 3px; padding: 3px; }
    .re-qp-nav-item { font-size: 0.78rem; padding: 6px 12px; }
    .re-qp-subject-title { font-size: 1rem; padding: 10px 14px; }
}

/* ═══════════════════════════════════════════
   POST-QUIZ RECOMMENDATIONS
   ═══════════════════════════════════════════ */
/* ═══════════════════════════════════════════
   RECOMMENDATIONS — "More Quizzes for You"
   Matches Dynamic Grid card style for consistency
   ═══════════════════════════════════════════ */
.re-recs {
    margin-top: 28px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.re-recs h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
    color: #1e293b;
}

.re-recs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.re-rec-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    padding: 14px 16px;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.re-rec-card:hover {
    border-left-color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37,99,235,0.12);
    transform: translateY(-2px);
}

.re-rec-next {
    border-left-color: #059669;
    background: linear-gradient(135deg, #f0fdf4 0%, #fff 100%);
}

.re-rec-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.re-rec-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.re-rec-type-pyq { background: #059669; }
.re-rec-type-mock { background: #2563eb; }
.re-rec-type-subject { background: #7c3aed; }
.re-rec-type-ca { background: #d97706; }
.re-rec-type-default { background: #6366f1; }
.re-rec-type-count { background: #0891b2; }

.re-rec-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--re-primary);
    font-weight: 700;
    margin-bottom: 4px;
}

.re-rec-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 8px;
    color: #1e3a8a;
}

.re-rec-card:hover .re-rec-title {
    color: #1e40af;
}

.re-rec-diff-bar {
    display: flex;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
    background: #e2e8f0;
}
.re-rec-diff-bar > div { min-width: 4px; }
.re-rec-de { background: #22c55e; }
.re-rec-dm { background: #f59e0b; }
.re-rec-dh { background: #ef4444; }

.re-rec-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.re-rec-meta {
    font-size: 12px;
    color: #64748b;
}

.re-rec-cta {
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
}

.re-recs-explore {
    margin-top: 16px;
    text-align: center;
}
.re-rec-explore-link {
    display: inline-block;
    color: #2563eb;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 24px;
    border: 2px solid #2563eb;
    border-radius: 8px;
    transition: all 0.2s;
}
.re-rec-explore-link:hover {
    background: #2563eb;
    color: #fff;
}

/* Grid responsive */
@media (max-width: 640px) {
    .re-quiz-grid { grid-template-columns: 1fr; gap: 10px; }
    .re-hub-grid { grid-template-columns: 1fr 1fr; }
    .re-grid-card { padding: 12px; }
    .re-grid-card-title { font-size: 14px; }
    .re-grid-heading { font-size: 20px; }
    .re-hub-heading { font-size: 22px; }
    .re-recs-grid { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════════
   DRILL-DOWN PAGES + QUIZ LISTING PAGES
   Fix spacing + navigation components
   ═══════════════════════════════════════════ */

/* Kill GeneratePress top spacing on ALL quiz-related pages */
body.page .inside-article { padding-top: 12px !important; }
body.single-re_quiz_page .inside-article { padding-top: 12px !important; }
.re-drilldown-page .inside-article { padding-top: 12px !important; }

/* Breadcrumbs */
.re-dd-breadcrumbs {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.re-dd-breadcrumbs a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}
.re-dd-breadcrumbs a:hover { text-decoration: underline; }
.re-dd-sep { color: #cbd5e1; }

/* Hero */
.re-dd-hero {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 22px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.re-dd-title {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 6px;
    line-height: 1.3;
}

.re-dd-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Section heading */
.re-dd-section-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e3a8a;
    margin: 24px 0 10px;
}

/* Navigation cards grid */
.re-dd-nav-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
}
@media (min-width: 768px) {
    .re-dd-nav-grid { grid-template-columns: 1fr 1fr; }
}

.re-dd-nav-card {
    display: block;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 16px;
    text-decoration: none !important;
    color: inherit !important;
    transition: all 0.2s ease;
    border-left: 4px solid #2563eb;
    position: relative;
}

.re-dd-nav-card:hover {
    border-left-color: #dc2626;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateX(3px);
}

.re-dd-nav-card h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e3a8a;
}
.re-dd-nav-card:hover h4 { color: #1e40af; }

.re-dd-nav-card small {
    display: block;
    font-size: 0.76rem;
    color: #94a3b8;
    margin-top: 2px;
}

.re-dd-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: #2563eb;
    font-weight: 700;
}

@media (max-width: 640px) {
    .re-dd-title { font-size: 18px; }
    .re-dd-hero { padding: 14px 16px; }
}

/* ═══════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════ */
@media print {
    .re-quiz-timer, .re-quiz-nav, .re-quiz-start, .re-share-section, .re-lang-toggle, .re-reattempt-section { display: none !important; }
    .re-q { break-inside: avoid; }
    .re-q-explanation { display: block !important; }
}

/* ═══════════════════════════════════════════
   LOADING SPINNER
   ═══════════════════════════════════════════ */
.re-loading {
    text-align: center;
    padding: 40px;
}

.re-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--re-border);
    border-top-color: var(--re-primary);
    border-radius: 50%;
    animation: re-spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes re-spin {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════
   KATEX MATH RENDERING
   ═══════════════════════════════════════════ */
/* Prevent KaTeX overflow on narrow screens */
.re-q .katex-display {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0;
}

.re-q .katex {
    font-size: 1.05em;
    white-space: normal;
}

/* Inline math should not break option layout */
.re-opt .katex { font-size: 1em; }

/* Display-mode math in question text */
.re-q-text .katex-display {
    margin: 8px 0;
    text-align: center;
}

/* Math in explanation */
.re-q-explanation .katex { font-size: 0.95em; }

/* ═══════════════════════════════════════════
   IMAGE-ONLY OPTIONS (Venn diagrams, figures, patterns)
   ═══════════════════════════════════════════ */
/* When question_type = 'image', options become image-centric cards */
.re-q[data-qtype="image"] .re-q-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.re-q[data-qtype="image"] .re-opt {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
}

.re-q[data-qtype="image"] .re-opt-text {
    font-size: 13px;
    margin-top: 6px;
}

.re-q[data-qtype="image"] .re-opt-img {
    max-width: 100%;
    width: auto;
    max-height: 200px;
    object-fit: contain;
    margin: 0;
    border-radius: 6px;
    border: 1px solid var(--re-border);
}

/* On mobile, stack image options to single column */
@media (max-width: 480px) {
    .re-q[data-qtype="image"] .re-q-options {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════
   PASSAGE / DI SET BLOCK
   ═══════════════════════════════════════════ */
.re-passage-block {
    margin: 0 0 20px;
    padding: 16px 18px;
    background: #fafbfc;
    border: 1px solid var(--re-border);
    border-left: 4px solid #6366f1;
    border-radius: 0 var(--re-radius) var(--re-radius) 0;
}

.re-passage-title {
    font-weight: 700;
    font-size: 14px;
    color: #4338ca;
    margin-bottom: 10px;
}

.re-passage-content {
    font-size: 14px;
    line-height: 1.8;
}

.re-passage-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 13px;
}

.re-passage-content table th,
.re-passage-content table td {
    border: 1px solid #d1d5db;
    padding: 6px 10px;
    text-align: center;
}

.re-passage-content table th {
    background: #f1f5f9;
    font-weight: 600;
}

.re-passage-image {
    text-align: center;
    margin: 10px 0;
}

.re-passage-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid var(--re-border);
}

/* Passage link indicator on questions */
.re-q-passage-ref {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #6366f1;
    background: #eef2ff;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 6px;
}

/* ═══════════════════════════════════════════
   MIXED TYPE — math inside options with images
   ═══════════════════════════════════════════ */
.re-q[data-qtype="mixed"] .re-opt-img {
    max-width: 180px;
    margin-top: 6px;
}

.re-q[data-qtype="mixed"] .re-opt {
    flex-wrap: wrap;
}
