@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,600&family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
  --blue: #182f68;
  --blue2: #0d2250;
  --text: #243252;
  --muted: #667085;
  --line: #e2e6ef;
  --soft: #f7f8fa;
  --white: #ffffff;
  --gold: #f59e0b;
  --gold-bg: #fffbeb;
  --green: #10b981;
  --green-bg: #ecfdf5;
  --red: #ef4444;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 2px 8px rgba(18, 34, 74, 0.05);
  --shadow-md: 0 8px 24px rgba(18, 34, 74, 0.08);
  --shadow-lg: 0 16px 36px rgba(18, 34, 74, 0.12);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-sans);
  background: var(--white);
  line-height: 1.6;
  font-size: 14px;
  overflow-x: clip;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease, opacity 0.2s ease;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--blue);
  margin: 0;
  font-weight: 600;
}

/* ========================================================
   TOPBAR & HEADER NAVIGATION
   ======================================================== */
.topbar {
  background: var(--blue2);
  color: #fff;
  padding: 8px 5%;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.topbar a {
  color: #d8e2f8;
  margin-left: 10px;
}
.topbar a:hover {
  color: #fff;
  text-decoration: underline;
}

.header {
  height: 84px;
  display: flex;
  align-items: center;
  padding: 0 5%;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.brand img {
  height: 56px;
  width: auto;
  object-fit: contain;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.nav > a, .dropdown > button {
  background: none;
  border: 0;
  color: var(--blue);
  font: inherit;
  cursor: pointer;
  padding: 8px 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav > a:hover, .dropdown > button:hover {
  color: #2b54bc;
}
.nav .active {
  border-bottom: 2px solid var(--blue);
}

.dropdown {
  position: relative;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-md);
  min-width: 230px;
  padding: 6px;
  display: none;
  z-index: 110;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.active .dropdown-menu,
.dropdown.open .dropdown-menu {
  display: block;
}
.dropdown-menu a.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
}
.dropdown-menu a.dropdown-item i.dropdown-icon {
  width: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  transition: color 0.15s ease;
}
.dropdown-menu a.dropdown-item:hover {
  background: var(--soft);
  color: var(--blue);
}
.dropdown-menu a.dropdown-item:hover i.dropdown-icon {
  color: var(--blue);
}
.dropdown-menu.dropdown-right {
  left: auto;
  right: 0;
  min-width: 250px;
}
.dropdown-section-title {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 12px 4px;
}
.profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 24px;
  color: var(--blue);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.profile-btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}
.avatar-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  flex-shrink: 0;
}
.dropdown-header {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.dropdown-header .user-name {
  font-weight: 800;
  font-size: 13px;
  color: var(--blue);
}
.dropdown-header .user-email {
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
  margin-top: 1px;
}
.dropdown-header .user-badges {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.dropdown-header .user-badge {
  background: #f1f5f9;
  color: #475569;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  text-transform: uppercase;
}
.segmented-mode-bar {
  display: grid;
  grid-template-columns: repeat(var(--mode-count, 2), 1fr);
  gap: 2px;
  background: #f1f5f9;
  padding: 2px;
  border-radius: 6px;
  margin: 4px 2px 8px;
  border: 1px solid #e2e8f0;
}
.segmented-mode-btn {
  text-align: center;
  padding: 4px 6px;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.segmented-mode-btn:hover {
  color: #0f172a;
}
.segmented-mode-btn.active {
  background: #ffffff;
  color: var(--blue);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.dropdown-divider {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}

.coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-bg);
  border: 1px solid #fde68a;
  color: #b45309;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.coin-pill span {
  font-size: 14px;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  font-size: 26px;
  color: var(--blue);
  cursor: pointer;
}

/* ========================================================
   BUTTONS & BADGES
   ======================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn.primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn.primary:hover {
  background: var(--blue2);
  border-color: var(--blue2);
  transform: translateY(-1px);
}
.btn.outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
.btn.outline:hover {
  background: var(--soft);
}
.btn.gold {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
.btn.gold:hover {
  background: #d97706;
}
.btn.small {
  padding: 7px 14px;
  font-size: 11px;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge.free {
  background: var(--green-bg);
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.badge.premium {
  background: var(--gold-bg);
  color: #92400e;
  border: 1px solid #fde68a;
}
.badge.curriculum {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* ========================================================
   ALERT MESSAGES
   ======================================================== */
.messages-container {
  padding: 14px 5% 0;
  max-width: 1200px;
  margin: 0 auto;
}
.alert {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.alert.success { background: var(--green-bg); color: #065f46; border: 1px solid #a7f3d0; }
.alert.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert.warning { background: var(--gold-bg); color: #92400e; border: 1px solid #fde68a; }
.alert.info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ========================================================
   HERO & BANNERS
   ======================================================== */
.hero {
  min-height: 520px;
  display: flex;
  align-items: center;
  padding: 60px 6%;
  position: relative;
  overflow: hidden;
  background-color: #081938;
  background-image: 
    linear-gradient(to right, rgba(8, 25, 56, 0.98) 0%, rgba(8, 25, 56, 0.88) 45%, rgba(8, 25, 56, 0.35) 75%, rgba(8, 25, 56, 0.08) 100%),
    url('../assets/hero-bg.jpg');
  background-repeat: no-repeat;
  background-position: right center;
  background-size: cover;
}
.hero-copy {
  width: 58%;
  max-width: 640px;
  z-index: 2;
  position: relative;
}
.hero-copy .eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #93c5fd;
  background: rgba(30, 58, 138, 0.45);
  border: 1px solid rgba(147, 197, 253, 0.35);
  padding: 5px 15px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.hero-copy h1 {
  font-size: 64px;
  line-height: 0.98;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  color: #ffffff;
  font-weight: 900;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.hero-copy p {
  font-size: 16px;
  line-height: 1.6;
  color: #e2e8f0;
  margin-bottom: 28px;
  max-width: 540px;
}
.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero .btn.primary {
  background: var(--gold, #d97706);
  color: #ffffff;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
}
.hero .btn.primary:hover {
  background: #b45309;
}
.hero .btn.outline {
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
  font-weight: 700;
}
.hero .btn.outline:hover {
  background: #ffffff;
  color: #0b1f4d;
}
.hero .trust-row {
  display: flex;
  gap: 24px;
  margin-top: 36px;
  color: #ffffff;
}
.hero .trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero .trust-item .icon {
  font-size: 20px;
  color: #60a5fa;
}
.hero .trust-item b {
  font-size: 13px;
  color: #ffffff;
  display: block;
}
.hero .trust-item small {
  font-size: 11px;
  color: #cbd5e1;
}
.hero-art {
  display: none;
}
.hero-art img {
  width: 100%;
  max-width: 540px;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.2);
  border: 1px solid rgba(203, 213, 225, 0.6);
}

.trust-row {
  display: flex;
  gap: 24px;
  margin-top: 32px;
  color: var(--blue);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.trust-item .icon {
  font-size: 20px;
}
.trust-item b {
  font-size: 12px;
  display: block;
}
.trust-item small {
  font-size: 11px;
  color: var(--muted);
}

/* ========================================================
   SECTIONS & GRIDS
   ======================================================== */
.section {
  padding: 60px 5%;
  max-width: 1240px;
  margin: 0 auto;
}
.section-heading {
  text-align: center;
  margin-bottom: 35px;
}
.section-heading h2 {
  font-size: 36px;
  letter-spacing: -0.01em;
}
.section-heading p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
}
.section-heading .bar {
  width: 50px;
  height: 3px;
  background: var(--blue);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* Subjects Grid */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.subject-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px 18px;
  background: var(--white);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.subject-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #ccd5e5;
}
.subject-card .symbol {
  font-size: 32px;
  font-family: Georgia, serif;
  color: var(--blue);
  margin-bottom: 10px;
  display: block;
}
.subject-card h3 {
  font-size: 18px;
  margin-bottom: 6px;
}
.subject-card small {
  color: var(--muted);
  font-size: 12px;
}

/* Resource Card Grid */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.resource-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}
.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.resource-card-cover {
  background: #0f172a;
  padding: 0;
  text-align: center;
  position: relative;
  height: 180px;
  width: 100%;
  overflow: hidden;
  display: block;
}
.resource-card-cover img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: none;
  background: transparent;
  transition: transform 0.3s ease;
}
.resource-card:hover .resource-card-cover img {
  transform: scale(1.04);
}
.resource-card-cover .top-badge {
  position: absolute;
  top: 10px;
  left: 10px;
}
.resource-card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.resource-card-body .meta {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.resource-card-body h3 {
  font-size: 16px;
  line-height: 1.25;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}
.resource-card-body p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32px;
}
.resource-card-footer {
  padding-top: 10px;
  margin-top: auto;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.resource-card-footer .cost {
  font-size: 14px;
  font-weight: 800;
  color: var(--blue);
}

/* ========================================================
   COMMUNITY & STATS
   ======================================================== */
.stats-banner {
  background: var(--blue);
  color: #fff;
  padding: 36px 5%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  text-align: center;
}
.stat-box {
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}
.stat-box:last-child {
  border-right: 0;
}
.stat-box b {
  font-size: 32px;
  display: block;
  font-family: var(--font-serif);
}
.stat-box span {
  font-size: 12px;
  color: #dbe4f6;
}

.whatsapp-banner {
  background: var(--blue2);
  color: #fff;
  padding: 40px 5%;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin: 40px 0;
}
.whatsapp-banner h2 {
  color: #fff;
  font-size: 34px;
  margin-bottom: 8px;
}
.whatsapp-banner p {
  color: #d8e2f8;
  font-size: 14px;
  margin: 0;
}

/* ========================================================
   FORMS & INPUTS
   ======================================================== */
.form-card {
  max-width: 520px;
  margin: 40px auto;
  padding: 36px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.form-input,
.input-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  box-sizing: border-box;
}
.form-input:hover,
.input-control:hover {
  border-color: #94a3b8;
}
.form-input:focus,
.input-control:focus {
  border-color: var(--blue);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(24, 47, 104, 0.12);
}
select.form-input,
select.input-control,
.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--white);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 15px 15px;
  padding-right: 40px;
  cursor: pointer;
  line-height: 1.4;
}
select.form-input:focus,
select.input-control:focus,
.form-select:focus {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23182f68' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}
textarea.form-input,
textarea.input-control {
  min-height: 80px;
  resize: vertical;
  line-height: 1.5;
}
.form-error {
  color: var(--red);
  font-size: 11px;
  margin-top: 4px;
}

/* Modern Styled POP Dropzone */
.pop-dropzone {
  position: relative;
  border: 2px dashed #93c5fd;
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 18px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 95px;
}
.pop-dropzone:hover {
  background: #eff6ff;
  border-color: #2563eb;
}
.pop-dropzone.has-file {
  border-color: #16a34a;
  background: #f0fdf4;
}
.pop-dropzone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

/* ========================================================
   DASHBOARD & WALLET
   ======================================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  padding: 40px 5%;
  max-width: 1240px;
  margin: 0 auto;
}
.dash-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.profile-card, .wallet-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.wallet-card {
  background: linear-gradient(135deg, #182f68 0%, #0d2250 100%);
  color: #fff;
}
.wallet-card h3 {
  color: #dbe4f6;
  font-size: 14px;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.wallet-card .coin-val {
  font-size: 44px;
  font-weight: 800;
  color: #fbbf24;
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wallet-card p {
  font-size: 12px;
  color: #cad8f3;
  margin-bottom: 18px;
}

.dash-main {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.dash-section {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.dash-section h2 {
  font-size: 26px;
  margin-bottom: 18px;
}

/* Coin Packages Grid */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.pkg-card {
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  background: var(--white);
  position: relative;
  display: flex;
  flex-direction: column;
}
.pkg-card.highlight {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
}
.pkg-card .badge {
  align-self: flex-start;
  margin-bottom: 12px;
}
.pkg-card h3 {
  font-size: 24px;
  margin-bottom: 8px;
}
.pkg-card .price {
  font-size: 32px;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 12px;
}
.pkg-card p {
  font-size: 13px;
  color: var(--muted);
  flex: 1;
  margin-bottom: 20px;
}

/* ========================================================
   PROTECTED CONTENT VIEWERS (PDF & VIDEO)
   ======================================================== */
.viewer-container {
  max-width: 1000px;
  margin: 30px auto;
  padding: 0 4%;
}
.viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.pdf-canvas-container {
  background: #333a48;
  padding: 24px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}
.pdf-page-canvas {
  max-width: 100%;
  height: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  background: #fff;
  position: relative;
}
.security-notice {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

/* Video Player */
.video-stream-box {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.video-stream-box iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ========================================================
   QUIZ INTERFACE
   ======================================================== */
.quiz-box {
  max-width: 800px;
  margin: 30px auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 24px;
}
.quiz-timer {
  font-size: 16px;
  font-weight: 800;
  color: var(--blue);
  background: var(--soft);
  padding: 6px 14px;
  border-radius: 20px;
}
.question-card {
  margin-bottom: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.question-card:last-child {
  border-bottom: 0;
}
.question-prompt {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}
.choice-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
}
.choice-label:hover {
  background: var(--soft);
  border-color: #ccd5e5;
}
.choice-label input[type="radio"]:checked + span {
  font-weight: 700;
  color: var(--blue);
}

/* ========================================================
   FOOTER
   ======================================================== */
footer {
  background: var(--blue2);
  color: #fff;
  padding: 50px 5% 20px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  max-width: 1240px;
  margin: 0 auto;
}
.footer-logo {
  height: 48px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 14px;
}
.footer-grid h4 {
  color: #fff;
  font-size: 14px;
  font-family: var(--font-sans);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.footer-grid p, .footer-grid a {
  display: block;
  font-size: 13px;
  color: #ccd8ee;
  line-height: 1.8;
}
.footer-grid a:hover {
  color: #fff;
  text-decoration: underline;
}
.footer-bottom {
  max-width: 1240px;
  margin: 40px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #9cb1dc;
}

/* ========================================================
   RESPONSIVE UTILITIES & BASE GRID DEFAULTS
   ======================================================== */
.catalog-filter-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr 1fr 1fr 1fr auto;
  gap: 14px;
  align-items: flex-end;
}
.catalog-filter-grid .btn {
  width: auto;
  white-space: nowrap;
}

.step-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 24px;
  align-items: center;
}

/* Universal Table Responsiveness */
.table-responsive,
.table-wrapper,
div:has(> table) {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  border-collapse: collapse;
}

/* ========================================================
   UNIFIED RESPONSIVE BREAKPOINTS (DESK, TABS, MOBILE)
   ======================================================== */
@media (max-width: 1024px) {
  .hero-copy { width: 70%; }
  .hero-copy h1 { font-size: clamp(38px, 5.5vw, 54px); }
  .subject-grid, .resource-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-banner { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .stats-banner .stat-box {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    padding-bottom: 12px;
  }
  .dashboard-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .catalog-filter-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
  .catalog-filter-grid > div:last-child {
    display: flex;
    align-items: flex-end;
  }
  .catalog-filter-grid .btn {
    width: 100%;
  }
}

@media (max-width: 992px) {
  /* Tablet Navigation Drawer */
  .topbar {
    padding: 6px 4%;
    font-size: 11px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 8px;
  }
  .header {
    height: 72px;
    padding: 0 4%;
  }
  .menu-toggle {
    display: block;
  }
  .nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 20px 5%;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 105;
    gap: 10px;
  }
  .nav.open {
    display: flex;
  }
  .nav.open > a {
    padding: 10px 4px;
    border-bottom: 1px solid var(--soft);
  }
  .nav.open > a.btn {
    width: 100%;
    border-bottom: 0;
    margin-top: 4px;
  }
  .nav.open .coin-pill {
    align-self: flex-start;
  }
  .nav.open .dropdown > .profile-btn {
    width: 100%;
    justify-content: flex-start;
  }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: 1px solid var(--line);
    margin-top: 6px;
    border-radius: var(--radius-sm);
    padding: 8px;
    width: 100%;
    max-width: 100%;
  }
  .dropdown-menu.dropdown-right {
    min-width: 100%;
  }

  /* Sticky viewer toolbars adjust to 72px header */
  .viewer-toolbar,
  .video-toolbar {
    top: 72px !important;
    padding: 10px 4%;
  }

  /* Major Two-Column Split Layouts stack gracefully on tablet portrait */
  [style*="grid-template-columns: 1.1fr 1fr"],
  [style*="grid-template-columns: 1.2fr 1fr"],
  [style*="grid-template-columns: 1.2fr 0.8fr"],
  [style*="grid-template-columns: 1.25fr 1fr"],
  [style*="grid-template-columns: 1.5fr 1fr"],
  [style*="grid-template-columns: 1.6fr 1fr"],
  [style*="grid-template-columns: 2fr 1fr"],
  [style*="grid-template-columns: 1fr 1.2fr"],
  [style*="grid-template-columns: 1fr 1.4fr"] {
    grid-template-columns: 1fr !important;
  }
  .course-sidebar-card {
    position: static !important;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    flex-direction: column;
    text-align: center;
    padding: 38px 5% 42px;
    background-image:
      linear-gradient(180deg, rgba(8, 25, 56, 0.88) 0%, rgba(8, 25, 56, 0.94) 60%, rgba(8, 25, 56, 0.98) 100%),
      url('../assets/hero-bg.jpg');
    background-position: center top;
  }
  .hero-copy { width: 100%; max-width: 100%; }
  .hero-copy .eyebrow {
    font-size: 11px;
    letter-spacing: 0.12em;
    padding: 5px 12px;
    margin-bottom: 14px;
  }
  .hero-copy h1 {
    font-size: clamp(32px, 8.5vw, 44px);
    line-height: 1.04;
    margin-bottom: 14px;
  }
  .hero-copy p {
    font-size: 14.5px;
    line-height: 1.55;
    margin: 0 auto 22px;
  }
  .hero-buttons { justify-content: center; flex-wrap: wrap; gap: 10px; }
  .hero .trust-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 26px;
    text-align: left;
  }
  .hero .trust-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 10px 12px;
    gap: 10px;
  }
  .hero .trust-item .icon {
    font-size: 18px;
    flex-shrink: 0;
  }
  .hero-art { display: none; }
  .subject-grid, .resource-grid, .packages-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .stats-banner {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 26px 4%;
  }
  .stats-banner .stat-box {
    border-right: 0;
    border-bottom: 0;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 14px 10px;
  }
  .stats-banner .stat-box:last-child {
    grid-column: 1 / -1;
  }
  .whatsapp-banner { flex-direction: column; text-align: center; padding: 28px 20px; gap: 18px; margin: 20px 0; }
  .whatsapp-banner h2 { font-size: clamp(22px, 6vw, 28px); }
  .section-heading h2 { font-size: clamp(24px, 6vw, 32px); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }

  /* Step Card stacks on mobile */
  .step-card {
    grid-template-columns: 1fr !important;
    text-align: center;
    justify-items: center;
    gap: 16px !important;
  }

  /* Catalog Filter Bar stacks to 1 column */
  .catalog-filter-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .catalog-filter-grid .btn {
    width: 100%;
    padding: 14px;
  }

  /* Form Row Multi-Column Splits stack on mobile */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr 1fr"],
  [style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* Form & Section Padding */
  .section {
    padding: 24px 4%;
  }
  .form-card {
    padding: 24px 18px;
    margin: 20px auto;
  }
  .dash-section {
    padding: 20px 16px;
  }
  .quiz-box {
    padding: 20px 16px;
    margin: 16px 4%;
  }
  .quiz-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  /* Viewer Toolbars & Stage */
  .viewer-toolbar,
  .video-toolbar {
    position: static !important;
    padding: 12px 4%;
    gap: 10px;
  }
  .viewer-stage {
    padding: 16px 8px;
  }
  .video-stage {
    padding: 18px 12px;
  }
  .video-meta-card {
    padding: 16px;
  }
  .video-watermark-overlay {
    font-size: 9px;
    max-width: calc(100% - 20px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    bottom: 8px;
    right: 8px;
  }

  /* Wallet Overview Alignment */
  .wallet-overview-meta {
    align-items: flex-start !important;
    text-align: left !important;
    width: 100%;
  }
  .wallet-overview-meta > div {
    text-align: left !important;
    justify-content: flex-start !important;
  }
  .price-divider {
    display: none;
  }

  /* Touch Targets for Buttons */
  .btn {
    min-height: 42px;
  }
  .btn.small {
    min-height: 34px;
  }
}

@media (max-width: 640px) {
  .topbar {
    display: none;
  }
  .brand img {
    height: 44px;
  }
  .btn {
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    max-width: 100%;
  }
  .dash-section[style*="padding"] {
    padding: 18px 14px !important;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 30px 4% 34px;
  }
  .hero-copy .eyebrow {
    font-size: 10px;
    letter-spacing: 0.08em;
    padding: 4px 10px;
  }
  .hero-copy h1 {
    font-size: clamp(30px, 9.5vw, 38px);
  }
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  .hero-buttons .btn {
    width: 100%;
  }
  .hero .trust-row {
    gap: 8px;
    margin-top: 22px;
  }
  .hero .trust-item {
    padding: 8px 10px;
  }
  .subject-grid, .resource-grid, .packages-grid { grid-template-columns: 1fr; }
  .stats-banner { grid-template-columns: 1fr; }
  .stats-banner .stat-box:last-child { grid-column: auto; }
  .dashboard-grid {
    padding: 20px 4%;
    gap: 18px;
  }
  .form-card {
    padding: 18px 14px;
    margin: 12px 4%;
  }
  .form-input {
    font-size: 14px; /* Prevents auto-zoom on iOS Safari */
  }
  .btn {
    min-height: 44px; /* Apple Human Interface Guideline 44x44px */
  }
}

/* ========================================================
   VIDEO PLAYER & STREAMING WRAPPER
   ======================================================== */
.video-stream-box,
.video-player-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.video-stream-box iframe,
.video-stream-box video,
.video-player-container iframe,
.video-player-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  outline: none;
  display: block;
}

