/* ==========================================================================
   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%;
  background: var(--color-bg, #ffffff);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.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;
  background: var(--color-bg, #ffffff);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.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: 0.75rem 1rem;
  white-space: nowrap;
  font-size: 0.82rem;
}

/* ---------- 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; }
}
/* ---------- Heading Spacing ---------- */
.content-section h3, .col-text h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.content-section p, .col-text p { margin-bottom: 1rem; }

/* ---------- Hero Text ---------- */
.hero-content { color: #ffffff; }
.hero-content h1 { color: #ffffff; text-shadow: 0 2px 12px rgba(0,0,0,0.5); }
.hero-content p { color: rgba(255,255,255,0.92); text-shadow: 0 1px 6px rgba(0,0,0,0.4); }

/* ---------- Page Hero Text ---------- */
.page-hero h1 { color: var(--color-text, #1a1a2e) !important; text-shadow: none !important; }
.page-hero p { color: var(--color-text-light, #555) !important; }
.page-hero { animation: none !important; }

/* ---------- Two-col: image top, text bottom ---------- */
.two-col-layout { display: flex; flex-direction: column; gap: 1.5rem; }
.two-col-layout .col-media { order: -1; }
.col-media img { width: 100%; height: 300px; object-fit: cover; display: block; border-radius: 8px; }

/* ---------- Blog Layout ---------- */
.blog-listing, .blog-list, .blog-card-grid { display: flex; flex-direction: column; gap: 2rem; }
.blog-card { display: flex; flex-direction: column; border: 1px solid var(--color-border, #e0e0e0); border-radius: 12px; overflow: hidden; }
.blog-card-image { width: 100%; height: 250px; overflow: hidden; flex-shrink: 0; }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card-body { padding: 1.5rem; }
.blog-card-body h3 { font-size: 1.15rem; margin: 0.5rem 0 0.75rem; }
.blog-category { font-size: 0.8rem; font-weight: 600; color: var(--color-primary); text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- FAQ Accordion ---------- */
.faq-accordion { display: flex; flex-direction: column; gap: 1rem; max-width: 800px; margin: 2rem auto 0; }
.faq-item { border: 1px solid var(--color-border, #e0e0e0); border-radius: 8px; overflow: hidden; }
.faq-item summary { padding: 1.25rem 1.5rem; font-weight: 600; font-size: 1.05rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.4rem; font-weight: 300; color: var(--color-primary); flex-shrink: 0; margin-left: 1rem; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 1.5rem 1.25rem; line-height: 1.7; }

/* ---------- Team Grid ---------- */
.team-grid { display: flex; flex-direction: column; gap: 1.5rem; }

/* ---------- Footer Spacing ---------- */
.footer-nav h3, .footer-brand h3 { margin-bottom: 1rem; font-size: 1rem; }
.footer-brand p { margin-top: 0.75rem; line-height: 1.6; }

/* ---------- Contact word break ---------- */
.contact-card, .sidebar-widget { overflow-wrap: break-word; word-break: break-word; }

/* ---------- No scroll animations ---------- */
.animate-in, [data-animate] { animation: none !important; opacity: 1 !important; transform: none !important; }
