/* ===============================
   Global base styles
   =============================== */

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f3f4f6; /* light grey like mortgage page */
  color: #111827;
  line-height: 1.6;
}

/* Utility */

a {
  text-decoration: none;
  color: inherit;
}

a:hover {
  color: #0f766e;
}

img {
  max-width: 100%;
  display: block;
}

.no-scroll {
  overflow: hidden;
}

/* Layout container */

.page-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* ===============================
   HEADER (aligned with mortgage style)
   =============================== */

.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 60;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Brand */

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 44px;
  height: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #111827;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: #6b7280;
}

/* Desktop nav */

.desktop-nav .nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
}

.nav-link {
  font-size: 0.95rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  color: #111827;
  transition: background-color 0.15s ease, color 0.15s ease;
  border: 1px solid transparent;
}

.nav-link:hover {
  background-color: #ecfdf3;
  color: #15803d;
  border-color: #bbf7d0;
}

.nav-more {
  position: relative;
}

.nav-more-toggle {
  cursor: pointer;
  background: transparent;
}

/* "More" dropdown */

.desktop-more-dropdown {
  position: absolute;
  top: 110%;
  right: 0;
  background-color: #ffffff;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
  padding: 0.35rem 0;
  min-width: 230px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 70;
}

.desktop-more-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  color: #111827;
}

.dropdown-link:hover {
  background-color: #f3f4f6;
  color: #16a34a;
}

/* Mobile hamburger button */

.mobile-menu-btn {
  display: none;
  background-color: #16a34a; /* green like mortgage primary */
  color: #ffffff;
  border: none;
  padding: 0.45rem 0.8rem;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.mobile-menu-btn:hover {
  background-color: #15803d;
}

/* Mobile overlay */

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 40;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile slide-down menu (green) */

.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #166534; /* dark green */
  color: #f9fafb;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-out;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
  z-index: 50;
}

.mobile-menu.open {
  max-height: 360px; /* slide-down effect */
}

.mobile-menu-list {
  list-style: none;
  padding: 0.75rem 1rem 1rem;
  margin: 0;
}

.mobile-menu-list li + li {
  margin-top: 0.35rem;
}

.mobile-menu-list a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.4rem;
  font-size: 0.95rem;
  color: #f9fafb;
}

.mobile-menu-list a:hover {
  background-color: rgba(22, 163, 74, 0.4);
}

/* Desktop vs mobile visibility */

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (min-width: 769px) {
  .mobile-menu {
    display: none;
  }
}

/* ===============================
   Hero section
   =============================== */

.hero-section {
  padding: 1.75rem 0 1.25rem;
}

.hero-inner {
  text-align: center;
}

.hero-icon {
  font-size: 2.2rem;
  margin-bottom: 0.25rem;
}

.hero-title {
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0.25rem 0 0.5rem;
  color: #111827;
}

.hero-subtitle {
  margin: 0;
  font-size: 0.98rem;
  color: #4b5563;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

/* ===============================
   Calculator sections and cards
   =============================== */

.calculator-section {
  margin-top: 1.5rem;
}

.calculator-card {
  background-color: #ffffff;
  border-radius: 0.9rem;
  padding: 1.5rem 1.4rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
}

.calculator-section + .calculator-section .calculator-card {
  margin-top: 1rem;
}

.calculator-card h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
  color: #111827;
}

.section-intro {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: #4b5563;
}

/* Forms */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  margin-top: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.92rem;
  color: #111827;
}

.form-group input[type="date"] {
  padding: 0.5rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
}

.form-group small {
  font-size: 0.8rem;
  color: #6b7280;
}

.form-group input[type="date"]:focus {
  outline: 2px solid #16a34a;
  outline-offset: 1px;
  border-color: #16a34a;
}

/* Buttons */

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-size: 0.95rem;
  cursor: pointer;
  border-width: 1px;
  border-style: solid;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
}

/* Primary = green */

.btn-primary {
  background-color: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
  font-weight: 600;
}

.btn-primary:hover {
  background-color: #15803d;
  border-color: #15803d;
}

/* Secondary = outline */

.btn-secondary {
  background-color: #ffffff;
  border-color: #d1d5db;
  color: #111827;
}

.btn-secondary:hover {
  border-color: #16a34a;
  color: #16a34a;
}

/* ===============================
   Age results
   =============================== */

.results-card {
  margin-top: 1.25rem;
}

.age-summary {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.age-number {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.age-years {
  font-size: 2.4rem;
  font-weight: 700;
  color: #16a34a;
}

.age-years-label {
  font-size: 1.1rem;
  color: #374151;
}

.age-detail {
  margin: 0;
  font-size: 0.98rem;
  color: #374151;
}

/* Age units grid */

.age-units-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.age-unit {
  background-color: #f9fafb;
  border-radius: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #e5e7eb;
}

.age-unit h3 {
  margin: 0 0 0.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #374151;
}

.age-unit p {
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
  color: #111827;
}

/* Birthday info */

.birthday-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.birthday-item {
  background-color: #ecfdf3;
  border-radius: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #bbf7d0;
}

.birthday-item h3 {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #166534;
}

.birthday-item p {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

/* Download buttons */

.download-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ===============================
   Body age & mental age quiz
   =============================== */

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  margin-top: 1rem;
}

.quiz-group {
  background-color: #f9fafb;
  border-radius: 0.75rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid #e5e7eb;
}

.quiz-group h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: #111827;
}

.quiz-group label {
  display: block;
  font-size: 0.88rem;
  color: #4b5563;
  margin-top: 0.25rem;
  cursor: pointer;
}

.quiz-group input[type="radio"] {
  margin-right: 0.35rem;
}

/* Result callout */

.result-callout {
  margin-top: 1rem;
  background-color: #ecfdf3;
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid #bbf7d0;
}

.result-callout h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: #166534;
}

.result-number {
  margin: 0 0 0.3rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #14532d;
}

.result-message {
  margin: 0;
  font-size: 0.92rem;
  color: #374151;
}

/* ===============================
   SEO text section
   =============================== */

.text-section {
  margin-top: 1.75rem;
}

.text-card {
  background-color: #ffffff;
  border-radius: 0.9rem;
  padding: 1.4rem 1.4rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.text-card h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.text-card h3 {
  margin-top: 1rem;
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.text-card p {
  margin: 0.35rem 0;
  font-size: 0.95rem;
  color: #4b5563;
}

.text-card ul {
  margin: 0.35rem 0 0.75rem 1.2rem;
  padding: 0;
  font-size: 0.95rem;
  color: #4b5563;
}

.text-card li {
  margin-bottom: 0.25rem;
}

/* ===============================
   FAQ section
   =============================== */

.faq-section {
  margin-top: 1.75rem;
}

.faq-card {
  background-color: #ffffff;
  border-radius: 0.9rem;
  padding: 1.4rem 1.4rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.faq-card h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
}

.faq-item {
  border-radius: 0.6rem;
  border: 1px solid #e5e7eb;
  padding: 0.6rem 0.9rem;
  background-color: #f9fafb;
  margin-bottom: 0.5rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: #111827;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: #4b5563;
}

/* ===============================
   FOOTER (aligned with mortgage style)
   =============================== */

.site-footer {
  background-color: #020617; /* very dark navy */
  color: #e5e7eb;
  margin-top: 2.5rem;
  padding: 2.5rem 1rem 1rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem;
}

.footer-column h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 0.98rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #e5e7eb;
}

.footer-about p {
  margin: 0;
  font-size: 0.9rem;
  color: #9ca3af;
}

.footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-column li + li {
  margin-top: 0.3rem;
}

.footer-column a {
  font-size: 0.9rem;
  color: #d1d5db;
}

.footer-column a:hover {
  color: #22c55e;
}

/* Bottom line */

.footer-bottom {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  padding-top: 0.9rem;
  border-top: 1px solid #1f2937;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.82rem;
  color: #9ca3af;
}

/* ===============================
   Responsive adjustments
   =============================== */

@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quiz-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-main {
    padding: 1.25rem 0.75rem 2.5rem;
  }

  .hero-title {
    font-size: 1.45rem;
  }

  .calculator-card {
    padding: 1.25rem 1.1rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .age-units-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .birthday-info {
    grid-template-columns: 1fr;
  }

  .quiz-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .age-units-grid {
    grid-template-columns: 1fr;
  }
}
