/*
Theme Name: ToolsMaster Pro
Theme URI: https://toolsmaster.pro
Author: ToolsMaster
Author URI: https://toolsmaster.pro
Description: A professional, modern WordPress theme for online tools websites. Built for performance, SEO, and a stunning SaaS-style UI. Compatible with Elementor and Gutenberg.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: toolsmaster
Tags: tools, saas, modern, responsive, dark-mode, custom-post-types, elementor, gutenberg
*/

/* =============================================
   CSS CUSTOM PROPERTIES / DESIGN TOKENS
   ============================================= */
:root {
  --color-primary: #0f172a;
  --color-primary-light: #1e293b;
  --color-accent: #6366f1;
  --color-accent-2: #06b6d4;
  --color-accent-hover: #4f46e5;
  --color-surface: #ffffff;
  --color-surface-2: #f8fafc;
  --color-surface-3: #f1f5f9;
  --color-border: #e2e8f0;
  --color-text: #0f172a;
  --color-text-secondary: #64748b;
  --color-text-muted: #94a3b8;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;

  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.1), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);
  --shadow-accent: 0 8px 32px rgba(99,102,241,0.25);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-display: 'Poppins', sans-serif;
  --font-body: 'Poppins', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  --max-width: 1280px;
  --header-height: 80px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --color-primary: #f8fafc;
  --color-primary-light: #e2e8f0;
  --color-surface: #0f172a;
  --color-surface-2: #1e293b;
  --color-surface-3: #1e293b;
  --color-border: #334155;
  --color-text: #f1f5f9;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  --gradient-card: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  --gradient-hero: linear-gradient(135deg, #020817 0%, #0f172a 50%, #020817 100%);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.3);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.6);
  --shadow-accent: 0 8px 32px rgba(99,102,241,0.35);
  --color-accent: #818cf8;
  --color-accent-hover: #6366f1;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-surface);
  line-height: 1.75;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-accent-hover); }
ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--color-text);
  font-weight: 700;
}

/* =============================================
   UTILITY CLASSES
   ============================================= */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-pad { padding: 112px 0; }
.section-pad-sm { padding: 72px 0; }

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(99,102,241,0.4);
  color: #fff;
}

.btn-secondary {
  background: var(--color-surface-3);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-surface-2);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}
.btn-outline:hover {
  background: var(--color-accent);
  color: #fff;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-accent {
  background: rgba(99,102,241,0.1);
  color: var(--color-accent);
  border: 1px solid rgba(99,102,241,0.2);
}

.section-header {
  text-align: center;
  margin-bottom: 72px;
}
.section-header .badge { margin-bottom: 20px; }
.section-header h2 {
  font-size: clamp(1.9rem, 3vw, 2.75rem);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.section-header p {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
}

/* =============================================
   HEADER / NAVIGATION  — unified clean rewrite
   ============================================= */

/* ── Header shell ── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow 0.3s ease, background 0.3s ease;
  overflow: visible;
}
[data-theme="dark"] #site-header {
  background: rgba(10,15,28,0.92);
}
#site-header.is-scrolled {
  box-shadow: 0 4px 32px rgba(0,0,0,0.10);
}

/* ── Header inner layout ── */
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Logo ── */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--gradient-primary);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99,102,241,0.35);
}
.logo-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.025em;
  white-space: nowrap;
}
.logo-text span { color: var(--color-accent); }

/* ── Primary nav container ── */
.primary-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

/* ── Top-level list ── */
.primary-nav > ul {
  display: flex;
  align-items: center;
  gap: 1px;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: visible;
}

/* ── Every nav list item ── */
.primary-nav > ul > li {
  position: relative;
  display: flex;
  align-items: center;
}

/* ── Top-level links ── */
.primary-nav > ul > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
  line-height: 1.2;
  position: relative; /* needed for ::after active underline */
}
.primary-nav > ul > li > a:hover {
  color: var(--color-text);
  background: var(--color-surface-3);
}
.primary-nav > ul > li > a.active {
  color: var(--color-accent);
  background: rgba(99,102,241,0.09);
  font-weight: 600;
}

/* ── Nav icon (SVG) ── */
.primary-nav .nav-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: currentColor;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.primary-nav .nav-icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.8;
}
.primary-nav > ul > li > a:hover .nav-icon,
.primary-nav > ul > li > a.active .nav-icon {
  opacity: 1;
}

/* ── Nav chevron (dropdown arrow) ── */
.primary-nav .nav-chevron {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  opacity: 0.45;
  margin-left: 2px;
  transition: transform 0.2s ease, opacity 0.15s;
}
.primary-nav > ul > li:hover > a .nav-chevron,
.primary-nav > ul > li.is-open > a .nav-chevron {
  transform: rotate(180deg);
  opacity: 0.9;
}

/* ── Active indicator: accent underline ── */
.primary-nav > ul > li > a.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px 2px 0 0;
}
/* ::after underline is positioned relative to the <a> above */

/* ── Header search bar ── */
.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-surface-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  min-width: 200px;
  max-width: 240px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.header-search:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
  background: var(--color-surface);
  min-width: 240px;
}
.header-search svg {
  color: var(--color-text-muted);
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}
.header-search input {
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-text);
  outline: none;
  width: 100%;
  min-width: 0;
}
.header-search input::placeholder { color: var(--color-text-muted); }

/* ── Header actions (dark toggle + hamburger) ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Dark mode toggle ── */
.dark-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--color-text-secondary);
  flex-shrink: 0;
}
.dark-toggle:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(99,102,241,0.07);
}

/* ── Mobile hamburger toggle ── */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.mobile-menu-toggle:hover {
  border-color: var(--color-accent);
}
.mobile-menu-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--color-text);
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.22s ease, opacity 0.18s ease;
}
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── sub-menu-toggle button: hidden on desktop (chevron is inline in <a>) ── */
.primary-nav .sub-menu-toggle { display: none; }

/* =============================================
   DESKTOP DROPDOWN SUB-MENUS
   ============================================= */

/* ── Dropdown panel ── */
.primary-nav .sub-menu {
  display: block;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 200px;
  width: max-content;
  max-width: 260px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  padding: 5px;
  z-index: 9999;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}
[data-theme="dark"] .primary-nav .sub-menu {
  background: #1a2540;
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.3);
}

/* ── Caret above dropdown ── */
.primary-nav .sub-menu::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  border-top:  1px solid var(--color-border);
  transform: translateX(-50%) rotate(45deg);
}
[data-theme="dark"] .primary-nav .sub-menu::before {
  background: #1a2540;
  border-color: rgba(255,255,255,0.1);
}

/* ── Show on hover / focus-within / .is-open ── */
.primary-nav > ul > li:hover       > .sub-menu,
.primary-nav > ul > li:focus-within > .sub-menu,
.primary-nav > ul > li.is-open      > .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

/* ── Edge corrections: first item aligns left, last aligns right ── */
.primary-nav > ul > li:first-child > .sub-menu {
  left: 0;
  transform: translateY(-8px);
}
.primary-nav > ul > li:first-child:hover > .sub-menu,
.primary-nav > ul > li:first-child.is-open > .sub-menu { transform: translateY(0); }
.primary-nav > ul > li:first-child > .sub-menu::before { left: 18px; transform: rotate(45deg); }

.primary-nav > ul > li:last-child > .sub-menu {
  left: auto;
  right: 0;
  transform: translateY(-8px);
}
.primary-nav > ul > li:last-child:hover > .sub-menu,
.primary-nav > ul > li:last-child.is-open > .sub-menu { transform: translateY(0); }
.primary-nav > ul > li:last-child > .sub-menu::before { left: auto; right: 18px; transform: rotate(45deg); }

/* ── Dropdown items ── */
.primary-nav .sub-menu > li {
  display: block;
  position: relative;
}
.primary-nav .sub-menu > li + li {
  border-top: 1px solid var(--color-border);
}
[data-theme="dark"] .primary-nav .sub-menu > li + li {
  border-color: rgba(255,255,255,0.07);
}
.primary-nav .sub-menu > li > a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: 7px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.primary-nav .sub-menu > li > a .nav-icon {
  opacity: 0.5;
  transition: opacity 0.15s;
}
.primary-nav .sub-menu > li > a:hover {
  background: var(--color-surface-3);
  color: var(--color-accent);
}
[data-theme="dark"] .primary-nav .sub-menu > li > a:hover {
  background: rgba(255,255,255,0.07);
  color: var(--color-accent);
}
.primary-nav .sub-menu > li > a:hover .nav-icon { opacity: 1; }
.primary-nav .sub-menu > li > a.active {
  color: var(--color-accent);
  background: rgba(99,102,241,0.08);
}
.primary-nav .sub-menu > li > a.active::after { display: none; }

/* ── Nested second-level sub-menus ── */
.primary-nav .sub-menu .sub-menu {
  top: -5px;
  left: calc(100% + 6px);
  transform: translateY(-6px);
}
.primary-nav .sub-menu > li:hover > .sub-menu,
.primary-nav .sub-menu > li.is-open > .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateY(0);
}
.primary-nav .sub-menu .sub-menu::before { display: none; }

/* =============================================
   MOBILE NAV DRAWER
   ============================================= */

/* ── Drawer shell — slides down from header ── */
.mobile-nav {
  display: none;
  position: relative;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.32s cubic-bezier(0.4,0,0.2,1);
}
[data-theme="dark"] .mobile-nav {
  background: #0d1526;
  border-color: rgba(255,255,255,0.08);
}
@media (max-width: 768px) { .mobile-nav { display: block; } }
.mobile-nav.is-open {
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Nav list ── */
.mobile-nav-list {
  padding: 10px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0;
}

/* ── Each top-level item: CSS Grid puts link + toggle on row 1, submenu on row 2 ── */
.mobile-nav-list > li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  border-bottom: 1px solid var(--color-border);
}
[data-theme="dark"] .mobile-nav-list > li {
  border-color: rgba(255,255,255,0.07);
}
.mobile-nav-list > li:last-child { border-bottom: none; }

/* ── Top-level links: always row 1, col 1 ── */
.mobile-nav-list > li > a {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 4px;
  color: var(--color-text);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
  line-height: 1.3;
}
/* Items without children span full width */
.mobile-nav-list > li:not(.menu-item-has-children) > a {
  grid-column: 1 / -1;
}
.mobile-nav-list > li > a:hover,
.mobile-nav-list > li > a.active {
  color: var(--color-accent);
}
.mobile-nav-list > li > a.active {
  font-weight: 600;
}

/* ── Icon chip in mobile nav ── */
.mobile-nav-list .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--color-surface-3);
  border-radius: 8px;
  flex-shrink: 0;
  color: var(--color-text-secondary);
  transition: background 0.15s, color 0.15s;
}
[data-theme="dark"] .mobile-nav-list .nav-icon {
  background: rgba(255,255,255,0.07);
}
.mobile-nav-list .nav-icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.8;
}
.mobile-nav-list > li > a:hover .nav-icon,
.mobile-nav-list > li > a.active .nav-icon {
  background: rgba(99,102,241,0.12);
  color: var(--color-accent);
}

/* ── Hide inline chevron inside mobile links ── */
.mobile-nav-list .nav-chevron { display: none; }

/* ── Sub-menu toggle button: grid row 1 col 2, no absolute positioning ── */
.mobile-nav-list .sub-menu-toggle {
  grid-column: 2;
  grid-row: 1;
  position: static;   /* grid handles placement — no top/right needed */
  align-self: center;
  justify-self: end;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-surface-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
  margin: 8px 0;
}
[data-theme="dark"] .mobile-nav-list .sub-menu-toggle {
  background: rgba(255,255,255,0.07);
}
.mobile-nav-list .sub-menu-toggle svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
  transition: transform 0.22s ease;
}
.mobile-nav-list li.is-open > .sub-menu-toggle {
  background: rgba(99,102,241,0.12);
  color: var(--color-accent);
}
.mobile-nav-list li.is-open > .sub-menu-toggle svg {
  transform: rotate(180deg);
}
/* ── Toggle button: row 1 col 2, static positioning via grid ── */
.mobile-nav-list li.menu-item-has-children > a {
  padding-right: 0; /* grid handles spacing, no manual padding needed */
}

/* ── Mobile sub-menu accordion: row 2, spans all columns ── */
.mobile-nav-list > li > .sub-menu {
  grid-column: 1 / -1;
  grid-row: 2;
}
.mobile-nav-list .sub-menu {
  display: none;
  position: static;
  visibility: visible;
  opacity: 1;
  pointer-events: all;
  transform: none;
  box-shadow: none;
  border: none;
  border-radius: 0;
  padding: 4px 0 8px 16px;
  background: transparent;
  width: 100%;
  list-style: none;
}
.mobile-nav-list .sub-menu::before { display: none; }
.mobile-nav-list li.is-open > .sub-menu {
  display: block;
  animation: mobileSubIn 0.18s ease both;
}
@keyframes mobileSubIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mobile-nav-list .sub-menu > li > a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 8px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--color-border);
  margin-left: 4px;
  padding-left: 12px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.mobile-nav-list .sub-menu > li > a .nav-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: transparent;
}
.mobile-nav-list .sub-menu > li > a:hover,
.mobile-nav-list .sub-menu > li > a.active {
  color: var(--color-accent);
  border-left-color: var(--color-accent);
  background: rgba(99,102,241,0.05);
}

/* =============================================
   HEADER RESPONSIVE BREAKPOINTS
   ============================================= */
@media (max-width: 1200px) {
  .header-inner { gap: 16px; padding: 0 24px; }
  .header-search { min-width: 160px; }
  .primary-nav > ul > li > a { padding: 7px 9px; font-size: 0.82rem; gap: 4px; }
}
@media (max-width: 1024px) {
  .header-search { display: none; }
  .primary-nav > ul > li > a { padding: 7px 9px; font-size: 0.82rem; }
}
@media (max-width: 900px) {
  /* Icon-only nav at narrow desktop — labels hidden, icons bigger */
  .primary-nav > ul > li > a {
    padding: 9px 8px;
  }
  .primary-nav .nav-label { display: none; }
  .primary-nav .nav-chevron { display: none; }
  .primary-nav .nav-icon { opacity: 0.85; }
  .primary-nav .nav-icon svg { width: 20px; height: 20px; }
  .primary-nav > ul > li > a:hover .nav-icon { opacity: 1; }
  /* Hide underline at this width */
  .primary-nav > ul > li.current-menu-item::after,
  .primary-nav > ul > li:has(> a.active)::after { display: none; }
  /* Tooltip via title attribute — browser-native, always works */
}
@media (max-width: 768px) {
  .primary-nav  { display: none; }
  .header-search { display: none; }
  .mobile-menu-toggle { display: flex; }
  .header-inner { gap: 12px; padding: 0 16px; }
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero-section {
  background: var(--gradient-hero);
  padding: 120px 0 96px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(99,102,241,0.3) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(6,182,212,0.2) 0%, transparent 50%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  color: rgba(255,255,255,0.8);
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 40px;
  backdrop-filter: blur(10px);
}
.hero-badge .dot {
  width: 20px;
  height: 20px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

.hero-desc {
  color: rgba(255,255,255,0.65);
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto 52px;
  line-height: 1.85;
  font-weight: 300;
}

/* Hero Search */
.hero-search-wrap {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-xl);
  padding: 6px 6px 6px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 580px;
  margin: 0 auto 48px;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}
.hero-search-wrap:focus-within {
  border-color: rgba(99,102,241,0.5);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.15);
}
.hero-search-wrap svg { color: rgba(255,255,255,0.4); flex-shrink: 0; }
.hero-search-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 1rem;
  color: #fff;
}
.hero-search-wrap input::placeholder { color: rgba(255,255,255,0.4); }
.hero-search-wrap .btn { flex-shrink: 0; }

/* Popular Tools Pills */
.hero-popular {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-popular span {
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  font-weight: 500;
}
.tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-full);
  color: rgba(255,255,255,0.75);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.tool-pill:hover {
  background: rgba(99,102,241,0.2);
  border-color: rgba(99,102,241,0.4);
  color: #fff;
}

/* =============================================
   STATS BAR
   ============================================= */
.stats-bar {
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 32px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 32px;
  border-right: 1px solid var(--color-border);
}
.stat-item:first-child { padding-left: 0; }
.stat-item:last-child { border-right: none; }

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.stat-info strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.1;
}
.stat-info span {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* =============================================
   CATEGORIES SECTION
   ============================================= */
.categories-section {
  background: var(--color-surface);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.category-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99,102,241,0.3);
}
.category-card:hover::before { opacity: 1; }

.cat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.cat-info { flex: 1; min-width: 0; }
.cat-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.cat-info p {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin-bottom: 14px;
}

.cat-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(99,102,241,0.08);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.cat-arrow {
  color: var(--color-text-muted);
  margin-left: auto;
  transition: var(--transition);
  align-self: center;
  flex-shrink: 0;
}
.category-card:hover .cat-arrow {
  color: var(--color-accent);
  transform: translateX(4px);
}

/* Category Colors */
.cat-image  { background: rgba(239,68,68,0.1); }
.cat-seo    { background: rgba(99,102,241,0.1); }
.cat-text   { background: rgba(16,185,129,0.1); }
.cat-dev    { background: rgba(245,158,11,0.1); }
.cat-pdf    { background: rgba(239,68,68,0.1); }
.cat-calc   { background: rgba(6,182,212,0.1); }

/* =============================================
   POPULAR TOOLS SECTION
   ============================================= */
.tools-section {
  background: var(--color-surface-2);
}

.tools-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 48px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.tool-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  /* overflow:hidden removed — it was clipping box-shadow on hover */
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(99,102,241,0.15);
  border-color: rgba(99,102,241,0.35);
}

.tool-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.tool-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(16,185,129,0.1);
  color: var(--color-success);
  border: 1px solid rgba(16,185,129,0.2);
}
.tool-badge.hot {
  background: rgba(239,68,68,0.1);
  color: var(--color-error);
  border-color: rgba(239,68,68,0.2);
}
.tool-badge.new {
  background: rgba(99,102,241,0.1);
  color: var(--color-accent);
  border-color: rgba(99,102,241,0.2);
}

.tool-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.tool-card p {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  flex: 1;
}

.tool-card .btn {
  justify-content: center;
  padding: 10px;
  font-size: 0.85rem;
  border-radius: var(--radius-md);
  /* width:100% removed — .tool-card-btns uses flex to size buttons */
}

.tools-cta {
  text-align: center;
  margin-top: 64px;
}

/* =============================================
   FEATURES SECTION
   ============================================= */
.features-section {
  background: var(--color-surface);
  position: relative;
  overflow: hidden;
}

.features-section::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(ellipse, rgba(99,102,241,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: center;
}

.features-content { padding-right: 40px; }
.features-content .badge { margin-bottom: 20px; }
.features-content h2 {
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
  margin-bottom: 16px;
  line-height: 1.2;
}
.features-content > p {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 40px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.feature-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.feature-item-text strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 3px;
}
.feature-item-text span {
  font-size: 0.825rem;
  color: var(--color-text-secondary);
}

.features-visual {
  position: relative;
}

.features-card-stack {
  position: relative;
  height: 420px;
}

.feat-card {
  position: absolute;
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-slow);
}

.feat-card-main {
  width: 320px;
  top: 40px;
  right: 0;
  z-index: 3;
}
.feat-card-2 {
  width: 280px;
  top: 0;
  left: 0;
  z-index: 2;
  transform: rotate(-3deg);
}
.feat-card-3 {
  width: 260px;
  bottom: 20px;
  right: 20px;
  z-index: 1;
  transform: rotate(2deg);
}

.feat-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.feat-card-header .icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: rgba(99,102,241,0.1);
}
.feat-card-header strong {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text);
}

.mini-bar {
  height: 6px;
  border-radius: 3px;
  margin-bottom: 6px;
  background: var(--color-border);
  overflow: hidden;
}
.mini-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--gradient-primary);
}

.mini-stat {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 12px;
}

/* =============================================
   BLOG SECTION
   ============================================= */
.blog-section {
  background: var(--color-surface-2);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.blog-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.blog-card-img {
  height: 200px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}
.blog-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.2));
}

.blog-card-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.775rem;
  color: var(--color-text-muted);
}
.blog-meta .category {
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.blog-card p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  flex: 1;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
}

.blog-author {
  display: flex;
  align-items: center;
  gap: 8px;
}
.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #fff;
  font-weight: 700;
}
.author-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.read-more {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* =============================================
   CTA BANNER
   ============================================= */
.cta-section {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  padding: 80px 0;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 80% at 50% 50%, rgba(99,102,241,0.3) 0%, transparent 70%);
}

.cta-content {
  position: relative;
  z-index: 2;
  text-align: center;
}
.cta-content h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: #fff;
  margin-bottom: 16px;
}
.cta-content p {
  color: rgba(255,255,255,0.7);
  font-size: 1.05rem;
  margin-bottom: 40px;
}
.cta-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* =============================================
   FOOTER
   ============================================= */
#site-footer {
  background: #0a0f1a;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
}

.footer-top {
  padding: 80px 0 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 56px;
}

.footer-brand .site-logo { margin-bottom: 16px; }
.footer-brand .logo-text { color: #fff; }
.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.5);
  margin-bottom: 24px;
  max-width: 280px;
}

.social-links {
  display: flex;
  gap: 10px;
}
.social-link {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  transition: var(--transition);
  text-decoration: none;
}
.social-link:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  margin-bottom: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col ul li a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  transition: var(--transition);
}
.footer-col ul li a:hover {
  color: #fff;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 20px 0;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p {
  font-size: 0.825rem;
  color: rgba(255,255,255,0.35);
}
.footer-bottom-links {
  display: flex;
  gap: 20px;
}
.footer-bottom-links a {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  transition: var(--transition);
}
.footer-bottom-links a:hover { color: rgba(255,255,255,0.7); }

/* =============================================
   TOOL SINGLE PAGE
   ============================================= */
.tool-hero {
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border);
  padding: 48px 0;
}
.tool-hero-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}
.tool-hero-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
  background: rgba(99,102,241,0.1);
}
.tool-hero h1 { font-size: 1.8rem; margin-bottom: 8px; }
.tool-hero p { color: var(--color-text-secondary); }

.tool-app {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

/* =============================================
   POST / PAGE HERO
   ============================================= */
.post-hero {
  background: var(--gradient-hero);
  padding: 80px 0 0;
  position: relative;
  overflow: hidden;
}
.post-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% -10%, rgba(99,102,241,0.35) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 85% 90%,  rgba(6,182,212,0.15) 0%, transparent 55%);
  pointer-events: none;
}
.post-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
}

.post-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 64px;
}

/* Category + meta row */
.post-hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.post-hero-meta .post-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(99,102,241,0.25);
  border: 1px solid rgba(99,102,241,0.4);
  border-radius: var(--radius-full);
  color: #a5b4fc;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.post-hero-meta .post-date,
.post-hero-meta .post-read-time {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  font-weight: 400;
}
.post-hero-meta .sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
}

/* Post title */
.post-hero-title {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

/* Post excerpt */
.post-hero-excerpt {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
  font-weight: 300;
  max-width: 640px;
  margin: 0 auto 40px;
}

/* Author strip at bottom of hero */
.post-hero-author {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  padding: 8px 20px 8px 8px;
  backdrop-filter: blur(10px);
}
.post-hero-author .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
}
.post-hero-author .author-info strong {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  line-height: 1.2;
}
.post-hero-author .author-info span {
  display: block;
  font-size: 0.725rem;
  color: rgba(255,255,255,0.4);
}

/* Featured image card — "popping" out of the hero */
.post-featured-image {
  position: relative;
  z-index: 3;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  transform: translateY(48px);
}
.post-featured-image img {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: 0 32px 80px rgba(0,0,0,0.35), 0 8px 24px rgba(0,0,0,0.2);
  display: block;
}
.post-featured-image-placeholder {
  width: 100%;
  height: 380px;
  border-radius: var(--radius-xl);
  background: var(--gradient-primary);
  box-shadow: 0 32px 80px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  opacity: 0.7;
}

/* =============================================
   CONTENT AREA WRAPPER
   ============================================= */
.content-area {
  padding: 64px 0 96px;
}
/* When there's a featured image that transforms down */
.content-area.has-featured-img { padding-top: 112px; }

/* =============================================
   ARTICLE / ENTRY CONTENT TYPOGRAPHY
   ============================================= */
.entry-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--color-text-secondary);
  max-width: 720px;
}

/* ── Headings ──────────────────────────────── */
.entry-content h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 2em 0 0.6em;
  padding-bottom: 0.4em;
  border-bottom: 2px solid var(--color-border);
}

.entry-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin: 2.2em 0 0.7em;
  position: relative;
  padding-left: 18px;
}
.entry-content h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.1em;
  bottom: 0.1em;
  width: 4px;
  border-radius: 4px;
  background: var(--gradient-primary);
}

.entry-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 1.8em 0 0.5em;
}

.entry-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 1.5em 0 0.5em;
  color: var(--color-accent);
}

/* ── Paragraphs ────────────────────────────── */
.entry-content p {
  margin-bottom: 1.6em;
  color: var(--color-text-secondary);
  line-height: 1.9;
  font-size: 1.05rem;
  font-weight: 400;
}
.entry-content > p:first-of-type {
  font-size: 1.15rem;
  color: var(--color-text);
  font-weight: 400;
  line-height: 1.8;
}

/* ── Lists ─────────────────────────────────── */
.entry-content ul,
.entry-content ol {
  padding-left: 0;
  margin-bottom: 1.6em;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.entry-content ul li,
.entry-content ol li {
  position: relative;
  padding-left: 28px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}
.entry-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gradient-primary);
}
.entry-content ol {
  counter-reset: ol-counter;
}
.entry-content ol li {
  counter-increment: ol-counter;
}
.entry-content ol li::before {
  content: counter(ol-counter);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 20px;
  height: 20px;
  background: var(--gradient-primary);
  border-radius: 50%;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Blockquote ────────────────────────────── */
.entry-content blockquote {
  margin: 2em 0;
  padding: 24px 28px 24px 36px;
  background: var(--color-surface-2);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  position: relative;
}
.entry-content blockquote::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 4rem;
  color: var(--color-accent);
  opacity: 0.2;
  font-family: Georgia, serif;
  line-height: 1;
}
.entry-content blockquote p {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--color-text);
  font-weight: 500;
  margin-bottom: 0;
}

/* ── Code ──────────────────────────────────── */
.entry-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: rgba(99,102,241,0.08);
  color: var(--color-accent);
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid rgba(99,102,241,0.15);
}
.entry-content pre {
  background: var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 28px;
  overflow-x: auto;
  margin: 2em 0;
  border: 1px solid rgba(255,255,255,0.06);
}
.entry-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: #e2e8f0;
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ── Images ────────────────────────────────── */
.entry-content img {
  border-radius: var(--radius-lg);
  margin: 2em 0;
  box-shadow: var(--shadow-md);
  width: 100%;
  height: auto;
}
.entry-content figcaption {
  text-align: center;
  font-size: 0.825rem;
  color: var(--color-text-muted);
  margin-top: -1em;
  margin-bottom: 2em;
  font-style: italic;
}

/* ── Tables ────────────────────────────────── */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 0.9rem;
}
.entry-content th {
  background: var(--color-surface-3);
  font-weight: 700;
  color: var(--color-text);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--color-border);
}
.entry-content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}
.entry-content tr:last-child td { border-bottom: none; }
.entry-content tr:hover td { background: var(--color-surface-2); }

/* ── Horizontal Rule ───────────────────────── */
.entry-content hr {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin: 2.5em 0;
}

/* ── Links inside content ──────────────────── */
.entry-content a {
  color: var(--color-accent);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(99,102,241,0.3);
  text-underline-offset: 3px;
  transition: var(--transition);
}
.entry-content a:hover {
  text-decoration-color: var(--color-accent);
}

/* ── Post footer ───────────────────────────── */
.post-footer {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.post-footer-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.post-footer-author .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.post-footer-author .info strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
}
.post-footer-author .info span {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ── Tags ──────────────────────────────────── */
.post-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.post-tags span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.post-tag {
  display: inline-flex;
  padding: 4px 12px;
  background: var(--color-surface-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: var(--transition);
}
.post-tag:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(99,102,241,0.06);
}

/* ── Page hero (static pages) ──────────────── */
.page-hero {
  background: var(--gradient-hero);
  padding: 80px 0 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% -10%, rgba(99,102,241,0.3) 0%, transparent 65%);
}
.page-hero-inner {
  position: relative;
  z-index: 2;
}
.page-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  line-height: 1.15;
}
.page-hero p {
  color: rgba(255,255,255,0.6);
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 560px;
  margin: 0 auto;
  font-weight: 300;
}

/* page content (no sidebar) */
.page-content-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 80px 24px;
}

/* =============================================
   SEARCH PAGE
   ============================================= */
.search-results-header {
  padding: 40px 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 40px;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

.sidebar-widget {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.sidebar-widget h3 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

/* =============================================
   MOBILE RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .features-grid { grid-template-columns: 1fr; }
  .features-content { padding-right: 0; }
  .features-visual { display: none; }

}

@media (max-width: 768px) {
  /* nav/header rules are in the HEADER RESPONSIVE BREAKPOINTS block above */

  .categories-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .stat-item { border-right: none; padding: 16px; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
  .footer-grid { grid-template-columns: 1fr; }
  .sidebar-wrap { grid-template-columns: 1fr; }

  .section-pad { padding: 64px 0; }
  .hero-section { padding: 72px 0 56px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-title { font-size: 1.8rem; }
  .cta-buttons { flex-direction: column; align-items: stretch; }
  .cta-buttons .btn { justify-content: center; }
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade-up { animation: fadeUp 0.6s cubic-bezier(0.4,0,0.2,1) both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* =============================================
   WORDPRESS BLOCK EDITOR (GUTENBERG)
   ============================================= */
.wp-block { max-width: 780px; }
.alignwide { max-width: var(--max-width); }
.alignfull { max-width: 100%; }
.has-background { padding: 1.5em; }

/* =============================================
   ADMIN BAR OFFSET
   ============================================= */
.admin-bar #site-header { top: 32px; }
@media (max-width: 600px) {
  .admin-bar #site-header { top: 46px; }
}

/* =============================================
   TOOL SINGLE PAGE
   ============================================= */
.tool-page-hero {
  background: var(--gradient-hero);
  padding: 48px 0 56px;
  position: relative;
  overflow: hidden;
}
.tool-page-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 20% 50%, rgba(99,102,241,0.25) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 20%, rgba(6,182,212,0.15) 0%, transparent 55%);
  pointer-events: none;
}

/* Breadcrumb */
.tool-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.tool-breadcrumb a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: var(--transition);
}
.tool-breadcrumb a:hover { color: #fff; }
.tool-breadcrumb .current { color: rgba(255,255,255,0.85); font-weight: 500; }

/* Tool Header */
.tool-page-header {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}
.tool-page-icon-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.tool-page-icon {
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  backdrop-filter: blur(10px);
}
.tool-page-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tool-page-title-group { flex: 1; }
.tool-page-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 14px;
}
.tool-page-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.75;
  margin-bottom: 20px;
  font-weight: 300;
  max-width: 560px;
}
.tool-page-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  backdrop-filter: blur(6px);
}
.tool-chip-link { text-decoration: none; transition: var(--transition); }
.tool-chip-link:hover { background: rgba(99,102,241,0.25); border-color: rgba(99,102,241,0.4); color: #fff; }

/* Tool Body */
.tool-page-body { padding: 48px 0 96px; }

/* Tool App Box */
.tool-app-box {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--color-surface);
  margin-bottom: 32px;
}
.tool-app-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}
.tool-app-box-free {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-success);
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
.tool-app-content { padding: 32px; }

/* =============================================
   SIDEBAR SPACING UPDATE
   ============================================= */
.sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

.sidebar-widget {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}
.sidebar-widget h3 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

/* =============================================
   RESPONSIVE — CONTENT PAGES
   ============================================= */
@media (max-width: 768px) {
  .tool-page-header { flex-direction: column; gap: 20px; }
  .tool-page-icon { width: 64px; height: 64px; font-size: 1.75rem; }
  .tool-app-content { padding: 20px; }

  /* Post hero */
  .post-hero { padding: 56px 0 0; }
  .post-hero-inner { padding-bottom: 40px; }
  .post-hero-title { font-size: 1.6rem; }
  .post-hero-excerpt { font-size: 0.95rem; margin-bottom: 28px; }

  /* Featured image overlap */
  .post-featured-image { transform: translateY(32px); padding: 0 16px; }
  .post-featured-image-placeholder { height: 240px; font-size: 3.5rem; }
  .content-area.has-featured-img { padding-top: 80px; }

  /* Entry content overflow fixes */
  .entry-content pre { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .entry-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }

  /* Post footer stacks on small screens */
  .post-footer { flex-direction: column; align-items: flex-start; }

  .page-content-wrap { padding: 48px 16px; }

  /*
   * SIDEBAR ORDER FIX — both post and tool pages
   * On mobile the grid collapses to 1 column, putting <aside> (Related Tools /
   * Popular Tools) after the full article. Flip the order so the sidebar renders
   * ABOVE the main content, making Related Tools immediately visible.
   */
  .content-area .sidebar-wrap,
  .tool-page-body .sidebar-wrap { display: flex; flex-direction: column; }

  .content-area .sidebar-wrap > aside,
  .tool-page-body .sidebar-wrap > aside  { order: -1; }

  .content-area .sidebar-wrap > article,
  .tool-page-body .sidebar-wrap > main   { order: 0; }
}

@media (max-width: 480px) {
  /* Post hero */
  .post-hero { padding: 40px 0 0; }
  .post-hero-inner { padding-bottom: 28px; }
  .post-hero-title { font-size: 1.4rem; letter-spacing: -0.02em; }
  .post-hero-excerpt { font-size: 0.9rem; line-height: 1.7; }
  .post-hero-author { padding: 6px 14px 6px 6px; }

  /* Featured image */
  .post-featured-image { transform: translateY(24px); padding: 0 12px; }
  .post-featured-image-placeholder { height: 180px; font-size: 2.5rem; }
  .content-area.has-featured-img { padding-top: 60px; }

  /* Tool page */
  .tool-app-content { padding: 16px; }
  .tool-app-box-header { padding: 14px 16px; font-size: 0.9rem; }

  /* Post footer */
  .post-footer { margin-top: 40px; }
  .post-footer .btn { width: 100%; justify-content: center; }
}

/* =============================================
   WEATHER CATEGORY & SECTION STYLES
   ============================================= */

/* Category card — weather teal/sky theme */
.cat-weather { background: rgba(6,182,212,0.10); }
[data-theme="dark"] .cat-weather { background: rgba(6,182,212,0.15); }

/* Weather section wrapper */
.weather-section {
  background: linear-gradient(180deg, var(--color-surface) 0%, rgba(6,182,212,0.04) 100%);
  position: relative;
  overflow: hidden;
}
.weather-section::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(6,182,212,0.07) 0%, transparent 68%);
  pointer-events: none;
}
.weather-section::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(99,102,241,0.05) 0%, transparent 65%);
  pointer-events: none;
}

/* Badge variant — weather */
.badge-weather {
  background: rgba(6,182,212,0.10);
  color: #0891b2;
  border: 1px solid rgba(6,182,212,0.22);
}
[data-theme="dark"] .badge-weather {
  color: #22d3ee;
  background: rgba(6,182,212,0.15);
  border-color: rgba(6,182,212,0.3);
}

/* ── Feature Pills Row ── */
.weather-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 52px;
}

.wx-feature-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: default;
}
.wx-feature-pill:hover {
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6,182,212,0.08), var(--shadow-sm);
  transform: translateY(-1px);
}
.wx-feat-ico {
  font-size: 1.15rem;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6,182,212,0.10);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.wx-feature-pill strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}
.wx-feature-pill span {
  display: block;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  line-height: 1.2;
}

/* ── Embedded Widget Card ── */
.weather-widget-wrap {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  margin-bottom: 48px;
  transition: var(--transition-slow);
}
.weather-widget-wrap:hover {
  box-shadow: 0 24px 64px rgba(6,182,212,0.12), var(--shadow-xl);
}

.weather-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  flex-wrap: wrap;
  gap: 12px;
}

.wx-widget-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wx-widget-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(59,130,246,0.3);
  flex-shrink: 0;
}
.wx-widget-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.wx-widget-sub {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-top: 1px;
}

.wx-fullpage-btn {
  font-size: 0.82rem;
  padding: 9px 18px;
}
.wx-fullpage-btn svg {
  width: 14px;
  height: 14px;
}

.weather-iframe-container {
  position: relative;
  width: 100%;
  height: 760px;
  overflow: hidden;
  background: var(--color-surface-3);
}
.weather-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Weather Tool Cards Grid ── */
.weather-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.weather-tool-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.weather-tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6,182,212,0.06), rgba(99,102,241,0.04));
  opacity: 0;
  transition: var(--transition);
}
.weather-tool-card:hover {
  border-color: rgba(6,182,212,0.4);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.weather-tool-card:hover::before { opacity: 1; }
.weather-tool-card:hover .cat-arrow {
  color: #06b6d4;
  transform: translateX(4px);
}

.weather-tool-icon {
  font-size: 1.6rem;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6,182,212,0.10);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.weather-tool-body {
  flex: 1;
  min-width: 0;
}
.weather-tool-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.weather-tool-card h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.weather-tool-card p {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}
.weather-tool-card .cat-arrow {
  color: var(--color-text-muted);
  margin-left: auto;
  flex-shrink: 0;
  transition: var(--transition);
  align-self: center;
}

/* ── Popular pills – add weather ── */
.tool-pill[href*="weather"] {
  background: rgba(6,182,212,0.08);
  border-color: rgba(6,182,212,0.2);
  color: #0891b2;
}
.tool-pill[href*="weather"]:hover {
  background: #06b6d4;
  color: #fff;
}

/* ── CTA row with two buttons ── */
.weather-section .tools-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* =============================================
   WEATHER PAGE — when used as iframe src
   ============================================= */
body.nimbus-weather-page {
  overflow-x: hidden;
  background: transparent;
}

/* =============================================
   RESPONSIVE — WEATHER SECTION
   ============================================= */
@media (max-width: 1024px) {
  .weather-tools-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .weather-iframe-container { height: 620px; }
  .weather-widget-header { padding: 14px 16px; }
  .weather-features { gap: 8px; }
  .wx-feature-pill { padding: 8px 14px 8px 10px; }
  .wx-feature-pill strong { font-size: 0.75rem; }
  .wx-feature-pill span { display: none; }
}

@media (max-width: 640px) {
  .weather-tools-grid { grid-template-columns: 1fr; }
  .weather-iframe-container { height: 540px; }
  .weather-tool-card p { display: none; }
  .weather-section .tools-cta { flex-direction: column; }
  .weather-section .tools-cta .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .weather-iframe-container { height: 480px; }
  .wx-feature-pill { padding: 7px 12px 7px 8px; }
  .wx-feat-ico { width: 28px; height: 28px; font-size: 1rem; }
}


/* =============================================
   TOOL POPUP MODAL
   ============================================= */

/* ── Overlay ── */
.tool-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.4,0,0.2,1),
              visibility 0.25s cubic-bezier(0.4,0,0.2,1);
}
.tool-popup-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ── Panel ── */
.tool-popup-panel {
  width: 100%;
  max-width: 980px;
  height: calc(100vh - 80px);
  max-height: 820px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 32px 80px rgba(0,0,0,0.24), 0 8px 24px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.28s cubic-bezier(0.34,1.3,0.64,1),
              opacity 0.25s ease;
  opacity: 0;
}
.tool-popup-overlay.is-open .tool-popup-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}
[data-theme="dark"] .tool-popup-panel {
  background: #0f172a;
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 8px 24px rgba(0,0,0,0.4);
}

/* ── Header bar ── */
.tool-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 56px;
  flex-shrink: 0;
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border);
  gap: 12px;
}
[data-theme="dark"] .tool-popup-header {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.08);
}

.tool-popup-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}
.tool-popup-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  line-height: 1;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,0.1);
  border-radius: 8px;
}
.tool-popup-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.tool-popup-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  display: none;
}
.tool-popup-badge.visible {
  display: inline-flex;
}
.tool-popup-badge.free  { background:rgba(16,185,129,0.1);  color:#10b981; border:1px solid rgba(16,185,129,0.25); }
.tool-popup-badge.hot   { background:rgba(239,68,68,0.1);   color:#ef4444; border:1px solid rgba(239,68,68,0.25); }
.tool-popup-badge.new   { background:rgba(99,102,241,0.1);  color:#6366f1; border:1px solid rgba(99,102,241,0.25); }

/* ── Header action buttons ── */
.tool-popup-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tool-popup-open-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-sm);
  color: var(--color-accent);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.tool-popup-open-btn:hover {
  background: rgba(99,102,241,0.14);
  border-color: var(--color-accent);
  transform: translateY(-1px);
}
.tool-popup-open-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.tool-popup-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}
.tool-popup-close:hover {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.3);
  color: #ef4444;
  transform: rotate(90deg);
}
.tool-popup-close svg {
  width: 16px;
  height: 16px;
}

/* ── Content body — scrollable ── */
.tool-popup-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  position: relative;
}

/* Scrollbar */
.tool-popup-body::-webkit-scrollbar { width: 5px; }
.tool-popup-body::-webkit-scrollbar-track { background: transparent; }
.tool-popup-body::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
.tool-popup-body::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }

/* ── Tool HTML rendered inside popup ── */
.tool-popup-body .tool-app-box {
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.tool-popup-body .tool-app-box-header { display: none; } /* hide redundant header — popup has its own */
.tool-popup-body .tool-app-content { padding: 28px 32px; }

/* Entry content inside popup */
.tool-popup-body .entry-content {
  max-width: 100%;
}

/* ── Loading spinner ── */
.tool-popup-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}
.tool-popup-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: toolPopupSpin 0.7s linear infinite;
}
@keyframes toolPopupSpin {
  to { transform: rotate(360deg); }
}

/* ── "Open Popup" buttons on cards ── */
.tool-popup-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-accent);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.tool-popup-btn:hover {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}
.tool-popup-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.tool-popup-btn:hover svg { transform: scale(1.15); }

/* ── Tool card — two-button layout ── */
.tool-card .tool-card-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}
.tool-card .tool-card-btns .btn {
  flex: 1;
  min-width: 0;
  justify-content: center;
  font-size: 0.82rem;
  padding: 8px 10px;
}
.tool-card .tool-card-btns .tool-popup-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border-width: 1.5px;
}
.tool-card .tool-card-btns .tool-popup-btn svg {
  width: 15px;
  height: 15px;
}

/* ── Single tool page popup button ── */
.tool-popup-page-btn-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0;
}
.tool-popup-page-btn-wrap .tool-popup-btn {
  font-size: 0.85rem;
  padding: 9px 18px;
}

/* ── Body scroll-lock: popup or mobile menu open ── */
body.popup-open,
body.mobile-menu-open {
  overflow: hidden;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .tool-popup-overlay { padding: 0; }
  .tool-popup-panel {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    transform: translateY(100%) scale(1);
  }
  .tool-popup-overlay.is-open .tool-popup-panel {
    transform: translateY(0) scale(1);
  }
  .tool-popup-body .tool-app-content { padding: 20px 16px; }
  .tool-popup-open-btn span { display: none; }
}

/* =============================================
   GLOBAL POLISH
   ============================================= */

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Focus visible — keyboard nav outline */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

/* ── Tool page badge colours ── */
.tool-page-badge.free { background:rgba(16,185,129,0.12); color:#10b981; }
.tool-page-badge.hot  { background:rgba(239,68,68,0.12);  color:#ef4444; }
.tool-page-badge.new  { background:rgba(99,102,241,0.12); color:#6366f1; }

/* ── Improve page hero eyebrow ── */
.page-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

/* ── Better blog card hover ── */
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99,102,241,0.2);
}

/* ── Category card popup alignment ── */
.tool-card-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

/* ── Animate popup button tooltip ── */
.tool-popup-btn[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-text);
  color: var(--color-surface);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  box-shadow: var(--shadow-md);
}
/* Only show on icon-only button (no text content) */
.tool-popup-btn:has(svg:only-child)[title]:hover::after,
.tool-card .tool-popup-btn[title]:hover::after {
  display: block;
}

/* =============================================
   [tool] SHORTCODE CARD
   ============================================= */
.tool-shortcode-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin: 1.5em 0;
  transition: var(--transition);
  flex-wrap: wrap;
}
.tool-shortcode-card:hover {
  border-color: rgba(99,102,241,0.35);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.tool-shortcode-icon {
  font-size: 1.8rem;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,0.08);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.tool-shortcode-body {
  flex: 1;
  min-width: 0;
}
.tool-shortcode-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tool-shortcode-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}
.tool-shortcode-card .btn {
  flex-shrink: 0;
  font-size: 0.85rem;
  padding: 9px 18px;
  white-space: nowrap;
}

/* ── Make tool card .tool-link (single button) full width ── */
.tool-card > .tool-link.btn {
  width: 100%;
  justify-content: center;
  margin-top: auto;
}

/* ── data-tool-link cursor indicator ── */
[data-tool-link] {
  cursor: pointer;
}

/* =============================================
   POPUP CONTENT DISPLAY
   ============================================= */

/* Tool CPT page content inside popup */
.tool-popup-content-wrap .tool-app-content {
  padding: 28px 32px;
}
.tool-popup-content-wrap .entry-content {
  max-width: 100%;
}

/* Standalone tool pages (.page wrapper) inside popup */
.tool-popup-content-wrap .page {
  max-width: 100%;
  padding: 24px 32px 40px;
  margin: 0 auto;
}
.tool-popup-content-wrap .tool-header {
  margin-bottom: 28px;
}

/* Weather page #app inside popup */
.tool-popup-content-wrap #app {
  padding: 16px 16px 40px;
  max-width: 100%;
}
.tool-popup-content-wrap #loader { display: none !important; }
.tool-popup-content-wrap #sky { display: none !important; }
.tool-popup-content-wrap #particles { display: none !important; }
.tool-popup-content-wrap .hdr .logo { display: none; }

/* Responsive inside popup */
@media (max-width: 640px) {
  .tool-popup-content-wrap .page { padding: 16px 16px 32px; }
  .tool-popup-content-wrap .tool-app-content { padding: 20px 16px; }
}

/* =============================================
   DOCUMENT TOOLS SECTION
   ============================================= */

/* Badge variant */
.badge-doc {
  background: rgba(99,102,241,0.08);
  color: #6366f1;
  border: 1px solid rgba(99,102,241,0.2);
}
[data-theme="dark"] .badge-doc { background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.3); }

/* Section wrapper */
.doc-tools-section {
  background: linear-gradient(180deg, var(--color-surface-2) 0%, var(--color-surface) 100%);
  position: relative;
  overflow: hidden;
}
.doc-tools-section::before {
  content: '';
  position: absolute;
  top: -100px; left: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(ellipse, rgba(99,102,241,0.06) 0%, transparent 65%);
  pointer-events: none;
}

/* 3-column grid */
.doc-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1024px) { .doc-tools-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px)  { .doc-tools-grid { grid-template-columns: 1fr; } }

/* Card */
.doc-tool-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}
.doc-tool-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(99,102,241,0.25);
}
.doc-invoice:hover { border-color: rgba(99,102,241,0.4); box-shadow: 0 20px 48px rgba(99,102,241,0.15); }
.doc-letter:hover  { border-color: rgba(6,182,212,0.4);  box-shadow: 0 20px 48px rgba(6,182,212,0.15); }
.doc-cv:hover      { border-color: rgba(139,92,246,0.4); box-shadow: 0 20px 48px rgba(139,92,246,0.15); }

/* Mini document preview */
.doc-tool-preview {
  padding: 20px 20px 0;
  display: flex;
  justify-content: center;
  background: var(--color-surface-3);
  border-bottom: 1px solid var(--color-border);
  min-height: 130px;
  align-items: flex-end;
}
.doc-preview-sheet {
  width: 120px;
  background: #fff;
  border-radius: 4px 4px 0 0;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.1);
  overflow: hidden;
  min-height: 110px;
  padding-bottom: 10px;
}
.doc-preview-header {
  height: 18px;
  width: 100%;
  margin-bottom: 8px;
}
.doc-preview-lines { padding: 0 10px; }
.dpl {
  height: 4px;
  border-radius: 2px;
  margin-bottom: 5px;
  background: #e2e8f0;
}
.dpl-wide { width: 100%; }
.dpl-med  { width: 70%; }
.dpl-sm   { width: 50%; }
.doc-preview-total {
  margin: 8px 10px 0;
  font-size: 8px;
  font-weight: 800;
  text-align: right;
  padding-top: 5px;
  border-top: 1.5px solid;
  letter-spacing: 0.02em;
}
.doc-preview-sig {
  margin: 16px 10px 0;
  height: 20px;
  border-bottom: 1.5px solid;
  width: 50%;
}
.doc-preview-body-two-col {
  display: flex;
  gap: 6px;
  padding: 0 6px;
}
.doc-preview-sidebar { width: 36px; flex-shrink: 0; padding-top: 4px; }
.doc-preview-main-col { flex: 1; padding-top: 4px; }

/* Card body */
.doc-tool-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.doc-tool-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.doc-tool-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  line-height: 1.3;
}
.doc-tool-card p {
  font-size: 0.855rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 16px;
}
.doc-tool-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.doc-tool-features span {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 9px;
  background: var(--color-surface-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
}
.doc-tool-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-accent);
  border-bottom: 1.5px solid rgba(99,102,241,0.3);
  padding-bottom: 1px;
  align-self: flex-start;
  transition: var(--transition);
  letter-spacing: -0.01em;
}
.doc-tool-card:hover .doc-tool-cta {
  gap: 10px;
  border-bottom-color: currentColor;
}

[data-theme="dark"] .doc-preview-sheet  { background: #1e293b; }
[data-theme="dark"] .doc-tool-preview   { background: rgba(255,255,255,0.03); }

/* =============================================
   HOMEPAGE IMPROVEMENTS — COMPREHENSIVE PASS
   ============================================= */

/* ── Document Tools category card ── */
.cat-doc { background: rgba(99,102,241,0.08); }
[data-theme="dark"] .cat-doc { background: rgba(99,102,241,0.15); }

/* ── Trust / Social Proof strip ── */
.trust-strip {
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 20px 0;
}
.trust-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.trust-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.trust-logos {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
  justify-content: center;
}
.trust-logo {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  white-space: nowrap;
}
.trust-divider {
  color: var(--color-border);
  font-size: 1rem;
}
.trust-stars {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.trust-stars strong {
  color: var(--color-text);
  font-weight: 700;
}
@media (max-width: 768px) {
  .trust-inner { justify-content: center; gap: 14px; }
  .trust-label, .trust-stars { display: none; }
  .trust-logos { gap: 8px; }
  .trust-logo { font-size: 0.76rem; }
}

/* ── Hero pill links — document tools ── */
.tool-pill[href*="invoice"],
.tool-pill[href*="cv-builder"],
.tool-pill[href*="letterpad"] {
  background: rgba(99,102,241,0.06);
  border-color: rgba(99,102,241,0.18);
}

/* ── Filter button — document category ── */
.filter-btn[data-filter="document"] {
  background: transparent;
}
.filter-btn[data-filter="document"].active,
.filter-btn[data-filter="document"]:hover {
  background: rgba(99,102,241,0.1);
  border-color: rgba(99,102,241,0.3);
  color: var(--color-accent);
}

/* ── Tool card improvements ── */
.tool-card {
  /* Ensure equal height cards in grid */
  height: 100%;
}
.tools-grid {
  /* Align card heights */
  align-items: stretch;
}

/* ── Category section — Document Tools card colour ── */
.cat-doc { background: rgba(99,102,241,0.09); }
.category-card:has(.cat-doc):hover { border-color: rgba(99,102,241,0.4); }

/* ── Stats bar improvement ── */
.stats-bar {
  position: relative;
  z-index: 1;
}
.stat-item strong {
  font-size: 1.3rem;
}

/* ── Section headers — tighter on mobile ── */
@media (max-width: 640px) {
  .section-header h2 { font-size: clamp(1.5rem, 5vw, 2rem); }
  .section-header p  { font-size: 0.9rem; }
  .trust-logo { font-size: 0.72rem; }
}

/* ── Blog section date display ── */
.blog-meta { color: var(--color-text-muted); font-size: 0.78rem; }
.blog-meta .category {
  font-weight: 600;
  color: var(--color-accent);
}

/* ── CTA section improvement ── */
.cta-section {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}
.cta-section::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(6,182,212,0.15) 0%, transparent 65%);
  pointer-events: none;
}

/* ── Improve feature card stack visual ── */
.feat-card {
  border-radius: var(--radius-lg) !important;
}
.feat-card-header .icon {
  font-size: 1.1rem;
  width: 36px;
  height: 36px;
  background: var(--color-surface-3);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Hero section — improve search bar focus glow ── */
.hero-search-wrap:focus-within {
  box-shadow: 0 0 0 3px rgba(99,102,241,0.25), 0 8px 32px rgba(0,0,0,0.2);
}

/* ── Animate sections on scroll — JS sets opacity/transform inline ── */
/* Trust strip and doc cards are observed by AnimateOnScroll in main.js */
/* No CSS opacity:0 needed here — would cause invisible elements if JS fails */

/* =============================================
   HOMEPAGE — FINAL POLISH
   ============================================= */

/* ── Hero: better pill layout on mobile ── */
.hero-popular {
  flex-wrap: wrap;
  justify-content: center;
}
.tool-pill {
  white-space: nowrap;
}

/* ── Stats bar: stronger visual ── */
.stats-bar {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.stat-item {
  position: relative;
}
.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: var(--color-border);
}
@media (max-width: 640px) {
  .stat-item::after { display: none; }
}

/* ── Category cards: match Document Tools card ── */
.cat-doc { background: rgba(99,102,241,0.09); }

/* ── Filter bar: scrollable on mobile ── */
.tools-filter {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.tools-filter::-webkit-scrollbar { display: none; }
.filter-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Tool card: consistent height in grid ── */
.tools-grid {
  align-items: stretch;
}
.tool-card {
  height: 100%;
}

/* ── Weather section badge ── */
.badge-weather { white-space: nowrap; }

/* ── Document section: tighter on mobile ── */
@media (max-width: 480px) {
  .doc-tool-preview { min-height: 100px; }
  .doc-preview-sheet { width: 100px; }
}

/* ── Blog dates ── */
.blog-meta span { display: inline; }

/* ── CTA section: ensure buttons stack on mobile ── */
@media (max-width: 480px) {
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  .cta-buttons .btn { width: 100%; justify-content: center; }
}

/* ── Improved section header spacing ── */
.section-header {
  margin-bottom: 48px;
}
@media (max-width: 768px) {
  .section-header { margin-bottom: 32px; }
  .section-pad { padding: 72px 0; }
}
@media (max-width: 480px) {
  .section-pad { padding: 52px 0; }
}

/* ── Feature cards stack: fix z-index overlap on mobile ── */
@media (max-width: 768px) {
  .features-card-stack { transform: none; margin: 0 auto; }
  .feat-card-2, .feat-card-3 { display: none; }
}

/* ── Trust strip: tighter padding mobile ── */
@media (max-width: 640px) {
  .trust-strip { padding: 14px 0; }
}
