/* Courses: listing (/kurzy/), calendar, gift section, course detail, booking box, mobile bottom bar.
   Sources: Figma Make (mobile listing + detail), desktop Figma (sections), moodboards 2–3 (desktop booking box). */

/* ── Listing ─────────────────────────────────────────────────────────────── */
.courses-hero { padding-block: var(--s-8) var(--s-4); }
.courses-hero__title { margin-bottom: var(--s-2); font-size: var(--fs-display); line-height: 1; letter-spacing: -0.02em; }
.courses-hero__lead { max-width: 60ch; margin-bottom: var(--s-5); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.courses-hero__links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-5); margin-top: var(--s-3); }
.courses-hero__links p { margin: 0; font-size: var(--fs-small); }
.courses-calendar-link a { font-weight: 600; text-underline-offset: 0.18em; }
.courses-calendar-link a span { margin-left: 0.2em; text-decoration: none; }
.course-card[id], .course-calendar { scroll-margin-top: calc(var(--header-h) + var(--s-4)); }
.gift__catalog-link { margin-top: var(--s-4); }


.card__badges .badge--end { margin-left: auto; }
.card__price { display: grid; justify-items: end; line-height: 1.1; }
.card__price-old { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 400; color: var(--c-text-subtle); }
.card__price .woocommerce-Price-amount { white-space: nowrap; }

/* ── Calendar ────────────────────────────────────────────────────────────── */
.course-calendar__layout { display: grid; gap: var(--s-8); margin-top: var(--s-6); }
@media (min-width: 1024px) { .course-calendar__layout { grid-template-columns: minmax(320px, 440px) 1fr; align-items: start; gap: var(--s-12); } }

.calendar { padding: var(--s-5); border-radius: var(--r-card); background: var(--c-white); box-shadow: 0 0 0 1px var(--c-border), var(--shadow-sm); }
.calendar__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-3); }
.calendar__title { margin: 0; font-size: 1.125rem; text-transform: capitalize; }
.calendar__nav { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--c-grey-100); font-size: 1.25rem; line-height: 1; }
.calendar__nav:disabled { opacity: 0.3; cursor: default; }
.calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.calendar__dow { padding-bottom: var(--s-1); font-size: 0.6875rem; font-weight: 700; color: var(--c-text-subtle); text-align: center; }
.calendar__day { display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--r-sm); font-size: var(--fs-small); color: var(--c-grey-700); text-decoration: none; }
.calendar__day.is-past { color: var(--c-text-subtle); text-decoration: line-through; text-decoration-color: var(--c-grey-400); }
.calendar__day.has-event { background: var(--c-yellow); color: var(--c-ink); font-weight: 700; }
.calendar__day.has-event:hover { outline: 2px solid var(--c-ink); }
.calendar__day.is-full { background: var(--c-grey-200); color: var(--c-grey-500); text-decoration: line-through; }
.calendar__legend { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-4) 0 0; font-size: var(--fs-xs); color: var(--c-text-muted); }
.calendar__swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--c-yellow); }
.calendar__swatch--full { margin-left: var(--s-3); background: var(--c-grey-200); }

.upcoming__title { font-size: var(--fs-h4); }
.upcoming__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--c-border); }
.upcoming__item a { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-2) var(--s-5); align-items: center; padding: var(--s-3) var(--s-2); border-bottom: 1px solid var(--c-border); text-decoration: none; }
.upcoming__item a:hover { background: var(--c-white); }
.upcoming__date { font-weight: 700; white-space: nowrap; }
.upcoming__course { color: var(--c-text-muted); }
.upcoming__item.is-full .upcoming__date, .upcoming__item.is-full .upcoming__course { text-decoration: line-through; color: var(--c-text-subtle); }
@media (max-width: 639.98px) {
  .upcoming__item a { grid-template-columns: 1fr auto; }
  .upcoming__course { grid-column: 1 / -1; grid-row: 2; font-size: var(--fs-small); }
}

/* ── Gift section ────────────────────────────────────────────────────────── */
.gift .display { max-width: 12ch; }
.gift__text { max-width: 42ch; font-size: var(--fs-lead); }
.gift__options { display: grid; gap: var(--s-2); max-width: 520px; margin: var(--s-6) 0 0; padding: 0; list-style: none; }
.gift__option { display: grid; grid-template-columns: 1fr auto auto; gap: var(--s-3); align-items: center; padding: var(--s-4) var(--s-5); border-radius: var(--r-md); background: var(--c-white); font-weight: 600; text-decoration: none; box-shadow: var(--shadow-sm); }
.gift__option:hover { box-shadow: var(--shadow-md); }
.gift__option-price { font-family: var(--font-heading); font-weight: 700; white-space: nowrap; }
.gift__art { width: 100%; height: auto; }
.gift__validity { margin: var(--s-3) 0 0; font-weight: 600; }
@media (min-width: 1024px) {
	.gift .split { grid-template-columns: 0.85fr 1.15fr; gap: var(--s-8); }
}
.gift__dates > summary { list-style: none; cursor: pointer; }
.gift__dates > summary::-webkit-details-marker { display: none; }
.gift__dates[open] > summary .icon { transform: rotate(180deg); }
.gift__date-list { display: grid; gap: var(--s-2); margin: var(--s-2) 0 0; padding: 0; list-style: none; }
.gift__date { display: grid; grid-template-columns: 1fr auto; gap: 0 var(--s-3); align-items: center; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: rgb(255 255 255 / 0.7); }
.gift__date-when { font-weight: 700; }
.gift__date-when > span { white-space: nowrap; }
.gift__date-course { grid-column: 1; font-size: var(--fs-small); color: var(--c-text-muted); }
.gift__date .btn { grid-column: 2; grid-row: 1 / span 2; }

/* ── Course detail: hero ─────────────────────────────────────────────────── */
.course-hero { position: relative; display: flex; align-items: flex-end; min-height: clamp(240px, 42vw, 520px); background: #1a1a1a; color: var(--c-white); overflow: hidden; }
.course-hero--plain { min-height: 0; background: var(--c-yellow); color: var(--c-ink); }
.course-hero > picture { display: contents; } /* knk_babovka_picture(): keep the flex hero's children as before */
/* .course-hero prefix: WooCommerce's `.woocommerce img { height: auto }` otherwise wins and the photo covers only the top of a tall hero. */
.course-hero .course-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.course-hero:not(.course-hero--plain)::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / 0.72), rgb(0 0 0 / 0.1) 55%, rgb(0 0 0 / 0.25)); }
.course-hero__content { position: relative; z-index: 1; padding-block: var(--s-10) var(--s-6); }
.course-hero__title { max-width: 22ch; margin-bottom: var(--s-2); font-size: var(--fs-h1); }
.course-hero__subtitle { margin: 0; font-size: var(--fs-lead); opacity: 0.85; }

.course-availability { margin-top: var(--s-5); margin-bottom: var(--s-5); padding: var(--s-4) var(--s-5); border-left: 4px solid var(--c-yellow); border-radius: var(--r-md); background: var(--c-surface-alt); }
.course-availability h2 { margin: 0 0 var(--s-2); font-size: var(--fs-h4); }
.course-availability p { margin: 0; }
.course-availability a { font-weight: 700; text-underline-offset: 0.18em; }

/* Gift voucher sales page: reassure first, then explain the course and finish with the order form. */
.gift-sales__hero .course-hero__title { max-width: 18ch; }
.gift-sales__hero .course-hero__subtitle { max-width: 58ch; margin-bottom: var(--s-5); }
.gift-sales__layout { display: grid; gap: var(--s-10); padding-block: var(--section-y); }
.gift-sales__content { display: grid; gap: var(--s-10); min-width: 0; }
.gift-sales__aside { min-width: 0; }
.gift-sales__section { max-width: 920px; }
.gift-sales__section .course-section__title { max-width: 28ch; }
.gift-sales__pain-grid { display: grid; gap: var(--s-3) var(--s-8); }
.gift-sales__reassurance { margin: var(--s-5) 0 0; padding: var(--s-4) var(--s-5); border-left: 4px solid var(--c-yellow); border-radius: var(--r-md); background: var(--c-surface-alt); }
.gift-sales__section--soft { padding: var(--s-6); border-radius: var(--r-card-lg); background: var(--c-surface-alt); }
.gift-sales__section--yellow { padding: var(--s-6); border-radius: var(--r-card-lg); background: var(--c-yellow); }
.gift-sales__skills { display: grid; gap: var(--s-2); margin: var(--s-4) 0; padding-left: 1.25rem; }
.gift-sales__diet { margin: var(--s-5) 0 0; }
.gift-sales__value-grid { display: grid; gap: var(--s-3); }
.gift-sales__value-grid article { padding: var(--s-4) var(--s-5); border-radius: var(--r-card); background: var(--c-surface-alt); }
.gift-sales__value-grid h3 { margin: 0 0 var(--s-2); font-family: var(--font-heading); font-size: var(--fs-h4); }
.gift-sales__value-grid p { margin: 0; color: var(--c-text-muted); }
.gift-sales__section--yellow .course-section__title { margin-bottom: var(--s-3); }
.gift-sales__alternatives { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); margin-top: var(--s-5); }
.gift-sales__alternative-link { font-weight: 600; text-underline-offset: 0.18em; }
.gift-sales__order { display: grid; gap: var(--s-6); align-items: start; padding: var(--s-6); border-radius: var(--r-card-lg); background: var(--c-black); color: var(--c-white); }
.gift-sales__aside .gift-sales__order { grid-template-columns: minmax(0, 1fr); }
.gift-sales__order .course-section__title { color: var(--c-white); }
.gift-sales__facts { display: grid; gap: var(--s-2); margin: 0 0 var(--s-4); padding: 0; list-style: none; }
.gift-sales__facts li { display: flex; gap: var(--s-2); align-items: flex-start; }
.gift-sales__facts .icon { flex: none; width: 1.1em; height: 1.1em; margin-top: 0.2em; color: var(--c-yellow); }
.gift-sales__order .booking { color: var(--c-text); }
.gift-sales__order .booking__price { color: var(--c-ink); }
@media (min-width: 760px) {
  .gift-sales__pain-grid,
  .gift-sales__value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gift-sales__value-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .gift-sales__layout { grid-template-columns: minmax(0, 1fr) 400px; grid-template-areas: 'main aside'; align-items: start; gap: var(--s-12); }
  .gift-sales__content { grid-area: main; }
  .gift-sales__aside { grid-area: aside; position: sticky; top: calc(var(--header-h) + var(--s-6)); }
}


/* ── Layout: booking first on mobile, sticky sidebar on desktop ──────────── */
.course__layout { display: grid; gap: var(--s-8); padding-block: var(--s-6) var(--section-y); }
@media (min-width: 1024px) {
  .course__layout { grid-template-columns: minmax(0, 1fr) 400px; grid-template-areas: 'main aside'; gap: var(--s-12); align-items: start; }
  .course__main { grid-area: main; }
  .course__aside { grid-area: aside; position: sticky; top: calc(var(--header-h) + var(--s-6)); margin-top: calc(-1 * var(--s-16)); z-index: 2; }
}
.course__main { display: grid; gap: var(--s-10); min-width: 0; }

.course-facts { padding: var(--s-5); border-radius: var(--r-card); background: var(--c-surface-alt); box-shadow: inset 0 0 0 1px var(--c-grey-200); }
.course-blocks { display: grid; gap: var(--s-6); }
.course-section__title { font-size: var(--fs-h2); margin-bottom: var(--s-5); }
.course-intro { font-size: var(--fs-lead); }
.course-intro img { max-width: 220px; }
.course-audience-note { margin: var(--s-5) 0; padding: var(--s-4) var(--s-5); border-left: 4px solid var(--c-yellow); border-radius: var(--r-md); background: var(--c-surface-alt); font-size: var(--fs-small); }
.course-audience-note p { margin: 0; }
.course-audience-note p + p { margin-top: var(--s-3); }
.course-audience-note a { font-weight: 700; }

/* ── Booking box ─────────────────────────────────────────────────────────── */
.booking { padding: var(--s-5); border-radius: var(--r-card-lg); background: var(--c-white); box-shadow: 0 0 0 1px var(--c-border), var(--shadow-lg); }
.booking .past-date-notice { margin: 0 0 var(--s-4); font-size: var(--fs-small); }
.booking__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }
.booking__price { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; line-height: 1; }
.booking__price del { display: block; font-family: var(--font-body); font-size: var(--fs-small); font-weight: 400; color: var(--c-text-subtle); }
.booking__price-note { margin-top: var(--s-1); font-size: var(--fs-xs); color: var(--c-text-muted); }
.booking__rating { display: grid; justify-items: end; text-decoration: none; text-align: right; }
.booking__rating-label { font-size: var(--fs-xs); color: var(--c-text-muted); text-decoration: underline; text-underline-offset: 0.2em; }
.booking__rating-value { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.booking__rating-value .icon { fill: var(--c-yellow); stroke: #d9b92f; }
.booking__rating-count { font-size: var(--fs-xs); color: var(--c-text-muted); }
.booking__label { margin-bottom: var(--s-2); padding: 0; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-text-muted); }

.dates { display: grid; gap: var(--s-2); margin: 0 0 var(--s-4); padding: 0; border: 0; }
.date-option { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 0.8rem 0.9rem 0.8rem 2.6rem; border: 1px solid rgb(0 0 0 / 0.2); border-radius: var(--r-md); font-size: var(--fs-small); cursor: pointer; transition: box-shadow var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.date-option:hover { box-shadow: var(--shadow-md); }
.date-option input { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); margin: 0; }
.date-option__label { display: flex; flex-wrap: wrap; column-gap: 0.5em; font-weight: 600; }
.date-option__time { font-weight: 400; color: var(--c-text-muted); white-space: nowrap; }
.date-option__day { white-space: nowrap; }
.date-option .spots { flex: 0 0 auto; }
.booking__capacity { display: block; margin-top: 2px; font-size: var(--fs-xs); font-weight: 400; letter-spacing: 0; text-transform: none; }
.dates__more { display: grid; gap: var(--s-2); }
.dates__more > summary { justify-self: start; padding: var(--s-1) 0; font-size: var(--fs-small); font-weight: 700; color: var(--c-ink); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.date-option:has(input:checked) { border-color: var(--c-ink); box-shadow: 0 0 0 1px var(--c-ink), 0 4px 4px rgb(0 0 0 / 0.15); }
.date-option.is-full { cursor: not-allowed; color: var(--c-grey-500); background: var(--c-grey-50); }
.date-option.is-full .date-option__label { text-decoration: line-through; }
.date-option.is-closed .date-option__label { text-decoration: none; }
.dates__note { margin: 0; font-size: var(--fs-small); color: var(--c-text-muted); }
.dates__note a { color: var(--c-ink); font-weight: 600; }

.booking__qty { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); font-size: var(--fs-small); font-weight: 600; }
.booking__qty input { width: 88px; text-align: center; }
.booking__note { display: flex; gap: var(--s-2); margin: 0 0 var(--s-4); padding: var(--s-3); border-radius: var(--r-md); background: var(--c-yellow-soft); font-size: var(--fs-small); }
.booking__note .icon { margin-top: 2px; }
.booking__note a { display: block; margin-top: 2px; font-weight: 600; }
.booking__buy { letter-spacing: 0.01em; }
.booking__gift { margin-top: var(--s-4); padding: var(--s-3); border-radius: var(--r-md); background: var(--c-yellow-soft); font-size: var(--fs-small); }
.booking__gift a { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-2); margin-top: var(--s-1); font-weight: 600; }
.booking__gift a .icon { flex: none; margin-top: 0.15em; } /* arrow beside the text, not on a line of its own */
.booking__empty { padding: var(--s-5); border-radius: var(--r-md); background: var(--c-grey-100); text-align: center; }
.booking__empty-title { margin: 0 0 var(--s-1); font-weight: 700; }
.booking__empty p { font-size: var(--fs-small); }

/* Notify me */
.notify { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--c-grey-200); }
.notify__summary { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--fs-small); color: var(--c-text-muted); cursor: pointer; list-style: none; }
.notify__summary::-webkit-details-marker { display: none; }
.notify__summary strong { color: var(--c-ink); }
.notify__icon { flex-shrink: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--c-yellow); color: var(--c-ink); }
.notify__form { margin-top: var(--s-3); }
.notify__legal { margin: var(--s-2) 0 0; font-size: var(--fs-xs); color: var(--c-text-subtle); }
.notify .notice { margin: var(--s-3) 0 0; font-size: var(--fs-small); }

/* ── Detail sections ─────────────────────────────────────────────────────── */
.course-gift .btn { margin-top: var(--s-1); }
.instructor__body { display: flex; gap: var(--s-5); align-items: flex-start; }
.instructor__photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--c-yellow); flex-shrink: 0; }
.instructor__name { margin: 0 0 var(--s-1); font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; }
.instructor p { color: var(--c-text-muted); }

.reviews__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.reviews__list { display: grid; gap: var(--s-3); margin: 0 0 var(--s-5); padding: 0; list-style: none; }
.review { padding: var(--s-4) var(--s-5); border-radius: var(--r-card); background: var(--c-surface-alt); }
.review__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin-bottom: var(--s-2); }
.review__author { font-weight: 700; }
.review__date, .review__source { font-size: var(--fs-xs); color: var(--c-text-subtle); }
.review__text { color: var(--c-grey-700); }
.review__text p:last-child { margin-bottom: 0; }
.reviews__more { margin: 0 0 var(--s-5); }
.reviews__more summary { list-style: none; margin-bottom: var(--s-3); }
.reviews__more summary::-webkit-details-marker { display: none; }
.reviews__more[open] summary { display: none; }
.reviews__note { font-size: var(--fs-xs); }
.reviews__form summary { list-style: none; }
.reviews__form summary::-webkit-details-marker { display: none; }
.reviews__form[open] summary { margin-bottom: var(--s-4); }
.reviews__form .comment-form { max-width: 560px; }
.reviews__form .stars { display: none; } /* Woo's star widget; we use the select */

.course-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 200px), 1fr)); gap: var(--s-2); }
.course-gallery__item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-md); }

.course-faq__more { margin: var(--s-4) 0 0; color: var(--c-text-muted); }

.course-final { background: var(--c-black); color: var(--c-white); }
.course-final__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); padding-block: var(--s-8); }
.course-final__title { margin: 0; font-family: var(--font-heading); font-size: var(--fs-h3); font-weight: 700; }
.course-final__price { margin: 0; font-family: var(--font-heading); font-size: var(--fs-h2); font-weight: 700; color: var(--c-yellow); }

/* ── Floating bottom bar (mobile) ────────────────────────────────────────── */
.course-bar { position: fixed; inset: auto 0 0 0; z-index: 90; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--gutter) calc(var(--s-3) + env(safe-area-inset-bottom)); background: var(--c-white); border-top: 2px solid var(--c-border); box-shadow: var(--shadow-bar); transform: translateY(110%); transition: transform 200ms var(--ease); }
.course-bar.is-visible { transform: none; }
.course-bar[hidden] { display: none; }
.course-bar__price { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; line-height: 1; }
.course-bar__meta { margin-top: 2px; font-size: var(--fs-xs); color: var(--c-text-subtle); }
@media (min-width: 1024px) { .course-bar { display: none !important; } }
body.has-course-bar .site-footer { padding-bottom: calc(var(--s-6) + 76px); }

/* Benefits row under the course intro (Lucka 2026-10-01: "Max. 3 účastníci · Všechny suroviny v ceně · …"). */
.course-highlights { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: 0 0 var(--s-8); padding: 0; list-style: none; font-weight: 600; }
.course-highlights li { display: inline-flex; align-items: center; gap: var(--s-2); }
.course-highlights .icon { flex: none; width: 20px; height: 20px; padding: 2px; border-radius: 50%; background: var(--c-yellow); }

/* "Přijdeme ve dvou" in the booking box. */
.booking__party { display: grid; gap: var(--s-3); margin: var(--s-4) 0; padding: 0; border: 0; }
.booking__pair { display: flex; align-items: flex-start; gap: var(--s-3); cursor: pointer; }
.booking__pair input { flex: none; width: 1.15rem; height: 1.15rem; margin-top: 0.15rem; accent-color: var(--c-black); }
.booking__pair small { display: block; color: var(--c-text-muted); font-size: var(--fs-xs); }
.booking__pair:has(input:disabled) { opacity: 0.55; cursor: not-allowed; }

.courses-hero .past-date-notice { margin: 0 0 var(--s-4); }

@media (max-width: 639.98px) {
  /* Keep four catalogue filters visually balanced on phones. */
  .courses-hero .chips { display: grid; grid-template-columns: repeat(2, max-content); justify-content: start; justify-items: start; } /* chips keep their own width */
  /* Landscape crops bring course cards closer to the compact Figma layout. */
  .courses-list .course-card .card__media { aspect-ratio: 16 / 9; }
  /* Date and time always on two lines, so rows don't alternate with the label length. */
  .date-option__label { flex-direction: column; }
}

@media (max-width: 359.98px) {
	/* Let long booking labels wrap on very narrow phones instead of widening the page. */
	.date-option { flex-wrap: wrap; }
	.date-option__label { flex: 1 1 100%; min-width: 0; }
	.booking__buy { white-space: normal; }
}
.reviews__title--sub { font-size: var(--fs-h3); } /* under the section's own H2 on the sales pages */
