/*
Theme Name: Divi (My Kid's Lunch Child)
Theme URI: https://mykidslunch.com/
Description: Custom child theme for My Kid's Lunch — a place to safely add CSS and PHP overrides without losing changes when Divi updates.
Author: My Kid's Lunch
Version: 1.2.0
Template: Divi
Text Domain: divi-mkl-child
*/

/* ============================
   Add custom CSS for the live site below this line.
   This file loads AFTER Divi's main stylesheet, so any rule here wins
   without needing !important (most of the time).
   ============================ */

/* Launch hardening — 2026-07-21 */
:root {
  --mkl-red: #c92929;
  --mkl-red-dark: #9f1f1f;
  --mkl-cream: #fffaf2;
  --mkl-ink: #2a2520;
  --mkl-muted: #625c55;
  --mkl-border: #e9e1d5;
}

html,
body,
#page-container {
  max-width: 100%;
  overflow-x: clip;
}

.mkl-header__inner {
  width: min(1480px, 100%);
  margin-inline: auto;
}

.mkl-header__brand,
.mkl-header__logo {
  flex: 0 0 auto;
}

.mkl-header__logo {
  max-width: min(270px, 27vw);
}

/* Collapse the primary navigation when it stops fitting—not after it overflows. */
@media (max-width: 1480px) {
  .mkl-header__inner {
    padding: 12px 18px !important;
    flex-wrap: wrap !important;
  }

  .mkl-header__toggle {
    display: block !important;
    order: 2;
  }

  .mkl-header__nav {
    position: absolute !important;
    inset: 100% 0 auto !important;
    z-index: 9999 !important;
    background: #fff !important;
    border-bottom: 1px solid var(--mkl-border) !important;
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height .25s ease !important;
    order: 3;
    flex-basis: 100%;
  }

  .mkl-header__nav.is-open {
    display: block !important;
    max-height: min(78vh, 680px) !important;
    overflow-y: auto !important;
  }

  .mkl-header__list {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 8px 0 16px !important;
  }

  .mkl-header__list > li {
    display: block !important;
    width: 100%;
  }

  .mkl-header__link,
  .mkl-header__cta {
    width: auto !important;
    min-height: 46px;
    justify-content: flex-start !important;
    padding: 13px 24px !important;
    letter-spacing: .08em !important;
  }

  .mkl-header__cta {
    display: flex !important;
    margin: 10px 24px 4px !important;
    justify-content: center !important;
  }
}

@media (max-width: 640px) {
  .mkl-header__logo {
    max-width: 220px;
  }

  .mkl-home-hero__scroll {
    display: none !important;
  }
}

/* ==========================================
   Focused polish and rendering fixes
   2026-08-16
   ========================================== */

/* Keep the homepage scroll cue centered inside the hero. A late legacy
   Customizer rule changed it to position:relative and pushed it off-canvas. */
body.home .mkl-home-hero .mkl-home-hero__scroll {
  position: absolute !important;
  right: auto !important;
  bottom: 24px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 2 !important;
}

/* Restore the intended arrow glyph without relying on a high-Unicode HTML
   entity. The legacy Customizer escape was flattened into visible "2192". */
body.page-id-118 .mkl-imenu .mkl-day-card
  .mkl-day-card__hint.mkl-day-card__hint.mkl-day-card__hint.mkl-day-card__hint::after {
  content: " \2192" !important;
}

/* Homepage audience routing */
.mkl-audiences {
  padding: 72px 6vw;
  background: var(--mkl-cream);
}

.mkl-audiences__inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.mkl-audiences__eyebrow {
  margin: 0 0 8px;
  color: var(--mkl-red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.mkl-audiences h2 {
  margin: 0 0 12px;
  color: var(--mkl-ink);
  font-size: clamp(28px, 3vw, 40px);
}

.mkl-audiences__intro {
  max-width: 720px;
  margin: 0 0 30px;
  color: var(--mkl-muted);
  font-size: 17px;
  line-height: 1.65;
}

.mkl-audiences__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.mkl-audience-card {
  display: flex;
  min-height: 230px;
  padding: 26px 24px;
  flex-direction: column;
  border: 1px solid var(--mkl-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(55, 43, 28, .06);
  color: var(--mkl-ink) !important;
  text-decoration: none !important;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.mkl-audience-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 41, 41, .36);
  box-shadow: 0 16px 34px rgba(55, 43, 28, .11);
}

.mkl-audience-card__icon {
  font-size: 34px;
  line-height: 1;
}

.mkl-audience-card h3 {
  margin: 18px 0 8px;
  color: var(--mkl-ink);
  font-size: 21px;
}

.mkl-audience-card p {
  margin: 0 0 18px;
  color: var(--mkl-muted);
  line-height: 1.55;
}

.mkl-audience-card__link {
  margin-top: auto;
  color: var(--mkl-red);
  font-weight: 800;
}

@media (max-width: 980px) {
  .mkl-audiences__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .mkl-audiences {
    padding: 52px 18px;
  }

  .mkl-audiences__grid {
    grid-template-columns: 1fr;
  }

  .mkl-audience-card {
    min-height: 0;
  }
}

/* Policy, program, and notice content */
.mkl-policy,
.mkl-garden-program,
.mkl-programs-page,
.mkl-accessibility-page {
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding: 64px 0 80px;
  color: var(--mkl-ink);
}

.mkl-policy__updated,
.mkl-page-note,
.mkl-menu-status {
  padding: 16px 18px;
  border-left: 4px solid var(--mkl-red);
  border-radius: 0 8px 8px 0;
  background: #fff4f2;
  color: #51463f;
}

.mkl-policy h2,
.mkl-garden-program h2,
.mkl-programs-page h2,
.mkl-accessibility-page h2 {
  margin: 36px 0 10px;
  color: var(--mkl-ink);
  font-size: clamp(24px, 2.4vw, 32px);
}

.mkl-policy p,
.mkl-policy li,
.mkl-garden-program p,
.mkl-garden-program li,
.mkl-programs-page p,
.mkl-accessibility-page p,
.mkl-accessibility-page li {
  font-size: 17px;
  line-height: 1.7;
}

.mkl-program-grid,
.mkl-garden-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 28px 0;
}

.mkl-program-card,
.mkl-garden-step {
  padding: 24px;
  border: 1px solid var(--mkl-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(55, 43, 28, .06);
}

.mkl-program-card h2,
.mkl-garden-step h3 {
  margin-top: 0;
}

.mkl-contact-privacy {
  margin: 14px 0 0;
  color: var(--mkl-muted);
  font-size: 14px;
  line-height: 1.5;
}

.mkl-footer h2.mkl-footer__heading {
  margin: 0 0 14px;
  color: #f4615e !important;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .06em;
}

/* Hide unverified or incomplete social destinations until ownership is confirmed. */
.mkl-footer__social a[href*="twitter.com"],
.mkl-footer__social a[href*="reddit.com"],
.mkl-footer__social a[href*="nextdoor.com/profile"] {
  display: none !important;
}

@media (max-width: 640px) {
  .mkl-policy,
  .mkl-garden-program,
  .mkl-programs-page,
  .mkl-accessibility-page {
    padding: 44px 0 60px;
  }

  .mkl-program-grid,
  .mkl-garden-steps {
    grid-template-columns: 1fr;
  }
}

/* Keep the homepage location badge human-readable; CSS content is not HTML-decoded. */
.home .mkl-home-hero .mkl-home-hero__inner::before {
  content: "DENVER & COLORADO SPRINGS" !important;
}

/* Contact module: presentation belongs in the theme, not visible page text. */
body.page-id-122 .mkl-contact-form {
  width: 100%;
  padding: 32px 6vw 72px;
  background: #fff;
  color: #222;
  box-sizing: border-box;
}
body.page-id-122 .mkl-contact-form *,
body.page-id-122 .mkl-contact-form *::before,
body.page-id-122 .mkl-contact-form *::after { box-sizing: border-box; }
body.page-id-122 .mkl-contact-form__inner {
  width: min(820px, 100%);
  margin: 0 auto;
}
body.page-id-122 .mkl-contact-form__hr {
  margin: 0 0 32px;
  border: 0;
  border-top: 1px solid #e2e2e2;
}
body.page-id-122 .mkl-contact-form__title {
  margin: 0 0 12px;
  font-size: clamp(22px, 1.8vw, 30px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: .16em;
  text-transform: uppercase;
}
body.page-id-122 .mkl-contact-form__phone {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
}
body.page-id-122 .mkl-contact-form__phone a {
  color: #111;
  text-decoration: none;
}
body.page-id-122 .mkl-contact-form__phone a:hover { color: #c92929; }
body.page-id-122 .mkl-contact-form__instructions {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.55;
}
body.page-id-122 .mkl-contact-form__cf7 { margin-top: 24px; }

@media (max-width: 640px) {
  body.page-id-122 .mkl-contact-form { padding: 24px 18px 56px; }
}

/* Launch repair - 2026-09-04: keep all navigation reachable on laptops. */
@media (min-width: 1481px) {
  #page-container .mkl-header .mkl-header__inner {
    width: calc(100% - 48px) !important;
    max-width: 1480px !important;
  }
}
@media (max-width: 1480px) {
  .mkl-header__nav { visibility: hidden; }
  .mkl-header__nav.is-open { visibility: visible; }
}
/* Correct a flattened legacy CSS escape in the sample-menu disclosures. */
#main-content .mkl-imenu .mkl-sack-card .mkl-sack-card__hint::after { content: " ▾" !important; }
#main-content .mkl-imenu .mkl-sack-card.is-open .mkl-sack-card__hint::after { content: " ▴" !important; }
body.page-id-118 .mkl-detail { scroll-margin-top: 120px; }
#main-content .mkl-imenu .mkl-detail__col li {
  color: #2a2520 !important;
}
#main-content .mkl-imenu .mkl-detail__col li::before {
  content: "•" !important;
}
#main-content .mkl-imenu .mkl-detail__close {
  color: #fff !important;
  font-size: 28px !important;
}
@media (prefers-reduced-motion: reduce) {
  .mkl-header__nav { transition: none !important; }
}
/* Menu controls: usable touch targets and visible focus below the sticky header. */
#main-content .mkl-imenu .mkl-chip,
#main-content .mkl-imenu .mkl-detail__close {
  min-width: 44px !important;
  min-height: 44px !important;
}

.mkl-imenu .mkl-detail {
  scroll-margin-top: 120px;
}

.mkl-imenu .mkl-detail__close:focus-visible {
  outline: 2px solid #ff9a3c;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .mkl-imenu .mkl-detail,
  .mkl-imenu .mkl-chip,
  .mkl-imenu .mkl-day-card,
  .mkl-imenu .mkl-sack-card,
  .mkl-imenu .mkl-detail__close {
    animation: none !important;
    transition: none !important;
  }

  .mkl-imenu .mkl-chip:hover,
  .mkl-imenu .mkl-day-card:hover {
    transform: none;
  }
}

