/* ══════════════════════════════════════
   LANGPATH ACADEMY — SHARED DESIGN SYSTEM
   Version 1.0 | Design Tokens & Components
   ══════════════════════════════════════ */

/* ─── DESIGN TOKENS ─── */
:root {
  /* Colors */
  --red:         #C8102E;
  --red-dark:    #A50D26;
  --red-light:   #FDF2F4;
  --ink:         #111111;
  --gray:        #6B7280;
  --line:        #E8E8E8;
  --bg-soft:     #F8F8F8;
  --white:       #ffffff;

  /* Typography Scale */
  --font-display: clamp(44px, 7vw, 80px);
  --font-h2:      clamp(30px, 4vw, 48px);
  --font-h3:      clamp(17px, 2vw, 20px);
  --font-body:    15px;
  --font-small:   13px;
  --font-label:   11px;

  /* Spacing */
  --section-pad:  96px;
  --container:    1200px;
  --container-sm: 860px;

  /* Motion */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:    cubic-bezier(0.0, 0, 0.2, 1);

  /* Radius */
  --radius-card: 16px;
  --radius-btn:  999px;
  --radius-sm:   8px;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html   { scroll-behavior: smooth; }
body   { font-family: 'Plus Jakarta Sans', sans-serif; background: #fff; color: var(--ink); -webkit-font-smoothing: antialiased; }
a      { text-decoration: none; color: inherit; }
img    { display: block; max-width: 100%; }

/* ─── TYPOGRAPHY ─── */
.t-display { font-size: var(--font-display); font-weight: 900; line-height: 1.04; letter-spacing: -0.035em; color: var(--ink); }
.t-h2      { font-size: var(--font-h2); font-weight: 800; line-height: 1.15; letter-spacing: -0.025em; color: var(--ink); }
.t-h3      { font-size: var(--font-h3); font-weight: 700; line-height: 1.3; color: var(--ink); }
.t-body    { font-size: 15px; line-height: 1.75; color: var(--gray); }
.t-small   { font-size: 13px; line-height: 1.5; color: var(--gray); }
.t-label   { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); }

/* ─── LAYOUT ─── */
.wrap    { max-width: var(--container);    margin: 0 auto; padding: 0 24px; }
.wrap-sm { max-width: var(--container-sm); margin: 0 auto; padding: 0 24px; }
.section     { padding: var(--section-pad) 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px; font-weight: 700; border-radius: var(--radius-btn);
  padding: 13px 28px; cursor: pointer; border: none;
  transition: transform 0.18s var(--ease-spring), box-shadow 0.22s var(--ease-out), background-color 0.18s ease;
  will-change: transform;
}
.btn:hover  { transform: translateY(-2px) scale(1.025); }
.btn:active { transform: scale(0.96) translateY(1px) !important; }

.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); box-shadow: 0 10px 36px rgba(200,16,46,0.38); }

.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); background: #f5f5f5; }

.btn-white-on-red { background: #fff; color: var(--red); }
.btn-white-on-red:hover { background: #f2f2f2; }

.btn-sm { font-size: 13px; padding: 9px 20px; }
.btn-lg { font-size: 15px; padding: 15px 32px; }

/* ─── CARDS ─── */
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 32px;
  transition: transform 0.38s var(--ease-spring), box-shadow 0.38s var(--ease-out);
}
.card:hover { transform: translateY(-8px) scale(1.015); box-shadow: 0 24px 64px rgba(0,0,0,0.10); }

.card-red {
  background: #fff; border: 1.5px solid var(--red);
  border-radius: var(--radius-card); padding: 32px;
  animation: borderPulse 3s ease-in-out infinite;
  transition: transform 0.38s var(--ease-spring);
}
.card-red:hover { animation: none; transform: translateY(-8px) scale(1.015); box-shadow: 0 24px 64px rgba(200,16,46,0.18); }

@keyframes borderPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(200,16,46,.15), 0 8px 32px rgba(200,16,46,.12); }
  50%      { box-shadow: 0 0 0 6px rgba(200,16,46,0),  0 8px 32px rgba(200,16,46,.22); }
}

/* ─── CHECKLIST ─── */
.checklist { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.checklist li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: var(--ink);
}
.checklist li::before {
  content: ''; flex-shrink: 0; margin-top: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--red-light) url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='%23C8102E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/10px no-repeat;
}

/* ─── NAVBAR ─── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 68px;
}
.nav-logo { display: flex; align-items: baseline; gap: 0; }
.nav-logo .l1, .nl1 { font-size: 21px; font-weight: 900; letter-spacing: -.04em; color: var(--ink); }
.nav-logo .l2, .nl2 { font-size: 21px; font-weight: 900; letter-spacing: -.04em; color: var(--red); }
.nav-logo .l3, .nl3 { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #9CA3AF; margin-left: 3px; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-size: 14px; font-weight: 600; color: var(--ink);
  transition: color .2s; position: relative;
}
.nav-links a:hover { color: var(--red); }
.nav-links a::after {
  content:''; position:absolute; bottom:-3px; left:0;
  width:0; height:2px; background:var(--red);
  border-radius:99px; transition:width .28s var(--ease-spring);
}
.nav-links a:hover::after, .nav-links a.active::after, .nav-links a.active-page::after { width:100%; }
.nav-links a.active, .nav-links a.active-page { color: var(--red); }
.nav-cta-desktop { display: flex; align-items: center; gap: 8px; }
/* ─── MOBILE MENU ─── */
#mob-menu { display: none; border-top: 1px solid var(--line); background: #fff; }
#mob-menu.open { display: block; }
.mob-menu-link {
  display: block; font-size: 15px; font-weight: 600; color: var(--ink);
  padding: 13px 20px; border-bottom: 1px solid var(--line); transition: color .2s;
}
.mob-menu-link:hover { color: var(--red); }

/* ─── PROGRESS BAR ─── */
#prog-bar {
  position: fixed; top: 0; left: 0; z-index: 200;
  height: 2px; width: 0; background: var(--red);
  transition: width .1s linear; box-shadow: 0 0 8px rgba(200,16,46,0.5);
}

/* ─── WHATSAPP FLOAT ─── */
.wa-float {
  position: fixed; bottom: 88px; right: 24px; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(0,0,0,.65); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.25); transition: transform .2s, background .2s;
}
.wa-float:hover { transform: scale(1.08); background: rgba(0,0,0,.8); }
.wa-sticky {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 95;
  background: rgba(0,0,0,.85); padding: 11px 20px;
  display: none; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 -2px 16px rgba(0,0,0,.3);
}
.wa-sticky a { color: rgba(255,255,255,.75); font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; }

/* ─── NAV DROPDOWN ─── */
.nav-dropdown { position: relative; }
.nav-dropdown > a { display: flex; align-items: center; gap: 5px; }
.nav-dd-chevron { transition: transform .3s var(--ease-spring, ease); }
.nav-dropdown:hover .nav-dd-chevron { transform: rotate(180deg); }
.nav-dd-panel {
  position: absolute; top: calc(100% + 20px); left: 50%;
  transform: translateX(-50%) translateY(-8px) scale(.97);
  background: #fff; border-radius: 18px; border: 1.5px solid var(--line, #E5E7EB);
  box-shadow: 0 12px 48px rgba(0,0,0,.12); padding: 8px; min-width: 280px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .3s var(--ease-spring, ease); z-index: 200;
}
.nav-dropdown:hover .nav-dd-panel { opacity: 1; pointer-events: all; transform: translateX(-50%) translateY(0) scale(1); }
.nav-dd-label { padding: 8px 14px 4px; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gray, #9CA3AF); }
.nav-dd-item { display: flex; align-items: center; padding: 11px 14px; border-radius: 12px; transition: background .15s; gap: 12px; cursor: pointer; }
.nav-dd-item:hover { background: var(--bg-soft, #F9FAFB); }
.nav-dd-name { font-size: 13px; font-weight: 700; color: var(--ink, #111); line-height: 1.25; }
.nav-dd-sub { font-size: 11px; color: var(--gray, #9CA3AF); margin-top: 2px; }
.nav-dd-divider { height: 1px; background: var(--line, #E5E7EB); margin: 6px 8px; }
.nav-dd-panel::before { content: ''; position: absolute; top: -20px; left: 0; right: 0; height: 20px; }

/* ─── REVEAL ANIMATION ─── */
.reveal, .reveal-left { opacity: 1; transform: none; }
.js-loaded .reveal      { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease-spring), transform 0.7s var(--ease-spring); }
.js-loaded .reveal-left { opacity: 0; transform: translateX(-36px); transition: opacity 0.8s var(--ease-spring), transform 0.8s var(--ease-spring); }
.js-loaded .reveal.in, .js-loaded .reveal-left.in { opacity: 1; transform: none; }
.d1 { transition-delay: .1s; } .d2 { transition-delay: .2s; } .d3 { transition-delay: .3s; } .d4 { transition-delay: .4s; }

/* ─── BADGE / TAG ─── */
.badge {
  display: inline-flex; align-items: center;
  border-radius: 999px; padding: 5px 14px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.badge-blue   { background: #EFF6FF; border: 1px solid #93C5FD; color: #2563EB; }
.badge-red    { background: var(--red-light); border: 1px solid #F0C0C8; color: var(--red); }
.badge-purple { background: #F5F3FF; border: 1px solid #C4B5FD; color: #7C3AED; }
.badge-green  { background: #F0FDF4; border: 1px solid #86EFAC; color: #16A34A; }

/* ─── STAT BOX ─── */
.stat-box {
  padding: 28px 24px; border-radius: var(--radius-card);
  background: #fff; border: 1px solid var(--line); text-align: center;
}
.stat-number { font-size: clamp(36px, 5vw, 56px); font-weight: 900; letter-spacing: -.03em; color: var(--red); line-height: 1; }
.stat-label  { font-size: 13px; color: var(--gray); margin-top: 6px; }

/* ─── ACCORDION / FAQ ─── */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0; cursor: pointer; gap: 16px;
}
.faq-q span { font-size: 15px; font-weight: 700; color: var(--ink); }
.faq-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--red-light); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform .3s var(--ease-spring), background .2s; }
.faq-icon svg { transition: transform .3s var(--ease-spring); }
.faq-item.open .faq-icon { background: var(--red); }
.faq-item.open .faq-icon svg { transform: rotate(45deg); }
.faq-item.open .faq-icon svg path { stroke: #fff; }
.faq-a { overflow: hidden; max-height: 0; transition: max-height .4s var(--ease-spring), padding .3s; }
.faq-a p { padding-bottom: 20px; font-size: 14px; color: var(--gray); line-height: 1.8; }
.faq-item.open .faq-a { max-height: 400px; }

/* ─── FOOTER ─── */
footer { background: #111; padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-logo .l1 { font-size: 20px; font-weight: 900; color: #fff; letter-spacing: -.04em; }
.footer-logo .l2 { font-size: 20px; font-weight: 900; color: var(--red); letter-spacing: -.04em; }
.footer-logo .l3 { font-size: 10px; font-weight: 600; color: #4B5563; letter-spacing: .08em; text-transform: uppercase; margin-left: 4px; }
.footer-desc { font-size: 14px; color: #6B7280; line-height: 1.75; max-width: 280px; margin-top: 12px; }
.footer-col h4 { font-size: 11px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14px; color: #6B7280; margin-bottom: 10px; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #1F2937; padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-bottom p { font-size: 12px; color: #374151; }

/* ─── FORM INPUTS ─── */
.input-field {
  width: 100%; padding: 13px 16px;
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line);
  border-radius: 10px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.input-field:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(200,16,46,0.1); }
.input-field::placeholder { color: #C0C4CC; }
.input-label { display: block; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
.input-group { display: flex; flex-direction: column; gap: 0; }

/* ─── TABS ─── */
.tab-bar { display: flex; gap: 4px; background: var(--bg-soft); padding: 4px; border-radius: 12px; }
.tab-item {
  flex: 1; padding: 10px 16px; font-size: 13px; font-weight: 700;
  color: var(--gray); border-radius: 9px; cursor: pointer;
  transition: background .2s, color .2s; text-align: center; border: none; background: transparent;
}
.tab-item.active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

/* ─── PROGRESS BAR COMPONENT ─── */
.prog-track { background: var(--line); border-radius: 999px; height: 6px; overflow: hidden; }
.prog-fill  { height: 100%; background: var(--red); border-radius: 999px; transition: width 1s var(--ease-spring); }

/* ─── AVATAR ─── */
.avatar {
  border-radius: 50%; object-fit: cover;
  background: var(--red-light); display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--red);
}

/* ─── DASHBOARD SIDEBAR ─── */
.dash-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  background: #fff; border-right: 1px solid var(--line);
  padding: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-logo { padding: 24px 20px; border-bottom: 1px solid var(--line); }
.sidebar-nav { padding: 16px 12px; }
.sidebar-section { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #C0C4CC; padding: 16px 8px 8px; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--gray);
  transition: background .15s, color .15s; margin-bottom: 2px;
}
.sidebar-link:hover { background: var(--bg-soft); color: var(--ink); }
.sidebar-link.active { background: var(--red-light); color: var(--red); }
.sidebar-link .icon { width: 18px; height: 18px; flex-shrink: 0; }
.dash-main { background: var(--bg-soft); padding: 32px; overflow-y: auto; }
.dash-header { margin-bottom: 32px; }
.dash-title { font-size: 24px; font-weight: 800; color: var(--ink); }
.dash-sub   { font-size: 14px; color: var(--gray); margin-top: 4px; }

/* ─── METRIC CARD ─── */
.metric-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); padding: 24px; }
.metric-num  { font-size: 32px; font-weight: 900; letter-spacing: -.02em; color: var(--ink); }
.metric-label { font-size: 13px; color: var(--gray); margin-top: 4px; }
.metric-change { font-size: 12px; font-weight: 700; margin-top: 8px; }
.metric-change.up   { color: #16A34A; }
.metric-change.down { color: var(--red); }

/* ─── LESSON CARD ─── */
.lesson-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  display: flex; align-items: center; gap: 16px; padding: 16px 20px;
  transition: box-shadow .2s, transform .2s var(--ease-spring);
}
.lesson-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.08); transform: translateY(-2px); }
.lesson-thumb { width: 72px; height: 52px; border-radius: 8px; background: var(--ink); flex-shrink: 0; overflow: hidden; position: relative; }
.lesson-play  { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.35); }
.lesson-info  { flex: 1; min-width: 0; }
.lesson-title { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesson-meta  { font-size: 12px; color: var(--gray); margin-top: 3px; }

/* ─── ADMIN TABLE ─── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 12px 16px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--gray); background: var(--bg-soft); border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.data-table td { padding: 14px 16px; font-size: 14px; color: var(--ink); border-bottom: 1px solid var(--line); }
.data-table tr:hover td { background: #FAFAFA; }
.data-table .status { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status-active   { background: #F0FDF4; color: #16A34A; }
.status-inactive { background: var(--bg-soft); color: var(--gray); }
.status-pending  { background: #FFFBEB; color: #D97706; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dash-layout { grid-template-columns: 220px 1fr; }
}
@media (max-width: 767px) {
  .section { padding: 72px 0; }
  .nav-links, .nav-cta-desktop { display: none !important; }
  .nav-mob-btn { display: flex !important; }
  .wa-sticky   { display: flex; }
  .wa-float    { bottom: 80px; }
  footer       { padding-bottom: 72px !important; }
  .footer-grid { grid-template-columns: 1fr; }
  .dash-layout { grid-template-columns: 1fr; }
  .sidebar     { display: none; }
}
@media (min-width: 768px) {
  .nav-mob-btn { display: none !important; }
  .wa-float    { bottom: 24px; }
}
@media (max-width: 640px) {
  .dash-main { padding: 20px 16px; }
}

/* ─── SHARED JS BEHAVIORS (utility classes) ─── */
.hidden { display: none !important; }
.flex   { display: flex; }
.grid   { display: grid; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.text-center  { text-align: center; }
.text-red     { color: var(--red); }
.text-gray    { color: var(--gray); }
.text-ink     { color: var(--ink); }
.fw-700       { font-weight: 700; }
.fw-800       { font-weight: 800; }
.fw-900       { font-weight: 900; }

/* ─── SHARED SCRIPTS SNIPPET (reference) ─── */
/*
  Reveal animation observer:
  document.documentElement.classList.add('js-loaded');
  const io = new IntersectionObserver(entries => {
    entries.forEach(e => { if (e.isIntersecting) { e.target.classList.add('in'); io.unobserve(e.target); } });
  }, { threshold: 0.05, rootMargin: '0px 0px -20px 0px' });
  document.querySelectorAll('.reveal, .reveal-left').forEach(el => {
    if (el.getBoundingClientRect().top < window.innerHeight) setTimeout(() => el.classList.add('in'), 50);
    else io.observe(el);
  });
*/
