/*
Theme Name:  ConvertYourMedia
Theme URI:   https://convertyourmedia.com
Author:      ConvertYourMedia Team
Author URI:  https://convertyourmedia.com
Description: A fast-loading, modern WordPress theme for ConvertYourMedia.com — a free online media conversion and video download platform. Features 143+ built-in tools, static homepage, blog, and all legal pages.
Version:     2.0.0
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: convertyourmedia
Tags:        custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks, full-width-template, block-styles
*/

/* AI: ============================================================
   DESIGN TOKENS — Single source of truth for all colours/spacing
   New palette: Emerald green + Amber accent (replaces old purple)
   WCAG 2.1 AA compliant contrast ratios throughout
   ============================================================ */
:root {
  /* AI: Primary brand colour — Emerald green */
  --clr-primary:     #059669;
  --clr-primary-d:   #047857;
  --clr-primary-l:   #ecfdf5;
  --clr-primary-mid: #a7f3d0;

  /* AI: Accent colour — Amber */
  --clr-accent:      #f59e0b;
  --clr-accent-d:    #d97706;
  --clr-accent-l:    #fffbeb;

  /* AI: Semantic colours */
  --clr-success:     #10b981;
  --clr-success-l:   #d1fae5;
  --clr-danger:      #ef4444;
  --clr-danger-l:    #fee2e2;
  --clr-warn:        #f59e0b;
  --clr-warn-l:      #fef3c7;
  --clr-info:        #3b82f6;
  --clr-info-l:      #dbeafe;

  /* AI: Neutral palette */
  --clr-dark:        #0a1628;
  --clr-dark-2:      #1e293b;
  --clr-dark-3:      #334155;
  --clr-text:        #1e293b;
  --clr-text-2:      #475569;
  --clr-muted:       #64748b;
  --clr-border:      #e2e8f0;
  --clr-border-2:    #cbd5e1;
  --clr-bg:          #f8fafc;
  --clr-bg-2:        #ffffff;
  --clr-bg-3:        #f1f5f9;

  /* AI: Gradient — dark teal to dark navy */
  --grad-hero:       linear-gradient(135deg, #0a1628 0%, #0d2d3d 50%, #0a2818 100%);
  --grad-primary:    linear-gradient(135deg, var(--clr-primary), var(--clr-primary-d));
  --grad-accent:     linear-gradient(135deg, var(--clr-accent), var(--clr-accent-d));
  --grad-card:       linear-gradient(135deg, var(--clr-primary-l), #fff);

  /* AI: Border radius scale */
  --r-sm:   6px;
  --r:      10px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-full: 9999px;

  /* AI: Shadows */
  --sh-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --sh:     0 4px 14px rgba(5,150,105,.1), 0 2px 6px rgba(0,0,0,.05);
  --sh-lg:  0 10px 32px rgba(5,150,105,.14), 0 4px 12px rgba(0,0,0,.06);
  --sh-xl:  0 20px 48px rgba(5,150,105,.18), 0 8px 20px rgba(0,0,0,.08);

  /* AI: Spacing scale */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px;

  /* AI: Typography */
  --font-body:  'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;

  /* AI: Transitions */
  --tr:    0.18s ease;
  --tr-lg: 0.28s ease;

  /* AI: Z-index scale */
  --z-nav:     100;
  --z-dropdown: 200;
  --z-modal:   300;
  --z-toast:   400;
}

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

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

body {
  font-family: var(--font-body);
  font-size: .9375rem; /* 15px */
  line-height: 1.7;
  color: var(--clr-text);
  background: var(--clr-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* AI: Accessibility — focus visible */
:focus-visible {
  outline: 3px solid var(--clr-primary);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--clr-primary); text-decoration: none; transition: color var(--tr); }
a:hover { color: var(--clr-primary-d); }
button, input, select, textarea { font-family: var(--font-body); }
ul, ol { padding-left: 1.5em; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
hr { border: 0; border-top: 1px solid var(--clr-border); margin: 2rem 0; }

/* AI: Selection colour */
::selection { background: var(--clr-primary-l); color: var(--clr-primary-d); }

/* AI: ============================================================
   TYPOGRAPHY SCALE
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  color: var(--clr-dark);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.025em;
}
h1 { font-size: clamp(1.75rem, 4.5vw, 2.875rem); }
h2 { font-size: clamp(1.35rem, 3vw, 2.125rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.375rem); }
h4 { font-size: 1.0625rem; }
h5 { font-size: .9375rem; }
h6 { font-size: .875rem; }

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

/* AI: ============================================================
   LAYOUT CONTAINERS
   ============================================================ */
.cym-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
  width: 100%;
}
.cym-container--sm  { max-width: 800px;  margin: 0 auto; padding: 0 var(--sp-6); }
.cym-container--xs  { max-width: 600px;  margin: 0 auto; padding: 0 var(--sp-6); }
.cym-container--lg  { max-width: 1400px; margin: 0 auto; padding: 0 var(--sp-6); }

.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.site-content { flex: 1; }

/* AI: ============================================================
   SKIP LINK — Accessibility
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  z-index: calc(var(--z-nav) + 10);
  background: var(--clr-primary);
  color: #fff;
  padding: var(--sp-2) var(--sp-4);
  border-radius: 0 0 var(--r) var(--r);
  font-weight: 600;
  font-size: .875rem;
}
.skip-link:focus { top: 0; }

/* AI: ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--clr-border);
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
  transition: box-shadow var(--tr);
}
.site-header.scrolled {
  box-shadow: 0 2px 12px rgba(5,150,105,.1);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--sp-5);
}

/* AI: Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo:hover { text-decoration: none; }
.logo__icon {
  width: 38px;
  height: 38px;
  background: var(--grad-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(5,150,105,.3);
}
.logo__icon svg { width: 22px; height: 22px; fill: #fff; }
.logo__text {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--clr-dark);
  letter-spacing: -.03em;
}
.logo__text em {
  font-style: normal;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* AI: Primary navigation */
.primary-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  list-style: none;
  padding: 0;
  margin: 0;
}
.primary-nav > li { position: relative; }
.primary-nav > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: var(--sp-2) var(--sp-3);
  font-size: .875rem;
  font-weight: 500;
  color: var(--clr-text-2);
  border-radius: var(--r);
  transition: all var(--tr);
  white-space: nowrap;
  text-decoration: none;
}
.primary-nav > li > a:hover,
.primary-nav > .current-menu-item > a,
.primary-nav > .current-menu-ancestor > a {
  background: var(--clr-primary-l);
  color: var(--clr-primary);
}

/* AI: Dropdown */
.primary-nav .sub-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  background: var(--clr-bg-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xl);
  padding: var(--sp-2);
  list-style: none;
  padding-left: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.98);
  transition: all .2s cubic-bezier(.16,1,.3,1);
  z-index: var(--z-dropdown);
}
.primary-nav .menu-item-has-children:hover .sub-menu,
.primary-nav .menu-item-has-children:focus-within .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.primary-nav .sub-menu a {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  font-size: .84rem;
  color: var(--clr-text-2);
  border-radius: var(--r);
  transition: all var(--tr);
  text-decoration: none;
  white-space: nowrap;
}
.primary-nav .sub-menu a:hover {
  background: var(--clr-primary-l);
  color: var(--clr-primary);
}

/* AI: CTA button in nav */
.nav__cta {
  background: var(--grad-primary) !important;
  color: #fff !important;
  font-weight: 600 !important;
  border-radius: var(--r) !important;
  box-shadow: 0 2px 8px rgba(5,150,105,.3) !important;
  padding: var(--sp-2) var(--sp-4) !important;
}
.nav__cta:hover {
  background: var(--clr-primary-d) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5,150,105,.4) !important;
  color: #fff !important;
}

/* AI: Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--sp-2);
  cursor: pointer;
  border-radius: var(--r);
  flex-direction: column;
  gap: 5px;
  transition: background var(--tr);
}
.nav-toggle:hover { background: var(--clr-bg-3); }
.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--clr-dark);
  border-radius: 2px;
  transition: transform .25s cubic-bezier(.16,1,.3,1), opacity .2s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* AI: Mobile nav */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--clr-border);
  padding: var(--sp-3) 0;
  animation: slideDown .25s cubic-bezier(.16,1,.3,1);
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  font-size: .9rem;
  font-weight: 500;
  color: var(--clr-text-2);
  border-radius: var(--r);
  transition: all var(--tr);
  text-decoration: none;
}
.mobile-nav a:hover { background: var(--clr-primary-l); color: var(--clr-primary); }
.mobile-nav .sub-menu { list-style: none; padding: 0 0 0 var(--sp-5); }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* AI: ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 11px 22px;
  border-radius: var(--r);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--tr);
  font-family: var(--font-body);
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--tr);
}
.btn:hover::after { background: rgba(255,255,255,.08); }
.btn:active { transform: scale(.98); }

.btn--primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(5,150,105,.3);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5,150,105,.42);
  color: #fff;
}

.btn--accent {
  background: var(--grad-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(245,158,11,.3);
}
.btn--accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,158,11,.42);
  color: #fff;
}

.btn--ghost {
  background: rgba(255,255,255,.1);
  color: #fff;
  border-color: rgba(255,255,255,.25);
}
.btn--ghost:hover {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.4);
  color: #fff;
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--clr-primary);
  border-color: var(--clr-primary);
}
.btn--outline:hover {
  background: var(--clr-primary);
  color: #fff;
  transform: translateY(-1px);
}

.btn--sm  { padding: 7px 16px; font-size: .8rem; }
.btn--lg  { padding: 14px 28px; font-size: 1rem; border-radius: var(--r-lg); }
.btn--xl  { padding: 16px 36px; font-size: 1.05rem; border-radius: var(--r-lg); }
.btn--full { width: 100%; }

.btn:disabled, .btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* AI: Download button — special green */
.btn--download {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16,185,129,.3);
}
.btn--download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16,185,129,.45);
  color: #fff;
}

/* AI: ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: var(--grad-hero);
  padding: var(--sp-20) 0 calc(var(--sp-20) + 20px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* AI: Animated background orbs */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(5,150,105,.25) 0%, transparent 70%);
  top: -200px;
  left: -150px;
  animation: heroOrb1 8s ease-in-out infinite alternate;
}
.hero::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245,158,11,.18) 0%, transparent 70%);
  bottom: -150px;
  right: -100px;
  animation: heroOrb2 10s ease-in-out infinite alternate;
}
@keyframes heroOrb1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(80px, 40px) scale(1.15); }
}
@keyframes heroOrb2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-60px, -40px) scale(1.1); }
}

.hero__inner { position: relative; z-index: 1; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--r-full);
  padding: 6px 18px;
  font-size: .76rem;
  font-weight: 600;
  color: rgba(255,255,255,.92);
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: var(--sp-5);
  animation: fadeInUp .6s ease both;
}
.hero__eyebrow-dot {
  width: 6px;
  height: 6px;
  background: var(--clr-accent);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.5); opacity: .7; }
}

.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5.5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.04em;
  margin-bottom: var(--sp-5);
  animation: fadeInUp .6s .1s ease both;
}
.hero h1 .highlight {
  background: linear-gradient(135deg, #6ee7b7, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  color: rgba(255,255,255,.72);
  font-size: clamp(.95rem, 2vw, 1.175rem);
  max-width: 600px;
  margin: 0 auto var(--sp-8);
  line-height: 1.7;
  animation: fadeInUp .6s .2s ease both;
}

.hero__actions {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--sp-12);
  animation: fadeInUp .6s .3s ease both;
}

/* AI: Hero stats bar */
.hero__stats {
  display: flex;
  justify-content: center;
  gap: var(--sp-8);
  flex-wrap: wrap;
  animation: fadeInUp .6s .4s ease both;
}
.hero__stat {}
.hero__stat-num {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -.04em;
}
.hero__stat-lbl {
  font-size: .7rem;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-top: 4px;
}

/* AI: Floating tool cards in hero (decorative) */
.hero__floating {
  position: absolute;
  animation: float var(--dur, 4s) ease-in-out infinite alternate;
  opacity: .18;
  pointer-events: none;
}
@keyframes float {
  from { transform: translateY(0) rotate(var(--rot, -5deg)); }
  to   { transform: translateY(-16px) rotate(calc(var(--rot, -5deg) + 5deg)); }
}

/* AI: ============================================================
   ANIMATIONS — Fade in on scroll
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}

.anim-fadein     { animation: fadeIn     .6s ease both; }
.anim-fadeinup   { animation: fadeInUp   .6s ease both; }
.anim-scalein    { animation: scaleIn    .5s ease both; }
[data-anim]      { opacity: 0; }
[data-anim].visible { animation: fadeInUp .7s cubic-bezier(.16,1,.3,1) both; }

/* Safety net — if JS fails or user prefers reduced motion, always show content */
@media (prefers-reduced-motion: reduce) {
  [data-anim] { opacity: 1 !important; animation: none !important; }
}
/* If JS is disabled or hasn't loaded yet, show after a short delay */
.no-js [data-anim] { opacity: 1 !important; animation: none !important; }

/* AI: Stagger delays */
[data-delay="1"] { animation-delay: .1s; }
[data-delay="2"] { animation-delay: .2s; }
[data-delay="3"] { animation-delay: .3s; }
[data-delay="4"] { animation-delay: .4s; }
[data-delay="5"] { animation-delay: .5s; }
[data-delay="6"] { animation-delay: .6s; }

/* AI: ============================================================
   SECTION LAYOUT
   ============================================================ */
.section { padding: var(--sp-20) 0; }
.section--alt { background: var(--clr-bg-3); }
.section--dark { background: var(--clr-dark); }

.section__header { text-align: center; margin-bottom: var(--sp-10); }
.section__tag {
  display: inline-block;
  background: var(--clr-primary-l);
  color: var(--clr-primary);
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--r-full);
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: var(--sp-3);
}
.section__title { margin-bottom: var(--sp-3); }
.section__sub {
  color: var(--clr-muted);
  max-width: 520px;
  margin: 0 auto;
  font-size: .95rem;
}

/* AI: Category label */
.cat-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--clr-muted);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin: var(--sp-8) 0 var(--sp-4);
}
.cat-label::before,
.cat-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--clr-border);
}
.cat-label::before { max-width: 24px; }

/* AI: ============================================================
   TOOL CARDS (homepage grid)
   ============================================================ */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
  gap: 14px;
  margin-bottom: var(--sp-3);
}

.tool-card {
  background: var(--clr-bg-2);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: 20px 16px;
  text-decoration: none;
  color: var(--clr-text);
  display: block;
  position: relative;
  overflow: hidden;
  transition: all .2s cubic-bezier(.16,1,.3,1);
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s cubic-bezier(.16,1,.3,1);
}
.tool-card:hover {
  border-color: var(--clr-primary);
  box-shadow: var(--sh-lg);
  transform: translateY(-4px);
  text-decoration: none;
  color: var(--clr-text);
}
.tool-card:hover::before { transform: scaleX(1); }

.tool-card__icon {
  width: 46px;
  height: 46px;
  background: var(--clr-bg-3);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-3);
  transition: all .2s;
  font-size: 1.3rem;
}
.tool-card:hover .tool-card__icon {
  background: var(--clr-primary-l);
  transform: scale(1.08) rotate(-2deg);
}
.tool-card__icon svg { width: 24px; height: 24px; }

.tool-card h3 {
  font-size: .875rem;
  font-weight: 700;
  color: var(--clr-dark);
  margin-bottom: 4px;
  line-height: 1.3;
}
.tool-card p {
  font-size: .73rem;
  color: var(--clr-muted);
  line-height: 1.5;
  margin: 0;
}

.tool-card__badge {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--grad-accent);
  color: #fff;
  font-size: .58rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-full);
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* AI: ============================================================
   FEATURE CARDS
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.feat-card {
  background: var(--clr-bg-2);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  transition: all var(--tr);
}
.feat-card:hover {
  border-color: var(--clr-primary);
  box-shadow: var(--sh);
  transform: translateY(-2px);
}
.feat-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--sp-4);
}
.feat-card h3 { font-size: 1rem; margin-bottom: var(--sp-2); }
.feat-card p  { font-size: .84rem; color: var(--clr-muted); margin: 0; }

/* AI: ============================================================
   TOOL PAGE HERO (individual tool pages)
   ============================================================ */
.tool-hero {
  background: var(--grad-hero);
  padding: var(--sp-12) 0 var(--sp-16);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.tool-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 40% 60%, rgba(5,150,105,.2) 0%, transparent 60%);
  pointer-events: none;
}
.tool-hero__inner { position: relative; z-index: 1; }
.tool-hero__icon {
  width: 68px;
  height: 68px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  margin: 0 auto var(--sp-4);
  backdrop-filter: blur(8px);
}
.tool-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--sp-4);
}
.tool-hero__badge span {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.85);
  font-size: .69rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-full);
}
.tool-hero h1 {
  color: #fff;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: var(--sp-3);
}
.tool-hero p {
  color: rgba(255,255,255,.7);
  font-size: .95rem;
  max-width: 520px;
  margin: 0 auto;
}

/* AI: ============================================================
   TOOL BOX (the actual tool UI)
   ============================================================ */
.tbox {
  background: var(--clr-bg-2);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  box-shadow: var(--sh-lg);
  margin-bottom: var(--sp-6);
  position: relative;
}
.tbox--mt { margin-top: -40px; }

.tbox__label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: var(--clr-muted);
  margin-bottom: var(--sp-2);
  display: block;
}

/* AI: URL input */
.url-wrap { position: relative; margin-bottom: var(--sp-4); }
.url-inp {
  width: 100%;
  padding: 14px 100px 14px 16px;
  border: 2px solid var(--clr-border);
  border-radius: var(--r);
  font-size: .9rem;
  color: var(--clr-text);
  background: var(--clr-bg-3);
  outline: none;
  transition: all var(--tr);
  font-family: var(--font-body);
}
.url-inp:focus {
  border-color: var(--clr-primary);
  background: var(--clr-bg-2);
  box-shadow: 0 0 0 4px rgba(5,150,105,.08);
}
.url-inp::placeholder { color: var(--clr-muted); }
.paste-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 12px;
  background: var(--clr-bg-2);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--r);
  font-size: .72rem;
  font-weight: 600;
  color: var(--clr-text-2);
  cursor: pointer;
  transition: all var(--tr);
  font-family: var(--font-body);
}
.paste-btn:hover { border-color: var(--clr-primary); color: var(--clr-primary); background: var(--clr-primary-l); }

/* AI: Format cards */
.fgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(106px, 1fr));
  gap: 8px;
  margin-bottom: var(--sp-4);
}
.fc {
  padding: 11px 8px;
  border: 2px solid var(--clr-border);
  border-radius: var(--r);
  cursor: pointer;
  text-align: center;
  transition: all var(--tr);
  background: var(--clr-bg-2);
  user-select: none;
  position: relative;
}
.fc:hover { border-color: var(--clr-primary); background: var(--clr-primary-l); }
.fc.on {
  border-color: var(--clr-primary);
  background: var(--clr-primary-l);
  box-shadow: 0 0 0 3px rgba(5,150,105,.1);
}
.fc.on::after {
  content: '✓';
  position: absolute;
  top: 3px; right: 5px;
  font-size: .56rem;
  font-weight: 900;
  color: var(--clr-primary);
}
.fc__em { font-size: 1.15rem; margin-bottom: 3px; }
.fc__nm { font-size: .7rem; font-weight: 700; color: var(--clr-dark); line-height: 1.2; }
.fc__ds { font-size: .59rem; color: var(--clr-muted); margin-top: 2px; }

/* AI: Selected badge */
.sel-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--clr-primary-l);
  border: 1px solid var(--clr-primary-mid);
  border-radius: var(--r);
  padding: 8px 14px;
  font-size: .82rem;
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.sel-badge strong { color: var(--clr-primary); }

/* AI: Main download button */
.btn-p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  width: 100%;
  padding: 14px var(--sp-6);
  background: var(--grad-primary);
  color: #fff;
  border: none;
  border-radius: var(--r);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--tr);
  font-family: var(--font-body);
  box-shadow: 0 4px 16px rgba(5,150,105,.3);
  position: relative;
  overflow: hidden;
}
.btn-p::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--tr);
}
.btn-p:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(5,150,105,.42);
}
.btn-p:hover::before { background: rgba(255,255,255,.08); }
.btn-p:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* AI: Download link button */
.btn-dl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  width: 100%;
  padding: 14px var(--sp-6);
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: var(--r);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--tr);
  margin-bottom: var(--sp-2);
  box-shadow: 0 4px 14px rgba(16,185,129,.28);
}
.btn-dl:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16,185,129,.42);
  color: #fff;
  text-decoration: none;
}

/* AI: Secondary small button */
.btn-sm {
  padding: 8px 14px;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--r);
  font-size: .79rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--clr-bg-2);
  color: var(--clr-text-2);
  transition: all var(--tr);
  font-family: var(--font-body);
}
.btn-sm:hover { border-color: var(--clr-primary); color: var(--clr-primary); background: var(--clr-primary-l); }

/* AI: Progress bar */
.prog { margin: var(--sp-3) 0; display: none; }
.prog__track {
  height: 5px;
  background: var(--clr-border);
  border-radius: var(--r-full);
  overflow: hidden;
}
.prog__fill {
  height: 100%;
  background: var(--grad-primary);
  border-radius: var(--r-full);
  width: 0;
  transition: width .35s cubic-bezier(.16,1,.3,1);
}
.prog__lbl { font-size: .75rem; color: var(--clr-muted); margin-top: var(--sp-2); min-height: 18px; }

/* AI: Step tracker */
.steps-track { display: none; border: 1px solid var(--clr-border); border-radius: var(--r); overflow: hidden; margin: var(--sp-3) 0; }
.steps-track.vis { display: flex; }
.si {
  flex: 1;
  padding: 8px 4px;
  text-align: center;
  font-size: .6rem;
  font-weight: 600;
  color: var(--clr-muted);
  border-right: 1px solid var(--clr-border);
  transition: all var(--tr);
}
.si:last-child { border-right: none; }
.si .ic { display: block; font-size: .82rem; margin-bottom: 2px; }
.si.done { background: var(--clr-success-l); color: var(--clr-success); }
.si.act  { background: var(--clr-primary-l); color: var(--clr-primary); }

/* AI: Result/Error boxes */
.res-box {
  background: var(--clr-success-l);
  border: 1.5px solid #6ee7b7;
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  margin-top: var(--sp-4);
  display: none;
  animation: scaleIn .3s cubic-bezier(.16,1,.3,1);
}
.res-box h3 { color: var(--clr-success); font-size: .92rem; font-weight: 700; margin-bottom: var(--sp-3); }

.err-box {
  background: var(--clr-danger-l);
  border: 1.5px solid #fca5a5;
  border-radius: var(--r);
  padding: 13px 16px;
  margin-top: var(--sp-3);
  display: none;
  animation: scaleIn .3s ease;
}
.err-box strong { color: var(--clr-danger); font-size: .87rem; display: block; margin-bottom: 4px; }
.err-box p { font-size: .78rem; color: #7f1d1d; line-height: 1.5; margin: 0; }

/* AI: Alerts */
.alert {
  border-radius: var(--r);
  padding: 11px 14px;
  font-size: .82rem;
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  margin: var(--sp-3) 0;
  line-height: 1.55;
}
.alert--info   { background: var(--clr-info-l);    border: 1px solid #bfdbfe; color: #1d4ed8; }
.alert--ok     { background: var(--clr-success-l); border: 1px solid #6ee7b7; color: #065f46; }
.alert--warn   { background: var(--clr-warn-l);    border: 1px solid #fde68a; color: #92400e; }
.alert--err    { background: var(--clr-danger-l);  border: 1px solid #fca5a5; color: #991b1b; }
.alert--purple { background: #faf5ff; border: 1px solid #e9d5ff; color: #7c3aed; }

/* AI: Dzone */
.dzone {
  border: 2px dashed var(--clr-border-2);
  border-radius: var(--r-lg);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--tr);
  background: var(--clr-bg-3);
}
.dzone:hover, .dzone.over {
  border-color: var(--clr-primary);
  background: var(--clr-primary-l);
}
.dzone__ic { font-size: 2.2rem; margin-bottom: var(--sp-3); }
.dzone p { font-size: .85rem; color: var(--clr-muted); margin: 0; }
.dzone p strong { color: var(--clr-primary); }

/* AI: Result file rows */
.rf {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--clr-bg-2);
  border: 1px solid var(--clr-success-l);
  border-radius: var(--r);
  padding: 9px 12px;
  margin-bottom: var(--sp-2);
}
.rf__nm { flex: 1; font-size: .8rem; font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf__sz { font-size: .68rem; color: var(--clr-muted); flex-shrink: 0; }
.rf a {
  padding: 5px 12px;
  background: var(--clr-primary);
  border-radius: var(--r);
  color: #fff;
  font-size: .74rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--tr);
  flex-shrink: 0;
}
.rf a:hover { background: var(--clr-primary-d); }

/* AI: How-to grid */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin: var(--sp-5) 0;
}
.how-card {
  background: var(--clr-bg-2);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: 20px 16px;
  text-align: center;
  transition: all var(--tr);
}
.how-card:hover { border-color: var(--clr-primary); box-shadow: var(--sh); }
.how-card__n {
  width: 36px;
  height: 36px;
  background: var(--grad-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: .85rem;
  margin: 0 auto var(--sp-3);
}
.how-card h3 { font-size: .86rem; font-weight: 700; margin-bottom: 4px; }
.how-card p  { font-size: .75rem; color: var(--clr-muted); margin: 0; }

/* AI: Feature grid (tool pages) */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.feat {
  display: flex;
  gap: var(--sp-3);
  background: var(--clr-bg-2);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: 16px;
  transition: all var(--tr);
}
.feat:hover { border-color: var(--clr-primary); box-shadow: var(--sh); }
.feat__ic { font-size: 1.4rem; flex-shrink: 0; }
.feat h4 { font-size: .84rem; font-weight: 700; margin-bottom: 3px; }
.feat p  { font-size: .74rem; color: var(--clr-muted); margin: 0; }

/* AI: FAQ */
.faq-list { display: flex; flex-direction: column; gap: 6px; }
.faq-item {
  background: var(--clr-bg-2);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color var(--tr);
}
.faq-item.open { border-color: var(--clr-primary); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 14px 16px;
  font-size: .87rem;
  font-weight: 600;
  color: var(--clr-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-body);
}
.faq-q:hover { color: var(--clr-primary); }
.faq-q .ic { transition: transform .25s cubic-bezier(.16,1,.3,1); flex-shrink: 0; color: var(--clr-muted); }
.faq-item.open .faq-q .ic { transform: rotate(45deg); color: var(--clr-primary); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-ai { padding: 0 16px 14px; font-size: .83rem; color: var(--clr-muted); line-height: 1.7; }
.faq-item.open .faq-a { max-height: 400px; }

/* AI: Table */
.dtable { width: 100%; border-collapse: collapse; font-size: .82rem; }
.dtable th {
  background: var(--clr-primary-l);
  padding: 9px 12px;
  text-align: left;
  border: 1px solid var(--clr-primary-mid);
  color: var(--clr-primary-d);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 700;
}
.dtable td { padding: 9px 12px; border: 1px solid var(--clr-border); vertical-align: middle; color: var(--clr-text-2); }
.dtable tr:hover td { background: var(--clr-bg-3); }
.dtable td:first-child { font-weight: 600; color: var(--clr-dark); }
.tick  { color: var(--clr-success); font-weight: 700; }
.cross { color: var(--clr-danger); font-weight: 700; }

/* AI: Mode tabs */
.mode-tabs { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.mode-tab {
  flex: 1;
  padding: 11px;
  border: 2px solid var(--clr-border);
  border-radius: var(--r-lg);
  background: var(--clr-bg-2);
  cursor: pointer;
  text-align: center;
  font-size: .84rem;
  font-weight: 600;
  color: var(--clr-muted);
  transition: all var(--tr);
  font-family: var(--font-body);
}
.mode-tab.on {
  border-color: var(--clr-primary);
  background: var(--clr-primary-l);
  color: var(--clr-primary);
}
.mode-tab .ic { font-size: 1.3rem; display: block; margin-bottom: 3px; }

/* AI: Tool tab */
.tool-tab {
  padding: 8px 16px;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--r);
  background: var(--clr-bg-2);
  font-size: .81rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--clr-muted);
  transition: all var(--tr);
  font-family: var(--font-body);
}
.tool-tab.on { background: var(--clr-primary); color: #fff; border-color: var(--clr-primary); }

/* AI: Slider row */
.slider-row { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-2) 0; }
.slider-row label { font-size: .76rem; font-weight: 600; color: var(--clr-muted); width: 80px; flex-shrink: 0; }
.slider-row input[type=range] { flex: 1; accent-color: var(--clr-primary); }

/* AI: Tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--sp-3); }
.tag {
  background: var(--clr-primary-l);
  border: 1px solid var(--clr-primary-mid);
  border-radius: var(--r-full);
  padding: 3px 11px;
  font-size: .69rem;
  color: var(--clr-primary-d);
}

/* AI: Proc bar */
.proc-bar { height: 6px; background: var(--clr-border); border-radius: var(--r-full); overflow: hidden; margin: var(--sp-2) 0; }
.proc-fill { height: 100%; background: var(--grad-primary); border-radius: var(--r-full); width: 0; transition: width .3s cubic-bezier(.16,1,.3,1); }

/* AI: ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  background: var(--clr-bg-3);
  border-bottom: 1px solid var(--clr-border);
  padding: 10px 0;
}
.breadcrumb__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: .77rem;
  color: var(--clr-muted);
  flex-wrap: wrap;
}
.breadcrumb__inner a { color: var(--clr-muted); transition: color var(--tr); }
.breadcrumb__inner a:hover { color: var(--clr-primary); }
.breadcrumb__sep { opacity: .4; }

/* AI: old class aliases — tools use these */
.bc { background: var(--clr-bg-3); border-bottom: 1px solid var(--clr-border); padding: 9px 0; }
.bc__inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--clr-muted); }
.bc__inner a { color: var(--clr-muted); } .bc__inner a:hover { color: var(--clr-primary); text-decoration: none; }
.bc__sep { opacity: .4; }
.con-sm { max-width: 820px; margin: 0 auto; padding: 0 24px; }
.t-hero { background: var(--grad-hero); color: #fff; padding: 44px 24px 32px; text-align: center; position: relative; overflow: hidden; }
.t-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 40% 60%,rgba(5,150,105,.25),transparent 55%); pointer-events: none; }
.t-hero__inner { position: relative; z-index: 1; }
.t-hero__icon { width: 62px; height: 62px; border-radius: 18px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); }
.t-hero__badge { display: inline-flex; gap: 6px; align-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 20px; padding: 4px 14px; font-size: .73rem; font-weight: 600; color: rgba(255,255,255,.9); margin-bottom: 14px; }
.t-hero h1 { font-size: clamp(1.5rem,4vw,2.2rem); font-weight: 800; margin-bottom: 10px; color: #fff; }
.t-hero p { font-size: .93rem; color: rgba(255,255,255,.75); max-width: 540px; margin: 0 auto; }
.tbox__lbl { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--clr-muted); margin-bottom: 7px; display: block; }
.res-box { background: var(--clr-success-l); border: 1px solid #6ee7b7; border-radius: var(--r-lg); padding: 18px; margin-top: 14px; display: none; }
.res-box h3 { color: var(--clr-success); font-size: .92rem; font-weight: 700; margin-bottom: 10px; }
.err-box { background: var(--clr-danger-l); border: 1px solid #fca5a5; border-radius: var(--r); padding: 13px 16px; margin-top: 12px; display: none; }
.err-box strong { color: var(--clr-danger); font-size: .87rem; display: block; margin-bottom: 4px; }
.err-box p { font-size: .78rem; color: #7f1d1d; line-height: 1.5; margin: 0; }

/* AI: ============================================================
   BLOG
   ============================================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.post-card {
  background: var(--clr-bg-2);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all .22s cubic-bezier(.16,1,.3,1);
}
.post-card:hover {
  box-shadow: var(--sh-lg);
  transform: translateY(-4px);
  border-color: var(--clr-primary);
}
.post-card__thumb {
  aspect-ratio: 16/9;
  background: var(--clr-primary-l);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 2.5rem;
}
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card__thumb img { transform: scale(1.04); }
.post-card__body { padding: var(--sp-5); }

.post-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: .73rem;
  color: var(--clr-muted);
  margin-bottom: var(--sp-2);
  flex-wrap: wrap;
}
.post-cat {
  background: var(--clr-primary-l);
  color: var(--clr-primary);
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--r-full);
  font-size: .67rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  text-decoration: none;
}
.post-cat:hover { background: var(--clr-primary); color: #fff; }

.post-card h2 { font-size: 1rem; margin-bottom: var(--sp-2); line-height: 1.3; }
.post-card h2 a { color: var(--clr-dark); transition: color var(--tr); text-decoration: none; }
.post-card h2 a:hover { color: var(--clr-primary); }
.post-card p { font-size: .82rem; color: var(--clr-muted); margin-bottom: var(--sp-4); line-height: 1.6; }

.read-more {
  font-size: .79rem;
  font-weight: 700;
  color: var(--clr-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: gap var(--tr);
}
.read-more:hover { gap: 8px; }

/* AI: Single post */
.single-post { padding: var(--sp-16) 0; }
.post-header { margin-bottom: var(--sp-8); }
.post-header h1 { margin-bottom: var(--sp-4); }
.post-featured-img {
  width: 100%;
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-8);
  overflow: hidden;
  aspect-ratio: 16/7;
  background: var(--clr-primary-l);
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-featured-img img { width: 100%; height: 100%; object-fit: cover; }
.post-content { font-size: .95rem; line-height: 1.85; opacity: 1 !important; }

/* AI: ============================================================
   BLOG POST TOOL CTA BOX — used by CYM Blog Generator plugin
   Styled in theme as a fallback so it always renders even if the
   plugin's inline CSS doesn't load.
   ============================================================ */
.cym-tool-box,
.cym-tool-cta {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5) !important;
  border: 2px solid #059669 !important;
  border-radius: 12px !important;
  padding: 22px 26px !important;
  margin: 2em 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 16px !important;
  flex-wrap: wrap;
  opacity: 1 !important;
  visibility: visible !important;
}
.cym-tool-box__icon { font-size: 2rem !important; flex-shrink: 0; line-height: 1; }
.cym-tool-box__body { flex: 1; min-width: 200px; }
.cym-tool-box__label {
  font-size: .72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .6px !important;
  color: #059669 !important;
  margin-bottom: 4px !important;
  display: block !important;
}
.cym-tool-box__title {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: #065f46 !important;
  margin-bottom: 6px !important;
}
.cym-tool-box__desc {
  font-size: .9rem !important;
  color: #374151 !important;
  margin-bottom: 14px !important;
  line-height: 1.6 !important;
}
.cym-tool-box__btn,
.cym-tool-cta a {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: #fff !important;
  padding: 11px 22px !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: .9rem !important;
  text-decoration: none !important;
  transition: transform .15s ease, box-shadow .15s ease !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, .25) !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.cym-tool-box__btn:hover,
.cym-tool-box__btn:focus,
.cym-tool-cta a:hover,
.cym-tool-cta a:focus {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(5, 150, 105, .4) !important;
  color: #fff !important;
}

/* Pro tip and expert note boxes from plugin */
.cym-pro-tip,
.cym-expert-note {
  background: #ecfdf5 !important;
  border-left: 4px solid #059669 !important;
  border-radius: 0 8px 8px 0 !important;
  padding: 14px 18px !important;
  margin: 1.5em 0 !important;
  font-size: .95em !important;
  line-height: 1.7 !important;
  opacity: 1 !important;
}
.cym-expert-note {
  background: #fffbeb !important;
  border-left-color: #f59e0b !important;
}
.post-content h2 { font-size: 1.4rem; margin: 36px 0 14px; }
.post-content h3 { font-size: 1.1rem; margin: 26px 0 10px; }
.post-content p { margin-bottom: 1.2rem; }
.post-content blockquote {
  border-left: 4px solid var(--clr-primary);
  background: var(--clr-primary-l);
  padding: 16px 20px;
  border-radius: 0 var(--r) var(--r) 0;
  margin: 24px 0;
  font-style: italic;
}
.post-content code {
  background: var(--clr-bg-3);
  padding: 2px 6px;
  border-radius: var(--r-sm);
  font-size: .87em;
  font-family: var(--font-mono);
  color: var(--clr-primary);
}
.post-content pre {
  background: var(--clr-dark);
  color: #e2e8f0;
  padding: 20px;
  border-radius: var(--r-lg);
  overflow-x: auto;
  margin: 20px 0;
  font-size: .84rem;
  font-family: var(--font-mono);
  line-height: 1.7;
}
.post-content ul, .post-content ol { margin-bottom: 1.2rem; }
.post-content li { margin-bottom: .4rem; }
.post-content a { color: var(--clr-primary); text-decoration: underline; }
.post-content img { border-radius: var(--r-lg); margin: 24px 0; }

.post-tags { margin-top: var(--sp-8); display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.post-tag {
  background: var(--clr-bg-3);
  color: var(--clr-muted);
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: .74rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--tr);
}
.post-tag:hover { background: var(--clr-primary-l); color: var(--clr-primary); }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin-top: var(--sp-10);
}
.post-nav__item {
  background: var(--clr-bg-3);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  text-decoration: none;
  color: var(--clr-text-2);
  transition: all var(--tr);
  display: block;
}
.post-nav__item:hover { border-color: var(--clr-primary); color: var(--clr-primary); }
.post-nav__label { font-size: .67rem; color: var(--clr-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 4px; }

/* AI: Content + Sidebar layout */
.content-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--sp-10);
  align-items: start;
}
.sidebar { position: sticky; top: 80px; }
.widget {
  background: var(--clr-bg-2);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-6);
  margin-bottom: var(--sp-5);
}
.widget-title {
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--clr-muted);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--clr-border);
}
.widget ul { list-style: none; padding: 0; }
.widget ul li { padding: 7px 0; border-bottom: 1px solid var(--clr-border); font-size: .84rem; }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--clr-text-2); transition: color var(--tr); }
.widget ul li a:hover { color: var(--clr-primary); }

/* AI: Pagination */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: var(--sp-10);
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
}
.pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--r);
  font-size: .84rem;
  font-weight: 600;
  color: var(--clr-text-2);
  text-decoration: none;
  transition: all var(--tr);
}
.pagination .page-numbers:hover { border-color: var(--clr-primary); color: var(--clr-primary); }
.pagination .current { background: var(--clr-primary); border-color: var(--clr-primary); color: #fff; }

/* AI: Search form */
.search-form { display: flex; gap: var(--sp-2); }
.search-input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--clr-border);
  border-radius: var(--r);
  font-size: .88rem;
  outline: none;
  transition: all var(--tr);
  font-family: var(--font-body);
  background: var(--clr-bg-3);
}
.search-input:focus { border-color: var(--clr-primary); background: var(--clr-bg-2); }

/* AI: ============================================================
   COMMENTS
   ============================================================ */
.comments-area { margin-top: var(--sp-12); }
.comments-title { font-size: 1.15rem; font-weight: 700; margin-bottom: var(--sp-6); padding-bottom: var(--sp-3); border-bottom: 2px solid var(--clr-border); }
.comment { display: flex; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.comment__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  flex-shrink: 0;
}
.comment__body { flex: 1; }
.comment__bubble {
  background: var(--clr-bg-3);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  margin-bottom: var(--sp-2);
}
.comment__meta { font-size: .73rem; color: var(--clr-muted); margin-bottom: 6px; }
.comment__text { font-size: .88rem; line-height: 1.65; }
.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--clr-border);
  border-radius: var(--r);
  font-size: .88rem;
  outline: none;
  margin-bottom: var(--sp-3);
  transition: all var(--tr);
  background: var(--clr-bg-3);
  font-family: var(--font-body);
}
.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--clr-primary);
  background: var(--clr-bg-2);
}
.comment-form textarea { min-height: 130px; resize: vertical; line-height: 1.6; }

/* AI: ============================================================
   LEGAL PAGES
   ============================================================ */
.legal-page { padding: var(--sp-16) 0; }
.legal-page h1 { margin-bottom: var(--sp-2); }
.legal-page .last-updated { font-size: .81rem; color: var(--clr-muted); margin-bottom: var(--sp-8); }
.legal-content h2 { font-size: 1.15rem; margin: 36px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--clr-primary-mid); }
.legal-content h3 { font-size: 1rem; margin: 20px 0 8px; color: var(--clr-dark); }
.legal-content p, .legal-content li { font-size: .9rem; line-height: 1.85; color: var(--clr-text-2); }
.legal-content ul, .legal-content ol { margin-bottom: 1rem; }
.legal-content li { margin-bottom: .4rem; }
.legal-content a { color: var(--clr-primary); }

/* AI: ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  background: var(--grad-hero);
  padding: var(--sp-20) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(5,150,105,.2) 0%, transparent 70%);
}
.cta-section__inner { position: relative; z-index: 1; }
.cta-section h2 { color: #fff; margin-bottom: var(--sp-3); }
.cta-section p { color: rgba(255,255,255,.7); margin-bottom: var(--sp-8); font-size: 1.05rem; }

/* AI: Newsletter */
.newsletter-form {
  display: flex;
  gap: var(--sp-2);
  max-width: 420px;
  margin: var(--sp-8) auto 0;
}
.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: var(--r);
  font-size: .88rem;
  outline: none;
  font-family: var(--font-body);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.5); }
.newsletter-form input:focus { background: rgba(255,255,255,.18); }

/* AI: ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--clr-dark);
  color: rgba(255,255,255,.65);
  padding: 60px 0 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2.2fr repeat(3, 1fr);
  gap: var(--sp-10);
  margin-bottom: var(--sp-10);
}
.footer__brand {}
.footer__brand .site-logo { margin-bottom: var(--sp-4); }
.footer__brand .logo__text { color: #fff; }
.footer__brand p {
  font-size: .82rem;
  color: rgba(255,255,255,.45);
  line-height: 1.75;
  max-width: 260px;
  margin-bottom: var(--sp-5);
}
.footer__col h4 {
  font-size: .73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: rgba(255,255,255,.85);
  margin-bottom: var(--sp-4);
}
.footer__col ul { list-style: none; padding: 0; }
.footer__col ul li { margin-bottom: var(--sp-2); }
.footer__col ul li a {
  font-size: .83rem;
  color: rgba(255,255,255,.45);
  transition: color var(--tr);
  text-decoration: none;
}
.footer__col ul li a:hover { color: var(--clr-primary); }

.social-links { display: flex; gap: var(--sp-2); }
.social-link {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.5);
  font-size: .88rem;
  text-decoration: none;
  transition: all var(--tr);
}
.social-link:hover {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
  transform: translateY(-2px);
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
  font-size: .78rem;
  color: rgba(255,255,255,.35);
}
.footer__bottom a { color: rgba(255,255,255,.35); transition: color var(--tr); text-decoration: none; }
.footer__bottom a:hover { color: var(--clr-primary); }

/* AI: Back to top */
.back-to-top {
  position: fixed !important;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  background: var(--grad-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.15), 0 0 0 1px rgba(255,255,255,.1) inset;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .25s ease, visibility .25s ease, transform .25s ease, box-shadow .25s ease;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 1;
  padding: 0;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover,
.back-to-top:focus {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
  color: #fff;
  outline: none;
}
.back-to-top:active { transform: translateY(-1px); }

/* AI: Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--clr-dark-2);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: var(--sp-4) var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  z-index: var(--z-modal);
  animation: slideInUp .4s cubic-bezier(.16,1,.3,1);
}
@keyframes slideInUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.cookie-banner p { font-size: .82rem; color: rgba(255,255,255,.7); margin: 0; }
.cookie-banner a { color: var(--clr-primary); }
.cookie-banner__actions { display: flex; gap: var(--sp-2); flex-shrink: 0; }

/* AI: ============================================================
   UTILITIES
   ============================================================ */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.d-none  { display: none; }
.d-block { display: block; }
.d-flex  { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.rounded { border-radius: var(--r); }
.rounded-lg { border-radius: var(--r-lg); }

/* AI: ============================================================
   RESPONSIVE — Mobile First
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
  .content-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

/* Mobile */
@media (max-width: 768px) {
  :root { --sp-20: 56px; }
  .primary-nav { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 56px 0 64px; }
  .hero__stats { gap: var(--sp-5); }
  .hero__stat-num { font-size: 1.4rem; }
  .hero__actions { flex-direction: column; align-items: center; }
  .hero__actions .btn { width: 100%; max-width: 320px; justify-content: center; }
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
  .posts-grid { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .tbox { padding: var(--sp-5); }
  .fgrid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
  .newsletter-form { flex-direction: column; }
  .how-grid { grid-template-columns: 1fr 1fr; }
  .back-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; }
}

/* Small mobile */
@media (max-width: 480px) {
  .cym-container { padding: 0 var(--sp-4); }
  .bc__inner { padding: 0 var(--sp-4); }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
  .features-grid { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .cookie-banner { flex-direction: column; }
}

/* AI: Print */
@media print {
  .site-header, .site-footer, .sidebar, .cta-section,
  .back-to-top, .cookie-banner { display: none !important; }
  body { font-size: 11pt; color: #000; background: #fff; }
  a { color: #000; }
  .post-content a::after { content: " (" attr(href) ")"; font-size: .8em; }
}

/* AI: High contrast / reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .hero::before, .hero::after { display: none; }
}
@media (prefers-color-scheme: dark) {
  /* AI: Future dark mode hook — extend here */
}

/* AI: ============================================================
   MEGA MENU — anchored to Free Tools CTA button
   ============================================================ */
.nav-cta-wrap { position: relative; display: inline-flex; }
.nav-cta-wrap .nav__cta { display: inline-flex; align-items: center; gap: 4px; }
.nav-cta-wrap .nav__cta .caret { font-size: .7rem; line-height: 1; transition: transform var(--tr); }
.nav-cta-wrap.is-open .nav__cta .caret,
.nav-cta-wrap:hover .nav__cta .caret { transform: rotate(180deg); }

.has-mega-menu { position: relative; }

/* Invisible hover bridge — keeps menu open when moving from button to dropdown */
.nav-cta-wrap::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -400px;
  right: -100px;
  height: 22px;
  pointer-events: auto;
  z-index: 1099;
}
/* When menu isn't open, bridge shouldn't block other interactions */
.nav-cta-wrap:not(:hover):not(.is-open):not(:focus-within)::after { pointer-events: none; }

.mega-menu {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  left: auto;
  width: 980px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  background: var(--clr-bg-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-lg);
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.22), 0 0 0 1px rgba(0,0,0,.04);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
  z-index: 1100;
  /* Pretty scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--clr-primary) var(--clr-bg-3);
}
.mega-menu::-webkit-scrollbar { width: 8px; }
.mega-menu::-webkit-scrollbar-track { background: var(--clr-bg-3); border-radius: 0 var(--r-lg) var(--r-lg) 0; }
.mega-menu::-webkit-scrollbar-thumb { background: var(--clr-primary); border-radius: 4px; }
.mega-menu::-webkit-scrollbar-thumb:hover { background: var(--clr-primary-d); }
.nav-cta-wrap:hover .mega-menu,
.nav-cta-wrap:focus-within .mega-menu,
.nav-cta-wrap.is-open .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Little arrow pointing up at the Free Tools button */
.mega-menu::before {
  content: '';
  position: sticky;
  position: -webkit-sticky;
  top: 0;
  display: block;
  height: 0;
  margin-right: 24px;
  margin-left: auto;
  width: 14px;
  pointer-events: none;
}
/* Render the arrow via separate element since sticky on ::before with rotate is tricky */
.mega-menu::after {
  content: '';
  position: absolute;
  top: -8px;
  right: 24px;
  width: 14px;
  height: 14px;
  background: var(--clr-bg-2);
  border-left: 1px solid var(--clr-border);
  border-top: 1px solid var(--clr-border);
  transform: rotate(45deg);
  z-index: 1101;
}

.mega-menu__inner {
  padding: 22px 24px 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 28px;
}

.mega-col {}
.mega-col__title {
  font-size: .78rem;
  font-weight: 700;
  color: var(--clr-primary);
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  gap: 6px;
}
.mega-col__badge {
  background: var(--clr-accent);
  color: #fff;
  font-size: .58rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.mega-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mega-col ul li { margin-bottom: 1px; }
.mega-col ul li a {
  display: block;
  padding: 4px 8px;
  border-radius: 5px;
  color: var(--clr-text-2);
  font-size: .79rem;
  text-decoration: none;
  transition: all .12s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mega-col ul li a:hover {
  background: var(--clr-primary-l);
  color: var(--clr-primary);
  padding-left: 12px;
}

.mega-menu__footer {
  padding: 12px 24px 16px;
  border-top: 1px solid var(--clr-border);
  background: var(--clr-bg-3);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  text-align: center;
}
.mega-menu__view-all {
  display: inline-block;
  color: var(--clr-primary);
  font-weight: 600;
  font-size: .82rem;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--r);
  transition: all .15s ease;
}
.mega-menu__view-all:hover { color: var(--clr-primary-d); background: var(--clr-primary-l); }

/* Tablet — 2 columns */
@media (max-width: 1100px) {
  .mega-menu { width: 720px; }
  .mega-menu__inner { grid-template-columns: repeat(2, 1fr); }
}

/* Hide mega menu on mobile — mobile nav has its own categories */
@media (max-width: 900px) {
  .mega-menu { display: none !important; }
  .nav-cta-wrap .nav__cta .caret { display: none; }
}

/* AI: Mobile nav collapsible groups */
.mobile-nav__group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: var(--sp-3) var(--sp-4);
  font-size: .9rem;
  font-weight: 500;
  color: var(--clr-text-2);
  cursor: pointer;
  border-radius: var(--r);
  font-family: var(--font-body);
  text-align: left;
}
.mobile-nav__group-toggle:hover { background: var(--clr-primary-l); color: var(--clr-primary); }
.mobile-nav__group-toggle[aria-expanded="true"] { background: var(--clr-primary-l); color: var(--clr-primary); }
.mobile-nav__group-toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }
.mobile-nav__group-toggle .caret { font-size: .75rem; transition: transform var(--tr); }

.mobile-nav__group {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
  padding-left: var(--sp-3);
}
.mobile-nav__group.open { max-height: 1200px; padding-top: var(--sp-2); }
.mobile-nav__cat {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--clr-primary);
  margin: var(--sp-3) 0 var(--sp-2);
  padding: 0 var(--sp-4);
}
.mobile-nav__group a {
  font-size: .85rem;
}
