/* ============================================
   Lionfish Tutoring — Design System
   ============================================ */

:root {
  /* Logo palette: navy #081C36, teal #4097B6, sky #B7D9ED, cream #F5EFDE */
  --color-primary: #123d5c;
  --color-primary-dark: #081c36;
  --color-primary-light: #4097b6;
  --color-sky: #b7d9ed;
  --color-cream: #f5efde;
  --color-accent: #4097b6;
  --color-accent-light: #6bb4cf;
  --color-accent-dark: #081c36;
  --color-surface: #ffffff;
  --color-surface-alt: #faf6f0;
  --color-text: #081c36;
  --color-text-muted: #4a6278;
  --color-border: #dce8ef;
  --color-success: #059669;
  --color-error: #dc2626;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --shadow-sm: 0 1px 3px rgba(8, 28, 54, 0.06);
  --shadow-md: 0 4px 20px rgba(8, 28, 54, 0.1);
  --shadow-lg: 0 12px 40px rgba(8, 28, 54, 0.12);
  --shadow-glow: 0 0 48px rgba(64, 151, 182, 0.2);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --header-height: 80px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-surface);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: rgba(64, 151, 182, 0.25);
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

ul {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-primary-dark);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background: linear-gradient(180deg, var(--color-surface-alt) 0%, var(--color-surface) 100%);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}

.section-header p {
  margin-top: 1rem;
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary-light) 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(8, 28, 54, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #061525 0%, #3589a8 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(8, 28, 54, 0.32);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(8, 28, 54, 0.22);
}

.btn-outline {
  background: transparent;
  color: #ffffff;
  border-color: rgba(183, 217, 237, 0.75);
}

.btn-outline:hover {
  background: rgba(183, 217, 237, 0.14);
  border-color: var(--color-sky);
  color: #ffffff;
}

.btn-accent {
  background: var(--color-primary-light);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(64, 151, 182, 0.35);
}

.btn-accent:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(8, 28, 54, 0.3);
}

.btn-accent:active {
  transform: translateY(0);
}

/* ============================================
   Header
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
  background: transparent;
}

.logo-img-footer {
  width: 72px;
  height: 72px;
}

.footer-logo {
  margin-bottom: 0.5rem;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-desktop a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  padding: 0.25rem 0;
}

.nav-desktop a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

.nav-desktop a:hover::after,
.nav-desktop a.active::after {
  width: 100%;
}

.nav-desktop a.active {
  color: var(--color-primary-dark);
}

.nav-desktop a:hover {
  color: var(--color-primary-light);
}

/* Mobile Nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary-dark);
  transition: all var(--transition);
  border-radius: 2px;
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: white;
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition);
}

.nav-mobile.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-mobile a {
  display: block;
  padding: 0.875rem 0;
  font-weight: 500;
  font-size: 1.05rem;
  border-bottom: 1px solid var(--color-border);
}

.nav-mobile a:last-child {
  border-bottom: none;
}

.nav-mobile a.active {
  color: var(--color-primary-dark);
}

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: flex; }
  .nav-mobile { display: block; }
}

/* ============================================
   Hero / Page Banner
   ============================================ */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  margin-top: var(--header-height);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(8, 28, 54, 0.9) 0%, rgba(18, 61, 92, 0.78) 45%, rgba(64, 151, 182, 0.55) 100%),
    url("../images/hero-banner.jpg?v=2") center 40% / cover no-repeat;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 75% 40%, rgba(183, 217, 237, 0.18) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  color: white;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(183, 217, 237, 0.12);
  border: 1px solid rgba(183, 217, 237, 0.35);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
  color: var(--color-sky);
}

.hero h1 {
  color: white;
  margin-bottom: 1.25rem;
}

.hero p,
.hero-lead {
  font-size: 1.15rem;
  opacity: 0.92;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-lead-short {
  display: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Hero buttons — cream primary + glass secondary for contrast on dark banner */
.hero-actions .btn-primary {
  background: var(--color-cream);
  color: var(--color-primary-dark);
  border-color: var(--color-cream);
  box-shadow: 0 4px 20px rgba(8, 28, 54, 0.35);
}

.hero-actions .btn-primary:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--color-primary-dark);
  box-shadow: 0 8px 28px rgba(8, 28, 54, 0.4);
}

.hero-actions .btn-outline {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hero-actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffffff;
  color: #ffffff;
}

.page-banner {
  margin-top: var(--header-height);
  padding: 5rem 0 4rem;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, var(--color-primary-light) 100%);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-banner h1 {
  color: white;
  position: relative;
}

.page-banner p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 1rem auto 0;
  position: relative;
}

/* ============================================
   Cards & Features
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  padding: 2rem;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(64, 151, 182, 0.35);
}

.feature-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(8, 28, 54, 0.06) 0%, rgba(64, 151, 182, 0.14) 100%);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.feature-card h3 {
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Mission & Vision */
.mv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.mv-card {
  position: relative;
  padding: 2.5rem;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.mv-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary-dark) 0%, var(--color-primary-light) 100%);
}

.mv-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.mv-card blockquote {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--color-primary-dark);
  line-height: 1.7;
}

/* Stats */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  text-align: center;
  padding: 3rem 0;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary-light);
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

/* Course Cards */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.course-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(64, 151, 182, 0.3);
}

.course-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.course-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.course-card:hover .course-image img {
  transform: scale(1.06);
}

.course-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 28, 54, 0.55) 0%, transparent 50%);
}

.course-body {
  padding: 1.5rem;
}

.course-subject {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.course-body h3 {
  margin-bottom: 0.75rem;
}

.course-body p {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.course-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.course-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Tutor Cards */
.tutors-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  max-width: 1040px;
  margin: 0 auto;
  align-items: stretch;
}

.tutor-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tutor-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(64, 151, 182, 0.3);
}

.tutor-profile {
  display: flex;
  justify-content: center;
  padding: 2.25rem 1.5rem 1.5rem;
  background: linear-gradient(180deg, var(--color-surface-alt) 0%, #ffffff 100%);
}

.tutor-photo {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 5px solid #ffffff;
  box-shadow: 0 6px 28px rgba(8, 28, 54, 0.18);
  background: #ffffff;
}

.tutor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
}

.tutor-info {
  padding: 0 1.75rem 2rem;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.tutor-info h3 {
  margin-bottom: 0.35rem;
}

.tutor-role {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 1rem;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.4;
}

.tutor-bio {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: left;
}

.tutor-bio p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0;
}

.tutor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  justify-content: center;
  align-content: flex-start;
  min-height: 5.5rem;
}

.tutor-tag {
  padding: 0.3rem 0.75rem;
  background: rgba(183, 217, 237, 0.35);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-primary-dark);
}

/* ============================================
   Contact Form
   ============================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}

.contact-info h3 {
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-detail-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(8, 28, 54, 0.06) 0%, rgba(64, 151, 182, 0.14) 100%);
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-detail strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
}

.contact-detail span {
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

.contact-form-wrapper {
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

.form-group label .optional {
  font-weight: 400;
  color: var(--color-text-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(64, 151, 182, 0.2);
}

.form-group input.error,
.form-group textarea.error {
  border-color: var(--color-error);
}

.grade-grid.error .grade-option label,
.subjects-grid.error .subject-checkbox label {
  border-color: var(--color-error);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-error {
  font-size: 0.8rem;
  color: var(--color-error);
  margin-top: 0.35rem;
  display: none;
}

.form-error.visible {
  display: block;
}

/* Grade picker */
.grade-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}

.grade-option {
  position: relative;
}

.grade-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.grade-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 0.25rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  margin-bottom: 0;
}

.grade-option input:checked + label {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary-light) 100%);
  border-color: var(--color-primary-dark);
  color: white;
}

.grade-option input:focus-visible + label {
  box-shadow: 0 0 0 3px rgba(64, 151, 182, 0.25);
}

/* Multi-select subjects */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
}

.subject-checkbox {
  position: relative;
}

.subject-checkbox input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.subject-checkbox label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  margin-bottom: 0;
}

.subject-checkbox input:checked + label {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary-light) 100%);
  border-color: var(--color-primary-dark);
  color: white;
}

.subject-checkbox input:focus-visible + label {
  box-shadow: 0 0 0 3px rgba(64, 151, 182, 0.25);
}

/* Honeypot — hidden from humans */
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

.form-actions {
  margin-top: 1.5rem;
}

.form-actions .btn {
  width: 100%;
}

.form-status {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(5, 150, 105, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.form-status.error {
  display: block;
  background: rgba(220, 38, 38, 0.08);
  color: var(--color-error);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.form-security-note {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  text-align: center;
}

@media (max-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .grade-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .subjects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-form-wrapper {
    padding: 1.5rem;
  }

  .form-group input,
  .form-group textarea {
    font-size: 16px; /* prevents iOS zoom on focus */
  }
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-primary-light) 100%);
  color: white;
  text-align: center;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(183, 217, 237, 0.2) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-section h2 {
  color: white;
  margin-bottom: 1rem;
  position: relative;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 520px;
  margin: 0 auto 2rem;
  position: relative;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  margin-bottom: 1.25rem;
}

.footer-links a {
  display: block;
  font-size: 0.9rem;
  padding: 0.35rem 0;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--color-sky);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================
   Responsive — Mobile & Tablet
   ============================================ */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
    --page-gutter: 1.75rem;
  }

  .container {
    padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
  }

  .header-inner {
    gap: 1rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .hero {
    min-height: auto;
    align-items: stretch;
  }

  .hero-bg {
    background:
      linear-gradient(180deg, rgba(8, 28, 54, 0.72) 0%, rgba(8, 28, 54, 0.85) 100%),
      url("../images/hero-banner.jpg?v=2") center 35% / cover no-repeat;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: min(78svh, 640px);
    max-width: none;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .hero-badge {
    align-self: flex-start;
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    padding: 0.3rem 0.7rem;
    margin-bottom: 0.75rem;
  }

  .hero h1 {
    font-size: clamp(1.5rem, 5.8vw, 1.85rem);
    line-height: 1.2;
    margin-bottom: 0.75rem;
  }

  .hero-lead {
    display: none;
  }

  .hero-lead-short {
    display: block;
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 1.25rem;
    max-width: none;
    opacity: 0.95;
  }

  .hero-actions {
    flex-direction: row;
    gap: 0.75rem;
    margin-top: 0;
    max-width: 100%;
  }

  .hero-actions .btn {
    flex: 1;
    width: auto;
    min-height: 44px;
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
    justify-content: center;
  }

  .nav-mobile {
    padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-mobile a {
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .page-banner {
    padding: 3rem 0 2.5rem;
  }

  .page-banner p {
    font-size: 1rem;
    padding: 0 0.5rem;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .stat-number {
    font-size: 2rem;
  }

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

  .mv-grid,
  .tutors-grid {
    gap: 1.5rem;
  }

  .tutors-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .tutor-profile {
    padding: 1.75rem 1rem 1.25rem;
  }

  .tutor-photo {
    width: 200px;
    height: 200px;
  }

  .tutor-role {
    min-height: 0;
  }

  .tutor-tags {
    min-height: 0;
  }

  .tutor-info {
    padding: 0 1.25rem 1.5rem;
  }

  .mv-card {
    padding: 1.75rem;
  }

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

  .cta-section .btn {
    width: 100%;
    max-width: 320px;
  }

  .logo-img {
    width: 46px;
    height: 46px;
  }

  .logo-img-footer {
    width: 64px;
    height: 64px;
  }

  .site-footer {
    padding: 2.5rem 0 1.5rem;
  }
}

@media (max-width: 420px) {
  :root {
    --page-gutter: 1.5rem;
  }

  .hero-content {
    min-height: min(72svh, 580px);
    padding-top: 1.5rem;
    padding-bottom: 1.75rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .grade-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
