/* ========================================
   COMPONENTS — Shared UI across all pages
   ======================================== */

/* ========== SKIP LINK ========== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--sage-dark);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  z-index: 9999;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 8px; color: white; }

/* ========== THE PATH LINE ========== */
.path-line {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 20px 0;
  overflow: hidden;
}

.path-line::after {
  content: '';
  display: block;
  width: 2px;
  height: 80px;
  background: linear-gradient(to bottom, var(--sage), var(--lilac));
  border-radius: 2px;
}

.path-line-long::after { height: 120px; }

.path-line--horizontal,
.path-horizontal {
  width: 60px;
  height: 2px;
  background: linear-gradient(to right, var(--sage), var(--lilac));
  border-radius: 2px;
  margin: 0 auto;
}

/* ========== NAVIGATION (BEM) ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(253, 251, 247, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--sage-dark);
  letter-spacing: -0.01em;
}

.nav__logo span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--sage), var(--lilac));
  border-radius: 2px;
  transition: width var(--transition);
}

.nav__links a:hover::after,
.nav__links a.active::after { width: 100%; }
.nav__links a.active { color: var(--sage-dark); }

.nav__links .nav__cta {
  background: var(--sage);
  color: white;
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition);
}

.nav__links .nav__cta::after { display: none; }
.nav__links .nav__cta:hover {
  background: var(--sage-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ---- Services dropdown ---- */
.nav__dropdown {
  position: relative;
}

.nav__dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav__dropdown-arrow {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--text-secondary);
  border-bottom: 1.5px solid var(--text-secondary);
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.nav__dropdown:hover .nav__dropdown-arrow,
.nav__dropdown.open .nav__dropdown-arrow {
  transform: rotate(-135deg) translateY(-2px);
}

.nav__dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  background: rgba(253, 251, 247, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 8px 0;
  list-style: none;
  z-index: 100;
}

.nav__dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.nav__dropdown:hover .nav__dropdown-menu {
  display: block;
}

.nav__dropdown-menu li { margin: 0; }

.nav__dropdown-menu a {
  display: block;
  padding: 8px 20px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition);
}

.nav__dropdown-menu a::after { display: none; }

.nav__dropdown-menu a:hover {
  background: rgba(139, 158, 107, 0.08);
  color: var(--sage-dark);
}

.nav__dropdown-menu a.active {
  color: var(--sage-dark);
  font-weight: 600;
}

/* Mobile chevron toggle */
.nav__dropdown-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  margin-left: 4px;
}

.nav__dropdown-toggle svg {
  width: 14px;
  height: 14px;
  stroke: var(--text-secondary);
  transition: transform var(--transition);
}

.nav__dropdown.open .nav__dropdown-toggle svg {
  transform: rotate(180deg);
}

/* Mobile hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary { background: var(--sage); color: white; }
.btn-primary:hover {
  background: var(--sage-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--sage-dark);
  border: 2px solid var(--sage);
}
.btn-secondary:hover {
  background: var(--sage);
  color: white;
  transform: translateY(-2px);
}

/* ========== WAVE DIVIDER ========== */
.wave-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin: -1px 0;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: 60px;
}

.wave-divider-flip { transform: scaleY(-1); }

/* ========== PAGE HERO (shared by all sub-pages) ========== */
.page-hero {
  padding: 150px 0 60px;
  text-align: center;
  position: relative;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(139, 158, 107, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(180, 167, 214, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.page-hero h1 { max-width: 750px; margin: 0 auto 20px; }
.page-hero .section-label { margin-bottom: 12px; }
.page-hero .page-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
}

/* ========== CTA BANNER ========== */
.cta-banner {
  padding: 80px 0;
  text-align: center;
  position: relative;
}

.cta-banner h2 { margin-bottom: 16px; }

.cta-banner p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 32px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== FOOTER CRISIS ROW ========== */
.footer__crisis {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.38);
}

.footer__crisis-label {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-right: 12px;
}

.footer__crisis-option {
  padding: 4px 0;
}

.footer__crisis-option + .footer__crisis-option::before {
  content: "|";
  margin: 0 10px;
  color: rgba(255, 255, 255, 0.2);
}

.footer__crisis a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color var(--transition);
}

.footer__crisis a:hover {
  color: var(--sage-light);
}

/* ========== FOOTER (BEM) ========== */
.footer {
  background: var(--text-primary);
  color: rgba(255, 255, 255, 0.7);
  padding: 20px 0 14px;
}

.footer__grid {
  display: flex;
  align-items: start;
  gap: 48px;
  width: fit-content;
  margin: 0 auto 14px;
  text-align: left;
}

.footer__grid > :last-child {
  padding-left: 48px;
  position: relative;
}

.footer__grid > :last-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 25%;
  height: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.footer__brand {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
}

.footer__brand span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.footer p { font-size: 0.82rem; line-height: 1.4; margin-bottom: 0; }

.footer h4 {
  font-size: 0.82rem;
  color: white;
  margin-bottom: 6px;
  font-weight: 600;
  text-align: left;
}

.footer ul { list-style: none; }
.footer ul li { margin-bottom: 2px; }
.footer ul a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
  transition: color var(--transition);
}
.footer ul a:hover { color: var(--sage-light); }

.footer__contact-item {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
  font-size: 0.82rem;
}
.footer__contact-item--top {
  align-items: flex-start;
}
.footer__contact-item svg {
  flex-shrink: 0;
  opacity: 0.7;
  width: 13px;
  height: 13px;
  display: block;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

/* ========== SCROLL REVEAL ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ========== RESPONSIVE — Shared ========== */
@media (max-width: 900px) {
  .footer__grid { gap: 24px; }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(253, 251, 247, 0.98);
    backdrop-filter: blur(20px);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
  }
  .nav__toggle { display: flex; }

  /* Dropdown: mobile overrides */
  .nav__dropdown-arrow { display: none; }

  .nav__dropdown {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .nav__dropdown-trigger {
    gap: 0;
  }

  .nav__dropdown-toggle {
    display: inline-flex;
    align-items: center;
  }

  .nav__dropdown:hover .nav__dropdown-menu { display: none; }

  .nav__dropdown-menu {
    position: static;
    transform: none;
    min-width: 0;
    width: 100%;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 4px 0 0 16px;
  }

  .nav__dropdown-menu::before { display: none; }

  .nav__dropdown.open .nav__dropdown-menu {
    display: block;
  }

  .nav__dropdown-menu a {
    padding: 6px 0;
    font-size: 0.88rem;
  }

  .nav__dropdown-menu a:hover {
    background: transparent;
  }

  .page-hero { padding: 130px 0 40px; }

  .footer__grid { flex-direction: column; gap: 16px; width: auto; }
  .footer__grid > :last-child { padding-left: 0; }
  .footer__grid > :last-child::before { display: none; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
}
