.itinerary-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 640px;
  margin: 0 auto;
  border: 1.5px solid var(--navy, #1b2a4a);
  border-radius: 999px;
  background: #ffffff;
  overflow: hidden;
}

.itinerary-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-right: 1px dashed var(--border-soft, #e4d9c0);
  background: transparent;
  padding: 12px 8px;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.itinerary-tab:last-child { border-right: 0; }

.itinerary-tab:hover { background: rgba(212, 123, 46, 0.08); }

.itinerary-tab-num {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--orange, #d47b2e);
  color: var(--orange, #d47b2e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  transition: color 150ms ease, border-color 150ms ease;
}

.itinerary-tab-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
}

.itinerary-tab-info strong {
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy, #1b2a4a);
}

.itinerary-tab-info em {
  font-style: normal;
  font-size: 1rem;
  color: var(--text-muted, #6b6459);
}

.itinerary-tab.active {
  background: var(--navy, #1b2a4a);
}

.itinerary-tab.active .itinerary-tab-num {
  color: #fff;
  border-color: #fff;
}

.itinerary-tab.active .itinerary-tab-info strong,
.itinerary-tab.active .itinerary-tab-info em {
  color: #fff;
}

.itinerary-tab.active .itinerary-tab-info em { opacity: 0.75; }

.itinerary-tab:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--orange, #d47b2e);
}

/* Panels */
.itinerary-panel { display: none; }
.itinerary-panel.active {
  display: block;
  animation: itineraryFade 300ms ease;
}

@keyframes itineraryFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .itinerary-panel.active { animation: none; }
}

/* Timeline */
.itinerary-timeline {
  position: relative;
  padding-left: 52px;
}

.itinerary-timeline::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 4px;
  bottom: 4px;
  border-left: 1.5px dashed var(--border-soft, #e4d9c0);
}

.itinerary-day {
  position: relative;
  margin-bottom: 22px;
}

.itinerary-day:last-child { margin-bottom: 0; }

.itinerary-day-marker {
  position: absolute;
  left: -52px;
  top: 2px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--navy, #1b2a4a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy, #1b2a4a);
  z-index: 1;
}

.itinerary-day-marker.is-final {
  background: var(--orange, #d47b2e);
  border-color: var(--orange, #d47b2e);
  color: #fff;
}

/* Marker is a real <button> so clicking it also toggles the day's details
   (previously only the summary text was clickable) — reset native button
   chrome and add the same hover affordance as the card. */
.itinerary-day-marker {
  appearance: none;
  padding: 0;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.itinerary-day-marker:hover {
  border-color: var(--orange, #d47b2e);
  color: var(--orange, #d47b2e);
  transform: scale(1.06);
}

.itinerary-day-marker.is-final:hover {
  color: #fff;
}

.itinerary-day-marker:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--orange, #d47b2e);
}

.itinerary-day-body {
  background: #fff;
  border: 1px solid var(--border-soft, #e4d9c0);
  border-radius: 12px;
  /* No padding here — it lives on <summary> instead (see below), so the
     entire padded card area is genuinely part of the clickable element,
     not just the text line inside it. */
  transition: border-color 150ms ease;
}

.itinerary-day-details:hover {
  border-color: var(--orange, #d47b2e);
}

.itinerary-day-body strong {
  font-size: 1rem;
}

/* Expandable day (details/summary) — reveals the full timed daily routine.
   Padding is on the summary itself (not the parent <details>) so clicking
   anywhere in the visible card — not just the text — toggles it, since
   only the <summary> box is natively clickable. */
.itinerary-day-details summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
}

.itinerary-day-details summary::-webkit-details-marker {
  display: none;
}

.itinerary-day-schedule {
  margin: 0 24px 20px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-soft, #e4d9c0);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: itineraryFade 250ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .itinerary-day-schedule { animation: none; }
}

.itinerary-schedule-row {
  display: flex;
  gap: 14px;
}

.itinerary-schedule-time {
  flex: none;
  width: 150px;
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--orange, #d47b2e);
  padding-top: 1px;
  text-align: center;
}

.itinerary-schedule-row strong {
  display: block;
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-size: 1rem;
  color: var(--navy, #1b2a4a);
}

.itinerary-schedule-row p {
  margin: 2px 0 0;
  font-size: 1rem;
  color: var(--text-muted, #6b6459);
}

@media (max-width: 480px) {
  /* Held back from the 150px desktop width — at 375px that would leave only
     ~180px for the activity text beside it. */
  .itinerary-schedule-time { width: 100px; font-size: 1rem; }
}

.itinerary-day-body strong {
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-size: 1.05rem;
  color: var(--navy, #1b2a4a);
}

.itinerary-day-body p {
  margin: 4px 0 0;
  font-size: 1rem;
  color: var(--text-muted, #6b6459);
}

@media (max-width: 640px) {
  .itinerary-tabs { grid-template-columns: 1fr; border-radius: 16px; }
  .itinerary-tab { border-right: 0; border-bottom: 1px dashed var(--border-soft, #e4d9c0); justify-content: flex-start; padding: 12px 16px; }
  .itinerary-tab:last-child { border-bottom: 0; }
  .itinerary-timeline { padding-left: 40px; }
  .itinerary-timeline::before { left: 15px; }
  .itinerary-day-marker { left: -40px; width: 32px; height: 32px; }
}

/* Programs By Level cards. Elevation comes from the shared shadow-card /
   shadow-card-hover tokens applied in the markup (same ones .card uses), so
   these stay consistent with every other card on the site — box-shadow is
   listed here only so the change eases rather than snapping. */
.level-card {
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.level-card:hover {
  border-color: var(--orange, #d47b2e);
  transform: translateY(-2px);
}

.level-card-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 2px;
  border-top: 1px dashed var(--border-soft, #e4d9c0);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink, #2b2b2b);
  text-decoration: none;
  transition: color 150ms ease, padding-left 150ms ease;
}

.level-card-link:first-of-type { border-top: 0; }

.level-card-link:hover {
  color: var(--orange-dark, #b8661f);
  padding-left: 6px;
}

.level-tag {
  flex: none;
  width: 40px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted, #6b6459);
  border: 1px solid var(--border-soft, #e4d9c0);
  border-radius: 5px;
}

.level-card-link:hover .level-tag {
  color: var(--orange-dark, #b8661f);
  border-color: var(--orange, #d47b2e);
}
.location-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  max-width: 600px;
  margin: 0 auto;
  border: 1.5px solid var(--navy, #1b2a4a);
  border-radius: 999px;
  background: #ffffff;
  overflow: hidden;
}

.location-tab {
  border: 0;
  border-right: 1px dashed var(--border-soft, #e4d9c0);
  background: transparent;
  padding: 12px 16px;
  cursor: pointer;
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy, #1b2a4a);
  transition: background-color 150ms ease, color 150ms ease;
}

.location-tab:last-child { border-right: 0; }

.location-tab:hover { background: rgba(212, 123, 46, 0.08); }

.location-tab.active {
  background: var(--navy, #1b2a4a);
  color: #fff;
}

.location-tab:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--orange, #d47b2e);
}

.location-panel { display: none; }
.location-panel.active {
  display: grid;
  animation: itineraryFade 300ms ease;
}

/* Modifier for location panels holding block content (e.g. a full itinerary
   component) rather than a grid of cards. */
.location-panel.location-panel--block.active {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .location-panel.active { animation: none; }
}

@media (max-width: 480px) {
  .location-tabs { grid-template-columns: 1fr; border-radius: 16px; }
  .location-tab { border-right: 0; border-bottom: 1px dashed var(--border-soft, #e4d9c0); }
  .location-tab:last-child { border-bottom: 0; }
}

/* Program level cards (Beginner / Intermediate / Advanced / Adults) on the
   Choose Your Path intro — informational, not clickable, so no cursor-pointer
   or focus ring; the hover lift is a quiet acknowledgement, not an affordance. */
.path-level-card {
  background: #fff;
  border: 1px solid var(--border-soft, #e4d9c0);
  border-radius: 14px;
  padding: 20px 18px;
  border-top: 3px solid var(--orange, #d47b2e);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

/* Hover elevation comes from the shared shadow-card-hover token in the markup;
   a hardcoded box-shadow here would compete with it at equal specificity. */
.path-level-card:hover {
  transform: translateY(-3px);
}

@media (prefers-reduced-motion: reduce) {
  .path-level-card { transition: none; }
  .path-level-card:hover { transform: none; }
}

/* Beginner / Intermediate / Advanced level switcher — day-by-day itinerary
   panels on the programs pages. A dedicated 3-column pill rather than reusing
   .location-tabs (hardcoded to 2 columns for Kids/Adults and Farmstay/
   Sunshine-Coast) — forcing a 3rd item into that grid wrapped onto a second
   row while the pill's 999px corners stayed on the outer box, producing a
   lopsided half-pill/half-rectangle shape. */
.level-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 920px;
  margin: 0 auto;
  border: 1.5px solid var(--navy, #1b2a4a);
  border-radius: 999px;
  background: #ffffff;
  overflow: hidden;
}

.level-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-right: 1px dashed var(--border-soft, #e4d9c0);
  background: transparent;
  padding: 14px 20px;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.level-tab:last-child { border-right: 0; }

.level-tab:hover { background: rgba(212, 123, 46, 0.08); }

.level-tab-num {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--orange, #d47b2e);
  color: var(--orange, #d47b2e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-size: 0.85rem;
  font-weight: 700;
  transition: color 150ms ease, border-color 150ms ease;
}

.level-tab-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.level-tab-info strong {
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy, #1b2a4a);
}

.level-tab-info em {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--text-muted, #6b6459);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .level-tab-info em { white-space: normal; }
}

.level-tab.active { background: var(--navy, #1b2a4a); }

.level-tab.active .level-tab-num {
  color: #fff;
  border-color: #fff;
}

.level-tab.active .level-tab-info strong,
.level-tab.active .level-tab-info em {
  color: #fff;
}

.level-tab.active .level-tab-info em { opacity: 0.75; }

.level-tab:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--orange, #d47b2e);
}

@media (max-width: 640px) {
  .level-tabs { grid-template-columns: 1fr; border-radius: 16px; }
  .level-tab { border-right: 0; border-bottom: 1px dashed var(--border-soft, #e4d9c0); justify-content: flex-start; padding: 12px 16px; }
  .level-tab:last-child { border-bottom: 0; }
}
