/* ==========================================================================
   05-tab-based / layout.css
   Layout-only. NO colors, fonts, shadows, border-radius.
   ========================================================================== */

/* .skip-nav — defined in base.css */

/* ---------- Container ---------- */
/* Defined in base.css with var(--container-max) — no override needed */

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1001;
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 70px;
}

.logo { flex-shrink: 0; }

.header-contact {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
}
.mobile-menu-toggle span { display: block; width: 22px; height: 2px; }

/* ---------- Tab Bar (page navigation) ---------- */
.tab-bar {
  position: sticky;
  top: 70px;
  z-index: 1000;
  width: 100%;
  overflow-x: auto;
}

.tab-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.tab-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.tab {
  display: block;
  padding: 1rem 1.5rem;
  white-space: nowrap;
}

/* ---------- Content Tabs (within page) ---------- */
.tabbed-content {
  width: 100%;
}

.content-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.content-tab {
  padding: 0.875rem 1.5rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- Tab Panels ---------- */
.tab-panels {
  width: 100%;
}

.tab-panel {
  padding: 2.5rem 0;
}

.tab-panel[hidden] {
  display: none;
}

.tab-panel img {
  width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem 0;
}

/* ---------- Accordion (mobile conversion) ---------- */
.accordion-trigger {
  display: none;
  width: 100%;
  padding: 1rem 1.5rem;
}

.accordion-content {
  display: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  width: 100%;
  min-height: 500px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  width: 100%;
}

.hero-content { max-width: 600px; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; overflow: hidden; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-actions { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }

/* ---------- Page Hero ---------- */
.page-hero { padding: 2.5rem 0; }

/* ---------- Content Section ---------- */
.content-section { padding: 3rem 0; }

/* ---------- Two Col ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.col-media img { width: 100%; height: auto; display: block; }

/* ---------- Programs Grid ---------- */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin: 2rem 0;
}
.program-card { overflow: hidden; }
.program-card img { width: 100%; height: auto; display: block; }

/* ---------- Gallery Grid ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
.gallery-grid img { width: 100%; height: auto; display: block; }

/* ---------- Contact Cards ---------- */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}
.contact-card { padding: 1.25rem; }

/* ---------- Map ---------- */
.map-embed { width: 100%; height: 400px; overflow: hidden; margin: 1.5rem 0; }
.map-embed iframe { width: 100%; height: 100%; display: block; }

/* ---------- Insurance ---------- */
.insurance-logos { display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; justify-content: center; margin: 2rem 0; }

/* ---------- Process Steps ---------- */
.process-steps { padding-left: 1.5rem; margin: 2rem 0; }
.process-steps li { margin-bottom: 1.5rem; }

/* ---------- Blog ---------- */
.blog-listing article { margin-bottom: 2.5rem; padding-bottom: 2.5rem; }

/* ---------- Privacy ---------- */
.privacy-content section { margin-bottom: 2rem; }

/* ---------- CTA Banner ---------- */
.cta-banner { padding: 4rem 0; width: 100%; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
/* .btn — defined in components.css */
/* .btn-large — defined in components.css */

/* ---------- Footer ---------- */
.site-footer { width: 100%; }
.footer-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { padding: 0.25rem 0; }
.social-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ---------- Screen Reader ---------- */
/* .sr-only — defined in base.css */

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .two-col { grid-template-columns: 1fr; }
  .programs-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .mega-nav:not(.is-mobile-open), .main-nav:not(.is-open) { display: none; }
  .mega-nav.is-mobile-open, .main-nav.is-open { display: block; width: 100%; }
  .mobile-menu-toggle { display: flex; }
  .tab-bar { top: 60px; }
  .header-inner { height: 60px; }

  /* Tabs convert to accordion on mobile */
  .content-tabs { display: none; }
  .accordion-trigger { display: block; }
  .accordion-content.is-open { display: block; }
  .tab-panel { display: none; }
  .tab-panel.active { display: block; }

  .hero { min-height: 350px; }
  .contact-cards { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; }
}