/* ============================================================
   TEMPLATE-DARK.CSS — AI Digital Guides Theme v2.7.9
   Dark palette — applied on :root, ALWAYS loaded.
   No body class or data-theme needed.
   Loads LAST in CSS stack to win all specificity.
   ============================================================ */

:root {
  /* ── BACKGROUNDS ─────────────────────────── */
  --bg:            #0d0d1a;
  --bg-2:          #111128;
  --card:          #1a1a35;
  --card-2:        #1e1e3a;

  /* ── TEXT ───────────────────────────────── */
  --text:          #f1f0ff;
  --text-muted:    #8b8aad;
  --text-dim:      #5a5980;

  /* ── BRAND ACCENTS ──────────────────────── */
  --purple:        #4f46e5;
  --purple-light:  #818cf8;
  --magenta:       #06b6d4;
  --cyan:          #22d3ee;
  --yellow:        #facc15;
  --orange:        #f97316;
  --green:         #4ade80;
  --red:           #f87171;

  /* ── BORDERS ────────────────────────────── */
  --border:        rgba(255,255,255,0.07);
  --border-hover:  rgba(79,70,229,0.4);

  /* ── GLOWS ──────────────────────────────── */
  --glow-p:        rgba(79,70,229,0.25);
  --glow-m:        rgba(6,182,212,0.20);
  --glow-s:        rgba(79,70,229,0.10);

  /* ── GRADIENTS ──────────────────────────── */
  --grad-hero:     linear-gradient(135deg, #4f46e5 0%, #818cf8 50%, #06b6d4 100%);
  --grad-text:     linear-gradient(135deg, #818cf8 0%, #4f46e5 50%, #06b6d4 100%);
  --grad-card:     linear-gradient(135deg, rgba(79,70,229,0.12), rgba(6,182,212,0.06));
  --grad-btn:      linear-gradient(135deg, #4f46e5, #06b6d4);
  --grad-btn-hover:linear-gradient(135deg, #3730a3, #0891b2);

  /* ── SHADOWS ────────────────────────────── */
  --shadow-card:   0 4px 24px rgba(0,0,0,0.4);
  --shadow-hover:  0 12px 48px rgba(79,70,229,0.3);
  --shadow-glow:   0 0 32px rgba(79,70,229,0.35);

  /* ── NAV ────────────────────────────────── */
  --nav-bg:        rgba(13,13,26,0.92);
  --nav-h:         68px;
}

/* ============================================================
   BLUE GRADIENT SYSTEM — Applied site-wide
   Adds ambient glows, gradient accents, and blue-indigo-cyan
   treatment consistently across every page.
   ============================================================ */

/* ── AMBIENT PAGE BACKGROUND ──────────────────────────────── */
body {
  background: var(--bg);
  /* Subtle blue radial glow in top-right corner — visible on all pages */
  background-image:
    radial-gradient(ellipse 80% 50% at 80% -10%, rgba(79,70,229,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at -10% 40%, rgba(6,182,212,0.07) 0%, transparent 55%);
}

/* ── EVERY SECTION HERO / PAGE HERO ──────────────────────── */
.page-hero--blog,
.page-hero--tools,
.cat-page-hero,
.post-hero,
.page-wrap {
  position: relative;
  overflow: hidden;
}

/* Blue glow orb — top left of every hero */
.page-hero--blog::before,
.page-hero--tools::before,
.cat-page-hero::before,
.post-hero::before {
  content: '';
  position: absolute;
  top: -80px; left: -80px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(79,70,229,0.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: aidg-orb-pulse 8s ease-in-out infinite;
}

/* Cyan glow orb — bottom right */
.page-hero--blog::after,
.page-hero--tools::after,
.cat-page-hero::after,
.post-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; right: -60px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(6,182,212,0.12) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  animation: aidg-orb-pulse 10s ease-in-out infinite reverse;
}

/* Keep hero content above orbs */
.page-hero--blog .container,
.page-hero--tools .container,
.cat-page-hero .container,
.post-hero .container { position: relative; z-index: 1; }

/* ── HERO BACKGROUNDS ─────────────────────────────────────── */
.page-hero--blog {
  background:
    radial-gradient(ellipse 70% 60% at 15% 50%, rgba(79,70,229,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 20%, rgba(6,182,212,0.08) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
}

.page-hero--tools {
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(79,70,229,0.12) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 90% 10%, rgba(6,182,212,0.09) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
}

.cat-page-hero {
  background:
    radial-gradient(ellipse 60% 80% at 0% 50%, rgba(79,70,229,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 100% 0%, rgba(6,182,212,0.08) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
}

.post-hero {
  background:
    radial-gradient(ellipse 60% 100% at 5% 0%, rgba(79,70,229,0.10) 0%, transparent 55%),
    radial-gradient(ellipse 40% 60% at 95% 0%, rgba(6,182,212,0.07) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
}

/* ── BLOG PAGE: featured post + category tabs ─────────────── */
.featured-post-section,
.blog-main-wrap {
  position: relative;
}
.featured-post-section::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(79,70,229,0.4), rgba(6,182,212,0.4), transparent);
  pointer-events: none;
}

/* Featured post card — blue gradient border glow */
.featured-post {
  background:
    linear-gradient(135deg, rgba(79,70,229,0.08), rgba(6,182,212,0.04)) !important;
  border: 1px solid rgba(79,70,229,0.2) !important;
  transition: border-color 0.3s, box-shadow 0.3s !important;
}
.featured-post:hover {
  border-color: rgba(79,70,229,0.45) !important;
  box-shadow: 0 20px 60px rgba(79,70,229,0.15), 0 0 0 1px rgba(6,182,212,0.1) !important;
}

/* Blog cards — consistent blue glow on hover */
.blog-card, .blog-card-home, .post-card {
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s !important;
}
.blog-card:hover, .blog-card-home:hover, .post-card:hover {
  border-color: rgba(79,70,229,0.4) !important;
  box-shadow: 0 12px 40px rgba(79,70,229,0.14), 0 0 0 1px rgba(6,182,212,0.08) !important;
  transform: translateY(-3px) !important;
}

/* Category filter tabs — blue active state */
.cat-btn.active, .ftab.active, .cftab.active {
  background: linear-gradient(135deg, rgba(79,70,229,0.25), rgba(6,182,212,0.15)) !important;
  border-color: rgba(79,70,229,0.5) !important;
  color: #f1f0ff !important;
  box-shadow: 0 0 16px rgba(79,70,229,0.2) !important;
}

/* ── AI TOOLS PAGE ────────────────────────────────────────── */
/* Search bar — blue glow on focus */
#toolSearch:focus, #catSearch:focus {
  outline: none;
  border-color: rgba(79,70,229,0.5) !important;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12), 0 0 20px rgba(79,70,229,0.12) !important;
}
.tools-search-bar-wrap:focus-within {
  border-color: rgba(79,70,229,0.5) !important;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.10), 0 0 24px rgba(79,70,229,0.10) !important;
}
.tools-search-bar-wrap-wrap:focus-within {
  border-color: rgba(79,70,229,0.5) !important;
}

/* Tool section headers — blue-cyan gradient line */
.tool-section-header {
  border-bottom: 1px solid transparent !important;
  background: linear-gradient(var(--bg), var(--bg)) padding-box,
              linear-gradient(90deg, rgba(79,70,229,0.4), rgba(6,182,212,0.2), transparent) border-box !important;
}

/* Tool cards — blue glow on hover */
.tool-card-item:hover {
  border-color: rgba(79,70,229,0.45) !important;
  box-shadow: 0 12px 40px rgba(79,70,229,0.16), 0 0 0 1px rgba(6,182,212,0.08) !important;
}

/* Category overview cards — blue glow */
.cat-overview-card:hover {
  border-color: rgba(79,70,229,0.5) !important;
  box-shadow: 0 8px 28px rgba(79,70,229,0.14) !important;
}

/* View All buttons — blue gradient */
.ts-view-all, .ts-view-all-btn {
  background: linear-gradient(135deg, rgba(79,70,229,0.12), rgba(6,182,212,0.06)) !important;
  border-color: rgba(79,70,229,0.3) !important;
  color: #818cf8 !important;
}
.ts-view-all:hover, .ts-view-all-btn:hover {
  background: linear-gradient(135deg, rgba(79,70,229,0.25), rgba(6,182,212,0.12)) !important;
  border-color: rgba(79,70,229,0.55) !important;
  color: #f1f0ff !important;
  box-shadow: 0 0 20px rgba(79,70,229,0.2) !important;
}

/* Visit button — blue-cyan gradient */
.tool-card-link {
  background: linear-gradient(135deg, rgba(79,70,229,0.15), rgba(6,182,212,0.08)) !important;
  border-color: rgba(79,70,229,0.3) !important;
  color: #818cf8 !important;
}
.tool-card-link:hover {
  background: linear-gradient(135deg, rgba(79,70,229,0.28), rgba(6,182,212,0.14)) !important;
  border-color: rgba(79,70,229,0.55) !important;
  color: #f1f0ff !important;
  box-shadow: 0 4px 16px rgba(79,70,229,0.2) !important;
}

/* ── SECTION DIVIDERS (between every major section) ────────── */
.tools-cats-overview,
.cat-page-controls,
.featured-post-section,
.blog-main-wrap > .container {
  position: relative;
}

/* Top-edge gradient line on key sections */
.tools-main-wrap::before,
.blog-main-wrap::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(79,70,229,0.3) 30%, rgba(6,182,212,0.3) 70%, transparent 100%);
  margin-bottom: 0;
}

/* ── SINGLE POST PAGE ─────────────────────────────────────── */
/* Reading progress bar — blue-cyan */
#reading-progress {
  background: linear-gradient(90deg, #4f46e5, #818cf8, #06b6d4) !important;
}

/* Post content inline link accent */
.entry-content a, .post-body a {
  color: #818cf8;
  text-decoration: underline;
  text-decoration-color: rgba(79,70,229,0.4);
  transition: color 0.2s, text-decoration-color 0.2s;
}
.entry-content a:hover, .post-body a:hover {
  color: #06b6d4;
  text-decoration-color: rgba(6,182,212,0.6);
}

/* Post category badge — blue */
.post-hero__cat {
  background: linear-gradient(135deg, rgba(79,70,229,0.15), rgba(6,182,212,0.08)) !important;
  border-color: rgba(79,70,229,0.3) !important;
  color: #818cf8 !important;
}

/* Table of contents — blue accent */
.toc-wrap, .sidebar-toc {
  border-left: 2px solid rgba(79,70,229,0.4) !important;
  background: linear-gradient(135deg, rgba(79,70,229,0.06), rgba(6,182,212,0.03)) !important;
}

/* Related posts cards */
.related-post-card:hover, .related-posts__item:hover {
  border-color: rgba(79,70,229,0.4) !important;
  box-shadow: 0 8px 28px rgba(79,70,229,0.12) !important;
}

/* ── GENERAL PAGES (Contact, About, Privacy etc) ───────────── */
.page-wrap {
  background:
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(79,70,229,0.07) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 0% 100%, rgba(6,182,212,0.05) 0%, transparent 50%);
  min-height: 60vh;
}
.page-wrap::before {
  content: '';
  display: block;
  height: 1px;
  margin-bottom: 0;
}

/* ── SUBMIT + NEWSLETTER SECTIONS ─────────────────────────── */
.submit-tool-section,
.tools-nl-section {
  position: relative;
  overflow: hidden;
}
.submit-tool-section::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(79,70,229,0.10) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.submit-tool-card { position: relative; z-index: 1; }

/* ── STAT COUNTERS — blue gradient numbers ─────────────────── */
.h-stat-num {
  background: linear-gradient(135deg, #818cf8, #06b6d4) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* ── BADGE ACCENT LINE ─────────────────────────────────────── */
.sec-label {
  background: linear-gradient(135deg, rgba(79,70,229,0.15), rgba(6,182,212,0.10)) !important;
  border-color: rgba(79,70,229,0.3) !important;
  color: #818cf8 !important;
}

/* ── SCROLLBAR — blue tint ─────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4f46e5, #06b6d4);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: #818cf8; }

/* ── ORB PULSE ANIMATION ──────────────────────────────────── */
@keyframes aidg-orb-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(1.08); }
}

/* ============================================================
   MOBILE FIXES — Blog, AI Tools, Category Cards
   ============================================================ */

/* ── SEC-LABEL: fix size/stretch on all pages ──────────────── */
.sec-label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  padding: 5px 14px !important;
  border-radius: 20px !important;
  border: 1px solid rgba(79,70,229,0.3) !important;
  width: auto !important;
  max-width: fit-content !important;
  white-space: nowrap !important;
}

/* ── HERO STATS: 2×2 grid on mobile, never stacked 1-col ───── */
.tools-hero-stats {
  display: grid !important;
  grid-template-columns: repeat(4,1fr) !important;
  gap: 16px !important;
  margin-top: 32px !important;
  width: 100% !important;
}
@media (max-width: 640px) {
  .tools-hero-stats {
    grid-template-columns: repeat(2,1fr) !important;
    gap: 12px !important;
  }
  .h-stat {
    background: rgba(79,70,229,0.06);
    border: 1px solid rgba(79,70,229,0.12);
    border-radius: 12px;
    padding: 12px 8px;
  }
}
.h-stat { text-align: center; }
.h-stat-num {
  font-size: clamp(1.4rem,4vw,1.9rem) !important;
  font-weight: 900 !important;
  font-family: 'Syne', sans-serif !important;
  line-height: 1.1 !important;
}
.h-stat-lbl {
  font-size: 0.68rem !important;
  color: #8b8aad !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-top: 4px !important;
}

/* ── CATEGORY OVERVIEW CARDS: better mobile layout ─────────── */
.cats-overview-grid {
  display: grid !important;
  grid-template-columns: repeat(4,1fr) !important;
  gap: 10px !important;
}
@media (max-width: 900px) {
  .cats-overview-grid { grid-template-columns: repeat(3,1fr) !important; }
}
@media (max-width: 600px) {
  .cats-overview-grid { grid-template-columns: repeat(2,1fr) !important; }
  .cat-overview-card { padding: 10px 12px !important; }
  .coc-name { font-size: 0.76rem !important; }
}
@media (max-width: 380px) {
  .cats-overview-grid { grid-template-columns: 1fr !important; }
}

/* ── CAT OVERVIEW CARD: always show icon properly ───────────── */
.coc-icon {
  min-width: 36px !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 9px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.1rem !important;
}

/* ── BLOG PAGE: featured post mobile ───────────────────────── */
.featured-post {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  border-radius: 18px !important;
  overflow: hidden !important;
}
@media (max-width: 680px) {
  .featured-post {
    grid-template-columns: 1fr !important;
  }
  .fp-thumb { height: 200px !important; }
}

/* ── TOOLS GRID: 3-col desktop, 2-col tablet, 1-col mobile ─── */
.tools-grid {
  grid-template-columns: repeat(3,1fr) !important;
}
@media (max-width: 900px) {
  .tools-grid { grid-template-columns: repeat(2,1fr) !important; }
}
@media (max-width: 540px) {
  .tools-grid { grid-template-columns: 1fr !important; }
}

/* ── TOOL SECTION HEADER: mobile wrap fix ───────────────────── */
@media (max-width: 600px) {
  .tool-section-header {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }
  .ts-view-all {
    font-size: 0.72rem !important;
    padding: 6px 12px !important;
  }
  .ts-meta { flex: 1 1 100% !important; order: 2; }
  .ts-icon { order: 1; }
  .ts-view-all { order: 3; margin-left: auto; }
}

/* ── NAV LOGO: prevent wrapping on small screens ───────────── */
@media (max-width: 400px) {
  .site-logo { font-size: 0.85rem !important; }
  .site-logo img { width: 28px !important; height: 28px !important; }
}

/* ============================================================
   HORIZONTAL OVERFLOW FIX — prevents right-side cutoff on mobile
   ============================================================ */

/* Root fix — nothing should ever cause horizontal scroll */
html, body {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

/* All sections must stay within viewport */
section, .page-hero--blog, .page-hero--tools,
.cat-page-hero, .post-hero, .page-wrap,
.featured-post-section, .blog-main-wrap,
.tools-search-section, .tools-cats-overview,
.tools-main-wrap, .submit-tool-section,
.tools-nl-section, .cat-tools-section {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* Fix orb pseudo-elements — clamp to viewport, never overflow right */
.page-hero--blog::before,
.page-hero--tools::before,
.cat-page-hero::before,
.post-hero::before {
  width: min(500px, 80vw) !important;
  height: min(500px, 80vw) !important;
  left: -60px !important;
}

.page-hero--blog::after,
.page-hero--tools::after,
.cat-page-hero::after,
.post-hero::after {
  width: min(400px, 60vw) !important;
  height: min(400px, 60vw) !important;
  right: -40px !important;
}

/* Fix the 800px gradient divider line */
.featured-post-section::before {
  width: 100% !important;
  max-width: 100% !important;
  left: 0 !important;
  transform: none !important;
}

/* Fix submit section orb */
.submit-tool-section::before {
  width: min(600px, 90vw) !important;
  height: min(400px, 60vw) !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}

/* Featured post — fix layout overflow on mobile */
.featured-post {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
@media (min-width: 700px) {
  .featured-post {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }
}

/* Blog hero search bar — must not overflow */
.blog-search-bar-wrap {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* All containers — box-sizing fix */
.container {
  box-sizing: border-box !important;
  width: 100% !important;
  padding-left: max(16px, 4vw) !important;
  padding-right: max(16px, 4vw) !important;
}

/* Fix sec-label from stretching full width */
.sec-label {
  display: inline-flex !important;
  max-width: fit-content !important;
  box-sizing: border-box !important;
}



/* Category overview grid — no overflow */
.cats-overview-grid {
  width: 100% !important;
  box-sizing: border-box !important;
}
.cat-overview-card {
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* Tools grid — no overflow */
.tools-grid {
  width: 100% !important;
  box-sizing: border-box !important;
}
.tool-card-item {
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Blog cards — no overflow */
.blog-card, .blog-card-home, .post-card {
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* ============================================================
   TABLET FIX — 601px to 900px
   Targets the gap between mobile (600px) and desktop (900px+)
   where layout was falling through without proper treatment
   ============================================================ */

@media (min-width: 601px) and (max-width: 900px) {

  /* ── HOMEPAGE HERO: fix the massive empty gap ────────────── */
  /* The gap is caused by desktop-sized padding on .hero at tablet */
  section.hero {
    padding-top: calc(var(--nav-h) + 32px) !important;
    padding-bottom: 40px !important;
  }
  .hero__inner {
    grid-template-columns: 1fr !important;
    text-align: center !important;
    gap: 32px !important;
  }
  .hero__visual {
    display: none !important; /* hide orb on tablet — saves space */
  }
  .hero__title {
    font-size: clamp(2rem, 6vw, 3rem) !important;
  }
  .hero__meta {
    justify-content: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
  }
  .hero__cta {
    justify-content: center !important;
  }
  .hero__sub {
    max-width: 100% !important;
    margin-inline: auto !important;
  }

  /* ── NAV: fix cramped items on tablet ───────────────────── */
  .nav-menu { gap: 4px !important; }
  .nav-menu li a { padding: 6px 10px !important; font-size: 0.82rem !important; }
  .nav-cta { padding: 8px 14px !important; font-size: 0.78rem !important; }
  .site-logo__text { font-size: 0.9rem !important; }

  /* ── HOMEPAGE SECTIONS: tighten padding ─────────────────── */
  .section,
  section.section,
  [class*="section"] {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  /* Inline-style sections on front-page.php */
  section[style*="padding:90px 48px"] {
    padding: 60px 24px !important;
  }
  section[style*="padding:90px"] {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  /* ── FOOTER: proper 2-col tablet layout ─────────────────── */
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 32px 24px !important;
  }
  /* Brand col takes full width, rest in 2 cols */
  .footer-col--brand {
    grid-column: 1 / -1 !important;
  }
  /* Newsletter full width at bottom */
  .footer-col--newsletter {
    grid-column: 1 / -1 !important;
  }

  /* ── BLOG HERO ───────────────────────────────────────────── */
  .page-hero--blog {
    padding: 100px 24px 40px !important;
  }
  .page-hero--blog h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem) !important;
  }

  /* ── AI TOOLS HERO ───────────────────────────────────────── */
  .page-hero--tools {
    padding: 100px 24px 40px !important;
  }
  .page-hero--tools h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem) !important;
  }
  .tools-hero-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    margin-top: 24px !important;
  }

  /* ── CATEGORY PAGE HERO ──────────────────────────────────── */
  .cat-page-hero {
    padding: 100px 24px 32px !important;
  }

  /* ── BLOG CARDS GRID ─────────────────────────────────────── */
  .posts-grid--3 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .blog-grid-home {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* ── TOOLS GRID ──────────────────────────────────────────── */
  .tools-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .cats-overview-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  /* ── SERVICES GRID ───────────────────────────────────────── */
  .services-grid,
  .svc-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* ── PROCESS STEPS ───────────────────────────────────────── */
  .process-steps {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px !important;
  }

  /* ── FEATURED POST ───────────────────────────────────────── */
  .featured-post {
    grid-template-columns: 1fr !important;
  }
  .fp-thumb {
    height: 220px !important;
  }

  /* ── CONTAINER: proper tablet padding ───────────────────── */
  .container {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}

/* ============================================================
   SIDEBAR & POST PAGE — prevent left-side content cutoff
   ============================================================ */

/* Post page grid — ensure no overflow on any screen */
.post-page-wrap {
  overflow-x: hidden !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.post-page-inner {
  width: 100% !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}
.post-content,
.post-article-col {
  min-width: 0 !important;
  overflow-x: hidden !important;
  width: 100% !important;
}

/* Blog sidebar — prevent overflow */
.blog-sidebar {
  min-width: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
}
.sidebar-widget {
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
/* Author widget inside sidebar */
.sw-author {
  width: 100% !important;
  box-sizing: border-box !important;
}
.about-bio,
.sw-author__bio {
  word-break: break-word !important;
  overflow-wrap: break-word !important;
}

/* Blog author box at bottom of post */
.author-box {
  box-sizing: border-box !important;
  width: 100% !important;
  overflow: hidden !important;
}





/* ============================================================
   COMPREHENSIVE MOBILE/TABLET FIXES — Round 3
   ============================================================ */

/* ── HERO: remove min-height 100vh on mobile/tablet ─────── */
@media (max-width: 900px) {
  section.hero, .hero {
    min-height: unset !important;
    padding-top: calc(var(--nav-h) + 40px) !important;
    padding-bottom: 48px !important;
  }
}
@media (max-width: 600px) {
  section.hero, .hero {
    min-height: unset !important;
    padding-top: calc(var(--nav-h) + 28px) !important;
    padding-bottom: 36px !important;
  }
}




/* ── NAV HEADER: fix tablet cramping ───────────────────── */
@media (min-width: 901px) and (max-width: 1100px) {
  .nav-cta {
    padding: 7px 12px !important;
    font-size: 0.75rem !important;
    white-space: nowrap !important;
  }
  .nav-menu li a {
    padding: 6px 8px !important;
    font-size: 0.8rem !important;
  }
  /* Hide admin bar email on tablet */
  .site-header__inner > a:not(.nav-cta):not(.site-logo) {
    display: none !important;
  }
}


/* marquee handled inline in template-parts/marquee.php */

/* ── PERFORMANCE: CLS prevention ─────────────────────────────────────────────*/
img, video { height: auto; }
.hero-orb__profile-img { aspect-ratio: 1 / 1; width: 100%; height: 100%; }

/* ── PERFORMANCE: content-visibility for offscreen sections ──────────────── */
.svc-full-section,
.projects-section,
.testimonials-section,
.pricing-section,
.process-section {
  content-visibility: auto;
  contain-intrinsic-size: 0 400px;
}

/* ============================================================
   FULL RESPONSIVE FIX — Desktop / Tablet / Mobile
   Single source of truth for all breakpoints
   ============================================================ */

/* ── GLOBAL BOX MODEL ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100%; }

/* ── HERO SECTION ────────────────────────────────────────────────────────────── */
/* Desktop: min-height 100vh is fine */
/* Tablet (601-900px): remove 100vh, keep proportional */
@media (min-width: 601px) and (max-width: 900px) {
  section.hero, .hero {
    min-height: unset !important;
    padding-top: calc(var(--nav-h) + 40px) !important;
    padding-bottom: 48px !important;
  }
  .hero__inner { grid-template-columns: 1fr !important; text-align: center !important; }
  .hero__visual { display: none !important; }
  .hero__meta, .hero__cta { justify-content: center !important; }
  .hero__sub { max-width: 100% !important; margin-inline: auto !important; }
}
/* Mobile (≤600px) */
@media (max-width: 600px) {
  section.hero, .hero {
    min-height: unset !important;
    padding-top: calc(var(--nav-h) + 24px) !important;
    padding-bottom: 36px !important;
  }
  .hero__title { font-size: clamp(1.8rem, 8vw, 2.8rem) !important; }
  .hero__meta { flex-direction: column !important; align-items: center !important; gap: 6px !important; }
}

/* ── STATS BAR: ensure no overflow or cut text on desktop ───────────────────── */
/* Stats are already handled in homepage-sections.css — just safety override */
.stat-bar-item { overflow: visible !important; }
.sbi-label { overflow: visible !important; word-break: normal !important; }

/* ── TABLET LAYOUT (601-900px) ───────────────────────────────────────────────── */
@media (min-width: 601px) and (max-width: 900px) {
  /* Container */
  .container { padding-left: 20px !important; padding-right: 20px !important; }

  /* Section padding */
  .svc-full-section { padding: 60px 20px !important; }
  section.section, .section { padding-left: 20px !important; padding-right: 20px !important; }

  /* Services grid: 2 cols */
  .services-grid, .svc-cards-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Blog grid: 2 cols */
  .posts-grid--3, .blog-grid-home { grid-template-columns: repeat(2, 1fr) !important; }

  /* Tools grid: 2 cols */
  .tools-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Category overview: 3 cols */
  .cats-overview-grid { grid-template-columns: repeat(3, 1fr) !important; }

  /* Process: 2 cols */
  .process-steps { grid-template-columns: repeat(2, 1fr) !important; }

  /* Featured post: stack */
  .featured-post-card { grid-template-columns: 1fr !important; }

  /* Blog sidebar: stack */
  .blog-page-inner { grid-template-columns: 1fr !important; }
  .blog-sidebar { position: static !important; }

  /* Nav: smaller text */
  .nav-menu li a { padding: 6px 8px !important; font-size: 0.8rem !important; }
  .nav-cta { padding: 7px 12px !important; font-size: 0.76rem !important; white-space: nowrap !important; }

  /* Footer: 2 cols */
  .footer-grid { grid-template-columns: 1fr 1fr !important; }
  .footer-col--brand { grid-column: 1 / -1 !important; }
  .footer-col--newsletter { grid-column: 1 / -1 !important; }

  /* Page heroes */
  .page-hero--blog, .page-hero--tools { padding: 100px 24px 40px !important; }
  .cat-page-hero { padding: 100px 24px 32px !important; }
}

/* ── MOBILE LAYOUT (≤600px) ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
  /* Container */
  .container { padding-left: 16px !important; padding-right: 16px !important; }

  /* All grids → 1 col */
  .services-grid, .svc-cards-grid,
  .projects-grid,
  .posts-grid--3, .posts-grid--2,
  .process-steps { grid-template-columns: 1fr !important; }

  /* Tools: 1 col */
  .tools-grid { grid-template-columns: 1fr !important; }

  /* Category overview: 2 cols */
  .cats-overview-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Footer: 1 col */
  .footer-grid { grid-template-columns: 1fr !important; }
  .footer-bottom__inner { flex-direction: column !important; text-align: center !important; }

  /* Blog sidebar: stack */
  .blog-page-inner, .post-page-inner { grid-template-columns: 1fr !important; }
  .blog-sidebar, .post-sidebar { position: static !important; }

  /* Buttons */
  .hero__cta { flex-direction: column !important; align-items: stretch !important; }
  .contact-cta { flex-direction: column !important; align-items: center !important; }

  /* Page heroes */
  .page-hero--blog, .page-hero--tools { padding: 90px 16px 32px !important; }
  .cat-page-hero { padding: 90px 16px 28px !important; }

  /* Cards: adjust padding */
  .svc-card, .project-card, .post-card { padding: 18px !important; }

  /* Section headings */
  .section-title { font-size: clamp(1.5rem, 6vw, 2.2rem) !important; }
}

/* ── SMALL MOBILE (≤380px) ───────────────────────────────────────────────────── */
@media (max-width: 380px) {
  .container { padding-left: 12px !important; padding-right: 12px !important; }
  .nav-cta { display: none !important; } /* hide CTA on tiny screens, use drawer */
  .hero__title { font-size: clamp(1.6rem, 8vw, 2.2rem) !important; }
}

/* ── INLINE SECTION PADDING FIX (front-page.php inline styles) ──────────────── */
@media (max-width: 900px) {
  section[style*="padding:90px 48px"],
  section[style*="padding: 90px 48px"] {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}
