/*
Theme Name: TWC Industrial
Theme URI: https://twcindustrial.com
Author: TWC Industrial
Description: Industrial Calculators Hub - Modern Design v3.0
Version: 3.0.0
Text Domain: twcindustrial
*/

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;900&family=Barlow:wght@400;500;600;700&display=swap');

/* ─────────────────────────────────────────
   CSS VARIABLES
───────────────────────────────────────── */
:root {
  --amber:      #f5a623;
  --amber-dark: #b45309;
  --amber-light:#fef3c7;
  --navy:       #0f172a;
  --slate:      #1e293b;
  --slate-mid:  #334155;
  --muted:      #64748b;
  --bg:         #f8fafc;
  --bg-card:    #ffffff;
  --border:     #e2e8f0;
  --ff-h:       'Barlow Condensed', sans-serif;
  --ff-b:       'Barlow', sans-serif;
  --radius:     12px;
  --shadow:     0 4px 20px -4px rgba(0,0,0,0.12);
  --shadow-lg:  0 10px 40px -8px rgba(0,0,0,0.16);
}

/* ─────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff-b);
  background: var(--bg);
  color: var(--slate);
  margin: 0; padding: 0;
  line-height: 1.6;
  font-size: 16px;
}
a { color: var(--amber-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4,h5,h6 {
  font-family: var(--ff-h);
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0;
}

/* ─────────────────────────────────────────
   HEADER
───────────────────────────────────────── */
.site-header {
  background: var(--navy);
  border-bottom: 4px solid var(--amber);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 72px;
}
.header-inner {
  max-width: 1340px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon-box {
  width: 40px; height: 40px;
  background: rgba(245,166,35,0.15);
  border: 2px solid var(--amber);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.logo-icon-box svg { width: 22px; height: 22px; }
.logo-text {
  display: block;
  font-family: var(--ff-h);
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
}
.logo-sub {
  display: block;
  font-size: 10px;
  color: var(--amber);
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1;
  margin-top: 2px;
}

/* Desktop Nav — centered */
.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  overflow: visible;
}
.primary-menu-list {
  display: flex;
  list-style: none;
  margin: 0; padding: 0;
  gap: 4px;
  position: relative;
}

/* Top-level items */
.primary-menu-list > li {
  position: relative;
}
.primary-menu-list > li > a {
  color: #cbd5e1;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  display: block;
  white-space: nowrap;
}
.primary-menu-list > li > a:hover,
.primary-menu-list > li.current-menu-item > a {
  color: var(--amber);
  background: rgba(245,166,35,0.1);
  text-decoration: none;
}

/* ── HIDE ALL SUBMENUS (WordPress default generates .sub-menu) ── */
.primary-menu-list .sub-menu,
.primary-menu-list ul {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
}

/* ── SHOW ON HOVER (desktop dropdown, clean style) ── */
.primary-menu-list > li:hover > .sub-menu,
.primary-menu-list > li:focus-within > .sub-menu {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  width: 220px !important;
  height: auto !important;
  overflow: visible !important;
  clip: auto !important;
  background: var(--navy) !important;
  border: 1px solid rgba(245,166,35,0.25) !important;
  border-top: 3px solid var(--amber) !important;
  border-radius: 0 0 10px 10px !important;
  padding: 8px 0 !important;
  box-shadow: 0 16px 40px -8px rgba(0,0,0,0.5) !important;
  z-index: 9999 !important;
  list-style: none !important;
}
.primary-menu-list > li:hover > .sub-menu li,
.primary-menu-list > li:focus-within > .sub-menu li {
  display: block !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}
.primary-menu-list > li:hover > .sub-menu li:last-child,
.primary-menu-list > li:focus-within > .sub-menu li:last-child {
  border-bottom: none !important;
}
.primary-menu-list > li:hover > .sub-menu a,
.primary-menu-list > li:focus-within > .sub-menu a {
  display: block !important;
  padding: 10px 18px !important;
  color: #94a3b8 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  white-space: normal !important;
  width: 100% !important;
  transition: color 0.15s, background 0.15s !important;
}
.primary-menu-list > li:hover > .sub-menu a:hover,
.primary-menu-list > li:focus-within > .sub-menu a:hover {
  color: var(--amber) !important;
  background: rgba(245,166,35,0.08) !important;
  text-decoration: none !important;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: 0.3s;
}
.hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0; right: -100%;
  width: min(320px, 90vw);
  height: 100%;
  background: var(--navy);
  z-index: 2000;
  transition: right 0.35s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  padding: 0;
}
.mobile-drawer.is-open { right: 0; }
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1999;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.drawer-overlay.is-open { opacity: 1; pointer-events: all; }
.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.drawer-logo {
  font-family: var(--ff-h);
  font-size: 18px;
  font-weight: 900;
  color: white;
  text-transform: uppercase;
}
.drawer-logo span { color: var(--amber); }
.drawer-close {
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  width: 36px; height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.mobile-menu-list {
  list-style: none;
  margin: 0; padding: 16px;
}
.mobile-menu-list li a {
  display: block;
  color: #cbd5e1;
  font-weight: 600;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 16px;
  border-radius: 8px;
  transition: 0.2s;
}
.mobile-menu-list li a:hover { color: var(--amber); background: rgba(245,166,35,0.1); text-decoration: none; }

/* ─────────────────────────────────────────
   HERO SECTION — INTERACTIVE
───────────────────────────────────────── */
.hero-cover {
  background: var(--navy);
  background-image: radial-gradient(ellipse at 30% 40%, #243554 0%, #0f172a 65%);
  color: white;
  padding: 80px 20px 100px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  position: relative;
  overflow: hidden;
}

/* Animated gear decorations */
.hero-gear {
  position: absolute;
  opacity: 0.13;
  color: var(--amber);
  pointer-events: none;
  z-index: 0;
  animation: gearSpin linear infinite;
  transform-origin: center;
  fill: var(--amber);
}
.hero-gear-1 { width: 170px; height: 170px; top: -30px;  left: -40px;  animation-duration: 20s; }
.hero-gear-2 { width: 100px; height: 100px; top: 30px;   left: 115px;  animation-duration: 13s; animation-direction: reverse; }
.hero-gear-3 { width: 230px; height: 230px; bottom: -60px; right: -50px; animation-duration: 26s; }
.hero-gear-4 { width: 90px;  height: 90px;  bottom: 10px;  right: 155px; animation-duration: 11s; animation-direction: reverse; }
.hero-gear-5 { width: 120px; height: 120px; top: 40%;    left: 4%;     animation-duration: 22s; opacity: 0.08; }
.hero-gear-6 { width: 85px;  height: 85px;  top: 25%;    right: 6%;    animation-duration: 15s; animation-direction: reverse; opacity: 0.08; }

@keyframes gearSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Circuit-board dot grid */
.hero-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(245,166,35,0.18) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* Sweep scan line */
.hero-cover::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(to bottom, transparent, rgba(245,166,35,0.04), transparent);
  animation: scanLine 7s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes scanLine {
  0%   { top: -40%; }
  100% { top: 120%; }
}


/* Cursor glow blob */
.hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,166,35,0.08) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: left 0.12s ease-out, top 0.12s ease-out;
  z-index: 0;
  left: 50%; top: 50%;
}

.hero-inner {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  z-index: 1;
}
.hero-inner h1 {
  font-family: var(--ff-h);
  font-size: clamp(38px, 7vw, 72px);
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 20px;
  line-height: 1;
  letter-spacing: -0.5px;
  text-shadow: 0 0 60px rgba(245,166,35,0.15);
}
.hero-inner h1 span { color: var(--amber); }
.hero-inner p {
  font-size: clamp(16px, 2.5vw, 20px);
  color: #94a3b8;
  line-height: 1.65;
  margin: 0 auto 36px;
  max-width: 640px;
}

/* Stats row */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 3vw, 32px);
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.hero-stats .stat {
  text-align: center;
  background: rgba(245,166,35,0.06);
  border: 1px solid rgba(245,166,35,0.35);
  border-radius: 12px;
  padding: 16px 24px;
  min-width: 100px;
  transition: background 0.3s, border-color 0.3s, transform 0.2s, box-shadow 0.3s;
  cursor: default;
  box-shadow: 0 0 0 0 rgba(245,166,35,0);
  position: relative;
}
.hero-stats .stat::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(245,166,35,0.15), transparent 60%);
  pointer-events: none;
}
.hero-stats .stat:hover {
  background: rgba(245,166,35,0.12);
  border-color: var(--amber);
  transform: translateY(-4px);
  box-shadow: 0 0 24px rgba(245,166,35,0.25), 0 8px 20px -6px rgba(0,0,0,0.4);
}
.hero-stats .stat span {
  display: block;
  font-family: var(--ff-h);
  font-size: clamp(28px, 5vw, 42px);
  color: var(--amber);
  font-weight: 900;
  line-height: 1;
}
.hero-stats .stat em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #64748b;
  display: block;
  margin-top: 6px;
}

/* Scrolling tool ticker */
.hero-ticker {
  display: flex;
  align-items: center;
  background: rgba(245,166,35,0.07);
  border: 1px solid rgba(245,166,35,0.18);
  border-radius: 100px;
  padding: 9px 20px;
  width: fit-content;
  max-width: min(560px, 90vw);
  margin: 0 auto;
  overflow: hidden;
}
.hero-ticker-label {
  font-family: var(--ff-h);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--amber);
  white-space: nowrap;
  margin-right: 14px;
  flex-shrink: 0;
}
.hero-ticker-track { overflow: hidden; flex: 1; }
.hero-ticker-inner {
  display: flex;
  animation: tickerScroll 30s linear infinite;
  white-space: nowrap;
}
.hero-ticker-inner span {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
  padding-right: 36px;
}
.hero-ticker-inner span::before { content: '⚙ '; color: var(--amber); font-size: 11px; }
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .hero-gear, .hero-cover::before, .hero-ticker-inner { animation: none !important; }
}

/* ─────────────────────────────────────────
   LAYOUT
───────────────────────────────────────── */
.site-body {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 36px;
  align-items: flex-start;
}
.main-content { flex: 1; min-width: 0; }
.main-content.full-width { width: 100%; }

/* ─────────────────────────────────────────
   HUB GRID (50 TOOLS)
───────────────────────────────────────── */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin: 0 0 60px;
  padding-top: 48px;
}
.hub-cat-box {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.hub-cat-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px -8px rgba(0,0,0,0.18);
}
.hub-cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--bg);
}
.cat-icon { font-size: 24px; line-height: 1; }
.hub-cat-header h2 {
  font-family: var(--ff-h);
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  flex: 1;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cat-badge {
  font-size: 11px;
  font-weight: 800;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 20px;
  color: #64748b;
  letter-spacing: 0.5px;
}
.hub-tool-list { display: flex; flex-direction: column; gap: 6px; }
.hub-tool-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  border-radius: 8px;
  background: var(--bg);
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  border: 1px solid transparent;
}
.hub-tool-link:hover {
  background: var(--amber-light);
  transform: translateX(4px);
  border-color: #fde68a;
  text-decoration: none;
}
.tl-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--slate);
  line-height: 1.3;
  flex: 1;
  margin-right: 10px;
}
.tl-tag {
  font-family: var(--ff-h);
  font-size: 10px;
  font-weight: 800;
  color: var(--amber-dark);
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

/* ─────────────────────────────────────────
   HOME ARTICLES
───────────────────────────────────────── */
.home-articles { margin-bottom: 60px; }
.section-title {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.section-title h2 {
  font-family: var(--ff-h);
  font-size: 32px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0;
  white-space: nowrap;
}
.title-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--amber), transparent);
}
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.home-article-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.home-article-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.ha-title {
  font-family: var(--ff-h);
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.3;
}
.ha-title a { color: var(--navy); text-decoration: none; }
.ha-title a:hover { color: var(--amber-dark); }
.ha-excerpt { font-size: 14px; color: var(--muted); line-height: 1.6; flex: 1; margin-bottom: 16px; }
.ha-more {
  font-size: 13px;
  font-weight: 700;
  color: var(--amber-dark);
  letter-spacing: 0.5px;
}
.ha-more:hover { text-decoration: underline; }

/* ─────────────────────────────────────────
   PAGE HEADER
───────────────────────────────────────── */
.page-header {
  background: var(--navy);
  padding: 44px 20px;
  border-bottom: 4px solid var(--amber);
}
.page-header .site-wrapper {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 4px;
}
.page-header h1 {
  font-family: var(--ff-h);
  font-size: clamp(28px, 5vw, 48px);
  color: #ffffff;
  font-weight: 900;
  text-transform: uppercase;
  margin: 0 0 10px;
  letter-spacing: 0.5px;
}
.breadcrumb { font-size: 13px; color: #64748b; }
.breadcrumb a { color: var(--amber); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ─────────────────────────────────────────
   SINGLE / POST
───────────────────────────────────────── */
.single-article { padding: 40px 0; }
.post-featured-image {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
}
.post-meta a { color: var(--amber-dark); }
.post-meta .cat-label {
  background: var(--amber);
  color: white;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Post Content Typography */
.entry-content { color: var(--slate); font-size: 16px; line-height: 1.75; }
.entry-content h2 {
  font-family: var(--ff-h);
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--amber);
  display: inline-block;
}
.entry-content h3 {
  font-family: var(--ff-h);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin: 32px 0 12px;
}
.entry-content p { margin: 0 0 20px; }
.entry-content ul, .entry-content ol { margin: 0 0 20px; padding-left: 24px; }
.entry-content li { margin-bottom: 8px; }
.entry-content strong { color: var(--navy); font-weight: 700; }
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.entry-content th {
  background: var(--navy);
  color: white;
  font-family: var(--ff-h);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  text-align: left;
}
.entry-content td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}
.entry-content tr:nth-child(even) td { background: var(--bg); }
.entry-content tr:last-child td { border-bottom: none; }
.entry-content blockquote {
  border-left: 4px solid var(--amber);
  padding: 16px 20px;
  background: var(--amber-light);
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
  color: var(--slate-mid);
  font-style: italic;
}
.entry-content img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 24px auto;
}

/* ─────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────── */
.sidebar {
  width: 320px;
  flex-shrink: 0;
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.sidebar-featured-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.sidebar-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}
.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.sidebar-widget h3 {
  font-family: var(--ff-h);
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--navy);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--amber);
}
/* Search form inside sidebar */
.sidebar-widget .search-form,
.sidebar-widget form { display: flex; flex-direction: column; gap: 8px; }
.sidebar-widget input[type="search"],
.sidebar-widget input[type="text"] {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: var(--ff-b);
  font-size: 15px;
  color: var(--slate);
  background: var(--bg);
  transition: border-color 0.2s;
}
.sidebar-widget input[type="search"]:focus,
.sidebar-widget input[type="text"]:focus { border-color: var(--amber); outline: none; }
.sidebar-widget input[type="submit"] {
  width: 100%;
  padding: 11px;
  background: var(--amber);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: var(--ff-h);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.2s;
}
.sidebar-widget input[type="submit"]:hover { background: var(--amber-dark); }

/* All widget list items — unified readable size */
.widget_recent_entries ul,
.widget_categories ul,
.widget_pages ul,
.widget_recent_comments ul,
.widget_archive ul,
.widget_tag_cloud,
.sidebar-widget ul {
  list-style: none;
  padding: 0; margin: 0;
}
.widget_recent_entries li,
.widget_categories li,
.widget_pages li,
.widget_recent_comments li,
.widget_archive li,
.sidebar-widget ul li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  line-height: 1.4;
}
.widget_recent_entries li:last-child,
.widget_categories li:last-child,
.widget_pages li:last-child,
.widget_recent_comments li:last-child,
.widget_archive li:last-child,
.sidebar-widget ul li:last-child { border-bottom: none; }

.widget_recent_entries a,
.widget_categories a,
.widget_pages a,
.widget_recent_comments a,
.widget_archive a,
.sidebar-widget ul a {
  color: var(--slate);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  display: block;
  transition: color 0.2s;
}
.widget_recent_entries a:hover,
.widget_categories a:hover,
.widget_pages a:hover,
.widget_recent_comments a:hover,
.widget_archive a:hover,
.sidebar-widget ul a:hover {
  color: var(--amber-dark);
  text-decoration: none;
}

/* wp_widget_recent_entries post count badge */
.widget_recent_entries .post-count,
.widget_categories .post-count {
  font-size: 12px;
  background: var(--bg);
  color: var(--muted);
  padding: 1px 7px;
  border-radius: 10px;
  margin-left: 6px;
}

/* Quick tool links in sidebar */
.sidebar-tools-list { list-style: none; padding: 0; margin: 0; }
.sidebar-tools-list li {
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.sidebar-tools-list li:last-child { border-bottom: none; }
.sidebar-tools-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  color: var(--slate);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  transition: color 0.2s;
  gap: 10px;
}
.sidebar-tools-list a:hover { color: var(--amber-dark); text-decoration: none; }
.sidebar-tools-list .stl-tag {
  font-family: var(--ff-h);
  font-size: 11px;
  font-weight: 800;
  color: var(--amber-dark);
  background: #fef3c7;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────
   RELATED TOOLS (in post/page)
───────────────────────────────────────── */
.cat-section { margin: 40px 0; }
.cat-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.cat-title {
  font-family: var(--ff-h);
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  text-transform: uppercase;
  white-space: nowrap;
}
.cat-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--amber), transparent);
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--amber);
  text-decoration: none;
}
.tc-num {
  font-family: var(--ff-h);
  font-size: 11px;
  font-weight: 800;
  color: var(--amber-dark);
  background: var(--amber-light);
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
}
.tc-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}
.tc-desc { font-size: 13px; color: var(--muted); line-height: 1.4; flex: 1; }
.tc-arrow {
  font-size: 13px;
  font-weight: 700;
  color: var(--amber-dark);
  margin-top: 6px;
}

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: #94a3b8;
  padding: 72px 20px 0;
  border-top: 6px solid var(--amber);
  margin-top: 60px;
}
.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
}
.footer-col h4 {
  color: white;
  font-family: var(--ff-h);
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 18px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(245,166,35,0.3);
}
.footer-col p { font-size: 14px; line-height: 1.7; margin: 0 0 10px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #64748b; text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-col a:hover { color: var(--amber); }
.footer-bottom {
  max-width: 1300px;
  margin: 48px auto 0;
  padding: 20px 0 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  font-size: 12px;
  color: #334155;
}

/* ─────────────────────────────────────────
   404 & ARCHIVES
───────────────────────────────────────── */
.error-page { padding: 80px 20px; text-align: center; }
.error-page h2 { font-family: var(--ff-h); font-size: 48px; color: var(--navy); }
.archive-loop article {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

/* ─────────────────────────────────────────
   RESPONSIVE — TABLET
───────────────────────────────────────── */
@media (max-width: 1024px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .site-body { padding: 0 16px; gap: 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hub-grid { margin-top: -40px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .sidebar { width: 280px; }
}

/* ─────────────────────────────────────────
   RESPONSIVE — MOBILE
───────────────────────────────────────── */
@media (max-width: 768px) {
  .site-header { height: 64px; }
  .header-inner { padding: 0 16px; }
  .logo-sub { display: none; }

  .hero-cover { padding: 60px 16px 80px; }

  .site-body {
    flex-direction: column;
    padding: 0 14px;
  }
  .main-content { width: 100%; }

  .sidebar {
    width: 100%;
    padding-top: 0;
    order: -1; /* sidebar on top only for single posts — handled in PHP */
  }

  .hub-grid {
    grid-template-columns: 1fr;
    margin-top: -32px;
    gap: 16px;
  }
  .hub-cat-box { padding: 20px; }

  .articles-grid { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .site-footer { padding-top: 48px; }

  .page-header { padding: 32px 16px; }
  .section-title h2 { font-size: 24px; }

  .entry-content h2 { font-size: 22px; }
  .entry-content table { font-size: 13px; display: block; overflow-x: auto; }

  .sidebar.mobile-bottom { order: 2; }
}

@media (max-width: 480px) {
  .hero-stats { gap: 24px; }
  .hub-cat-header { flex-wrap: wrap; }
  .logo-text { font-size: 17px; }
}

/* ─────────────────────────────────────────
   ARCHIVE / BLOG PAGE
───────────────────────────────────────── */
.archive-info {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.archive-info strong { color: var(--navy); }

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.archive-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.archive-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.archive-card-thumb {
  display: block;
  overflow: hidden;
  flex-shrink: 0;
}
.archive-card-thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.archive-card:hover .archive-card-thumb img {
  transform: scale(1.04);
}

.archive-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.archive-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.archive-cat-tag {
  display: inline-block;
  background: var(--amber);
  color: white;
  font-family: var(--ff-h);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s;
}
.archive-cat-tag:hover { background: var(--amber-dark); text-decoration: none; }
.archive-read-time {
  font-size: 12px;
  color: var(--muted);
}

.archive-card-title {
  font-family: var(--ff-h);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
  color: var(--navy);
}
.archive-card-title a {
  color: var(--navy);
  text-decoration: none;
}
.archive-card-title a:hover { color: var(--amber-dark); }

.archive-card-excerpt {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

.archive-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.archive-date { font-size: 12px; color: var(--muted); }
.archive-read-more {
  font-size: 13px;
  font-weight: 700;
  color: var(--amber-dark);
  text-decoration: none;
  transition: color 0.2s;
}
.archive-read-more:hover { color: var(--navy); }

/* ── PAGINATION ──────────────────────────── */
.twc-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.page-numbers-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  font-family: var(--ff-h);
  font-size: 15px;
  font-weight: 700;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--slate);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
  cursor: pointer;
  white-space: nowrap;
}
.page-btn:hover {
  background: var(--amber-light);
  border-color: var(--amber);
  color: var(--amber-dark);
  transform: translateY(-1px);
  text-decoration: none;
}
.page-btn.current {
  background: var(--amber);
  border-color: var(--amber);
  color: white;
  box-shadow: 0 4px 12px rgba(245,166,35,0.35);
  pointer-events: none;
}
.page-btn.prev-btn,
.page-btn.next-btn {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
  padding: 0 18px;
}
.page-btn.prev-btn:hover,
.page-btn.next-btn:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: white;
}
.page-dots {
  font-size: 16px;
  color: var(--muted);
  padding: 0 4px;
  line-height: 40px;
}
.pagination-count {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 32px;
}

/* Responsive archive */
@media (max-width: 640px) {
  .archive-grid { grid-template-columns: 1fr; gap: 16px; }
  .archive-card-thumb img { height: 180px; }
  .page-btn { min-width: 36px; height: 36px; font-size: 14px; }
}

/* ─────────────────────────────────────────
   RELATED ARTICLES (single post)
───────────────────────────────────────── */
.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.related-article-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: var(--shadow);
}
.related-article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--amber);
  text-decoration: none;
}
.rac-thumb { overflow: hidden; flex-shrink: 0; }
.rac-thumb img {
  width: 100%; height: 160px;
  object-fit: cover; display: block;
  transition: transform 0.35s ease;
}
.related-article-card:hover .rac-thumb img { transform: scale(1.05); }
.rac-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.rac-cat {
  font-family: var(--ff-h);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: var(--amber);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
}
.rac-title {
  font-family: var(--ff-h);
  font-size: 17px;
  font-weight: 800;
  color: var(--navy);
  margin: 0;
  line-height: 1.25;
}
.rac-excerpt {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}
.rac-more {
  font-size: 13px;
  font-weight: 700;
  color: var(--amber-dark);
  margin-top: 4px;
}

@media (max-width: 768px) {
  .related-articles-grid { grid-template-columns: 1fr; gap: 14px; }
  .rac-thumb img { height: 180px; }
}
@media (min-width: 769px) and (max-width: 900px) {
  .related-articles-grid { grid-template-columns: repeat(2, 1fr); }
}
