/*
Theme Name: TutorsGallery Theme
Theme URI: https://tutorsgallery.org
Author: TutorsGallery
Author URI: https://tutorsgallery.org
Description: A complete WordPress theme for tutoring and academic-support websites: order and quote forms with instant price estimates, tutor directory, subjects, services, packages, study guides, events, careers, order tracking, FAQ hub, free study tools, blog, dark mode, SEO schema and a one-click demo importer.
Version: 2.0.0
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tutorsgallery
Tags: education, blog, two-columns, custom-menu, featured-images, translation-ready, block-styles, wide-blocks, custom-colors, e-commerce
*/

/* ============================================================
   1. Design tokens (Tailwind-style)
   ============================================================ */
:root {
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --indigo-50:  #eef2ff;
  --indigo-100: #e0e7ff;
  --indigo-200: #c7d2fe;
  --indigo-400: #818cf8;
  --indigo-500: #6366f1;
  --indigo-600: #4f46e5;
  --indigo-700: #4338ca;
  --indigo-900: #312e81;
  --amber-100: #fef3c7;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --rose-500: #ef4444;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: var(--font-sans);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .1);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, .08), 0 10px 15px -3px rgba(15, 23, 42, .1);
  --shadow-lg: 0 10px 30px -5px rgba(15, 23, 42, .18);

  --surface: #fff;
  --ink: #0f172a;
  --ink-2: #1e293b;
  --container: 1200px;
  --header-h: 72px;
}

/* ============================================================
   2. Base / reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--slate-800);
  background: var(--slate-50);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5 { font-family: var(--font-heading); color: var(--slate-900); line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p  { margin: 0 0 1.1em; }
a { color: var(--indigo-600); text-decoration: none; }
a:hover, a:focus { color: var(--indigo-700); text-decoration: underline; }
:focus-visible { outline: 3px solid var(--amber-500); outline-offset: 2px; border-radius: 4px; }
ul, ol { padding-left: 1.3em; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .6rem .8rem; border-bottom: 1px solid var(--slate-200); text-align: left; }
blockquote { margin: 1.5em 0; padding: 1em 1.4em; border-left: 4px solid var(--amber-400); background: var(--amber-100); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
code { background: var(--slate-100); padding: .1em .4em; border-radius: 4px; font-size: .9em; }

/* Accessibility helpers */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -60px; left: 12px;
  background: var(--slate-900); color: #fff;
  padding: .6em 1.1em; border-radius: var(--radius-sm); z-index: 1000;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ============================================================
   3. Layout primitives
   ============================================================ */
.container { max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }
.section { padding: 4rem 0; }
.section--tint { background: var(--surface); }
.section--alt { background: var(--indigo-50); }
.section-head { max-width: 640px; margin: 0 auto 2.5rem; text-align: center; }
.section-head .eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--indigo-600); background: var(--indigo-100);
  padding: .3em .9em; border-radius: var(--radius-full); margin-bottom: .8rem;
}
.section-head p { color: var(--slate-600); font-size: 1.05rem; }
.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

/* ============================================================
   4. Buttons & badges
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-weight: 600; font-size: 1rem; line-height: 1.2;
  padding: .8em 1.6em; border-radius: var(--radius-full);
  border: 2px solid transparent; cursor: pointer;
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--primary { background: var(--indigo-600); color: #fff; }
.btn--primary:hover { background: var(--indigo-700); color: #fff; }
.btn--accent { background: var(--amber-400); color: var(--slate-900); }
.btn--accent:hover { background: var(--amber-500); color: var(--slate-900); }
.btn--ghost { background: transparent; border-color: var(--slate-300); color: var(--slate-800); }
.btn--ghost:hover { border-color: var(--indigo-500); color: var(--indigo-700); }
.btn--light { background: #fff; color: var(--indigo-700); }
.btn--sm { padding: .5em 1.1em; font-size: .9rem; }

.badge {
  display: inline-flex; align-items: center; gap: .35em;
  font-size: .75rem; font-weight: 700; letter-spacing: .03em;
  padding: .25em .75em; border-radius: var(--radius-full);
  background: var(--emerald-500); color: #fff;
}
.badge--amber { background: var(--amber-100); color: var(--amber-600); }
.badge--indigo { background: var(--indigo-100); color: var(--indigo-700); }

/* Stars */
.stars { color: var(--amber-500); letter-spacing: 2px; font-size: .95rem; }
.stars .star--empty { color: var(--slate-300); }

/* ============================================================
   5. Header & navigation
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 500;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--slate-200);
  min-height: var(--header-h);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }
.site-brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.2rem; color: var(--slate-900); }
.site-brand:hover { text-decoration: none; }
.site-brand__logo {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, var(--indigo-600), var(--indigo-400));
  display: grid; place-items: center; color: #fff; font-size: 1.1rem; font-weight: 800;
}
.site-brand__logo--img { background: none; }
.site-brand em { color: var(--amber-500); font-style: normal; }

.main-nav ul { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: .55em .9em; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .95rem; color: var(--slate-700);
}
.main-nav a:hover, .main-nav .current-menu-item > a { background: var(--indigo-50); color: var(--indigo-700); text-decoration: none; }
.nav-cta { display: flex; align-items: center; gap: .6rem; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm); padding: .5em .7em; cursor: pointer;
}
.nav-toggle__bars { display: block; width: 22px; height: 2px; background: var(--slate-800); position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: var(--slate-800);
}
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--slate-200);
    box-shadow: var(--shadow-lg); padding: 1rem 1.25rem 1.5rem;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: .2rem; }
  .main-nav a { padding: .8em 1em; }
  .nav-cta { display: none; }
}

/* ============================================================
   6. Hero
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(140deg, var(--slate-900) 0%, var(--indigo-900) 55%, var(--indigo-700) 100%);
  color: #fff; padding: 5.5rem 0 6rem;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 300px at 85% 10%, rgba(251,191,36,.18), transparent 70%),
    radial-gradient(500px 260px at 10% 90%, rgba(99,102,241,.35), transparent 70%);
}
.hero__inner { position: relative; z-index: 1; max-width: 720px; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  color: var(--amber-300); font-weight: 600; font-size: .85rem;
  padding: .4em 1em; border-radius: var(--radius-full); margin-bottom: 1.2rem;
}
.hero h1 { color: #fff; margin-bottom: .5em; }
.hero h1 em { color: var(--amber-400); font-style: normal; }
.hero__lede { color: var(--slate-200); font-size: 1.15rem; max-width: 60ch; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2.5rem; color: var(--slate-300); font-size: .9rem; }
.hero__trust strong { display: block; color: #fff; font-size: 1.4rem; }
@media (max-width: 620px) { .hero { padding: 3.5rem 0 4rem; } }

/* ============================================================
   7. Cards
   ============================================================ */
.card {
  background: var(--surface); border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg); padding: 1.6rem;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: .6rem;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__icon {
  width: 46px; height: 46px; border-radius: var(--radius-md); flex: none;
  background: var(--indigo-100); color: var(--indigo-700);
  display: grid; place-items: center; font-size: 1.3rem; font-weight: 800;
}
.card h3 { margin: 0; font-size: 1.15rem; }
.card p { color: var(--slate-600); font-size: .95rem; margin: 0; flex-grow: 1; }
.card__meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.card__footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--slate-100); padding-top: .9rem; }
.price { font-weight: 800; color: var(--indigo-700); font-size: 1.05rem; }
.price small { color: var(--slate-500); font-weight: 600; font-size: .78rem; }

/* Feature list */
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.feature-list li { display: flex; gap: .55em; align-items: flex-start; color: var(--slate-600); font-size: .93rem; }
.feature-list li::before { content: "✓"; color: var(--emerald-600); font-weight: 800; flex: none; }

/* ============================================================
   8. Live feed / ticker
   ============================================================ */
.live-feed {
  background: var(--slate-900); color: var(--slate-200);
  padding: .9rem 0; overflow: hidden;
}
.live-feed__inner { display: flex; align-items: center; gap: 1rem; }
.live-feed__label {
  display: inline-flex; align-items: center; gap: .5em; flex: none;
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: #fff;
}
.live-feed__dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--emerald-500);
  box-shadow: 0 0 0 0 rgba(16,185,129,.6); animation: tg-pulse 2s infinite;
}
@keyframes tg-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,.6); }
  70% { box-shadow: 0 0 0 10px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
.live-feed__track { position: relative; flex: 1; height: 1.5em; overflow: hidden; }
.live-feed__item {
  position: absolute; inset: 0; display: flex; align-items: center;
  font-size: .88rem; white-space: nowrap;
  opacity: 0; transform: translateY(100%);
  transition: transform .45s ease, opacity .45s ease;
}
.live-feed__item.is-active { opacity: 1; transform: translateY(0); }
.live-feed__item.is-leaving { opacity: 0; transform: translateY(-100%); }
.live-feed__item strong { color: var(--amber-300); font-weight: 700; }
.live-feed__time { color: var(--slate-400); font-size: .78rem; margin-left: .6em; }
.live-feed__disclosure { flex: none; font-size: .72rem; color: var(--slate-400); }
@media (max-width: 620px) { .live-feed__disclosure { display: none; } }

/* ============================================================
   9. FAQ accordion
   ============================================================ */
.faq-accordion { max-width: 780px; margin: 0 auto; display: grid; gap: .8rem; }
.faq-item {
  background: var(--surface); border: 1px solid var(--slate-200);
  border-radius: var(--radius-md); overflow: hidden;
}
.faq-item__btn {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; background: none; border: 0; cursor: pointer;
  padding: 1.1rem 1.3rem; text-align: left;
  font-weight: 700; font-size: 1.02rem; color: var(--slate-900); font-family: var(--font-sans);
}
.faq-item__btn:hover { background: var(--indigo-50); }
.faq-item__icon {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.1rem; font-weight: 700;
  background: var(--indigo-100); color: var(--indigo-700);
  transition: transform .25s ease;
}
.faq-item__btn[aria-expanded="true"] .faq-item__icon { transform: rotate(45deg); background: var(--amber-300); color: var(--slate-900); }
.faq-item__panel { padding: 0 1.3rem; }
.faq-item__panel[hidden] { display: none; }
.faq-item__panel-inner { padding: .2rem 0 1.2rem; color: var(--slate-600); }

/* ============================================================
   10. Calculators
   ============================================================ */
.calculator {
  background: var(--surface); border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg); padding: 1.8rem; box-shadow: var(--shadow-sm);
}
.calculator h3 { display: flex; align-items: center; gap: .6rem; }
.calculator__icon {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  background: var(--amber-100); display: grid; place-items: center; font-size: 1.15rem;
}
.field { display: grid; gap: .3rem; margin-bottom: 1rem; }
.field label { font-weight: 600; font-size: .88rem; color: var(--slate-700); }
.field input, .field select, .field textarea {
  font: inherit; padding: .65em .8em; border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm); background: var(--slate-50); color: var(--slate-800); width: 100%;
}
.field input:focus, .field select:focus { border-color: var(--indigo-500); background: var(--surface); }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 560px) { .field--row { grid-template-columns: 1fr; } }
.calc-result {
  margin-top: 1rem; padding: 1rem 1.2rem; border-radius: var(--radius-md);
  background: var(--indigo-50); border: 1px solid var(--indigo-100);
  color: var(--indigo-900); font-weight: 600; min-height: 3.2em;
}
.calc-result strong { display: block; font-size: 1.5rem; color: var(--indigo-700); }
.calc-result--muted { background: var(--slate-100); border-color: var(--slate-200); color: var(--slate-600); }
.grade-scale { font-size: .8rem; color: var(--slate-500); margin-top: .8rem; }

/* ============================================================
   11. Chat widget (floating)
   ============================================================ */
.chat-widget { position: fixed; right: 20px; bottom: 20px; z-index: 900; font-family: var(--font-sans); }
.chat-widget__launcher {
  width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--indigo-600), var(--indigo-400));
  color: #fff; font-size: 1.6rem; display: grid; place-items: center;
  box-shadow: var(--shadow-lg); transition: transform .15s ease;
}
.chat-widget__launcher:hover { transform: scale(1.07); }
.chat-widget__launcher .chat-widget__badge {
  position: absolute; top: -2px; right: -2px; min-width: 22px; height: 22px;
  border-radius: var(--radius-full); background: var(--rose-500); color: #fff;
  font-size: .72rem; font-weight: 800; display: grid; place-items: center; padding: 0 5px;
}
.chat-widget__launcher { position: relative; }
.chat-widget__panel {
  position: absolute; bottom: 76px; right: 0;
  width: min(340px, calc(100vw - 40px));
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); border: 1px solid var(--slate-200);
  padding: 1.2rem; display: none;
}
.chat-widget__panel.is-open { display: block; animation: tg-pop .2s ease; }
@keyframes tg-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.chat-widget__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.chat-widget__head strong { font-size: 1rem; color: var(--slate-900); }
.chat-widget__close {
  background: var(--slate-100); border: 0; border-radius: 50%;
  width: 30px; height: 30px; cursor: pointer; font-size: 1rem; color: var(--slate-600);
}
.chat-widget__close:hover { background: var(--slate-200); }
.chat-channel {
  display: flex; align-items: center; gap: .8rem; width: 100%;
  background: var(--slate-50); border: 1px solid var(--slate-200);
  border-radius: var(--radius-md); padding: .8rem 1rem; margin-bottom: .6rem;
  cursor: pointer; font: inherit; text-align: left; text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.chat-channel:hover, .chat-channel:focus { border-color: var(--indigo-500); background: var(--indigo-50); text-decoration: none; }
.chat-channel__icon { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 1.15rem; color: #fff; }
.chat-channel__icon--wa { background: #25d366; }
.chat-channel__icon--chat { background: var(--indigo-500); }
.chat-channel__icon--desk { background: var(--amber-500); }
.chat-channel strong { display: block; font-size: .92rem; color: var(--slate-900); }
.chat-channel span { font-size: .8rem; color: var(--slate-500); }
.chat-widget__note { font-size: .74rem; color: var(--slate-500); margin: .6rem 0 0; }

/* ============================================================
   12. CTA banner
   ============================================================ */
.cta-banner {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--indigo-700), var(--indigo-500));
  color: #fff; border-radius: var(--radius-lg);
  padding: 3rem 2.5rem; text-align: center;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: var(--indigo-100); max-width: 560px; margin-inline: auto; }
.cta-banner__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: 1.6rem; }

/* ============================================================
   13. Misc blocks (breadcrumbs, tutors, samples, reviews)
   ============================================================ */
.breadcrumbs { font-size: .85rem; color: var(--slate-500); padding: 1rem 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: .35rem; color: var(--slate-300); }
.breadcrumbs a { color: var(--slate-600); }

.tutor-card { text-align: center; }
.tutor-card__avatar {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto .6rem;
  background: linear-gradient(135deg, var(--indigo-200), var(--indigo-400));
  color: var(--indigo-900); display: grid; place-items: center;
  font-size: 1.7rem; font-weight: 800; overflow: hidden;
}
.tutor-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.tutor-card__creds { font-size: .82rem; color: var(--slate-500); }

.sample-card__meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.sample-card__excerpt { font-size: .9rem; color: var(--slate-600); font-style: italic; }
.sample-card__feedback {
  font-size: .82rem; background: var(--slate-100); border-left: 3px solid var(--emerald-500);
  padding: .5rem .8rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.review-card__text { font-size: .95rem; color: var(--slate-700); }
.review-card__author { font-size: .85rem; color: var(--slate-500); }
.rating-summary { display: flex; align-items: center; gap: 1rem; justify-content: center; margin-bottom: 2rem; }
.rating-summary__score { font-size: 3rem; font-weight: 800; color: var(--indigo-700); line-height: 1; }

.state-programs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.state-programs a {
  display: block; background: var(--surface); border: 1px solid var(--slate-200);
  border-radius: var(--radius-md); padding: 1rem 1.2rem; font-weight: 600; color: var(--slate-800);
}
.state-programs a:hover { border-color: var(--indigo-500); color: var(--indigo-700); text-decoration: none; }

/* ============================================================
   14. Content / single / archive
   ============================================================ */
.page-hero { background: var(--surface); border-bottom: 1px solid var(--slate-200); padding: 3rem 0 2rem; }
.page-hero p { color: var(--slate-600); max-width: 640px; }
.entry-content { max-width: 760px; margin: 2.5rem auto; }
.entry-content > * { margin-bottom: 1.2em; }
.post-navigation, .pagination { margin: 2.5rem 0; }
.pagination .nav-links { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; }
.pagination .page-numbers {
  display: inline-grid; place-items: center; min-width: 40px; height: 40px;
  padding: 0 .6em; border: 1px solid var(--slate-200); border-radius: var(--radius-sm);
  color: var(--slate-700); font-weight: 600;
}
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--indigo-600); border-color: var(--indigo-600); color: #fff; text-decoration: none; }

.error-404 { text-align: center; padding: 5rem 1rem; }
.error-404 h1 { font-size: clamp(3rem, 8vw, 6rem); color: var(--indigo-200); margin-bottom: 0; }
.search-form { display: flex; gap: .5rem; max-width: 480px; margin: 1.5rem auto 0; }
.search-form input[type="search"] { flex: 1; padding: .7em 1em; border: 1px solid var(--slate-300); border-radius: var(--radius-full); font: inherit; }
.search-form button { border-radius: var(--radius-full); border: 0; background: var(--indigo-600); color: #fff; padding: .7em 1.3em; font-weight: 600; cursor: pointer; }

/* ============================================================
   15. Footer
   ============================================================ */
.site-footer { background: var(--slate-900); color: var(--slate-300); margin-top: 4rem; }
.site-footer a { color: var(--slate-300); }
.site-footer a:hover { color: var(--amber-300); }
.site-footer__top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; padding: 3.5rem 0 2.5rem; }
@media (max-width: 900px) { .site-footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__top { grid-template-columns: 1fr; } }
.site-footer h2, .site-footer h3 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 1rem; }
.site-footer__about p { font-size: .92rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .92rem; }
.site-footer__bottom { border-top: 1px solid var(--slate-800); padding: 1.4rem 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .82rem; color: var(--slate-400); }
.site-footer .widget-title { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 1rem; }
.footer-disclaimer { font-size: .78rem; color: var(--slate-500); background: var(--slate-900); border-top: 1px solid var(--slate-800); padding: 0 0 1.5rem; }

/* ============================================================
   16. Post page enhancements (v1.1.0)
   ============================================================ */

/* Reading progress bar */
.tg-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 4px;
  z-index: 1200; pointer-events: none; background: transparent;
}
.tg-progress__bar {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--amber-400), var(--indigo-500));
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

/* Hero two-column media layout */
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; }
.hero__media img {
  border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 30px 60px -15px rgba(0,0,0,.55);
  transform: rotate(1.5deg);
  animation: tg-float 7s ease-in-out infinite;
}
@keyframes tg-float { 0%, 100% { transform: rotate(1.5deg) translateY(0); } 50% { transform: rotate(1.5deg) translateY(-10px); } }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { max-width: 520px; margin: 1rem auto 0; }
}

/* Post hero meta row + featured image */
.post-hero__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  font-size: .85rem; color: var(--slate-500); margin-bottom: .8rem;
}
.post-hero__meta span[aria-hidden] { color: var(--slate-300); }
.post-hero__cat {
  font-weight: 700; color: var(--indigo-700);
  background: var(--indigo-100); padding: .2em .8em; border-radius: var(--radius-full);
}
.post-hero__cat:hover { text-decoration: none; background: var(--indigo-200); }
.post-read-time { white-space: nowrap; }
.post-featured {
  margin: 2rem 0 0; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-md); border: 1px solid var(--slate-200);
}
.post-featured img { width: 100%; }

/* Card thumbnails with placeholder fallback */
.entry-thumb {
  width: 100%; aspect-ratio: 2 / 1; object-fit: cover;
  border-radius: 12px; margin-bottom: .8rem;
}

/* Table of contents */
.post-toc { max-width: 760px; margin: 2.5rem auto 0; padding: 1.2rem 1.5rem; }
.post-toc__toggle {
  display: flex; width: 100%; justify-content: space-between; align-items: center;
  background: none; border: 0; cursor: pointer; font: inherit; padding: 0;
  color: var(--slate-900);
}
.post-toc__chevron { transition: transform .2s ease; color: var(--indigo-600); }
.post-toc__toggle[aria-expanded="false"] .post-toc__chevron { transform: rotate(-90deg); }
.post-toc__list { margin: .8rem 0 0; padding-left: 1.2em; display: grid; gap: .35rem; font-size: .95rem; }
.post-toc__list[hidden] { display: none; }
.post-toc__item--h3 { margin-left: 1.1em; }
.post-toc__list a { color: var(--slate-600); }
.post-toc__list a:hover, .post-toc__list a.is-current { color: var(--indigo-700); font-weight: 600; text-decoration: none; }

/* Share row */
.post-extras { max-width: 760px; margin: 2.5rem auto 0; display: grid; gap: 1rem; }
.post-share { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.post-share__label { font-weight: 600; font-size: .85rem; color: var(--slate-500); margin-right: .3rem; }
.post-share__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35em;
  min-width: 38px; height: 38px; padding: 0 .6em;
  border-radius: var(--radius-full); border: 1px solid var(--slate-200);
  background: var(--surface); color: var(--slate-700); font-weight: 700; cursor: pointer;
  font-size: .95rem; transition: border-color .15s ease, transform .15s ease, color .15s ease;
}
.post-share__btn:hover { border-color: var(--indigo-500); color: var(--indigo-700); transform: translateY(-2px); text-decoration: none; }
.post-share__btn--copy { font-size: .85rem; }
.post-share__btn--copy.is-copied { border-color: var(--emerald-500); color: var(--emerald-600); background: #ecfdf5; }

/* Reactions */
.post-reactions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.post-reactions__label { font-weight: 600; font-size: .85rem; color: var(--slate-500); }
.post-reactions__btn {
  display: inline-flex; align-items: center; gap: .4em;
  border: 1px solid var(--slate-200); background: var(--surface); border-radius: var(--radius-full);
  padding: .45em 1em; cursor: pointer; font: inherit; font-size: .88rem;
  font-weight: 600; color: var(--slate-700);
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.post-reactions__btn:hover { border-color: var(--indigo-500); transform: translateY(-2px); }
.post-reactions__btn.is-active { border-color: var(--indigo-500); background: var(--indigo-50); color: var(--indigo-700); }
.post-reactions__emoji { font-size: 1.05rem; }
.post-reactions__count {
  background: var(--slate-100); border-radius: var(--radius-full);
  padding: .05em .5em; font-size: .78rem; color: var(--slate-500);
}
.post-reactions__btn.is-active .post-reactions__count { background: var(--indigo-100); color: var(--indigo-700); }
.post-reactions__thanks { font-size: .85rem; color: var(--emerald-600); font-weight: 600; }

/* Back to top */
.back-to-top {
  position: fixed; left: 20px; bottom: 20px; z-index: 860;
  width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: var(--slate-900); color: #fff; font-size: 1.2rem; cursor: pointer;
  box-shadow: var(--shadow-lg); transition: background .2s ease, transform .2s ease;
}
.back-to-top:hover { background: var(--indigo-600); transform: translateY(-3px); }

/* Sticky mini CTA bar */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 850;
  background: rgba(15,23,42,.97); border-top: 2px solid var(--indigo-600);
  box-shadow: 0 -8px 24px rgba(15,23,42,.3); padding: .6rem 0;
  animation: tg-slide-up .3s ease;
}
@keyframes tg-slide-up { from { transform: translateY(100%); } to { transform: none; } }
.sticky-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.sticky-cta__title {
  color: #fff; font-weight: 600; font-size: .9rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sticky-cta__actions { display: flex; gap: .5rem; flex: none; }
body.has-sticky-cta .chat-widget { bottom: 84px; }
body.has-sticky-cta .back-to-top { bottom: 84px; }
@media (max-width: 560px) {
  .sticky-cta__title { display: none; }
  .sticky-cta__inner { justify-content: center; }
}

/* Post CTA block (Purchase Solution / Custom Written Paper) */
.post-cta { max-width: var(--container); margin: 3rem auto 0; padding-inline: 1.25rem; }
.post-cta__card {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--slate-900) 0%, var(--indigo-900) 60%, var(--indigo-700) 100%);
  color: #fff; border-radius: var(--radius-lg);
  padding: 2.5rem; display: grid; grid-template-columns: 1.1fr .55fr; gap: 2rem;
}
.post-cta__card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px 220px at 90% 15%, rgba(251,191,36,.15), transparent 70%);
}
.post-cta__card h2 { color: #fff; }
.post-cta__body p { color: var(--indigo-100); }
.post-cta__list li { color: var(--slate-200); }
.post-cta__media { position: relative; z-index: 1; align-self: center; }
.post-cta__media img { border-radius: var(--radius-md); box-shadow: var(--shadow-lg); }
.post-cta__actions { position: relative; z-index: 1; grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; }
.post-cta__btn { font-size: 1.05rem; padding: .9em 1.8em; }
.post-cta__micro { width: 100%; margin: 0; font-size: .8rem; color: var(--slate-400); }
@media (max-width: 820px) {
  .post-cta__card { grid-template-columns: 1fr; padding: 1.8rem; }
  .post-cta__media { max-width: 300px; margin-inline: auto; }
}

/* Compact CTA pair on archive cards */
.card-cta {
  display: flex; flex-wrap: wrap; gap: .5rem;
  padding-top: .9rem; border-top: 1px dashed var(--slate-200);
}
.card-cta .btn { flex: 1; justify-content: center; text-align: center; }

/* Scroll reveal */
.tg-js .tg-reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.tg-js .tg-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .tg-js .tg-reveal { opacity: 1; transform: none; } .hero__media img { animation: none; } }

/* Related posts */
.related-posts { margin-top: 3rem; }
.related-posts .card__footer { justify-content: space-between; font-size: .8rem; color: var(--slate-500); }

/* 404 astronaut */
.error-404__img { width: min(340px, 72vw); margin: 0 auto 1.5rem; border-radius: var(--radius-lg); }

/* Lightbox */
.tg-lightbox {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(15,23,42,.93);
  display: grid; place-items: center; padding: 2rem;
}
.tg-lightbox[hidden] { display: none; }
.tg-lightbox img {
  max-width: min(1100px, 94vw); max-height: 88vh;
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
}
.tg-lightbox__close {
  position: absolute; top: 1.2rem; right: 1.4rem;
  width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.14); color: #fff; font-size: 1.1rem; cursor: pointer;
}
.tg-lightbox__close:hover { background: var(--rose-500); }


/* ============================================================
   Dark mode — inverts the neutral scale; intentionally dark
   sections re-declare the light scale so their text stays legible.
   ============================================================ */
:root[data-theme="dark"] {
  color-scheme: dark;
  --slate-50:  #0b1120;
  --slate-100: #111a2e;
  --slate-200: #1f2a44;
  --slate-300: #33415f;
  --slate-400: #64748b;
  --slate-500: #94a3b8;
  --slate-600: #a9b7cc;
  --slate-700: #cbd5e1;
  --slate-800: #e2e8f0;
  --slate-900: #f8fafc;
  --indigo-50:  #15163a;
  --indigo-100: #1f2155;
  --indigo-200: #34388a;
  --amber-100: #3a2c0b;
  --surface: #121b31;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 6px 16px rgba(0,0,0,.45);
  --shadow-lg: 0 14px 34px rgba(0,0,0,.55);
}
:root[data-theme="dark"] a:not(.btn):not(.site-brand):not(.chat-channel):not(.chip) { color: #a5b4fc; }
:root[data-theme="dark"] a:not(.btn):hover { color: #c7d2fe; }
:root[data-theme="dark"] .btn--ghost { color: var(--slate-800); }
:root[data-theme="dark"] .hero,
:root[data-theme="dark"] .live-feed,
:root[data-theme="dark"] .site-footer,
:root[data-theme="dark"] .cta-banner,
:root[data-theme="dark"] .post-cta__card,
:root[data-theme="dark"] .sticky-cta,
:root[data-theme="dark"] .announcement,
:root[data-theme="dark"] .stats-band,
:root[data-theme="dark"] .footer-newsletter,
:root[data-theme="dark"] .mobile-bar__primary,
:root[data-theme="dark"] .tg-lightbox {
  --slate-50:  #f8fafc; --slate-100: #f1f5f9; --slate-200: #e2e8f0; --slate-300: #cbd5e1;
  --slate-400: #94a3b8; --slate-500: #64748b; --slate-600: #475569; --slate-700: #334155;
  --slate-800: #1e293b; --slate-900: #0f172a;
  --indigo-50: #eef2ff; --indigo-100: #e0e7ff;
}
:root[data-theme="dark"] .site-footer a:not(.btn) { color: #cbd5e1; }
:root[data-theme="dark"] .site-footer a:not(.btn):hover { color: #fff; }
:root[data-theme="dark"] .cta-banner a.btn--accent,
:root[data-theme="dark"] .hero a.btn--accent { color: #0f172a; }
