/* ═══════════════════════════════════════════════════
   RunPractice — layout.css
   Navigation, dropdowns, mobile menu, footer
   Mobile-first: base = mobile, min-width scales up
   ═══════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════════ */

.rp-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.rp-nav.scrolled {
  border-color: var(--border);
  background: rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(12px);
}

/* Logo */
.nav-logo {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--white);
  text-decoration: none;
  z-index: 201;
}
.nav-logo span { color: var(--lime); }

/* Desktop links — hidden on mobile */
.nav-links {
  display: none;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links > li { position: relative; }
.nav-links a,
.nav-links button {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-links a:hover,
.nav-links button:hover,
.nav-links a.active { color: var(--white); }

/* Login link */
.nav-login {
  font-size: 11px !important;
  opacity: 0.5;
  transition: opacity 0.2s, color 0.2s;
}
.nav-login:hover { opacity: 1; }

/* CTA button in nav */
.nav-cta {
  background: var(--lime) !important;
  color: var(--black) !important;
  padding: 10px 22px !important;
  font-weight: 700 !important;
  font-family: var(--mono) !important;
  font-size: 12px !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}
.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(200, 241, 53, 0.25);
}

/* ── DROPDOWN TRIGGER ── */
.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
}
.nav-dropdown-arrow {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--muted);
  transition: transform 0.3s, border-color 0.2s;
}
.nav-dropdown-trigger:hover .nav-dropdown-arrow { border-top-color: var(--white); }

/* ── DROPDOWN PANEL ── */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(15, 15, 15, 0.97);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  min-width: 260px;
  padding: 12px 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  pointer-events: none;
}
/* Hover bridge */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
}
/* Show on hover */
li:hover > .nav-dropdown,
.nav-dropdown-trigger:hover + .nav-dropdown,
.nav-dropdown:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Dropdown links */
.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.nav-dropdown a:hover {
  background: rgba(200, 241, 53, 0.06);
  color: var(--white);
}

/* Dropdown icons & extras */
.nav-dropdown-icon {
  font-size: 14px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.nav-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}
.nav-dropdown-tier {
  padding: 8px 24px 4px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lime);
  opacity: 0.6;
}
.dropdown-view-all {
  color: var(--lime) !important;
  font-weight: 600 !important;
  margin-top: 4px;
}

/* Wide dropdown (for Services / Who We Serve) */
.nav-dropdown--wide { min-width: 320px; }
.nav-dropdown--specialties { min-width: 280px; }

/* ══════════════════════════════════════════════════
   HAMBURGER BUTTON
   ══════════════════════════════════════════════════ */

.nav-hamburger {
  display: flex;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
  z-index: 201;
  position: relative;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════════════════════════════════════
   MOBILE NAV OVERLAY
   ══════════════════════════════════════════════════ */

.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(8, 8, 8, 0.98);
  backdrop-filter: blur(16px);
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 0;
  padding: 80px 16px 40px;
  overflow-y: auto;
}
.mobile-nav-overlay.open { display: flex; }

/* Mobile nav links */
.mobile-nav-overlay a {
  font-family: var(--sans);
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 16px 24px;
  min-height: 48px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
  width: 100%;
  justify-content: center;
}
.mobile-nav-overlay a:hover,
.mobile-nav-overlay a:active { color: var(--white); }

/* Mobile CTA */
.mobile-nav-overlay a.nav-cta-mobile {
  background: var(--lime);
  color: var(--black);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.1em;
  margin-top: 16px;
  padding: 16px 32px;
}

/* Mobile login link */
.mobile-nav-overlay a.mobile-login {
  font-size: 12px;
  opacity: 0.4;
  margin-top: 8px;
}

/* Mobile accordion toggles */
.mobile-accordion-toggle {
  font-family: var(--sans);
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: none;
  padding: 16px 24px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  transition: color 0.2s;
}
.mobile-accordion-toggle:hover { color: var(--white); }
.mobile-accordion-toggle .arrow {
  font-size: 10px;
  transition: transform 0.3s;
}
.mobile-accordion-toggle.open .arrow { transform: rotate(180deg); }

/* Mobile sub-links */
.mobile-accordion-sub {
  display: none;
  flex-direction: column;
  gap: 0;
  width: 100%;
  align-items: center;
}
.mobile-accordion-sub.open { display: flex; }
.mobile-accordion-sub a {
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 10px 24px;
  min-height: 40px;
  opacity: 0.7;
}
.mobile-accordion-sub a:hover { opacity: 1; color: var(--lime); }

/* Mobile tier labels */
.mobile-tier-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lime);
  opacity: 0.5;
  padding: 12px 24px 4px;
  width: 100%;
  text-align: center;
}

/* ══════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════ */

.rp-footer {
  border-top: 1px solid var(--border);
  background: var(--black);
  padding: 48px 16px;
}

/* Footer columns */
.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.footer-col-title {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }

/* Mobile: accordion footer columns */
.footer-col-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  cursor: pointer;
}
.footer-col-toggle .footer-col-title { margin-bottom: 0; }
.footer-col-toggle .arrow {
  font-size: 10px;
  color: var(--muted);
  transition: transform 0.3s;
}
.footer-col-toggle.open .arrow { transform: rotate(180deg); }

.footer-col-body {
  display: none;
  padding: 12px 0 8px;
}
.footer-col-body.open { display: block; }

/* Footer bottom bar */
.footer-bottom {
  max-width: 1400px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.footer-bottom-logo {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--white);
  text-decoration: none;
}
.footer-bottom-logo span { color: var(--lime); }
.footer-bottom-email {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-bottom-email:hover { color: var(--lime); }
.footer-bottom-copy {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  opacity: 0.5;
}

/* ══════════════════════════════════════════════════
   TABLET (768px+)
   ══════════════════════════════════════════════════ */

@media (min-width: 768px) {
  .rp-nav { padding: 20px 32px; }
  .mobile-nav-overlay { padding: 80px 32px 40px; }

  /* Footer: 2 columns */
  .rp-footer { padding: 64px 32px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }

  /* Show footer columns on tablet (no accordion) */
  .footer-col-toggle { display: none; }
  .footer-col-body { display: block; padding: 0; }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ══════════════════════════════════════════════════
   DESKTOP (1100px+)
   ══════════════════════════════════════════════════ */

@media (min-width: 1100px) {
  .rp-nav { padding: 22px 48px; gap: 24px; }

  /* Show desktop nav, hide hamburger */
  .nav-links { display: flex; }
  .nav-hamburger { display: none; }

  /* Footer: 4 columns */
  .rp-footer { padding: 80px 48px; }
  .footer-grid { grid-template-columns: repeat(4, 1fr); gap: 48px; }
}
