/* ==========================================================================
   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: 100;
  width: 100%;
}

.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 .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;
  }
}

/* === CLAUDE.md mandatory visual rules === */

.animate-in, [data-animate] {
  animation: none !important;
  opacity: 1 !important;
}

.bento-cell,
.card, .program-card, .blog-card,
.hero, .page-hero, .bento-page-hero,
.team-card, .testimonial-card,
.contact-card, .info-card, .content-card, .step-card,
.gallery-card, img {
  animation: none !important;
  opacity: 1 !important;
  filter: none !important;
}

/* Bento heroes sit on the light page background (no photo overlay), so
   they need brand-dark text — not the white that other architectures use
   over a dark hero image. Photo cells in bento are separate (hero-image). */
.bento-cell--hero-main h1,
.bento-page-hero h1 {
  color: var(--color-primary, #064e3b);
  text-shadow: none;
}
.bento-cell--hero-main p,
.bento-page-hero p {
  color: var(--color-text, #1f2937);
  text-shadow: none;
}

/* Schedule list - vertical timeline */
.schedule-list {
  list-style: none;
  margin: 1.25rem 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.schedule-list li {
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--color-accent, #f59e0b);
  background: rgba(16, 185, 129, 0.06);
  border-radius: 0 12px 12px 0;
  line-height: 1.6;
  color: var(--color-text, #1f2937);
}
.schedule-list li strong {
  display: inline-block;
  min-width: 5.5em;
  color: var(--color-primary, #047857);
  font-weight: 600;
}

/* Process / admissions narrative numbered list */
.process-list {
  list-style: none;
  counter-reset: step-counter;
  margin: 1.5rem 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.process-list > li {
  counter-increment: step-counter;
  position: relative;
  padding: 1.5rem 1.5rem 1.5rem 5.25rem;
  background: rgba(16, 185, 129, 0.05);
  border-left: 4px solid var(--color-accent, #f59e0b);
  border-radius: 0 16px 16px 0;
}
.process-list > li::before {
  content: counter(step-counter);
  position: absolute;
  left: 1.25rem;
  top: 1.5rem;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-primary, #047857);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.15rem;
}
.process-list > li h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  line-height: 1.3;
}
.process-list > li p {
  margin: 0;
  line-height: 1.7;
}

/* FAQ accordion polish */
.bento-cell--faq {
  background: rgba(16, 185, 129, 0.04);
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 16px;
  margin-bottom: 1rem;
  padding: 1rem 1.75rem;
}
.bento-cell--faq[open] {
  background: var(--color-bg, #ffffff);
  box-shadow: 0 4px 20px rgba(6, 78, 59, 0.08);
}
.bento-cell--faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  padding: 0.75rem 0;
}
.bento-cell--faq summary::-webkit-details-marker { display: none; }
.bento-cell--faq summary::after {
  content: '+';
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-primary, #047857);
  flex-shrink: 0;
}
.bento-cell--faq[open] summary::after { content: '−'; }
.bento-cell--faq summary h3 {
  display: inline;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
}
.bento-cell--faq > p {
  margin: 0.75rem 0 0;
  line-height: 1.7;
  color: var(--color-text-light, #4b5563);
}

/* Testimonial polish for bento */
.bento-cell--testimonial blockquote {
  margin: 0;
}
.bento-cell--testimonial blockquote p {
  font-style: italic;
  line-height: 1.75;
  margin: 0;
}
.bento-cell--testimonial cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-weight: 600;
  color: var(--color-primary, #047857);
}
.bento-cell--testimonial .testimonial-detail {
  display: block;
  margin-top: 0.25rem;
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--color-text-light, #4b5563);
}

/* Team grid: 2-col gives bios room to breathe */
@media (min-width: 768px) {
  .bento-grid--team {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .bento-cell--team-member h3 {
    font-size: 1.2rem;
    line-height: 1.3;
    margin: 0 0 0.25rem;
  }
  .bento-cell--team-member .team-role {
    color: var(--color-accent, #f59e0b);
    font-weight: 600;
    margin: 0 0 0.75rem;
  }
}

/* Constrain content readability */
.bento-cell--content p {
  max-width: 65ch;
}

/* Site-header polish */
.site-header, .bento-header {
  background: var(--color-bg, #ffffff);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Main nav inside the bento header keeps the dark-emerald bar look from
   the style theme, but links need full-white contrast — not the faded
   85%-transparent mix the theme applies to all nav anchors by default. */
.bento-header .nav-list a,
.bento-header .main-nav a {
  white-space: nowrap;
  font-size: 0.85rem;
  color: #ffffff !important;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.bento-header .main-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--color-accent, #f59e0b) !important;
}
.bento-header .main-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.20);
  color: #ffffff !important;
}

/* Phone CTA — visible on the light header strip, pops above the dark nav */
.bento-header .phone-cta {
  color: var(--color-primary, #047857) !important;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  padding: 0.5rem 1rem;
  border: 2px solid var(--color-accent, #f59e0b);
  border-radius: 999px;
  background: #ffffff;
  text-decoration: none;
}
.bento-header .phone-cta:hover {
  background: var(--color-accent, #f59e0b);
  color: #ffffff !important;
}

/* Breadcrumb must NOT inherit the dark-emerald background that the theme
   applies globally to <nav>. Force light bg + readable text. */
.breadcrumb {
  background: transparent !important;
  border-bottom: none !important;
  padding: 1.25rem 2rem;
  max-width: 1400px;
}
.breadcrumb ol {
  color: var(--color-text, #1f2937);
  font-size: 0.875rem;
}
.breadcrumb a {
  color: var(--color-primary, #047857) !important;
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb li[aria-current="page"] {
  color: var(--color-text-light, #4b5563) !important;
}
.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--color-text-light, #9ca3af);
}
