/* ============ RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #222;
  background: #f7f8f9;
  line-height: 1.6;
}
a { color: #1e73be; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ============ ACCESSIBILITY ============ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: #006c3f;
  color: #fff;
  padding: 8px 16px;
  z-index: 200;
  font-size: 14px;
  border-radius: 0 0 4px 0;
}
.skip-link:focus {
  top: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============ HEADER ============ */
.site-header {
  background: #006c3f;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  color: #fff;
  letter-spacing: .5px;
}
.logo img {
  height: 45px;
  width: auto;
  border-radius: 6px;
}
.logo:hover { text-decoration: none; opacity: .9; }
.main-nav a {
  color: #fff;
  margin-left: 22px;
  font-size: 14px;
  opacity: .9;
  transition: opacity .2s;
}
.main-nav a:hover { opacity: 1; text-decoration: none; }
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

/* ============ HERO ============ */
.hero {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: 50px 20px 40px;
}
.hero h1 {
  font-size: 28px;
  color: #006c3f;
  margin-bottom: 14px;
}
.hero-desc {
  color: #575760;
  font-size: 16px;
  margin-bottom: 24px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}
.hero-image {
  display: block;
  max-width: 480px;
  width: 100%;
  height: auto;
  margin: 0 auto 30px;
  border-radius: 8px;
}

/* ============ SEARCH FORM ============ */
.search-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.input-group {
  display: flex;
  gap: 14px;
  width: 100%;
  max-width: 520px;
}
.input-group input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #ccd0d4;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color .2s;
  outline: none;
}
.input-group input:focus {
  border-color: #006c3f;
}
#searchBtn {
  background: #006c3f;
  color: #fff;
  border: none;
  padding: 13px 40px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s;
}
#searchBtn:hover { background: #00854d; }
#searchBtn:active { background: #005a34; }

/* ============ LOADING ============ */
.loading {
  text-align: center;
  padding: 40px 20px;
}
.spinner {
  width: 44px;
  height: 44px;
  border: 5px solid #e0e0e0;
  border-top-color: #006c3f;
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading p { color: #575760; }

/* ============ ERROR ============ */
.error-msg {
  max-width: 700px;
  margin: 20px auto;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 14px 20px;
  text-align: center;
}

/* ============ RESULTS ============ */
.results {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* Summary Row */
.summary-row {
  display: flex;
  gap: 16px;
  margin-bottom: 30px;
}
.summary-block {
  flex: 1;
  background: #4CAF50;
  color: #fff;
  border-radius: 10px;
  padding: 24px 16px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(76,175,80,.25);
}
.summary-label {
  display: block;
  font-size: 13px;
  opacity: .9;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.summary-value {
  display: block;
  font-size: 32px;
  font-weight: 700;
}

/* Section Headings */
.section-heading {
  background: #006c3f;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 8px 8px 0 0;
  margin-top: 28px;
}
.sub-heading {
  background: #00854d;
  color: #fff;
  font-size: 16px;
  padding: 10px 18px;
  margin-top: 18px;
  border-radius: 6px;
}

/* Stat Cards */
.stat-card {
  background: #fff;
  border: 1px solid #e2e5e9;
  border-radius: 0 0 8px 8px;
  padding: 24px;
  margin-bottom: 4px;
}
.stat-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.stat-item {
  flex: 1;
  min-width: 200px;
  text-align: center;
}
.stat-number {
  display: block;
  font-size: 36px;
  font-weight: 700;
  color: #006c3f;
  margin-bottom: 4px;
}
.stat-desc {
  display: block;
  font-size: 14px;
  color: #575760;
}

/* Gender Circles */
.gender-row {
  display: flex;
  justify-content: center;
  gap: 50px;
  padding: 24px 0;
  flex-wrap: wrap;
}
.gender-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.gender-circle.male { background: #007bff; }
.gender-circle.female { background: #ff69b4; }
.gender-symbol { font-size: 32px; margin-bottom: 2px; }
.gender-count { font-size: 22px; font-weight: 700; }
.gender-pct { font-size: 14px; opacity: .9; }

/* Chart */
.chart-container {
  overflow-x: auto;
  padding: 10px 0;
}
.chart-note {
  font-size: 13px;
  color: #888;
  text-align: center;
  margin-top: 8px;
}

/* Highlight Card */
.highlight-card {
  border: 2px solid #006c3f;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
}
.big-result {
  font-size: 20px;
  color: #222;
  margin-bottom: 14px;
  line-height: 1.5;
}
.big-result strong { color: #006c3f; font-size: 24px; }
.methodology {
  font-size: 13px;
  color: #888;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Demographics Bars */
.demo-bars { padding: 10px 0; }
.demo-bar-row {
  margin-bottom: 12px;
}
.demo-bar-label {
  font-size: 13px;
  color: #575760;
  margin-bottom: 4px;
}
.demo-bar-track {
  background: #e8e8e8;
  border-radius: 6px;
  height: 24px;
  position: relative;
  overflow: hidden;
}
.demo-bar-fill {
  height: 100%;
  border-radius: 6px;
  background: #4CAF50;
  display: flex;
  align-items: center;
  padding-left: 8px;
  font-size: 12px;
  color: #fff;
  font-weight: 600;
  min-width: 30px;
  transition: width .6s ease;
}

/* ============ ON THIS PAGE NAV ============ */
.toc-nav {
  margin-top: 28px;
  background: #fff;
  border-radius: 10px;
  padding: 22px 26px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  border: 1px solid #e2e5e9;
}
.toc-title {
  font-size: 15px;
  font-weight: 700;
  color: #006c3f;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 14px;
}
.toc-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toc-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f7f8f9;
  border-radius: 8px;
  color: #222;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background .2s, box-shadow .2s;
  border: 1px solid transparent;
}
.toc-link:hover {
  background: #eef5f0;
  border-color: #006c3f;
  box-shadow: 0 2px 6px rgba(0,108,63,.1);
  text-decoration: none;
}
.toc-icon {
  font-size: 20px;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .toc-nav { padding: 16px 18px; }
  .toc-link { padding: 10px 12px; font-size: 14px; }
}

/* ============ INFO SECTIONS ============ */
.info-section {
  padding: 44px 20px;
  max-width: 900px;
  margin: 0 auto;
}
.info-section.alt-bg {
  max-width: 100%;
  background: #eef5f0;
}
.info-section.alt-bg > * {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}
.info-section .section-heading {
  border-radius: 8px;
  margin-bottom: 18px;
  margin-top: 0;
}
.section-text {
  color: #575760;
  font-size: 15px;
  margin-bottom: 14px;
  line-height: 1.7;
}

/* Steps */
.steps-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
}
.step {
  flex: 1;
  min-width: 140px;
  max-width: 180px;
  text-align: center;
  background: #fff;
  border-radius: 10px;
  padding: 20px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #006c3f;
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 10px;
}
.step p { font-size: 14px; color: #444; }

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 18px;
}
.feature {
  background: #fff;
  padding: 22px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.feature h3 {
  color: #006c3f;
  margin-bottom: 8px;
  font-size: 16px;
}
.feature p {
  font-size: 14px;
  color: #575760;
}

/* Popular Names */
.popular-names-grid {
  display: flex;
  gap: 40px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.popular-list {
  flex: 1;
  min-width: 200px;
  background: #fff;
  padding: 20px 28px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.popular-list h3 {
  color: #006c3f;
  margin-bottom: 10px;
  font-size: 16px;
}
.popular-list ol {
  padding-left: 22px;
  color: #444;
}
.popular-list li {
  padding: 3px 0;
  font-size: 15px;
}

/* ============ FOOTER ============ */
.site-footer {
  background: #004d2d;
  color: #fff;
  padding: 24px 20px;
  text-align: center;
}
.footer-inner {
  max-width: 900px;
  margin: 0 auto;
}
.footer-inner p {
  font-size: 14px;
  opacity: .85;
  margin-bottom: 10px;
}
.footer-nav a {
  color: #fff;
  margin: 0 12px;
  font-size: 13px;
  opacity: .8;
}
.footer-nav a:hover { opacity: 1; text-decoration: none; }

/* ============ UTILITY ============ */
.hidden { display: none !important; }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .header-inner { height: 54px; }
  .mobile-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 54px;
    left: 0;
    right: 0;
    background: #006c3f;
    padding: 10px 20px 16px;
    flex-direction: column;
    box-shadow: 0 4px 10px rgba(0,0,0,.15);
  }
  .main-nav.open { display: flex; }
  .main-nav a { margin: 6px 0; font-size: 15px; }

  .hero h1 { font-size: 22px; }
  .input-group { flex-direction: column; }

  .summary-row { flex-direction: column; }
  .summary-value { font-size: 26px; }

  .gender-row { gap: 24px; }
  .gender-circle { width: 140px; height: 140px; }
  .gender-count { font-size: 18px; }

  .stat-number { font-size: 28px; }
  .big-result { font-size: 17px; }
  .big-result strong { font-size: 20px; }

  .steps-grid { gap: 10px; }
  .step { min-width: 120px; }
}

@media (max-width: 480px) {
  .hero { padding: 30px 14px 28px; }
  .hero h1 { font-size: 19px; }
  .results { padding: 0 12px 30px; }
  .stat-card { padding: 16px; }
  .popular-names-grid { gap: 16px; }
}


/* Section Lists (personality section) */
.section-list {
  padding-left: 24px;
  margin: 14px 0;
  color: #575760;
}
.section-list li {
  font-size: 15px;
  line-height: 1.7;
  padding: 4px 0;
}

/* ============ NAV ACTIVE STATE ============ */
.nav-active {
  opacity: 1 !important;
  border-bottom: 2px solid #fff;
  padding-bottom: 2px;
}

/* ============ BREADCRUMB ============ */
.breadcrumb {
  max-width: 900px;
  margin: 16px auto 0;
  padding: 0 20px;
  font-size: 14px;
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0;
}
.breadcrumb li::after {
  content: "›";
  margin: 0 6px;
  color: #999;
}
.breadcrumb li:last-child::after {
  content: "";
}
.breadcrumb li:last-child {
  color: #575760;
}
.breadcrumb a {
  color: #006c3f;
}

/* ============ SOCIAL SHARE BUTTONS ============ */
.share-section {
  margin-top: 28px;
  text-align: center;
}
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  padding: 0 10px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  transition: opacity .2s, transform .15s;
  cursor: pointer;
}
.share-btn:hover {
  opacity: .88;
  transform: translateY(-1px);
  text-decoration: none !important;
}
.share-btn svg {
  flex-shrink: 0;
}
.share-facebook  { background: #1877f2; }
.share-twitter   { background: #000; }
.share-linkedin  { background: #0a66c2; }
.share-whatsapp  { background: #25d366; }
.share-email     { background: #6b7280; }

@media (max-width: 480px) {
  .share-btn {
    padding: 8px 14px;
    font-size: 13px;
  }
  .share-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* ============ 404 PAGE ============ */
.error-hero {
  padding: 80px 20px;
}
.error-code {
  font-size: 64px;
  color: #006c3f;
  margin-bottom: 16px;
}
.error-title {
  font-size: 20px;
  margin-bottom: 10px;
}
.error-home-link {
  display: inline-block;
  margin-top: 24px;
  text-decoration: none;
}

/* ============ EXPLORE MORE GRID ============ */
.features-grid .feature {
  text-decoration: none;
}

/* ============ SUBPAGE LAYOUT ============ */
.info-section h1.section-heading {
  font-size: 24px;
}
