/* ----------------------------------------------
   CORE VARIABLES
------------------------------------------------*/

:root {
  --bg-main: #050816;
  --bg-alt: #060b1d;
  --bg-panel: #0b1024;
  --bg-panel-soft: #101735;

  --text-main: #ffffff;
  --text-muted: #c5c9e2;
  --text-soft: #9aa0c6;

  --accent: #5b8bff;
  --accent-soft: #7c5cff;
  --accent-grad: linear-gradient(135deg, #5b8bff, #7c5cff);

  --success: #4ee66c;
  --danger: #ff5b7f;

  --border-soft: rgba(255, 255, 255, 0.08);
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.55);

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
}

/* ----------------------------------------------
   RESETS
------------------------------------------------*/

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

html,
body {
  margin: 0;
  padding: 0;
  color: var(--text-main);
  background: radial-gradient(circle at top left, #141a3d, #050816 60%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

/* ----------------------------------------------
   LAYOUT HELPERS
------------------------------------------------*/

.container {
  width: min(1120px, 100% - 3rem);
  margin-inline: auto;
}

.section {
  padding: 3.2rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

/* ----------------------------------------------
   HEADER & NAVIGATION
------------------------------------------------*/

.site-header {
  position: sticky;
  top: 0;
  background: rgba(5, 8, 22, 0.92);
  backdrop-filter: blur(14px);
  z-index: 50;
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
}

/* Branding */

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-size: 0.88rem;
  letter-spacing: 0.16em;
}

.brand-tagline {
  font-size: 0.7rem;
  color: var(--text-soft);
}

/* Nav */

.main-nav {
  display: flex;
  gap: 0.8rem;
}

.nav-link {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  text-decoration: none;
  transition: 0.2s;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav-cta {
  border: 1px solid rgba(124, 92, 255, 0.4);
}

/* ----------------------------------------------
   HERO SECTIONS
------------------------------------------------*/

.hero {
  padding: 3rem 0 2.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.4rem;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 5vw, 2.9rem);
  margin: 0.5rem 0 0.7rem;
}

.hero-subtitle {
  max-width: 32rem;
  color: var(--text-soft);
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--accent-soft);
  text-transform: uppercase;
}

.hero-actions {
  margin: 1.3rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero-stats {
  list-style: none;
  padding: 0;
  margin: 0.7rem 0 0;
  color: var(--text-soft);
}

.hero-stats li strong {
  color: #ffffff;
}

.hero-progress {
  margin-top: 0.65rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

/* Hero cards */

.hero-cards {
  display: grid;
  gap: 1rem;
}

.category-card {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-soft);
}

.category-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.category-card-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.9rem 1rem 1rem;
  background: linear-gradient(to top, rgba(5, 8, 22, 0.9), transparent 70%);
}

.category-card-overlay h3 {
  margin: 0;
}

.category-card-overlay p {
  margin: 0.2rem 0 0.5rem;
  color: var(--text-soft);
  font-size: 0.85rem;
}

.card-link {
  color: var(--accent);
  font-size: 0.8rem;
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}

/* ----------------------------------------------
   BUTTONS (PERFECT CENTRING)
------------------------------------------------*/

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  transition: 0.2s ease;
}

.btn.primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 12px 28px rgba(91, 139, 255, 0.4);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(91, 139, 255, 0.6);
}

.btn.ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn.full-width {
  width: 100%;
}

.btn.large {
  padding: 0.8rem 1.9rem;
  font-size: 1rem;
}

/* Premium button - glowing */

.btn.pay {
  background: radial-gradient(circle at top left, #ffb46a, #ff5b7f);
  color: #fff;
  font-weight: 600;
  border: none;
  animation: payPulse 2.3s infinite;
}

.btn.pay.small {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

@keyframes payPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 91, 127, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(255, 91, 127, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 91, 127, 0);
  }
}

/* ----------------------------------------------
   INFO PANELS
------------------------------------------------*/

.info-panel {
  background: var(--bg-panel);
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.info-panel.small {
  font-size: 0.85rem;
}

/* ----------------------------------------------
   ADVANTAGE SECTION
------------------------------------------------*/

.adv-grid {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: 1.1fr 1.1fr;
  gap: 1.5rem 3rem;
}

.adv-card h3 {
  margin: 0 0 0.3rem;
  color: var(--accent-soft);
}

.adv-card p {
  margin: 0;
  color: var(--text-soft);
}

/* ----------------------------------------------
   CATEGORY / FEATURES
------------------------------------------------*/

.grid-two {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
}

.category-list-item + .category-list-item {
  margin-top: 1.2rem;
}

.inline-link {
  text-decoration: none;
  color: var(--accent);
  font-size: 0.9rem;
}

.inline-link:hover {
  text-decoration: underline;
}

.feature-panel {
  background: var(--bg-panel-soft);
  padding: 1.3rem 1.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.feature-list {
  margin: 1rem 0 1.3rem;
  padding-left: 1.2rem;
  color: var(--text-soft);
}

.feature-list li {
  margin: 0.35rem 0;
}

.badge-row {
  display: flex;
  gap: 1rem;
}

.badge {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border-soft);
}

.badge-number {
  font-size: 1.1rem;
  font-weight: 700;
  display: block;
}

.badge-label {
  font-size: 0.8rem;
  color: var(--text-soft);
}

/* ----------------------------------------------
   REVIEWS
------------------------------------------------*/

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  margin-top: 1.6rem;
}

.review-card {
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.3rem 1.4rem;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.review-stars {
  color: #ffb46a;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.review-meta {
  margin-top: 0.7rem;
  font-size: 0.85rem;
  color: var(--text-soft);
}

/* ----------------------------------------------
   CTA SECTION
------------------------------------------------*/

.cta-section {
  padding: 3rem 0;
}

.cta-inner {
  background: radial-gradient(circle at top left, #414bbd, #171c46);
  padding: 1.8rem;
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(91, 139, 255, 0.5);
  box-shadow: var(--shadow-soft);
}

.cta-inner h2 {
  margin: 0 0 0.3rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
}

.cta-inner p {
  margin: 0;
  max-width: 420px;
  color: rgba(230, 233, 255, 0.85);
  font-size: 0.95rem;
}

/* ----------------------------------------------
   FOOTER
------------------------------------------------*/

.site-footer {
  padding: 1.4rem 0;
  text-align: center;
  background: #040712;
  border-top: 1px solid var(--border-soft);
  color: var(--text-soft);
  font-size: 0.85rem;
}

.footer-note {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--text-soft);
}

/* ----------------------------------------------
   CATEGORY BANNER IMAGES
------------------------------------------------*/

.page-hero-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
  box-shadow: var(--shadow-soft);
  margin: 1rem 0 2rem;
}

/* ----------------------------------------------
   MOCK TEST LAYOUT & VEHICLE PICKER
------------------------------------------------*/

.mock-layout {
  display: grid;
  /* LEFT = sidebar, RIGHT = questions / start panel */
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 2fr);
  gap: 2rem;
  align-items: flex-start;
}

.mock-status {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.mock-note {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.mock-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

/* Question box */

.mock-question-box {
  margin-top: 1.4rem;
  background: var(--bg-panel-soft);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem 1.5rem;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.mock-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-bottom: 0.5rem;
}

.mock-progress-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-bottom: 1rem;
}

.mock-progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--accent-grad);
  transition: width 0.25s ease-out;
}

#mock-question-text {
  font-size: 1.1rem;
  margin: 0 0 0.9rem;
}

#mock-answer-select {
  width: 100%;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  padding: 0.55rem 0.8rem;
  background: rgba(4, 7, 18, 0.8);
  color: var(--text-main);
  font-size: 0.95rem;
}

.mock-next-btn {
  margin-top: 0.2rem;
}

/* Result box */

.mock-result {
  margin-top: 1.4rem;
  background: var(--bg-panel-soft);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem 1.6rem;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.mock-result h2 {
  margin-top: 0;
}

.mock-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 0.9rem 0 0.8rem;
}

/* Sidebar */

.mock-sidebar {
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.mock-sidebar h2 {
  margin-top: 0;
}

.mock-sidebar-text {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin: 0.4rem 0 0.9rem;
}

/* Vehicle pills */

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.5rem 0 1rem;
}

.pill-button {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0.5rem 0.95rem;
  font-size: 0.9rem;
  background: rgba(9, 14, 36, 0.9);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: 0.18s ease;
}

.pill-button:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.26);
  color: #ffffff;
}

.pill-button.active {
  background: radial-gradient(circle at top left, #5b8bff, #7c5cff);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 10px 26px rgba(91, 139, 255, 0.45);
}

/* Premium banner */

.premium-banner {
  position: relative;
  border: 1px solid rgba(91, 139, 255, 0.7);
  background: radial-gradient(circle at top left, #3b46c4, #101735);
}

.premium-banner h2 {
  margin-top: 0.1rem;
  margin-bottom: 0.4rem;
}

.premium-banner p {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(231, 234, 255, 0.92);
}

.premium-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(5, 8, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

/* ----------------------------------------------
   RESPONSIVE DESIGN
------------------------------------------------*/

@media (max-width: 920px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    text-align: center;
  }

  .hero-cards {
    grid-template-columns: 1fr;
  }

  .grid-two {
    grid-template-columns: 1fr;
  }

  .review-grid {
    grid-template-columns: 1fr;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .mock-layout {
    grid-template-columns: 1fr;
  }

  /* On tablet/mobile, show the vehicle picker first */
  .mock-sidebar {
    order: -1;
  }
}

@media (max-width: 620px) {
  .info-panel,
  .mock-question-box,
  .mock-result,
  .mock-sidebar {
    padding: 1.2rem 1.1rem;
  }

  .mock-actions-row,
  .mock-result-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* === Home: Pick your theory category – colour cards === */

#categories .info-panel {
  position: relative;
  border-radius: 20px;
  padding: 1.7rem 1.9rem 1.9rem;
  background:
    radial-gradient(circle at top left, rgba(88, 101, 242, 0.18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(255, 121, 198, 0.12), transparent 55%),
    var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  transition:
    transform 0.16s ease-out,
    box-shadow 0.16s ease-out,
    border-color 0.16s ease-out,
    background 0.16s ease-out;
}

/* Colour strip on the left of each category card */
#categories .info-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 999px;
  opacity: 0.9;
}

/* Car = blue, Motorcycle = purple, Lorry = teal */
#categories .info-panel:nth-child(1)::before {
  background: linear-gradient(to bottom, #4f8dff, #8fd3ff);
}

#categories .info-panel:nth-child(2)::before {
  background: linear-gradient(to bottom, #c471f5, #f7797d);
}

#categories .info-panel:nth-child(3)::before {
  background: linear-gradient(to bottom, #20e3b2, #29a6ff);
}

#categories .info-panel:hover {
  transform: translateY(-2px);
  border-color: rgba(140, 122, 255, 0.8);
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(140, 122, 255, 0.6);
}

#categories .info-panel h3 {
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

#categories .info-panel p {
  font-size: 0.95rem;
  color: var(--text-soft);
}

#categories .info-panel .feature-list {
  margin-top: 0.75rem;
}

#categories .info-panel .feature-list li + li {
  margin-top: 0.25rem;
}

#categories .info-panel .btn {
  margin-top: 1.1rem;
}

/* ----------------------------------------------
   MOBILE HEADER NAV: DROPDOWN MENU (CLEAN)
   (replaces the previous two-row wrapping menu)
------------------------------------------------*/

/* Screen-reader utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hamburger button hidden on desktop */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.09);
}

/* Bars */
.menu-toggle-bars {
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
  position: relative;
  display: block;
}

.menu-toggle-bars::before,
.menu-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
}

.menu-toggle-bars::before {
  top: -6px;
}

.menu-toggle-bars::after {
  top: 6px;
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  /* Make nav a dropdown panel */
  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.6rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(5, 8, 22, 0.92);
    backdrop-filter: blur(14px);
  }

  /* When open */
  body.nav-open .main-nav {
    display: flex;
  }

  .main-nav .nav-link {
    width: 100%;
    justify-content: center;
    padding: 0.6rem 0.9rem;
  }
}