/* ==========================================================================
   04-sidebar-navigation / layout.css
   Layout-only. NO colors, fonts, shadows, border-radius.
   ========================================================================== */

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

/* ---------- Top Bar ---------- */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1001;
  height: 56px;
  background: var(--color-bg, #ffffff);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 1.5rem;
  max-width: 100%;
}

.top-bar-brand { flex-shrink: 0; }

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.sidebar-toggle {
  display: none;
  padding: 0.5rem;
}

.hamburger {
  display: block;
  width: 24px;
  height: 18px;
  position: relative;
}

/* ---------- Sidebar Navigation ---------- */
.sidebar-nav {
  position: fixed;
  top: 56px;
  left: 0;
  width: 260px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  z-index: 1000;
}
.sidebar-nav,
.sidebar-nav a,
.sidebar-nav p,
.sidebar-nav .sidebar-contact,
.sidebar-nav .sidebar-cta p,
.sidebar-nav .submenu-toggle,
.sidebar-submenu a {
  color: rgba(255,255,255,0.9) !important;
}
.sidebar-nav a:hover,
.sidebar-submenu a:hover {
  color: #ffffff !important;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem 0;
}

.sidebar-logo {
  padding: 0;
  display: none;
}

.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.sidebar-item > a,
.sidebar-item > .submenu-toggle {
  display: block;
  width: 100%;
  padding: 0.75rem 1.5rem;
}

.submenu-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  overflow: hidden;
}

.sidebar-submenu.is-open {
  display: block;
}

.sidebar-submenu a {
  display: block;
  padding: 0.5rem 1.5rem 0.5rem 2.5rem;
}

.sidebar-cta {
  padding: 1.5rem;
  margin-top: auto;
}

.sidebar-cta .btn {
  display: block;
  text-align: center;
  font-size: 0.78rem;
  white-space: normal;
  word-break: break-word;
  padding: 0.6rem 0.5rem;
}

.sidebar-contact {
  padding: 0 1.5rem 1rem;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ---------- Content Area ---------- */
.content-area {
  margin-left: 260px;
  margin-top: 56px;
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.content-area main {
  flex: 1;
  max-width: calc(100vw - 260px);
  width: 100%;
  padding: 0 2rem;
  box-sizing: border-box;
}

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

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

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

/* ---------- Two Col ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.col-media img { width: 100%; height: auto; display: block; }

/* ---------- Hero (Homepage) ---------- */
.hero { padding: 2rem 0; }

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-image img { width: 100%; height: auto; display: block; }
.hero-actions { display: flex; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }

/* ---------- Programs Grid ---------- */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 1.5rem 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: 1.5rem 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: 1.5rem; align-items: center; margin: 1.5rem 0; }

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

/* ---------- Blog ---------- */
.blog-listing article { margin-bottom: 2.5rem; padding-bottom: 2.5rem; }
.blog-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-lg, 8px);
  margin-bottom: 1.25rem;
}

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

/* ---------- CTA Banner ---------- */
.cta-banner { padding: 3rem 0; }
.cta-actions { display: flex; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
/* .btn — defined in components.css */
.btn-sm { padding: 0.5rem 1rem; }

/* ---------- Footer ---------- */
.site-footer { width: 100%; margin-top: auto; }
.footer-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding: 3rem 2rem;
}
.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: 0.75rem; flex-wrap: wrap; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding: 1rem 2rem;
}

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

/* ---------- Site Header (compatibility with standard header patterns) ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1001;
  height: 56px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 1.5rem;
  max-width: 100%;
}

/* ---------- Main Navigation (compatibility with standard nav patterns) ---------- */
.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

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

.nav-item {
  position: relative;
  padding: 0 1rem;
}

.nav-item > a {
  display: block;
  padding: 1rem 0;
}

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

.phone-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
}

/* ---------- 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) {
  .two-col, .hero-inner { grid-template-columns: 1fr; }
  .programs-grid { grid-template-columns: 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; }
  .sidebar-toggle { display: block; }

  .nav-list {
    flex-direction: column;
    width: 100%;
  }
  .nav-item {
    padding: 0;
    width: 100%;
  }
  .nav-item > a {
    padding: 0.75rem 0;
  }

  .sidebar-nav {
    left: 0;
    transform: translateX(-100%);
    transition: transform 0.3s;
  }
  .sidebar-nav.is-open {
    transform: translateX(0);
  }

  .content-area {
    margin-left: 0;
  }

  .contact-cards { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; }
}
/* ---------- Heading Spacing ---------- */
.content-section h3, .col-text h3, .sidebar-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.content-section p, .col-text p, .sidebar-content p {
  margin-bottom: 1rem;
}

/* ---------- 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;
}
.breadcrumb, .breadcrumb a, .breadcrumb li {
  color: rgba(255,255,255,0.85) !important;
}
.page-hero {
  animation: none !important;
}

/* ---------- 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, .hero-sub {
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

/* ---------- 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: 220px;
  background-size: cover;
  background-position: center;
}
.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; }

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