/* =========================================================
   TOOLSHUB PRO — MAIN STYLESHEET
   Premium SaaS style. Blue + White palette. Glassmorphism.
   Mobile-first. Dark/Light mode via [data-theme].
   ========================================================= */

/* ---------- 1. DESIGN TOKENS ---------- */
:root{
  --th-primary:#2563eb;
  --th-primary-dark:#1d4ed8;
  --th-accent:#38bdf8;
  --th-ink:#0f172a;
  --th-slate:#64748b;
  --th-white:#ffffff;
  --th-mist:#f1f5f9;
  --th-bg:#f7f9fc;
  --th-surface:#ffffff;
  --th-surface-glass:rgba(255,255,255,.65);
  --th-border:rgba(15,23,42,.08);
  --th-text:#0f172a;
  --th-text-muted:#5b6472;
  --th-radius:16px;
  --th-radius-sm:10px;
  --th-radius-lg:24px;
  --th-shadow-sm:0 2px 8px rgba(15,23,42,.06);
  --th-shadow-md:0 8px 24px rgba(15,23,42,.08);
  --th-shadow-lg:0 20px 48px rgba(15,23,42,.12);
  --th-shadow-glow:0 8px 30px rgba(37,99,235,.25);
  --th-header-h:72px;
  --th-max:1280px;
  --th-font: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --th-font-mono: "SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;
  --th-ease: cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"]{
  --th-bg:#0b1120;
  --th-surface:#111a2e;
  --th-surface-glass:rgba(17,26,46,.65);
  --th-border:rgba(255,255,255,.08);
  --th-text:#e5eaf3;
  --th-text-muted:#95a1b8;
  --th-mist:#16213a;
  --th-shadow-sm:0 2px 8px rgba(0,0,0,.35);
  --th-shadow-md:0 8px 24px rgba(0,0,0,.4);
  --th-shadow-lg:0 20px 48px rgba(0,0,0,.5);
}

@media (prefers-color-scheme: dark){
  html[data-theme="system"]{
    --th-bg:#0b1120; --th-surface:#111a2e; --th-surface-glass:rgba(17,26,46,.65);
    --th-border:rgba(255,255,255,.08); --th-text:#e5eaf3; --th-text-muted:#95a1b8; --th-mist:#16213a;
  }
}

/* ---------- 2. RESET ---------- */
*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth; -webkit-text-size-adjust:100%;}
body{
  margin:0;
  font-family:var(--th-font);
  background:var(--th-bg);
  color:var(--th-text);
  line-height:1.6;
  font-size:16px;
  transition:background-color .3s var(--th-ease), color .3s var(--th-ease);
}
img{max-width:100%; height:auto; display:block;}
a{color:inherit; text-decoration:none;}
ul,ol{margin:0; padding:0; list-style:none;}
button{font-family:inherit; cursor:pointer;}
input,textarea,select{font-family:inherit; font-size:1rem;}
h1,h2,h3,h4,h5,h6{margin:0 0 .5em; line-height:1.2; font-weight:800; letter-spacing:-.02em;}
p{margin:0 0 1em;}
.container{max-width:var(--th-max); margin-inline:auto; padding-inline:20px;}
.screen-reader-text{position:absolute!important; clip:rect(1px,1px,1px,1px); width:1px; height:1px; overflow:hidden;}
.skip-link{position:absolute; top:-100px; left:10px; background:var(--th-primary); color:#fff; padding:10px 18px; border-radius:8px; z-index:9999; transition:top .2s;}
.skip-link:focus{top:10px;}
:focus-visible{outline:2px solid var(--th-accent); outline-offset:2px;}
.icon{width:20px; height:20px; fill:none; stroke:currentColor;}
.icon-sm{width:16px; height:16px;}
.icon-lg{width:32px; height:32px;}
.icon-xl{width:56px; height:56px;}

/* ---------- 3. UTILITIES ---------- */
.glass-card{
  background:var(--th-surface-glass);
  backdrop-filter:blur(16px) saturate(160%);
  -webkit-backdrop-filter:blur(16px) saturate(160%);
  border:1px solid var(--th-border);
  border-radius:var(--th-radius);
  box-shadow:var(--th-shadow-sm);
}
.glass-pill{
  display:inline-flex; align-items:center; gap:6px;
  background:var(--th-surface-glass); border:1px solid var(--th-border);
  padding:6px 16px; border-radius:999px; font-size:.85rem; font-weight:600; color:var(--th-primary);
  backdrop-filter:blur(12px);
}
.alt-bg{background:var(--th-mist);}
.section{padding:64px 0;}
.section-header{display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:28px; flex-wrap:wrap;}
.section-title{display:flex; align-items:center; gap:10px; font-size:clamp(1.4rem,2.5vw,2rem); margin:0;}
.section-title .icon{color:var(--th-primary);}
.link-arrow{display:inline-flex; align-items:center; gap:6px; color:var(--th-primary); font-weight:700; transition:gap .2s var(--th-ease);}
.link-arrow:hover{gap:10px;}

/* ---------- 4. BUTTONS ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:13px 26px; border-radius:12px; border:none; font-weight:700; font-size:.95rem;
  transition:transform .2s var(--th-ease), box-shadow .2s var(--th-ease), background .2s var(--th-ease);
  cursor:pointer; white-space:nowrap;
}
.btn-primary{background:linear-gradient(135deg,var(--th-primary),var(--th-primary-dark)); color:#fff; box-shadow:var(--th-shadow-glow);}
.btn-primary:hover{transform:translateY(-2px); box-shadow:0 14px 34px rgba(37,99,235,.35);}
.btn-white{background:#fff; color:var(--th-primary);}
.btn-white:hover{transform:translateY(-2px);}
.btn-sm{padding:9px 16px; font-size:.85rem; border-radius:10px;}
.icon-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:42px; height:42px; border-radius:12px; border:1px solid var(--th-border);
  background:var(--th-surface-glass); color:var(--th-text); transition:background .2s, transform .2s;
}
.icon-btn:hover{background:var(--th-mist); transform:translateY(-1px);}

/* ---------- 5. HEADER ---------- */
.site-header{
  position:sticky; top:0; z-index:100; height:var(--th-header-h);
  background:var(--th-surface-glass); backdrop-filter:blur(18px) saturate(160%);
  -webkit-backdrop-filter:blur(18px) saturate(160%);
  border-bottom:1px solid var(--th-border);
  transition:box-shadow .3s var(--th-ease);
}
.site-header.is-scrolled{box-shadow:var(--th-shadow-md);}
.header-inner{display:flex; align-items:center; gap:24px; height:var(--th-header-h);}
.header-branding{flex-shrink:0;}
.site-logo-text{display:inline-flex; align-items:center; gap:8px; font-size:1.35rem; font-weight:800; color:var(--th-text);}
.logo-mark{color:var(--th-primary); display:inline-flex;}
.main-navigation{flex:1; display:none;}
.nav-menu{display:flex; align-items:center; gap:4px;}
.nav-link{display:inline-flex; align-items:center; gap:4px; padding:10px 14px; border-radius:10px; font-weight:600; color:var(--th-text); transition:background .2s, color .2s;}
.nav-link:hover{background:var(--th-mist); color:var(--th-primary);}
.has-dropdown{position:relative;}
.has-dropdown .sub-menu{
  position:absolute; top:110%; left:0; min-width:220px; padding:8px;
  background:var(--th-surface); border:1px solid var(--th-border); border-radius:var(--th-radius-sm);
  box-shadow:var(--th-shadow-lg); opacity:0; visibility:hidden; transform:translateY(8px);
  transition:all .2s var(--th-ease); z-index:50;
}
.has-dropdown:hover .sub-menu, .has-dropdown:focus-within .sub-menu{opacity:1; visibility:visible; transform:translateY(0);}
.sub-menu .nav-link{display:block; padding:9px 12px;}
.header-actions{display:flex; align-items:center; gap:8px; margin-left:auto;}
.header-cta-btn{display:none;}
.dark-mode-toggle .icon-moon{display:none;}
[data-theme="dark"] .dark-mode-toggle .icon-sun{display:none;}
[data-theme="dark"] .dark-mode-toggle .icon-moon{display:block;}

.header-search-panel{
  position:absolute; left:0; right:0; top:100%; background:var(--th-surface);
  border-bottom:1px solid var(--th-border); box-shadow:var(--th-shadow-lg);
  padding:20px 0; animation:th-fade-down .2s var(--th-ease);
}
@keyframes th-fade-down{from{opacity:0; transform:translateY(-8px);} to{opacity:1; transform:translateY(0);}}

/* Live search */
.search-input-wrap{display:flex; align-items:center; gap:10px; padding:8px 8px 8px 18px;}
.search-input-wrap .icon{color:var(--th-text-muted); flex-shrink:0;}
.search-field{flex:1; border:none; background:transparent; outline:none; color:var(--th-text); padding:10px 0;}
.live-search-results{margin-top:10px; max-height:340px; overflow:auto; border-radius:var(--th-radius-sm); background:var(--th-surface); border:1px solid var(--th-border); box-shadow:var(--th-shadow-md);}
.live-search-results a{display:flex; align-items:center; gap:10px; padding:10px 14px; border-bottom:1px solid var(--th-border);}
.live-search-results a:hover{background:var(--th-mist);}
.live-search-results img{width:28px; height:28px; border-radius:6px; object-fit:cover;}
.search-quick-categories{display:flex; flex-wrap:wrap; gap:8px; margin-top:14px;}
.chip{display:inline-flex; padding:8px 16px; border-radius:999px; background:var(--th-mist); font-weight:600; font-size:.85rem; color:var(--th-text); transition:background .2s, color .2s;}
.chip:hover, .chip-active{background:var(--th-primary); color:#fff;}
.chip-list{display:flex; flex-wrap:wrap; gap:8px;}

/* Mobile off-canvas menu */
.mobile-menu-toggle{display:inline-flex;}
.mobile-menu-panel{
  position:fixed; top:0; right:0; bottom:0; width:min(340px,86vw); background:var(--th-surface);
  z-index:200; padding:20px; overflow-y:auto; box-shadow:var(--th-shadow-lg);
  transform:translateX(100%); transition:transform .3s var(--th-ease);
}
.mobile-menu-panel.is-open{transform:translateX(0);}
.mobile-menu-header{display:flex; align-items:center; justify-content:space-between; margin-bottom:16px;}
.mobile-nav-menu li{border-bottom:1px solid var(--th-border);}
.mobile-nav-menu .nav-link{display:flex; justify-content:space-between; padding:14px 4px;}
.mobile-menu-footer{margin-top:20px;}
.mobile-menu-footer .dark-mode-toggle{width:100%; justify-content:flex-start; gap:10px; padding:10px 14px;}
.mobile-menu-overlay{position:fixed; inset:0; background:rgba(15,23,42,.5); z-index:190; opacity:0; visibility:hidden; transition:opacity .3s;}
.mobile-menu-overlay.is-open{opacity:1; visibility:visible;}

/* ---------- 6. BREADCRUMBS ---------- */
.breadcrumbs{padding:14px 20px; max-width:var(--th-max); margin-inline:auto; font-size:.85rem; color:var(--th-text-muted);}
.breadcrumbs ol{display:flex; flex-wrap:wrap; gap:6px; align-items:center;}
.breadcrumbs a{color:var(--th-text-muted); transition:color .2s;}
.breadcrumbs a:hover{color:var(--th-primary);}
.crumb-sep{opacity:.5;}

/* ---------- 7. HERO ---------- */
.hero-section{position:relative; padding:72px 0 56px; overflow:hidden;}
.hero-bg{
  position:absolute; inset:-20% -10% auto -10%; height:600px;
  background:radial-gradient(60% 60% at 30% 20%, rgba(37,99,235,.18), transparent 70%),
             radial-gradient(50% 50% at 80% 10%, rgba(56,189,248,.18), transparent 70%);
  filter:blur(10px); z-index:-1;
}
.hero-inner{text-align:center; max-width:780px;}
.eyebrow{margin-bottom:18px;}
.hero-heading{font-size:clamp(2rem,5vw,3.4rem); margin-bottom:16px;}
.hero-subheading{font-size:1.1rem; color:var(--th-text-muted); max-width:600px; margin:0 auto 32px;}
.hero-search{max-width:680px; margin:0 auto; padding:14px;}
.hero-stats{display:flex; justify-content:center; gap:40px; margin-top:40px; flex-wrap:wrap;}
.hero-stat{display:flex; flex-direction:column; align-items:center;}
.hero-stat strong{font-size:1.6rem; color:var(--th-primary);}
.hero-stat span{font-size:.85rem; color:var(--th-text-muted);}

/* ---------- 8. CARDS: TOOLS / ARTICLES / CATEGORIES ---------- */
.tools-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:18px;}
.articles-grid{display:grid; grid-template-columns:1fr; gap:20px;}
.categories-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:16px;}

.tool-card{padding:20px; transition:transform .25s var(--th-ease), box-shadow .25s var(--th-ease); animation:th-fade-up .5s var(--th-ease) both;}
.tool-card:hover{transform:translateY(-6px); box-shadow:var(--th-shadow-lg);}
.tool-card-link{display:flex; flex-direction:column; gap:10px;}
.tool-card-icon{width:52px; height:52px; border-radius:14px; background:linear-gradient(135deg,rgba(37,99,235,.12),rgba(56,189,248,.12)); display:flex; align-items:center; justify-content:center; color:var(--th-primary); overflow:hidden;}
.tool-card-icon img{width:100%; height:100%; object-fit:cover;}
.tool-card-title{font-size:1.05rem; margin:0;}
.tool-card-excerpt{font-size:.88rem; color:var(--th-text-muted); margin:0;}
.tool-card-meta{display:flex; gap:6px; flex-wrap:wrap; margin-top:4px;}

.badge{display:inline-flex; align-items:center; gap:4px; font-size:.7rem; font-weight:700; padding:4px 10px; border-radius:999px; text-transform:uppercase; letter-spacing:.03em;}
.badge-trending{background:rgba(239,68,68,.12); color:#ef4444;}
.badge-popular{background:rgba(245,158,11,.14); color:#d97706;}
.badge-easy{background:rgba(34,197,94,.12); color:#16a34a;}
.badge-medium{background:rgba(245,158,11,.14); color:#d97706;}
.badge-advanced{background:rgba(239,68,68,.12); color:#ef4444;}

.article-card{overflow:hidden; display:flex; flex-direction:column; animation:th-fade-up .5s var(--th-ease) both;}
.article-card-thumb{display:block; aspect-ratio:16/10; overflow:hidden; border-radius:var(--th-radius) var(--th-radius) 0 0;}
.article-card-thumb img{width:100%; height:100%; object-fit:cover; transition:transform .4s var(--th-ease);}
.article-card:hover .article-card-thumb img{transform:scale(1.06);}
.article-card-thumb-fallback{width:100%; height:100%; display:flex; align-items:center; justify-content:center; background:var(--th-mist); color:var(--th-primary);}
.article-card-body{padding:20px; display:flex; flex-direction:column; gap:8px;}
.article-card-cat{align-self:flex-start; font-size:.72rem; font-weight:700; text-transform:uppercase; color:var(--th-primary); background:rgba(37,99,235,.1); padding:4px 10px; border-radius:999px;}
.article-card-title{font-size:1.15rem; margin:0;}
.article-card-title a:hover{color:var(--th-primary);}
.article-card-excerpt{font-size:.9rem; color:var(--th-text-muted); margin:0;}
.article-card-meta{display:flex; gap:14px; font-size:.78rem; color:var(--th-text-muted); margin-top:4px;}
.article-card-meta span{display:inline-flex; align-items:center; gap:4px;}

.category-card{display:flex; flex-direction:column; align-items:center; text-align:center; gap:8px; padding:24px 16px; transition:transform .25s var(--th-ease), box-shadow .25s;}
.category-card:hover{transform:translateY(-4px); box-shadow:var(--th-shadow-lg);}
.category-icon{width:56px; height:56px; border-radius:16px; background:linear-gradient(135deg,var(--th-primary),var(--th-accent)); color:#fff; display:flex; align-items:center; justify-content:center;}
.category-name{font-weight:700;}
.category-count{font-size:.8rem; color:var(--th-text-muted);}

@keyframes th-fade-up{from{opacity:0; transform:translateY(14px);} to{opacity:1; transform:translateY(0);}}
.reveal{opacity:0; transform:translateY(20px); transition:opacity .6s var(--th-ease), transform .6s var(--th-ease);}
.reveal.is-visible{opacity:1; transform:translateY(0);}

/* ---------- 9. CATEGORY BANNER / FILTER BAR ---------- */
.category-banner{padding:52px 0 32px; text-align:center; background:linear-gradient(180deg,rgba(37,99,235,.06),transparent);}
.category-banner-sm{padding:36px 0 20px;}
.category-icon-lg{display:inline-flex; margin-bottom:12px; color:var(--th-primary);}
.category-title{font-size:clamp(1.6rem,4vw,2.4rem);}
.category-title span{color:var(--th-primary);}
.category-desc{color:var(--th-text-muted); max-width:640px; margin:0 auto 24px;}
.category-filter-bar{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:24px;}
.search-filters{display:flex; gap:10px; justify-content:center; margin-top:16px;}

/* ---------- 10. CONTENT LAYOUT (main + sidebar) ---------- */
.content-layout{display:grid; grid-template-columns:1fr; gap:32px; padding-block:32px;}
.content-layout-single{grid-template-columns:1fr;}
.content-main{min-width:0;}
.content-sidebar{display:flex; flex-direction:column; gap:20px;}
.widget{padding:20px;}
.widget-title, .footer-widget-title{font-size:1rem; margin-bottom:14px;}
.widget-tool-list li + li{margin-top:10px;}
.widget-tool-list a{display:flex; align-items:center; gap:10px; font-weight:600; font-size:.92rem;}
.widget-tool-icon{width:28px; height:28px; border-radius:8px; object-fit:cover;}

/* ---------- 11. TOOL PAGE ---------- */
.tool-hero{padding-top:32px;}
.tool-title-row{display:flex; align-items:center; gap:16px;}
.tool-icon-lg{width:64px; height:64px; border-radius:16px; overflow:hidden; flex-shrink:0; background:var(--th-mist);}
.tool-title{font-size:clamp(1.6rem,3.5vw,2.2rem); margin-bottom:6px;}
.tool-badges{display:flex; gap:6px;}
.tool-intro{font-size:1.05rem; color:var(--th-text-muted); max-width:760px; margin-top:14px;}

.toolshub-tool-container{margin-top:24px; padding:28px; min-height:260px;}
.tool-placeholder{display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:60px 20px; color:var(--th-text-muted); text-align:center;}
.tool-placeholder .icon{color:var(--th-primary);}

.toc-box{padding:20px 24px; margin-bottom:28px;}
.toc-title{font-size:1rem; margin-bottom:10px;}
.toc-list ul{display:flex; flex-direction:column; gap:6px;}
.toc-list a{color:var(--th-primary); font-weight:600; font-size:.92rem;}
.toc-level-3{padding-left:18px; font-weight:500;}
.toc-list a.is-active{text-decoration:underline;}

.entry-content, .blog-typography{font-size:1.05rem; color:var(--th-text);}
.entry-content h2, .blog-typography h2{font-size:1.5rem; margin-top:2em;}
.entry-content h3, .blog-typography h3{font-size:1.2rem; margin-top:1.6em;}
.entry-content p, .blog-typography p{margin-bottom:1.3em; color:var(--th-text);}
.entry-content a, .blog-typography a{color:var(--th-primary); text-decoration:underline; text-underline-offset:3px;}
.entry-content ul, .entry-content ol, .blog-typography ul, .blog-typography ol{margin:0 0 1.3em 1.4em; list-style:revert;}
.entry-content blockquote, .blog-typography blockquote{
  margin:1.6em 0; padding:18px 24px; border-left:4px solid var(--th-primary);
  background:var(--th-mist); border-radius:0 var(--th-radius-sm) var(--th-radius-sm) 0;
  font-style:italic; color:var(--th-text);
}
.entry-content code, .blog-typography code{
  font-family:var(--th-font-mono); background:var(--th-mist); padding:2px 6px; border-radius:6px; font-size:.9em;
}
.entry-content pre, .blog-typography pre{
  background:#0f172a; color:#e5eaf3; padding:20px; border-radius:var(--th-radius-sm); overflow:auto; margin:1.6em 0;
}
.entry-content pre code, .blog-typography pre code{background:none; padding:0; color:inherit;}
.entry-content table, .blog-typography table{width:100%; border-collapse:collapse; margin:1.6em 0;}
.entry-content th, .entry-content td, .blog-typography th, .blog-typography td{border:1px solid var(--th-border); padding:10px 14px; text-align:left;}
.entry-content img, .blog-typography img{border-radius:var(--th-radius-sm); margin:1.2em 0;}

/* FAQ */
.faq-section{margin:36px 0;}
.faq-item{border-bottom:1px solid var(--th-border);}
.faq-question{width:100%; display:flex; justify-content:space-between; align-items:center; text-align:left; background:none; border:none; padding:18px 4px; font-size:1rem; font-weight:700; color:var(--th-text);}
.faq-caret{transition:transform .25s var(--th-ease); flex-shrink:0;}
.faq-question[aria-expanded="true"] .faq-caret{transform:rotate(180deg);}
.faq-answer{padding:0 4px 18px; color:var(--th-text-muted);}

/* Share + author */
.share-and-author{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:20px; margin:32px 0; padding:20px 0; border-top:1px solid var(--th-border); border-bottom:1px solid var(--th-border);}
.share-buttons{display:flex; gap:10px;}
.share-btn{width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:var(--th-mist); color:var(--th-text); border:none; transition:transform .2s, background .2s;}
.share-btn:hover{transform:translateY(-3px); background:var(--th-primary); color:#fff;}
.author-box{display:flex; gap:14px; align-items:flex-start; padding:16px 20px; max-width:420px;}
.author-avatar{border-radius:50%;}
.author-label{font-size:.75rem; color:var(--th-text-muted); text-transform:uppercase;}
.author-name{display:block; font-weight:700;}
.author-bio{font-size:.85rem; color:var(--th-text-muted); margin:4px 0 0;}

/* Next / prev */
.tool-adjacent-nav{display:grid; grid-template-columns:1fr 1fr; gap:16px; margin:32px 0;}
.adjacent-tool{display:flex; align-items:center; gap:12px; padding:16px 18px; transition:transform .2s;}
.adjacent-tool:hover{transform:translateY(-3px);}
.adjacent-next{justify-content:flex-end; text-align:right;}
.adjacent-label{display:block; font-size:.72rem; color:var(--th-text-muted); text-transform:uppercase;}

/* ---------- 12. COMMENTS ---------- */
.comments-area{padding:24px; margin-top:32px;}
.comments-title{font-size:1.2rem;}
.comment-list li{padding:16px 0; border-bottom:1px solid var(--th-border);}
.comment-form input, .comment-form textarea{
  width:100%; padding:12px 14px; border-radius:var(--th-radius-sm); border:1px solid var(--th-border);
  background:var(--th-surface); color:var(--th-text); margin-bottom:14px;
}
.comment-form .form-submit{margin-top:6px;}

/* ---------- 13. NEWSLETTER / CTA ---------- */
.newsletter-section{padding-top:20px;}
.newsletter-card{display:flex; align-items:center; justify-content:space-between; gap:24px; padding:36px 40px; flex-wrap:wrap;}
.newsletter-copy h2{margin-bottom:6px; font-size:1.4rem;}
.newsletter-copy p{color:var(--th-text-muted); margin:0;}
.newsletter-form{display:flex; gap:10px; flex-wrap:wrap;}
.newsletter-form input{padding:13px 18px; border-radius:12px; border:1px solid var(--th-border); background:var(--th-surface); color:var(--th-text); min-width:240px;}
.newsletter-status:empty{display:none;}

.cta-section{padding-top:0;}
.cta-card{
  background:linear-gradient(135deg,var(--th-primary),var(--th-accent)); color:#fff;
  border-radius:var(--th-radius-lg); padding:52px 32px; text-align:center;
}
.cta-card h2{font-size:clamp(1.5rem,3vw,2.1rem); margin-bottom:10px;}
.cta-card p{opacity:.9; max-width:520px; margin:0 auto 24px;}

/* ---------- 14. AD SLOTS ---------- */
.ad-slot{margin:24px auto; text-align:center;}
.ad-label{display:block; font-size:.68rem; text-transform:uppercase; letter-spacing:.08em; color:var(--th-text-muted); margin-bottom:8px;}
.ad-slot-body{min-height:90px; display:flex; align-items:center; justify-content:center; background:var(--th-mist); border-radius:var(--th-radius-sm); overflow:hidden;}
.ad-placeholder{width:100%; height:90px;}
.ad-slot-sidebar{padding:14px;}
.ad-slot-header{padding-top:10px;}
.ad-slot-footer{padding:20px 0;}

/* ---------- 15. FOOTER ---------- */
.site-footer{background:var(--th-ink); color:#cbd5e1; margin-top:60px; padding-top:56px;}
[data-theme="dark"] .site-footer{background:#070c18;}
.footer-grid{display:grid; grid-template-columns:1fr; gap:36px; padding-bottom:32px;}
.footer-branding .site-logo-text{color:#fff;}
.footer-about-text{color:#94a3b8; font-size:.92rem; margin:14px 0 18px;}
.social-icons{display:flex; gap:10px;}
.social-icon{width:38px; height:38px; border-radius:10px; background:rgba(255,255,255,.06); display:flex; align-items:center; justify-content:center; color:#cbd5e1; transition:background .2s, color .2s;}
.social-icon:hover{background:var(--th-primary); color:#fff;}
.footer-widget-title{color:#fff;}
.footer-menu li{margin-bottom:10px;}
.footer-menu a{color:#94a3b8; font-size:.92rem; transition:color .2s;}
.footer-menu a:hover{color:#fff;}
.footer-bottom{display:flex; flex-direction:column; gap:10px; align-items:center; justify-content:space-between; border-top:1px solid rgba(255,255,255,.08); padding:22px 0; font-size:.85rem;}
.legal-menu{display:flex; gap:16px; flex-wrap:wrap; justify-content:center;}
.legal-menu a{color:#94a3b8;}
.legal-menu a:hover{color:#fff;}

.back-to-top{
  position:fixed; bottom:24px; right:24px; width:46px; height:46px; border-radius:50%;
  background:var(--th-primary); color:#fff; border:none; display:flex; align-items:center; justify-content:center;
  box-shadow:var(--th-shadow-glow); opacity:0; visibility:hidden; transform:translateY(10px);
  transition:all .3s var(--th-ease); z-index:80;
}
.back-to-top.is-visible{opacity:1; visibility:visible; transform:translateY(0);}

/* ---------- 16. 404 ---------- */
.error-404-section{padding:70px 0; text-align:center;}
.icon-404{width:min(360px,80vw); height:auto; margin:0 auto 20px;}
.error-search{max-width:520px; margin:22px auto;}
.error-popular-tools{margin-top:56px; text-align:left;}
.error-popular-tools h2{text-align:center; margin-bottom:24px;}

/* ---------- 17. STATIC PAGES / CONTACT ---------- */
.page-header{padding:36px 0 10px; text-align:center;}
.page-title{font-size:clamp(1.6rem,4vw,2.3rem);}
.contact-form{padding:28px; margin-top:24px;}
.contact-form .form-row{display:grid; grid-template-columns:1fr; gap:16px; margin-bottom:16px;}
.contact-form label{display:flex; flex-direction:column; gap:6px; font-weight:600; font-size:.9rem;}
.contact-form input, .contact-form textarea{padding:12px 14px; border-radius:var(--th-radius-sm); border:1px solid var(--th-border); background:var(--th-surface); color:var(--th-text);}

/* ---------- 18. NO RESULTS ---------- */
.no-results{padding:60px 24px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:10px;}
.no-results .icon{color:var(--th-primary);}

/* ---------- 19. PAGINATION ---------- */
.pagination{margin:32px 0; display:flex; justify-content:center;}
.pagination ul{display:flex; gap:8px; flex-wrap:wrap;}
.pagination .page-numbers{display:flex; align-items:center; justify-content:center; min-width:40px; height:40px; padding:0 10px; border-radius:10px; background:var(--th-mist); font-weight:600;}
.pagination .page-numbers.current{background:var(--th-primary); color:#fff;}
.pagination a.page-numbers:hover{background:var(--th-primary); color:#fff;}

/* ---------- 20. WORDPRESS CORE / GUTENBERG ALIGNMENTS ---------- */
.alignwide{max-width:1000px; margin-left:auto; margin-right:auto;}
.alignfull{width:100vw; margin-left:calc(50% - 50vw);}
.wp-block-quote{border-left:4px solid var(--th-primary); padding-left:20px; font-style:italic;}
.wp-caption, .wp-block-image{margin-bottom:1.5em;}

/* ---------- 21. RESPONSIVE ---------- */
@media (min-width: 640px){
  .tools-grid{grid-template-columns:repeat(3,1fr);}
  .categories-grid{grid-template-columns:repeat(3,1fr);}
  .contact-form .form-row{grid-template-columns:1fr 1fr;}
}

@media (min-width: 860px){
  .main-navigation{display:block;}
  .mobile-menu-toggle{display:none;}
  .header-cta-btn{display:inline-flex;}
  .content-layout{grid-template-columns:2.4fr 1fr;}
  .footer-grid{grid-template-columns:1.4fr 1fr 1fr 1fr 1fr;}
  .articles-grid{grid-template-columns:repeat(3,1fr);}
}

@media (min-width: 1080px){
  .tools-grid{grid-template-columns:repeat(4,1fr);}
  .categories-grid{grid-template-columns:repeat(6,1fr);}
}

@media (max-width: 640px){
  .newsletter-card{flex-direction:column; text-align:center;}
  .newsletter-form{width:100%;}
  .newsletter-form input{flex:1;}
  .tool-adjacent-nav{grid-template-columns:1fr;}
  .footer-bottom{flex-direction:column;}
}

/* ---------- 22. REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce){
  *{animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important;}
}

/* ---------- 23. PRINT ---------- */
@media print{
  .site-header,.mobile-menu-panel,.ad-slot,.back-to-top,.share-buttons,.site-footer{display:none !important;}
}
