/* ═══════════════════════════════════════════════════════
   Naukado Blog — Shared Stylesheet
   Design system matching the Naukado mobile app
   ═══════════════════════════════════════════════════════ */

:root {
  --bg: #EEEAE3;
  --primary: #D4774A;
  --text: #1C1917;
  --card: #FFFFFF;
  --border: #D9D5CF;
  --muted: #6B6560;
  --radius: 20px;

  /* Tool colors */
  --buddy: #E8956C;
  --flashcards: #75A882;
  --quiz: #6E9EC4;
  --notes: #D4774A;
  --math: #9278B8;
  --languages: #5F9E8E;
  --essays: #C46B3E;
  --podcast: #BE7A8A;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Reveal Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s cubic-bezier(.16,1,.3,1),
              transform 0.55s cubic-bezier(.16,1,.3,1);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Section Divider ── */
.section-divider { height: 1px; background: var(--border); margin: 0; }

/* ── Generic Section Wrapper ── */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 40px;
}

/* ── Section Labels / Titles / Descs ── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
  display: block;
}

.section-title {
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 16px;
}

.section-desc {
  font-family: Georgia, serif;
  font-size: 17px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 560px;
}

/* ── Blog Hero ── */
.blog-hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 40px;
  background: var(--bg);
}

.blog-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(212,119,74,0.1);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.blog-h1 {
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 800;
  letter-spacing: -2.5px;
  line-height: 0.96;
  color: var(--text);
  margin-bottom: 24px;
}

.blog-h1 em { color: var(--primary); font-style: normal; }

.blog-subtitle {
  font-family: Georgia, serif;
  font-size: clamp(17px, 2vw, 20px);
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* ── Custom Language Switcher ── */
.lang-switcher { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--border);
  border-radius: 20px; padding: 7px 12px 7px 10px;
  cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--text); font-family: inherit;
  transition: border-color .15s, background .15s; white-space: nowrap;
}
.lang-btn:hover { border-color: var(--primary); background: rgba(212,119,74,.07); }
.lang-btn-flag { font-size: 15px; line-height: 1; }
.lang-btn-code { letter-spacing: .04em; }
.lang-btn-arrow { color: var(--muted); transition: transform .2s; flex-shrink: 0; }
.lang-switcher.open .lang-btn-arrow { transform: rotate(180deg); }
.lang-switcher.open .lang-btn { border-color: var(--primary); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.06);
  padding: 8px; min-width: 190px; list-style: none;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  opacity: 0; transform: translateY(-6px) scale(.97);
  pointer-events: none;
  transition: opacity .15s cubic-bezier(.16,1,.3,1), transform .15s cubic-bezier(.16,1,.3,1);
  z-index: 9999;
}
.lang-switcher.open .lang-menu { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }
.lang-opt {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 10px; border-radius: 10px;
  text-decoration: none; font-size: 12px; font-weight: 500;
  color: var(--text); transition: background .1s;
  cursor: pointer; border: none; background: transparent;
  font-family: inherit; width: 100%; text-align: left;
}
.lang-opt:hover { background: rgba(212,119,74,.09); }
.lang-opt.active { background: rgba(212,119,74,.14); color: var(--primary); font-weight: 700; }
.lang-opt-flag { font-size: 17px; line-height: 1; }

/* ── Store Badges ── */
.store-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.store-badge {
  display: inline-block;
  text-decoration: none;
  border-radius: 7px;
  overflow: hidden;
  transition: opacity 0.15s, transform 0.15s cubic-bezier(.16,1,.3,1), box-shadow 0.15s;
  line-height: 0; /* Remove extra space below SVG */
}
.store-badge:hover {
  opacity: 0.88;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  border-color: rgba(212,119,74,0.3);
}

/* ── Stats Row ── */
.stats-row {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
}

.stat-item { text-align: center; }
.stat-num {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--primary);
  display: block;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
}

/* ── Phone Mockup (CSS-only) ── */
.phone-mockup {
  width: 260px;
  height: 520px;
  background: var(--text);
  border-radius: 40px;
  padding: 14px;
  position: relative;
  box-shadow: 0 40px 80px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.06);
  margin: 48px auto 0;
  flex-shrink: 0;
}

.phone-notch {
  width: 90px; height: 24px;
  background: var(--text);
  border-radius: 0 0 14px 14px;
  margin: 0 auto;
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.phone-screen {
  width: 100%; height: 100%;
  background: var(--bg);
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  padding: 28px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phone-tool-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.phone-tool-card {
  background: var(--card);
  border-radius: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.phone-tool-icon {
  width: 22px; height: 22px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

.phone-search {
  background: var(--card);
  border-radius: 10px;
  height: 28px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 6px;
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 4px;
}

/* ── Problem Section ── */
.problem-section {
  background: var(--card);
  padding: 80px 40px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.problem-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.pain-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.pain-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
}

.pain-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: rgba(212,119,74,0.1);
}

.solution-card {
  background: var(--bg);
  border-radius: 24px;
  padding: 32px;
  border: 1px solid var(--border);
}

.solution-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 20px;
  opacity: 0.7;
}

.solution-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}
.solution-item:last-child { border-bottom: none; }

.solution-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

/* ── Tools Grid ── */
.tools-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 40px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.tool-card {
  background: var(--card);
  border-radius: 20px;
  padding: 22px;
  border: 1px solid var(--border);
  transition: transform 0.25s cubic-bezier(.16,1,.3,1),
              box-shadow 0.25s,
              border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity 0.2s;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.1);
  border-color: rgba(212,119,74,0.2);
}
.tool-card:hover::before { opacity: 1; }

.tool-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 20px;
}

.tool-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}

.tool-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.tool-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 10px;
  display: inline-block;
}

/* ── Exam Section ── */
.exam-wrapper {
  padding: 0 40px 80px;
}

.exam-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 24px;
  padding: 56px 48px;
  max-width: 1060px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.exam-section::after {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(212,119,74,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.exam-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.exam-badge {
  display: inline-block;
  background: rgba(212,119,74,0.1);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 16px;
  margin-bottom: 18px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.exam-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
}

.exam-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}

.exam-list li::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 7px;
}

.exam-visual {
  background: var(--bg);
  border-radius: 20px;
  padding: 28px;
}

.exam-visual-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--muted);
  margin-bottom: 16px;
  opacity: 0.7;
}

.exam-subject {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
}
.exam-subject:last-child { border-bottom: none; }

.exam-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.exam-tool-tag {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

/* ── Testimonials ── */
.testimonials-section {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 40px 80px;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.testimonial-card {
  background: var(--card);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid var(--border);
  transition: transform 0.2s cubic-bezier(.16,1,.3,1), box-shadow 0.2s;
}

.testimonial-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.testimonial-stars {
  color: #F59E0B;
  font-size: 14px;
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.testimonial-text {
  font-family: Georgia, serif;
  font-size: 14px;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 16px;
  font-style: italic;
}

.testimonial-author {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

/* ── FAQ Section ── */
.faq-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 40px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}

.faq-q {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.45;
}

.faq-a {
  font-family: Georgia, serif;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.85;
}

/* ── Download CTA ── */
.download-cta {
  background: var(--text);
  color: #fff;
  text-align: center;
  padding: 100px 40px;
  position: relative;
  overflow: hidden;
}

.download-cta::before {
  content: '';
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(212,119,74,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.cta-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.08);
  padding: 5px 12px;
  border-radius: 16px;
  margin-bottom: 24px;
}

.download-cta h2 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 20px;
  color: #fff;
  position: relative;
}

.download-cta p {
  font-size: 17px;
  color: rgba(255,255,255,0.6);
  max-width: 440px;
  margin: 0 auto 40px;
  line-height: 1.65;
  position: relative;
}

.cta-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 14px 28px;
  border-radius: 16px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  transition: background 0.2s, transform 0.2s cubic-bezier(.16,1,.3,1);
}
.cta-badge:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-2px);
}

/* ── Hub Page — Lang Cards ── */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.lang-card {
  background: var(--card);
  border-radius: 20px;
  padding: 28px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: transform 0.2s cubic-bezier(.16,1,.3,1),
              box-shadow 0.2s,
              border-color 0.15s;
}

.lang-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.1);
  border-color: rgba(212,119,74,0.3);
}

.lang-flag { font-size: 40px; margin-bottom: 16px; display: block; }
.lang-title { font-size: 20px; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 6px; }
.lang-exam { font-size: 13px; color: var(--primary); font-weight: 600; margin-bottom: 10px; }
.lang-desc { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ── RTL Support ── */
[dir="rtl"] { direction: rtl; }
[dir="rtl"] .problem-inner { direction: rtl; }
[dir="rtl"] .exam-inner { direction: rtl; }
[dir="rtl"] .tools-grid { direction: rtl; }
[dir="rtl"] .store-badges { flex-direction: row-reverse; }
[dir="rtl"] .cta-badges { flex-direction: row-reverse; }
[dir="rtl"] .exam-list li { flex-direction: row-reverse; }
[dir="rtl"] .exam-list li::before { margin-left: 0; }
[dir="rtl"] .pain-item { flex-direction: row-reverse; }
[dir="rtl"] .solution-item { flex-direction: row-reverse; }
[dir="rtl"] .exam-section { border-left: none; border-right: 4px solid var(--primary); }
[dir="rtl"] .faq-q, [dir="rtl"] .faq-a { text-align: right; }
[dir="rtl"] .testimonial-text, [dir="rtl"] .testimonial-author { text-align: right; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .problem-inner { grid-template-columns: 1fr; gap: 40px; }
  .exam-inner { grid-template-columns: 1fr; gap: 32px; }
  .testimonials-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .blog-hero { padding: 60px 20px; min-height: auto; padding-top: 80px; }
  .blog-h1 { letter-spacing: -2px; }
  .section { padding: 56px 20px; }
  .problem-section { padding: 56px 20px; }
  .tools-section { padding: 56px 20px; }
  .exam-wrapper { padding: 0 20px 56px; }
  .exam-section { padding: 36px 24px; }
  .faq-section { padding: 56px 20px; }
  .testimonials-section { padding: 0 20px 56px; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .download-cta { padding: 64px 24px; }
  .stats-row { gap: 28px; }
  .phone-mockup { display: none; }
  .hub-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tool-card { padding: 16px; }
  .hub-grid { grid-template-columns: 1fr; }
  .stats-row { gap: 20px; }
  .stat-num { font-size: 28px; }
  .store-badges { flex-direction: column; align-items: center; }
  .cta-badges { flex-direction: column; align-items: center; }
}
