/* ===========================
   Arabic Names Site - Styles
   SEO-Optimized, Mobile-First
   =========================== */

:root {
  --primary: #1a5276;
  --primary-light: #2e86c1;
  --secondary: #c0392b;
  --gold: #d4a017;
  --gold-light: #f9e79f;
  --bg: #fdfcf8;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-muted: #5d6d7e;
  --border: #e8dcc8;
  --shadow: 0 2px 12px rgba(26,82,118,0.08);
  --shadow-hover: 0 8px 30px rgba(26,82,118,0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --font-main: 'Cairo', 'Tahoma', sans-serif;
  --font-serif: 'Amiri', serif;
  --max-width: 1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ── Header ── */
.site-header {
  background: linear-gradient(135deg, var(--primary) 0%, #0d3349 100%);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  position: sticky; top: 0; z-index: 1000;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; max-width: var(--max-width); margin: 0 auto;
}
.site-logo {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
}
.logo-icon {
  width: 44px; height: 44px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-family: var(--font-serif);
  color: var(--primary); font-weight: 700;
  flex-shrink: 0;
}
.logo-text { color: white; }
.logo-text h1 { font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.logo-text span { font-size: 0.75rem; opacity: 0.8; }

/* ── Navigation ── */
.main-nav { display: flex; gap: 6px; align-items: center; }
.main-nav a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
}
.main-nav a:hover, .main-nav a.active {
  background: rgba(255,255,255,0.15);
  color: var(--gold-light);
}
.nav-boys { border: 1px solid rgba(255,255,255,0.3); }
.nav-girls { border: 1px solid rgba(255,255,255,0.3); }

.hamburger {
  display: none; background: none; border: none;
  cursor: pointer; padding: 8px; color: white; font-size: 24px;
}

/* ── Hero Section ── */
.hero {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-light) 60%, #85c1e9 100%);
  color: white; text-align: center;
  padding: 70px 20px 80px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1' fill='rgba(255,255,255,0.05)'/%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 900; margin-bottom: 16px; }
.hero h1 span { color: var(--gold-light); }
.hero p { font-size: clamp(1rem, 2vw, 1.2rem); opacity: 0.9; max-width: 600px; margin: 0 auto 32px; }
.hero-stats { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { font-size: 2.2rem; font-weight: 900; color: var(--gold-light); display: block; }
.stat-label { font-size: 0.85rem; opacity: 0.8; }

/* ── Search Box ── */
.search-section { background: white; padding: 30px 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.search-box {
  max-width: 600px; margin: 0 auto;
  display: flex; gap: 0; border-radius: 50px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(26,82,118,0.2);
  border: 2px solid var(--primary);
}
.search-box input {
  flex: 1; padding: 14px 24px;
  font-family: var(--font-main); font-size: 1rem;
  border: none; outline: none; direction: rtl;
  background: white;
}
.search-box button {
  padding: 14px 28px;
  background: var(--primary); color: white;
  border: none; cursor: pointer;
  font-family: var(--font-main); font-size: 0.95rem; font-weight: 600;
  transition: background 0.2s;
}
.search-box button:hover { background: #0d3349; }
.search-results {
  max-width: 600px; margin: 8px auto 0;
  background: white; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover); display: none;
  max-height: 300px; overflow-y: auto;
}
.search-results.show { display: block; }
.search-result-item {
  padding: 12px 20px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.search-result-item:hover { background: #f0f7ff; }
.search-result-item a { text-decoration: none; color: var(--text); display: flex; align-items: center; gap: 10px; }
.result-badge { font-size: 0.7rem; padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.badge-boy { background: #dbeafe; color: #1e40af; }
.badge-girl { background: #fce7f3; color: #9d174d; }

/* ── Section Titles ── */
.section-title {
  text-align: center; margin-bottom: 40px;
}
.section-title h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800; color: var(--primary);
  margin-bottom: 8px;
}
.section-title p { color: var(--text-muted); font-size: 1rem; }
.section-divider {
  width: 80px; height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--primary-light));
  border-radius: 2px; margin: 12px auto 0;
}

/* ── Main Content Area ── */
.main-content { padding: 50px 0; }
.content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
}

/* ── Category Cards ── */
.gender-cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin-bottom: 50px;
}
.gender-card {
  border-radius: var(--radius);
  padding: 40px 30px; text-align: center;
  text-decoration: none; color: white;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative; overflow: hidden;
}
.gender-card::before {
  content: ''; position: absolute; inset: 0;
  opacity: 0.1;
  background: repeating-linear-gradient(45deg, white 0, white 1px, transparent 1px, transparent 10px);
}
.gender-card-boys { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.gender-card-girls { background: linear-gradient(135deg, #922b21, #e74c3c); }
.gender-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.gender-card-icon { font-size: 3.5rem; margin-bottom: 16px; }
.gender-card h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.gender-card p { font-size: 0.9rem; opacity: 0.85; }
.gender-card-count { font-size: 2rem; font-weight: 900; color: rgba(255,255,255,0.9); display: block; margin-top: 10px; }

/* ── Letter Grid ── */
.letters-section { margin-bottom: 40px; }
.letters-section h2 { font-size: 1.4rem; font-weight: 700; color: var(--primary); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--gold); }
.letters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 10px;
}
.letter-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 14px 8px; background: white;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  text-decoration: none; color: var(--primary);
  font-weight: 700; font-size: 1.3rem;
  transition: all 0.2s; font-family: var(--font-serif);
}
.letter-btn small { font-size: 0.65rem; color: var(--text-muted); font-family: var(--font-main); font-weight: 400; margin-top: 2px; }
.letter-btn:hover, .letter-btn.active {
  background: var(--primary); color: white; border-color: var(--primary);
  transform: translateY(-3px); box-shadow: var(--shadow);
}
.letter-btn:hover small, .letter-btn.active small { color: rgba(255,255,255,0.8); }
.letter-btn-boys:hover { background: var(--primary); border-color: var(--primary); }
.letter-btn-girls:hover { background: var(--secondary); border-color: var(--secondary); }

/* ── Names Grid ── */
.names-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.name-card {
  background: white; border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px; text-decoration: none; color: var(--text);
  transition: all 0.25s; display: flex; flex-direction: column; gap: 8px;
}
.name-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}
.name-card-name { font-size: 1.4rem; font-weight: 700; color: var(--primary); font-family: var(--font-serif); }
.name-card-preview { 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-origin { font-size: 0.72rem; background: var(--gold-light); color: #7d6608; padding: 3px 10px; border-radius: 20px; align-self: flex-start; }

/* ── Single Name Page ── */
.name-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white; padding: 50px 20px; text-align: center; margin-bottom: 40px;
}
.name-hero .name-title { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; font-family: var(--font-serif); margin-bottom: 12px; }
.name-hero .name-subtitle { font-size: 1rem; opacity: 0.85; }
.name-badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.name-badge {
  padding: 6px 18px; border-radius: 25px; font-size: 0.85rem; font-weight: 600;
  background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.4); color: white;
}

.name-content { max-width: 800px; margin: 0 auto; }
.info-card {
  background: white; border-radius: var(--radius); padding: 28px;
  border: 1px solid var(--border); margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.info-card h2 { font-size: 1.2rem; font-weight: 700; color: var(--primary); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--gold-light); }
.info-card p { color: var(--text); line-height: 1.9; font-size: 1rem; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.info-row { display: flex; flex-direction: column; gap: 4px; background: #f8f9fa; padding: 12px 16px; border-radius: var(--radius-sm); }
.info-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }
.info-value { font-size: 0.95rem; font-weight: 700; color: var(--text); }

/* ── Sidebar ── */
.sidebar { position: sticky; top: 80px; }
.sidebar-widget {
  background: white; border-radius: var(--radius); padding: 24px;
  border: 1px solid var(--border); margin-bottom: 24px; box-shadow: var(--shadow);
}
.sidebar-widget h3 { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--gold-light); }
.sidebar-widget ul { list-style: none; }
.sidebar-widget ul li { border-bottom: 1px solid #f0f0f0; }
.sidebar-widget ul li:last-child { border-bottom: none; }
.sidebar-widget ul li a { display: flex; align-items: center; gap: 8px; padding: 8px 0; text-decoration: none; color: var(--text); font-size: 0.9rem; transition: color 0.2s; }
.sidebar-widget ul li a:hover { color: var(--primary); }
.sidebar-widget ul li a::before { content: '›'; color: var(--gold); font-weight: 700; }

/* ── Breadcrumb ── */
.breadcrumb { padding: 14px 0; border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.breadcrumb ol { display: flex; align-items: center; gap: 8px; list-style: none; flex-wrap: wrap; }
.breadcrumb ol li { display: flex; align-items: center; }
.breadcrumb ol li a { color: var(--primary-light); text-decoration: none; font-size: 0.88rem; }
.breadcrumb ol li a:hover { text-decoration: underline; }
.breadcrumb ol li span { font-size: 0.88rem; color: var(--text-muted); }
.breadcrumb .separator { color: var(--text-muted); font-size: 0.7rem; }

/* ── Ad Containers ── */
.ad-container {
  background: #f8f9fa; border: 1px dashed var(--border);
  border-radius: var(--radius-sm); padding: 4px;
  text-align: center; margin: 28px 0;
  min-height: 90px;
}
.ad-container::before {
  content: 'إعلان';
  display: block; font-size: 0.65rem; color: var(--text-muted);
  margin-bottom: 2px;
}

/* ── Footer ── */
.site-footer {
  background: #0d1b2a; color: rgba(255,255,255,0.8);
  padding: 50px 0 20px; margin-top: 60px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
  margin-bottom: 40px;
}
.footer-col h3, .footer-col h4 { color: white; font-size: 1rem; margin-bottom: 16px; }
.footer-col p { font-size: 0.85rem; line-height: 1.7; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,0.65); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 0.82rem; }

/* ── Mobile Nav ── */
@media (max-width: 768px) {
  .hamburger { display: block; }
  .main-nav {
    display: none; flex-direction: column; gap: 0;
    position: absolute; top: 68px; right: 0; left: 0;
    background: var(--primary); padding: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 20px; border-radius: var(--radius-sm); }
  .gender-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .header-inner { position: relative; }
  .letters-grid { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }
}

@media (max-width: 480px) {
  .hero { padding: 50px 16px 60px; }
  .hero-stats { gap: 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .content-grid { gap: 20px; }
}

/* ── Utilities ── */
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.boys-color { color: var(--primary); }
.girls-color { color: var(--secondary); }

/* ── Page type indicator ── */
.page-type-boys .letter-btn.active { background: var(--primary); border-color: var(--primary); }
.page-type-girls .letter-btn.active { background: var(--secondary); border-color: var(--secondary); }
.page-type-girls .section-title h2 { color: var(--secondary); }
.page-type-girls .info-card h2 { color: var(--secondary); }
.page-type-girls .name-card:hover { border-color: var(--secondary); }
.page-type-girls .name-hero { background: linear-gradient(135deg, #922b21 0%, #e74c3c 100%); }

/* ══════════════════════════════════
   ADDITIONS & UPGRADES
   ══════════════════════════════════ */

/* ── Footer Upgrades ── */
.footer-about { grid-column: span 1; }
.footer-logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: white;
  font-size: 1.1rem; font-weight: 700; margin-bottom: 14px;
}
.footer-logo-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 18px; font-weight: 700;
  flex-shrink: 0;
}
.footer-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.footer-badges span {
  font-size: 0.72rem; padding: 4px 10px;
  background: rgba(255,255,255,0.1); border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.8);
}

/* ── Search Page ── */
.search-page { padding: 50px 0; min-height: 60vh; }
.search-page-box {
  max-width: 700px; margin: 0 auto 40px;
  display: flex; border-radius: 50px; overflow: hidden;
  box-shadow: 0 6px 30px rgba(26,82,118,0.2);
  border: 2px solid var(--primary);
}
.search-page-box input {
  flex: 1; padding: 16px 28px;
  font-family: var(--font-main); font-size: 1.05rem;
  border: none; outline: none; direction: rtl; background: white;
}
.search-page-box button {
  padding: 16px 32px; background: var(--primary); color: white;
  border: none; cursor: pointer; font-family: var(--font-main);
  font-size: 1rem; font-weight: 700; transition: background .2s;
}
.search-page-box button:hover { background: #0d3349; }
.search-filter-tabs {
  display: flex; gap: 10px; justify-content: center; margin-bottom: 32px;
}
.filter-tab {
  padding: 8px 24px; border-radius: 25px; border: 2px solid var(--border);
  background: white; cursor: pointer; font-family: var(--font-main);
  font-size: 0.9rem; font-weight: 600; color: var(--text-muted);
  transition: all .2s;
}
.filter-tab.active, .filter-tab:hover {
  background: var(--primary); border-color: var(--primary); color: white;
}
.filter-tab-girls.active { background: var(--secondary); border-color: var(--secondary); }
.search-stats { text-align: center; color: var(--text-muted); font-size: .9rem; margin-bottom: 24px; }
.no-results {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.no-results .emoji { font-size: 3rem; display: block; margin-bottom: 16px; }

/* ── 404 Page ── */
.error-page {
  min-height: 70vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 40px 20px;
}
.error-page .error-code {
  font-size: 8rem; font-weight: 900; color: var(--primary);
  line-height: 1; opacity: 0.15; position: absolute;
}
.error-content { position: relative; z-index: 1; }
.error-emoji { font-size: 4rem; display: block; margin-bottom: 20px; }
.error-page h1 { font-size: 1.8rem; color: var(--primary); margin-bottom: 12px; }
.error-page p { color: var(--text-muted); margin-bottom: 28px; max-width: 400px; }
.btn-primary {
  display: inline-block; padding: 14px 36px;
  background: var(--primary); color: white;
  border-radius: 50px; text-decoration: none;
  font-weight: 700; font-size: 1rem; transition: all .2s;
}
.btn-primary:hover { background: #0d3349; transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-secondary {
  display: inline-block; padding: 14px 36px;
  background: white; color: var(--primary);
  border-radius: 50px; text-decoration: none;
  font-weight: 700; font-size: 1rem; transition: all .2s;
  border: 2px solid var(--primary); margin-right: 12px;
}
.btn-secondary:hover { background: var(--primary); color: white; }

/* ── Contact Page ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-form { background: white; border-radius: var(--radius); padding: 32px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.contact-form h2 { font-size: 1.3rem; color: var(--primary); margin-bottom: 24px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; font-size: .9rem; color: var(--text); margin-bottom: 6px; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: 12px 16px;
  font-family: var(--font-main); font-size: .95rem;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  outline: none; direction: rtl; background: white; color: var(--text);
  transition: border-color .2s;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--primary); }
.form-group textarea { resize: vertical; min-height: 130px; }
.btn-submit {
  width: 100%; padding: 14px;
  background: var(--primary); color: white;
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font-main); font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: background .2s;
}
.btn-submit:hover { background: #0d3349; }
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.contact-info-card {
  background: white; border-radius: var(--radius); padding: 24px;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  display: flex; gap: 16px; align-items: flex-start;
}
.contact-icon { font-size: 2rem; flex-shrink: 0; }
.contact-info-card h3 { font-size: 1rem; color: var(--primary); margin-bottom: 4px; }
.contact-info-card p { font-size: .88rem; color: var(--text-muted); }

/* ── Privacy Page ── */
.privacy-content { max-width: 800px; margin: 0 auto; }
.privacy-content h2 { font-size: 1.3rem; color: var(--primary); margin: 32px 0 12px; }
.privacy-content p { color: var(--text); line-height: 1.9; margin-bottom: 14px; }
.privacy-content ul { margin: 0 0 14px 0; padding-right: 20px; }
.privacy-content ul li { margin-bottom: 6px; color: var(--text); }

/* ── Back to Top Button ── */
#backToTop {
  position: fixed; bottom: 28px; left: 28px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary); color: white;
  border: none; cursor: pointer; font-size: 18px;
  box-shadow: 0 4px 16px rgba(26,82,118,0.35);
  opacity: 0; transform: translateY(12px);
  transition: opacity .3s, transform .3s;
  z-index: 999; display: flex; align-items: center; justify-content: center;
}
#backToTop.visible { opacity: 1; transform: translateY(0); }
#backToTop:hover { background: #0d3349; }

/* ── Popular Names Widget ── */
.popular-grid { display: flex; flex-direction: column; gap: 6px; }
.popular-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid #f4f4f4; text-decoration: none; color: var(--text);
}
.popular-item:last-child { border-bottom: none; }
.popular-item:hover .popular-name { color: var(--primary); }
.popular-rank { font-size: .7rem; font-weight: 700; width: 22px; height: 22px; background: var(--gold-light); color: #7d6608; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.popular-name { font-size: .95rem; font-weight: 600; flex: 1; margin: 0 10px; }
.popular-arrow { color: var(--text-muted); font-size: .75rem; }

/* ── Table of Contents ── */
.toc {
  background: #f0f7ff; border: 1px solid #bee3f8; border-radius: var(--radius-sm);
  padding: 20px 24px; margin-bottom: 28px;
}
.toc h3 { font-size: .95rem; color: var(--primary); margin-bottom: 12px; }
.toc ol { padding-right: 18px; }
.toc ol li { margin-bottom: 6px; }
.toc ol li a { color: var(--primary-light); text-decoration: none; font-size: .88rem; }
.toc ol li a:hover { text-decoration: underline; }

/* ── Notification / Alert Bar ── */
.alert-bar {
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  color: white; text-align: center; padding: 10px 20px; font-size: .85rem;
  display: none; /* enable if needed */
}

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
  #backToTop { bottom: 16px; left: 16px; width: 40px; height: 40px; font-size: 15px; }
}

/* ══════════════════════════════════
   PAGINATION
══════════════════════════════════ */
/* ══ Pagination — Upgraded ══ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 44px 0 24px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 52px;
  padding: 0 20px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: white;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.page-btn:hover:not(.disabled):not(.active) {
  border-color: var(--primary);
  color: var(--primary);
  background: #f0f7ff;
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.13);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  cursor: default;
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
  transform: translateY(-2px);
}

.page-btn.disabled {
  opacity: 0.28;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.page-dots {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0 4px;
  user-select: none;
  line-height: 52px;
}

@media (max-width: 480px) {
  .page-btn {
    min-width: 46px;
    height: 46px;
    font-size: 0.98rem;
    padding: 0 14px;
  }
}
/* ══════════════════════════════════
   NAME IMAGES
══════════════════════════════════ */
/* Hero image on single name page */
.name-hero-img {
  width: 120px; height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.4);
  margin: 0 auto 16px;
  display: block;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}

/* Name card always column — image on top, text below */
.name-card {
  display: flex; flex-direction: column; gap: 6px;
}
.name-card-img {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
  align-self: center;
  margin-bottom: 4px;
}
.name-card-text {
  display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0;
}

/* ══ Show More Button ══ */
.show-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  margin: 20px auto 0;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light, #6a8fd8));
  border: none;
  border-radius: 50px;
  color: white;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  grid-column: 1 / -1;
}

.show-more-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
  filter: brightness(1.08);
}

.show-more-count {
  background: rgba(255,255,255,0.25);
  color: white;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
}

.show-more-btn:hover .show-more-count {
  background: rgba(255,255,255,0.35);
}
/* ── Sidebar Letters List ─────────────────────────── */
.sidebar-letters-list { max-height: 320px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--gold) #f5f5f5; }
.sidebar-letters-list::-webkit-scrollbar { width: 4px; }
.sidebar-letters-list::-webkit-scrollbar-track { background: #f5f5f5; border-radius: 4px; }
.sidebar-letters-list::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }
.sidebar-letters-list li.active-letter a { color: var(--primary); font-weight: 700; background: var(--bg-light, #faf9ff); border-radius: 6px; padding-right: 6px; }
.sidebar-letters-list li.active-letter a::before { color: var(--primary); }

/* ── Name Card Text Wrapper (related names) ──────── */
.name-card-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }

/* ── Letter Section Header (homepage) ── */
.letter-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.letter-section-header h2 {
  margin: 0;
  font-size: 1.1rem;
}
.letter-heading-link {
  color: inherit;
  text-decoration: none;
  font-weight: 800;
}
.letter-heading-link:hover { text-decoration: underline; }
.letter-heading-link small {
  font-size: .78rem;
  font-weight: 400;
  color: #888;
  margin-right: 6px;
}
.letter-heading-boys { color: #1a6db5; }
.letter-heading-girls { color: #c2185b; }
.view-all-link {
  font-size: .85rem;
  font-weight: 700;
  color: #555;
  white-space: nowrap;
}
.view-all-link:hover { color: #1a6db5; }
