@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Nunito:wght@600;700;800;900&display=swap');

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

:root {
  /* Educational Color Palette - Light Mode */
  --bg: #FCF9F8;
  --bg2: #ffffff;
  --bg3: #F1EBE9;
  --border: #E8E1DE;
  --border2: #D1C9C5;
  --text: #1C1B1B;
  --text-inverse: #ffffff;
  --muted: #47464E;
  --muted2: #6A6872;
  
  --primary: #A23F00;
  --primary-hover: #7D3100;
  --primary-light: #FBE6DC; 
  --primary-text: #A23F00;
  --primary-glow: rgba(162, 63, 0, 0.2);
  
  --secondary: #FC7127;
  --secondary-light: #FFEFE7;
  --secondary-text: #C2410C;
  
  --green: #10b981;
  --green-light: #d1fae5;
  --green-text: #047857;
  
  --red: #ef4444;
  --red-light: #fee2e2;
  --red-text: #b91c1c;
  
  --blue: #3b82f6;
  --blue-light: #dbeafe;
  --blue-text: #1d4ed8;

  --purple: #8b5cf6;
  --purple-light: #f3e8ff;
  --purple-text: #6d28d9;
  
  --radius: 16px;
  --radius-sm: 8px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ── Dark Mode Support ── */
body.dark, html.dark body {
  --bg: #0F172A;
  --bg2: #1E293B;
  --bg3: #334155;
  --border: #334155;
  --border2: #475569;
  --text: #FFFFFF;
  --text-inverse: #ffffff;
  --muted: #C8C5CF;
  --muted2: #A5A2AD;
  
  --primary: #FC7127;
  --primary-hover: #FF8A4C;
  --primary-light: rgba(252, 113, 39, 0.2);
  --primary-text: #FC7127;
  --primary-glow: rgba(252, 113, 39, 0.4);
  
  --secondary: #A23F00;
  --secondary-light: rgba(162, 63, 0, 0.2);
  --secondary-text: #F97316;
  
  --green: #34d399;
  --green-light: rgba(16, 185, 129, 0.2);
  --green-text: #6ee7b7;
  
  --red: #f87171;
  --red-light: rgba(239, 68, 68, 0.2);
  --red-text: #fca5a5;
  
  --blue: #60a5fa;
  --blue-light: rgba(59, 130, 246, 0.2);
  --blue-text: #93c5fd;

  --purple: #a78bfa;
  --purple-light: rgba(139, 92, 246, 0.2);
  --purple-text: #c4b5fd;
}

body.dark nav, html.dark body nav { 
  background: rgba(15, 23, 42, 0.65); 
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted2); }

h1, h2, h3, h4, h5, h6, .section-tag, .nav-logo {
  font-family: 'Nunito', sans-serif;
}

/* ── Navbar ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  height: 72px;
  background: rgba(252, 249, 248, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  transition: background 0.3s, border-color 0.3s;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo img { height: 38px; }

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary-text);
  background: var(--primary-light);
}

.nav-cta {
  background: linear-gradient(135deg, var(--primary), var(--purple)) !important;
  color: var(--text-inverse) !important;
  box-shadow: 0 4px 12px var(--primary-glow) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  font-weight: 800 !important;
}

.nav-cta:hover { 
  box-shadow: 0 6px 16px var(--primary-glow) !important;
  transform: translateY(-1px);
}

.nav-login {
  border: 2px solid var(--primary) !important;
  color: var(--primary) !important;
  background: transparent !important;
  font-weight: 800 !important;
  box-shadow: 0 0 10px var(--primary-glow) !important;
}
.nav-login:hover {
  background: var(--primary-light) !important;
  color: var(--primary-text) !important;
  box-shadow: 0 0 15px var(--primary-glow) !important;
}

.theme-toggle {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  background: var(--bg2);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}

.theme-toggle:hover {
  background: var(--bg3);
}

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; border-radius: 2px; background: var(--text); transition: 0.3s; }

/* ── Hero ── */
.page { padding-top: 72px; }

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 5% 60px;
  overflow: hidden;
  background: radial-gradient(circle at top right, var(--primary-light), transparent 50%),
              radial-gradient(circle at bottom left, var(--secondary-light), transparent 50%);
}

/* ── 3D Floating Effects ── */
.floating-3d {
  position: absolute;
  font-size: clamp(2rem, 5vw, 4rem);
  filter: drop-shadow(0 15px 15px rgba(0,0,0,0.15));
  z-index: 0;
  pointer-events: none;
  animation: float3d ease-in-out infinite alternate;
  transition: translate 0.1s linear;
}

@keyframes float3d {
  0% { transform: perspective(600px) translateY(0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1); }
  100% { transform: perspective(600px) translateY(-30px) rotateX(15deg) rotateY(15deg) rotateZ(10deg) scale(1.05); }
}

.f3d-1 { top: 15%; left: 10%; animation-duration: 4s; animation-delay: 0s; }
.f3d-2 { top: 20%; right: 12%; animation-duration: 5s; animation-delay: 1s; font-size: clamp(3rem, 7vw, 5rem); }
.f3d-3 { bottom: 25%; left: 15%; animation-duration: 4.5s; animation-delay: 0.5s; }
.f3d-4 { bottom: 20%; right: 15%; animation-duration: 6s; animation-delay: 1.5s; }
.f3d-5 { top: 40%; left: 5%; animation-duration: 5.5s; animation-delay: 2s; font-size: clamp(1.5rem, 4vw, 3rem); opacity: 0.7; filter: blur(2px); }

.hero-logo-3d {
  height: 80px;
  width: auto;
  margin-bottom: 24px;
  filter: drop-shadow(0 10px 20px rgba(245, 158, 11, 0.3));
  animation: logo3d 4s ease-in-out infinite alternate, fadeDown 0.8s ease both;
  transform-style: preserve-3d;
  z-index: 2;
  transition: translate 0.1s linear;
}

@keyframes logo3d {
  0% { transform: perspective(800px) rotateY(-10deg) rotateX(5deg) translateY(0); }
  100% { transform: perspective(800px) rotateY(10deg) rotateX(-5deg) translateY(-10px); }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg2);
  color: var(--primary-text);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 18px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  animation: fadeDown 0.5s ease both;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--text);
  animation: fadeUp 0.6s 0.1s ease both;
}

.hero h1 .highlight {
  color: var(--primary-text);
}

.hero p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
  animation: fadeUp 0.6s 0.2s ease both;
}

.hero-btns {
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 60px;
  animation: fadeUp 0.6s 0.3s ease both;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 99px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem; font-weight: 700;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-inverse);
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px var(--primary-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg2);
  color: var(--text);
  border-color: var(--border2);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--bg3);
  transform: translateY(-2px);
}

/* ── Stats ── */
.stats {
  display: flex; gap: 24px;
  animation: fadeUp 0.6s 0.4s ease both;
  flex-wrap: wrap;
  justify-content: center;
}

.stat {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 20px 32px;
  text-align: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}

.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.stat-num {
  font-size: 2rem; font-weight: 800;
  color: var(--primary-text); display: block;
}
.stat-label { font-size: 0.9rem; color: var(--muted); font-weight: 500; }

/* ── Section General ── */
section { padding: 80px 5%; max-width: 1200px; margin: 0 auto; }

.section-tag {
  display: inline-block;
  color: var(--secondary-text); font-size: 0.9rem; font-weight: 800; text-transform: uppercase; margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: var(--text);
  margin-bottom: 16px;
}

.section-sub {
  color: var(--muted); font-size: 1.1rem; max-width: 600px;
  line-height: 1.7; margin-bottom: 40px;
}

/* ── Cards ── */
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px;
}

.card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; transition: all 0.2s; box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-4px); border-color: var(--primary-text);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--primary-light); color: var(--primary-text);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin-bottom: 20px;
}

.card:nth-child(2) .card-icon { background: var(--secondary-light); color: var(--secondary-text); }
.card:nth-child(3) .card-icon { background: var(--green-light); color: var(--green-text); }

.card h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 10px; color: var(--text); }
.card p { font-size: 0.95rem; color: var(--muted); line-height: 1.6; }

/* ── Classes Grid ── */
.classes-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px;
}

.class-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 24px 16px; text-align: center; text-decoration: none; color: var(--text);
  transition: all 0.2s; display: flex; flex-direction: column; align-items: center; gap: 8px;
  box-shadow: var(--shadow-sm);
}

.class-card:hover {
  border-color: var(--primary-text); transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  background: var(--primary-light);
}

.class-card .class-num { font-family: 'Nunito', sans-serif; font-size: 2.2rem; font-weight: 900; color: var(--primary-text); }
.class-card .class-label { font-size: 0.9rem; color: var(--muted); font-weight: 600; }

/* ── CTA Banner ── */
.cta-banner {
  background: var(--primary);
  border-radius: var(--radius);
  padding: 60px 40px; text-align: center;
  margin: 0 5% 80px;
  box-shadow: var(--shadow-lg);
  color: var(--text-inverse);
}

.cta-banner h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 800; margin-bottom: 16px; color: var(--text-inverse); }
.cta-banner p { color: rgba(255,255,255,0.9); margin-bottom: 32px; font-size: 1.1rem; }

.notify-form { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.notify-form input {
  padding: 14px 20px; border-radius: 99px; border: none;
  background: #ffffff; color: #1f2937; font-size: 1rem; width: 300px; font-family: inherit;
  box-shadow: var(--shadow-sm);
}
.notify-form input:focus { outline: 2px solid var(--secondary); }
.notify-form .btn-primary { background: var(--secondary); color: #111827; box-shadow: none; border-radius: 99px; }
.notify-form .btn-primary:hover { background: #d97706; color: #ffffff; }

/* ── Footer ── */
footer {
  background: var(--bg2); border-top: 1px solid var(--border); padding: 60px 5% 30px;
}

.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 50px; }
.footer-brand p { color: var(--muted); font-size: 0.95rem; margin-top: 16px; max-width: 300px; line-height: 1.6; }

.footer-col h4 { font-family: 'Nunito', sans-serif; font-size: 1.05rem; font-weight: 800; color: var(--text); margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { text-decoration: none; color: var(--muted); font-size: 0.95rem; font-weight: 500; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--primary-text); }

.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-bottom p { font-size: 0.9rem; color: var(--muted); }

/* ── Login / Register Forms ── */
.auth-container { max-width: 440px; margin: 60px auto; padding: 40px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-family: 'Nunito', sans-serif; font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 16px; background: var(--bg); border: 1px solid var(--border2); border-radius: var(--radius-sm); color: var(--text); font-family: inherit; font-size: 1rem; transition: border-color 0.2s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-glow); }

/* ── Auth/Ebooks pages styling ── */
.page-hero { text-align: center; padding: 60px 20px; background: var(--bg2); border-bottom: 1px solid var(--border); margin-bottom: 40px; }
.page-hero h1 { font-size: 2.5rem; color: var(--text); margin-bottom: 12px; }
.page-hero p { color: var(--muted); max-width: 500px; margin: 0 auto; }

.filter-tabs { display: flex; gap: 10px; justify-content: center; margin-bottom: 32px; flex-wrap: wrap; }
.tab { padding: 8px 20px; background: var(--bg2); border: 1px solid var(--border2); color: var(--muted); border-radius: 99px; cursor: pointer; font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 0.9rem; transition: all 0.2s; }
.tab:hover, .tab.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary-text); }

.ebook-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; padding: 0 5% 80px; }
.ebook-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all 0.2s; cursor: pointer; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.ebook-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary-text); }
.ebook-thumb { width: 100%; aspect-ratio: 3 / 4; height: auto; display: flex; align-items: center; justify-content: center; font-size: 3.5rem; background: var(--primary-light); border-bottom: 1px solid var(--border); }
.ebook-info { padding: 16px; flex: 1; }
.ebook-type { font-family: 'Nunito', sans-serif; font-size: 0.75rem; font-weight: 800; color: var(--primary-text); text-transform: uppercase; margin-bottom: 4px; }
.ebook-info h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 4px; font-weight: 700; }
.ebook-info p { font-size: 0.85rem; color: var(--muted); }
.ebook-footer { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: var(--bg3); }
.ebook-footer .dl-btn { background: var(--bg2); border: 1px solid var(--border2); color: var(--primary-text); font-weight: 600; padding: 6px 14px; border-radius: 99px; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; }
.ebook-footer .dl-btn:hover { background: var(--primary-light); border-color: var(--primary-text); }

/* ── About Grid ── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 40px 5%; }
.about-visual { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow-md); }
.about-stat { display: flex; align-items: center; gap: 16px; background: var(--bg3); padding: 16px 20px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid var(--border); transition: transform 0.2s; }
.about-stat:hover { transform: translateX(4px); border-color: var(--primary-text); }

/* ── Contact Page Redesign ── */
.contact-wrap { padding: 40px 5%; max-width: 1200px; margin: 0 auto; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.contact-info-panel {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 50px 40px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-info-panel::before {
  content: ''; position: absolute; top: -100px; right: -100px;
  width: 300px; height: 300px; background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.contact-info-panel::after {
  content: ''; position: absolute; bottom: -50px; left: -50px;
  width: 200px; height: 200px; background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}

.contact-info-panel h3 { font-size: 2.2rem; font-weight: 800; color: white; margin-bottom: 12px; position: relative; z-index: 1; }
.contact-info-panel p.sub { color: rgba(255,255,255,0.85); line-height: 1.6; margin-bottom: 50px; position: relative; z-index: 1; font-size: 1.05rem; }

.c-item {
  display: flex; align-items: flex-start; gap: 20px; margin-bottom: 35px; position: relative; z-index: 1;
  transition: transform 0.3s;
}
.c-item:hover { transform: translateX(10px); }

.c-item-icon {
  width: 54px; height: 54px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0; box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.c-item-content h4 { color: white; font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }
.c-item-content p { color: rgba(255,255,255,0.9); font-size: 0.95rem; line-height: 1.5; }

.contact-form-panel { padding: 50px 60px; background: var(--bg); }
.contact-form-panel h3 { font-size: 2rem; color: var(--text); font-weight: 800; margin-bottom: 30px; }

/* ── Responsive ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-15px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-links.open { 
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(252, 249, 248, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 20px 5%;
    display: flex;
    flex-direction: column; 
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }
  
  html.dark-init .nav-links.open, body.dark .nav-links.open {
    background: rgba(15, 23, 42, 0.85);
  }
  .nav-links.open li {
    width: 100%;
  }
  .nav-links.open a {
    display: block;
    text-align: center;
    padding: 12px;
  }
  .hamburger { display: flex; }
  .hero h1 { font-size: 2.2rem; }
  .footer-top { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .pdf-sidebar { position: absolute; height: 100%; box-shadow: var(--shadow-lg); }
  .auth-container { padding: 30px 24px; margin: 30px auto; }
}
@media (max-width: 768px) {
  .page-hero { padding: 40px 20px; }
  .page-hero h1 { font-size: 2.2rem; }
  .cta-banner { padding: 40px 20px; }
  .contact-form-panel { padding: 30px 20px; }
  .pdf-canvas-wrapper { padding: 20px 12px; }
}
@media (max-width: 600px) {
  .stats { flex-direction: column; }
  .notify-form input { width: 100%; }
}

/* ── Scroll Reveal Animations ── */
.hidden-reveal {
  opacity: 0 !important;
  transform: translateY(40px) !important;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.show-reveal {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ── Premium PDF Viewer ── */
.pdf-viewer-container {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg3);
  overflow: hidden;
}

.reader-layout {
  display: flex;
  height: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.pdf-sidebar {
  width: 300px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease;
  margin-left: -300px;
  z-index: 40;
}

.pdf-sidebar.open {
  margin-left: 0;
}

body.pdf-night-mode .pdf-sidebar {
  background: #0f172a;
  border-color: #1e293b;
}

.sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
body.pdf-night-mode .sidebar-header { color: #f8fafc; border-color: #1e293b; }

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.outline-item {
  cursor: pointer;
  padding: 8px 12px;
  color: var(--muted);
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.2s;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.outline-item:hover {
  background: var(--primary-light);
  color: var(--primary-text);
}
body.pdf-night-mode .outline-item:hover { background: #1e293b; color: #60a5fa; }

.pdf-canvas-wrapper {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: center;
  background: #0f172a;
  scroll-behavior: smooth;
}

.pdf-page-container {
  background: #ffffff;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  border-radius: 4px;
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.pdf-toolbar {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 24px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.1);
  z-index: 50;
  color: #fff;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pdf-toolbar:hover {
  background: rgba(15, 23, 42, 0.9);
  transform: translateX(-50%) translateY(-4px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.15);
}

.pdf-toolbar button {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  transition: all 0.2s;
}

.pdf-toolbar button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.pdf-toolbar button:active {
  transform: scale(0.92);
}

.pdf-toolbar .separator {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 4px;
}

.page-info {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  min-width: 80px;
  text-align: center;
  color: #f8fafc;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-input {
  width: 50px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 6px;
  text-align: center;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 4px;
  transition: all 0.2s;
}
.page-input:focus {
  outline: 2px solid var(--blue);
  background: rgba(255,255,255,0.2);
}
/* Hide arrows from number input */
.page-input::-webkit-outer-spin-button,
.page-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.page-input[type=number] {
  -moz-appearance: textfield;
}

.pdf-canvas {
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
  transition: filter 0.3s;
}

/* Night Mode Support */
body.pdf-night-mode .pdf-canvas {
  filter: invert(0.9) hue-rotate(180deg);
}
body.pdf-night-mode .pdf-page-container {
  background: #111;
}

/* Skeleton Loading */
.skeleton-loader {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #e2e8f0 25%, #f8fafc 50%, #e2e8f0 75%);
  background-size: 400% 100%;
  animation: skeletonLoading 1.5s infinite ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.pdf-night-mode .skeleton-loader {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
}
@keyframes skeletonLoading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Table Responsive Utility ── */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

html.dark-init .nav-logo img, body.dark .nav-logo img, body.dark img.logo, html.dark-init .hero-logo-3d, body.dark .hero-logo-3d { content: url('logo_light.png'); }


/* ── FAQ Accordion ── */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  padding: 0 !important;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 24px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
  transition: background 0.3s;
}

.faq-question:hover {
  background: rgba(128, 128, 128, 0.05);
}

.faq-icon {
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform 0.3s ease;
  line-height: 1;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.4s ease;
  padding: 0 24px;
  opacity: 0;
  text-align: left;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--primary);
}

.faq-item.active .faq-answer {
  padding: 0 24px 24px 24px;
  max-height: 500px;
  opacity: 1;
}
