/* ===================================================
   WAEC Result Upgrade Portal – Gambia
   style.css
   =================================================== */

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

/* ══════════════════════════════════════════════════
   SPLASH SCREEN
══════════════════════════════════════════════════ */

.splash {
  position: fixed;
  inset: 0;
  background: #003087;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Exit: fade + scale out */
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.splash.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
}

/* ── Pulsing glow rings ─────────────────────────── */
.splash-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
  pointer-events: none;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255, 215, 0, 0.25);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: ring-pulse 2.8s ease-out infinite;
}

.ring-1 { width: 180px; height: 180px; animation-delay: 0s; }
.ring-2 { width: 240px; height: 240px; animation-delay: 0.5s; }
.ring-3 { width: 300px; height: 300px; animation-delay: 1s; }

@keyframes ring-pulse {
  0%   { transform: translate(-50%, -50%) scale(0.5); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
}

/* ── Logo wrapper ────────────────────────────────── */
.splash-logo-wrap {
  animation: logo-entrance 1.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  margin-bottom: 28px;
  position: relative;
  z-index: 2;
}

@keyframes logo-entrance {
  0% {
    opacity: 0;
    transform: scale(2.8) rotate(0deg);
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(360deg);
  }
}

.splash-logo {
  width: 160px;
  height: 160px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 24px rgba(255, 215, 0, 0.55))
          drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5));
}

/* ── Text block ──────────────────────────────────── */
.splash-text {
  text-align: center;
  animation: text-rise 0.8s ease both;
  animation-delay: 1.4s;
  opacity: 0;
}

@keyframes text-rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

.splash-org-name {
  font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #FFD700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  max-width: 520px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.splash-org-sub {
  font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.splash-year {
  display: inline-block;
  margin-top: 10px;
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.4);
  color: #FFD700;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.1em;
}

/* ── Progress bar ────────────────────────────────── */
.splash-bar-track {
  width: 260px;
  height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  margin-top: 32px;
  overflow: hidden;
  animation: text-rise 0.5s ease both;
  animation-delay: 1.7s;
  opacity: 0;
}

.splash-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FFD700, #fff);
  border-radius: 10px;
  transition: width 0.1s linear;
}

.splash-loading-text {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 10px;
  animation: text-rise 0.5s ease both;
  animation-delay: 1.8s;
  opacity: 0;
}



:root {
  --navy:       #003087;
  --navy-dark:  #001f5e;
  --gold:       #FFD700;
  --gold-dark:  #e6c200;
  --orange:     #E87722;
  --orange-dark:#c96210;
  --orange-glow:#ff9a40;
  --green:      #25D366;
  --green-dark: #128C7E;
  --white:      #ffffff;
  --off-white:  #f7f8fa;
  --light-gray: #e8ecf0;
  --mid-gray:   #c0c8d4;
  --text-dark:  #1a1d2e;
  --text-mid:   #4a5568;
  --text-light: #718096;
  --error:      #e53e3e;
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.10);
  --shadow-md:  0 4px 18px rgba(0,0,0,0.13);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.18);
  --radius:     6px;
  --radius-md:  10px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--off-white);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── TOP BAR ────────────────────────────────── */
.top-bar {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.82);
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  height: 32px;
  letter-spacing: 0.02em;
}

.top-bar-login {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}
.top-bar-login:hover { color: var(--gold); }

/* ── HEADER ─────────────────────────────────── */
.site-header {
  background: linear-gradient(135deg, var(--gold) 0%, #ffe44d 50%, var(--gold-dark) 100%);
  border-bottom: 4px solid var(--navy);
  padding: 18px 24px;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
}

/* ── Gambia flag ──────────────────────────────── */
.header-flag {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.flag-img {
  width: 90px;
  height: 58px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid rgba(0,48,135,0.25);
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  display: block;
}

.flag-label {
  font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.logo-emblem {
  flex-shrink: 0;
  transition: transform 0.3s;
}
.logo-emblem:hover { transform: scale(1.05); }

.logo-img {
  width: 130px;
  height: 130px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.35));
}

.logo-text .org-name {
  font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.35);
}

.logo-text .org-sub {
  font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  margin-top: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.logo-text .org-tagline {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(0,48,135,0.65);
  margin-top: 3px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── NAV ────────────────────────────────────── */
.main-nav {
  background: var(--navy);
  border-bottom: 2px solid var(--gold);
}

.main-nav ul {
  list-style: none;
  display: flex;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.main-nav ul li a {
  display: block;
  padding: 11px 18px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s;
  position: relative;
}

.main-nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 3px;
  background: var(--gold);
  transition: all 0.25s;
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
  left: 0; right: 0;
}

.main-nav ul li a.active,
.main-nav ul li a:hover {
  color: var(--gold);
}

/* ── MAIN CONTENT ───────────────────────────── */
.main-content {
  flex: 1;
  padding: 24px 24px 32px;
}

.content-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}

/* ── FORM SECTION ───────────────────────────── */
.form-section { min-width: 0; }

.urgent-notice {
  background: var(--white);
  border-left: 5px solid var(--navy);
  padding: 14px 18px;
  margin-bottom: 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
}

.urgent-notice h2 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

/* ── APPLICATION CARD ────────────────────────── */
.application-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--light-gray);
}

.card-header {
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.02em;
}

.card-body {
  padding: 22px 22px 24px;
}

.form-intro {
  font-size: 0.855rem;
  color: var(--text-mid);
  margin-bottom: 18px;
  line-height: 1.5;
}

/* ── FORM GRID ───────────────────────────────── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--mid-gray);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0, 48, 135, 0.12);
}

.form-group input.invalid,
.form-group select.invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.12);
}

.error-msg {
  font-size: 0.75rem;
  color: var(--error);
  min-height: 16px;
  display: block;
}

/* ── PAYMENT BUTTON ─────────────────────────── */
.btn-payment {
  width: 100%;
  margin-top: 8px;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--orange) 0%, #f58c36 50%, var(--orange-dark) 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 800;
  font-family: inherit;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(232,119,34,0.45), 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.18s, box-shadow 0.18s;
}

.btn-payment::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 60%);
  pointer-events: none;
}

.btn-payment::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
  opacity: 0;
}

.btn-payment:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(232,119,34,0.55), 0 3px 10px rgba(0,0,0,0.18);
}

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

.btn-payment:active::after {
  width: 400px; height: 400px;
  opacity: 0;
}

/* Shimmer animation */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.btn-payment {
  background-size: 200% auto;
  animation: pulse-glow 2.5s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 4px 16px rgba(232,119,34,0.45), 0 2px 6px rgba(0,0,0,0.15); }
  50%       { box-shadow: 0 6px 28px rgba(232,119,34,0.7),  0 2px 6px rgba(0,0,0,0.15); }
}

/* ── DISCLAIMER ─────────────────────────────── */
.disclaimer {
  margin-top: 16px;
  background: #fffbeb;
  border: 1px solid #f6d860;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.8rem;
  color: #7d6608;
  line-height: 1.6;
}

/* ── DYNAMIC SUBJECT ROWS ───────────────────── */
.subjects-section {
  margin-bottom: 16px;
}

.subjects-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.subjects-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark);
}

.subjects-hint {
  font-size: 0.72rem;
  color: var(--text-light);
  font-style: italic;
}

.subject-row {
  display: grid;
  grid-template-columns: 1fr 140px 36px;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  background: var(--off-white);
  border: 1.5px solid var(--light-gray);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
  animation: row-slide-in 0.25s ease both;
}

@keyframes row-slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.subject-row:focus-within {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0,48,135,0.08);
}

.subject-row .row-num {
  display: none; /* hidden, just for accessibility */
}

.subject-row select {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--mid-gray);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color 0.2s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}

.subject-row select:focus {
  border-color: var(--navy);
}

.subject-row select.invalid {
  border-color: var(--error);
}

.subject-row .row-error {
  grid-column: 1 / -1;
  font-size: 0.73rem;
  color: var(--error);
  margin-top: -4px;
}

.btn-remove-row {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--mid-gray);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s;
  margin-top: 1px;
}

.btn-remove-row:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: var(--error);
}

/* ── SIDEBAR ────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 16px; }

.sidebar-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--light-gray);
}

.sidebar-card-header {
  background: linear-gradient(90deg, #5b6fa6 0%, var(--navy) 100%);
  color: var(--white);
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.fee-card .sidebar-card-header {
  background: linear-gradient(90deg, #7a8fc4 0%, var(--navy) 100%);
}

.sidebar-card-body {
  padding: 14px 16px;
}

.fee-hidden-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #e8edf8, #dce3f5);
  border-radius: 50%;
  margin: 0 auto 10px;
  color: var(--navy);
}

.fee-hidden-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 6px;
}

.fee-hidden-sub {
  font-size: 0.76rem;
  color: var(--text-mid);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 12px;
}

.fee-enquire-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px 12px;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: var(--white);
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 3px 10px rgba(37,211,102,0.3);
}

.fee-enquire-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(37,211,102,0.45);
}

/* Contact */
.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-dark);
  font-size: 0.82rem;
  padding: 6px 0;
  transition: color 0.2s;
  word-break: break-all;
}

.contact-item:hover { color: var(--green-dark); }

.contact-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.whatsapp-icon { background: var(--green); color: var(--white); }

/* How it works */
.how-list {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.how-list li {
  font-size: 0.8rem;
  color: var(--text-mid);
  line-height: 1.4;
}

.how-list li strong { color: var(--navy); }

/* Portal Instructions Steps */
.info-intro {
  font-size: 0.8rem;
  color: var(--text-mid);
  line-height: 1.45;
  margin-bottom: 12px;
  font-weight: 500;
}

.info-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--off-white);
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--light-gray);
  transition: border-color 0.2s, background 0.2s;
}

.info-steps li:hover {
  border-color: #cbd5e0;
  background: #f8fafc;
}

.info-steps .step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.info-steps .step-text {
  font-size: 0.78rem;
  color: var(--text-dark);
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
}

.info-steps .step-text strong {
  color: var(--orange-dark);
}

/* ── FOOTER ─────────────────────────────────── */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 16px 24px;
  font-size: 0.78rem;
}

.site-footer .footer-sub {
  margin-top: 4px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
}

/* ── MODAL ──────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  padding: 16px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border-radius: 16px;
  padding: 36px 32px 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-icon {
  width: 70px; height: 70px;
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  color: #2e7d32;
  animation: pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes pop-in {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.modal h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.modal p {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 16px;
}

.modal-details {
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.82rem;
  text-align: left;
  border: 1px solid var(--light-gray);
}

.modal-details div {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  color: var(--text-mid);
  gap: 8px;
}

.modal-details div strong {
  color: var(--text-dark);
  text-align: right;
  word-break: break-word;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
  transition: transform 0.18s, box-shadow 0.18s;
  text-decoration: none;
}

.modal-btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.55);
}

.modal-btn-close {
  padding: 10px 20px;
  background: transparent;
  color: var(--text-mid);
  border: 1.5px solid var(--mid-gray);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s;
}

.modal-btn-close:hover {
  background: var(--light-gray);
  color: var(--text-dark);
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — TABLET (≤820px)
══════════════════════════════════════════════════ */
@media (max-width: 820px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .info-card { grid-column: 1 / -1; }

  .logo-wrap {
    gap: 14px;
  }

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

  .flag-img {
    width: 72px;
    height: 46px;
  }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤580px)
══════════════════════════════════════════════════ */
@media (max-width: 580px) {

  /* Top bar */
  .top-bar {
    font-size: 0.7rem;
    padding: 0 14px;
  }

  /* Header */
  .site-header {
    padding: 14px 16px;
  }

  .logo-wrap {
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    text-align: center;
  }

  .logo-emblem {
    order: 0;
  }

  .logo-text {
    order: 1;
    flex: 1 1 100%;
    text-align: center;
  }

  .logo-text .org-name {
    font-size: 0.95rem;
    line-height: 1.2;
  }

  .logo-text .org-sub {
    font-size: 0.78rem;
  }

  .logo-text .org-tagline {
    font-size: 0.65rem;
  }

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

  /* Flag — sits below logo block, centered */
  .header-flag {
    order: 2;
    flex: 1 1 100%;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    margin-left: 0;
    margin-top: 4px;
  }

  .flag-img {
    width: 60px;
    height: 38px;
  }

  .flag-label {
    font-size: 0.6rem;
  }

  /* Nav */
  .main-nav ul {
    padding: 0 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  .main-nav ul li a {
    padding: 10px 12px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  /* Main content */
  .main-content {
    padding: 14px 14px 24px;
  }

  /* Urgent notice */
  .urgent-notice {
    padding: 10px 14px;
  }

  .urgent-notice h2 {
    font-size: 0.82rem;
    line-height: 1.4;
  }

  /* Card */
  .card-header {
    font-size: 0.88rem;
    padding: 10px 16px;
  }

  .card-body {
    padding: 16px 14px 18px;
  }

  .form-intro {
    font-size: 0.8rem;
  }

  /* Form rows — stack to single column */
  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Subject rows — stack subject & grade vertically */
  .subject-row {
    grid-template-columns: 1fr 36px;
    grid-template-rows: auto auto;
    gap: 8px;
    padding: 10px 10px;
  }

  .subject-row > .form-group:first-child {
    grid-column: 1 / 2;
    grid-row: 1;
  }

  .subject-row > .form-group:nth-child(2) {
    grid-column: 1 / 2;
    grid-row: 2;
  }

  .subject-row > .btn-remove-row {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    align-self: center;
  }

  .subject-row > .row-error {
    grid-column: 1 / -1;
  }

  .subjects-label-row {
    flex-direction: column;
    gap: 2px;
  }

  /* Payment button */
  .btn-payment {
    font-size: 0.92rem;
    padding: 14px 16px;
  }

  /* Disclaimer */
  .disclaimer {
    font-size: 0.76rem;
  }

  /* Sidebar — single column on mobile */
  .sidebar {
    grid-template-columns: 1fr;
  }

  .info-card { grid-column: auto; }

  /* Modal */
  .modal {
    padding: 24px 16px 20px;
    border-radius: 12px;
  }

  .modal h3 {
    font-size: 1.1rem;
  }

  .modal p {
    font-size: 0.82rem;
  }

  .modal-details {
    font-size: 0.78rem;
    padding: 10px 12px;
  }

  .modal-btn-whatsapp {
    font-size: 0.88rem;
    padding: 12px 16px;
  }

  /* Splash */
  .splash-org-name {
    font-size: 1rem;
    padding: 0 16px;
  }

  .splash-org-sub {
    font-size: 0.8rem;
    padding: 0 16px;
  }

  .splash-logo {
    width: 120px;
    height: 120px;
  }

  .splash-bar-track {
    width: 200px;
  }

  /* Footer */
  .site-footer {
    padding: 14px 16px;
    font-size: 0.72rem;
  }
}

/* Very small screens (≤360px) */
@media (max-width: 360px) {
  .logo-text .org-name { font-size: 0.85rem; }
  .logo-text .org-sub  { font-size: 0.72rem; }
  .btn-payment         { font-size: 0.82rem; }
  .main-nav ul li a    { padding: 9px 10px; font-size: 0.75rem; }
}

