/* ═══════════════════════════════════════════════
   PadhoLikhoJEE — Design System CSS
   Scientific Glassmorphism · v1.0
   ═══════════════════════════════════════════════ */

/* ── FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500&display=swap');

/* ── TOKENS ── */
:root {
  --plj-bg:          #0F172A;
  --plj-bg-2:        #0B1120;
  --plj-bg-3:        #111827;
  --plj-surface:     rgba(255,255,255,0.03);
  --plj-surface-2:   rgba(255,255,255,0.06);
  --plj-border:      rgba(255,255,255,0.07);
  --plj-border-2:    rgba(255,255,255,0.12);
  --plj-cyan:        #06B6D4;
  --plj-cyan-dim:    rgba(6,182,212,0.12);
  --plj-cyan-border: rgba(6,182,212,0.25);
  --plj-orange:      #F97316;
  --plj-orange-dim:  rgba(249,115,22,0.10);
  --plj-purple:      #4F46E5;
  --plj-purple-dim:  rgba(79,70,229,0.10);
  --plj-green:       #10B981;
  --plj-yellow:      #F59E0B;
  --plj-red:         #EF4444;
  --plj-text:        #E2E8F0;
  --plj-text-2:      #94A3B8;
  --plj-text-3:      #475569;
  --plj-text-4:      #334155;
  --plj-radius:      12px;
  --plj-radius-sm:   8px;
  --plj-transition:  all 0.3s ease;
  --plj-font-head:   'Plus Jakarta Sans', system-ui, sans-serif;
  --plj-font-body:   'Inter', system-ui, sans-serif;
  --plj-nav-h:       60px;   /* bottom nav height — keeps content from hiding behind it */
}

/* ── GLOBAL RESET / BASE ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.plj-dark {
  background-color: var(--plj-bg) !important;
  color: var(--plj-text) !important;
  font-family: var(--plj-font-body) !important;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Astra overrides */
body.plj-dark .ast-container,
body.plj-dark #page,
body.plj-dark #content,
body.plj-dark .site-content,
body.plj-dark .ast-article-inner,
body.plj-dark .entry-content {
  background: transparent !important;
  color: var(--plj-text) !important;
}

body.plj-dark a { color: var(--plj-cyan); text-decoration: none; }
body.plj-dark a:hover { color: #22D3EE; }

body.plj-dark h1,
body.plj-dark h2,
body.plj-dark h3,
body.plj-dark h4 {
  font-family: var(--plj-font-head) !important;
  color: #F1F5F9 !important;
  line-height: 1.2;
}

/* ── HEADER ── */
body.plj-dark #masthead,
body.plj-dark .site-header,
body.plj-dark .ast-main-header-wrap {
  background: var(--plj-bg-2) !important;
  border-bottom: 1px solid var(--plj-border) !important;
  box-shadow: none !important;
  position: sticky !important;
  top: 0;
  z-index: 999;
}

body.plj-dark .site-title a,
body.plj-dark .ast-site-name {
  font-family: var(--plj-font-head) !important;
  font-weight: 800 !important;
  font-size: 18px !important;
  color: var(--plj-text) !important;
  letter-spacing: -0.3px;
}
body.plj-dark .site-title a span,
body.plj-dark .ast-site-name span { color: var(--plj-cyan); }

/* ── STICKY SEARCH in header ── */
.plj-header-search {
  flex: 1;
  max-width: 460px;
  margin: 0 20px;
}
.plj-header-search input[type="search"] {
  width: 100%;
  background: var(--plj-surface-2);
  border: 1px solid var(--plj-border-2);
  border-radius: var(--plj-radius-sm);
  color: var(--plj-text);
  font-family: var(--plj-font-body);
  font-size: 13px;
  padding: 8px 16px 8px 38px;
  outline: none;
  transition: var(--plj-transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
}
.plj-header-search input[type="search"]:focus {
  border-color: var(--plj-cyan-border);
  background-color: rgba(6,182,212,0.04);
}
.plj-header-search input[type="search"]::placeholder { color: var(--plj-text-3); }

/* ── DARK TOGGLE ── */
.plj-dark-toggle {
  width: 34px; height: 34px;
  border-radius: var(--plj-radius-sm);
  background: var(--plj-surface-2);
  border: 1px solid var(--plj-border);
  color: var(--plj-text-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--plj-transition);
  font-size: 16px;
}
.plj-dark-toggle:hover { border-color: var(--plj-cyan-border); color: var(--plj-cyan); }

/* ── BOTTOM NAV ── */
.plj-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--plj-nav-h);
  background: rgba(11,17,32,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--plj-border);
  display: flex;
  z-index: 1000;
}
.plj-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--plj-text-3);
  font-size: 10px;
  font-family: var(--plj-font-head);
  font-weight: 600;
  text-decoration: none;
  transition: var(--plj-transition);
}
.plj-nav-item i { font-size: 20px; transition: var(--plj-transition); }
.plj-nav-item:hover,
.plj-nav-item.plj-active {
  color: var(--plj-cyan);
  text-decoration: none;
}
.plj-nav-item.plj-active i { color: var(--plj-cyan); }

/* Reserve space for bottom nav */
body.plj-dark { padding-bottom: calc(var(--plj-nav-h) + 8px); }

/* ── WHATSAPP BAR ── */
.plj-wa-bar {
  position: fixed;
  bottom: var(--plj-nav-h);
  left: 0; right: 0;
  background: linear-gradient(90deg, rgba(37,211,102,0.12), rgba(37,211,102,0.06));
  border-top: 1px solid rgba(37,211,102,0.2);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 999;
  backdrop-filter: blur(8px);
}
.plj-wa-icon { font-size: 22px; flex-shrink: 0; }
.plj-wa-text {
  font-size: 12px;
  color: var(--plj-text-2);
  font-family: var(--plj-font-body);
  line-height: 1.4;
}
.plj-wa-text strong { display: block; color: var(--plj-text); font-size: 13px; font-family: var(--plj-font-head); font-weight: 700; }
.plj-wa-btn {
  margin-left: auto;
  flex-shrink: 0;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: var(--plj-radius-sm);
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--plj-font-head);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--plj-transition);
  text-decoration: none;
}
.plj-wa-btn:hover { background: #1DA851; color: #fff; }

/* Reserve space for WA bar on homepage */
body.plj-home { padding-bottom: calc(var(--plj-nav-h) + 52px); }

/* ── CARDS ── */
.plj-card {
  background: var(--plj-surface);
  border: 1px solid var(--plj-border);
  border-radius: var(--plj-radius);
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: var(--plj-transition);
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: var(--plj-text);
}
.plj-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--plj-cyan), var(--plj-purple));
  opacity: 0.5;
  transition: opacity 0.3s;
}
.plj-card:hover {
  border-color: var(--plj-cyan-border);
  background: rgba(6,182,212,0.04);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(6,182,212,0.08);
  color: var(--plj-text);
  text-decoration: none;
}
.plj-card:hover::before { opacity: 1; }

.plj-card__tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--plj-text-3);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.plj-card__tag i { font-size: 12px; }
.plj-card__title {
  font-family: var(--plj-font-head);
  font-size: 14px;
  font-weight: 700;
  color: #E2E8F0;
  line-height: 1.35;
  margin-bottom: 12px;
}
.plj-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.plj-card__count {
  font-size: 11px;
  color: var(--plj-text-3);
  font-family: var(--plj-font-body);
}

/* ── DIFFICULTY BADGES ── */
.plj-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}
.plj-badge--easy   { background: rgba(16,185,129,0.12);  color: var(--plj-green);  border: 1px solid rgba(16,185,129,0.25); }
.plj-badge--med    { background: rgba(245,158,11,0.12);  color: var(--plj-yellow); border: 1px solid rgba(245,158,11,0.25); }
.plj-badge--hard   { background: rgba(239,68,68,0.12);   color: var(--plj-red);    border: 1px solid rgba(239,68,68,0.25); }

/* ── EXAM TAG ── */
.plj-exam-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--plj-cyan-dim);
  color: var(--plj-cyan);
  border: 1px solid var(--plj-cyan-border);
  margin-right: 4px;
}

/* ── SUBJECT PILLS ── */
.plj-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.plj-pill {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--plj-font-head);
  cursor: pointer;
  border: 1px solid var(--plj-border-2);
  background: var(--plj-surface-2);
  color: var(--plj-text-3);
  transition: var(--plj-transition);
  text-decoration: none;
}
.plj-pill:hover,
.plj-pill.plj-active {
  background: var(--plj-cyan-dim);
  border-color: var(--plj-cyan-border);
  color: var(--plj-cyan);
  text-decoration: none;
}

/* ── BUTTONS ── */
.plj-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--plj-radius-sm);
  font-family: var(--plj-font-head);
  font-weight: 700;
  font-size: 14px;
  padding: 11px 22px;
  cursor: pointer;
  transition: var(--plj-transition);
  border: none;
  text-decoration: none;
}
.plj-btn--primary {
  background: var(--plj-orange);
  color: #fff;
}
.plj-btn--primary:hover { background: #EA6C00; color: #fff; text-decoration: none; transform: translateY(-1px); }

.plj-btn--secondary {
  background: var(--plj-surface-2);
  color: var(--plj-text);
  border: 1px solid var(--plj-border-2);
}
.plj-btn--secondary:hover { border-color: var(--plj-cyan-border); color: var(--plj-cyan); text-decoration: none; }

/* ── SECTION LABELS ── */
.plj-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--plj-text-3);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ── STATS GRID ── */
.plj-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--plj-border);
  border-radius: var(--plj-radius);
  overflow: hidden;
  background: var(--plj-surface);
  margin-bottom: 32px;
}
.plj-stat {
  padding: 16px 12px;
  text-align: center;
  border-right: 1px solid var(--plj-border);
}
.plj-stat:last-child { border-right: none; }
.plj-stat__num {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--plj-font-head);
  color: var(--plj-cyan);
  line-height: 1;
  margin-bottom: 4px;
}
.plj-stat__label {
  font-size: 11px;
  color: var(--plj-text-3);
  font-family: var(--plj-font-body);
}

/* ── QUESTION BOX ── */
.plj-question-box {
  background: var(--plj-purple-dim);
  border: 1px solid rgba(79,70,229,0.2);
  border-radius: var(--plj-radius);
  padding: 18px;
  margin-bottom: 24px;
}
.plj-question-box__label {
  font-size: 10px;
  font-weight: 700;
  color: #818CF8;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.plj-question-box__label i { font-size: 14px; }
.plj-question-box__text {
  font-size: 14px;
  font-family: var(--plj-font-body);
  color: #CBD5E1;
  line-height: 1.8;
}

/* Math blocks */
.plj-math-block {
  background: var(--plj-surface-2);
  border: 1px solid var(--plj-border);
  border-radius: var(--plj-radius-sm);
  padding: 14px 18px;
  margin: 14px 0;
  overflow-x: auto;
  text-align: center;
  font-size: 15px;
  color: var(--plj-text);
}

/* ── SOLUTION STEPS ── */
.plj-step {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}
.plj-step__num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--plj-cyan-dim);
  border: 1px solid var(--plj-cyan-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--plj-cyan);
  flex-shrink: 0;
  margin-top: 2px;
}
.plj-step__content {
  font-size: 14px;
  font-family: var(--plj-font-body);
  color: var(--plj-text-2);
  line-height: 1.7;
}
.plj-step__content strong { color: var(--plj-text); font-weight: 600; }

/* ── ANSWER BOX ── */
.plj-answer-box {
  background: var(--plj-orange-dim);
  border: 1px solid rgba(249,115,22,0.25);
  border-radius: var(--plj-radius);
  padding: 18px;
  margin-bottom: 24px;
}
.plj-answer-box__label {
  font-size: 10px;
  font-weight: 700;
  color: var(--plj-orange);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.plj-answer-box__value {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--plj-font-head);
  color: var(--plj-orange);
}
.plj-answer-box__note {
  font-size: 12px;
  color: var(--plj-text-3);
  font-family: var(--plj-font-body);
  margin-top: 4px;
}

/* ── LIGHTBOX ── */
.plj-lightbox-trigger {
  display: block;
  position: relative;
  border-radius: var(--plj-radius);
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid var(--plj-border-2);
}
.plj-lightbox-trigger img { width: 100%; height: auto; display: block; }
.plj-lightbox-trigger::after {
  content: '\f277'; /* ti-zoom-in Tabler glyph fallback */
  font-family: 'tabler-icons';
  position: absolute;
  bottom: 10px; right: 10px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
}

/* ── BREADCRUMB ── */
.plj-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--plj-text-3);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.plj-breadcrumb a { color: var(--plj-text-3); }
.plj-breadcrumb a:hover,
.plj-breadcrumb span.current { color: var(--plj-cyan); }
.plj-breadcrumb i { font-size: 12px; }

/* ── FOOTER ── */
body.plj-dark .site-footer,
body.plj-dark #colophon {
  background: var(--plj-bg-2) !important;
  border-top: 1px solid var(--plj-border) !important;
  color: var(--plj-text-3) !important;
  font-size: 12px;
}

/* ── HERO GLOW (via pseudo) ── */
.plj-hero-wrap {
  position: relative;
  padding: 40px 0 32px;
  overflow: hidden;
}
.plj-hero-wrap::before {
  content: '';
  position: absolute;
  top: -80px; left: -100px;
  width: 500px; height: 400px;
  background: radial-gradient(ellipse, rgba(79,70,229,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.plj-hero-wrap::after {
  content: '';
  position: absolute;
  top: -60px; right: -80px;
  width: 350px; height: 300px;
  background: radial-gradient(ellipse, rgba(6,182,212,0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* ── RESPONSIVE ── */
@media (min-width: 768px) {
  .plj-bottom-nav { display: none; }
  body.plj-dark   { padding-bottom: 0 !important; }
  body.plj-home   { padding-bottom: 0 !important; }
  .plj-wa-bar     { bottom: 0; }
  .plj-card-grid  { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
  .plj-stats { grid-template-columns: repeat(3, 1fr); }
  .plj-card-grid { grid-template-columns: repeat(2, 1fr); }
}
