/* =====================================================================
   Canine client-site kit — site-rules.css
   Sander's standing DESIGN rules for every client website (content differs per site,
   these never do). Source: Uppity page-by-page review 2026-10-07 + GK9 / GDL / Steven /
   Canine Community Center reviews. Full rule list: ops/templates/client-site/DESIGN-RULES.md

   Targets the GK9-template class names (hero, section-label, content-row, why-grid,
   prog-slide, cta-band, btn-primary ...). Load it LAST on every page, with a ?v= tag,
   next to headline-fit.js. Each site sets its brand in :root BEFORE this file:
     :root { --accent:#0e8a99; --accent-dark:#0b7380; --on-accent:#fff; }
   ":not(#_)" only raises specificity above the template's older per-page rules.
   ===================================================================== */

:root { --kit-text: #111111; --kit-radius: 12px; }

/* ---------- 1. Text: exactly two styles, near-black, never light grey ---------- */
/* intro right under the H1: 19.2px / 17.6px phones, weight 500 */
.hero .hero-inner p:not(.trust-row):not(#_),
.page-hero p:not(#_) { font-size: 1.2rem !important; font-weight: 500 !important; color: var(--kit-text) !important; line-height: 1.6 !important; opacity: 1 !important; }
/* everything else in page sections: 17.6px, weight 400 */
main section p:not(#_), main section li:not(#_), main .subtitle:not(#_), main .pain-item:not(#_), main .faq-body:not(#_), main .prog-info p:not(#_), main .step p:not(#_) {
  font-size: 1.1rem !important; font-weight: 400; color: var(--kit-text) !important; line-height: 1.7; opacity: 1 !important;
}
main section .why-list li strong:not(#_), main section .step h3:not(#_) { color: var(--kit-text) !important; }
main section .why-list li span:not(#_) { font-size: 1.1rem !important; color: var(--kit-text) !important; }
/* review cards keep their compact size */
main section .rs-text:not(#_), main section .rs-card p:not(#_) { font-size: 0.95rem !important; color: #222 !important; }
/* text on the solid brand band is white (text matches its background) */
main .cta-band p:not(#_), main .cta-band h2:not(#_) { color: var(--on-accent, #fff) !important; }
main .cta-band .sms-consent:not(#_) { font-size: 0.85rem !important; opacity: .92 !important; line-height: 1.55; }
@media (max-width: 768px) {
  .hero .hero-inner p:not(.trust-row):not(#_), .page-hero p:not(#_) { font-size: 1.1rem !important; }
}

/* ---------- 2. Headings: one H2 size per site, big bottom CTA heading ---------- */
main section h2:not(#_) { font-size: 2.5rem !important; line-height: 1.2 !important; }
main .cta-band h2:not(#_) { font-size: 2.5rem !important; text-wrap: balance; }
main section h2 em, main section h1 em { white-space: normal; }
h1, h2, h3 { text-wrap: balance; } /* fallback; headline-fit.js does the real fitting */
@media (max-width: 768px) {
  main section h2:not(#_), main .cta-band h2:not(#_) { font-size: 1.75rem !important; }
  .hero h1:not(#_), .page-hero h1:not(#_) { font-size: clamp(28px, 8.4vw, 36px) !important; line-height: 1.15 !important; }
  /* phones: section headings + labels centred, descriptions stay left */
  main section h2:not(#_), main section .section-label:not(#_) { text-align: center !important; }
}

/* ---------- 3. Buttons: one size everywhere, one line on phones ---------- */
.btn-primary:not(#_), .btn-dark:not(#_), .btn-outline-light:not(#_) {
  font-size: 1.1rem !important; font-weight: 700 !important; padding: 17px 36px !important; border-radius: 8px !important; /* slightly bigger (Sander 2026-10-10) */
  width: auto !important; justify-content: center; white-space: nowrap; line-height: 1.2;
}
.btn-outline-light:not(#_) { padding: 15px 34px !important; } /* 2px border = same outer height */
/* squared buttons, not pills (Sander 2026-10-10) — nav + mobile-menu CTAs too */
.nav-cta:not(#_), .mobile-cta-btn:not(#_) { border-radius: 8px !important; }
/* bottom brand band: white button with brand-colour text */
.cta-band .btn-dark:not(#_) { background: #fff !important; color: var(--accent-dark, var(--accent)) !important; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.cta-band .btn-dark:not(#_):hover { background: #f2f6f7 !important; }
@media (max-width: 768px) {
  .btn-primary:not(#_), .btn-dark:not(#_) { font-size: clamp(13px, 4.1vw, 17px) !important; padding: 15px 18px !important; white-space: nowrap !important; }
  .btn-outline-light:not(#_) { font-size: clamp(13px, 4.1vw, 17px) !important; padding: 13px 16px !important; white-space: nowrap !important; }
  .cta-btns { flex-direction: column; align-items: center; }
}

/* ---------- 4. CTA placement: exactly 24px under its text; lone button centred on phones ---------- */
main .cta-center:not(#_) { margin-top: 24px !important; }
main *:has(+ .cta-center) { margin-bottom: 0 !important; }
main .cr-text > p:last-of-type, main .why-list { margin-bottom: 0 !important; }
@media (max-width: 768px) {
  main .cta-center:not(#_) { text-align: center !important; }
}
/* image + text sections: the CTA is centred under the text column on desktop too (Sander 2026-10-10) */
main .cr-text > .cta-center:not(#_), main .why-grid .cta-center:not(#_) { text-align: center !important; }

/* ---------- 5. Layout: equal desktop columns, phone order heading > image > text > CTA ---------- */
@media (min-width: 769px) {
  .content-row:not(#_), .why-grid:not(#_), .hero-inner:not(#_) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
  /* reverse rows: image LEFT. The template flips with direction:rtl; normalise to ltr + order so it never double-flips */
  .content-row.reverse:not(#_) { direction: ltr !important; }
  .content-row.reverse > .cr-text { order: 2; }
}
@media (max-width: 768px) {
  .content-row:not(#_), .why-grid:not(#_) { display: flex !important; flex-direction: column !important; gap: 0 !important; }
  .content-row > .cr-text, .why-grid > div:not(:has(img)) { display: contents !important; }
  .content-row > .cr-text > *, .why-grid > div:not(:has(img)) > * { order: 3; }
  .content-row > .cr-text > .section-label, .content-row > .cr-text > h2,
  .why-grid > div:not(:has(img)) > .section-label, .why-grid > div:not(:has(img)) > h2 { order: 1; display: block; }
  .content-row > .cr-img-wrap, .why-grid > div:has(img) { order: 2 !important; margin: 4px 0 22px !important; width: 100%; }
}

/* ---------- 6. Spacing: same section padding everywhere, 16px phone gutter ---------- */
main > section:not(#_) { padding: 64px 20px !important; }
main > section.hero:not(#_) { padding: 64px 20px 56px !important; }
@media (max-width: 768px) {
  main > section:not(#_) { padding: 48px 16px !important; }
  main > section.hero:not(#_) { padding: 32px 16px 40px !important; }
}

/* ---------- 7a. Hero on phones: centred (text, badge, button, trust row) ---------- */
@media (max-width: 768px) {
  .hero-inner > div:first-child { text-align: center; }
  .hero-inner > div:first-child p { margin-left: auto !important; margin-right: auto !important; }
  .trust-row { justify-content: center; }
}

/* ---------- 7. Hero trust items: always ONE row of 3, never 2 + 1 (Sander 2026-10-10); badge on one line ---------- */
@media (min-width: 601px) {
  .trust-row:not(#_) { display: grid !important; grid-template-columns: repeat(3, max-content); gap: 10px 26px !important; white-space: nowrap; }
}
@media (min-width: 601px) and (max-width: 1150px) { .trust-row:not(#_) { grid-template-columns: repeat(3, minmax(0, 1fr)); white-space: normal; gap: 10px 14px !important; font-size: .85rem !important; line-height: 1.35; } }
@media (max-width: 600px) {
  .trust-row:not(#_) { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px !important; text-align: center; font-size: 0.8rem !important; line-height: 1.3; }
  .trust-row span::before { display: block; margin: 0 auto 4px !important; }
  .hero-badge:not(#_) { white-space: nowrap; font-size: clamp(10.5px, 3.1vw, 13.6px) !important; padding: 6px 12px !important; }
}

/* ---------- 8. FAQ: "+" on the right, vertically centred, even on long questions ---------- */
summary:not(#_) { display: flex !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: space-between; gap: 12px; text-align: left !important; }
summary::after { flex-shrink: 0; margin-left: 12px; }
details[open] > summary::after { content: '\2212' !important; }

/* ---------- 9. Sliders: arrows visible on desktop AND phones, small; cards equal height ---------- */
@media (max-width: 768px) {
  .slider-arrow:not(#_), .prog-arrow:not(#_) { display: flex !important; width: 36px; height: 36px; font-size: 1.3rem; }
}
.programs-slider, .review-slider-track { align-items: stretch; }
.prog-slide, .rs-card { height: auto; }

/* ---------- 10. Images: one corner radius; the HTML height="" attribute never overrides aspect-ratio ---------- */
main img[style*="aspect-ratio"]:not(#_) { height: auto !important; }
main .cr-img-wrap img, main .why-grid img, main .hero-img img { border-radius: var(--kit-radius) !important; }

/* ---------- 11. Trust bar: emoji benefits strip under the hero (Good Dog Lady pattern, Sander 2026-10-10) ----------
   <section class="trust-bar"><div class="section-inner"><div class="trust-items">
     <div class="trust-item"><span class="trust-icon">EMOJI</span>Benefit</div> x4 ...
   Four real benefits about the business. One row on desktop, 2x2 on phones (never 3 + 1). */
main > section.trust-bar:not(#_) { background: #fff; padding: 28px 20px !important; border-top: 1px solid #e8eef0; border-bottom: 1px solid #e8eef0; }
.trust-items { display: flex; justify-content: center; align-items: center; flex-wrap: nowrap; gap: 40px; }
.trust-item { display: flex; align-items: center; gap: 12px; font-size: 1rem; font-weight: 700; color: var(--kit-text); white-space: nowrap; }
.trust-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0;
  background: color-mix(in srgb, var(--accent) 10%, white); }
@media (min-width: 769px) and (max-width: 1100px) { .trust-items { gap: 20px; } .trust-item { font-size: .88rem; gap: 8px; } .trust-icon { width: 38px; height: 38px; font-size: 1.1rem; } }
@media (max-width: 768px) {
  /* compact on phones so the reviews come up sooner (Sander 2026-10-10): 2x2, small icon left of the label */
  main > section.trust-bar:not(#_) { padding: 12px 12px !important; }
  .trust-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; align-items: center; }
  .trust-item { flex-direction: row; text-align: left; white-space: normal; gap: 7px; font-size: .78rem; line-height: 1.25; }
  .trust-icon { width: 28px; height: 28px; font-size: .9rem; }
}

/* ---------- 12. Review carousel (review-carousel.js): one review per click, infinite, never cut off ---------- */
.review-slider-track[data-kit]:not(#_) { overflow: visible !important; scroll-snap-type: none !important; gap: 24px !important; align-items: stretch; will-change: transform; }
.review-slider-track[data-kit] .review-slide { display: flex; scroll-snap-align: none !important; }
.review-slider-track[data-kit] .rs-card { flex: 1; display: flex; flex-direction: column; }
.kit-viewport { overflow: hidden; width: 100%; }
.kit-read-more { background: none; border: 0; padding: 0; margin-top: 8px; align-self: flex-start; color: var(--accent); font: 600 .9rem/1.3 inherit; font-family: inherit; cursor: pointer; }
.kit-read-more:hover { text-decoration: underline; }
.kit-read-more[hidden] { display: none; }
@media (max-width: 768px) { .review-slider-wrap:not(#_) { padding: 0 44px !important; } }

/* ---------- 13. Review cards: date under the name; reviews page grid + rating banner (light theme) ---------- */
.rs-meta .rs-date { display: block; font-size: .8rem; color: #6b7678; font-weight: 500; margin-top: 2px; }
.reviews-grid:not(#_) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
.reviews-grid .rs-card { display: flex; flex-direction: column; }
.rating-score:not(#_) { color: var(--kit-text) !important; }
.rating-count:not(#_) { color: var(--kit-text) !important; }
@media (max-width: 1000px) { .reviews-grid:not(#_) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .reviews-grid:not(#_) { grid-template-columns: minmax(0, 1fr) !important; } }

/* ---------- 14. Header Programs dropdown on light sites (template was dark) ---------- */
.dropdown-menu:not(#_) { background: #fff !important; border: 1px solid #e3eaec !important; border-radius: 10px !important; box-shadow: 0 14px 34px rgba(15, 40, 45, .14) !important; padding: 8px !important; min-width: 480px; }
.dropdown-menu a:not(#_) { color: var(--kit-text) !important; border-radius: 6px; font-weight: 500; }
.dropdown-menu a:not(#_):hover { color: var(--accent) !important; background: color-mix(in srgb, var(--accent) 8%, white) !important; }
.nav-dropdown > a[role="button"] { cursor: pointer; }
.nav-dropdown:focus-within .dropdown-menu { display: grid; } /* keyboard users */

/* ---------- 15. Area cards (service-area page): one card per community ---------- */
.area-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-top: 32px; } /* an uneven last row is centred, never left-hanging */
.area-cards > .area-card { flex: 0 1 calc((100% - 40px) / 3); }
.area-card { background: #fff; border: 1px solid #e3eaec; border-radius: 12px; padding: 22px 22px 18px; box-shadow: 0 2px 10px rgba(15, 40, 45, .05); }
.area-card h3 { font-size: 1.15rem !important; margin-bottom: 8px; color: var(--kit-text); }
.area-card p:not(#_) { margin: 0; }
@media (max-width: 1000px) { .area-cards > .area-card { flex-basis: calc((100% - 20px) / 2); } }
@media (max-width: 640px) { .area-cards > .area-card { flex-basis: 100%; } }
/* exactly 4 cards = 2 x 2 on desktop/tablet, never 3 + 1 (Sander 2026-10-11) */
@media (min-width: 641px) { .area-cards > .area-card:first-child:nth-last-child(4), .area-cards > .area-card:first-child:nth-last-child(4) ~ .area-card { flex-basis: calc((100% - 20px) / 2); } }

/* ---------- 16. Form pages: the survey sits almost directly under the intro text (Sander 2026-10-10) ----------
   GHL surveys carry ~50px of their own top padding inside the iframe, so the page side drops its gaps and pulls the iframe up. */
main > section.page-hero:has(+ section iframe[src*="/widget/survey/"]):not(#_) { padding-bottom: 20px !important; }
main > section.page-hero + section:has(iframe[src*="/widget/survey/"]):not(#_) { padding-top: 0 !important; }
main > section.page-hero + section iframe[src*="/widget/survey/"] { margin-top: -46px !important; display: block; }
/* booking calendars (schedule pages): same tight gap between the intro text and the calendar (Sander 2026-10-11) */
main > section.page-hero:has(+ section iframe[src*="/widget/booking/"]):not(#_) { padding-bottom: 20px !important; }
main > section.page-hero + section:has(iframe[src*="/widget/booking/"]):not(#_) { padding-top: 12px !important; }

/* ---------- 17. Program-page blocks: check lists, compare columns, text block, related-program cards ---------- */
ul.kit-checks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
ul.kit-checks li:not(#_) { position: relative; padding-left: 30px; }
ul.kit-checks li::before { content: "\2713"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 800; }
.compare-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 28px; }
.compare-col { background: #fff; border: 1px solid #e3eaec; border-radius: 12px; padding: 24px 24px 20px; }
.compare-col h3 { font-size: 1.2rem !important; margin-bottom: 4px; color: var(--kit-text); }
.compare-col:not(.compare-good) ul.kit-checks li::before { content: "\2715"; color: #b4474a; }
.compare-good { border: 2px solid var(--accent); box-shadow: 0 6px 22px color-mix(in srgb, var(--accent) 14%, transparent); }
.kit-text { text-align: left; margin-top: 18px; }
a.related-card { display: block; text-decoration: none; color: inherit; transition: border-color .2s, transform .2s; }
a.related-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.related-more { display: inline-block; margin-top: 10px; color: var(--accent); font-weight: 700; font-size: .95rem; }
@media (max-width: 768px) { .compare-grid { grid-template-columns: minmax(0, 1fr); } }
a.prog-slide { display: block; text-decoration: none; color: inherit; cursor: pointer !important; }
a.prog-slide .prog-info h3 { color: var(--kit-text); }
.kit-text p:not(#_) + p { margin-top: 16px; }

/* ---------- 18. Steps: 3 steps = 3 centred columns (no empty 4th column); phones stack (never 2 + 1) (Sander 2026-10-11) ---------- */
@media (min-width: 769px) {
  .steps:has(> .step:nth-child(3):last-child):not(#_) { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; max-width: 960px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 768px) {
  .steps:has(> .step:nth-child(3):last-child):not(#_) { grid-template-columns: minmax(0, 1fr) !important; max-width: 520px; margin-left: auto; margin-right: auto; }
}

/* ---------- 19. Consent line under embedded booking calendars (Sander 2026-10-11) ---------- */
.kit-consent { text-align: center; font-size: .9rem; color: #555; margin: 14px auto 0; max-width: 560px; }
.kit-consent a { color: var(--accent, #0e8a99); text-decoration: underline; }

/* ---------- 20. No slider dots under carousels: arrows + swipe are the controls (Sander 2026-10-11) ---------- */
#reviewDots, .slider-dots { display: none !important; }
