/* ============================================================
   style.css — BabyNameHub Design System
   Modern, minimal, soft, mobile-first.
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

/* ---------- CSS Custom Properties (Design Tokens) ---------- */
:root {
  /* Colors */
  --color-primary:        #7c5cbf;
  --color-primary-light:  #a07ed6;
  --color-primary-dark:   #5a3f9a;
  --color-accent:         #f4a4c0;
  --color-accent-light:   #fce4f0;
  --color-success:        #4caf88;
  --color-warning:        #f4a535;

  /* Background */
  --bg-base:              #ffffff;
  --bg-soft:              #faf9ff;
  --bg-card:              #ffffff;
  --bg-muted:             #f3f0fa;
  --bg-hero:              linear-gradient(135deg, #f9f0ff 0%, #fce4f0 50%, #e8f4ff 100%);

  /* Text */
  --text-primary:         #1a1a2e;
  --text-secondary:       #5a5a7a;
  --text-muted:           #9090b0;
  --text-on-primary:      #ffffff;

  /* Border */
  --border-color:         #e8e4f5;
  --border-radius-sm:     8px;
  --border-radius-md:     14px;
  --border-radius-lg:     20px;
  --border-radius-xl:     28px;
  --border-radius-pill:   999px;

  /* Shadows */
  --shadow-sm:   0 1px 4px rgba(124,92,191,0.07);
  --shadow-md:   0 4px 20px rgba(124,92,191,0.10);
  --shadow-lg:   0 8px 40px rgba(124,92,191,0.15);
  --shadow-card: 0 2px 16px rgba(124,92,191,0.08);

  /* Typography */
  --font-sans:   'Inter', system-ui, -apple-system, sans-serif;
  --font-serif:  'Playfair Display', Georgia, serif;

  /* Spacing */
  --container-max: 1200px;
  --gap-sm:  0.5rem;
  --gap-md:  1rem;
  --gap-lg:  2rem;
  --gap-xl:  3rem;

  /* Transitions */
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Header height */
  --header-height: 70px;
}

/* ---------- Dark Mode ---------- */
[data-theme="dark"] {
  --color-primary:        #a07ed6;
  --color-primary-light:  #c4a8f0;
  --color-primary-dark:   #7c5cbf;
  --color-accent:         #f4a4c0;
  --color-accent-light:   #3a2040;

  --bg-base:              #0f0e17;
  --bg-soft:              #161424;
  --bg-card:              #1e1c2e;
  --bg-muted:             #252340;
  --bg-hero:              linear-gradient(135deg, #1a1030 0%, #2a1040 50%, #0f1a30 100%);

  --text-primary:         #e8e6f8;
  --text-secondary:       #b0aed0;
  --text-muted:           #7070a0;

  --border-color:         #2e2a4a;

  --shadow-sm:   0 1px 4px rgba(0,0,0,0.4);
  --shadow-md:   0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.6);
  --shadow-card: 0 2px 16px rgba(0,0,0,0.4);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background-color var(--transition-slow), color var(--transition-slow);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); }
ul, ol { list-style: none; }

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--border-radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--text-on-primary);
  box-shadow: 0 4px 15px rgba(124,92,191,0.35);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
  box-shadow: 0 6px 22px rgba(124,92,191,0.45);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: var(--text-on-primary);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--bg-muted);
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn-sm { padding: 0.4rem 1rem; font-size: 0.82rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 0.2em 0.7em;
  border-radius: var(--border-radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-boy    { background: #ddeeff; color: #2266bb; }
.badge-girl   { background: #ffe0f0; color: #cc3377; }
.badge-unisex { background: #e8f5e9; color: #2e7d32; }
.badge-religion { background: var(--bg-muted); color: var(--text-secondary); }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-slow), border-color var(--transition-slow);
}
[data-theme="dark"] .site-header {
  background: rgba(15,14,23,0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}
.logo-icon { font-size: 1.5rem; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.site-nav a {
  padding: 0.45rem 0.85rem;
  border-radius: var(--border-radius-pill);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.site-nav a:hover, .site-nav a.active {
  background: var(--bg-muted);
  color: var(--color-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Dark mode toggle */
#dark-mode-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--bg-muted);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
#dark-mode-btn:hover {
  background: var(--color-primary);
  color: #fff;
}

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border: none;
  background: none;
}
.menu-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0; right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  flex-direction: column;
  gap: 0.3rem;
  z-index: 999;
  box-shadow: var(--shadow-md);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 0.65rem 1rem;
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-weight: 500;
}
.mobile-nav a:hover {
  background: var(--bg-muted);
  color: var(--color-primary);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: var(--bg-hero);
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px; left: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(124,92,191,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -60px; right: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(244,164,192,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: var(--color-accent-light);
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35em 1em;
  border-radius: var(--border-radius-pill);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
  max-width: 680px;
  margin-left: auto; margin-right: auto;
}

.hero h1 span { color: var(--color-primary); }

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

/* Hero search form */
.hero-search {
  max-width: 580px;
  margin: 0 auto 2rem;
  position: relative;
}

.search-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-pill);
  overflow: hidden;
  padding: 0.3rem 0.3rem 0.3rem 1.2rem;
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-wrap:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(124,92,191,0.12);
}

.search-icon {
  color: var(--text-muted);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

#hero-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-primary);
  padding: 0.5rem 0;
}
#hero-search-input::placeholder { color: var(--text-muted); }

/* Autocomplete dropdown */
.autocomplete-box {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  display: none;
}
.autocomplete-box.visible { display: block; }

.autocomplete-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.2rem;
  cursor: pointer;
  transition: background var(--transition);
  font-size: 0.9rem;
  color: var(--text-primary);
}
.autocomplete-item:hover {
  background: var(--bg-muted);
  color: var(--color-primary);
}
.autocomplete-item strong { font-weight: 600; }

.hero-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-tag {
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.35em 0.9em;
  border-radius: var(--border-radius-pill);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.hero-tag:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 4rem 0; }
.section-alt { background: var(--bg-soft); }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 0.5rem;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 40px; height: 3px;
  background: var(--color-primary);
  border-radius: 3px;
}

.section-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-primary);
  display: flex; align-items: center; gap: 0.25rem;
}

/* ============================================================
   NAME CARDS (Grid)
   ============================================================ */
.names-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1.1rem;
}

.name-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 1.3rem 1.1rem 1rem;
  transition: all var(--transition);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.name-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.name-card:hover::before { transform: scaleX(1); }
.name-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
}

.name-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-serif);
}
.name-card-meaning {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.name-card-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.3rem;
  flex-wrap: wrap;
}

/* ============================================================
   CATEGORY CARDS
   ============================================================ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1rem;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transition: all var(--transition);
}
.category-card:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.category-card:hover .cat-icon,
.category-card:hover .cat-name,
.category-card:hover .cat-count {
  color: #fff;
}

.cat-icon {
  font-size: 2rem;
  transition: color var(--transition);
}
.cat-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: color var(--transition);
}
.cat-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

/* ============================================================
   ALPHABET NAVIGATION
   ============================================================ */
.alphabet-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.alpha-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--border-radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
}
.alpha-btn:hover, .alpha-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  transform: scale(1.1);
}
.alpha-btn.has-names { border-color: var(--color-primary-light); }

/* ============================================================
   RELIGION BROWSE SECTION
   ============================================================ */
.religion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.religion-card {
  border-radius: var(--border-radius-md);
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.religion-card.hindu    { background: linear-gradient(135deg,#fff8e1,#ffe0b2); }
.religion-card.muslim   { background: linear-gradient(135deg,#e8f5e9,#c8e6c9); }
.religion-card.christian{ background: linear-gradient(135deg,#e3f2fd,#bbdefb); }
.religion-card.sikh     { background: linear-gradient(135deg,#fce4ec,#f8bbd0); }
.religion-card.buddhist { background: linear-gradient(135deg,#f3e5f5,#e1bee7); }
.religion-card.jain     { background: linear-gradient(135deg,#fff3e0,#ffe0b2); }

[data-theme="dark"] .religion-card.hindu    { background: linear-gradient(135deg,#2a2000,#3a2500); }
[data-theme="dark"] .religion-card.muslim   { background: linear-gradient(135deg,#002a10,#003a18); }
[data-theme="dark"] .religion-card.christian{ background: linear-gradient(135deg,#001530,#002050); }
[data-theme="dark"] .religion-card.sikh     { background: linear-gradient(135deg,#2a001a,#3a0025); }
[data-theme="dark"] .religion-card.buddhist { background: linear-gradient(135deg,#1a0030,#2a0040); }
[data-theme="dark"] .religion-card.jain     { background: linear-gradient(135deg,#2a1500,#3a2000); }

.religion-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.religion-icon { font-size: 2.5rem; }
.religion-name { font-weight: 700; font-size: 1rem; color: var(--text-primary); }
.religion-count { font-size: 0.8rem; color: var(--text-secondary); }

/* ============================================================
   NAME DETAIL PAGE
   ============================================================ */
.name-hero {
  background: var(--bg-hero);
  padding: 3.5rem 0 3rem;
}

.name-hero-inner {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  flex-wrap: wrap;
}

.name-hero-main { flex: 1; min-width: 250px; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb-sep { color: var(--border-color); }

.name-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.7rem;
}

.name-pronunciation {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.name-meaning-callout {
  background: var(--bg-card);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  padding: 1rem 1.3rem;
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}
.name-meaning-callout strong { color: var(--color-primary); }

.name-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Stats grid on name detail */
.name-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 1.2rem;
  text-align: center;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary);
  font-family: var(--font-serif);
}

.stat-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }

/* Popularity bar */
.popularity-bar-wrap { margin-top: 1rem; }
.popularity-bar-track {
  height: 8px;
  border-radius: 4px;
  background: var(--bg-muted);
  overflow: hidden;
}
.popularity-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width 1s ease;
}

/* Lucky attributes */
.lucky-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}
.lucky-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 1.3rem;
  text-align: center;
}
.lucky-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.lucky-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.lucky-value { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); margin-top: 0.25rem; }

/* Share buttons */
.share-buttons {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.share-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: flex; align-items: center; gap: 0.4rem;
  transition: all var(--transition);
}
.share-btn.whatsapp { background: #25d366; color: #fff; }
.share-btn.twitter  { background: #1da1f2; color: #fff; }
.share-btn.facebook { background: #1877f2; color: #fff; }
.share-btn.copy     { background: var(--bg-muted); color: var(--text-secondary); }
.share-btn:hover    { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ============================================================
   SEARCH PAGE
   ============================================================ */
.search-bar-page {
  background: var(--bg-soft);
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.search-form {
  display: grid;
  gap: 1rem;
}

.search-form-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.search-field {
  flex: 1;
  min-width: 180px;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-input, .form-select {
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus, .form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(124,92,191,0.12);
}

.search-results-meta {
  padding: 1.2rem 0 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 2.5rem 0;
  flex-wrap: wrap;
}

.page-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
}
.page-btn:hover { background: var(--bg-muted); color: var(--color-primary); }
.page-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.page-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand .logo { margin-bottom: 0.8rem; }

.footer-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.footer-heading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--color-primary); }

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition);
  z-index: 999;
  pointer-events: none;
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#back-to-top:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

/* ============================================================
   STATIC PAGES (About / Privacy / Contact)
   ============================================================ */
.page-hero {
  background: var(--bg-hero);
  padding: 3rem 0;
  text-align: center;
}
.page-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}
.page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

.page-content {
  max-width: 780px;
  margin: 3rem auto;
  padding: 0 1.25rem;
}
.page-content h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--text-primary);
  margin: 2rem 0 0.8rem;
}
.page-content p {
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 1rem;
}
.page-content ul li {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  padding-left: 1.2rem;
  position: relative;
}
.page-content ul li::before {
  content: '→';
  position: absolute; left: 0;
  color: var(--color-primary);
  font-size: 0.8rem;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}
.contact-form textarea {
  resize: vertical;
  min-height: 130px;
}

/* ============================================================
   404 PAGE
   ============================================================ */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 3rem 1.25rem;
}
.error-code {
  font-family: var(--font-serif);
  font-size: 6rem;
  font-weight: 700;
  color: var(--color-primary);
  opacity: 0.3;
  line-height: 1;
}
.error-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--text-primary);
  margin: 0.5rem 0;
}
.error-sub { color: var(--text-muted); margin-bottom: 2rem; }

/* ============================================================
   DESCRIPTION BLOCK (category page)
   ============================================================ */
.category-description {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ============================================================
   MISC
   ============================================================ */
.divider {
  height: 1px;
  background: var(--border-color);
  margin: 0;
}

.tag-chip {
  display: inline-block;
  background: var(--bg-muted);
  color: var(--color-primary);
  padding: 0.25em 0.75em;
  border-radius: var(--border-radius-pill);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
}
.tag-chip:hover {
  background: var(--color-primary);
  color: #fff;
}

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state-text { font-size: 1rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .site-nav { display: none; }
  .menu-toggle { display: flex; }

  .hero { padding: 3.5rem 0 2.5rem; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .names-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  }

  .name-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .name-hero-inner { flex-direction: column; gap: 1.5rem; }

  .search-form-row { flex-direction: column; }

  .section-header { flex-direction: column; gap: 0.75rem; }
}

@media (max-width: 420px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .names-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fadeInUp { animation: fadeInUp 0.5s ease forwards; }

@keyframes pulse-border {
  0%,100% { box-shadow: 0 0 0 0 rgba(124,92,191,0.3); }
  50%      { box-shadow: 0 0 0 8px rgba(124,92,191,0); }
}

/* Scroll-triggered fade-in (handled by IntersectionObserver in JS) */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

