/* ==========================================================================
   11-bento-grid | layout.css
   Architecture-specific LAYOUT ONLY — no colors, fonts, or visual decoration.
   Apple/Linear-style bento box grid layout.
   ========================================================================== */

/* ---------- Header Layout ---------- */
.bento-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: var(--color-bg, #ffffff);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
@media (prefers-color-scheme: dark) {
  .bento-header {
    background: var(--color-bg, #0f172a);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}
html[data-theme="dark"] .bento-header {
  background: var(--color-bg, #0f172a);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.bento-header .nav-list {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bento-header .nav-list a {
  white-space: nowrap;
}

.bento-header .logo,
.bento-header .site-logo {
  flex-shrink: 0;
}

.bento-header .phone-cta,
.bento-header .header-phone,
.bento-header .header-cta a {
  white-space: nowrap;
  flex-shrink: 0;
}

.bento-header .theme-toggle {
  flex-shrink: 0;
  margin: 0 0.5rem;
}

.bento-header .mobile-toggle {
  display: none;
}

/* ---------- Bento Grid Foundation ---------- */
.bento-grid {
  display: grid;
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---------- Bento Cell Sizes ---------- */
.bento-cell {
  min-height: 200px;
  overflow: hidden;
  position: relative;
}

.bento-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bento-cell--content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
}

.bento-cell--prose {
  display: block;
  padding: 3rem;
}

/* ---------- Hero Grid ---------- */
.bento-grid--hero {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    "hero hero   image image"
    "hero hero   stat1 stat2";
  min-height: 70vh;
}

.bento-cell--hero-main  { grid-area: hero; }
.bento-cell--hero-image { grid-area: image; }
.bento-cell--stat:nth-child(3) { grid-area: stat1; }
.bento-cell--stat:nth-child(4) { grid-area: stat2; }

.bento-cell--stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
}

/* ---------- Page Hero Grid ---------- */
.bento-grid--page-hero {
  grid-template-columns: 2fr 1fr;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.bento-grid--page-hero .bento-cell--full {
  grid-column: 1 / -1;
}

/* ---------- About / Story Grid ---------- */
.bento-grid--about {
  grid-template-columns: 2fr 1fr 1fr;
}

.bento-grid--story {
  grid-template-columns: 1fr 2fr;
}

/* ---------- Mission Grid ---------- */
.bento-grid--mission {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
}

.bento-grid--mission .bento-cell--image {
  grid-column: 1 / -1;
}

/* ---------- Features Grid ---------- */
.bento-grid--features {
  grid-template-columns: repeat(3, 1fr);
}

/* ---------- Programs Grid ---------- */
.bento-grid--programs {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
}

.bento-grid--programs .bento-cell--2x1:first-child {
  grid-column: span 2;
}

.bento-grid--programs .bento-cell--2x1:last-child {
  grid-column: span 2;
}

.bento-grid--programs .bento-cell--program {
  display: flex;
  flex-direction: column;
}

.bento-grid--programs .bento-cell--program img {
  height: 200px;
  flex-shrink: 0;
}

.bento-grid--programs .bento-cell-content {
  padding: 1.5rem;
  flex: 1;
}

/* ---------- Program Detail Grid (inner pages) ---------- */
.bento-grid--program-detail {
  grid-template-columns: 2fr 1fr;
}

/* ---------- Schedule Grid ---------- */
.bento-grid--schedule {
  grid-template-columns: repeat(2, 1fr);
}

/* ---------- Testimonials Grid ---------- */
.bento-grid--testimonials {
  grid-template-columns: repeat(3, 1fr);
}

/* ---------- Insurance Grid ---------- */
.bento-grid--insurance {
  grid-template-columns: 2fr 1fr;
}

/* ---------- Contact Grid ---------- */
.bento-grid--contact {
  grid-template-columns: repeat(2, 1fr);
}

.bento-grid--contact .bento-cell--map {
  grid-column: 1 / -1;
  min-height: 400px;
}

.bento-grid--contact .bento-cell--map .map-embed {
  width: 100%;
  height: 100%;
  min-height: 350px;
}

.bento-grid--contact .bento-cell--map .map-embed iframe {
  width: 100%;
  height: 100%;
}

/* ---------- Blog Grid ---------- */
.bento-grid--blog {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ---------- Admissions Details Grid ---------- */
.bento-grid--admissions-details {
  grid-template-columns: repeat(2, 1fr);
}

/* ---------- FAQ Grid ---------- */
.bento-grid--faq {
  grid-template-columns: 1fr;
  max-width: 900px;
  margin: 0 auto;
}

.bento-cell--faq {
  min-height: auto;
  overflow: visible;
  padding: 1rem 2rem;
}

.bento-cell--faq details {
  width: 100%;
}

.bento-cell--faq summary {
  cursor: pointer;
  padding: 0.75rem 0;
}

.bento-cell--faq details[open] summary {
  margin-bottom: 0.5rem;
}

/* ---------- Privacy Grid ---------- */
.bento-grid--privacy {
  grid-template-columns: 1fr;
  max-width: 900px;
  margin: 0 auto;
}

/* ---------- Team Grid ---------- */
.bento-grid--team {
  grid-template-columns: repeat(3, 1fr);
}

/* ---------- CTA Grid ---------- */
.bento-grid--cta {
  grid-template-columns: 1fr;
}

.bento-cell--full {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 2rem;
}

/* ---------- Section Spacing ---------- */
.bento-section {
  padding: 4rem 0;
}

.bento-hero {
  padding: 2rem 0 4rem;
}

.bento-page-hero {
  padding: 2rem 0;
}

.bento-cta {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  max-width: 1400px;
  margin: 0 auto 2rem;
  padding: 0 2rem;
}

.bento-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.bento-cell--full .bento-actions {
  justify-content: center;
}

/* ---------- Breadcrumb Layout ---------- */
.breadcrumb {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

.breadcrumb ol {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---------- Footer Layout ---------- */
.footer-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
}

.social-links {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 1rem;
}

/* ---------- Skip Nav ---------- */
/* Defined in base.css — no override needed */

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

/* ---------- Responsive: Tablet ---------- */

/* ---------- Mobile Menu Toggle ---------- */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-toggle span,
.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 1024px) {
  .bento-grid--hero {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "hero  hero"
      "image image"
      "stat1 stat2";
    min-height: auto;
  }

  .bento-grid--about {
    grid-template-columns: 1fr 1fr;
  }

  .bento-grid--about .bento-cell--2x1 {
    grid-column: 1 / -1;
  }

  .bento-grid--programs {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-grid--testimonials {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-grid--blog {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-grid--team {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-grid--features {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Responsive: Mobile ---------- */
@media (max-width: 640px) {
  .bento-grid {
    padding: 0 1rem;
  }

  .bento-header .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
  }

  .bento-header .main-nav.is-open {
    display: block;
  }

  .bento-header .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 1rem;
  }

  .bento-header .mobile-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 0.5rem;
  }

  .bento-grid--hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "image"
      "stat1"
      "stat2";
  }

  .bento-grid--page-hero {
    grid-template-columns: 1fr;
  }

  .bento-grid--about,
  .bento-grid--story,
  .bento-grid--mission,
  .bento-grid--programs,
  .bento-grid--program-detail,
  .bento-grid--schedule,
  .bento-grid--testimonials,
  .bento-grid--insurance,
  .bento-grid--contact,
  .bento-grid--blog,
  .bento-grid--admissions-details,
  .bento-grid--team,
  .bento-grid--features {
    grid-template-columns: 1fr;
  }

  .bento-grid--programs .bento-cell--2x1,
  .bento-grid--about .bento-cell--2x1,
  .bento-grid--contact .bento-cell--map,
  .bento-grid--mission .bento-cell--image {
    grid-column: 1;
  }

  .bento-cell {
    min-height: 150px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .bento-actions {
    flex-direction: column;
  }
}
