/* ===========================
   AIGRIDS.TECH — MAIN CSS
   Full Mobile-First Rewrite
   =========================== */

:root {
  --bg-primary: #050816;
  --bg-secondary: #0B1220;
  --accent: #00D4FF;
  --accent-dark: #0066FF;
  --gradient: linear-gradient(135deg, #0066FF, #00D4FF);
  --gradient-glow: linear-gradient(135deg, rgba(0,102,255,0.3), rgba(0,212,255,0.3));
  --text-primary: #FFFFFF;
  --text-secondary: #A0AEC0;
  --card-bg: rgba(255,255,255,0.04);
  --card-border: rgba(255,255,255,0.08);
  --card-hover: rgba(0,212,255,0.06);
  --shadow-glow: 0 0 40px rgba(0,212,255,0.15);
  --shadow-card: 0 4px 32px rgba(0,0,0,0.4);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: 'Oxanium', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--nav-h, 64px); /* JS will update this when recently-viewed strip shows */
}

img { max-width: 100%; height: auto; display: block; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-dark); border-radius: 3px; }

/* ===== UTILITY ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section-sm { padding: 48px 0; }
.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-center { text-align: center; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-48 { margin-bottom: 48px; }

/* Responsive grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}
.page-link:hover {
  border-color: var(--accent);
  background: rgba(0,212,255,0.08);
  color: var(--text-primary);
}
.page-link.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

/* ===========================
   NAVBAR
   =========================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(5,8,22,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  transition: var(--transition);
  height: var(--nav-h);
}
.navbar.scrolled {
  background: rgba(5,8,22,0.97);
  box-shadow: 0 4px 32px rgba(0,0,0,0.5);
}
.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  z-index: 1001;
}
.logo-img {
  width: 34px; height: 34px;
  object-fit: contain;
  border-radius: 7px;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

/* Desktop nav */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--card-bg);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%;
  transform: translateX(-50%);
  width: 18px; height: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.nav-cta {
  background: var(--gradient) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  padding: 9px 18px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
  box-shadow: 0 0 18px rgba(0,212,255,0.2);
  margin-left: 4px;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,212,255,0.4) !important;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--card-border);
  cursor: pointer;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  z-index: 1001;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }

/* Navbar offset spacer */
.nav-spacer { height: var(--nav-h); }

/* ===========================
   BUTTONS
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 0 20px rgba(0,212,255,0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0,212,255,0.45);
}
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--card-border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(0,212,255,0.12);
}
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }

/* ===========================
   CARDS
   =========================== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: rgba(0,212,255,0.25);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

/* ===========================
   SECTION HEADERS
   =========================== */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.2);
  color: var(--accent);
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 14px;
}
.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 600px;
  line-height: 1.7;
}

/* ===========================
   HERO — HOME PAGE
   =========================== */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 50% -5%, rgba(0,102,255,0.22) 0%, transparent 60%),
    radial-gradient(ellipse 55% 40% at 85% 65%, rgba(0,212,255,0.08) 0%, transparent 50%),
    var(--bg-primary);
}
.grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 64px 0;
  width: 100%;
}

/* Ensure hero stacks cleanly on smaller screens and hide heavy visuals */
@media (max-width: 860px) {
  .hero-content {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    padding: 32px 0 !important;
    text-align: center;
  }
  .hero-image { display: none !important; }
  .hero-badge { margin: 0 auto 12px; }
  .hero-actions { justify-content: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; max-width: 100%; }
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.2);
  padding: 7px 18px;
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 20px;
  animation: fadeInDown 0.6s ease both;
}
.badge-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 18px;
  animation: fadeInUp 0.7s 0.1s ease both;
}
.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 32px;
  animation: fadeInUp 0.7s 0.2s ease both;
  max-width: 500px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s 0.3s ease both;
}
.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 36px;
  animation: fadeInUp 0.7s 0.4s ease both;
  flex-wrap: wrap;
}
.stat-item { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.stat-label { color: var(--text-secondary); font-size: 0.78rem; margin-top: 2px; }

.hero-image {
  position: relative;
  animation: fadeInRight 0.9s 0.2s ease both;
}
.hero-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 50px rgba(0,212,255,0.12), 0 20px 50px rgba(0,0,0,0.5);
  border: 1px solid var(--card-border);
  object-fit: cover;
}
.hero-image::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse, rgba(0,212,255,0.08) 0%, transparent 70%);
  z-index: -1;
}
.floating-card {
  position: absolute;
  background: rgba(11,18,32,0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.78rem;
  animation: float 3s ease-in-out infinite;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.floating-card.fc1 { top: 8%; right: -3%; animation-delay: 0s; }
.floating-card.fc2 { bottom: 12%; left: -5%; animation-delay: 1.5s; }
.fc-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.fc-green { background: #00FF88; }
.fc-cyan { background: var(--accent); }

/* ===========================
   CATEGORIES
   =========================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.category-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.category-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient);
  transform: scaleX(0);
  transition: var(--transition);
}
.category-card:hover {
  border-color: rgba(0,212,255,0.3);
  transform: translateY(-5px);
  box-shadow: 0 0 28px rgba(0,212,255,0.1);
}
.category-card:hover::after { transform: scaleX(1); }
.cat-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  display: block;
  transition: var(--transition);
}
.category-card:hover .cat-icon { transform: scale(1.12); }
.cat-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 3px; }
.cat-count { color: var(--text-secondary); font-size: 0.77rem; }

/* ===========================
   TOOL CARDS
   =========================== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tool-card:hover {
  border-color: rgba(0,212,255,0.25);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}
.tool-header { display: flex; align-items: center; gap: 12px; }
.tool-logo {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.tool-meta { flex: 1; min-width: 0; }
.tool-name { font-weight: 700; font-size: 0.97rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-category {
  font-size: 0.72rem;
  color: var(--accent);
  background: rgba(0,212,255,0.08);
  padding: 2px 8px;
  border-radius: 100px;
  display: inline-block;
}
.tool-rating { display: flex; align-items: center; gap: 4px; color: #FFD700; font-size: 0.83rem; font-weight: 600; }
.tool-desc { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.6; flex: 1; }
.tool-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  flex-wrap: wrap;
  gap: 8px;
}
.tool-footer-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.pricing-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
}
.badge-free     { background: rgba(0,255,136,0.1);  color: #00FF88; border: 1px solid rgba(0,255,136,0.2); }
.badge-paid     { background: rgba(0,102,255,0.1);  color: #6699FF; border: 1px solid rgba(0,102,255,0.2); }
.badge-freemium { background: rgba(255,165,0,0.1);  color: #FFB347; border: 1px solid rgba(255,165,0,0.2); }

/* ===========================
   WHY SECTION
   =========================== */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.why-features { display: flex; flex-direction: column; gap: 16px; }
.why-feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.why-feature:hover { border-color: rgba(0,212,255,0.2); }
.why-icon {
  width: 42px; height: 42px;
  background: var(--gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.why-text h4 { font-weight: 600; margin-bottom: 3px; font-size: 0.95rem; }
.why-text p  { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.55; }
.why-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
  border: 1px solid var(--card-border);
  object-fit: cover;
}

/* ===========================
   NEWSLETTER
   =========================== */
.newsletter-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.newsletter-section::before {
  content: '';
  position: absolute;
  top: -60%; left: -20%;
  width: 60%; height: 200%;
  background: radial-gradient(ellipse, rgba(0,102,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 24px auto 0;
  flex-wrap: wrap;
}
.newsletter-form input {
  flex: 1;
  min-width: 200px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.93rem;
  outline: none;
  transition: var(--transition);
}
.newsletter-form input:focus { border-color: var(--accent); box-shadow: 0 0 10px rgba(0,212,255,0.12); }
.newsletter-form input::placeholder { color: var(--text-secondary); }
.newsletter-form .btn { flex-shrink: 0; }

/* ===========================
   BLOG
   =========================== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.blog-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  border-color: rgba(0,212,255,0.25);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.blog-thumb { width: 100%; height: 190px; object-fit: cover; }
.blog-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.blog-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.blog-title { font-weight: 700; font-size: 0.97rem; line-height: 1.4; margin-bottom: 8px; }
.blog-excerpt { color: var(--text-secondary); font-size: 0.84rem; line-height: 1.6; flex: 1; }
.blog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 0.77rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 4px;
}

/* ===========================
   COMPARE TABLE
   =========================== */
.compare-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  -webkit-overflow-scrolling: touch;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 500px;
}
.compare-table th {
  background: rgba(0,212,255,0.06);
  padding: 16px 20px;
  text-align: left;
  font-weight: 700;
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
}
.compare-table th:first-child { color: var(--text-secondary); font-weight: 500; }
.compare-table td {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary);
}
.compare-table td:first-child { color: var(--text-primary); font-weight: 500; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover td { background: rgba(0,212,255,0.02); }
.check { color: #00FF88; }
.cross { color: #FF4444; }

/* ===========================
   PAGE HERO (inner pages)
   =========================== */
.page-hero {
  padding: 40px 0 56px;
  position: relative;
  overflow: hidden;
  text-align: center;
  /* body already has padding-top: nav-h, so only add section-specific offset */
  padding-top: 20px;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(0,102,255,0.13) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero-img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-top: 36px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-glow);
}

/* ===========================
   SEARCH BAR
   =========================== */
.search-bar {
  display: flex;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 6px 6px 6px 18px;
  transition: var(--transition);
  align-items: center;
}
.search-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 18px rgba(0,212,255,0.12); }
.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  min-width: 0;
  padding: 6px 0;
}
.search-bar input::placeholder { color: var(--text-secondary); }

/* ===========================
   FILTERS
   =========================== */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 20px 0;
}
.filter-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  white-space: nowrap;
}
.filter-btn:hover,
.filter-btn.active {
  background: rgba(0,212,255,0.1);
  border-color: var(--accent);
  color: var(--accent);
}

/* ===========================
   CONTACT FORM
   =========================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 40px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 16px; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.contact-item:hover { border-color: rgba(0,212,255,0.2); }
.contact-icon {
  width: 42px; height: 42px;
  background: var(--gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr minmax(420px, 1.2fr);
  gap: 32px;
  align-items: stretch;
}
.contact-info { display: flex; flex-direction: column; gap: 16px; height: 100%; }
.contact-right { display: flex; flex-direction: column; gap: 24px; height: 100%; }
.contact-right .card { display: flex; flex-direction: column; gap: 24px; }
.contact-text h4 { font-weight: 600; margin-bottom: 2px; font-size: 0.95rem; }
.contact-text a,
.contact-text p { color: var(--text-secondary); font-size: 0.88rem; text-decoration: none; line-height: 1.5; }
.contact-text a:hover { color: var(--accent); }

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }
.form-group input,
.form-group textarea,
.form-group select {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition);
  resize: vertical;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(0,212,255,0.1);
  background: rgba(0,212,255,0.03);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(160,174,192,0.6); }
.form-group select { cursor: pointer; }
.form-group select option { background: #0B1220; color: var(--text-primary); }

/* ===========================
   ABOUT / TEAM
   =========================== */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.team-card {
  text-align: center;
  padding: 28px 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.team-card:hover { border-color: rgba(0,212,255,0.2); transform: translateY(-4px); }
.team-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  margin: 0 auto 14px;
  border: 2px solid rgba(0,212,255,0.2);
}
.team-name { font-weight: 700; font-size: 1rem; margin-bottom: 3px; }
.team-role { color: var(--accent); font-size: 0.82rem; font-weight: 500; }

/* ===========================
   FOOTER
   =========================== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--card-border);
  padding: 64px 0 28px;
  position: relative;
  overflow: hidden;
}
.footer-glow {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 500px; height: 160px;
  background: radial-gradient(ellipse, rgba(0,102,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 10px;
}
.footer-tagline { color: var(--accent); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.8px; margin-bottom: 10px; }
.footer-desc { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.7; margin-bottom: 18px; }
.footer-social { display: flex; gap: 10px; flex-wrap: wrap; }
.social-link {
  width: 34px; height: 34px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}
.social-link:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.footer-col h4 { font-weight: 700; margin-bottom: 14px; font-size: 0.9rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--accent); padding-left: 3px; }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.contact-list li { display: flex; align-items: flex-start; gap: 8px; color: var(--text-secondary); font-size: 0.85rem; }
.footer-newsletter h4 { margin-top: 20px; margin-bottom: 10px; font-size: 0.9rem; font-weight: 700; }
.inline-subscribe { display: flex; gap: 7px; }
.inline-subscribe input {
  flex: 1;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.84rem;
  outline: none;
  min-width: 0;
}
.inline-subscribe input:focus { border-color: var(--accent); }
.inline-subscribe button {
  width: 38px; height: 38px;
  background: var(--gradient);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.inline-subscribe button:hover { transform: scale(1.05); box-shadow: 0 0 14px rgba(0,212,255,0.3); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--card-border);
  font-size: 0.82rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text-secondary); text-decoration: none; transition: var(--transition); font-size: 0.82rem; }
.footer-links a:hover { color: var(--accent); }

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(36px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.55; transform: scale(0.75); }
}
.fade-in          { animation: fadeInUp 0.7s ease both; }
.fade-in-delay-1  { animation: fadeInUp 0.7s 0.1s ease both; }
.fade-in-delay-2  { animation: fadeInUp 0.7s 0.2s ease both; }
.fade-in-delay-3  { animation: fadeInUp 0.7s 0.3s ease both; }

/* Scroll reveal */
.reveal         { opacity: 0; transform: translateY(26px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===========================
   TOAST
   =========================== */
.toast {
  position: fixed;
  bottom: 20px; right: 20px;
  background: rgba(11,18,32,0.97);
  backdrop-filter: blur(16px);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 13px 22px;
  color: var(--text-primary);
  font-size: 0.88rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 9999;
  animation: fadeInUp 0.4s ease;
  max-width: calc(100vw - 40px);
}

/* ===========================
   MISC COMPONENTS
   =========================== */
.divider { height: 1px; background: var(--card-border); margin: 48px 0; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
}
.tag-new { background: rgba(0,255,136,0.1);  color: #00FF88; border: 1px solid rgba(0,255,136,0.2); }
.tag-hot { background: rgba(255,80,80,0.1);  color: #FF5050; border: 1px solid rgba(255,80,80,0.2); }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-secondary); text-decoration: none; transition: var(--transition); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: rgba(255,255,255,0.25); }

/* ===========================
   ★ RESPONSIVE — TABLET 1024px
   =========================== */
@media (max-width: 1024px) {
  .hero-content { gap: 36px; }
  .footer-grid  { grid-template-columns: 1fr 1fr; gap: 32px; }
  .tools-grid   { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ===========================
   ★ RESPONSIVE — TABLET 900px
   =========================== */
@media (max-width: 900px) {
  .hero-content     { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .hero-text        { display: flex; flex-direction: column; align-items: center; }
  .hero-subtitle    { max-width: 100%; }
  .hero-image       { order: -1; max-width: 540px; margin: 0 auto; }
  .hero-stats       { justify-content: center; }
  .hero-actions     { justify-content: center; }
  .why-grid         { grid-template-columns: 1fr; gap: 32px; }
  .why-image        { order: -1; }
  .blog-grid        { grid-template-columns: repeat(2, 1fr); }
  .team-grid        { grid-template-columns: repeat(2, 1fr); }
  .contact-grid     { grid-template-columns: 1fr; }
  .form-row         { grid-template-columns: 1fr 1fr; }
}


/* ===========================
   ★ RESPONSIVE — MOBILE 768px
   =========================== */
@media (max-width: 768px) {
  :root { --nav-h: 60px; }

  /* ---- Hamburger menu ---- */
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(5,8,22,0.99);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 16px 24px;
    gap: 2px;
    border-bottom: 1px solid var(--card-border);
    /* Hidden state */
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    max-height: calc(100svh - var(--nav-h));
    overflow-y: auto;
    z-index: 999;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
    visibility: visible;
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    width: 100%;
  }
  .nav-links a.active::after { display: none; }
  .nav-cta {
    margin-left: 0 !important;
    margin-top: 8px;
    text-align: center;
    border-radius: var(--radius-sm) !important;
  }

  /* ---- Layout ---- */
  .section { padding: 48px 0; }
  .section-title { font-size: 1.65rem; }
  .container { padding: 0 16px; }

  /* ---- Hero ---- */
  .floating-card { display: none; }
  .hero { min-height: auto; padding-top: 16px; }
  .hero-content { padding: 40px 0; }
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { gap: 20px; }

  /* ---- Grids ---- */
  .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tools-grid      { grid-template-columns: 1fr; }
  .blog-grid       { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  /* ---- Newsletter ---- */
  .newsletter-section { padding: 36px 20px; border-radius: var(--radius-lg); }
  .newsletter-form    { flex-direction: column; }
  .newsletter-form .btn { width: 100%; }

  /* ---- Contact ---- */
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  /* ---- Footer — mobile beautiful ---- */
  .footer {
    padding: 48px 0 0;
    position: relative;
  }

  /* Stronger top glow on mobile for drama */
  .footer-glow {
    width: 320px;
    height: 120px;
    background: radial-gradient(ellipse, rgba(0,102,255,0.13) 0%, transparent 70%);
  }

  /* Brand col: centered with divider line */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Each column gets a tasteful separator + internal padding */
  .footer-col {
    min-width: 0;
    padding: 24px 0;
    border-bottom: 1px solid var(--card-border);
    position: relative;
  }

  /* Brand column — center-aligned on mobile */
  .footer-col:first-child {
    padding-top: 0;
    text-align: center;
    padding-bottom: 28px;
  }
  .footer-col:first-child .footer-logo {
    justify-content: center;
  }
  .footer-col:first-child .footer-social {
    justify-content: center;
  }

  /* Collapsible nav columns: header acts as toggle trigger */
  .footer-col h4 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
    font-size: 0.88rem;
    letter-spacing: 0.5px;
    padding-right: 4px;
  }

  /* Chevron indicator */
  .footer-col h4::after {
    content: '›';
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--accent);
    transform: rotate(90deg);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    line-height: 1;
  }
  .footer-col.open h4::after {
    transform: rotate(270deg);
  }

  /* Collapsible list: hidden by default */
  .footer-col ul,
  .footer-col .contact-list {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease,
                margin-top 0.25s ease;
    margin-top: 0;
    gap: 0;
  }
  .footer-col.open ul,
  .footer-col.open .contact-list {
    max-height: 400px;
    opacity: 1;
    margin-top: 14px;
    gap: 10px;
  }
  .footer-col ul li,
  .footer-col .contact-list li {
    animation: none;
  }

  /* Newsletter col: always visible, no toggle */
  .footer-newsletter h4 {
    cursor: default;
    margin-top: 0;
    margin-bottom: 10px;
  }
  .footer-newsletter h4::after { display: none; }
  .footer-newsletter .inline-subscribe {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .footer-newsletter .inline-subscribe input {
    width: 100%;
    padding: 11px 14px;
    font-size: 0.9rem;
  }
  .footer-newsletter .inline-subscribe button {
    width: 100%;
    height: 42px;
    font-size: 0.88rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
  .footer-newsletter .inline-subscribe button::after {
    content: ' Subscribe';
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-body);
  }

  /* Social links: larger tap targets on mobile */
  .footer-social { gap: 10px; flex-wrap: wrap; }
  .footer-col:first-child .footer-social .social-link {
    width: 40px;
    height: 40px;
    font-size: 0.85rem;
  }

  /* Footer bottom: stacked, centered */
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 22px 0 28px;
    margin-top: 0;
    border-top: none;
    background: linear-gradient(0deg, rgba(0,102,255,0.04) 0%, transparent 100%);
  }
  .footer-bottom > * { width: 100%; }
  .footer-links {
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
  }
  .footer-links a {
    font-size: 0.8rem;
    position: relative;
    padding: 2px 0;
  }
  /* copyright text center */
  .footer-bottom > span,
  .footer-bottom > p,
  .footer-bottom > div:not(.footer-links) {
    text-align: center;
  }

  /* ---- Compare table ---- */
  .compare-table { font-size: 0.8rem; }
  .compare-table th,
  .compare-table td { padding: 10px 12px; }

  /* ---- Page hero ---- */
  .page-hero { padding-top: 16px; padding-bottom: 36px; }

  /* ---- Why grid ---- */
  .why-grid { gap: 24px; }
}

/* ===========================
   ★ RESPONSIVE — MOBILE 480px
   =========================== */
@media (max-width: 480px) {
  .hero-title   { font-size: 1.75rem; }
  .section-title { font-size: 1.5rem; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .category-card { padding: 18px 12px; }
  .cat-icon { font-size: 1.7rem; }
  .team-grid { grid-template-columns: 1fr; }
  .newsletter-section { padding: 28px 16px; }
  .btn-lg { padding: 14px 24px; font-size: 0.95rem; }
  .tool-footer { flex-direction: column; align-items: flex-start; }
  .tool-footer-btns { width: 100%; justify-content: flex-end; }
  .page-hero-img { max-height: 220px; }
  .blog-thumb { height: 160px; }
  /* VS banner on compare page */
  .vs-banner { flex-direction: column !important; gap: 16px !important; }
  .vs-text   { font-size: 1.4rem !important; }

  /* Footer 480px tweaks */
  .footer { padding-top: 40px; }
  .footer-col:first-child { padding-bottom: 24px; }
  .footer-col:first-child .footer-logo { font-size: 1.1rem; }
  .footer-links { gap: 12px; }
  .footer-links a { font-size: 0.78rem; }
}

/* ===========================
   ★ RESPONSIVE — TINY 360px
   =========================== */
@media (max-width: 360px) {
  .container { padding: 0 12px; }
  .hero-title { font-size: 1.55rem; }
  .hero-stats { gap: 14px; }
  .stat-num   { font-size: 1.4rem; }
  .categories-grid { gap: 8px; }
  .category-card { padding: 14px 8px; }

  /* Footer tiny phone tweaks */
  .footer-col:first-child .social-link { width: 36px; height: 36px; }
  .footer-links { gap: 10px; }
  .footer-bottom { gap: 12px; padding-bottom: 24px; }
}

/* ===========================
   LIGHT MODE — REFINED PALETTE
   Slate-blue tones with depth,
   no pure white overload
   =========================== */
[data-theme="light"] {
  /* Backgrounds — layered gray-blue palette */
  --bg-primary:   #f3f6fb;   /* soft blue-gray page bg */
  --bg-secondary: #eef4fb;   /* slightly lighter sections */
  --card-bg:      rgba(248,250,255,0.92);
  --card-border:  rgba(37,99,235,0.10);
  --card-hover:   rgba(37,99,235,0.05);

  /* Text */
  --text-primary:   #0f172a;
  --text-secondary: #4b5e7a;

  /* Accent */
  --accent:      #2563eb;
  --accent-dark: #1d4ed8;
  --gradient:    linear-gradient(135deg, #1d4ed8, #3b82f6);
  --gradient-glow: linear-gradient(135deg, rgba(37,99,235,0.25), rgba(59,130,246,0.25));

  /* Shadows & glow */
  --shadow-glow: 0 4px 24px rgba(37,99,235,0.12);
  --shadow-card: 0 2px 16px rgba(15,23,42,0.08);
}

/* Body */
[data-theme="light"] body { background: var(--bg-primary); color: var(--text-primary); }

/* Navbar */
[data-theme="light"] .navbar {
  background: rgba(238,242,247,0.92);
  border-bottom: 1px solid rgba(37,99,235,0.12);
}
[data-theme="light"] .navbar.scrolled { background: rgba(248,250,252,0.98); box-shadow: 0 2px 20px rgba(15,23,42,0.08); }
[data-theme="light"] .nav-links a { color: #4b5e7a; }
[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a.active { color: #0f172a; background: rgba(37,99,235,0.06); }
[data-theme="light"] .hamburger { border-color: rgba(37,99,235,0.2); }
[data-theme="light"] .hamburger span { background: #0f172a; }
[data-theme="light"] .nav-links { background: rgba(248,250,252,0.99); }

/* Hero */
[data-theme="light"] .hero { background: linear-gradient(160deg, #dce8fb 0%, #eef2f7 60%, #f0f4f8 100%); }
[data-theme="light"] .hero-grid { background-image: linear-gradient(rgba(37,99,235,0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(37,99,235,0.07) 1px, transparent 1px); }
[data-theme="light"] .hero-aura { opacity: 0.1; background: #3b82f6 !important; }
[data-theme="light"] .hero-badge { background: rgba(37,99,235,0.07); border-color: rgba(37,99,235,0.15); color: #1e40af; }
[data-theme="light"] .hero-badge b { color: #2563eb; }
[data-theme="light"] .hero-headline { color: #0f172a; }
[data-theme="light"] .hero-badge { padding: 6px 10px; font-size: 0.78rem; }
[data-theme="light"] .search-container { background: rgba(255,255,255,0.85); border-color: rgba(37,99,235,0.18); backdrop-filter: blur(12px); }
[data-theme="light"] .search-container input { color: #0f172a; }
[data-theme="light"] .search-container input::placeholder { color: #94a3b8; }
[data-theme="light"] .search-btn { background: #1d4ed8; color: #fff; }
[data-theme="light"] .btn-p-glow { background: #1d4ed8; color: #fff; }
[data-theme="light"] .btn-p-outline { background: rgba(37,99,235,0.06); color: #1d4ed8; border-color: rgba(37,99,235,0.2); }
[data-theme="light"] .tag-pill { background: rgba(37,99,235,0.06); border-color: rgba(37,99,235,0.15); color: #4b5e7a; }
[data-theme="light"] .eco-card { background: rgba(255,255,255,0.92); border-color: rgba(37,99,235,0.15); box-shadow: 0 8px 24px rgba(15,23,42,0.1); }

/* Trust bar */
[data-theme="light"] .trust-bar { background: rgba(37,99,235,0.04); border-color: rgba(37,99,235,0.1); }

/* Section backgrounds — alternating depth */
[data-theme="light"] section[style*="rgba(255,255,255,0.01)"] { background: #f3f7fb !important; }
[data-theme="light"] section[style*="rgba(0,212,255,0.02)"] { background: #edf3fc !important; }
[data-theme="light"] section[style*="linear-gradient(180deg"] { background: #eef2f7 !important; }

/* Cards */
[data-theme="light"] .card,
[data-theme="light"] .tool-card,
[data-theme="light"] .category-card,
[data-theme="light"] .feature-card,
[data-theme="light"] .testimonial-card,
[data-theme="light"] .faq-item,
[data-theme="light"] .blog-card,
[data-theme="light"] .b-card,
[data-theme="light"] .contact-item,
[data-theme="light"] .team-card,
[data-theme="light"] .why-feature,
[data-theme="light"] .widget {
  background: #f8fbff;
  border-color: rgba(37,99,235,0.1);
  box-shadow: 0 1px 8px rgba(15,23,42,0.05);
}
[data-theme="light"] .card:hover,
[data-theme="light"] .tool-card:hover,
[data-theme="light"] .b-card:hover { border-color: rgba(37,99,235,0.3); box-shadow: var(--shadow-glow); }
[data-theme="light"] .category-card:hover { border-color: var(--accent); }

/* Text inside cards */
[data-theme="light"] .feature-title,
[data-theme="light"] .b-title,
[data-theme="light"] .blog-title,
[data-theme="light"] .tool-name,
[data-theme="light"] .w-name,
[data-theme="light"] .section-title { color: #0f172a; }
[data-theme="light"] .feature-desc,
[data-theme="light"] .tool-desc,
[data-theme="light"] .b-desc { color: #4b5e7a; }

/* Testimonials marquee fade */
[data-theme="light"] .testimonials-track-wrap::before { background: linear-gradient(to right, #eef2f7, transparent); }
[data-theme="light"] .testimonials-track-wrap::after { background: linear-gradient(to left, #eef2f7, transparent); }

/* FAQ */
[data-theme="light"] .faq-item { background: #fff; border-color: rgba(37,99,235,0.1); }
[data-theme="light"] .faq-question { color: #0f172a; }

/* Search bars & filters */
[data-theme="light"] .search-bar { background: #fff; border-color: rgba(37,99,235,0.15); }
[data-theme="light"] .search-bar input { color: #0f172a; }
[data-theme="light"] .search-bar input::placeholder { color: #94a3b8; }
[data-theme="light"] .filter-btn { background: #fff; border-color: rgba(37,99,235,0.12); color: #4b5e7a; }
[data-theme="light"] .filter-btn:hover,
[data-theme="light"] .filter-btn.active { background: rgba(37,99,235,0.08); border-color: var(--accent); color: var(--accent); }

/* Forms */
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea,
[data-theme="light"] .form-group select,
[data-theme="light"] .newsletter-form input,
[data-theme="light"] .inline-subscribe input,
[data-theme="light"] .blog-search-inner input {
  background: #f1f6ff;
  border-color: rgba(37,99,235,0.15);
  color: #0f172a;
}
[data-theme="light"] .form-group input::placeholder,
[data-theme="light"] .form-group textarea::placeholder { color: #94a3b8; }

/* Tables */
[data-theme="light"] .compare-table th { background: rgba(37,99,235,0.06); color: #334155; }
[data-theme="light"] .compare-table td { border-bottom-color: rgba(37,99,235,0.06); color: #4b5e7a; }
[data-theme="light"] .compare-table td:first-child { color: #0f172a; }
[data-theme="light"] .compare-table-wrap { border-color: rgba(37,99,235,0.12); }
[data-theme="light"] .compare-table tr:hover td { background: rgba(37,99,235,0.03); }

/* Widgets */
[data-theme="light"] .widget h3 { color: #0f172a; border-bottom-color: rgba(37,99,235,0.1); }
[data-theme="light"] .widget-list li a { color: #4b5e7a; }

/* Newsletter */
[data-theme="light"] .newsletter-section { background: linear-gradient(135deg, rgba(37,99,235,0.06), rgba(59,130,246,0.04)); border-color: rgba(37,99,235,0.14); }

/* Blog hero */
[data-theme="light"] .blog-page-hero { background: linear-gradient(160deg, #dce8fb 0%, #eef2f7 100%); }
[data-theme="light"] .blog-page-hero::before { background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(37,99,235,0.1) 0%, transparent 70%); }
[data-theme="light"] .b-chip { background: rgba(37,99,235,0.06); border-color: rgba(37,99,235,0.14); }
[data-theme="light"] .blog-search-wrap { background: rgba(238,242,247,0.96); border-bottom-color: rgba(37,99,235,0.1); }

/* Featured post */
[data-theme="light"] .featured-post { border-color: rgba(37,99,235,0.12); }
[data-theme="light"] .featured-post:hover { border-color: rgba(37,99,235,0.35); }

/* Page hero (inner pages) */
[data-theme="light"] .page-hero { background: linear-gradient(160deg, #dce8fb 0%, #eef2f7 100%); }
[data-theme="light"] .page-hero::before { background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(37,99,235,0.1) 0%, transparent 60%); }
[data-theme="light"] .single-hero { background: linear-gradient(160deg, #dce8fb 0%, #eef2f7 100%); }
[data-theme="light"] .blog-hero { background: #f3f7fb; border-bottom-color: rgba(37,99,235,0.1); }

/* Footer */
[data-theme="light"] .footer { background: #1e293b; }
[data-theme="light"] .footer .footer-tagline,
[data-theme="light"] .footer .footer-desc,
[data-theme="light"] .footer .footer-col ul li a,
[data-theme="light"] .footer .footer-links a,
[data-theme="light"] .footer .footer-bottom,
[data-theme="light"] .footer .contact-list li { color: rgba(255,255,255,0.6); }
[data-theme="light"] .footer .footer-logo { color: #fff; }
[data-theme="light"] .footer .footer-col h4 { color: rgba(255,255,255,0.9); }
[data-theme="light"] .footer .footer-col ul li a:hover,
[data-theme="light"] .footer .footer-links a:hover { color: #60a5fa; }
[data-theme="light"] .footer .social-link { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12); color: rgba(255,255,255,0.6); }
[data-theme="light"] .footer .social-link:hover { border-color: #60a5fa; color: #60a5fa; }
[data-theme="light"] .footer .inline-subscribe input { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.15); color: #fff; }

/* Breadcrumbs */
[data-theme="light"] .breadcrumb { color: #4b5e7a; }
[data-theme="light"] .breadcrumb a { color: #4b5e7a; }
[data-theme="light"] .breadcrumb a:hover { color: var(--accent); }

/* Post body */
[data-theme="light"] .post-body { color: #334155; }
[data-theme="light"] .post-body h2,
[data-theme="light"] .post-body h3 { color: #0f172a; border-bottom-color: rgba(37,99,235,0.1); }
[data-theme="light"] .post-body blockquote { background: rgba(37,99,235,0.05); border-left-color: #2563eb; }
[data-theme="light"] .post-meta-bar,
[data-theme="light"] .sa-meta { border-color: rgba(37,99,235,0.1); color: #4b5e7a; }
[data-theme="light"] .post-back-bar { border-top-color: rgba(37,99,235,0.1); }
[data-theme="light"] .post-hero-img,
[data-theme="light"] .post-hero-img-standalone { border-color: rgba(37,99,235,0.12); }
[data-theme="light"] .single-hero-inner .section-title { color: #0f172a; }


/* ===========================
   FEATURES GRID (Why Section)
   =========================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s;
}
.feature-card:hover::before { opacity: 1; }
.feature-card:hover {
  border-color: rgba(0,212,255,0.25);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}
.feature-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.feature-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features-grid { grid-template-columns: 1fr; } }

/* ===========================
   TESTIMONIALS — INFINITE SCROLL
   =========================== */
.testimonials-track-wrap {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 10px 0;
}
.testimonials-track-wrap::before,
.testimonials-track-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.testimonials-track-wrap::before { left: 0; background: linear-gradient(to right, var(--bg-primary), transparent); }
.testimonials-track-wrap::after  { right: 0; background: linear-gradient(to left, var(--bg-primary), transparent); }
.testimonials-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: scrollTestimonials 28s linear infinite;
}
.testimonials-track:hover { animation-play-state: paused; }
@keyframes scrollTestimonials {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.testimonial-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  width: 320px;
  flex-shrink: 0;
  transition: var(--transition);
  position: relative;
}
.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 12px; right: 20px;
  font-size: 4rem;
  color: var(--accent);
  opacity: 0.12;
  font-family: Georgia, serif;
  line-height: 1;
}
.testimonial-card:hover {
  border-color: rgba(0,212,255,0.3);
  box-shadow: var(--shadow-glow);
}
.testimonial-quote {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 16px;
  font-style: italic;
}
@media (max-width: 600px) {
  .testimonial-card { width: 280px; }
}

/* ===========================
   SIDEBAR + LAYOUT MOBILE RESPONSIVE
   =========================== */
@media (max-width: 900px) {
  /* tools.php main+sidebar grid */
  [style*="grid-template-columns: 2.5fr 1fr"],
  [style*="grid-template-columns: 2fr 1fr"],
  .compare-layout-grid {
    display: block !important;
  }
  [style*="grid-template-columns: 2.5fr 1fr"] .sidebar,
  [style*="grid-template-columns: 2fr 1fr"] .sidebar,
  .compare-layout-grid .sidebar,
  .compare-layout-grid aside,
  aside.sidebar {
    display: none !important;
  }
}
/* Sidebar itself responsiveness */
.sidebar {
  min-width: 0;
  width: 100%;
}

/* Tool grid on tools.php with sidebar */
@media (max-width: 768px) {
  [style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
}

/* ===========================
   HERO MOBILE FIXES (index.php)
   =========================== */
@media (max-width: 768px) {
  .hero-wrapper {
    grid-template-columns: 1fr !important;
    gap: 24px;
    text-align: center;
  }
  .hero-text-content { width: 100%; }
  .hero-desc { margin-left: auto; margin-right: auto; max-width: 100%; }
  .hero-badge { margin: 0 auto 12px; }
  .hero-actions { justify-content: center; flex-wrap: wrap; }
  .hero-tags { justify-content: center; }
  .hero-visual-scene { display: none; }
  .search-container { flex-direction: column; }
  .search-container input { min-width: 0; width: 100%; }
}
@media (max-width: 480px) {
  .hero { padding: 16px 0 24px; }
  .hero-headline { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .search-container { flex-direction: column; padding: 8px; }
  .search-btn { width: 100%; border-radius: 8px; }
  .hero-actions { flex-wrap: wrap; justify-content: center; }
}

/* Compact desktop hero adjustments */
@media (min-width: 1100px) {
  .hero { min-height: 48vh; padding-top: 24px; padding-bottom: 12px; }
  .hero-wrapper { gap: 18px; grid-template-columns: 1.1fr 0.9fr; }
  .hero-badge { padding: 6px 10px; font-size: 0.78rem; }
  .hero-visual-scene { height: 280px; }
  .hero-aura { opacity: 0.12; filter: blur(84px); }
}

/* ===== EMERGENCY MOBILE OVERRIDES FOR HERO =====
   Ensure hero wrapper and its children never exceed viewport width
   (Overrides inline/author styles that set fixed max-widths) */
@media (max-width: 900px) {
  .hero-wrapper,
  .hero-text-content,
  .hero-search-area,
  .search-container,
  .hero-actions,
  .hero-tags {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .hero-wrapper { display: block !important; grid-template-columns: 1fr !important; gap: 18px !important; overflow: hidden !important; }
  .hero-text-content { max-width: 100% !important; }
  .search-container { flex-direction: column !important; }
}

@media (max-width: 900px) {
  /* Prevent any container from forcing a larger layout */
  .container { width: 100% !important; max-width: 100% !important; overflow-x: hidden !important; }

  /* Constrain hero text and interactive elements */
  .hero-headline,
  .hero-desc,
  .hero-actions,
  .hero-tags,
  .hero-search-area,
  .search-container,
  .search-container input,
  .search-container .search-btn {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .hero-actions a { white-space: normal !important; display: inline-block !important; }
}

/* ===========================
   SIDEBAR LAYOUT RESPONSIVE
   All pages with 2.5fr 1fr grid
   =========================== */
.with-sidebar {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .with-sidebar {
    grid-template-columns: 1fr;
  }
  .with-sidebar aside.sidebar {
    display: none;
  }
  /* Fix tool grid inside sidebar layout */
  .tools-grid[style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
}

/* Single tool view grid */
@media (max-width: 768px) {
  [style*="grid-template-columns: 2.5fr 1fr"] {
    display: block !important;
  }
  [style*="grid-template-columns: 2.5fr 1fr"] aside,
  [style*="grid-template-columns: 2.5fr 1fr"] > div:last-child:has(.sidebar) {
    display: none !important;
  }
}