/*
Theme Name: WPR Quiz Lite Child
Theme URI: https://wprquiz.com/
Author: WPR Quiz
Description: A fast, mobile-first child theme for Campus Education, designed for WPR and safety MCQ quizzes. Compatible with Thrive Quiz Builder.
Template: campus-education
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: wprquiz-lite
*/

:root {
  --wpr-navy: #0b1f3a;
  --wpr-blue: #1769e0;
  --wpr-blue-dark: #0f55b8;
  --wpr-orange: #f59e0b;
  --wpr-ink: #172033;
  --wpr-muted: #62708a;
  --wpr-line: #e4eaf2;
  --wpr-soft: #f4f7fb;
  --wpr-white: #fff;
  --wpr-radius: 18px;
  --wpr-shadow: 0 12px 34px rgba(11, 31, 58, .09);
  --wpr-max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--wpr-ink);
  background: var(--wpr-white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--wpr-blue); text-decoration: none; }
a:hover { color: var(--wpr-blue-dark); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.screen-reader-text,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  z-index: 9999;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: var(--wpr-white);
  background: var(--wpr-navy);
  border-radius: 8px;
}
.wpr-container { width: min(calc(100% - 32px), var(--wpr-max)); margin-inline: auto; }

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--wpr-line);
  backdrop-filter: blur(12px);
}
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-branding { display: flex; align-items: center; min-width: 0; }
.custom-logo-link { display: block; }
.custom-logo { width: auto; max-height: 48px; }
.brand-fallback { display: inline-flex; align-items: center; gap: 10px; color: var(--wpr-navy); font-weight: 850; font-size: 1.2rem; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; color: #fff; background: var(--wpr-blue); border-radius: 12px; box-shadow: 0 8px 20px rgba(23, 105, 224, .24); }

.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--wpr-line); color: var(--wpr-navy); background: #fff; border-radius: 12px; cursor: pointer; }
.menu-toggle-lines, .menu-toggle-lines::before, .menu-toggle-lines::after { display: block; width: 20px; height: 2px; margin: auto; background: currentColor; content: ""; transition: .2s ease; }
.menu-toggle-lines::before { transform: translateY(-6px); }
.menu-toggle-lines::after { transform: translateY(4px); }
.primary-menu { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.primary-menu a { display: block; padding: 10px 13px; color: var(--wpr-ink); border-radius: 10px; font-size: .94rem; font-weight: 700; }
.primary-menu a:hover, .primary-menu .current-menu-item > a { color: var(--wpr-blue); background: #eef5ff; }
.header-cta { padding: 10px 17px !important; color: #fff !important; background: var(--wpr-blue) !important; }
.header-cta:hover { background: var(--wpr-blue-dark) !important; }

.site-main { min-height: 62vh; }
.hero { overflow: hidden; padding: 82px 0 70px; background: linear-gradient(145deg, #eff6ff 0%, #fff 55%, #fff8e9 100%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr); gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 7px 12px; color: var(--wpr-blue-dark); background: #e2efff; border-radius: 999px; font-size: .82rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.hero h1 { max-width: 760px; margin: 0 0 18px; color: var(--wpr-navy); font-size: clamp(2.5rem, 6vw, 4.65rem); line-height: 1.03; letter-spacing: -.045em; }
.hero h1 span { color: var(--wpr-blue); }
.hero-copy { max-width: 660px; margin: 0 0 30px; color: var(--wpr-muted); font-size: clamp(1rem, 2vw, 1.15rem); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.wpr-button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 22px; border: 1px solid transparent; border-radius: 12px; font-weight: 800; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.wpr-button:hover { transform: translateY(-2px); }
.wpr-button-primary { color: #fff; background: var(--wpr-blue); box-shadow: 0 10px 24px rgba(23, 105, 224, .22); }
.wpr-button-primary:hover { color: #fff; background: var(--wpr-blue-dark); }
.wpr-button-secondary { color: var(--wpr-navy); background: #fff; border-color: var(--wpr-line); }
.wpr-button-secondary:hover { color: var(--wpr-blue); box-shadow: var(--wpr-shadow); }
.hero-notes { display: flex; flex-wrap: wrap; gap: 16px; margin: 24px 0 0; padding: 0; color: var(--wpr-muted); list-style: none; font-size: .9rem; font-weight: 650; }
.hero-notes li::before { margin-right: 7px; color: #16a36a; content: "✓"; font-weight: 900; }
.quiz-demo { position: relative; padding: 24px; color: #fff; background: var(--wpr-navy); border-radius: 26px; box-shadow: 0 24px 64px rgba(11, 31, 58, .2); }
.quiz-demo::after { position: absolute; right: -45px; bottom: -45px; width: 150px; height: 150px; background: rgba(245, 158, 11, .2); border-radius: 50%; content: ""; }
.demo-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.demo-kicker { color: #a9c8ff; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.demo-count { padding: 5px 10px; color: var(--wpr-navy); background: var(--wpr-orange); border-radius: 999px; font-size: .75rem; font-weight: 900; }
.demo-question { margin: 0 0 20px; font-size: 1.25rem; line-height: 1.35; }
.demo-option { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 12px 14px; color: #dce8fa; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; font-size: .92rem; }
.demo-option.is-active { color: #fff; background: rgba(23, 105, 224, .35); border-color: #4e95f2; }
.demo-radio { width: 16px; height: 16px; border: 2px solid currentColor; border-radius: 50%; }

.section { padding: 74px 0; }
.section-soft { background: var(--wpr-soft); }
.section-heading { max-width: 700px; margin: 0 auto 36px; text-align: center; }
.section-heading h2 { margin: 0 0 10px; color: var(--wpr-navy); font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; letter-spacing: -.025em; }
.section-heading p { margin: 0; color: var(--wpr-muted); }
.quiz-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.quiz-category-card { position: relative; display: flex; min-height: 225px; flex-direction: column; padding: 24px; color: var(--wpr-ink); background: #fff; border: 1px solid var(--wpr-line); border-radius: var(--wpr-radius); box-shadow: 0 8px 24px rgba(11,31,58,.05); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.quiz-category-card:hover { color: var(--wpr-ink); transform: translateY(-5px); border-color: #b8d4ff; box-shadow: var(--wpr-shadow); }
.card-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 30px; color: var(--wpr-blue); background: #eaf3ff; border-radius: 14px; }
.card-icon svg { width: 24px; height: 24px; }
.quiz-category-card h3 { margin: 0 0 8px; color: var(--wpr-navy); font-size: 1.08rem; line-height: 1.35; }
.quiz-category-card p { margin: 0 0 18px; color: var(--wpr-muted); font-size: .9rem; }
.card-link { margin-top: auto; color: var(--wpr-blue); font-size: .9rem; font-weight: 800; }
.card-link::after { margin-left: 5px; content: "→"; }

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.quiz-post-card { display: flex; min-height: 240px; flex-direction: column; padding: 24px; background: #fff; border: 1px solid var(--wpr-line); border-radius: var(--wpr-radius); }
.quiz-post-card .post-label { align-self: flex-start; margin-bottom: 22px; padding: 5px 10px; color: var(--wpr-blue-dark); background: #eaf3ff; border-radius: 999px; font-size: .73rem; font-weight: 850; text-transform: uppercase; }
.quiz-post-card h3 { margin: 0 0 10px; color: var(--wpr-navy); font-size: 1.18rem; line-height: 1.35; }
.quiz-post-card p { margin: 0 0 18px; color: var(--wpr-muted); font-size: .91rem; }
.quiz-post-card .card-link { margin-top: auto; }

.steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.step-card { padding: 10px 22px; text-align: center; }
.step-number { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 18px; color: #fff; background: var(--wpr-blue); border: 6px solid #dceaff; border-radius: 50%; font-weight: 900; }
.step-card h3 { margin: 0 0 8px; color: var(--wpr-navy); }
.step-card p { margin: 0; color: var(--wpr-muted); }

.cta-panel { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; padding: 38px; color: #fff; background: linear-gradient(135deg, var(--wpr-navy), #123c72); border-radius: 24px; }
.cta-panel h2 { margin: 0 0 8px; font-size: clamp(1.7rem, 4vw, 2.35rem); line-height: 1.15; }
.cta-panel p { margin: 0; color: #c7d7ef; }

.content-shell { width: min(calc(100% - 32px), 860px); margin: 0 auto; padding: 56px 0 76px; }
.page-header { margin-bottom: 32px; }
.page-title, .entry-title { margin: 0 0 12px; color: var(--wpr-navy); font-size: clamp(2rem, 5vw, 3.15rem); line-height: 1.12; letter-spacing: -.03em; }
.entry-meta { color: var(--wpr-muted); font-size: .86rem; }
.entry-content { font-size: 1.04rem; }
.entry-content h2, .entry-content h3, .entry-content h4 { color: var(--wpr-navy); line-height: 1.25; }
.entry-content h2 { margin-top: 2em; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { border-radius: 14px; }
.entry-content .tqb-shortcode-wrapper, .entry-content [class*="tqb-"] { max-width: 100%; }
.archive-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.empty-state { padding: 48px; text-align: center; background: var(--wpr-soft); border-radius: var(--wpr-radius); }

.site-footer { color: #c7d2e2; background: #08182e; }
.footer-main { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 52px; padding: 55px 0 40px; }
.footer-brand { color: #fff; font-size: 1.2rem; font-weight: 850; }
.footer-copy { max-width: 410px; color: #9fb0c8; font-size: .92rem; }
.footer-title { margin: 0 0 14px; color: #fff; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links li + li { margin-top: 8px; }
.footer-links a { color: #c7d2e2; font-size: .92rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { padding: 18px 0; color: #8da0ba; border-top: 1px solid rgba(255,255,255,.1); font-size: .84rem; text-align: center; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 42px; }
  .quiz-demo { max-width: 650px; }
  .quiz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .header-inner { min-height: 64px; }
  .custom-logo { max-height: 42px; }
  .menu-toggle { display: grid; place-items: center; flex: 0 0 auto; }
  .site-navigation { position: absolute; top: 64px; right: 16px; left: 16px; display: none; padding: 12px; background: #fff; border: 1px solid var(--wpr-line); border-radius: 14px; box-shadow: var(--wpr-shadow); }
  .site-navigation.is-open { display: block; }
  .primary-menu { display: block; }
  .primary-menu li + li { margin-top: 3px; }
  .primary-menu a { padding: 12px 13px; }
  .hero { padding: 56px 0 48px; }
  .hero-grid { gap: 34px; }
  .hero h1 { font-size: clamp(2.35rem, 13vw, 3.35rem); }
  .quiz-demo { padding: 20px; border-radius: 20px; }
  .section { padding: 56px 0; }
  .steps-grid { grid-template-columns: 1fr; gap: 34px; }
  .cta-panel { grid-template-columns: 1fr; padding: 28px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 34px; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .wpr-container, .content-shell { width: min(calc(100% - 24px), var(--wpr-max)); }
  .button-row { display: grid; }
  .wpr-button { width: 100%; }
  .hero-notes { display: grid; gap: 8px; }
  .quiz-grid, .post-grid, .archive-grid { grid-template-columns: 1fr; }
  .quiz-category-card { min-height: 205px; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-about { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* SEO content and disclaimer additions — v1.1 */
.wpr-reading-width { max-width: 880px; }
.wpr-seo-intro h2 { margin: 0 0 14px; color: var(--wpr-navy); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12; letter-spacing: -.03em; }
.wpr-seo-intro p { color: var(--wpr-muted); font-size: 1.02rem; }
.wpr-disclaimer { margin: 24px 0; padding: 18px 20px; color: #5c4700 !important; background: #fff8df; border: 1px solid #f2d675; border-left: 5px solid var(--wpr-orange); border-radius: 12px; }
.footer-disclaimer { padding: 16px 0; color: #afbdd1; border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; text-align: center; }


/* Accessible desktop dropdown alignment — v1.2 */
@media (min-width: 761px) {
  .primary-menu > .menu-item-has-children { position: relative; }
  .primary-menu > .menu-item-has-children > .sub-menu {
    position: absolute;
    z-index: 220;
    top: calc(100% + 8px);
    left: 0;
    min-width: 190px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: var(--wpr-white);
    border: 1px solid var(--wpr-line);
    border-radius: 12px;
    box-shadow: var(--wpr-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  }
  .primary-menu > .menu-item-has-children:hover > .sub-menu,
  .primary-menu > .menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
  .primary-menu .sub-menu li { margin: 0; }
  .primary-menu .sub-menu a { width: 100%; white-space: nowrap; }
}

@media (max-width: 760px) {
  .primary-menu .sub-menu {
    position: static;
    margin: 3px 0 5px 12px;
    padding: 0 0 0 10px;
    list-style: none;
    border-left: 2px solid var(--wpr-line);
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }
  .primary-menu .sub-menu a { padding-block: 10px; }
}
	