/* ==========================================================================
   Print styles
   1. Printable timetable document (timetable-print.html) — screen preview + print
   2. General print rules for every page (loaded with media="print" on site pages)
   ========================================================================== */

/* ---------- 1. Timetable document ---------- */
@page { size: A4 portrait; margin: 12mm; }
@page tt { size: A4 portrait; margin: 0; }
.tt-page { page: tt; }

.tt-body { background: #e9e3d8; }
.tt-toolbar { position: sticky; top: 0; z-index: 10; background: var(--ivory); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.tt-toolbar__inner { max-width: 210mm; margin: 0 auto; padding: .9rem 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; justify-content: space-between; }
.tt-toolbar__help { flex: 1 1 300px; font-size: .88rem; color: var(--muted); line-height: 1.5; }
.tt-toolbar__help strong { display: block; color: var(--burgundy); font-size: .95rem; }

.tt-doc { padding: 24px 12px 48px; display: grid; gap: 24px; justify-content: center; }
.tt-page {
  width: 210mm; height: 297mm; padding: 16mm 16mm 14mm; background: #fff; color: var(--charcoal);
  box-shadow: 0 10px 40px rgba(41, 37, 37, .18); display: flex; flex-direction: column; overflow: hidden; position: relative;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}

/* Cover */
.tt-cover { background: var(--ivory); padding: 12mm; }
.tt-frame {
  flex: 1; border: 1.5px solid var(--gold); outline: 1px solid var(--gold); outline-offset: -6px; padding: 18mm 16mm 14mm;
  display: flex; flex-direction: column; align-items: center; text-align: center; position: relative;
  background: url('../assets/images/pattern-mandala.svg') center 62% / 150mm no-repeat;
}
.tt-frame::before { content: ''; position: absolute; inset: 0; background: rgba(250, 247, 240, .9); z-index: 0; }
.tt-frame > * { position: relative; z-index: 1; }
.tt-cover__logo { width: 92mm; height: auto; margin-bottom: 9mm; }
.tt-cover__name { font-size: 25pt; color: var(--maroon); font-weight: 600; line-height: 1.15; margin: 0 0 3mm; }
.tt-cover__est { font-size: 9pt; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-dark); margin: 0; }
.tt-rule { display: flex; align-items: center; gap: 4mm; width: 70mm; margin: 7mm 0 5mm; }
.tt-rule::before, .tt-rule::after { content: ''; flex: 1; height: 1px; background: var(--gold); }
.tt-rule span { width: 3mm; height: 3mm; border: 1px solid var(--gold); transform: rotate(45deg); }
.tt-cover__doc { font-family: var(--font-serif); font-style: italic; font-size: 19pt; color: var(--burgundy); margin: 0 0 8mm; }
.tt-cover__about { font-size: 10pt; line-height: 1.7; color: #3d3636; max-width: 150mm; margin: 0 0 9mm; }
.tt-cover__location {
  display: flex; gap: 4mm; align-items: flex-start; text-align: left; background: #fff; border: 1px solid var(--line);
  border-left: 3px solid var(--maroon); padding: 4.5mm 6mm; margin-bottom: 8mm; width: 100%; max-width: 150mm;
}
.tt-cover__location svg { width: 8mm; height: 8mm; color: var(--maroon); flex: none; }
.tt-cover__location address { font-style: normal; font-size: 10pt; line-height: 1.55; }
.tt-cover__location strong { display: block; font-size: 7.5pt; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 1mm; }
.tt-contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; width: 100%; max-width: 150mm; margin: auto 0 0; text-align: left; }
.tt-contact { background: #fff; border: 1px solid var(--line); padding: 3.5mm 5mm; }
.tt-contact dt { display: flex; align-items: center; gap: 2mm; font-size: 7.5pt; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 1.2mm; }
.tt-contact dt svg { width: 4.2mm; height: 4.2mm; color: var(--maroon); }
.tt-contact dd { margin: 0; font-size: 10.5pt; font-weight: 600; color: var(--burgundy); line-height: 1.5; }
.tt-contact small { font-weight: 400; color: var(--muted); font-size: 8pt; }

/* List page */
.tt-head { display: flex; align-items: center; gap: 6mm; padding-bottom: 4mm; border-bottom: 2px solid var(--maroon); margin-bottom: 5mm; }
.tt-head img { width: 46mm; height: auto; flex: none; }
.tt-head__name { font-family: var(--font-serif); font-size: 14pt; font-weight: 600; color: var(--maroon); margin: 0; line-height: 1.2; }
.tt-head__title { font-family: var(--font-sans); font-size: 8pt; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-dark); margin: 1.5mm 0 0; }
.tt-table { width: 100%; border-collapse: collapse; font-size: 9pt; }
.tt-table thead th { background: var(--burgundy); color: var(--ivory); text-align: left; font-size: 7pt; letter-spacing: .14em; text-transform: uppercase; padding: 2mm 3mm; }
.tt-table td, .tt-table tbody th { padding: 1.3mm 3mm; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.tt-table tbody tr:nth-child(even) td, .tt-table tbody tr:nth-child(even) th { background: #fbf7ef; }
.tt-table tbody th { font-family: var(--font-serif); font-size: 11pt; font-weight: 600; color: var(--burgundy); white-space: nowrap; }
.tt-no { width: 9mm; color: var(--gold-dark); font-weight: 600; }
.tt-sessions { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .8mm 4mm; }
.tt-sessions li { white-space: nowrap; }
.tt-sessions b { font-weight: 600; color: var(--maroon); }
.tt-holiday { margin-top: 4mm; padding: 3mm 4mm; border: 1px dashed var(--gold); background: var(--ivory); font-size: 8.5pt; color: var(--muted); }
.tt-holiday strong { color: var(--maroon); margin-right: 1.5mm; }
.tt-foot {
  margin: auto -16mm -14mm; padding: 4.5mm 16mm; background: var(--maroon); color: var(--ivory);
  display: flex; justify-content: space-between; gap: 4mm; font-size: 9pt; font-weight: 500;
}
.tt-foot span { display: inline-flex; align-items: center; gap: 2mm; }
.tt-foot svg { width: 4.5mm; height: 4.5mm; color: var(--gold-light); }

/* Small screens: let the preview sheets shrink rather than overflow */
@media screen and (max-width: 840px) {
  .tt-doc { padding: 12px 0 32px; }
  .tt-page { width: auto; height: auto; min-height: 0; margin: 0 8px; padding: 18px; }
  .tt-cover { padding: 10px; }
  .tt-frame { padding: 28px 16px; }
  .tt-cover__logo { width: 70%; }
  .tt-contacts { grid-template-columns: 1fr; margin-top: 16px; }
  .tt-table tbody th { white-space: normal; font-size: 10.5pt; }
  .tt-table td, .tt-table tbody th { padding: 8px 6px; }
  .tt-no { display: none; }
  .tt-table thead th:first-child { display: none; }
  .tt-sessions { flex-direction: column; }
  .tt-head { flex-wrap: wrap; }
  .tt-head > div { min-width: 0; }
  .tt-foot { flex-direction: column; margin: 18px -18px -18px; padding: 14px 18px; }
}

/* ---------- 2. Print ---------- */
@media print {
  html, body { background: #fff !important; }
  .tt-toolbar { display: none !important; }
  .tt-doc { padding: 0; display: block; }
  .tt-page { box-shadow: none; margin: 0; width: 210mm; height: 297mm; break-after: page; page-break-after: always; }
  .tt-page:last-child { break-after: auto; page-break-after: auto; }

  /* General site pages */
  .site-header, .nav-toggle, .float-whatsapp, .audio-toggle, .hero__controls, .skip-link,
  .catalogue-toolbar, .modal, .lightbox, .cta-band, .map-frame, .btn, .btn-row, form .btn { display: none !important; }
  body:not(.tt-body) { font-size: 11pt; color: #000; background: #fff; }
  .section { padding-block: 12mm !important; }
  .section--dark, .section--maroon, .page-hero { background: #fff !important; color: #000 !important; }
  .section--dark h2, .page-hero h1, .page-hero p { color: #000 !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero__slide:not(.is-active) { display: none; }
  .timetable-wrap { overflow: visible; border: 0; }
  .timetable { min-width: 0; font-size: 8.5pt; }
  .timetable thead th { position: static; }
  a[href^="http"]:not(.btn)::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; word-break: break-all; }
  .site-footer { background: #fff; color: #000; }
  .site-footer a { color: #000; }
  img { break-inside: avoid; }
}

.tt-back::after { content: none; }
.tt-back::before { content: "\2190"; }
