/* ==========================================================================
   Lilu Baba — All in One Solution | Utility Tools Template
   ========================================================================== */

:root {
  --primary: #c6501f;
  --primary-dark: #9c3e19;
  --accent: #e1a058;
  --accent-2: #198754;
  --warn: #d6964b;
  --bg: #f7f7fb;
  --surface: #ffffff;
  --surface-2: #fbfbfe;
  --text: #1c1b29;
  --text-muted: #6b6a7c;
  --border: #ebe9f5;
  --shadow: 0 8px 24px rgba(28, 27, 41, 0.06);
  --shadow-lg: 0 16px 40px rgba(28, 27, 41, 0.12);
  --radius: 14px;
  --radius-sm: 8px;
  --header-h: 72px;
}

[data-theme="dark"] {
  --bg: #14131f;
  --surface: #1c1b2b;
  --surface-2: #201f30;
  --text: #f2f1f9;
  --text-muted: #a7a5bd;
  --border: #2a2939;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", "Poppins", Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
svg { display: block; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(198, 80, 31, 0.1);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 40px;
}
.section-head.left { text-align: left; margin: 0 0 32px; }

.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 10px; }
.section-head p { color: var(--text-muted); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 10px 24px rgba(198, 80, 31, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(198, 80, 31, 0.45); }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 56px; width: auto; }

.main-nav ul { display: flex; align-items: center; gap: 26px; }
.main-nav a {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.main-nav a:hover, .main-nav a.active { color: var(--primary); }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}
.main-nav .chev { transition: transform 0.2s ease; }
.main-nav .has-dropdown:hover .chev { transform: rotate(180deg); }

.has-dropdown { position: relative; }

/* ---------- Category mega-menu ---------- */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px) scale(0.97);
  width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(.2,.8,.2,1), visibility 0.22s;
  z-index: 60;
}
.has-dropdown:hover .mega-menu,
.has-dropdown.open .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(4px) scale(1);
}

.mega-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  margin-bottom: 14px;
}
.mega-search svg { color: var(--text-muted); flex-shrink: 0; }
.mega-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.85rem;
  color: var(--text);
  min-width: 0;
}

.mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.mega-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  opacity: 0;
  transform: translateY(6px);
  animation: megaCardIn 0.35s ease forwards;
  animation-play-state: paused;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.has-dropdown:hover .mega-card,
.has-dropdown.open .mega-card,
.mega-static .mega-card { animation-play-state: running; }
.mega-card:nth-child(1) { animation-delay: 0.03s; }
.mega-card:nth-child(2) { animation-delay: 0.07s; }
.mega-card:nth-child(3) { animation-delay: 0.11s; }
.mega-card:nth-child(4) { animation-delay: 0.15s; }
.mega-card:nth-child(5) { animation-delay: 0.19s; }
.mega-card:nth-child(6) { animation-delay: 0.23s; }
.mega-card:hover {
  background: var(--bg);
  border-color: var(--border);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.mega-card.filtered-out { display: none; }

.mega-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}
.mega-card:hover .mega-icon { transform: scale(1.1) rotate(-6deg); }
.mega-icon.fin { background: linear-gradient(135deg, #6c5ce7, #a29bfe); }
.mega-icon.txt { background: linear-gradient(135deg, #00c2a8, #00a8ff); }
.mega-icon.img { background: linear-gradient(135deg, #ff7a45, #ffb88c); }
.mega-icon.wea { background: linear-gradient(135deg, #0984e3, #74b9ff); }
.mega-icon.pin { background: linear-gradient(135deg, #e17055, #fab1a0); }
.mega-icon.voi { background: linear-gradient(135deg, #d63031, #ff7675); }
.mega-icon.utl { background: linear-gradient(135deg, #2d3436, #636e72); }
.mega-icon.mat { background: linear-gradient(135deg, #6a1b9a, #ab47bc); }
.mega-icon.sci { background: linear-gradient(135deg, #00838f, #4dd0e1); }
.mega-icon.hea { background: linear-gradient(135deg, #c62828, #ef5350); }
.mega-icon.con { background: linear-gradient(135deg, #ef6c00, #ffa726); }

.mega-info { display: flex; flex-direction: column; line-height: 1.3; }
.mega-info strong { font-size: 0.88rem; }
.mega-info span { font-size: 0.72rem; color: var(--text-muted); }

.mega-empty { display: none; text-align: center; color: var(--text-muted); font-size: 0.85rem; padding: 20px 0; }
.mega-empty.show { display: block; }

.mega-viewall {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary);
}
.mega-viewall:hover svg { transform: translateX(3px); }
.mega-viewall svg { transition: transform 0.2s ease; }

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

.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-1px); }
.icon-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  align-items: center;
  justify-content: center;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: "";
  display: block;
  width: 20px; height: 2px;
  background: var(--text);
  position: relative;
  transition: 0.25s ease;
}
.nav-toggle::before { transform: translateY(-6px); }
.nav-toggle::after { transform: translateY(4px); }

/* ---------- Header search panel + suggestions ---------- */
.header-search-panel {
  max-height: 0;
  overflow: hidden;
  border-bottom: 1px solid transparent;
  transition: max-height 0.25s ease, border-color 0.25s ease;
  background: var(--surface);
}
.header-search-panel.open { max-height: 140px; border-color: var(--border); }
.header-search-panel .container { padding-top: 14px; padding-bottom: 16px; position: relative; }

.header-search-box { max-width: 100%; }
.close-search { margin-left: 4px; }

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 8px 8px 20px;
  box-shadow: var(--shadow);
}
.search-box svg { color: var(--text-muted); flex-shrink: 0; }
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.95rem;
  color: var(--text);
  padding: 10px 0;
  min-width: 0;
}
.search-box button {
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.search-suggest {
  position: absolute;
  left: 20px; right: 20px;
  top: 100%;
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  max-height: 340px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}
.search-suggest.open { display: block; }
.suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover, .suggest-item.active { background: var(--bg); }
.suggest-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: rgba(198, 80, 31, 0.1);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.suggest-body { flex: 1; min-width: 0; }
.suggest-body strong { display: block; font-size: 0.9rem; }
.suggest-body span { font-size: 0.76rem; color: var(--text-muted); text-transform: capitalize; }
.suggest-empty { padding: 18px 16px; color: var(--text-muted); font-size: 0.88rem; text-align: center; }
.suggest-status { font-size: 0.68rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; flex-shrink: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 64px 0 50px;
  overflow: hidden;
  background:
    radial-gradient(60% 60% at 85% 10%, rgba(225, 160, 88, 0.2), transparent 60%),
    radial-gradient(50% 50% at 10% 20%, rgba(198, 80, 31, 0.16), transparent 60%);
}
.hero-container { text-align: center; max-width: 780px; }

.hero h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 800; line-height: 1.15; margin-bottom: 14px; }
.hero h1 span { color: var(--primary); }
.hero p.lead { color: var(--text-muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto 28px; }

.hero-search-wrap { position: relative; max-width: 640px; margin: 0 auto; }
.hero-search-box { padding: 10px 10px 10px 22px; }
.hero-search-box svg { width: 22px; height: 22px; }
.hero-search-box input { font-size: 1rem; padding: 12px 0; }

.hero-quick-cats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0 0;
  font-size: 0.85rem;
}
.hero-quick-cats > span { color: var(--text-muted); font-weight: 600; }
.quick-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s ease;
}
.quick-cat:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }

.trust-row {
  display: flex;
  justify-content: center;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 30px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row svg { color: var(--accent-2); }

/* ---------- Search results view ---------- */
.search-results-section { padding: 40px 0 70px; }
.search-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.search-results-head h2 { font-size: 1.3rem; }
.search-results-head span { color: var(--primary); }

.no-results { text-align: center; padding: 60px 20px; color: var(--text-muted); display: none; }
.no-results.show { display: block; }
.no-results svg { margin: 0 auto 14px; opacity: 0.6; color: var(--text-muted); }

/* ---------- Trending strip ---------- */
.trending-section { padding: 34px 0; background: var(--surface); border-bottom: 1px solid var(--border); }
.trending-head { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.trending-head svg { color: var(--warn); }
.trending-head h2 { font-size: 1.05rem; font-weight: 800; }

.trending-scroller { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.trending-pill {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.trending-pill:hover { border-color: var(--warn); color: var(--warn); transform: translateY(-2px); }
.trending-pill .rank {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.7rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.trending-pill em { font-style: normal; color: var(--text-muted); font-size: 0.76rem; }

/* ---------- Tools grid (search results + featured) ---------- */
.tools-section { padding: 70px 0; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.featured-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }

.tool-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  scroll-margin-top: 100px;
}
.tool-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.tool-card.highlight { border-color: var(--warn); box-shadow: 0 0 0 4px rgba(214, 150, 75, 0.22); }
.anchor-offset { display: block; scroll-margin-top: 90px; }

.tool-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(198, 80, 31, 0.1);
  color: var(--primary);
  margin-bottom: 16px;
}
.tool-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.tool-card p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 18px; min-height: 42px; }

.tool-link { font-weight: 700; font-size: 0.85rem; color: var(--primary); display: inline-flex; align-items: center; gap: 6px; }
.tool-link svg { transition: transform 0.2s ease; }
.tool-card:hover .tool-link svg { transform: translateX(4px); }

.badge {
  position: absolute;
  top: 16px; right: 16px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
}
.badge-new { background: rgba(25, 135, 84, 0.15); color: var(--accent-2); }
.badge-soon { background: rgba(214, 150, 75, 0.18); color: var(--warn); }
.badge-hot { background: rgba(198, 80, 31, 0.15); color: var(--primary); }
.badge.small { position: static; padding: 3px 9px; flex-shrink: 0; }

.tool-card.disabled { opacity: 0.7; }
.tool-card.disabled .tool-link { color: var(--text-muted); }

/* ---------- Category-wise sections ---------- */
.category-block { padding: 56px 0; scroll-margin-top: 90px; }
.category-block.alt { background: var(--surface); }

.cat-block-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.cat-block-icon {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.cat-block-icon.fin { background: linear-gradient(135deg, #6c5ce7, #a29bfe); }
.cat-block-icon.txt { background: linear-gradient(135deg, #00c2a8, #00a8ff); }
.cat-block-icon.img { background: linear-gradient(135deg, #ff7a45, #ffb88c); }
.cat-block-icon.wea { background: linear-gradient(135deg, #0984e3, #74b9ff); }
.cat-block-icon.pin { background: linear-gradient(135deg, #e17055, #fab1a0); }
.cat-block-icon.voi { background: linear-gradient(135deg, #d63031, #ff7675); }
.cat-block-icon.utl { background: linear-gradient(135deg, #2d3436, #636e72); }
.cat-block-icon.mat { background: linear-gradient(135deg, #6a1b9a, #ab47bc); }
.cat-block-icon.sci { background: linear-gradient(135deg, #00838f, #4dd0e1); }
.cat-block-icon.hea { background: linear-gradient(135deg, #c62828, #ef5350); }
.cat-block-icon.con { background: linear-gradient(135deg, #ef6c00, #ffa726); }

.cat-block-head h2 { font-size: 1.3rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cat-block-head p { color: var(--text-muted); font-size: 0.9rem; margin-top: 2px; }
.count-tag { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); background: var(--bg); padding: 3px 10px; border-radius: 999px; }
.view-all { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.88rem; color: var(--primary); flex-shrink: 0; }
.view-all:hover { text-decoration: underline; }

.tool-rows { display: flex; flex-direction: column; gap: 10px; }
.tool-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  scroll-margin-top: 100px;
}
.category-block.alt .tool-row { background: var(--bg); }
.tool-row:hover { border-color: var(--primary); transform: translateX(4px); box-shadow: var(--shadow); }
.tool-row.highlight { border-color: var(--warn); box-shadow: 0 0 0 4px rgba(214, 150, 75, 0.22); }
.tool-row.disabled { opacity: 0.65; cursor: default; }
.tool-row.disabled:hover { transform: none; border-color: var(--border); box-shadow: none; }

.tr-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: rgba(198, 80, 31, 0.1);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tr-body { flex: 1; min-width: 0; }
.tr-body h4 { font-size: 0.95rem; margin-bottom: 2px; }
.tr-body p { font-size: 0.82rem; color: var(--text-muted); }
.tr-arrow { color: var(--text-muted); flex-shrink: 0; transition: transform 0.2s ease; }
.tool-row:hover .tr-arrow { transform: translateX(4px); color: var(--primary); }

/* ---------- Recently added ---------- */
.recent-section { padding: 56px 0; }
.recent-scroller { display: flex; gap: 12px; flex-wrap: wrap; }
.recent-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px dashed var(--border);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  transition: all 0.2s ease;
}
.recent-pill svg { color: var(--primary); }
.recent-pill em { font-style: normal; color: var(--text-muted); font-size: 0.76rem; }
.recent-pill:hover { border-color: var(--accent-2); border-style: solid; color: var(--accent-2); }

/* ---------- How it works ---------- */
.how-section { padding: 70px 0; background: var(--surface); }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 26px; }
.how-step { position: relative; text-align: center; padding: 30px 20px; background: var(--bg); border-radius: var(--radius); border: 1px solid var(--border); }
.how-step .tool-icon { margin: 0 auto 16px; }
.how-num {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.how-step h3 { font-size: 1.02rem; margin-bottom: 8px; }
.how-step p { color: var(--text-muted); font-size: 0.88rem; }

/* ---------- Why choose us ---------- */
.features-section { padding: 70px 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.feature-item { text-align: center; padding: 30px 20px; }
.feature-item .tool-icon { margin: 0 auto 18px; background: linear-gradient(135deg, rgba(198,80,31,0.12), rgba(225,160,88,0.18)); }
.feature-item h3 { margin-bottom: 8px; font-size: 1.05rem; }
.feature-item p { color: var(--text-muted); font-size: 0.88rem; }

/* ---------- Stats strip ---------- */
.stats-strip { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; padding: 44px 0; }
.stats-strip .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stats-strip strong { display: block; font-size: 2rem; font-weight: 800; }
.stats-strip span { font-size: 0.85rem; opacity: 0.9; }

/* ---------- FAQ ---------- */
.faq-section { padding: 70px 0; background: var(--surface); }
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); overflow: hidden; }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  padding: 16px 18px;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}
.faq-q svg { flex-shrink: 0; transition: transform 0.25s ease; color: var(--primary); }
.faq-item.open .faq-q svg { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-item.open .faq-a { max-height: 200px; }
.faq-a p { padding: 0 18px 18px; color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Newsletter / CTA ---------- */
.cta-section { padding: 70px 0; }
.cta-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 50px 40px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.cta-box h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 10px; }
.cta-box p { color: var(--text-muted); max-width: 480px; margin: 0 auto 26px; }
.cta-form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.cta-form input {
  flex: 1;
  min-width: 220px;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  outline: none;
  font-size: 0.9rem;
}
.cta-form input:focus { border-color: var(--primary); }

/* ---------- Footer ---------- */
.site-footer { background: #14131f; color: #cfcde0; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-logo { height: 62px; width: auto; max-width: 100%; }
.footer-brand p { color: #9c9ab3; font-size: 0.88rem; margin: 14px 0 18px; max-width: 280px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  color: #cfcde0;
  transition: 0.2s ease;
}
.footer-social a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 18px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: #9c9ab3; font-size: 0.88rem; transition: color 0.2s ease; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: #8b899f;
}
.footer-bottom a { color: #8b899f; }
.footer-bottom a:hover { color: #fff; }
.footer-legal { display: flex; gap: 18px; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  border: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 90;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 10px 20px 20px;
    transform: translateY(-120%);
    opacity: 0;
    transition: all 0.25s ease;
    z-index: 199;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .main-nav.open { transform: translateY(0); opacity: 1; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; }
  .main-nav a { display: flex; padding: 12px 4px; width: 100%; border-bottom: 1px solid var(--border); }
  .has-dropdown { width: 100%; }
  .mega-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    width: 100%;
    max-width: 100%;
    padding: 10px 0 14px;
    display: none;
  }
  .has-dropdown.open .mega-menu { display: block; }
  .mega-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .mega-card { animation: none; opacity: 1; transform: none; }
  .nav-toggle { display: flex; }
  .header-search-btn { display: none; }
  .header-search-panel { max-height: none !important; overflow: visible; border: none; }
  .header-search-panel .container { display: none; }
  .stats-strip .container { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .cat-block-head { position: relative; }
  .view-all { margin-left: 0; }
}

@media (max-width: 480px) {
  .search-box { flex-wrap: wrap; border-radius: 20px; padding: 14px; }
  .search-box button { width: 100%; }
  .trust-row { gap: 16px; }
  .tool-row { flex-wrap: wrap; }
  .tr-arrow { display: none; }
}

/* ==========================================================================
   Shared interior-page components (about / contact / all-tools / category /
   tool detail / 404 / legal pages)
   ========================================================================== */

/* ---------- Scroll-reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.8,.2,1); }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-1.in-view { transition-delay: 0.05s; }
.reveal-2.in-view { transition-delay: 0.12s; }
.reveal-3.in-view { transition-delay: 0.19s; }
.reveal-4.in-view { transition-delay: 0.26s; }
.reveal-5.in-view { transition-delay: 0.33s; }
.reveal-6.in-view { transition-delay: 0.4s; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--text-muted); font-weight: 600; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb svg { width: 12px; height: 12px; flex-shrink: 0; opacity: 0.6; }
.breadcrumb .current { color: var(--primary); font-weight: 700; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 44px 0 54px;
  background:
    radial-gradient(55% 65% at 88% 0%, rgba(225, 160, 88, 0.2), transparent 60%),
    radial-gradient(45% 55% at 8% 10%, rgba(198, 80, 31, 0.14), transparent 60%);
  border-bottom: 1px solid var(--border);
}
.page-hero-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; margin-bottom: 10px; }
.page-hero p { color: var(--text-muted); max-width: 620px; font-size: 1.02rem; }

/* ---------- Compact hero for tool pages (calculator visible without scrolling) ---------- */
.page-hero.tool-hero { padding: 18px 0 22px; }
.page-hero.tool-hero .page-hero-icon { width: 42px; height: 42px; border-radius: 12px; margin-bottom: 8px; }
.page-hero.tool-hero h1 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin-bottom: 4px; }
.page-hero.tool-hero p { font-size: 0.88rem; max-width: 560px; }
.page-hero.tool-hero .breadcrumb { margin-bottom: 10px; }

/* ---------- Generic content section spacing ---------- */
.content-section { padding: 64px 0; }
.content-section.alt { background: var(--surface); }
.content-section.tool-section { padding: 24px 0 56px; }

/* ---------- Tool hero sidebar (category tools list) ---------- */
.tool-hero .hero-flex { display: flex; gap: 32px; align-items: flex-start; flex-wrap: wrap; }
.tool-hero .hero-main { flex: 1; min-width: 260px; }
.tool-hero .hero-sidebar { width: 280px; flex-shrink: 0; }
.hero-sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.hero-sidebar-card h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.hero-sidebar-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; max-height: 360px; overflow-y: auto; }
.hero-sidebar-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 8px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.hero-sidebar-list a:hover { background: var(--bg); color: var(--primary); }
.hero-sidebar-list a.active { color: var(--primary); background: var(--bg); }
.hero-sidebar-viewall {
  display: block;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}
@media (max-width: 860px) {
  .tool-hero .hero-sidebar { width: 100%; }
}

/* ---------- About page ---------- */
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.value-card {
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.value-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.value-card .tool-icon { margin-bottom: 16px; }
.value-card h3 { margin-bottom: 8px; font-size: 1.05rem; }
.value-card p { color: var(--text-muted); font-size: 0.9rem; }

.about-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-split-visual {
  aspect-ratio: 4/3;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.about-split-visual svg { width: 40%; height: 40%; color: #fff; opacity: 0.9; }
.about-split-visual::before, .about-split-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}
.about-split-visual::before { width: 140px; height: 140px; top: -40px; right: -40px; }
.about-split-visual::after { width: 90px; height: 90px; bottom: -20px; left: -20px; }
.about-split h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 14px; }
.about-split p { color: var(--text-muted); margin-bottom: 12px; }

.milestone-row { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 28px; }
.milestone { min-width: 100px; }
.milestone strong { display: block; font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.milestone span { font-size: 0.82rem; color: var(--text-muted); }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: start; }
.contact-info-list { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.info-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.info-card:hover { border-color: var(--primary); transform: translateX(4px); }
.info-card .tool-icon { width: 42px; height: 42px; margin-bottom: 0; flex-shrink: 0; }
.info-card h4 { font-size: 0.92rem; margin-bottom: 3px; }
.info-card p { font-size: 0.85rem; color: var(--text-muted); }

.contact-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: 0.85rem; font-weight: 700; }
.form-group input, .form-group textarea, .form-group select {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease;
  resize: vertical;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--primary); }

.contact-success {
  text-align: center;
  padding: 40px 20px;
}
.contact-success .tool-icon {
  margin: 0 auto 16px;
  width: 64px; height: 64px;
  background: rgba(25, 135, 84, 0.12);
  color: var(--accent-2);
}
.contact-success h3 { margin-bottom: 8px; }
.contact-success p { color: var(--text-muted); }

/* ---------- Calculator (tool detail page) ---------- */
.tool-detail-grid { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 32px; align-items: start; }

.calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}
.calc-field { margin-bottom: 22px; }
.calc-field-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.calc-field-head label { font-weight: 700; font-size: 0.92rem; }
.calc-field-head .calc-value { font-weight: 800; color: var(--primary); font-size: 0.95rem; }
.calc-field input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  appearance: none;
  outline: none;
}
.calc-field input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px var(--primary);
  cursor: pointer;
}
.calc-field input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px var(--primary);
  cursor: pointer;
}
.calc-field input[type="number"],
.calc-field input[type="text"],
.calc-field input[type="email"],
.calc-field input[type="url"],
.calc-field input[type="date"],
.calc-field input[type="datetime-local"],
.calc-field select,
.calc-field textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 8px;
  outline: none;
  font-family: inherit;
}
.calc-field input[type="number"]:focus,
.calc-field input[type="text"]:focus,
.calc-field input[type="email"]:focus,
.calc-field input[type="url"]:focus,
.calc-field input[type="date"]:focus,
.calc-field input[type="datetime-local"]:focus,
.calc-field select:focus,
.calc-field textarea:focus { border-color: var(--primary); }
.calc-field input[readonly] { background: var(--surface); cursor: text; }

.calc-result-card {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius);
  padding: 28px;
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-lg);
  margin-bottom: 20px;
}
.calc-result-card span { font-size: 0.8rem; opacity: 0.9; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.calc-result-card strong { display: block; font-size: 2.2rem; font-weight: 800; margin-top: 6px; transition: opacity 0.15s ease; }

.calc-breakdown { display: flex; flex-direction: column; gap: 10px; }
.calc-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}
.calc-breakdown-row .dot-fill { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.calc-breakdown-row strong { font-weight: 800; }

.calc-bar {
  height: 12px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  display: flex;
  margin: 16px 0 20px;
}
.calc-bar-principal, .calc-bar-interest {
  height: 100%;
  transition: width 0.6s cubic-bezier(.2,.8,.2,1);
}
.calc-bar-principal { background: var(--accent-2); }
.calc-bar-interest { background: var(--warn); }

.related-tools-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.related-tools-card h4 { font-size: 0.95rem; margin-bottom: 14px; }

.how-to-list { counter-reset: how-to; display: flex; flex-direction: column; gap: 14px; }
.how-to-list li {
  counter-increment: how-to;
  display: flex;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.how-to-list li::before {
  content: counter(how-to);
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(198, 80, 31, 0.12);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- 404 / error page ---------- */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
}
.error-code {
  font-size: clamp(5rem, 16vw, 9rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: errorFloat 3s ease-in-out infinite;
}
@keyframes errorFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.error-page h2 { font-size: 1.4rem; margin: 10px 0 10px; }
.error-page p { color: var(--text-muted); max-width: 420px; margin-bottom: 28px; }
.error-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- Legal / prose pages ---------- */
.prose { max-width: 780px; margin: 0 auto; }
.prose h2 { font-size: 1.3rem; margin: 32px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--text-muted); margin-bottom: 14px; line-height: 1.75; }
.prose ul { margin: 0 0 14px 0; padding-left: 20px; list-style: disc; color: var(--text-muted); }
.prose ul li { margin-bottom: 8px; line-height: 1.6; }
.prose .updated-tag { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 30px; display: block; }

/* ---------- Category / all-tools page filter bar ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.filter-chip {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; border-color: transparent; }

/* ---------- Responsive: interior pages ---------- */
@media (max-width: 900px) {
  .about-split { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .tool-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .milestone-row { gap: 22px; }
}
