/**
 * PROMPT 211 — IELTS SEO Knowledge Hub (premium education style)
 * RTL-first · light assets · no heavy libraries
 */
:root {
  --ik-purple: #7c3aed;
  --ik-blue: #2563eb;
  --ik-teal: #0d9488;
  --ik-ink: #0f172a;
  --ik-muted: #64748b;
  --ik-bg: #f8fafc;
  --ik-card: #ffffff;
  --ik-border: #e2e8f0;
  --ik-radius: 18px;
  --ik-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
  --ik-shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body.ik-page {
  margin: 0;
  font-family: 'Vazirmatn', Vazir, Tahoma, system-ui, sans-serif;
  background: var(--ik-bg);
  color: var(--ik-ink);
  direction: rtl;
  line-height: 1.7;
  overflow-x: hidden;
}

.ik-skip {
  position: absolute;
  right: -999px;
  top: 0;
  background: #0f172a;
  color: #fff;
  padding: 8px 12px;
  z-index: 100;
}
.ik-skip:focus {
  right: 8px;
}

/* Top bar */
.ik-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ik-border);
}
.ik-nav__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.75rem 1.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ik-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ik-ink);
  font-weight: 900;
  font-size: 0.95rem;
}
.ik-brand span {
  color: var(--ik-purple);
}
.ik-nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}
.ik-nav__links a {
  text-decoration: none;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
}
.ik-nav__links a:hover,
.ik-nav__links a.is-active {
  background: #f5f3ff;
  color: #5b21b6;
}
.ik-nav__cta {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #fff !important;
  font-weight: 800 !important;
  text-decoration: none;
  font-size: 0.8rem !important;
}

/* Breadcrumb */
.ik-bc {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.85rem 1.15rem 0;
  font-size: 0.78rem;
  color: var(--ik-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.ik-bc a {
  color: #475569;
  text-decoration: none;
  font-weight: 700;
}
.ik-bc a:hover {
  color: var(--ik-purple);
}
.ik-bc__sep {
  opacity: 0.5;
}

/* Hero */
.ik-hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.25rem 1.15rem 1.75rem;
}
.ik-hero__card {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 45%, #4c1d95 100%);
  color: #f8fafc;
  border-radius: 24px;
  padding: clamp(1.4rem, 4vw, 2.25rem);
  box-shadow: 0 18px 44px rgba(49, 46, 129, 0.28);
  position: relative;
  overflow: hidden;
}
.ik-hero__card::after {
  content: '';
  position: absolute;
  inset: auto -40px -40px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.28), transparent 70%);
  pointer-events: none;
}
.ik-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  margin-bottom: 0.75rem;
}
.ik-hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.45rem, 3.8vw, 2.15rem);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -0.02em;
  max-width: 40rem;
}
.ik-hero__lead {
  margin: 0 0 1.15rem;
  font-size: 0.95rem;
  opacity: 0.92;
  line-height: 1.7;
  max-width: 38rem;
}
.ik-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.ik-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 1.2rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.ik-btn:hover {
  transform: translateY(-1px);
}
.ik-btn--primary {
  background: #fff;
  color: #5b21b6;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
}
.ik-btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.ik-btn--solid {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #fff;
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.3);
}
.ik-btn--outline {
  background: #fff;
  color: #334155;
  border: 1px solid var(--ik-border);
}

/* Layout */
.ik-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.15rem 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 960px) {
  .ik-main {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
  }
}
.ik-content {
  min-width: 0;
}
.ik-aside {
  min-width: 0;
}
@media (min-width: 960px) {
  .ik-aside {
    position: sticky;
    top: 72px;
  }
}

/* Content sections — RAG-friendly clear headings */
.ik-section {
  background: var(--ik-card);
  border: 1px solid var(--ik-border);
  border-radius: var(--ik-radius);
  padding: 1.25rem 1.3rem;
  box-shadow: var(--ik-shadow);
  margin-bottom: 1rem;
}
.ik-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #0f172a;
  scroll-margin-top: 80px;
}
.ik-section h3 {
  margin: 1rem 0 0.45rem;
  font-size: 0.98rem;
  font-weight: 800;
  color: #1e293b;
  scroll-margin-top: 80px;
}
.ik-section p {
  margin: 0 0 0.75rem;
  color: #334155;
  font-size: 0.92rem;
}
.ik-section ul,
.ik-section ol {
  margin: 0 0 0.85rem;
  padding: 0 1.2rem 0 0;
  color: #334155;
  font-size: 0.9rem;
}
.ik-section li {
  margin-bottom: 0.4rem;
}
.ik-def {
  border-right: 3px solid var(--ik-purple);
  background: #faf5ff;
  border-radius: 0 12px 12px 0;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
  font-size: 0.88rem;
  color: #334155;
}
.ik-def strong {
  color: #5b21b6;
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.82rem;
}
.ik-example {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
  font-size: 0.86rem;
  color: #475569;
}
.ik-example strong {
  display: block;
  color: #0f172a;
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
}

/* Cards grid */
.ik-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0.75rem 0;
}
@media (min-width: 640px) {
  .ik-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ik-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 900px) {
  .ik-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.ik-card {
  background: #f8fafc;
  border: 1px solid var(--ik-border);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
a.ik-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ik-shadow-lg);
  border-color: #c7d2fe;
}
.ik-card__ico {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}
.ik-card h3 {
  margin: 0 0 0.3rem !important;
  font-size: 0.92rem !important;
}
.ik-card p {
  margin: 0 !important;
  font-size: 0.8rem !important;
  color: var(--ik-muted) !important;
  line-height: 1.55;
}

/* Band table */
.ik-table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0;
  border-radius: 12px;
  border: 1px solid var(--ik-border);
}
.ik-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  min-width: 420px;
}
.ik-table th,
.ik-table td {
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid #f1f5f9;
  text-align: right;
}
.ik-table th {
  background: #f8fafc;
  font-weight: 800;
  color: #475569;
  font-size: 0.75rem;
}
.ik-table tr:last-child td {
  border-bottom: none;
}
.ik-ltr {
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}

/* FAQ accordion */
.ik-faq details {
  border: 1px solid var(--ik-border);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 8px;
  padding: 0.15rem 0.85rem;
}
.ik-faq summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.75rem 0;
  list-style: none;
  color: #0f172a;
}
.ik-faq summary::-webkit-details-marker {
  display: none;
}
.ik-faq summary::before {
  content: '+';
  display: inline-block;
  width: 1.2rem;
  color: var(--ik-purple);
  font-weight: 900;
}
.ik-faq details[open] summary::before {
  content: '−';
}
.ik-faq details[open] summary {
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 0.5rem;
}
.ik-faq .ik-faq__a {
  padding: 0 0 0.85rem;
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.65;
}

/* CTA blocks */
.ik-cta {
  background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 50%, #fff 100%);
  border: 1px solid #ddd6fe;
  border-radius: var(--ik-radius);
  padding: 1.25rem 1.3rem;
  margin: 1rem 0;
  text-align: center;
}
.ik-cta h2,
.ik-cta h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 900;
}
.ik-cta p {
  margin: 0 0 0.9rem;
  color: var(--ik-muted);
  font-size: 0.88rem;
}
.ik-cta__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* Aside TOC + related */
.ik-side-card {
  background: #fff;
  border: 1px solid var(--ik-border);
  border-radius: var(--ik-radius);
  padding: 1rem;
  box-shadow: var(--ik-shadow);
  margin-bottom: 0.85rem;
}
.ik-side-card h2 {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 900;
}
.ik-toc {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ik-toc a {
  display: block;
  padding: 0.4rem 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
}
.ik-toc a:hover {
  color: var(--ik-purple);
}
.ik-related a {
  display: block;
  padding: 0.45rem 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  text-decoration: none;
}
.ik-related a:hover {
  color: var(--ik-purple);
}

/* Hub chips */
.ik-hub-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0.5rem 0 1rem;
}
.ik-hub-nav a {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--ik-border);
  text-decoration: none;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
}
.ik-hub-nav a.is-active {
  background: #f5f3ff;
  border-color: #c4b5fd;
  color: #5b21b6;
}

/* Footer */
.ik-footer {
  border-top: 1px solid var(--ik-border);
  background: #fff;
  padding: 1.5rem 1.15rem 2rem;
  margin-top: 1rem;
}
.ik-footer__inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--ik-muted);
}
.ik-footer a {
  color: #475569;
  text-decoration: none;
  font-weight: 700;
  margin-left: 10px;
}
.ik-footer a:hover {
  color: var(--ik-purple);
}

/* EN foundation */
html[lang='en'] body.ik-page,
body.ik-page[data-locale='en-US'] {
  direction: ltr;
}
html[lang='en'] .ik-section ul,
html[lang='en'] .ik-section ol,
body.ik-page[data-locale='en-US'] .ik-section ul,
body.ik-page[data-locale='en-US'] .ik-section ol {
  padding: 0 0 0 1.2rem;
}
html[lang='en'] .ik-def,
body.ik-page[data-locale='en-US'] .ik-def {
  border-right: none;
  border-left: 3px solid var(--ik-purple);
  border-radius: 12px 0 0 12px;
}

/* RAG machine-readable markers (visible structure only) */
[data-knowledge] {
  /* semantic hooks for future crawlers/indexers */
}

@media (max-width: 640px) {
  .ik-nav__links a:not(.ik-nav__cta) {
    display: none;
  }
  .ik-hero__actions {
    flex-direction: column;
  }
  .ik-btn {
    width: 100%;
  }
}
