/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --accent: #00C896;
  --accent-dark: #00a87d;
  --accent-glow: rgba(0, 200, 150, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

/* ===== DARK THEME (DEFAULT) ===== */
[data-theme="dark"] {
  --bg: #0D0F14;
  --bg2: #13161E;
  --bg3: #1A1E28;
  --border: rgba(255,255,255,0.07);
  --text: #F0F2F8;
  --text2: #8B90A0;
  --text3: #5A5F70;
  --card-bg: #161A24;
  --card-border: rgba(255,255,255,0.06);
  --shadow: 0 4px 40px rgba(0,0,0,0.5);
  --nav-bg: rgba(13,15,20,0.95);
  --dropdown-bg: #1A1E28;
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
  --bg: #F4F6FB;
  --bg2: #FFFFFF;
  --bg3: #EEF1F8;
  --border: rgba(0,0,0,0.07);
  --text: #0D0F14;
  --text2: #52566A;
  --text3: #9EA4B8;
  --card-bg: #FFFFFF;
  --card-border: rgba(0,0,0,0.06);
  --shadow: 0 4px 40px rgba(0,0,0,0.08);
  --nav-bg: rgba(244,246,251,0.95);
  --dropdown-bg: #FFFFFF;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

/* ===== NAVBAR — HIGH Z-INDEX, NEVER BROKEN BY ADS ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 99999; /* very high so ads never cover it */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 5%;
  justify-content: space-between;
  transition: background var(--transition);
  pointer-events: all !important; /* ads can never block clicks */
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 100000;
  pointer-events: all !important;
}

.nav-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-logo span { color: var(--accent); }

/* ===== NAV LINKS WITH DROPDOWNS ===== */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 100000;
  pointer-events: all !important;
}

.nav-links > li {
  position: relative;
  pointer-events: all !important;
}

.nav-links > li > a,
.nav-links > li > .nav-dropdown-toggle {
  text-decoration: none;
  color: var(--text2);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color var(--transition);
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  white-space: nowrap;
  pointer-events: all !important;
}

.nav-links > li > a:hover,
.nav-links > li > .nav-dropdown-toggle:hover,
.nav-links > li.active > a,
.nav-links > li.active > .nav-dropdown-toggle {
  color: var(--accent);
  background: var(--accent-glow);
}

.nav-dropdown-arrow {
  font-size: 0.6rem;
  transition: transform var(--transition);
  display: inline-block;
}

.nav-links > li.open .nav-dropdown-arrow {
  transform: rotate(180deg);
}

/* ===== DROPDOWN MENU ===== */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--dropdown-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
  min-width: 200px;
  max-width: 280px;
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 100001;
  pointer-events: all !important;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--dropdown-bg);
}

.nav-dropdown::-webkit-scrollbar {
  width: 6px;
}

.nav-dropdown::-webkit-scrollbar-track {
  background: var(--dropdown-bg);
}

.nav-dropdown::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

.nav-dropdown.wide {
  min-width: 240px;
  max-width: 320px;
}

.nav-links > li.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text2);
  font-size: 0.82rem;
  transition: all var(--transition);
  white-space: nowrap;
  pointer-events: all !important;
}

.nav-dropdown a:hover {
  background: var(--accent-glow);
  color: var(--accent);
}

.nav-dropdown a .dd-icon {
  font-size: 16px;
  width: 24px;
  text-align: center;
}

.nav-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 8px;
}

/* Wide dropdown — 2 columns */
.nav-dropdown.wide {
  min-width: 460px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 8px;
}

.nav-dropdown.wide .dd-col-header {
  grid-column: span 1;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text3);
  padding: 8px 12px 4px;
}

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  position: relative;
  z-index: 100000;
  pointer-events: all !important;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 100000;
  pointer-events: all !important;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition);
  pointer-events: all !important;
  position: relative;
  z-index: 100000;
}

.theme-toggle .icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all var(--transition);
}

.theme-toggle .icon.active { background: var(--accent); }

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 5% 60px;
  position: relative;
  overflow: hidden;
}

.hero-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.hero-bg-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,200,150,0.12), transparent 70%);
  top: -100px; left: 50%;
  transform: translateX(-50%);
}

.hero-bg-orb-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0,150,255,0.08), transparent 70%);
  bottom: 0; right: 5%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-glow);
  border: 1px solid rgba(0,200,150,0.25);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 28px;
  animation: fadeInDown 0.6s ease both;
}

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

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 22px;
  animation: fadeInUp 0.7s ease 0.1s both;
}

.hero h1 .highlight {
  color: var(--accent);
  position: relative;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text2);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
  animation: fadeInUp 0.7s ease 0.2s both;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s ease 0.3s both;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,200,150,0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  animation: fadeInUp 0.7s ease 0.4s both;
}

.hero-stat-value {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text2);
  margin-top: 2px;
}

/* ===== ADSENSE AD BLOCKS — SAFE PLACEMENT RULES ===== */

/*
  RULE: Ads are ONLY allowed:
  1. Full-width banner between sections (above tools, below tools)
  2. Never inside .tool-card
  3. Never overlapping .navbar
  4. Anchor ads allowed at bottom
*/

/* Top banner ad — between hero and tools */
.ad-banner-top {
  width: 100%;
  max-width: 970px;
  margin: 0 auto;
  padding: 20px 5%;
  text-align: center;
  position: relative;
  z-index: 1; /* below navbar always */
  clear: both;
}

.ad-banner-top ins { display: block; }

/* Mid-page ad between sections */
.ad-banner-mid {
  width: 100%;
  max-width: 970px;
  margin: 0 auto;
  padding: 20px 5%;
  text-align: center;
  position: relative;
  z-index: 1;
  clear: both;
}

.ad-banner-mid ins { display: block; }

/* Prevent ANY ad iframe/ins from appearing inside tool cards */
.tool-card ins.adsbygoogle,
.tool-card iframe,
.tools-grid ins.adsbygoogle,
.tools-grid > ins,
.tools-grid > iframe {
  display: none !important;
  pointer-events: none !important;
}

/* Prevent anchor/overlay ads from covering navbar */
ins.adsbygoogle[data-ad-format="autorelaxed"],
ins.adsbygoogle[style*="position:fixed"],
ins.adsbygoogle[style*="position: fixed"] {
  z-index: 1000 !important; /* always below navbar z-index of 99999 */
}

/* Google auto ads — ensure they never overlap navbar */
#google_ads_iframe_wrapper,
.google-auto-placed,
.adsbygoogle-noablate {
  z-index: 1000 !important;
  max-width: 100vw !important;
  overflow: hidden !important;
}

/* Anchor ad at bottom — push it below navbar */
ins[data-ad-format="anchor"],
div[id^="google_ads_iframe"]:has(+ ins[data-ad-format="anchor"]) {
  bottom: 0 !important;
  top: auto !important;
  z-index: 9000 !important; /* below navbar 99999 */
}

/* ===== SECTIONS ===== */
section {
  padding: 80px 5%;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
}

.section-sub {
  color: var(--text2);
  font-size: 1rem;
  max-width: 520px;
  line-height: 1.7;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header .section-sub { margin: 0 auto; }

/* ===== CATEGORY TABS ===== */
.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}

.cat-tab {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: all !important;
  position: relative;
  z-index: 2;
}

.cat-tab:hover,
.cat-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ===== TOOLS GRID ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: block;
  /* Ensure nothing inside can be an ad */
  isolation: isolate;
}

.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
  z-index: 0;
}

.tool-card:hover {
  border-color: rgba(0,200,150,0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

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

.tool-icon {
  width: 50px; height: 50px;
  background: var(--accent-glow);
  border: 1px solid rgba(0,200,150,0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.tool-card-cat {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.tool-card h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.tool-card p {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.tool-card-arrow {
  position: absolute;
  top: 26px;
  right: 26px;
  width: 30px; height: 30px;
  background: var(--bg3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all var(--transition);
  z-index: 1;
}

.tool-card:hover .tool-card-arrow {
  background: var(--accent);
  color: #fff;
  transform: rotate(45deg);
}

/* ===== REVIEWS ===== */
.reviews-section { background: var(--bg2); }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.review-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
}

.review-stars {
  color: #FFB800;
  font-size: 0.85rem;
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.review-text {
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 18px;
  font-style: italic;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-head);
  flex-shrink: 0;
}

.review-name {
  font-size: 0.875rem;
  font-weight: 500;
}

.review-role {
  font-size: 0.75rem;
  color: var(--text3);
}

/* ===== FOOTER ===== */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 60px 5% 30px;
  position: relative;
  z-index: 2;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 40px;
}

.footer-brand p {
  color: var(--text3);
  font-size: 0.85rem;
  line-height: 1.7;
  margin-top: 12px;
  max-width: 240px;
}

.footer-logo {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-logo span { color: var(--accent); }

.footer-logo img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.footer-col h4 {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  color: var(--text2);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: all !important;
}

.footer-col ul li a:hover { color: var(--accent); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  color: var(--text3);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color var(--transition);
  pointer-events: all !important;
}

.footer-bottom-links a:hover { color: var(--accent); }

.footer-copy {
  color: var(--text3);
  font-size: 0.8rem;
}

.footer-copy a {
  color: var(--accent);
  text-decoration: none;
}

.footer-theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text3);
}

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

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

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

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== MOBILE NAV DRAWER ===== */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 99998; /* just below navbar */
  overflow-y: auto;
  padding: 20px 5%;
  flex-direction: column;
  gap: 8px;
}

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

.mobile-nav-section h5 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  padding: 12px 0 6px;
}

.mobile-nav-section a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text2);
  font-size: 0.9rem;
  transition: all var(--transition);
  pointer-events: all !important;
}

.mobile-nav-section a:hover {
  background: var(--accent-glow);
  color: var(--accent);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .footer-brand {
    grid-column: span 3;
  }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .hero { padding-top: 80px; }
  section { padding: 60px 5%; }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .footer-brand {
    grid-column: span 2;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .footer-bottom-links { justify-content: center; }
  .nav-dropdown.wide {
    min-width: 280px;
    grid-template-columns: 1fr;
  }
  /* Mobile ad banners — full width, reasonable height */
  .ad-banner-top,
  .ad-banner-mid {
    padding: 12px 3%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
  .footer-brand {
    grid-column: span 1;
  }
  .category-tabs { gap: 6px; }
  .cat-tab { padding: 7px 14px; font-size: 0.8rem; }
}