/* ============================================================
   Just Little Kidz — Shared Stylesheet (assets/css/styles.css)
   Loaded by all pages. Page-specific CSS stays in each file.
   ============================================================ */

/* ── Reset + Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Quicksand', sans-serif; background: #FFF8F4; color: #3A3A3A; overflow-x: hidden; }
h1, h2, h3, h4, h5 { font-family: 'Baloo 2', sans-serif; }

/* ── Logo crop — hides "CHILDCARE" text at bottom of PNG ── */
.logo-crop { width: 160px; height: 38px; overflow: hidden; display: block; flex-shrink: 0; }
.logo-crop img { width: 160px; display: block; }

/* ── Buttons ── */
@keyframes btn-bounce { 0%,100%{transform:translateY(0)} 40%{transform:translateY(-6px)} 70%{transform:translateY(-3px)} }

.btn-coral {
  display: inline-block; background: #E8735A; color: #fff;
  font-family: 'Baloo 2', sans-serif; font-weight: 700;
  padding: 0.75rem 1.75rem; border-radius: 50px;
  text-decoration: none; border: none; cursor: pointer;
  box-shadow: 0 4px 18px rgba(232,115,90,0.35);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  animation: btn-bounce 3.5s ease-in-out 3 2s;
}
.btn-coral:hover  { background: #D15F47; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(232,115,90,0.4); animation: none; }
.btn-coral:active { transform: translateY(0); }
.btn-coral:focus-visible { outline: 3px solid #FAD55A; outline-offset: 3px; }

.btn-outline {
  display: inline-block; background: transparent; color: #2D5A3D;
  font-family: 'Baloo 2', sans-serif; font-weight: 700;
  padding: 0.7rem 1.75rem; border-radius: 50px;
  border: 2px solid #2D5A3D; text-decoration: none;
  transition: all 0.2s;
}
.btn-outline:hover { background: #2D5A3D; color: #fff; transform: translateY(-2px); }
.btn-outline:focus-visible { outline: 3px solid #FAD55A; outline-offset: 3px; }

/* ── Navigation ── */
#main-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: #fff; transition: box-shadow 0.3s; }
#main-nav.scrolled { box-shadow: 0 2px 20px rgba(45,90,61,0.12); }
#mobile-menu { display: none; }
#mobile-menu.open { display: block; }

/* ── Trust badge ── */
.trust-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: #fff; border-radius: 50px; padding: 0.4rem 1rem;
  font-family: 'Quicksand', sans-serif; font-weight: 600; font-size: 0.8rem;
  color: #2D5A3D; box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* ── Utility ── */
.hidden { display: none !important; }

/* ── Scroll progress bar ── */
#scroll-progress { position: fixed; top: 0; left: 0; height: 3px; background: linear-gradient(90deg,#E8735A,#FAD55A); z-index: 100; width: 0%; transition: width 0.1s; }

/* ── Scroll reveal ── */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* ── Stagger reveal ── */
.stagger > * { opacity: 0; translate: 0 30px; transition: opacity 0.6s ease, translate 0.6s ease; }
.stagger.visible > *:nth-child(1) { opacity: 1; translate: 0 0; transition-delay: 0s; }
.stagger.visible > *:nth-child(2) { opacity: 1; translate: 0 0; transition-delay: 0.12s; }
.stagger.visible > *:nth-child(3) { opacity: 1; translate: 0 0; transition-delay: 0.24s; }
.stagger.visible > *:nth-child(4) { opacity: 1; translate: 0 0; transition-delay: 0.36s; }
.stagger.visible > *:nth-child(5) { opacity: 1; translate: 0 0; transition-delay: 0.48s; }

/* ── Card tilt ── */
.tilt { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.tilt:hover { transform: perspective(600px) rotateY(-4deg) rotateX(2deg) translateY(-6px); }

/* ── Skip link ── */
.skip-link { position: absolute; left: -100%; top: 1rem; background: #2D5A3D; color: #fff; padding: 0.5rem 1rem; border-radius: 0 0 6px 0; font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 0.875rem; text-decoration: none; z-index: 9999; }
.skip-link:focus { left: 0; }

/* ── Keyboard focus states ── */
a:focus-visible, button:focus-visible { outline: 3px solid #FAD55A; outline-offset: 3px; border-radius: 4px; }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ── Sticky mobile CTA bar ── */
.mobile-cta-bar { display: none; }
@media (max-width: 768px) {
  .mobile-cta-bar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 998;
    background: #fff; padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom,0px));
    gap: 0.625rem; box-shadow: 0 -4px 20px rgba(0,0,0,0.12); border-top: 1px solid #F0E8E0;
  }
  .mobile-cta-bar a {
    flex: 1; display: flex; align-items: center; justify-content: center;
    gap: 0.4rem; font-family: 'Baloo 2', sans-serif; font-weight: 700;
    font-size: 0.85rem; padding: 0.7rem 0.5rem; border-radius: 50px; text-decoration: none;
  }
  body { padding-bottom: 0; }
  body:has(.mobile-cta-bar) { padding-bottom: 72px; }
}

/* ── Desktop nav: compact so 7 links fit ── */
.desktop-nav { gap: 1rem !important; }
.desktop-nav a:not(.btn-coral) { font-size: 0.85rem !important; }

/* ── Mobile nav ── */
@media (max-width: 900px) {
  .desktop-nav { display: none !important; }
  #hamburger { display: block !important; }
}

/* ── On mobile, hide floating WhatsApp + chat (CTA bar handles them) ── */
@media (max-width: 768px) {
  #jlk-wa-wrap, #jlk-chat-wrap { display: none !important; }
  .mobile-cta-bar a,
  .mobile-cta-bar button {
    flex: 1; display: flex; align-items: center; justify-content: center;
    gap: 0.4rem; font-family: 'Baloo 2', sans-serif; font-weight: 700;
    font-size: 0.75rem; padding: 0.7rem 0.5rem; border-radius: 50px;
    text-decoration: none; border: none; cursor: pointer;
  }
}

/* ── WhatsApp floating button ── */
#jlk-wa-wrap { position: fixed; bottom: 5.5rem; right: 1.5rem; z-index: 999; display: flex; align-items: center; gap: 0.6rem; }
#jlk-wa-label {
  background: #fff; color: #25D366; font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 0.8rem;
  padding: 0.4rem 0.9rem; border-radius: 50px; box-shadow: 0 4px 16px rgba(37,211,102,0.18);
  white-space: nowrap; cursor: pointer; border: 2px solid #b7f0cc;
  transition: background 0.2s, color 0.2s; text-decoration: none; display: inline-block;
}
#jlk-wa-label:hover { background: #25D366; color: #fff; border-color: #25D366; }
#jlk-wa-btn {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #1DA851);
  box-shadow: 0 6px 24px rgba(37,211,102,0.4);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s; flex-shrink: 0; text-decoration: none;
}
#jlk-wa-btn:hover { transform: scale(1.1); box-shadow: 0 10px 30px rgba(37,211,102,0.55); }

/* ── Back to top button ── */
@media (max-width: 768px) { #back-to-top { bottom: 5rem !important; } }

/* ── Chat widget ── */
#jlk-chat-wrap { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999; display: flex; align-items: center; gap: 0.6rem; }
#jlk-chat-label {
  background: #fff; color: #2D5A3D; font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 0.8rem;
  padding: 0.4rem 0.9rem; border-radius: 50px; box-shadow: 0 4px 16px rgba(45,90,61,0.15);
  white-space: nowrap; cursor: pointer; border: 2px solid #FBCAB5; transition: background 0.2s, color 0.2s;
}
#jlk-chat-label:hover { background: #E8735A; color: #fff; border-color: #E8735A; }
#jlk-chat-btn {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #E8735A, #D15F47);
  box-shadow: 0 6px 24px rgba(232,115,90,0.45);
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: chat-pulse 2.5s ease-in-out 3;
  flex-shrink: 0;
}
#jlk-chat-btn:hover { transform: scale(1.1); box-shadow: 0 10px 30px rgba(232,115,90,0.55); }
@keyframes chat-pulse {
  0%,100% { box-shadow: 0 6px 24px rgba(232,115,90,0.45); }
  50%      { box-shadow: 0 6px 32px rgba(232,115,90,0.7), 0 0 0 8px rgba(232,115,90,0.1); }
}
#jlk-chat-panel {
  position: fixed; bottom: 5.5rem; right: 1.5rem; z-index: 998;
  width: 340px; max-width: calc(100vw - 2rem);
  height: 480px; max-height: calc(100vh - 8rem);
  background: #fff; border-radius: 20px;
  box-shadow: 0 12px 50px rgba(45,90,61,0.18), 0 2px 8px rgba(0,0,0,0.08);
  display: none; flex-direction: column; overflow: hidden;
}
#jlk-chat-header {
  background: linear-gradient(135deg, #2D5A3D, #3D7A55);
  padding: 1rem 1.2rem; display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0;
}
#jlk-chat-msgs { flex: 1; overflow-y: auto; padding: 1rem; scroll-behavior: smooth; }
#jlk-questions {
  padding: 0.75rem 1rem 1rem; border-top: 1px solid #F0EDE8;
  display: flex; flex-direction: column; gap: 0.4rem; flex-shrink: 0; max-height: 210px; overflow-y: auto;
}
.jlk-q-btn {
  background: #FFF8F4; border: 1.5px solid #FBCAB5; color: #3A3A3A;
  font-family: 'Quicksand', sans-serif; font-weight: 600; font-size: 0.8rem;
  padding: 0.5rem 0.9rem; border-radius: 50px; cursor: pointer;
  text-align: left; transition: background 0.15s, border-color 0.15s; line-height: 1.3;
}
.jlk-q-btn:hover { background: #FBCAB5; border-color: #E8735A; }

/* ── Mobile page jump nav ── */
.page-jump-nav { display: none; }
@media (max-width: 768px) {
  .page-jump-nav {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    justify-content: center; padding: 0.875rem 1.25rem;
    background: #fff; border-bottom: 1px solid #F0E8E0;
  }
  .page-jump-nav a {
    font-family: 'Baloo 2', sans-serif; font-weight: 600; font-size: 0.8rem;
    color: #2D5A3D; text-decoration: none; padding: 0.45rem 1rem;
    border-radius: 50px; border: 1.5px solid #C8DDD0;
    transition: all 0.18s; white-space: nowrap;
  }
  .page-jump-nav a:active { background: #2D5A3D; color: #fff; border-color: #2D5A3D; }
}

/* ──────────────────────────────────────────────────────
   JLK Mobile UX system — jump links, card grid, lists
   Reusable across pages.
   ────────────────────────────────────────────────────── */

/* Section jump links — horizontally scrolling pill bar above content.
   Designed for thumb tap, scrollable when many items overflow row. */
.jlk-jump-links {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: 0.85rem 1rem;
  margin: 0 0 1.25rem;
  background: #fff;
  border-top: 1px solid #F0E8E0;
  border-bottom: 1px solid #F0E8E0;
  scrollbar-width: thin;
}
/* Pages with .jlk-jump-links need their <main> padded so the pill bar
   sits below the 64px fixed top nav. Padding (not margin) avoids margin-collapse
   escaping out to <body> and producing inconsistent results across browsers. */
main:has(> .jlk-jump-links) { padding-top: 64px; }

/* Footer accreditation badges — used on every page in the footer.
   Default = light pill (DBS, NDNA, Childcare.co.uk).
   --dark variant = used for the Ofsted badge on the dark footer background. */
.footer-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.9);
}
.footer-badge--dark { background: rgba(255, 255, 255, 0.07); }
.footer-badge img { height: 32px; width: auto; }
.jlk-jump-links::-webkit-scrollbar { height: 4px; }
.jlk-jump-links::-webkit-scrollbar-thumb { background: #E8DED4; border-radius: 4px; }
.jlk-jump-link {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 1.05rem;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: #2D5A3D;
  background: #F4FAF6;
  border: 1.5px solid #C8DDD0;
  border-radius: 50px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.12s;
}
.jlk-jump-link:hover { background: #2D5A3D; color: #fff; border-color: #2D5A3D; }
.jlk-jump-link:active { transform: scale(0.97); }
.jlk-jump-link:focus-visible { outline: 3px solid #FAD55A; outline-offset: 3px; }
.jlk-jump-link--cta { background: #E8735A; color: #fff; border-color: #E8735A; }
.jlk-jump-link--cta:hover { background: #D15F47; color: #fff; border-color: #D15F47; }
@media (min-width: 1024px) {
  .jlk-jump-links { justify-content: center; flex-wrap: wrap; overflow: visible; }
}

/* JLK card system — used for fees, illness, term dates, rooms, careers, guides. */
.jlk-card {
  background: #fff;
  border: 1px solid #F0E8E0;
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 2px 12px rgba(45,90,61,0.06);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.jlk-card__title {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: #2D5A3D;
  margin: 0;
}
.jlk-card__meta {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.78rem;
  color: #888;
  margin: 0;
}
.jlk-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px dashed #F0E8E0;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.92rem;
  color: #3A3A3A;
}
.jlk-card__row:last-child { border-bottom: none; }
.jlk-card__row .label { color: #555; font-weight: 600; }
.jlk-card__row .value { color: #E8735A; font-family: 'Baloo 2', sans-serif; font-weight: 800; }
.jlk-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 600px) { .jlk-card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .jlk-card-grid--3 { grid-template-columns: repeat(3, 1fr); } }

/* Mobile-only / desktop-only switches for table↔card duplicates.
   Default: desktop-table is visible; mobile cards hidden.
   Mobile: swap. Hidden side gets aria-hidden in markup, removing it
   from the accessibility tree so SR users hear one source of truth. */
.desktop-table { display: block; }
.mobile-card-list { display: none; }
@media (max-width: 768px) {
  .desktop-table { display: none; }
  .mobile-card-list { display: block; }
}

/* "What's included" semantic list */
.included-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}
@media (min-width: 600px) {
  .included-list { grid-template-columns: 1fr 1fr; gap: 0.6rem 1.2rem; }
}
.included-list li {
  position: relative;
  padding: 0.6rem 0.75rem 0.6rem 2.1rem;
  background: #FFFCF7;
  border: 1px solid #F0E8E0;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #3A3A3A;
}
.included-list li::before {
  content: "✓";
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #E8F5EE;
  color: #2D5A3D;
  font-weight: 800;
  font-size: 0.78rem;
}

/* Responsive card-table: visually displays each row as a card on mobile
   while preserving the underlying semantic <table>. Single source of
   truth for screen readers — no DOM duplication. */
@media (max-width: 600px) {
  table.responsive-card-table,
  table.responsive-card-table thead,
  table.responsive-card-table tbody,
  table.responsive-card-table tr,
  table.responsive-card-table th,
  table.responsive-card-table td { display: block; width: 100%; box-sizing: border-box; }
  table.responsive-card-table thead {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
  }
  table.responsive-card-table tr {
    background: #fff !important;
    border: 1px solid #F0E8E0 !important;
    border-radius: 14px !important;
    margin-bottom: 0.75rem;
    padding: 0.85rem 1rem;
    box-shadow: 0 2px 10px rgba(45,90,61,0.05);
  }
  table.responsive-card-table tr:last-child { margin-bottom: 0; }
  table.responsive-card-table th[scope="row"] {
    font-family: 'Baloo 2', sans-serif !important;
    font-size: 0.95rem !important;
    color: #2D5A3D !important;
    padding: 0 0 0.35rem !important;
    border: none !important;
    font-weight: 800 !important;
  }
  table.responsive-card-table td {
    padding: 0 !important;
    border: none !important;
    color: #444 !important;
    font-size: 0.88rem !important;
    line-height: 1.55 !important;
  }
  table.responsive-card-table td + td { padding-top: 0.25rem !important; color: #777 !important; font-size: 0.8rem !important; }
  /* Term-date variant: prepend Start / End labels for clarity on mobile */
  table.responsive-card-table--terms tbody tr td:nth-of-type(1)::before {
    content: "Start: ";
    font-family: 'Baloo 2', sans-serif;
    font-weight: 700;
    color: #2D5A3D;
    margin-right: 0.35rem;
  }
  table.responsive-card-table--terms tbody tr td:nth-of-type(2)::before {
    content: "End: ";
    font-family: 'Baloo 2', sans-serif;
    font-weight: 700;
    color: #2D5A3D;
    margin-right: 0.35rem;
  }
}

/* Tap-target enforcement — minimum 44px on key interactive elements.
   Conservative: applied to nav links, jump links, mobile CTAs, form submit. */
@media (max-width: 900px) {
  #mobile-menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .mobile-cta-bar a,
  .mobile-cta-bar button { min-height: 48px; }
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="date"],
  select,
  textarea { min-height: 44px; font-size: 16px; }
  button[type="submit"] { min-height: 48px; font-size: 1rem; }
}
