/* ==========================================================================
   pages-programs.css — 課程與生活 (/programs/*) and 活動花絮 (/gallery/)
   Page-specific layouts only; prefix jh-pp-. Shared helpers (.jh-split, .jh-photo,
   .jh-tape, .jh-note, .jh-sticker, .jh-facts, .jh-rows) live in base.css.
   ========================================================================== */

/* Classic themes wrap group-block children in .wp-block-group__inner-container;
   flatten it so grid/flex layouts see the real children (also fixes .jh-split built from groups). */
.jh-content [class*="jh-pp-"] > .wp-block-group__inner-container,
.jh-content .jh-split > .wp-block-group__inner-container { display: contents; }
.jh-content .jh-split--rev > .wp-block-group__inner-container > :first-child { order: 2; }
@media (max-width: 860px) { .jh-content .jh-split--rev > .wp-block-group__inner-container > :first-child { order: 0; } }
.jh-content .jh-split > .wp-block-group__inner-container > figure { margin: 0; }
.jh-content .jh-pp-split__body > :last-child { margin-bottom: 0; }

.jh-content .jh-pp-lead { font-size: 19px; line-height: 1.9; color: var(--jh-ink); }
.jh-content .jh-pp-small { font-size: 15px; color: var(--jh-muted); }
.jh-content p.jh-note { margin: .2em 0 1.6em; }
.jh-content .jh-sticker { margin: 0; }
@media (max-width: 767px) { .jh-content .jh-pp-lead { font-size: 17px; } }

/* text-heavy split: 7/12 text + 5/12 photo */
.jh-content .jh-split.jh-pp-split--text { grid-template-columns: 7fr 5fr; margin-top: 0; }
.jh-content .jh-split--rev.jh-pp-split--text { grid-template-columns: 5fr 7fr; margin-top: 0; }
.jh-content .jh-split > figure { margin: 0; }
@media (max-width: 860px) {
	.jh-content .jh-split.jh-pp-split--text, .jh-content .jh-split--rev.jh-pp-split--text { grid-template-columns: 1fr; }
	.jh-content .jh-split > .jh-photo { max-width: 440px; }
}

/* overview: page index */
.jh-pp-index { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; margin: 0 0 2em; border-top: 1.5px solid var(--jh-ink); }
.jh-pp-index__item { display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: start; padding: 22px 0; border-bottom: 1px solid var(--jh-line); }
.jh-content .jh-pp-index .jh-sticker { width: 60px; --tilt: -6deg; }
.jh-pp-index__item:nth-child(even) .jh-sticker { --tilt: 5deg; }
.jh-content .jh-pp-index__title { margin: 0 0 4px; font-size: 19px; }
.jh-content .jh-pp-index__title a { color: var(--jh-ink); text-decoration: none; }
.jh-content .jh-pp-index__title a:hover { color: var(--jh-blue-900); text-decoration: underline; text-decoration-color: var(--jh-orange); }
.jh-pp-index__text p { margin: 0; font-size: 16px; line-height: 1.75; }
@media (max-width: 700px) { .jh-pp-index { grid-template-columns: 1fr; } .jh-pp-index__item { grid-template-columns: 52px 1fr; gap: 14px; padding: 18px 0; } .jh-content .jh-pp-index .jh-sticker { width: 50px; } }

/* classes: age rows */
.jh-pp-ages { margin: 1.4em 0 1.6em; border-top: 1.5px solid var(--jh-ink); }
.jh-pp-ages__row { display: grid; grid-template-columns: 104px 1fr; gap: 20px; padding: 24px 0 20px; border-bottom: 1px solid var(--jh-line); }
.jh-content .jh-pp-ages__num { margin: 0; font-family: var(--jh-font-display); font-size: 60px; line-height: 1; color: var(--jh-blue-900); }
.jh-pp-ages__num small { margin-left: 4px; font-size: 20px; color: var(--jh-ink); }
.jh-pp-ages__row:nth-child(1) .jh-pp-ages__num { color: var(--jh-peri); }
.jh-pp-ages__row:nth-child(2) .jh-pp-ages__num { color: var(--jh-aqua-ink); }
.jh-pp-ages__row:nth-child(3) .jh-pp-ages__num { color: #4F8A10; }
.jh-content .jh-pp-ages h3 { margin: 0 0 6px; font-size: 20px; color: var(--jh-ink); }
.jh-pp-ages h3 span { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; color: var(--jh-muted); letter-spacing: .02em; }
.jh-pp-ages__text p { margin: 0; }
@media (max-width: 600px) { .jh-pp-ages__row { grid-template-columns: 64px 1fr; gap: 12px; } .jh-content .jh-pp-ages__num { font-size: 42px; } .jh-pp-ages__num small { font-size: 16px; margin-left: 2px; } }

/* classes: seven ocean classes */
.jh-pp-classes { display: grid; grid-template-columns: repeat(7, 1fr); gap: 20px 12px; margin: 1em 0 .6em; }
.jh-pp-classes__item { text-align: center; }
.jh-content .jh-pp-classes .jh-sticker { width: 84px; --tilt: -5deg; }
.jh-pp-classes__item:nth-child(3n+2) .jh-sticker { --tilt: 4deg; }
.jh-pp-classes__item:nth-child(3n) .jh-sticker { --tilt: -1deg; }
.jh-content .jh-pp-classes__item p { margin: 8px 0 0; font-size: 16px; font-weight: 700; color: var(--jh-ink); }
@media (max-width: 640px) { .jh-pp-classes { grid-template-columns: repeat(4, 1fr); gap: 16px 6px; } .jh-content .jh-pp-classes .jh-sticker { width: 62px; } .jh-content .jh-pp-classes__item p { font-size: 15px; } }

/* daily schedule: sequence without times */
.jh-content .jh-pp-day__label { margin: 1.8em 0 .7em; font-size: 15px; font-weight: 700; letter-spacing: .14em; color: var(--jh-aqua-ink); }
.jh-content h2 + .jh-pp-day__label { margin-top: 0; }
.jh-content ol.jh-pp-day { margin: 0 0 .6em; }
.jh-content .jh-pp-day > li { padding: 0 0 1.1em 42px; margin: 0; }
.jh-content .jh-pp-day > li::before { content: ""; left: 3px; top: .42em; width: 18px; min-width: 0; height: 18px; border: 3px solid var(--jh-aqua); border-radius: 50%; background: #fff; box-sizing: border-box; }
.jh-content .jh-pp-day > li::after { content: ""; position: absolute; left: 11px; top: 1.6em; bottom: .1em; width: 2px; background: repeating-linear-gradient(var(--jh-line) 0 6px, transparent 6px 10px); }
.jh-content .jh-pp-day > li:last-child::after { display: none; }
.jh-content .jh-pp-day > li:last-child { padding-bottom: .4em; }
.jh-content .jh-pp-day strong { display: block; font-size: 18px; line-height: 1.6; }

/* plain bordered box */
.jh-pp-box { margin: 1.6em 0; padding: 22px 26px; background: #fff; border: 1.5px solid var(--jh-line); border-radius: 16px; }
.jh-pp-box > :last-child { margin-bottom: 0; }
@media (max-width: 600px) { .jh-pp-box { padding: 18px 18px; } }

/* meals: monthly menu notice */
.jh-pp-menu { display: grid; grid-template-columns: 72px 1fr; gap: 20px; align-items: center; background: var(--jh-cream); border-style: dashed; border-color: #F2D9B8; }
.jh-content .jh-pp-menu .jh-sticker { width: 68px; }
.jh-content .jh-pp-menu h3 { margin: 0 0 2px; font-size: 18px; }
.jh-pp-menu__text p { margin: 0; }

/* annual events: school-year timeline */
.jh-pp-year { margin: 1.2em 0 2em; border-top: 1.5px solid var(--jh-ink); }
.jh-pp-year__row { display: grid; grid-template-columns: 104px 1fr; gap: 20px; padding: 20px 0 18px; border-bottom: 1px solid var(--jh-line); }
.jh-content .jh-pp-year__when { margin: 0; font-family: var(--jh-font-display); font-size: 24px; line-height: 1.35; color: var(--jh-blue-900); }
.jh-pp-year__row--tbc .jh-pp-year__when { color: var(--jh-muted); }
.jh-content .jh-pp-year h3 { margin: 0 0 4px; font-size: 18px; color: var(--jh-ink); }
.jh-pp-year__text p { margin: 0; }
@media (max-width: 600px) { .jh-pp-year__row { grid-template-columns: 64px 1fr; gap: 12px; } .jh-content .jh-pp-year__when { font-size: 19px; } }

/* after-school: call block */
.jh-pp-cta { display: grid; grid-template-columns: 96px 1fr; gap: 24px; align-items: start; margin: 2em 0 0; padding: 28px 30px; background: var(--jh-cream); border-radius: 20px; }
.jh-content .jh-pp-cta .jh-sticker { width: 90px; --tilt: 6deg; }
.jh-content .jh-pp-cta h3 { margin: 0 0 6px; font-size: 20px; }
.jh-pp-cta__text p { margin: 0 0 14px; }
.jh-pp-cta .wp-block-buttons { margin: 0; }
@media (max-width: 600px) { .jh-pp-cta { grid-template-columns: 1fr; gap: 10px; padding: 22px 20px; } .jh-content .jh-pp-cta .jh-sticker { width: 64px; } }

/* gallery: printed-photo albums (a little wider than the reading column) */
.jh-pp-album { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 44px; width: min(1060px, calc(100vw - 2 * var(--jh-gutter))); margin: 2.4em 0 1em calc(50% - min(530px, 50vw - var(--jh-gutter))); }
.jh-content .jh-pp-album .jh-photo { margin: 0; }
.jh-pp-album .jh-photo img { aspect-ratio: 4 / 5; }
.jh-pp-album .jh-photo:nth-child(3n+2) { --tilt: .8deg; margin-top: 28px; }
@media (max-width: 900px) { .jh-pp-album { grid-template-columns: 1fr 1fr; gap: 40px 28px; } .jh-pp-album .jh-photo:nth-child(3n+2) { margin-top: 0; } .jh-pp-album .jh-photo:nth-child(even) { margin-top: 24px; } }
@media (max-width: 480px) { .jh-pp-album { gap: 28px 16px; } .jh-pp-album .jh-photo { padding: 6px 6px 8px; } .jh-content .jh-pp-album .jh-photo figcaption { font-size: 14px; margin-top: 6px; } }

.jh-content .jh-pp-cols { columns: 2; column-gap: 40px; }
.jh-content .jh-pp-cols li { break-inside: avoid; }
@media (max-width: 480px) { .jh-content .jh-pp-cols { columns: 1; } }
