/* ==========================================================================
   06-card-grid :: layout.css
   Layout-only properties: display, position, width, height, flex, grid,
   gap, margin, padding, overflow. NO colors, fonts, shadows.
   ========================================================================== */

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

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  padding: 0.5rem 0;
  background: var(--color-bg, #ffffff);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

/* Main Navigation */
.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: block;
  padding: 0.5rem 0.6rem;
  white-space: nowrap;
  font-size: 0.82rem;
}

.logo {
  flex-shrink: 0;
  margin-right: 1.5rem;
}

.header-contact {
  flex-shrink: 0;
  margin-left: 1rem;
}

.header-phone {
  white-space: nowrap;
  font-size: 0.85rem;
  font-weight: 600;
}

/* 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);
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--hero-overlay, linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.55)));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 2rem;
  margin: 0 auto;
  color: var(--color-text-inverse, #FFFFFF);
}

.hero-content h1 {
  color: var(--color-text-inverse, #FFFFFF);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-content p {
  color: var(--color-text-inverse, #FFFFFF);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Page Hero */
.page-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 40vh;
  overflow: hidden;
}

.page-hero-compact {
  min-height: 20vh;
  padding: 4rem 0;
}

.page-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.page-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--hero-overlay, linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.55)));
}

.page-hero .container {
  position: relative;
  z-index: 2;
  color: var(--color-text-inverse, #FFFFFF);
}

.page-hero h1 {
  color: var(--color-text-inverse, #FFFFFF);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.page-hero p {
  color: var(--color-text-inverse, #FFFFFF);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 0;
}

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

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Card Grid Navigation */
.card-nav-section {
  padding: 5rem 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.nav-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nav-card-image {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.nav-card-content {
  padding: 1.5rem;
}

/* Content Card */
.content-card-section {
  padding: 4rem 0;
}

.content-card {
  display: flex;
  overflow: hidden;
}

.content-card-media {
  flex: 0 0 45%;
  min-height: 300px;
  overflow: hidden;
}

.content-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-card-body {
  flex: 1;
  padding: 2.5rem;
}

/* Card Pair */
.card-pair-section {
  padding: 4rem 0;
}

.card-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.info-card {
  padding: 2.5rem;
  overflow: hidden;
}

/* Section Title */
.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  max-width: 700px;
  margin: 0 auto 2rem;
}

/* Why Choose Section */
.why-choose {
  padding: 5rem 0;
}

.why-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

/* Testimonials */
.testimonials {
  padding: 5rem 0;
}

.testimonial-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

/* Program Cards */
.programs-section {
  padding: 4rem 0;
}

.program-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.program-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.program-card-image {
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center;
}

.program-card-body {
  padding: 2rem;
}

/* Substances & Modalities */
.substances-section,
.modalities-section {
  padding: 4rem 0;
}

.substances-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.modalities-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Schedule */
.schedule-section {
  padding: 4rem 0;
}

/* Steps Cards */
.steps-section {
  padding: 4rem 0;
}

.steps-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.step-card {
  padding: 2rem;
  position: relative;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
}

/* Insurance */
.insurance-section {
  padding: 4rem 0;
}

.insurance-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

/* What to Bring */
.bring-section {
  padding: 4rem 0;
}

/* FAQ */
.faq-section {
  padding: 4rem 0;
}

.faq-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Team Section */
.team-section {
  padding: 4rem 0;
}

.team-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

/* Gallery */
.gallery-section {
  padding: 4rem 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-card {
  overflow: hidden;
}

.gallery-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

/* Amenities */
.amenities-section {
  padding: 4rem 0;
}

.amenities-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Contact Cards */
.contact-cards-section {
  padding: 4rem 0;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.contact-cards a {
  word-break: break-all;
}

.contact-card {
  padding: 2rem;
}

/* Form */
.form-section {
  padding: 4rem 0;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
}

/* Map */
.map-section {
  padding: 4rem 0;
}

.map-embed {
  width: 100%;
  min-height: 400px;
  overflow: hidden;
}

.map-embed iframe {
  width: 100%;
  height: 100%;
}

/* Blog Grid */
.blog-section {
  padding: 4rem 0;
}

.blog-card-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Privacy Content */
.privacy-content {
  padding: 4rem 0;
}

/* CTA Section */
.cta-section {
  padding: 5rem 0;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  padding: 3rem 0 2rem;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.footer-social {
  display: flex;
  gap: 1.5rem;
}

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

/* Responsive */

/* ---------- 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) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .why-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .insurance-grid {
    grid-template-columns: repeat(3, 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; }
  .main-nav {
    order: 3;
    width: 100%;
  }
  .main-nav.is-open {
    display: block;
  }
  .nav-list {
    flex-direction: column;
    width: 100%;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .content-card {
    flex-direction: column;
  }
  .content-card-media {
    flex: none;
    min-height: 200px;
  }
  .card-pair {
    grid-template-columns: 1fr;
  }
  .program-cards {
    grid-template-columns: 1fr;
  }
  .why-cards {
    grid-template-columns: 1fr;
  }
  .testimonial-cards {
    grid-template-columns: 1fr;
  }
  .team-cards {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .steps-cards {
    grid-template-columns: 1fr;
  }
  .contact-cards {
    grid-template-columns: 1fr;
  }
  .faq-cards {
    grid-template-columns: 1fr;
  }
  .blog-card-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .substances-grid,
  .modalities-cards,
  .amenities-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .insurance-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero {
    min-height: 60vh;
  }
  .hero-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .substances-grid,
  .modalities-cards,
  .amenities-list,
  .insurance-grid {
    grid-template-columns: 1fr;
  }
}
/* ---------- 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, .content-card { display: flex; flex-direction: column; gap: 1.5rem; }
.two-col-layout .col-media, .content-card-media { order: -1; }
.col-media img, .content-card-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, .team-cards { 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, .contact-card p, .contact-card a,
.sidebar-widget, .testimonial-card, .testimonial-card p,
.team-card, .team-card p, .team-member, .team-member p {
  overflow-wrap: break-word;
  word-break: break-word;
}

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