/*
Theme Name: AI Tools Hub
Theme URI: https://example.com/ai-tools-hub
Author: AI Tools Hub
Author URI: https://example.com
Description: A lightweight, modern single-page WordPress theme to showcase multiple AI tools as interactive cards. Features tool management, advertisement banners, donation section, and a powerful admin panel.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ai-tools-hub
Tags: one-page, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --header-h: 80px; /* increased from 72px for more breathing room */
  --clr-bg:         #0a0d14;
  --clr-surface:    #111520;
  --clr-surface-2:  #161c2d;
  --clr-border:     rgba(255,255,255,0.07);
  --clr-accent:     #3b82f6;
  --clr-accent-2:   #06b6d4;
  --clr-accent-glow:rgba(59,130,246,0.25);
  --clr-text:       #e2e8f0;
  --clr-muted:      #64748b;
  --clr-heading:    #f1f5f9;

  --font-display:   'Syne', sans-serif;
  --font-body:      'DM Sans', sans-serif;
  --font-mono:      'JetBrains Mono', monospace;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.05) inset;
  --shadow-glow: 0 0 40px var(--clr-accent-glow);

  --transition: 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 0.18s ease;

  --container: 1280px;
}

/* ============================================================
   LIGHT THEME OVERRIDES
   ============================================================ */
/* Pure black & white — no color tints anywhere */
[data-theme="light"] {
  --clr-bg:          #ffffff;
  --clr-surface:     #ffffff;
  --clr-surface-2:   #f5f5f5;
  --clr-border:      rgba(0,0,0,0.12);
  --clr-accent:      #000000;
  --clr-accent-2:    #333333;
  --clr-accent-glow: rgba(0,0,0,0.08);
  --clr-text:        #111111;
  --clr-muted:       #666666;
  --clr-heading:     #000000;
  --shadow-card:     0 2px 16px rgba(0,0,0,0.08), 0 1px 0 rgba(255,255,255,1) inset;
}

/* Header */
[data-theme="light"] .site-header {
  background: rgba(255,255,255,0.92);
  border-bottom-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .site-header.scrolled {
  background: rgba(255,255,255,0.99);
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

/* Logo */
[data-theme="light"] .site-logo        { color: #000; }
[data-theme="light"] .site-logo:hover  { color: #333; }
[data-theme="light"] .logo-icon {
  background: #000;
  color: #fff;
}

/* Nav */
[data-theme="light"] .main-nav a       { color: #444; }
[data-theme="light"] .main-nav a:hover,
[data-theme="light"] .main-nav .current-menu-item > a {
  color: #000;
  background: rgba(0,0,0,0.06);
}
[data-theme="light"] .nav-cta {
  background: #000 !important;
  color: #fff !important;
}
[data-theme="light"] .nav-cta:hover    { background: #333 !important; }

/* Mobile nav */
[data-theme="light"] .mobile-nav       { background: #fff; border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .mobile-nav a     { color: #111; }
[data-theme="light"] .menu-toggle span { background: #000; }

/* Hero */
[data-theme="light"] .hero-bg          { background: none; }
[data-theme="light"] .hero-grid-bg {
  background-image:
    linear-gradient(rgba(0,0,0,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.05) 1px, transparent 1px);
}
[data-theme="light"] .hero-badge {
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.18);
  color: #000;
}
[data-theme="light"] .hero-badge .dot  { background: #000; }
[data-theme="light"] .hero-title .gradient-text {
  background: linear-gradient(135deg, #000, #555);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="light"] .hero-stat .num   { color: #000; }
[data-theme="light"] .section-tag      { color: #000; }

/* Filter & Search */
[data-theme="light"] .filter-btn       { color: #555; border-color: rgba(0,0,0,0.15); }
[data-theme="light"] .filter-btn:hover,
[data-theme="light"] .filter-btn.active {
  background: #000;
  border-color: #000;
  color: #fff;
}
[data-theme="light"] .search-wrapper input {
  background: #f5f5f5;
  border-color: rgba(0,0,0,0.15);
  color: #111;
}
[data-theme="light"] .search-wrapper input:focus { border-color: #000; }

/* Ad banners */
[data-theme="light"] .ad-banner        { background: #f5f5f5; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .ad-placeholder {
  background: repeating-linear-gradient(
    45deg,
    rgba(0,0,0,0.02), rgba(0,0,0,0.02) 10px,
    transparent 10px, transparent 20px
  );
  border-color: rgba(0,0,0,0.12);
  color: #888;
}

/* Tool Cards */
[data-theme="light"] .tool-card {
  background: #fff;
  border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .tool-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  border-color: rgba(0,0,0,0.18);
}
/* Override per-card accent colors with greyscale in light mode */
[data-theme="light"] .tool-card {
  --card-glow:    rgba(0,0,0,0.06);
  --card-icon-bg: rgba(0,0,0,0.07);
  --card-btn-bg:  #000000;
  --badge-bg:     rgba(0,0,0,0.07);
  --badge-color:  #000000;
  --badge-border: rgba(0,0,0,0.18);
  --card-accent:  #000000;
}
[data-theme="light"] .card-title       { color: #000; }
[data-theme="light"] .card-description { color: #555; }

/* Buttons */
[data-theme="light"] .btn-primary      { background: #000; color: #fff; }
[data-theme="light"] .btn-primary:hover { background: #222; color: #fff; filter: none; }
[data-theme="light"] .btn-secondary {
  background: #f0f0f0;
  color: #111;
  border-color: rgba(0,0,0,0.15);
}
[data-theme="light"] .btn-secondary:hover { background: #e0e0e0; color: #000; }

/* Donation */
[data-theme="light"] .donation-section { background: #fff; }
[data-theme="light"] .donation-inner {
  background: #fff;
  border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .donation-inner::before { background: none; }
[data-theme="light"] .donation-title   { color: #000; }
[data-theme="light"] .donation-subtitle { color: #555; }
[data-theme="light"] .payment-card {
  background: #f5f5f5;
  border-color: rgba(0,0,0,0.12);
}
[data-theme="light"] .payment-card:hover {
  border-color: #000;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
[data-theme="light"] .payment-name     { color: #000; }
[data-theme="light"] .payment-detail   { color: #555; }

/* Footer */
[data-theme="light"] .site-footer {
  background: #f5f5f5;
  border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .footer-copy      { color: #555; }
[data-theme="light"] .footer-copy a    { color: #555; }
[data-theme="light"] .footer-copy a:hover { color: #000; }
[data-theme="light"] .footer-links a   { color: #555; }
[data-theme="light"] .footer-links a:hover { color: #000; }

/* Theme toggle button in light mode */
[data-theme="light"] .theme-toggle {
  background: #f0f0f0;
  border-color: rgba(0,0,0,0.15);
  color: #000;
}
[data-theme="light"] .theme-toggle:hover {
  background: #e0e0e0;
  border-color: #000;
}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--clr-border);
  background: var(--clr-surface);
  color: var(--clr-text);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  font-size: 1rem;
  margin-left: 8px;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--clr-accent);
  background: var(--clr-surface-2);
  transform: rotate(12deg) scale(1.05);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: opacity 0.25s ease, transform 0.35s ease;
  line-height: 1;
}

/* Dark mode (default): show sun icon (to switch to light) */
.theme-toggle .icon-sun  { opacity: 1;  transform: scale(1)   rotate(0deg); }
.theme-toggle .icon-moon { opacity: 0;  transform: scale(0.5) rotate(-45deg); }

/* Light mode: show moon icon (to switch back to dark) */
[data-theme="light"] .theme-toggle .icon-sun  { opacity: 0;  transform: scale(0.5) rotate(45deg); }
[data-theme="light"] .theme-toggle .icon-moon { opacity: 1;  transform: scale(1)   rotate(0deg); }

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--clr-bg);
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--clr-heading);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
  width: var(--container, 90%);
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
/* Header container always full-width regardless of --container setting */
.site-header .container {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 32px !important;
  height: var(--header-h);
  display: flex;
  align-items: center;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(10,13,20,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--clr-border);
  transition: background var(--transition-fast);
}

.site-header.scrolled {
  background: rgba(10,13,20,0.97);
  box-shadow: 0 4px 32px rgba(0,0,0,0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  padding: 14px 0;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--clr-heading);
  letter-spacing: -0.03em;
  text-decoration: none;
}

.site-logo:hover { color: var(--clr-accent); }

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-2));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.custom-logo { height: 38px; width: auto; border-radius: var(--radius-sm); }

/* ── Desktop Nav ── */
.main-nav {
  display: flex;
  align-items: center;
}

/* The <ul> WordPress outputs — make it a horizontal flex row */
.aith-menu {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 4px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-wrap: nowrap !important;
}

/* Each top-level <li> */
.aith-menu > li {
  display: block !important;
  float: none !important;
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* Top-level <a> links */
.aith-menu > li > a {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  color: var(--clr-muted) !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  padding: 8px 14px !important;
  border-radius: var(--radius-sm) !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  transition: color var(--transition-fast), background var(--transition-fast) !important;
  background: transparent !important;
  line-height: 1.4 !important;
}

.aith-menu > li > a:hover,
.aith-menu > li.current-menu-item > a,
.aith-menu > li.current_page_item > a,
.aith-menu > li.current-menu-ancestor > a {
  color: var(--clr-text) !important;
  background: rgba(255,255,255,0.06) !important;
}

/* ── Dropdown submenu ── */
.aith-menu > li > .sub-menu {
  display: none;
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  min-width: 200px !important;
  background: var(--clr-surface) !important;
  border: 1px solid var(--clr-border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important;
  padding: 6px !important;
  z-index: 9999 !important;
  list-style: none !important;
  margin: 0 !important;
  flex-direction: column;
  gap: 2px;
  animation: dropdownIn 0.15s ease forwards;
}

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

.aith-menu > li:hover > .sub-menu,
.aith-menu > li.open > .sub-menu {
  display: block !important;
}

/* Submenu <li> */
.aith-menu .sub-menu > li {
  display: block !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* Submenu <a> links */
.aith-menu .sub-menu > li > a {
  display: block !important;
  color: var(--clr-text) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  padding: 9px 14px !important;
  border-radius: var(--radius-sm) !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  background: transparent !important;
  transition: background var(--transition-fast), color var(--transition-fast) !important;
}

.aith-menu .sub-menu > li > a:hover {
  background: rgba(255,255,255,0.07) !important;
  color: var(--clr-heading) !important;
}

/* CTA-style item: add CSS class "menu-cta" in WP Menu editor */
.aith-menu > li.menu-cta > a {
  background: var(--clr-accent) !important;
  color: #fff !important;
  padding: 8px 18px !important;
  margin-left: 8px !important;
}
.aith-menu > li.menu-cta > a:hover { filter: brightness(1.12) !important; }

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  padding: 16px 24px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav.open { display: flex; }

/* ── Mobile nav ── */
.aith-mobile-menu {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  width: 100% !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.aith-mobile-menu li {
  display: block !important;
  float: none !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.aith-mobile-menu li a {
  display: block !important;
  color: var(--clr-text) !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  padding: 11px 14px !important;
  border-radius: var(--radius-sm) !important;
  text-decoration: none !important;
  background: transparent !important;
  transition: background 0.15s ease !important;
}

.aith-mobile-menu li a:hover {
  background: rgba(255,255,255,0.06) !important;
  color: var(--clr-heading) !important;
}

/* Mobile submenu — indented */
.aith-mobile-menu .sub-menu {
  display: block !important;
  padding-left: 16px !important;
  list-style: none !important;
  margin: 2px 0 4px !important;
}

.aith-mobile-menu .sub-menu li a {
  font-size: 0.875rem !important;
  color: var(--clr-muted) !important;
  padding: 8px 14px !important;
}

.aith-mobile-menu .sub-menu li a:hover { color: var(--clr-text) !important; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.site-hero {
  min-height: 540px;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 80px) 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(59,130,246,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(6,182,212,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-grid-bg {
  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;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-badge .dot {
  width: 6px; height: 6px;
  background: var(--clr-accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.04em;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--clr-muted);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stat { text-align: center; }
.hero-stat .num { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: var(--clr-heading); }
.hero-stat .label { font-size: 0.8rem; color: var(--clr-muted); letter-spacing: 0.03em; }

/* ============================================================
   ADVERTISEMENT BANNERS
   ============================================================ */
.ad-banner {
  padding: 20px 0;
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
}

.ad-banner.ad-top    { margin-bottom: 0; }
.ad-banner.ad-middle { margin: 40px 0; }
.ad-banner.ad-bottom { margin-top: 40px; }

.ad-banner .container { text-align: center; }

.ad-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-muted);
  margin-bottom: 8px;
}

.ad-placeholder {
  background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.02),
    rgba(255,255,255,0.02) 10px,
    transparent 10px,
    transparent 20px
  );
  border: 1px dashed var(--clr-border);
  border-radius: var(--radius-md);
  padding: 20px;
  color: var(--clr-muted);
  font-size: 0.85rem;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   TOOLS SECTION
   ============================================================ */
.tools-section {
  padding: 80px 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 20px;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-subtitle {
  color: var(--clr-muted);
  font-size: 0.95rem;
  margin-top: 6px;
  max-width: 480px;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--clr-border);
  background: transparent;
  color: var(--clr-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  color: #fff;
}

/* Search */
.search-wrapper {
  position: relative;
  margin-left: auto;
}

.search-wrapper input {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 100px;
  padding: 8px 16px 8px 38px;
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  width: 220px;
  outline: none;
  transition: border-color var(--transition-fast), width var(--transition-fast);
}

.search-wrapper input:focus {
  border-color: var(--clr-accent);
  width: 280px;
}

.search-wrapper input::placeholder { color: var(--clr-muted); }

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--clr-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

/* ============================================================
   TOOL CARDS GRID
   ============================================================ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.tool-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: default;
  display: flex;
  flex-direction: column;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-accent, linear-gradient(90deg, var(--clr-accent), var(--clr-accent-2)));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
}

.tool-card:hover::before { opacity: 1; }

.tool-card-glow {
  position: absolute;
  top: -60px; left: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: var(--card-glow, rgba(59,130,246,0.12));
  filter: blur(60px);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
}

.tool-card:hover .tool-card-glow { opacity: 1; }

/* Card Header */
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: var(--card-icon-bg, rgba(59,130,246,0.15));
  flex-shrink: 0;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--badge-bg, rgba(59,130,246,0.15));
  color: var(--badge-color, var(--clr-accent));
  border: 1px solid var(--badge-border, rgba(59,130,246,0.25));
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.card-description {
  font-size: 0.9rem;
  color: var(--clr-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 24px;
}

/* Card Footer / Buttons */
.card-footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--card-btn-bg, var(--clr-accent));
  color: #fff;
  flex: 1;
  justify-content: center;
}

.btn-primary:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  color: #fff;
}

.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  color: var(--clr-text);
}

/* Disabled card */
.tool-card.disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Empty state */
.tools-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 20px;
  color: var(--clr-muted);
}

.tools-empty .icon { font-size: 3rem; margin-bottom: 16px; }
.tools-empty p { font-size: 1.05rem; }

/* ============================================================
   DONATION SECTION
   ============================================================ */
.donation-section {
  padding: 80px 0;
  position: relative;
}

.donation-inner {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  padding: 60px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.donation-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 0%, rgba(59,130,246,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.donation-emoji { font-size: 3rem; margin-bottom: 16px; display: block; }

.donation-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.donation-subtitle {
  color: var(--clr-muted);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto 40px;
}

.payment-methods {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.payment-card {
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  min-width: 180px;
  transition: all var(--transition-fast);
  cursor: pointer;
  text-align: center;
}

.payment-card:hover {
  border-color: rgba(59,130,246,0.5);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.payment-icon { font-size: 2rem; margin-bottom: 10px; }
.payment-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.payment-detail { font-size: 0.8rem; color: var(--clr-muted); word-break: break-all; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  padding: 40px 0 28px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copy { font-size: 0.85rem; color: var(--clr-muted); }
.footer-copy a { color: var(--clr-muted); }
.footer-copy a:hover { color: var(--clr-accent); }

.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 0.85rem; color: var(--clr-muted); }
.footer-links a:hover { color: var(--clr-text); }

/* ============================================================
   UTILITIES
   ============================================================ */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

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

.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ============================================================
   WORDPRESS CORE CLASSES
   ============================================================ */
.wp-caption, .gallery-caption { color: var(--clr-muted); font-size: 0.85rem; }
.sticky { border-left: 3px solid var(--clr-accent); padding-left: 16px; }
.bypostauthor {}
.alignleft  { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin: 0 auto 16px; }
.alignwide  { max-width: calc(100% + 80px); margin-left: -40px; }
.alignfull  { max-width: 100vw; margin-left: calc(50% - 50vw); }

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

@media (max-width: 768px) {
  :root { --header-h: 64px; }

  .main-nav  { display: none; }
  .menu-toggle { display: flex; }

  .tools-grid { grid-template-columns: 1fr; }

  .section-header { flex-direction: column; align-items: flex-start; }
  .filter-bar { gap: 6px; }
  .search-wrapper { margin-left: 0; width: 100%; }
  .search-wrapper input { width: 100%; }
  .search-wrapper input:focus { width: 100%; }

  .donation-inner { padding: 40px 24px; }
  .payment-methods { gap: 12px; }
  .payment-card { min-width: 140px; padding: 16px 20px; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }

  .hero-stats { gap: 24px; }
}

@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
  .card-footer { flex-direction: column; }
  .btn-primary { width: 100%; }
}

/* ============================================================
   FAQ SECTION
   ============================================================ */
.faq-section {
  padding: 80px 0;
  border-top: 1px solid var(--clr-border);
}

.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Individual FAQ item */
.faq-item {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.faq-item:hover {
  border-color: rgba(255,255,255,0.12);
}

.faq-item.is-open {
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 1px var(--clr-accent), 0 4px 24px rgba(0,0,0,0.2);
}

/* Question button */
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--clr-heading);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  transition: background var(--transition-fast);
}

.faq-question:hover {
  background: rgba(255,255,255,0.03);
}

.faq-item.is-open .faq-question {
  background: rgba(255,255,255,0.03);
  color: var(--clr-accent);
}

.faq-q-text { flex: 1; }

/* Arrow icon */
.faq-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  flex-shrink: 0;
  color: var(--clr-muted);
  transition: transform var(--transition), background var(--transition-fast), color var(--transition-fast);
}

.faq-item.is-open .faq-icon {
  transform: rotate(180deg);
  background: rgba(59,130,246,0.15);
  color: var(--clr-accent);
}

/* Answer panel */
.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease;
  opacity: 0;
}

.faq-answer:not([hidden]) {
  max-height: 800px;
  opacity: 1;
}

/* Remove hidden attribute visually but keep for aria */
.faq-answer[hidden] {
  display: block !important; /* override hidden so CSS transition works */
  max-height: 0;
  opacity: 0;
}

.faq-answer-inner {
  padding: 0 24px 22px;
  color: var(--clr-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  border-top: 1px solid var(--clr-border);
  padding-top: 18px;
}

.faq-answer-inner p { margin: 0 0 12px; }
.faq-answer-inner p:last-child { margin-bottom: 0; }
.faq-answer-inner a { color: var(--clr-accent); text-decoration: underline; }
.faq-answer-inner a:hover { color: var(--clr-accent-2); }
.faq-answer-inner ul, .faq-answer-inner ol {
  padding-left: 20px;
  margin: 8px 0 12px;
}
.faq-answer-inner li { margin-bottom: 4px; }
.faq-answer-inner strong { color: var(--clr-text); font-weight: 600; }

/* Light theme overrides */
[data-theme="light"] .faq-section       { border-top-color: rgba(0,0,0,0.08); }
[data-theme="light"] .faq-item          { background: #fff; border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .faq-item:hover    { border-color: rgba(0,0,0,0.18); }
[data-theme="light"] .faq-item.is-open  { border-color: var(--clr-accent); box-shadow: 0 0 0 1px var(--clr-accent), 0 4px 24px rgba(0,0,0,0.08); }
[data-theme="light"] .faq-question      { color: #0f172a; }
[data-theme="light"] .faq-question:hover { background: rgba(0,0,0,0.02); }
[data-theme="light"] .faq-item.is-open .faq-question { color: var(--clr-accent); background: rgba(0,0,0,0.02); }
[data-theme="light"] .faq-icon          { background: rgba(0,0,0,0.05); color: #555; }
[data-theme="light"] .faq-item.is-open .faq-icon { background: rgba(0,0,0,0.08); color: var(--clr-accent); }
[data-theme="light"] .faq-answer-inner  { border-top-color: rgba(0,0,0,0.08); color: #444; }
[data-theme="light"] .faq-answer-inner strong { color: #111; }

/* ============================================================
   PAGE & POST LAYOUT
   ============================================================ */
.aith-page-wrap {
  min-height: 70vh;
  /* Top padding = header height + breathing room; bottom padding = spacious */
  padding-top: calc(var(--header-h) + 64px);
  padding-bottom: 96px;
  padding-left: 0;
  padding-right: 0;
  background: var(--clr-bg);
  display: flex;
  flex-direction: column;
  align-items: center; /* centres the child container */
}

.aith-page-container {
  /* percentage width from admin setting, centred by flexbox parent */
  width: var(--page-width, 60%);
  max-width: 1600px;
  /* auto margins as belt-and-braces fallback if flex centering ever breaks */
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

/* On smaller screens always go full available width */
@media (max-width: 900px) {
  .aith-page-wrap   { align-items: stretch; }
  .aith-page-container {
    width: 100%;
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Article header */
.aith-article-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--clr-border);
}

.aith-article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--clr-muted);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.aith-article-meta time { font-weight: 500; }
.aith-article-meta a    { color: var(--clr-muted); }
.aith-article-meta a:hover { color: var(--clr-accent); }
.aith-sep { opacity: 0.4; }

.aith-article-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--clr-heading);
  margin: 0;
}

.aith-article-excerpt {
  margin-top: 16px;
  font-size: 1.1rem;
  color: var(--clr-muted);
  line-height: 1.7;
}

/* Featured image */
.aith-article-thumb {
  margin-bottom: 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--clr-border);
}

.aith-article-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

/* Post footer */
.aith-article-footer {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--clr-border);
}

.aith-article-tags {
  font-size: 0.85rem;
  color: var(--clr-muted);
  margin-bottom: 24px;
}

.aith-article-tags .aith-tag-label { font-weight: 600; color: var(--clr-text); }
.aith-article-tags a {
  display: inline-block;
  padding: 3px 10px;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: 100px;
  font-size: 0.78rem;
  color: var(--clr-muted);
  margin: 2px 3px;
  text-decoration: none;
  transition: all var(--transition-fast);
}
.aith-article-tags a:hover {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  color: #fff;
}

.aith-article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.aith-nav-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.aith-nav-link:hover {
  border-color: var(--clr-accent);
  background: var(--clr-surface-2);
}

.aith-nav-link span  { font-size: 0.78rem; color: var(--clr-muted); }
.aith-nav-link strong { font-size: 0.9rem; color: var(--clr-heading); font-weight: 600; display: block; }
.aith-nav-next { text-align: right; }

/* ============================================================
   ENTRY CONTENT — rich text, lists, headings, tables, forms
   ============================================================ */
.aith-entry-content {
  color: var(--clr-text);
  font-size: 1rem;
  line-height: 1.8;
}

/* Headings inside content */
.aith-entry-content h1,
.aith-entry-content h2,
.aith-entry-content h3,
.aith-entry-content h4,
.aith-entry-content h5,
.aith-entry-content h6 {
  color: var(--clr-heading);
  margin: 2em 0 0.6em;
  line-height: 1.3;
}

.aith-entry-content h1 { font-size: 2rem; }
.aith-entry-content h2 { font-size: 1.6rem; padding-bottom: 10px; border-bottom: 1px solid var(--clr-border); }
.aith-entry-content h3 { font-size: 1.25rem; }
.aith-entry-content h4 { font-size: 1.05rem; }

.aith-entry-content p  { margin: 0 0 1.4em; }

.aith-entry-content a {
  color: var(--clr-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.aith-entry-content a:hover { color: var(--clr-accent-2); }

/* ── LISTS — unordered & ordered ── */
.aith-entry-content ul,
.aith-entry-content ol {
  margin: 0 0 1.4em 0;
  padding-left: 0;
  list-style: none;
}

/* Unordered list — custom bullet */
.aith-entry-content ul > li {
  position: relative;
  padding-left: 1.6em;
  margin-bottom: 0.5em;
  color: var(--clr-text);
}

.aith-entry-content ul > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clr-accent);
  flex-shrink: 0;
}

/* Nested ul — smaller hollow bullet */
.aith-entry-content ul ul > li::before {
  width: 5px;
  height: 5px;
  background: transparent;
  border: 2px solid var(--clr-accent);
  top: 0.65em;
}

/* Ordered list — accent-colored counter */
.aith-entry-content ol {
  counter-reset: aith-counter;
}

.aith-entry-content ol > li {
  position: relative;
  padding-left: 2em;
  margin-bottom: 0.5em;
  counter-increment: aith-counter;
  color: var(--clr-text);
}

.aith-entry-content ol > li::before {
  content: counter(aith-counter);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.4em;
  height: 1.4em;
  background: var(--clr-accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-family: var(--font-body);
}

/* Blockquote */
.aith-entry-content blockquote {
  border-left: 3px solid var(--clr-accent);
  background: var(--clr-surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.6em 0;
  padding: 16px 24px;
  color: var(--clr-muted);
  font-style: italic;
  font-size: 1.05rem;
}

.aith-entry-content blockquote p { margin: 0; }

/* Horizontal rule */
.aith-entry-content hr {
  border: none;
  border-top: 1px solid var(--clr-border);
  margin: 2.4em 0;
}

/* Code */
.aith-entry-content code {
  font-family: var(--font-mono, monospace);
  font-size: 0.875em;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--clr-accent-2);
}

.aith-entry-content pre {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  overflow-x: auto;
  margin: 1.6em 0;
}

.aith-entry-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: var(--clr-text);
}

/* Images inside content */
.aith-entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 1.2em 0;
}

/* Tables */
.aith-entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--clr-border);
}

.aith-entry-content th {
  background: var(--clr-surface);
  color: var(--clr-heading);
  font-weight: 700;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--clr-accent);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.aith-entry-content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--clr-border);
  color: var(--clr-text);
  vertical-align: top;
}

.aith-entry-content tr:last-child td { border-bottom: none; }
.aith-entry-content tr:hover td { background: rgba(255,255,255,0.02); }

/* ============================================================
   BEAUTIFUL FORM STYLES — global across all pages/posts
   ============================================================ */
.aith-entry-content input[type="text"],
.aith-entry-content input[type="email"],
.aith-entry-content input[type="url"],
.aith-entry-content input[type="tel"],
.aith-entry-content input[type="number"],
.aith-entry-content input[type="password"],
.aith-entry-content input[type="search"],
.aith-entry-content input[type="date"],
.aith-entry-content textarea,
.aith-entry-content select,
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="url"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="number"],
.wpcf7 input[type="password"],
.wpcf7 textarea,
.wpcf7 select,
.wp-block-search__input,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea,
input.aith-input, textarea.aith-input, select.aith-input {
  width: 100%;
  background: var(--clr-surface) !important;
  border: 1.5px solid var(--clr-border) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--clr-text) !important;
  font-family: var(--font-body) !important;
  font-size: 0.95rem !important;
  padding: 14px 18px !important;
  min-height: 50px !important;
  outline: none !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease !important;
  box-sizing: border-box !important;
  -webkit-appearance: none;
  appearance: none;
}

.aith-entry-content input:focus,
.aith-entry-content textarea:focus,
.aith-entry-content select:focus,
.wpcf7 input:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus,
.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--clr-accent) !important;
  box-shadow: 0 0 0 3px var(--clr-accent-glow) !important;
  background: var(--clr-surface-2) !important;
}

.aith-entry-content input::placeholder,
.aith-entry-content textarea::placeholder,
.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder,
.comment-form input::placeholder,
.comment-form textarea::placeholder {
  color: var(--clr-muted) !important;
  opacity: 1;
}

.aith-entry-content textarea,
.wpcf7 textarea,
.comment-form textarea {
  min-height: 160px;
  resize: vertical;
}

/* Labels */
.aith-entry-content label,
.wpcf7 label,
.comment-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

/* Form field wrapper */
.aith-field-group {
  margin-bottom: 20px;
}

/* Select arrow */
.aith-entry-content select,
.wpcf7 select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  padding-right: 40px !important;
  cursor: pointer;
}

/* Checkboxes & Radios — custom styled */
.aith-entry-content input[type="checkbox"],
.aith-entry-content input[type="radio"],
.wpcf7 input[type="checkbox"],
.wpcf7 input[type="radio"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  padding: 0 !important;
  border-radius: 4px !important;
  background: var(--clr-surface) !important;
  border: 1.5px solid var(--clr-border) !important;
  cursor: pointer;
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  transition: all 0.15s ease !important;
  vertical-align: middle;
  margin-right: 6px;
}

.aith-entry-content input[type="radio"],
.wpcf7 input[type="radio"] {
  border-radius: 50% !important;
}

.aith-entry-content input[type="checkbox"]:checked,
.wpcf7 input[type="checkbox"]:checked {
  background: var(--clr-accent) !important;
  border-color: var(--clr-accent) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

.aith-entry-content input[type="radio"]:checked,
.wpcf7 input[type="radio"]:checked {
  background: var(--clr-accent) !important;
  border-color: var(--clr-accent) !important;
  box-shadow: inset 0 0 0 3px var(--clr-bg) !important;
}

/* ── BUTTONS — global beautiful style ── */
.aith-entry-content input[type="submit"],
.aith-entry-content button[type="submit"],
.aith-entry-content .wp-block-button__link,
.wpcf7 input[type="submit"],
.wpcf7 .wpcf7-submit,
.comment-form .submit,
.btn-content {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: var(--clr-accent) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-body) !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  padding: 15px 32px !important;
  min-height: 52px !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: filter 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease !important;
  letter-spacing: 0.01em !important;
  line-height: 1.4 !important;
  -webkit-appearance: none;
  appearance: none;
}

.aith-entry-content input[type="submit"]:hover,
.aith-entry-content button[type="submit"]:hover,
.aith-entry-content .wp-block-button__link:hover,
.wpcf7 input[type="submit"]:hover,
.wpcf7 .wpcf7-submit:hover,
.comment-form .submit:hover,
.btn-content:hover {
  filter: brightness(1.12) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px var(--clr-accent-glow) !important;
  color: #fff !important;
}

/* Secondary/outline button variant */
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent !important;
  color: var(--clr-accent) !important;
  border: 2px solid var(--clr-accent) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--clr-accent) !important;
  color: #fff !important;
}

/* Form error/success states (CF7 compatible) */
.wpcf7-not-valid-tip {
  font-size: 0.8rem;
  color: #ef4444;
  margin-top: 4px;
  display: block;
}

.wpcf7-not-valid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.15) !important;
}

.wpcf7-mail-sent-ok {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius-sm);
  color: #10b981;
  padding: 12px 16px;
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Comment form specific */
.comment-form {
  margin-top: 40px;
}

.comment-form .comment-notes,
.comment-form .logged-in-as {
  color: var(--clr-muted);
  font-size: 0.875rem;
  margin-bottom: 20px;
}

/* Light theme form overrides */
[data-theme="light"] .aith-entry-content input,
[data-theme="light"] .aith-entry-content textarea,
[data-theme="light"] .aith-entry-content select,
[data-theme="light"] .wpcf7 input,
[data-theme="light"] .wpcf7 textarea,
[data-theme="light"] .wpcf7 select,
[data-theme="light"] .comment-form input,
[data-theme="light"] .comment-form textarea {
  background: #fff !important;
  border-color: rgba(0,0,0,0.15) !important;
  color: #111 !important;
}

[data-theme="light"] .aith-entry-content input:focus,
[data-theme="light"] .aith-entry-content textarea:focus,
[data-theme="light"] .wpcf7 input:focus,
[data-theme="light"] .wpcf7 textarea:focus,
[data-theme="light"] .comment-form input:focus,
[data-theme="light"] .comment-form textarea:focus {
  border-color: var(--clr-accent) !important;
  background: #fafafa !important;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06) !important;
}

[data-theme="light"] .aith-entry-content ul > li::before { background: var(--clr-accent); }
[data-theme="light"] .aith-entry-content ol > li::before { background: var(--clr-accent); }
[data-theme="light"] .aith-entry-content blockquote { background: #f8fafc; color: #444; }
[data-theme="light"] .aith-entry-content th { background: #f8fafc; color: #0f172a; }
[data-theme="light"] .aith-entry-content td { color: #1e293b; }
[data-theme="light"] .aith-entry-content code { background: #f1f5f9; border-color: #e2e8f0; color: #0891b2; }
[data-theme="light"] .aith-entry-content pre  { background: #f8fafc; border-color: #e2e8f0; }
[data-theme="light"] .aith-nav-link { background: #fff; }
[data-theme="light"] .aith-nav-link:hover { background: #f8fafc; }
[data-theme="light"] .aith-nav-link strong { color: #0f172a; }

/* ============================================================
   SMART PLUGIN FORM DARK-THEME FIX
   When dark theme is active, plugin forms that ship with their
   own white/light backgrounds need dark text & labels.
   We detect common plugin wrapper classes and force dark text
   ONLY within those containers — without touching WP login/register.
   ============================================================ */

/* ── Selectors that cover most plugin form containers ──
   Contact Form 7, WPForms, Elementor Forms, Gravity Forms,
   Ninja Forms, Fluent Forms, WooCommerce, MailChimp, etc.   */
:root {
  --form-bg-light:   #ffffff;
  --form-text-dark:  #111111;
  --form-muted-dark: #444444;
  --form-border-dark: rgba(0,0,0,0.15);
}

/* Generic: any element that has an explicit white / near-white bg
   and contains a form — use a broad but safe selector list       */
[data-theme="dark"] .wpcf7,
[data-theme="dark"] .wpforms-container,
[data-theme="dark"] .gform_wrapper,
[data-theme="dark"] .nf-form-cont,
[data-theme="dark"] .fluentform,
[data-theme="dark"] .ff-el-group,
[data-theme="dark"] .elementor-form,
[data-theme="dark"] .mc4wp-form,
[data-theme="dark"] .tml,                /* Theme My Login */
[data-theme="dark"] .um-form,            /* Ultimate Member */
[data-theme="dark"] .buddypress form,
[data-theme="dark"] .woocommerce form,
[data-theme="dark"] .woocommerce-checkout,
[data-theme="dark"] .woocommerce-account,
[data-theme="dark"] .woocommerce-cart,
[data-theme="dark"] .comment-form,
[data-theme="dark"] .widget_search form,
[data-theme="dark"] .search-form {
  /* Give plugin forms a solid light card look in dark mode */
  background: var(--form-bg-light);
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid rgba(0,0,0,0.08);
}

/* Force all text elements inside plugin forms to dark */
[data-theme="dark"] .wpcf7 *,
[data-theme="dark"] .wpforms-container *,
[data-theme="dark"] .gform_wrapper *,
[data-theme="dark"] .nf-form-cont *,
[data-theme="dark"] .fluentform *,
[data-theme="dark"] .ff-el-group *,
[data-theme="dark"] .elementor-form *,
[data-theme="dark"] .mc4wp-form *,
[data-theme="dark"] .tml *,
[data-theme="dark"] .um-form *,
[data-theme="dark"] .buddypress form *,
[data-theme="dark"] .woocommerce form *,
[data-theme="dark"] .woocommerce-checkout *,
[data-theme="dark"] .comment-form * {
  color: var(--form-text-dark) !important;
}

/* More specific — labels, headings, paragraphs inside plugin forms */
[data-theme="dark"] .wpcf7 label,
[data-theme="dark"] .wpcf7 h1, [data-theme="dark"] .wpcf7 h2,
[data-theme="dark"] .wpcf7 h3, [data-theme="dark"] .wpcf7 p,
[data-theme="dark"] .wpforms-container label,
[data-theme="dark"] .wpforms-container h1, [data-theme="dark"] .wpforms-container h2,
[data-theme="dark"] .wpforms-container p,
[data-theme="dark"] .gform_wrapper label,
[data-theme="dark"] .gform_wrapper .gfield_label,
[data-theme="dark"] .gform_wrapper .ginput_container,
[data-theme="dark"] .um-form label,
[data-theme="dark"] .tml label,
[data-theme="dark"] .woocommerce form label,
[data-theme="dark"] .woocommerce-checkout label,
[data-theme="dark"] .comment-form label,
[data-theme="dark"] .comment-form .comment-notes {
  color: var(--form-text-dark) !important;
}

/* Plugin form inputs in dark mode — white bg with dark text */
[data-theme="dark"] .wpcf7 input[type="text"],
[data-theme="dark"] .wpcf7 input[type="email"],
[data-theme="dark"] .wpcf7 input[type="url"],
[data-theme="dark"] .wpcf7 input[type="tel"],
[data-theme="dark"] .wpcf7 input[type="number"],
[data-theme="dark"] .wpcf7 input[type="password"],
[data-theme="dark"] .wpcf7 textarea,
[data-theme="dark"] .wpcf7 select,
[data-theme="dark"] .wpforms-container input[type="text"],
[data-theme="dark"] .wpforms-container input[type="email"],
[data-theme="dark"] .wpforms-container textarea,
[data-theme="dark"] .wpforms-container select,
[data-theme="dark"] .gform_wrapper input,
[data-theme="dark"] .gform_wrapper textarea,
[data-theme="dark"] .gform_wrapper select,
[data-theme="dark"] .um-form input,
[data-theme="dark"] .um-form textarea,
[data-theme="dark"] .tml input,
[data-theme="dark"] .woocommerce form input,
[data-theme="dark"] .woocommerce form textarea,
[data-theme="dark"] .woocommerce form select,
[data-theme="dark"] .woocommerce-checkout input,
[data-theme="dark"] .woocommerce-checkout textarea,
[data-theme="dark"] .woocommerce-checkout select,
[data-theme="dark"] .comment-form input[type="text"],
[data-theme="dark"] .comment-form input[type="email"],
[data-theme="dark"] .comment-form input[type="url"],
[data-theme="dark"] .comment-form textarea {
  background: #f9fafb !important;
  border: 1.5px solid rgba(0,0,0,0.18) !important;
  color: #111111 !important;
}

[data-theme="dark"] .wpcf7 input::placeholder,
[data-theme="dark"] .wpcf7 textarea::placeholder,
[data-theme="dark"] .wpforms-container input::placeholder,
[data-theme="dark"] .wpforms-container textarea::placeholder,
[data-theme="dark"] .gform_wrapper input::placeholder,
[data-theme="dark"] .gform_wrapper textarea::placeholder,
[data-theme="dark"] .woocommerce form input::placeholder,
[data-theme="dark"] .comment-form input::placeholder,
[data-theme="dark"] .comment-form textarea::placeholder {
  color: #888888 !important;
}

/* Plugin form submit buttons in dark mode — keep accent color */
[data-theme="dark"] .wpcf7 input[type="submit"],
[data-theme="dark"] .wpcf7 .wpcf7-submit,
[data-theme="dark"] .wpforms-container button[type="submit"],
[data-theme="dark"] .wpforms-submit,
[data-theme="dark"] .gform_wrapper input[type="submit"],
[data-theme="dark"] .gform_button,
[data-theme="dark"] .woocommerce form .button,
[data-theme="dark"] .woocommerce-checkout #place_order,
[data-theme="dark"] .comment-form .submit {
  background: var(--clr-accent) !important;
  color: #ffffff !important;
  border: none !important;
}

/* ── WordPress Login / Register pages ──
   These use #loginform, .login class on <body>.
   We explicitly leave these ALONE (no overrides) so WP's
   own styles control them. We only reset what our earlier
   broad rules might have touched.                          */
.login body,
.login #loginform,
.login #loginform label,
.login #loginform input,
.login #nav,
.login #backtoblog,
#loginform,
#registerform,
#lostpasswordform {
  /* Inherit WP's own login styles — do NOT force dark text */
  color: inherit !important;
  background: inherit !important;
  border-color: inherit !important;
}

/* Also cover .aith-entry-content content that may carry plugin shortcodes —
   scope heading/list/label colors to be dark when they're inside a
   form plugin wrapper that has a light background                       */
[data-theme="dark"] .aith-entry-content .wpcf7 label,
[data-theme="dark"] .aith-entry-content .wpcf7 h2,
[data-theme="dark"] .aith-entry-content .wpcf7 h3,
[data-theme="dark"] .aith-entry-content .wpcf7 p,
[data-theme="dark"] .aith-entry-content .wpcf7 li,
[data-theme="dark"] .aith-entry-content .wpforms-container label,
[data-theme="dark"] .aith-entry-content .wpforms-container h2,
[data-theme="dark"] .aith-entry-content .wpforms-container p,
[data-theme="dark"] .aith-entry-content .wpforms-container li,
[data-theme="dark"] .aith-entry-content .gform_wrapper label,
[data-theme="dark"] .aith-entry-content .gform_wrapper p,
[data-theme="dark"] .aith-entry-content .gform_wrapper li {
  color: var(--form-text-dark) !important;
}

/* ── Entry content base text — use theme color var (not hardcoded) ──
   This replaces the need for your manual .aith-entry-content h2/ul/label
   custom CSS. These will work correctly in both light and dark modes.   */
.aith-entry-content h1,
.aith-entry-content h2,
.aith-entry-content h3,
.aith-entry-content h4,
.aith-entry-content h5,
.aith-entry-content h6 {
  color: var(--clr-heading) !important;
}

.aith-entry-content ul > li,
.aith-entry-content ol > li {
  color: var(--clr-text) !important;
}

.aith-entry-content > label {
  color: var(--clr-text) !important;
}

/* ── Remove your manual custom CSS override ──
   The following rules supersede it so you don't need:
   .aith-entry-content h2 { color: #000000; }
   .aith-entry-content ul > li { color: #000000; }
   .aith-entry-content label { color: #000000; }
   Those hardcoded black values break dark theme —
   the var() values above work in both modes.         */

/* ============================================================
   UNIVERSAL DARK THEME TEXT FIX FOR ALL PLUGIN FORMS
   Uses CSS filter/inversion approach + universal selectors to
   catch ANY plugin that renders its own white-background card.
   ============================================================ */

/* The real universal solution:
   In dark mode, ANY element that has a background close to white
   should have dark text. We can't detect bg-color in CSS alone,
   so we target the most common plugin wrapper patterns broadly,
   plus give a universal override for .entry-content children    */

/* Step 1: Universal rule — all direct children of entry-content
   that are block-level containers (divs, sections, articles)
   get a white card treatment in dark mode so embedded plugins
   always have a coherent light-on-dark or dark-on-light style  */
[data-theme="dark"] .aith-entry-content > div,
[data-theme="dark"] .aith-entry-content > section,
[data-theme="dark"] .aith-entry-content > article,
[data-theme="dark"] .aith-entry-content > form {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 28px;
  color: #111111;
}

/* Step 2: Force ALL text inside those containers to be dark */
[data-theme="dark"] .aith-entry-content > div *,
[data-theme="dark"] .aith-entry-content > section *,
[data-theme="dark"] .aith-entry-content > article *,
[data-theme="dark"] .aith-entry-content > form * {
  color: #111111 !important;
}

/* Step 3: Fix all inputs/selects inside those containers */
[data-theme="dark"] .aith-entry-content > div input,
[data-theme="dark"] .aith-entry-content > div textarea,
[data-theme="dark"] .aith-entry-content > div select,
[data-theme="dark"] .aith-entry-content > section input,
[data-theme="dark"] .aith-entry-content > section textarea,
[data-theme="dark"] .aith-entry-content > section select,
[data-theme="dark"] .aith-entry-content > form input,
[data-theme="dark"] .aith-entry-content > form textarea,
[data-theme="dark"] .aith-entry-content > form select {
  background: #f8f9fa !important;
  color: #111111 !important;
  border-color: rgba(0,0,0,0.2) !important;
}

[data-theme="dark"] .aith-entry-content > div input::placeholder,
[data-theme="dark"] .aith-entry-content > div textarea::placeholder,
[data-theme="dark"] .aith-entry-content > section input::placeholder,
[data-theme="dark"] .aith-entry-content > form input::placeholder,
[data-theme="dark"] .aith-entry-content > form textarea::placeholder {
  color: #666666 !important;
}

/* Step 4: Buttons inside plugin containers keep accent color */
[data-theme="dark"] .aith-entry-content > div button,
[data-theme="dark"] .aith-entry-content > div input[type="submit"],
[data-theme="dark"] .aith-entry-content > section button,
[data-theme="dark"] .aith-entry-content > section input[type="submit"],
[data-theme="dark"] .aith-entry-content > form button,
[data-theme="dark"] .aith-entry-content > form input[type="submit"] {
  background: var(--clr-accent) !important;
  color: #ffffff !important;
  border: none !important;
}

/* Step 5: Specific exception — headings that belong to the
   PAGE content (direct children of entry-content, not inside
   a plugin wrapper div) stay using theme color vars           */
[data-theme="dark"] .aith-entry-content > h1,
[data-theme="dark"] .aith-entry-content > h2,
[data-theme="dark"] .aith-entry-content > h3,
[data-theme="dark"] .aith-entry-content > h4,
[data-theme="dark"] .aith-entry-content > h5,
[data-theme="dark"] .aith-entry-content > h6 {
  color: var(--clr-heading) !important;
  background: transparent !important;
  padding: 0 !important;
}

[data-theme="dark"] .aith-entry-content > p {
  color: var(--clr-text) !important;
  background: transparent !important;
  padding: 0 !important;
}

[data-theme="dark"] .aith-entry-content > ul,
[data-theme="dark"] .aith-entry-content > ol {
  background: transparent !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

[data-theme="dark"] .aith-entry-content > ul li,
[data-theme="dark"] .aith-entry-content > ol li {
  color: var(--clr-text) !important;
}

/* Step 6: Blockquotes, code, tables stay themed */
[data-theme="dark"] .aith-entry-content > blockquote {
  color: var(--clr-muted) !important;
  background: var(--clr-surface) !important;
  padding: 16px 24px !important;
}

[data-theme="dark"] .aith-entry-content > pre {
  background: var(--clr-surface) !important;
  color: var(--clr-text) !important;
}

[data-theme="dark"] .aith-entry-content > table {
  background: transparent !important;
  color: var(--clr-text) !important;
}
