/* ==========================================================================
   CODAR TECH AFRICA - LEGAL & UTILITY PAGES (Phase 11)
   Terms, Privacy, Cookies, Refund Policy, 404, Coming Soon, etc.
   ========================================================================== */

/* ==========================================================================
   LEGAL DOCUMENT LAYOUT — sticky TOC + readable body
   ========================================================================== */
.legal-meta {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  margin-bottom: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.legal-meta span { display: inline-flex; align-items: center; gap: 6px; }
.legal-meta i { color: var(--codar-primary-light); }
.legal-meta strong { color: var(--text-primary); }

/* Sticky table of contents */
.legal-toc {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.legal-toc h6 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}
.legal-toc h6 i { color: var(--codar-primary-light); }
.legal-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}
.legal-toc ol li {
  counter-increment: toc;
  margin-bottom: 4px;
}
.legal-toc ol li a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  line-height: 1.4;
}
.legal-toc ol li a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  padding-top: 1px;
}
.legal-toc ol li a:hover {
  background: var(--bg-soft);
  color: var(--codar-primary-light);
}
.legal-toc ol li a:hover::before { color: var(--codar-primary-light); }

/* Body of the legal document */
.legal-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
}
.legal-body > section {
  scroll-margin-top: 100px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-soft);
}
.legal-body > section:last-child { border-bottom: none; }
.legal-body h2 {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.legal-body h2 .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--codar-primary-light);
  background: rgba(30, 94, 255, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}
.legal-body h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--text-primary);
  margin: 24px 0 10px;
}
.legal-body p { margin-bottom: 16px; }
.legal-body ul, .legal-body ol {
  padding-left: 24px;
  margin-bottom: 16px;
}
.legal-body ul li, .legal-body ol li {
  padding: 4px 0;
  line-height: 1.7;
}
.legal-body ul li::marker { color: var(--codar-primary-light); }
.legal-body ol li::marker { color: var(--codar-primary-light); font-weight: 700; }
.legal-body a {
  color: var(--codar-primary-light);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.legal-body a:hover { color: var(--codar-primary); }
.legal-body strong { color: var(--text-primary); font-weight: 600; }

/* Inline callout box */
.legal-callout {
  background: rgba(30, 94, 255, 0.05);
  border-left: 3px solid var(--codar-primary-light);
  padding: 16px 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 18px 0;
  font-size: 0.94rem;
}
.legal-callout strong { color: var(--codar-primary-light); }
.legal-callout.warn {
  background: rgba(245, 180, 0, 0.06);
  border-left-color: var(--codar-accent-dark);
}
.legal-callout.warn strong { color: var(--codar-accent-dark); }

/* Print-friendly button row at top */
.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

/* ==========================================================================
   404 PAGE — large display number + actions
   ========================================================================== */
.error-shell {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}
.error-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 80% 30%, rgba(30, 94, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 20% 70%, rgba(245, 180, 0, 0.06) 0%, transparent 50%);
  pointer-events: none;
}
.error-shell .error-content {
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 580px;
}
.error-shell .error-code {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(8rem, 22vw, 14rem);
  line-height: 0.9;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0;
  letter-spacing: -8px;
  position: relative;
}
.error-shell .error-code::after {
  content: '';
  position: absolute;
  width: 110px; height: 110px;
  background: var(--codar-accent);
  border-radius: 50%;
  opacity: 0.15;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(40px);
  z-index: -1;
}
.error-shell h1 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  margin: 18px 0 12px;
}
.error-shell .lead-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 30px;
  line-height: 1.6;
}
.error-shell .error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 30px;
}
/* Helpful links row */
.error-shell .helpful-links {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}
.error-shell .helpful-links small {
  display: block;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.error-shell .helpful-links .links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}
.error-shell .helpful-links .links a {
  font-size: 0.92rem;
  color: var(--codar-primary-light);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-fast);
}
.error-shell .helpful-links .links a:hover {
  color: var(--codar-primary);
  text-decoration: underline;
}

/* ==========================================================================
   COMING SOON PAGE
   ========================================================================== */
.coming-soon-shell {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}
.coming-soon-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(245, 180, 0, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(30, 94, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
}
.coming-soon-shell .cs-content {
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 640px;
}
.coming-soon-shell .cs-icon-wrap {
  width: 100px; height: 100px;
  background: var(--gradient-primary);
  border-radius: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #fff;
  box-shadow: var(--shadow-blue);
  margin-bottom: 22px;
  transform: rotate(-6deg);
  position: relative;
}
.coming-soon-shell .cs-icon-wrap::after {
  content: '';
  position: absolute;
  width: 26px; height: 26px;
  background: var(--codar-accent);
  border-radius: 8px;
  top: -8px; right: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(12deg);
}
.coming-soon-shell .cs-eyebrow {
  display: inline-block;
  background: rgba(245, 180, 0, 0.15);
  color: var(--codar-accent-dark);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.coming-soon-shell h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 14px;
}
.coming-soon-shell .lead-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin: 0 auto 30px;
  line-height: 1.6;
}

/* Countdown timer (decorative) */
.cs-countdown {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 26px 0;
}
.cs-countdown .cd-unit {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  min-width: 80px;
  text-align: center;
}
.cs-countdown .cd-num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--codar-primary-light);
  line-height: 1;
  display: block;
  margin-bottom: 4px;
}
.cs-countdown .cd-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}
@media (max-width: 575.98px) {
  .cs-countdown .cd-unit { padding: 12px 14px; min-width: 64px; }
  .cs-countdown .cd-num { font-size: 1.4rem; }
}

/* Notify-me form on coming-soon */
.notify-form {
  display: flex;
  gap: 8px;
  background: var(--bg-card);
  padding: 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  max-width: 480px;
  margin: 22px auto;
}
.notify-form input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 0.95rem;
}
.notify-form input:focus { outline: none; }
.notify-form button {
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}
.notify-form button:hover { transform: translateY(-1px); box-shadow: var(--shadow-blue); }
@media (max-width: 575.98px) {
  .notify-form { flex-direction: column; padding: 14px; border-radius: var(--radius-md); }
  .notify-form button { width: 100%; }
}

/* ==========================================================================
   GENERIC SUCCESS PAGES (reset-link-sent, brochure-success, contact-success)
   Reuses .success-state from courses.css/team.css but adds a few touches.
   ========================================================================== */
.success-action-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 760px;
  margin: 30px auto 0;
}
@media (max-width: 767.98px) {
  .success-action-cards { grid-template-columns: 1fr; }
}
.success-action-cards .sa-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-base);
}
.success-action-cards .sa-card:hover {
  transform: translateY(-4px);
  border-color: var(--codar-primary-light);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.success-action-cards .sa-card .sa-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  color: var(--codar-primary-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 12px;
  transition: all var(--transition-base);
}
.success-action-cards .sa-card:hover .sa-icon {
  background: var(--gradient-primary);
  color: #fff;
}
.success-action-cards .sa-card h6 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.success-action-cards .sa-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   SITEMAP PAGE — clean, polished, professional
   ========================================================================== */
.sitemap-group {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  height: 100%;
  transition: all var(--transition-base);
}
.sitemap-group:hover {
  border-color: var(--codar-primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Header — icon + group title */
.sitemap-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}
.sitemap-group-header .sg-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.sitemap-group-header h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

/* Links list — kill default list bullets */
.sitemap-links {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.sitemap-links li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid var(--border-soft);
}
.sitemap-links li:last-child {
  border-bottom: none;
}
.sitemap-links li::marker { content: '' !important; }
.sitemap-links li::before { content: none !important; }

/* Each link row */
.sitemap-links li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  text-decoration: none !important;
  color: inherit;
  transition: padding var(--transition-fast), color var(--transition-fast);
}
.sitemap-links li a:hover {
  padding-left: 8px;
}
.sitemap-links li a:hover strong {
  color: var(--codar-primary-light);
}

/* Arrow icon */
.sitemap-links li a > i {
  color: var(--codar-primary-light);
  font-size: 0.85rem;
  flex-shrink: 0;
  opacity: 0.6;
  transition: all var(--transition-fast);
}
.sitemap-links li a:hover > i {
  opacity: 1;
  transform: translateX(3px);
}

/* Text wrapper — separates strong + small properly */
.sitemap-links li a > span {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.sitemap-links li a strong {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  transition: color var(--transition-fast);
}
.sitemap-links li a small {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
}