/* ============================================================
   UCAS Points Calculator — Main Stylesheet v1.0
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0A1628;
  --navy-mid: #1E3A5F;
  --blue: #1A56DB;
  --blue-light: #E8F0FE;
  --gold: #E8B84B;
  --page-bg: #F0F4FF;
  --white: #FFFFFF;
  --text: #1E3A5F;
  --text-muted: #5A7290;
  --border: #D4DFF0;
  --red: #DC2626;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--page-bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--navy);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.site-logo {
  color: var(--white);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.3px;
}
.site-logo span { color: var(--gold); }

.site-nav { display: flex; gap: 24px; align-items: center; }
.site-nav a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a { color: var(--white); }

/* Strip default WP menu ul/li */
.site-nav ul { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; }
.site-nav ul li { margin: 0; padding: 0; }
.site-nav ul li a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.site-nav ul li a:hover,
.site-nav ul .current-menu-item > a { color: var(--white); }

/* HAMBURGER */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* MOBILE NAV */
.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--navy);
  z-index: 999;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav ul li a,
.mobile-nav a {
  display: block;
  padding: 14px 20px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.2s;
}
.mobile-nav ul li a:hover,
.mobile-nav a:hover {
  background: rgba(255,255,255,0.06);
  color: var(--white);
}

/* ============================================================
   HERO — Homepage
   ============================================================ */
.ucas-hero {
  background: var(--navy);
  padding: 52px 24px 72px;
  text-align: center;
}
.ucas-hero h1 {
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 14px;
}
.ucas-hero h1 span { color: var(--gold); }
.ucas-hero p {
  color: rgba(255,255,255,0.72);
  font-size: 17px;
  max-width: 580px;
  margin: 0 auto;
}

/* HERO — Inner pages */
.ucas-hero-inner {
  background: var(--navy);
  padding: 40px 24px 60px;
  text-align: center;
}
.ucas-hero-inner h1 {
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.8px;
  line-height: 1.2;
  margin-bottom: 10px;
}
.ucas-hero-inner h1 span { color: var(--gold); }
.ucas-hero-inner p {
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-wrap {
  background: #F8FAFF;
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
}
.breadcrumb {
  max-width: 880px;
  margin: 0 auto;
  font-size: 13px;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--blue); text-decoration: none; font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 6px; }

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.ucas-main {
  max-width: 880px;
  margin: -44px auto 0;
  padding: 0 20px 60px;
}
.ucas-main-inner {
  max-width: 880px;
  margin: -36px auto 0;
  padding: 0 20px 60px;
}

/* ============================================================
   CALCULATOR SHORTCODE OUTPUT
   ============================================================ */
.ucas-calc-wrap {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(10,22,40,0.14);
  overflow: hidden;
  margin-bottom: 40px;
}
.ucas-calc-header {
  padding: 22px 28px 18px;
  border-bottom: 2px solid var(--border);
  background: #FAFCFF;
}
.ucas-calc-title { font-size: 15px; font-weight: 700; color: var(--navy); }
.ucas-calc-subtitle { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-top: 4px; }

.ucas-col-headers {
  display: grid;
  grid-template-columns: 200px 1fr 100px 36px;
  gap: 10px;
  padding: 12px 28px 6px;
}
.ucas-col-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ucas-qual-list {
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 48px;
}
.ucas-qual-row {
  display: grid;
  grid-template-columns: 200px 1fr 100px 36px;
  gap: 10px;
  align-items: center;
}
.ucas-qual-row select {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  cursor: pointer;
}
.ucas-qual-row select:focus { border-color: var(--blue); }
.ucas-pts-badge {
  font-size: 15px;
  font-weight: 800;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.ucas-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 0;
  transition: color 0.2s;
  font-family: 'Inter', sans-serif;
  text-align: center;
}
.ucas-remove-btn:hover { color: var(--red); }

.ucas-add-row-wrap { padding: 14px 28px 16px; }
.ucas-add-btn {
  padding: 10px 18px;
  background: var(--blue-light);
  color: var(--blue);
  border: 1.5px dashed var(--blue);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.2s;
}
.ucas-add-btn:hover { background: #d4e4fc; }

.ucas-result-bar {
  padding: 22px 28px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.ucas-result-label { color: rgba(255,255,255,0.65); font-size: 13px; font-weight: 500; }
.ucas-result-total {
  font-size: 58px;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: -2px;
  line-height: 1;
}
.ucas-result-context { font-size: 13px; color: rgba(255,255,255,0.55); margin-top: 6px; }
.ucas-reset-btn {
  padding: 9px 20px;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.75);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
}
.ucas-reset-btn:hover { background: rgba(255,255,255,0.1); color: var(--white); }

.ucas-trust-strip {
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  background: #FAFCFF;
  border-radius: 0 0 16px 16px;
}
.ucas-trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 18px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  flex: 1;
  min-width: 140px;
}
.ucas-trust-item:last-child { border-right: none; }
.ucas-trust-icon { color: var(--blue); font-size: 13px; }

/* ============================================================
   CONTENT AREA (WordPress editor output)
   ============================================================ */
.ucas-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 14px;
  letter-spacing: -0.3px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}
.ucas-content h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy-mid);
  margin: 22px 0 10px;
}
.ucas-content p {
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 14px;
}
.ucas-content a { color: var(--blue); font-weight: 600; text-decoration: none; }
.ucas-content a:hover { text-decoration: underline; }

/* Content sections spacing */
.ucas-content-section { margin-bottom: 48px; }

/* ============================================================
   TABLES
   ============================================================ */
.table-scroll {
  overflow-x: auto;
  margin: 12px 0;
  border-radius: 10px;
  border: 1.5px solid var(--border);
}
.tariff-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tariff-table th {
  background: var(--navy);
  color: var(--white);
  padding: 11px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
}
.tariff-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); color: var(--text); }
.tariff-table tr:nth-child(even) td { background: #F8FAFF; }
.tariff-table .pts-col { font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.tariff-table tr:last-child td { border-bottom: none; }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }

.info-card { background: var(--white); border-radius: 12px; padding: 18px 20px; border: 1.5px solid var(--border); }
.info-card h3 { font-size: 14px; font-weight: 700; color: var(--navy); margin: 0 0 6px; }
.info-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin: 0; }

.tier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.tier-box { background: var(--white); border: 1.5px solid var(--border); border-radius: 10px; padding: 16px; text-align: center; }
.tier-box .t-pts { font-size: 22px; font-weight: 800; color: var(--blue); font-variant-numeric: tabular-nums; letter-spacing: -0.5px; }
.tier-box .t-label { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-top: 4px; line-height: 1.4; }

.combo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.combo-item { background: var(--white); border: 1.5px solid var(--border); border-radius: 10px; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; }
.combo-grades { font-size: 15px; font-weight: 700; color: var(--navy); }
.combo-pts { font-size: 20px; font-weight: 800; color: var(--blue); font-variant-numeric: tabular-nums; }
.combo-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.notice { background: #FDF6E3; border: 1.5px solid #E8B84B; border-radius: 10px; padding: 14px 18px; font-size: 14px; color: #7A5C00; margin: 14px 0; line-height: 1.6; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--white); border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; }
.faq-q {
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Inter', sans-serif;
  gap: 12px;
}
.faq-q:hover { background: #F8FAFF; }
.faq-arrow { font-size: 18px; color: var(--text-muted); transition: transform 0.2s; flex-shrink: 0; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a { display: none; padding: 14px 20px 16px; font-size: 14px; color: var(--text-muted); line-height: 1.75; border-top: 1px solid var(--border); }
.faq-item.open .faq-a { display: block; }

/* ============================================================
   AUTHOR BOX
   ============================================================ */
.author-box {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 24px 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 48px;
}
.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--blue-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--blue);
  overflow: hidden;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-name { font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.author-title { font-size: 13px; color: var(--blue); font-weight: 600; margin-bottom: 10px; }
.author-bio { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 10px; }
.author-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 16px; flex-wrap: wrap; }
.author-meta span { display: flex; align-items: center; gap: 5px; }
.author-link { font-size: 13px; color: var(--blue); font-weight: 600; text-decoration: none; margin-top: 8px; display: inline-block; }
.author-link:hover { text-decoration: underline; }

/* Small author credit line for inner pages */
.author-credit {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  margin-bottom: 32px;
  font-size: 13px;
  color: var(--text-muted);
}
.author-credit a { color: var(--blue); font-weight: 600; text-decoration: none; }
.author-credit a:hover { text-decoration: underline; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 28px 20px;
  font-size: 13px;
  line-height: 1.8;
}
.site-footer a { color: rgba(255,255,255,0.7); text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.footer-nav { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.footer-nav ul { list-style: none; display: flex; gap: 20px; flex-wrap: wrap; margin: 0; padding: 0; }
.footer-nav ul li { margin: 0; }
.footer-nav ul li a { color: rgba(255,255,255,0.65); text-decoration: none; font-size: 13px; }
.footer-nav ul li a:hover { color: var(--white); }

/* ============================================================
   STANDARD PAGE
   ============================================================ */
.page-content { max-width: 760px; margin: 0 auto; padding: 48px 20px 60px; }
.page-content h1 { font-size: 32px; font-weight: 800; color: var(--navy); margin-bottom: 24px; letter-spacing: -0.5px; }
.page-content h2 { font-size: 20px; font-weight: 700; color: var(--navy); margin: 32px 0 12px; }
.page-content p { font-size: 15px; color: var(--text); line-height: 1.75; margin-bottom: 16px; }
.page-content a { color: var(--blue); text-decoration: none; font-weight: 600; }
.page-content a:hover { text-decoration: underline; }
.page-content ul, .page-content ol { margin: 12px 0 16px 24px; }
.page-content li { font-size: 15px; color: var(--text); line-height: 1.7; margin-bottom: 6px; }

/* ============================================================
   RESPONSIVE — Tablet 768px
   ============================================================ */
@media (max-width: 768px) {
  .ucas-main { padding: 0 16px 48px; }
  .ucas-main-inner { padding: 0 16px 48px; }
  .ucas-hero { padding: 40px 16px 64px; }
  .ucas-hero p { font-size: 16px; }
  .ucas-content h2 { font-size: 20px; }
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
  .ucas-trust-strip { flex-wrap: wrap; }
  .ucas-trust-item { min-width: 140px; flex: 1 1 140px; }
}

/* ============================================================
   RESPONSIVE — Mobile 660px
   ============================================================ */
@media (max-width: 660px) {
  /* Header */
  .site-nav { display: none; }
  .menu-toggle { display: flex; }

  /* Hero */
  .ucas-hero { padding: 32px 16px 56px; }
  .ucas-hero h1 { font-size: 28px; letter-spacing: -0.5px; }
  .ucas-hero p { font-size: 15px; }
  .ucas-hero-inner { padding: 28px 16px 50px; }

  /* Main */
  .ucas-main { margin: -36px auto 0; padding: 0 12px 36px; }
  .ucas-main-inner { margin: -30px auto 0; padding: 0 12px 36px; }

  /* Calculator card */
  .ucas-calc-header { padding: 16px 16px 12px; }
  .ucas-calc-subtitle { display: none; }
  .ucas-col-headers { display: none; }
  .ucas-qual-list { padding: 0 14px; gap: 12px; }
  .ucas-qual-row {
    grid-template-columns: 1fr 32px;
    grid-template-rows: auto auto auto;
    gap: 6px;
    background: #F8FAFF;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 12px;
  }
  .ucas-qual-row select:first-child { grid-column: 1; grid-row: 1; }
  .ucas-qual-row select[data-pts] { grid-column: 1; grid-row: 2; }
  .ucas-qual-row .ucas-pts-badge {
    grid-column: 1;
    grid-row: 3;
    text-align: left;
    font-size: 13px;
    padding: 2px 0;
  }
  .ucas-qual-row .ucas-pts-badge::before { content: "Points: "; font-weight: 500; color: var(--text-muted); }
  .ucas-qual-row .ucas-remove-btn { grid-column: 2; grid-row: 1; align-self: start; font-size: 18px; }
  .ucas-add-row-wrap { padding: 10px 14px 14px; }
  .ucas-add-btn { width: 100%; text-align: center; padding: 11px 16px; }
  .ucas-result-bar { padding: 18px 16px; gap: 12px; }
  .ucas-result-total { font-size: 48px; }
  .ucas-result-context { font-size: 12px; }
  .ucas-reset-btn { width: 100%; text-align: center; padding: 10px; }
  .ucas-trust-strip { display: grid; grid-template-columns: 1fr 1fr; }
  .ucas-trust-item { border-right: none; border-bottom: 1px solid var(--border); font-size: 11px; padding: 9px 12px; min-width: unset; }
  .ucas-trust-item:nth-child(odd) { border-right: 1px solid var(--border); }
  .ucas-trust-item:nth-last-child(-n+2) { border-bottom: none; }

  /* Content */
  .ucas-content-section { margin-bottom: 36px; }
  .ucas-content h2 { font-size: 19px; }
  .ucas-content h3 { font-size: 16px; }
  .ucas-content p { font-size: 14px; }
  .table-scroll { border-radius: 8px; }
  .tariff-table th { font-size: 12px; padding: 9px 12px; }
  .tariff-table td { font-size: 13px; padding: 9px 12px; }
  .two-col { grid-template-columns: 1fr; }
  .combo-grid { grid-template-columns: 1fr; }
  .combo-item { padding: 12px 14px; }
  .combo-grades { font-size: 14px; }
  .combo-pts { font-size: 18px; }
  .tier-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tier-box .t-pts { font-size: 18px; }
  .tier-box .t-label { font-size: 11px; }
  .notice { font-size: 13px; padding: 12px 14px; }

  /* Author box */
  .author-box { flex-direction: column; padding: 18px 16px; gap: 14px; }
  .author-avatar { width: 60px; height: 60px; font-size: 20px; }
  .author-name { font-size: 16px; }
  .author-bio { font-size: 13px; }
  .author-meta { gap: 10px; font-size: 11px; }

  /* Page */
  .page-content { padding: 32px 16px 48px; }
  .page-content h1 { font-size: 26px; }
}

/* ============================================================
   RESPONSIVE — Small mobile 380px
   ============================================================ */
@media (max-width: 380px) {
  .ucas-hero h1 { font-size: 24px; }
  .ucas-result-total { font-size: 40px; }
  .ucas-trust-strip { grid-template-columns: 1fr; }
  .ucas-trust-item { border-right: none; }
  .ucas-trust-item:nth-child(odd) { border-right: none; }
}

@media (prefers-reduced-motion: reduce) { .ucas-result-total { transition: none; } }
