/* NameTrace — styles.css v1 */
:root {
  --primary:      #1a3a5c;
  --primary-dark: #0f2540;
  --accent:       #c9a84c;
  --accent-light: #f5e9c8;
  --bg:           #f7f5f0;
  --card-bg:      #ffffff;
  --text:         #1a1a1a;
  --text-muted:   #5a5a5a;
  --border:       #e0dbd0;
  --radius:       8px;
  --shadow:       0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.06);
}

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

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--accent); }

/* ── Header ── */
header {
  background: var(--primary-dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.logo {
  font-family: Georgia, serif;
  font-size: 1.4rem;
  font-weight: bold;
  color: #fff;
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.logo img { width: 32px; height: 32px; border-radius: 4px; }
.logo span { color: var(--accent); }
nav { display: flex; gap: 1.25rem; flex: 1; }
nav a { color: rgba(255,255,255,.85); font-family: Arial, sans-serif; font-size: .9rem; }
nav a:hover { color: var(--accent); text-decoration: none; }
.lang-switcher { display: flex; gap: .4rem; }
.lang-switcher a {
  color: rgba(255,255,255,.6);
  font-size: .78rem;
  font-family: Arial, sans-serif;
  padding: .2rem .4rem;
  border-radius: 4px;
}
.lang-switcher a.active,
.lang-switcher a:hover {
  color: #fff;
  background: rgba(255,255,255,.15);
  text-decoration: none;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
}
.hero h1 {
  font-size: 2.2rem;
  font-weight: bold;
  max-width: 800px;
  margin: 0 auto .75rem;
  line-height: 1.3;
}
.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  max-width: 600px;
  margin: 0 auto;
}
.hero .accent-line {
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 1rem auto 0;
}

/* ── Page hero (inner pages) ── */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 80%);
  color: #fff;
  padding: 2.5rem 1.5rem 2rem;
}
.page-hero .container { max-width: 860px; margin: 0 auto; }
.page-hero h1 {
  font-size: 1.9rem;
  line-height: 1.3;
  margin: .5rem 0;
}
.page-hero .subtitle {
  color: rgba(255,255,255,.75);
  font-size: 1rem;
  font-family: Arial, sans-serif;
}
.page-hero .badge {
  display: inline-block;
  background: var(--accent);
  color: var(--primary-dark);
  font-size: .75rem;
  font-family: Arial, sans-serif;
  font-weight: bold;
  padding: .25rem .65rem;
  border-radius: 20px;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

/* ── Breadcrumb ── */
.breadcrumb {
  font-family: Arial, sans-serif;
  font-size: .82rem;
  color: rgba(255,255,255,.6);
  margin-bottom: .5rem;
}
.breadcrumb a { color: rgba(255,255,255,.75); }
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.breadcrumb-sep { margin: 0 .4rem; }

/* ── Container ── */
.container { max-width: 860px; margin: 0 auto; padding: 0 1.5rem; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Cards ── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}
.card-title {
  font-size: 1rem;
  font-family: Arial, sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
  border-bottom: 2px solid var(--accent);
  padding-bottom: .4rem;
  margin-bottom: 1.25rem;
}

/* ── Etymology fact box ── */
.fact-box {
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.fact-box .fact-label {
  font-family: Arial, sans-serif;
  font-size: .78rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
  margin-bottom: .3rem;
}
.fact-box .fact-value {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--primary-dark);
}

/* ── Info table ── */
.info-table { width: 100%; border-collapse: collapse; }
.info-table tr { border-bottom: 1px solid var(--border); }
.info-table tr:last-child { border-bottom: none; }
.info-table td {
  padding: .6rem .5rem;
  font-size: .95rem;
}
.info-table td:first-child {
  font-family: Arial, sans-serif;
  font-size: .82rem;
  color: var(--text-muted);
  width: 38%;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.info-table td:last-child { font-weight: 500; }

/* ── Main content ── */
.content-body { padding: 2.5rem 0; }
.content-body p { margin-bottom: 1.2rem; }
.content-body h2 {
  font-size: 1.35rem;
  margin: 2rem 0 .75rem;
  color: var(--primary-dark);
  border-bottom: 1px solid var(--border);
  padding-bottom: .4rem;
}
.content-body h3 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; color: var(--primary); }

/* ── Related grid ── */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}
.related-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  transition: border-color .2s, box-shadow .2s;
  font-size: .9rem;
}
.related-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(26,58,92,.12);
  text-decoration: none;
}
.related-card .place-name { font-weight: bold; color: var(--primary-dark); }
.related-card .place-sub  { font-family: Arial, sans-serif; font-size: .78rem; color: var(--text-muted); }

/* ── Country grid (homepage) ── */
.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.country-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  text-align: center;
  transition: box-shadow .2s, border-color .2s;
}
.country-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary);
  text-decoration: none;
}
.country-card .flag { font-size: 2rem; display: block; margin-bottom: .4rem; }
.country-card .cname { font-weight: bold; font-size: .95rem; color: var(--primary-dark); }
.country-card .ccount { font-family: Arial, sans-serif; font-size: .78rem; color: var(--text-muted); }

/* ── Search ── */
.search-wrap { position: relative; margin: 2rem 0 1rem; }
.search-input {
  width: 100%;
  padding: .85rem 1.2rem .85rem 3rem;
  border: 2px solid var(--border);
  border-radius: 40px;
  font-family: Arial, sans-serif;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
}
.search-input:focus { border-color: var(--primary); }
.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ── FAQ ── */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: .75rem 0;
}
.faq-question {
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: Arial, sans-serif;
  font-size: .97rem;
  color: var(--primary-dark);
}
.faq-question::after { content: '+'; font-size: 1.2rem; color: var(--accent); }
.faq-item.open .faq-question::after { content: '−'; }
.faq-answer {
  display: none;
  padding: .75rem 0 .25rem;
  font-size: .95rem;
  color: var(--text-muted);
}
.faq-item.open .faq-answer { display: block; }

/* ── Ad slot ── */
.ad-slot {
  background: #f0ede8;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: Arial, sans-serif;
  font-size: .8rem;
  margin: 1.5rem 0;
}

/* ── Footer ── */
footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.7);
  padding: 2.5rem 1.5rem;
  margin-top: 4rem;
  font-family: Arial, sans-serif;
  font-size: .85rem;
}
.footer-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.footer-links { display: flex; gap: .5rem; justify-content: center; margin-top: .75rem; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,.5); font-size: .78rem; }
.footer-links a:hover { color: var(--accent); }

/* ── Utils ── */
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.section-title {
  font-family: Arial, sans-serif;
  font-size: .82rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: .5rem;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero h1     { font-size: 1.6rem; }
  .page-hero h1{ font-size: 1.4rem; }
  .header-inner{ flex-wrap: wrap; gap: .5rem; }
  nav          { display: none; }
  .country-grid{ grid-template-columns: repeat(3, 1fr); }
  .related-grid{ grid-template-columns: 1fr 1fr; }
  body         { font-size: 16px; }
}
