/* ── Kids Corner Page — loaded only on /kids ─────────────────────────────── */

/* ── Variables ───────────────────────────────────────────────────────────── */
.kids-page {
  --kc-red:    #E53935;
  --kc-blue:   #1E88E5;
  --kc-yellow: #FDD835;
  --kc-green:  #43A047;
  --kc-orange: #FB8C00;
  --kc-purple: #8E24AA;
  --kc-navy:   #1A237E;
  font-family: 'Quicksand', sans-serif;
  background: #fff;
  scroll-behavior: smooth;
}

/* Override site-main padding — kids page handles its own layout */
.kids-page .site-main { padding: 0; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.kc-hero {
  background-color: #C8A96E;
  text-align: center;
  padding: 5rem 1.5rem 4rem;
  position: relative;
}

.kc-hero--photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: none;
}

.kc-hero--overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  pointer-events: none;
}

.kc-hero > * {
  position: relative;
  z-index: 1;
}

.kc-headline {
  font-family: 'Lilita One', cursive;
  font-size: 8rem;
  line-height: 1.05;
  margin: 0 0 1rem;
  display: block;
  user-select: none;
}

.type-letter {
  display: inline-block;
  opacity: 0;
  text-shadow: 2px 3px 6px rgba(0,0,0,0.5);
  transition: opacity 0.05s;
}

.type-cursor {
  display: inline-block;
  color: white;
  animation: cursorBlink 0.6s step-end infinite;
  opacity: 0;
}

.type-cursor.active { opacity: 1; }

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.kc-subtitle {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: #fff;
  text-shadow: 1px 2px 5px rgba(0,0,0,0.55);
  margin: 0;
  opacity: 0;
}

@keyframes kcFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Section shells ──────────────────────────────────────────────────────── */
.kc-section {
  padding: 4rem 1.5rem;
}
.kc-section--yellow { background: #1E88E5; } /* Story Time — bold blue */
.kc-section--coral  { background: #E53935; } /* Summer Reading — bold red */
.kc-section--green  { background: #FDD835; } /* Reading Lists — bright yellow */
.kc-section--green .kc-empty { color: #1A237E; }
.kc-section--purple { background: #8E24AA; } /* Kids Staff Picks — bold purple */

.kc-container {
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Section headings ────────────────────────────────────────────────────── */
.kc-section-title {
  font-family: 'Lilita One', cursive;
  font-size: 2.25rem;
  margin: 0 0 2rem;
  line-height: 1.1;
  color: #fff;
}
.kc-section-title--green  { color: #fff; }
.kc-section-title--purple { color: #fff; }
.kc-section-title--blue   { color: #1A237E; }
.kc-section-title--coral  { color: #fff; }

.kc-empty {
  color: rgba(255,255,255,0.8); /* overridden per-section below */
  font-style: italic;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  margin: 0;
}

/* ── Story Time ──────────────────────────────────────────────────────────── */
.kc-storytime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.kc-storytime-card {
  background: #fff;
  border-left: 5px solid #1E88E5;
  border-radius: 14px;
  padding: 1.25rem 1.1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kc-storytime-card:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.kc-storytime-day {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #1A237E;
  margin: 0 0 0.3rem;
}
.kc-storytime-time {
  font-size: 0.95rem;
  font-weight: 600;
  color: #E53935;
  margin: 0 0 0.6rem;
}
.kc-age-badge {
  display: inline-block;
  background: #E3F2FD;
  color: #1A237E;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 50px;
  padding: 0.2rem 0.7rem;
}

/* ── Summer Reading ──────────────────────────────────────────────────────── */
.kc-summer-active-banner {
  background: #FDD835;
  color: #1A237E;
  font-family: 'Lilita One', cursive;
  font-size: 1.6rem;
  border-radius: 16px;
  padding: 1.25rem 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.kc-dates {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
  margin: 0 0 1rem;
}

.kc-prose {
  font-family: 'Quicksand', sans-serif;
  font-size: 1rem;
  color: #fff;
  line-height: 1.75;
}
.kc-prose p { margin: 0 0 0.75rem; }

/* ── Reading List Tabs ───────────────────────────────────────────────────── */
.kc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

.kc-tab {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  border: 2px solid #1A237E;
  background: transparent;
  color: #1A237E;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  line-height: 1.4;
}
.kc-tab:hover    { background: #1A237E; color: #FDD835; }
.kc-tab--active  { background: #1A237E; color: #FDD835; }

.kc-tab-panel--hidden { display: none; }

.kc-book-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 0.5rem;
}

/* ── Kids reading list — small shelf cards ───────────────────────────────── */
.kids-reading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 90px);
  gap: 10px;
  justify-content: start;
  width: 100%;
  margin-top: 0.5rem;
}

.kids-reading-grid .kc-book-card {
  width: 90px !important;
}

.kids-reading-grid .kc-book-card__cover {
  aspect-ratio: unset !important;
  height: 135px !important;
}

.kids-reading-grid .kc-book-card__info {
  padding: 3px !important;
  gap: 1px !important;
}

.kids-reading-grid .kc-book-card__title {
  font-size: 0.6rem !important;
  line-height: 1.2 !important;
}

.kids-reading-grid .kc-book-card__author {
  font-size: 0.55rem !important;
}

.kids-reading-grid .kc-book-card__genre {
  font-size: 0.5rem !important;
}

.kids-reading-grid .kc-book-card__link {
  font-size: 0.55rem !important;
}


.kc-book-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kc-book-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.kc-book-card__cover {
  aspect-ratio: 2/3;
  background: #e8f5e9;
  overflow: hidden;
  flex-shrink: 0;
}
.kc-book-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.kc-book-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: #43A047;
}

.kc-book-card__info {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.kc-book-card__title {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: #1a237e;
  margin: 0;
  line-height: 1.3;
}
.kc-book-card__author {
  font-size: 0.75rem;
  color: #555;
  margin: 0;
}
.kc-book-card__genre {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #e8f5e9;
  color: #43A047;
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  align-self: flex-start;
}
.kc-book-card__link {
  font-size: 0.72rem;
  color: #1E88E5;
  text-decoration: none;
  margin-top: auto;
  padding-top: 0.25rem;
}
.kc-book-card__link:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .kc-book-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .kc-book-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Kids Staff Picks ────────────────────────────────────────────────────── */
.kc-picks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.kc-pick-card {
  background: #fff;
  border-left: 5px solid #8E24AA;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.kc-pick-card:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 22px rgba(0,0,0,0.13);
}

.kc-pick-quote {
  font-family: Georgia, serif;
  font-size: 4.5rem;
  line-height: 0.7;
  font-weight: 700;
  margin-bottom: 0.4rem;
  display: block;
}
.kc-pick-blurb {
  font-style: italic;
  font-size: 0.95rem;
  color: #444;
  line-height: 1.65;
  margin: 0 0 1rem;
  flex: 1;
}
.kc-pick-credit {
  border-top: 1px solid #eee;
  padding-top: 0.75rem;
}
.kc-pick-title {
  font-weight: 700;
  color: #1A237E;
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.1rem;
}
.kc-pick-author {
  font-size: 0.85rem;
  color: #888;
  font-style: italic;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .kc-headline       { font-size: 5rem; }
  .kc-section-title  { font-size: 1.75rem; }
  .kc-summer-active-banner { font-size: 1.25rem; }
  .kc-hero           { padding: 3.5rem 1rem 3rem; }
}
@media (max-width: 480px) {
  .kc-headline  { font-size: 3rem; }
  .kc-section   { padding: 2.5rem 1rem; }
  .kc-tab       { font-size: 0.82rem; padding: 0.4rem 0.9rem; }
  .kc-subtitle  { font-size: 1.1rem; }
}
