/* =========================================
   LAWPREP CO. — WEBSITE STYLES
   Design: SA Legal — Black, Red, White, Gold
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #0D0D0D;
  --navy-light: #1C1C1C;
  --red:        #8B1A1A;
  --red-light:  #A52222;
  --gold:       #C9A84C;
  --gold-light: #E0C070;
  --white:      #FFFFFF;
  --off-white:  #F7F5F0;
  --grey-light: #E5E3DD;
  --grey-mid:   #555550;
  --text:       #0D0D0D;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', -apple-system, sans-serif;
  --max-width:  1200px;
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.25;
  color: var(--navy);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { color: #2A2A2A; }

.gold-text  { color: var(--gold); }
.white-text { color: var(--white); }
.serif      { font-family: var(--font-serif); }

/* --- LAYOUT --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; }
.section   { padding: 5rem 0; }
.section--dark { background: var(--navy); }
.section--off  { background: var(--off-white); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}
.btn--gold {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn--gold:hover { background: var(--gold-light); border-color: var(--gold-light); }

.btn--outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn--outline:hover { background: var(--white); color: var(--navy); }

.btn--navy {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn--navy:hover { background: var(--navy-light); border-color: var(--navy-light); }

.btn--red {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn--red:hover { background: var(--red-light); border-color: var(--red-light); }

/* --- NAVIGATION --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navy);
  border-bottom: 3px solid var(--red);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.nav__logo {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
}
.nav__logo span { color: var(--gold); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}
.nav__links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: color var(--transition);
}
.nav__links a:hover,
.nav__links a.active { color: var(--gold); }

.nav__cta { margin-left: 1rem; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all var(--transition);
}

/* --- HERO --- */
.hero {
  background: var(--navy);
  padding: 7rem 0 6rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 45%;
  height: 100%;
  background: linear-gradient(135deg, rgba(139,26,26,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 3px;
  background: var(--red);
}
.hero__eyebrow {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero__eyebrow::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--gold);
}
.hero h1 { color: var(--white); margin-bottom: 1.5rem; max-width: 680px; }
.hero__sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__badge {
  margin-top: 4rem;
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}
.hero__badge-item { text-align: left; }
.hero__badge-item strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--gold);
  line-height: 1;
}
.hero__badge-item span {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- DIVIDER --- */
.divider {
  width: 3rem;
  height: 3px;
  background: var(--red);
  margin: 1.25rem 0;
}
.divider--center { margin: 1.25rem auto; }

/* --- EYEBROW --- */
.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
}

/* --- SECTION HEADERS --- */
.section-header { margin-bottom: 3.5rem; }
.section-header--center { text-align: center; }
.section-header .eyebrow { margin-bottom: 0.75rem; }
.section-header h2 { margin-bottom: 1rem; }
.section-header p { max-width: 600px; color: var(--grey-mid); font-size: 1.05rem; }
.section-header--center p { margin: 0 auto; }

/* --- PILLAR CARDS --- */
.pillar-card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-top: 3px solid var(--red);
  padding: 2.5rem 2rem;
  transition: box-shadow var(--transition);
}
.pillar-card:hover { box-shadow: 0 8px 32px rgba(139,26,26,0.1); }
.pillar-card__icon {
  font-size: 2rem;
  margin-bottom: 1.25rem;
  display: block;
}
.pillar-card h3 { margin-bottom: 0.75rem; font-size: 1.2rem; }
.pillar-card p  { font-size: 0.95rem; line-height: 1.75; }

/* --- QUOTE / STORY BLOCK --- */
.story-block {
  background: var(--navy);
  padding: 5rem 0;
  border-top: 3px solid var(--red);
  border-bottom: 3px solid var(--red);
}
.story-block__quote {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  color: var(--white);
  line-height: 1.6;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  padding: 0 2rem;
}
.story-block__quote::before {
  content: '\201C';
  font-size: 6rem;
  color: var(--red);
  opacity: 0.35;
  position: absolute;
  top: -2rem;
  left: 0;
  line-height: 1;
  font-family: var(--font-serif);
}
.story-block__attr {
  text-align: center;
  margin-top: 2rem;
  color: var(--gold);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

/* --- PROGRAMME CARDS --- */
.programme-card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-top: 3px solid transparent;
  padding: 2.5rem;
  position: relative;
}
.programme-card--featured {
  border-top-color: var(--red);
  box-shadow: 0 4px 24px rgba(139,26,26,0.12);
}
.programme-card__tag {
  position: absolute;
  top: -1px; right: 2rem;
  background: var(--red);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
}
.programme-card h3 { margin-bottom: 0.5rem; }
.programme-card__desc { color: var(--grey-mid); font-size: 0.95rem; margin-bottom: 2rem; }
.price-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--grey-light);
  font-size: 0.95rem;
  gap: 1rem;
}
.price-item:last-child { border-bottom: none; }
.price-item__name { color: var(--text); flex: 1; min-width: 0; }
.price-item__price {
  font-weight: 700;
  color: var(--red);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}

/* --- MODULE LIST --- */
.module-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.module-tag {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-left: 3px solid var(--red);
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  color: var(--navy);
}
.module-tag code {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--gold);
  margin-right: 0.5rem;
}

/* --- CTA BANNER --- */
.cta-banner {
  background: var(--red);
  padding: 4.5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
}
.cta-banner::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
}
.cta-banner h2 { color: var(--white); margin-bottom: 1rem; }
.cta-banner p  { color: rgba(255,255,255,0.85); margin-bottom: 2rem; font-size: 1.05rem; }

/* --- ABOUT PAGE --- */
.about-intro { padding: 5rem 0; }
.about-story {
  background: var(--off-white);
  padding: 5rem 0;
}
.about-story__text { font-size: 1.05rem; line-height: 1.9; }
.about-story__text p + p { margin-top: 1.25rem; }

.tutor-standard { padding: 5rem 0; }
.standard-item {
  display: flex;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--grey-light);
}
.standard-item:last-child { border-bottom: none; }
.standard-item__num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--red);
  opacity: 0.45;
  line-height: 1;
  min-width: 3rem;
}
.standard-item h4 { margin-bottom: 0.4rem; }
.standard-item p  { font-size: 0.95rem; }

/* --- REGISTER PAGE --- */
.register-section { padding: 5rem 0; }
.register-intro { max-width: 640px; margin-bottom: 3rem; }
.register-info { position: sticky; top: 6rem; }

/* Form sections */
.form-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--grey-light);
}
.form-section:last-of-type { border-bottom: none; }
.form-section__title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--navy);
}
.form-section__desc {
  font-size: 0.9rem;
  color: var(--grey-mid);
  margin-bottom: 1.5rem;
}

/* Form groups */
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.form-group .required { color: var(--red); }

/* Inputs & selects */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: 2px;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}
.form-group input::placeholder { color: var(--grey-mid); font-size: 0.88rem; }
.form-group input.error,
.form-group select.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(139,26,26,0.1);
}

/* Select arrow */
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A8A84' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Form row (side-by-side) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Checkbox grid */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--grey-light);
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.85rem;
  line-height: 1.4;
}
.checkbox-item:hover {
  border-color: var(--gold);
  background: rgba(201,168,76,0.04);
}
.checkbox-item input[type="checkbox"] {
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--red);
  width: 16px;
  height: 16px;
}
.checkbox-item span { color: var(--navy); }
.checkbox-item span strong {
  color: var(--gold);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  margin-right: 0.25rem;
}

/* Radio group */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.radio-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--grey-light);
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.9rem;
}
.radio-item:hover {
  border-color: var(--gold);
  background: rgba(201,168,76,0.04);
}
.radio-item input[type="radio"] {
  accent-color: var(--red);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.radio-item span { color: var(--navy); }

/* Module year groups */
.module-year {
  margin-bottom: 1.75rem;
}
.module-year__heading {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--grey-light);
}

/* Submit button */
.form-submit {
  width: 100%;
  text-align: center;
  font-size: 1rem;
  padding: 1.1rem 2rem;
}
.form-submit__hint {
  text-align: center;
  font-size: 0.82rem;
  color: var(--grey-mid);
  margin-top: 0.75rem;
}

/* Success state */
.form-success {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--off-white);
  border: 1px solid var(--grey-light);
}
.form-success__icon {
  width: 4rem;
  height: 4rem;
  background: var(--gold);
  color: var(--navy);
  font-size: 2rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}
.form-success h3 { margin-bottom: 0.75rem; }
.form-success p { color: var(--grey-mid); margin-bottom: 2rem; max-width: 400px; margin-left: auto; margin-right: auto; }

/* Form error message */
.form-error {
  background: rgba(139,26,26,0.06);
  border: 1px solid var(--red);
  color: var(--red);
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
  border-radius: 2px;
}

/* Mobile form adjustments */
@media (max-width: 900px) {
  .checkbox-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .register-info { position: static; }
  .register-section .grid-2 { gap: 2.5rem; }
  .price-item { flex-wrap: nowrap; gap: 0.5rem; }
}

/* --- CONTACT PAGE --- */
.contact-section { padding: 5rem 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.contact-item {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.contact-item__icon {
  width: 3rem;
  height: 3rem;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.contact-item__label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.contact-item__value {
  font-size: 1rem;
  color: var(--navy);
  font-weight: 500;
}
.contact-map {
  background: var(--off-white);
  border: 1px solid var(--grey-light);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey-mid);
  font-size: 0.9rem;
}

/* --- PAGE HERO (inner pages) --- */
.page-hero {
  background: var(--navy);
  padding: 4rem 0 3.5rem;
  border-bottom: 3px solid var(--red);
}
.page-hero .eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
}
.page-hero h1 {
  color: var(--white);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
}
.page-hero p {
  color: rgba(255,255,255,0.7);
  font-size: 1.05rem;
  max-width: 560px;
}

/* --- FOOTER --- */
.footer {
  background: #080808;
  padding: 4rem 0 2rem;
  color: rgba(255,255,255,0.8);
  border-top: 3px solid var(--red);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 2rem;
}
.footer__brand { font-family: var(--font-serif); font-size: 1.3rem; color: var(--white); margin-bottom: 1rem; }
.footer__brand span { color: var(--gold); }
.footer__tagline { font-size: 0.9rem; line-height: 1.7; color: var(--white); }
.footer h4 {
  color: var(--white);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  font-family: var(--font-sans);
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 0.6rem; }
.footer ul a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer ul a:hover { color: var(--gold); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer__bottom a { color: var(--gold); }

/* --- WHATSAPP FLOAT --- */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  z-index: 999;
  transition: transform var(--transition);
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 28px; height: 28px; fill: white; }

/* --- MOBILE --- */
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero__badge { gap: 2rem; }
}

@media (max-width: 700px) {
  .nav__links { display: none; flex-direction: column; gap: 0; }
  .nav__links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--navy);
    padding: 1rem 2rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 3px solid var(--red);
  }
  .nav__links.open a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }
  .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .nav { position: relative; }
  .section { padding: 3.5rem 0; }
  .hero { padding: 4rem 0; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { text-align: center; }
  .grid-3 { grid-template-columns: 1fr; }
}

/* =========================================
   STUDENT PORTAL
   ========================================= */

/* Login card */
.portal-login {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--off-white);
  padding: 4rem 0;
}
.portal-login__card {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-top: 3px solid var(--red);
  padding: 3rem 2.5rem;
}
.portal-login__header {
  text-align: center;
  margin-bottom: 2rem;
}
.portal-login__brand {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.portal-login__brand span { color: var(--gold); }
.portal-login__header h2 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.portal-login__header p {
  font-size: 0.9rem;
  color: var(--grey-mid);
}
.portal-login__footer {
  text-align: center;
  margin-top: 1.5rem;
}
.portal-login__footer a {
  font-size: 0.85rem;
  color: var(--gold);
  text-decoration: underline;
}

/* Dashboard */
.portal-dashboard { padding: 3rem 0 5rem; }

.portal-welcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--grey-light);
}
.portal-welcome h2 { margin-bottom: 0.25rem; }
.portal-welcome__sub {
  font-size: 0.9rem;
  color: var(--grey-mid);
}
.portal-welcome__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.portal-btn-change-pw,
.portal-btn-cancel {
  font-size: 0.82rem;
  padding: 0.6rem 1.25rem;
  color: var(--navy);
  border-color: var(--grey-light);
}

.portal-change-pw {
  background: var(--off-white);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--grey-light);
}
.portal-change-pw h4 { margin-bottom: 1rem; }

.portal-section-header {
  margin-bottom: 2rem;
}
.portal-section-header h3 { margin-bottom: 0.25rem; }
.portal-section-header p {
  font-size: 0.9rem;
  color: var(--grey-mid);
}

/* Module cards grid */
.portal-modules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.module-card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-top: 3px solid var(--red);
  padding: 1.75rem;
  transition: box-shadow var(--transition);
}
.module-card:hover { box-shadow: 0 4px 20px rgba(139,26,26,0.08); }

.module-card__code {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}
.module-card__name {
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}
.module-card__recordings {
  border-top: 1px solid var(--grey-light);
  padding-top: 1rem;
}
.module-card__recording {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  gap: 0.75rem;
}
.module-card__recording + .module-card__recording {
  border-top: 1px solid var(--grey-light);
}
.module-card__rec-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}
.module-card__rec-title {
  font-size: 0.88rem;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.module-card__watch {
  font-size: 0.78rem;
  padding: 0.45rem 1rem;
  flex-shrink: 0;
}
.module-card__empty {
  font-size: 0.88rem;
  color: var(--grey-mid);
  font-style: italic;
}

/* Recording badge */
.recording-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
  background: rgba(201,168,76,0.12);
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}
.recording-badge--urgent {
  color: var(--red);
  background: rgba(139,26,26,0.1);
}

/* Empty state */
.portal-empty {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--off-white);
  border: 1px solid var(--grey-light);
}
.portal-empty h3 { margin-bottom: 0.75rem; }
.portal-empty p { color: var(--grey-mid); max-width: 480px; margin: 0 auto; }

/* Video overlay */
.video-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.video-overlay__inner {
  width: 100%;
  max-width: 960px;
}
.video-overlay__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.video-overlay__header h3 {
  color: var(--white);
  font-size: 1.1rem;
  flex: 1;
}
.video-overlay__close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  padding: 0 0.5rem;
  line-height: 1;
  opacity: 0.7;
  transition: opacity var(--transition);
}
.video-overlay__close:hover { opacity: 1; }

.video-player {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
}
.video-player iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* =========================================
   ADMIN PANEL
   ========================================= */

.admin-dashboard { padding: 2rem 0 5rem; }

.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--grey-light);
  margin-bottom: 2rem;
}
.admin-tab {
  background: none;
  border: none;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--grey-mid);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}
.admin-tab:hover { color: var(--navy); }
.admin-tab--active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.admin-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.admin-form {
  background: var(--off-white);
  border: 1px solid var(--grey-light);
  padding: 2rem;
  margin-bottom: 2rem;
}
.admin-form h4 { margin-bottom: 1rem; }

.admin-result {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--white);
  border: 1px solid var(--grey-light);
  font-size: 0.9rem;
  line-height: 1.7;
}

.admin-btn-sm {
  font-size: 0.78rem;
  padding: 0.4rem 0.85rem;
}
.admin-btn-cancel {
  color: var(--grey-mid);
  border-color: var(--grey-light);
}

/* Admin table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table th {
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-mid);
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--grey-light);
}
.admin-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--grey-light);
  color: var(--navy);
}
.admin-table tbody tr:hover { background: var(--off-white); }

/* Enrolment row */
.admin-enrolment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--grey-light);
  font-size: 0.9rem;
  gap: 1rem;
}

/* Upload progress */
.upload-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  background: var(--white);
  border: 1px solid var(--grey-light);
  padding: 0.5rem;
  height: 2.5rem;
}
.upload-progress__bar {
  height: 100%;
  background: var(--gold);
  width: 0%;
  transition: width 0.3s ease;
}
.upload-progress__text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  min-width: 3rem;
  text-align: right;
}

/* Admin stats */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.admin-stat {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-top: 3px solid var(--gold);
  padding: 2rem;
  text-align: center;
}
.admin-stat__num {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.admin-stat__label {
  font-size: 0.8rem;
  color: var(--grey-mid);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Clickable Overview cards */
button.admin-stat--clickable {
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
button.admin-stat--clickable:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
button.admin-stat--clickable:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* "What R 2,800 buys" — value section on homepage */
.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.value-card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-top: 4px solid var(--gold);
  padding: 1.75rem 1.5rem;
  text-align: center;
}
.value-card__num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.value-card__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-mid);
  margin-bottom: 1rem;
  font-weight: 600;
}
.value-card p {
  font-size: 0.88rem;
  color: var(--navy);
  line-height: 1.5;
  margin: 0;
}

.value-compare {
  max-width: 720px;
  margin: 0 auto 2rem auto;
  background: var(--off-white, #faf7f2);
  padding: 2rem 2.5rem;
  border-radius: 6px;
  border-left: 4px solid var(--navy);
}
.value-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.value-table td {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--grey-light);
}
.value-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.value-table__total td { padding-top: 1rem; border-top: 2px solid var(--navy); border-bottom: none; }
.value-table__lawprep td { color: var(--gold); font-size: 1.05rem; }
.value-table__save td { color: var(--red); font-size: 1.05rem; }

.value-quote {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.value-quote p {
  color: var(--grey-mid);
  margin-bottom: 1rem;
}
.value-quote blockquote {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--navy);
  border-left: 4px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 0;
  background: var(--white);
  text-align: left;
}

@media (max-width: 900px) {
  .value-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .value-grid { grid-template-columns: 1fr; }
  .value-compare { padding: 1.5rem; }
}

/* Saturday timetable rows — responsive */
.timetable-row {
  display: grid;
  grid-template-columns: 160px 1fr;
}
@media (max-width: 600px) {
  .timetable-row {
    grid-template-columns: 1fr;
  }
  .timetable-row > div:first-child {
    padding-bottom: 0.5rem !important;
  }
}

/* ====== BASKET ====== */
.basket {
  max-width: 1100px;
  margin: 2rem auto 0 auto;
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-top: 4px solid var(--gold);
  padding: 1.5rem 1.75rem;
  border-radius: 6px;
}
.basket__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--grey-light);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.basket__header h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.basket__count-pill {
  background: var(--navy);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-family: var(--font-body, inherit);
  min-width: 1.6rem;
  text-align: center;
}
.basket__total-wrap {
  text-align: right;
}
.basket__total-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey-mid);
}
.basket__total {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  display: block;
}
.basket__empty {
  color: var(--grey-mid);
  text-align: center;
  margin: 0;
  padding: 1rem 0;
  font-size: 0.92rem;
}
.basket__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.basket__item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--grey-light);
}
.basket__item:last-child { border-bottom: none; }
.basket__item-label {
  color: var(--navy);
  font-size: 0.95rem;
}
.basket__item-label em {
  font-style: normal;
  color: var(--grey-mid);
  font-size: 0.82rem;
  margin-left: 0.3rem;
}
.basket__item-price {
  font-weight: 600;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.basket__remove {
  background: transparent;
  border: 1px solid var(--grey-light);
  color: var(--grey-mid);
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s ease;
}
.basket__remove:hover {
  border-color: var(--red);
  color: var(--red);
}
.basket__note {
  font-size: 0.8rem;
  color: var(--grey-mid);
  margin: 0.5rem 0 0 0;
  font-style: italic;
}
.basket__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--grey-light);
  margin-top: 1rem;
}
.btn--disabled {
  pointer-events: none;
  opacity: 0.45;
}

/* Basket Summary on register.html */
.basket-summary {
  background: var(--off-white, #faf7f2);
  border-left: 4px solid var(--gold);
  padding: 1.5rem 1.75rem;
  border-radius: 4px;
  margin-bottom: 2rem;
}
.basket-summary h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
}
.basket-summary--empty {
  background: var(--white);
  border-left-color: var(--grey-light);
  font-size: 0.9rem;
  color: var(--grey-mid);
}
.basket-summary--empty p { margin: 0; }
.basket-summary__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 2px solid var(--navy);
  margin-top: 0.5rem;
  font-size: 1.05rem;
  color: var(--navy);
}
.basket-summary__total strong {
  font-family: var(--font-serif);
  font-size: 1.3rem;
}
.basket-summary__edit {
  margin: 1rem 0 0 0;
  font-size: 0.85rem;
  text-align: center;
}
.basket-summary__edit a { color: var(--navy); }

@media (max-width: 600px) {
  .basket { padding: 1rem 1.25rem; }
  .basket__item { grid-template-columns: 1fr auto; }
  .basket__remove { grid-column: 2; grid-row: 1; }
  .basket__item-price { grid-column: 1 / -1; font-size: 0.92rem; color: var(--gold); }
}

/* "Subjects This Semester" cards */
.this-sem-card {
  display: grid;
  grid-template-columns: 110px 1fr 70px;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-left: 4px solid var(--gold);
  padding: 1rem 1.25rem;
  border-radius: 4px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.this-sem-card:hover {
  border-left-color: var(--navy);
  transform: translateX(2px);
}
.this-sem-card__code {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--navy);
  font-size: 1rem;
  letter-spacing: 0.04em;
}
.this-sem-card__name {
  font-size: 0.92rem;
  color: var(--navy);
}
.this-sem-card__year {
  font-size: 0.72rem;
  color: var(--grey-mid);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: right;
}
@media (max-width: 640px) {
  .this-sem-card { grid-template-columns: 90px 1fr; }
  .this-sem-card__year { grid-column: 2; text-align: left; margin-top: 0.2rem; }
}

/* Pricing nav highlight — gold accent */
.nav__pricing { color: var(--gold) !important; font-weight: 600; }

/* ====== PRICING CALCULATOR ====== */
.calc {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}
.calc__controls { display: flex; flex-direction: column; gap: 1.5rem; }
.calc__group {}
.calc__label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-mid);
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.calc__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
/* Track pills: only 2 options, always side-by-side (fixes Android wrap) */
.calc__pills[data-group="track"] {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.calc__pills[data-group="track"] .calc__pill {
  width: 100%;
}
/* Count pills: 1-5, always inline so all 5 fit one row */
.calc__pills[data-group="count"] {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.calc__pills[data-group="count"] .calc__pill {
  text-align: center;
  padding: 0.7rem 0.4rem;
}
.calc__pill {
  background: var(--white);
  border: 1px solid var(--grey-light);
  padding: 0.75rem 1.1rem;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--navy);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
  text-align: left;
  line-height: 1.3;
}
.calc__pill small {
  display: block;
  font-size: 0.75rem;
  color: var(--grey-mid);
  font-weight: 400;
  margin-top: 0.2rem;
}
.calc__pill:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--navy);
}
.calc__pill--active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.calc__pill--active small { color: rgba(255,255,255,0.75); }
.calc__pill--active:hover { background: var(--navy); color: var(--white); }
.calc__pill--disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.calc__result {
  background: var(--navy);
  color: var(--white);
  padding: 2.5rem 2rem;
  border-radius: 8px;
  border-top: 4px solid var(--gold);
  position: sticky;
  top: 100px;
}
.calc__result-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.calc__result-total {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.calc__per {
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  margin-left: 0.4rem;
}
.calc__result-meta {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 1rem;
}
.calc__result-saving {
  background: var(--gold);
  color: var(--navy);
  padding: 0.6rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.calc__includes {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
}
.calc__includes li {
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: relative;
  padding-left: 1.25rem;
}
.calc__includes li:last-child { border-bottom: none; }
.calc__includes li:before {
  content: '✓';
  color: var(--gold);
  position: absolute;
  left: 0;
  font-weight: 700;
}
.calc__cta {
  display: block !important;
  text-align: center !important;
  width: 100%;
}
@media (max-width: 800px) {
  .calc { grid-template-columns: 1fr; }
  .calc__result { position: static; }
  .calc__result-total { font-size: 2.5rem; }
}

/* Track toggle (UNISA / Contact / All) */
.admin-track-toggle {
  display: inline-flex;
  border: 1px solid var(--grey-light);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.admin-track-toggle__btn {
  background: var(--white);
  border: none;
  padding: 0.6rem 1.1rem;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--grey-mid);
  cursor: pointer;
  border-right: 1px solid var(--grey-light);
  transition: background 0.15s ease, color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.admin-track-toggle__btn:last-child { border-right: none; }
.admin-track-toggle__btn:hover { background: var(--off-white, #faf7f2); color: var(--navy); }
.admin-track-toggle__btn--active {
  background: var(--navy);
  color: var(--white);
}
.admin-track-toggle__btn--active:hover {
  background: var(--navy);
  color: var(--white);
}
.admin-track-toggle__count {
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}
.admin-track-toggle__btn--active .admin-track-toggle__count {
  background: var(--gold);
  color: var(--navy);
}

/* Filter pill (active filter indicator on tabs) */
.admin-filter-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--off-white, #faf7f2);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--navy);
  width: fit-content;
}
.admin-filter-pill__clear {
  background: transparent;
  border: none;
  color: var(--grey-mid);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.1rem 0.4rem;
  font-weight: 600;
}
.admin-filter-pill__clear:hover { color: var(--red); }

/* Admin mobile */
@media (max-width: 900px) {
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-table { font-size: 0.82rem; }
  .portal-modules { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .admin-stats { grid-template-columns: 1fr; }
  .admin-tabs { overflow-x: auto; }
  .video-overlay { padding: 1rem; }
}
