/* =====================================================================
   Align Health Centre — theme.css
   Global design system ported from the design handoff (v2, 11-page).
   Palette "Align" (coral/teal). Fonts self-hosted in fonts.css.
   Responsive: house breakpoints 1160 (tablet) / 800 (mobile).
   The prototype's dead `style-hover=""` attrs are reimplemented here as
   real `.al-*:hover` component classes.
   ===================================================================== */

:root {
  --accent: #EE6C6C;      /* coral  */
  --accentDeep: #1E5A6B;  /* teal   */
  --accentSoft: #E6EFF1;  /* tint   */
  --page: #FBF6EE;        /* cream  */
}

/* ---- reset / base (from handoff) ---- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Mulish', system-ui, sans-serif;
  color: #2D2620;
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
::selection { background: #E7C8B6; }
@keyframes floatSoft { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* page shell */
.page-root { position: relative; overflow-x: clip; background: var(--page); }

/* accessibility: skip link + screen-reader-only */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: #fff; color: var(--accentDeep); font-weight: 700;
  padding: 12px 20px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---- desktop nav dropdowns ---- */
.nav-dd { position: relative; }
.nav-dd-menu {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(6px);
  padding-top: 14px; opacity: 0; visibility: hidden;
  transition: opacity .18s ease, transform .18s ease; pointer-events: none;
}
.nav-dd:hover > a { color: var(--accent); }
.nav-dd:hover .nav-dd-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); pointer-events: auto; }

/* ---- hamburger + mobile panel (hidden on desktop) ---- */
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 0; }
.nav-burger span { display: block; width: 24px; height: 2px; background: #2D2620; border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-panel { display: none; }
.nav-panel.open { display: block; }
.np-row svg { transition: transform .2s ease; }
.np-row.open svg { transform: rotate(180deg); }

/* =====================================================================
   Hover component classes (replace prototype `style-hover`)
   Base geometry stays inline in the markup; these add the hover only.
   ===================================================================== */
.al-navlink { transition: color .2s; }
.al-navlink:hover { color: var(--accent); }

.al-ddi { transition: background .15s, color .15s; }
.al-ddi:hover { background: var(--accentSoft); color: var(--accentDeep); }

.al-btn-primary { transition: background .2s, transform .2s; }
.al-btn-primary:hover { background: var(--accentDeep); transform: translateY(-2px); }

.al-btn-book { transition: background .2s, transform .2s; }
.al-btn-book:hover { background: var(--accentDeep); transform: translateY(-1px); }

.al-btn-outline { transition: border-color .2s, transform .2s; }
.al-btn-outline:hover { border-color: var(--accent); transform: translateY(-2px); }

.al-btn-lift { transition: transform .2s, background .2s; }
.al-btn-lift:hover { transform: translateY(-2px); }

.al-card-svc { transition: box-shadow .25s, transform .25s; }
.al-card-svc:hover { box-shadow: 0 22px 46px rgba(74,52,32,.13); transform: translateY(-4px); }

.al-foot-link { transition: color .2s; }
.al-foot-link:hover { color: #fff; }

.al-social { transition: background .2s, color .2s, border-color .2s; }
.al-social:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* =====================================================================
   RESPONSIVE — house standard: tablet <=1160, mobile <=800
   (ported verbatim from the handoff's shared <style> system)
   ===================================================================== */
@media (max-width: 1160px) {
  .hd-h1 { font-size: 54px !important; }
  .hd-h2 { font-size: 40px !important; }
  .hd-h2c { font-size: 38px !important; }
  .hd-h2s { font-size: 36px !important; }
  .wave-svg { width: 1160px !important; margin-left: 50%; transform: translateX(-50%); }
  .ribbon-svg { width: 1160px !important; margin-left: 50%; transform: translateX(-50%); }
  .wrap { max-width: 1064px !important; padding-left: 20px !important; padding-right: 20px !important; }
  .nav-center { display: none !important; }
  .nav-cta { display: none !important; }
  .nav-burger { display: inline-flex !important; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 44px; height: 44px; margin-left: auto; }
  .nav-panel { display: block !important; overflow: hidden; max-height: 0; padding-top: 0 !important; padding-bottom: 0 !important; border-top-width: 0 !important; transition: max-height .4s cubic-bezier(.4,0,.2,1), padding .4s cubic-bezier(.4,0,.2,1), border-width .4s; }
  .nav-panel.open { max-height: 900px; padding-top: 6px !important; padding-bottom: 20px !important; border-top-width: 1px !important; }
  .hero-section { display: flex !important; flex-direction: column; }
  .hero-copy-wrap { display: block !important; min-height: 0 !important; padding-top: 64px !important; padding-bottom: 24px !important; }
  .hero-media { position: relative !important; width: 100% !important; max-width: 1064px; margin: 8px auto 0; padding: 0 20px; box-sizing: border-box; order: 2; }
  .hero-img { height: 360px !important; border-radius: 24px !important; object-position: center !important; box-shadow: none !important; }
  .hero-badge-1 { left: 12px !important; }
  .hero-badge-2 { left: 12px !important; }
  .hero-badge { max-width: calc(100% - 24px); box-sizing: border-box; }
  .hero-copy { max-width: none !important; }
  .about-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
  .about-media { order: 2; }
  .grid-4 { grid-template-columns: repeat(3, 1fr) !important; }
  .team-photo { max-width: 300px; margin-left: auto; margin-right: auto; }
  .grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
  .footer-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (min-width: 801px) and (max-width: 1160px) {
  .hero-media { margin-bottom: 44px !important; }
}
@media (max-width: 800px) {
  .hd-h1 { font-size: 42px !important; }
  .hd-h2 { font-size: 33px !important; }
  .hd-h2c { font-size: 32px !important; }
  .hd-h2s { font-size: 31px !important; }
  .wrap { max-width: 795px !important; padding-left: 14px !important; padding-right: 14px !important; }
  .sec { padding-top: 60px !important; padding-bottom: 60px !important; }
  .ribbon-svg { height: 60px !important; }
  .about-grid { padding-top: 30px !important; padding-bottom: 120px !important; }
  .pad-edge { padding-top: 82px !important; padding-bottom: 82px !important; }
  .team-lead { white-space: normal !important; }
  .grid-4, .grid-3, .grid-2, .footer-grid { grid-template-columns: 1fr !important; }
  .hero-copy-wrap { padding-top: 64px !important; padding-bottom: 24px !important; }
}

/* =====================================================================
   SUBPAGE STYLES (Phase 2). Colliding helper classes from the handoff
   (.snap-*, .r-split, .r-cards-*) are SCOPED under each page's
   `align-{slug}` body class (added via align_body_class() in functions.php)
   so pages that size them differently never clash. Uniquely-named classes
   (.al-*, .blog-*) stay global.
   ===================================================================== */

/* ---- shared blog-article grid (insulin + neighbours, identical) ---- */
.blog-grid { max-width: 1180px; }
@media (max-width: 900px) {
  .blog-grid { grid-template-columns: 1fr !important; }
  .blog-aside { position: static !important; }
}

/* ---- unique hover / component classes (global, no collision) ---- */
.al-card-post { transition: box-shadow .25s, transform .25s; }
.al-card-post:hover { box-shadow: 0 24px 50px rgba(74,52,32,.14); transform: translateY(-4px); }
.al-card-doc { transition: box-shadow .25s, transform .25s; }
.al-card-doc:hover { box-shadow: 0 22px 46px rgba(74,52,32,.13); transform: translateY(-3px); }
.al-c-chip { transition: border-color .2s, color .2s, transform .2s; }
.al-c-chip:hover { border-color: var(--accent); color: var(--accentDeep); transform: translateY(-1px); }
.al-c-tmcard { transition: transform .22s ease, box-shadow .22s ease; }
.al-c-tmcard:hover { transform: translateY(-5px); box-shadow: 0 22px 48px rgba(74,52,32,.16); }
.al-c-profile { transition: gap .2s ease; }
.al-c-profile:hover { gap: 11px; }
.al-c-jane { transition: background .2s, color .2s, border-color .2s; }
.al-c-jane:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.al-c-send { transition: background .2s, transform .2s; }
.al-c-send:hover { background: var(--accentDeep); transform: translateY(-2px); }
.al-c-review { transition: box-shadow .2s, transform .2s; }
.al-c-review:hover { box-shadow: 0 10px 22px rgba(74,52,32,.1); transform: translateY(-1px); }
.al-c-backlink, .al-blog-back { transition: color .2s; }
.al-c-backlink:hover, .al-blog-back:hover { color: var(--accent); }
.al-c-callback, .al-blog-callink { transition: color .2s; }
.al-c-callback:hover, .al-blog-callink:hover { color: #fff; }
.al-c-related, .al-blog-more { transition: background .18s; }
.al-c-related:hover, .al-blog-more:hover { background: var(--accentSoft); }
.al-blog-share { transition: background .2s, color .2s, border-color .2s; }
.al-blog-share:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.al-btn-cta-book { transition: background .2s, transform .2s; }
.al-btn-cta-book:hover { background: #fff; color: #1B4E5E; transform: translateY(-2px); }
.al-btn-cta-call { transition: border-color .2s, transform .2s; }
.al-btn-cta-call:hover { border-color: #fff; transform: translateY(-2px); }

/* ---- FAQ accordion (chiropractic #faq) — native <details> ---- */
.al-faq summary { list-style: none; }
.al-faq summary::-webkit-details-marker { display: none; }
.al-faq summary::marker { content: ""; }
.al-faq .al-faq-icon { transition: transform .2s ease; }
.al-faq[open] .al-faq-icon { transform: rotate(45deg); }

/* ---- blog index heading step-downs (unique names) ---- */
@media (max-width: 1160px) { .al-blog-h1 { font-size: 46px !important; } .al-blog-h2 { font-size: 31px !important; } }
@media (max-width: 800px)  { .al-blog-h1 { font-size: 36px !important; } .al-blog-h2 { font-size: 26px !important; } }

/* ---- chiropractic snap headings (renamed .al-snap-*, unique) ---- */
@media (max-width: 1160px) {
  .al-snap-1 { font-size: 47px !important; } .al-snap-2 { font-size: 38px !important; }
  .al-snap-3 { font-size: 35px !important; } .al-snap-4 { font-size: 35px !important; }
  .al-snap-5 { font-size: 37px !important; } .al-snap-6 { font-size: 35px !important; }
  .al-snap-7 { font-size: 37px !important; }
}
@media (max-width: 800px) {
  .al-snap-1 { font-size: 37px !important; } .al-snap-2 { font-size: 32px !important; }
  .al-snap-3 { font-size: 29px !important; } .al-snap-4 { font-size: 29px !important; }
  .al-snap-5 { font-size: 30px !important; } .al-snap-6 { font-size: 29px !important; }
  .al-snap-7 { font-size: 30px !important; }
}

/* ===================== per-page scoped helpers ===================== */

/* Careers */
.align-careers .r-split { display: grid; grid-template-columns: 1.15fr .85fr; }
@media (max-width: 1160px) {
  .align-careers .r-split { grid-template-columns: 1fr !important; gap: 36px !important; }
  .align-careers .snap-1 { font-size: 44px !important; }
  .align-careers .snap-2 { font-size: 31px !important; }
  .align-careers .snap-3 { font-size: 28px !important; }
}
@media (max-width: 800px) {
  .align-careers .snap-1 { font-size: 35px !important; }
  .align-careers .snap-2 { font-size: 26px !important; }
  .align-careers .snap-3 { font-size: 23px !important; }
}

/* Terms of Service */
@media (max-width: 1160px) { .align-terms-of-service .snap-1 { font-size: 40px !important; } }
@media (max-width: 800px)  { .align-terms-of-service .snap-1 { font-size: 31px !important; } }

/* Contact */
@media (max-width: 1160px) {
  .align-contact .r-split { grid-template-columns: 1fr !important; gap: 36px !important; }
  .align-contact .r-cards-2 { grid-template-columns: 1fr 1fr !important; }
  .align-contact .snap-1 { font-size: 40px !important; }
}
@media (max-width: 800px) { .align-contact .snap-1 { font-size: 31px !important; } }
@media (max-width: 700px) { .align-contact .r-cards-2 { grid-template-columns: 1fr !important; } }
.align-contact form input:focus,
.align-contact form textarea:focus,
.align-contact form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(238,108,108,.12);
}

/* Our Team */
@media (max-width: 1160px) {
  .align-our-team .snap-1 { font-size: 49px !important; }
  .align-our-team .snap-2 { font-size: 35px !important; }
  .align-our-team .snap-3 { font-size: 37px !important; }
  .align-our-team .r-cards-3 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 800px) {
  .align-our-team .snap-1 { font-size: 38px !important; }
  .align-our-team .snap-2 { font-size: 29px !important; }
  .align-our-team .snap-3 { font-size: 30px !important; }
}
@media (max-width: 700px) { .align-our-team .r-cards-3 { grid-template-columns: 1fr !important; } }

/* Practitioner — Marcella Sanderson */
@media (max-width: 1160px) {
  .align-marcella-sanderson .r-split { grid-template-columns: 1fr !important; gap: 36px !important; }
  .align-marcella-sanderson .r-cards-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .align-marcella-sanderson .r-cards-3 { grid-template-columns: repeat(2, 1fr) !important; }
  .align-marcella-sanderson .snap-1 { font-size: 49px !important; }
  .align-marcella-sanderson .snap-2 { font-size: 35px !important; }
  .align-marcella-sanderson .snap-3 { font-size: 35px !important; }
  .align-marcella-sanderson .snap-4 { font-size: 35px !important; }
  .align-marcella-sanderson .snap-5 { font-size: 37px !important; }
}
@media (max-width: 800px) {
  .align-marcella-sanderson .snap-1 { font-size: 38px !important; }
  .align-marcella-sanderson .snap-2 { font-size: 29px !important; }
  .align-marcella-sanderson .snap-3 { font-size: 29px !important; }
  .align-marcella-sanderson .snap-4 { font-size: 29px !important; }
  .align-marcella-sanderson .snap-5 { font-size: 30px !important; }
}
@media (max-width: 700px) {
  .align-marcella-sanderson .r-cards-4,
  .align-marcella-sanderson .r-cards-3,
  .align-marcella-sanderson .r-cards-2 { grid-template-columns: 1fr !important; }
}

/* Chiropractic Care (service template) */
@media (max-width: 1160px) {
  .align-chiropractic-care .r-split { grid-template-columns: 1fr !important; gap: 36px !important; }
  .align-chiropractic-care .r-cards-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .align-chiropractic-care .r-cards-3 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 800px) {
  .align-chiropractic-care .r-cards-4,
  .align-chiropractic-care .r-cards-3,
  .align-chiropractic-care .r-cards-2 { grid-template-columns: 1fr !important; }
}

/* Blog articles — Insulin Resistance + Conversations (shared snap-1) */
@media (max-width: 1160px) {
  .align-insulin-resistance .snap-1,
  .align-conversations-with-neighbours .snap-1 { font-size: 38px !important; }
}
@media (max-width: 800px) {
  .align-insulin-resistance .snap-1,
  .align-conversations-with-neighbours .snap-1 { font-size: 30px !important; }
}
