/* ==========================================================================
   RkPaymentPortal - AutoPay Institutional Fees Collection Platform
   Official Data Safety, Privacy Policy & Security Portal
   Design System & Stylesheet
   Automate IT Limited
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  /* Brand Palette */
  --brand-primary: #0f172a;
  --brand-primary-light: #1e293b;
  --brand-navy-deep: #0a1128;
  --brand-accent: #0284c7;
  --brand-accent-hover: #0369a1;
  --brand-emerald: #10b981;
  --brand-emerald-dark: #059669;
  --brand-cyan: #06b6d4;
  --brand-indigo: #4f46e5;
  --brand-amber: #d97706;
  --brand-rose: #e11d48;

  /* Neutrals & Surfaces */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-alt: #f1f5f9;
  --border-color: #e2e8f0;
  --border-color-focus: #38bdf8;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #ffffff;

  /* Accents & Highlights */
  --badge-bg: #e0f2fe;
  --badge-text: #0369a1;
  --badge-green-bg: #d1fae5;
  --badge-green-text: #065f46;

  /* Typography */
  --font-en: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-bn: 'Hind Siliguri', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: var(--font-en);
  font-size: 15px;
  line-height: 1.68;
  color: var(--text-secondary);
  background-color: var(--bg-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body[data-lang="bn"] {
  font-family: var(--font-bn);
  font-size: 16px;
  line-height: 1.75;
}

/* Hide language-specific nodes */
body[data-lang="en"] [data-content="bn"] {
  display: none !important;
}

body[data-lang="bn"] [data-content="en"] {
  display: none !important;
}

a {
  color: var(--brand-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-accent-hover);
}

/* --- Site Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

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

.brand-logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 50%, #0f172a 100%);
  color: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand-accent);
  background: var(--bg-card-alt);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-danger-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-rose);
  border: 1.5px solid #fecdd3;
  background: #fff1f2;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.btn-danger-outline:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #be123c;
  transform: translateY(-1px);
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 3px;
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.lang-btn.active {
  background: #ffffff;
  color: var(--brand-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, #0a1128 0%, #101f42 50%, #1e293b 100%);
  color: #ffffff;
  padding: 3.5rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.18) 0%, rgba(16, 185, 129, 0.08) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.badge-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.8rem;
  border-radius: 100px;
}

.badge-primary {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-verified {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.hero-title {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 1rem;
}

.hero-title span.accent-text {
  background: linear-gradient(135deg, #38bdf8 0%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #cbd5e1;
  max-width: 840px;
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  color: #94a3b8;
}

.hero-meta strong {
  color: #ffffff;
}

/* Feature Highlights Grid in Hero */
.hero-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.hero-feature-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 1.15rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  transition: all var(--transition-normal);
}

.hero-feature-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.3);
}

.hero-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.icon-blue { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.icon-green { background: rgba(52, 211, 153, 0.2); color: #34d399; }
.icon-amber { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.icon-purple { background: rgba(167, 139, 250, 0.2); color: #a78bfa; }

.hero-feature-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.hero-feature-text p {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.45;
}

/* --- Layout: Main Wrapper --- */
.main-wrapper {
  max-width: 1240px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* Standalone Single Column (for delete-account.html & terms.html) */
.standalone-wrapper {
  max-width: 960px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

/* --- Sidebar Table of Contents --- */
.toc-sidebar {
  position: sticky;
  top: 5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 6.5rem);
  overflow-y: auto;
}

.toc-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toc-link {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  transition: all var(--transition-fast);
  line-height: 1.35;
}

.toc-link:hover {
  background: var(--bg-card-alt);
  color: var(--brand-accent);
}

.toc-link.active {
  background: var(--badge-bg);
  color: var(--badge-text);
  font-weight: 600;
}

/* --- Content Card --- */
.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.policy-section {
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-color);
}

.policy-section:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.section-number {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand-accent);
  flex-shrink: 0;
}

.section-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.content-card p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.content-card strong {
  color: var(--text-primary);
}

.content-card h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1.75rem 0 0.85rem;
}

.content-card h5 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.25rem 0 0.5rem;
}

.content-card ul,
.content-card ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
  color: var(--text-secondary);
}

.content-card li {
  margin-bottom: 0.45rem;
}

/* Callouts */
.callout {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 10px;
  margin: 1.5rem 0;
  line-height: 1.6;
}

.callout-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.callout-content strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.callout-info {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
}

.callout-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.callout-danger {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
}

.callout-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.callout-shield {
  background: #f8fafc;
  border: 1.5px solid #0284c7;
  color: #0f172a;
}

/* Payment Channel Showcase */
.channel-showcase {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.channel-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  align-items: center;
  justify-content: space-between;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-btn {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
}

.filter-btn.active {
  background: var(--brand-accent);
  color: #ffffff;
  border-color: var(--brand-accent);
}

.channel-search-box {
  position: relative;
  min-width: 220px;
}

.channel-search-box input {
  width: 100%;
  padding: 0.4rem 0.85rem 0.4rem 2.2rem;
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.channel-search-box input:focus {
  border-color: var(--border-color-focus);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.channel-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.85rem;
}

.channel-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.channel-card:hover {
  border-color: var(--brand-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.channel-badge {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: #ffffff;
  flex-shrink: 0;
}

.mfs-bkash { background: #d82a65; }
.mfs-nagad { background: #f7941d; }
.mfs-rocket { background: #8c3494; }
.mfs-upay { background: #005696; }
.mfs-cellfin { background: #008752; }
.mfs-surecash { background: #008080; }
.card-visa { background: #1a1f71; }
.card-mastercard { background: #eb001b; }
.card-amex { background: #006fcf; }
.card-nexus { background: #00843d; }
.bank-city { background: #e31837; }
.bank-brac { background: #004b87; }
.bank-ibbl { background: #00703c; }
.bank-ebl { background: #002d62; }
.bank-generic { background: #475569; }

.channel-info h6 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.channel-info span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Security Specs Box */
.security-specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.security-spec-card {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.25rem;
}

.security-spec-card h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-accent);
  margin: 0 0 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.security-spec-card p {
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.5;
}

/* Step Cards for Process / Deletion */
.step-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.25rem 0;
}

.step-card {
  display: flex;
  gap: 1.25rem;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.step-content h5 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--text-primary);
}

.step-content p {
  margin: 0;
  font-size: 0.9rem;
}

/* Tables */
.data-table-container {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.data-table th {
  background: var(--bg-card-alt);
  padding: 0.85rem 1rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: top;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(241, 245, 249, 0.5);
}

/* Contact Cards Grid */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.contact-card {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.15rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.contact-details span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-details strong,
.contact-details a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.contact-details a:hover {
  color: var(--brand-accent);
}

/* --- Deletion Form (delete-account.html) --- */
.deletion-form-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-top: 1.5rem;
}

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

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

.form-group label span.required {
  color: var(--brand-rose);
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-primary);
  font-family: inherit;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--border-color-focus);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

.form-help {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(2, 132, 199, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--bg-card-alt);
  color: var(--text-primary);
  border-color: #cbd5e1;
}

.form-feedback {
  margin-top: 1rem;
  padding: 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  display: none;
}

.form-feedback.success {
  display: block;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.form-feedback.error {
  display: block;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
}

/* --- Site Footer --- */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3.5rem 1.5rem 2rem;
  margin-top: 4rem;
  border-top: 1px solid #1e293b;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #1e293b;
}

.footer-brand h4 {
  color: #ffffff;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 440px;
}

.footer-col h5 {
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  color: #94a3b8;
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: #38bdf8;
}

.footer-bottom {
  max-width: 1240px;
  margin: 1.5rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: #64748b;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 960px) {
  .main-wrapper {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .toc-sidebar {
    position: relative;
    top: 0;
    max-height: none;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open {
    display: flex;
  }

  .mobile-nav-toggle {
    display: block;
  }

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

  .hero-title {
    font-size: 1.85rem;
  }

  .content-card {
    padding: 1.5rem;
  }

  .channel-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}
