/*
  Places directory
  ----------------
  Loaded only on /places/* pages, after style.css. Kept separate so the
  purchased theme file stays byte-unchanged.
*/

/* --- Page head -----------------------------------------------------------
   The navbar is position:absolute with white text and only turns dark once
   the affix fires at scroll 12. Interior pages therefore need a dark band
   behind it or the nav is invisible at scroll 0. */

.page-head{
  position: relative;
  padding: 140px 0 60px;
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 100%);
  background-size: cover;
  color: var(--text-on-dark);
}

.page-head--photo{
  background-size: cover;
  background-repeat: no-repeat;
}

.page-head h1{
  margin: 0;
  color: var(--text-on-dark);
}

.page-head-lead{
  margin: 14px 0 0;
  max-width: 46em;
  font-size: 17px;
  line-height: 1.6;
  color: var(--on-image-text);
}

/* --- Breadcrumbs --------------------------------------------------------- */

.breadcrumbs{
  margin-bottom: 18px;
  font-size: 13px;
}

.breadcrumbs ol{
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li{
  display: inline;
  color: var(--on-image-text);
}

.breadcrumbs li + li:before{
  content: "›";
  margin: 0 8px;
  color: var(--on-image-muted);
}

.breadcrumbs a{
  color: var(--on-image-text);
  text-decoration: none;
  border-bottom: 1px solid var(--on-image-line);
}

.breadcrumbs a:hover{ color: var(--surface); }

/* --- Taxonomy pill ------------------------------------------------------- */

.tax-pill{
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 14px;
  border: 1px solid var(--on-image-muted);
  border-radius: 20px;
  color: var(--text-on-dark);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
}

.tax-pill:hover,
.tax-pill:focus{
  background: var(--surface);
  color: var(--brand);
  text-decoration: none;
}

/* --- Place cards ---------------------------------------------------------
   Not .showcase-item: that hides its label until :hover, which means the
   name never appears on a touch device. Here everything is always visible
   and hover is pure decoration. */

.place-grid{
  display: flex;
  flex-wrap: wrap;
  margin-top: 10px;
}

.place-grid > [class*="col-"]{
  display: flex;
  margin-bottom: 30px;
}

/* Bootstrap gives these columns a width at sm and up, and nothing below it.
   As flex items with no width they size to their own text, so a card with
   short copy sits narrow in a full-width row while a wordy one fills it.
   The directory's cards happen to be wordy enough to hide this; the square's
   are not. */
@media (max-width: 767px){
  .place-grid > [class*="col-"]{ width: 100%; }
}

.place-card{
  display: flex;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease;
}

.place-card:hover{
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.place-card-link{
  display: flex;
  flex-direction: column;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.place-card-link:hover,
.place-card-link:focus{
  color: inherit;
  text-decoration: none;
}

.place-card-media{
  position: relative;
  overflow: hidden;
  background: var(--surface-alt);
}

.place-card-media img{
  display: block;
  width: 100%;
  height: auto;
  transition: transform .4s ease;
}

.place-card:hover .place-card-media img{ transform: scale(1.04); }

.place-card-media--empty{
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  /* Explicit tint: the card inherits its parent section's background, so
     without this the icon floats on whatever colour the section happens to
     be, and disappears entirely on .bgc-light. */
  background: var(--surface-sunken);
  color: var(--border);
  font-size: 46px;
}

.place-card-tax{
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 11px;
  border-radius: 16px;
  background: rgba(20,24,33,0.82);
  color: var(--text-on-dark);
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.place-card-body{
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 20px 22px 22px;
}

.place-card-title{
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.3;
}

.place-card-summary{
  flex: 1 1 auto;
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.place-card-meta{
  margin: 0;
  color: var(--text-muted);
  font-size: 12.5px;
}

/* --- Detail page --------------------------------------------------------- */

.place-figure{ margin: 0 0 28px; }

.place-figure img{
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.place-figure figcaption{
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 12.5px;
}

.place-body{ font-size: 16px; line-height: 1.7; }
.place-body p{ margin: 0 0 1.1em; }
.place-body a{ border-bottom: 1px solid var(--border-brand); }

.place-body h2{
  margin: 1.6em 0 .6em;
  font-size: 24px;
  line-height: 1.3;
}

.place-body h3{
  margin: 1.4em 0 .5em;
  font-size: 18px;
  line-height: 1.4;
}

.place-body ul{
  margin: 0 0 1.1em;
  padding-left: 1.2em;
}

.place-body li{ margin-bottom: .5em; }

.place-quote{
  margin: 30px 0 0;
  padding: 4px 0 4px 22px;
  border: 0;
  border-left: 3px solid var(--accent);
}

.place-quote p{
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.6;
  font-style: italic;
  color: var(--text);
}

.place-quote footer{
  color: var(--text-muted);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.place-facts{
  padding: 26px 28px;
  background: var(--surface-alt);
  border-radius: 4px;
}

.place-facts h2{
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.place-facts dl{ margin: 0 0 18px; }

.place-facts dt{
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.place-facts dd{
  margin: 0 0 12px;
  font-size: 14.5px;
  line-height: 1.5;
}

/* Map actions, sitting directly under the address they act on. Icon plus a
   short label: an icon alone would not say which service opens. */
.place-map-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 8px;
}

.place-map-actions a{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  line-height: 1.3;
  white-space: nowrap;
}

.place-map-actions .icon{
  font-size: 13px;
  opacity: .75;
}

.place-map-actions a:hover .icon{ opacity: 1; }

.place-links{
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.place-links li{
  padding: 10px 0;
  border-bottom: 1px solid var(--border-strong);
  font-size: 14px;
}

.place-links li:last-child{ border-bottom: 0; }

.place-coords{
  margin: 0;
  color: var(--text-muted);
  font-family: Menlo, Consolas, monospace;
  font-size: 12px;
}

/* --- Video ---------------------------------------------------------------
   Facade: a thumbnail and a play button. The real iframe is only inserted
   after a click, so YouTube is not contacted on page load. */

.place-video{
  margin: 28px 0 0;
}

.place-video-trigger{
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: var(--ink);
  cursor: pointer;
  line-height: 0;
}

.place-video-trigger img{
  width: 100%;
  height: auto;
  opacity: .82;
  transition: opacity .25s ease, transform .4s ease;
}

.place-video-trigger:hover img,
.place-video-trigger:focus img{
  opacity: 1;
  transform: scale(1.03);
}

.place-video-play{
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  border-radius: 50%;
  background: rgba(187,66,66,0.92);
  color: var(--text-on-dark);
  font-size: 24px;
  line-height: 1;
  text-align: center;
  transition: background-color .25s ease, transform .25s ease;
}

.place-video-trigger:hover .place-video-play{
  background: var(--accent);
  transform: scale(1.06);
}

.place-video-play .icon{
  margin-left: 4px;   /* optical centring of the triangle */
  font-size: 24px;
  color: var(--text-on-dark);
  vertical-align: middle;
}

.place-video-frame{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: var(--ink);
}

.place-video-frame iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.place-video figcaption{
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

/* --- Distance table ------------------------------------------------------ */

.place-distances{
  width: 100%;
  margin: 0 auto;
  border-collapse: collapse;
}

.place-distances caption{
  padding-bottom: 14px;
  color: var(--text-muted);
  font-size: 12.5px;
  text-align: center;
  caption-side: top;
}

.place-distances th,
.place-distances td{
  padding: 13px 14px;
  border-bottom: 1px solid var(--border-strong);
  text-align: left;
  font-size: 14.5px;
}

.place-distances thead th{
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.place-distances tbody th{ font-weight: 400; }

.place-distances tbody th a{
  border-bottom: 1px solid var(--border-brand);
}

.place-travel-note{
  margin: 14px 0 0;
  padding: 12px 16px;
  border-left: 3px solid var(--brand);
  background: rgba(66,92,187,0.05);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

/* --- Public transport ----------------------------------------------------
   Line numbers as outlined badges, grouped by mode with an icon per row. */

.place-transport{
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border-strong);
}

/* The sidebar copy sits directly under "The details" and, when the columns
   stack on phones, lands in exactly the right place: after the details and
   before the distance table. One copy serves both layouts. */
@media (max-width: 991px){
  .place-transport{
    margin-top: 26px;
    padding: 22px 22px 24px;
    background: var(--surface-alt);
    border-top: 0;
    border-radius: 4px;
  }
}

.place-transport-modes{
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: start;
  gap: 10px 12px;
  margin: 0;
}

.place-transport-modes dt{
  padding-top: 0;
  text-align: center;
}

/* STIB convention: the mode as a letter in a red disc. */
.transport-mode{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-on-dark) !important;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

/* Light disc with a dark glyph: the rail mark reads as a station rather than
   another service line, and the icon stays legible at 13px. */
.transport-mode--stop{
  background: var(--surface-sunken);
  color: var(--text) !important;
  font-size: 13px;
}

.place-transport-modes dd{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.transport-line{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  border: 1.5px solid var(--text);
  border-radius: 5px;
  color: var(--text);
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

/* Metro line badges are filled with the official STIB colour, set inline
   because the value comes from the data layer. Foreground is picked per line
   so every badge clears WCAG 3:1 for bold text. */
.transport-line--metro{
  border-width: 1.5px;
}

.transport-stop{
  border-style: solid;
  border-color: rgba(59,65,73,0.45);
  font-weight: 400;
  letter-spacing: .01em;
}

/* Screen-reader-only label, so each icon row is announced by name. */
.place-transport .sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.place-distances .is-primary{ background: var(--brand-wash); }
.place-distances .is-primary th,
.place-distances .is-primary td{ font-weight: 700; }

/* --- Index pages --------------------------------------------------------- */

.places-intro{
  margin: 0 auto 10px;
  max-width: 44em;
  color: var(--text-muted);
  line-height: 1.6;
}

.section-title a{ color: inherit; text-decoration: none; }
.section-title a:hover{ color: var(--brand); }

.places-more{ margin: 10px 0 0; }

.places-empty{ color: var(--text-muted); }

.places-taxbar a{
  display: inline-block;
  margin: 6px 8px;
  padding: 9px 18px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 20px;
  font-size: 13px;
  text-decoration: none;
}

.places-taxbar a:hover{
  border-color: var(--brand);
  color: var(--brand);
}

/* --- Small screens ------------------------------------------------------- */

@media (max-width: 767px){

  .page-head{ padding: 110px 0 40px; }

  .page-head-lead{ font-size: 15.5px; }

  .place-facts{ margin-top: 34px; }

  /* Stack the table into labelled rows — Bootstrap 3 has no utility that
     degrades a data table well at this width. */
  .place-distances,
  .place-distances tbody,
  .place-distances tr,
  .place-distances th,
  .place-distances td{
    display: block;
    width: 100%;
  }

  .place-distances thead{ display: none; }

  .place-distances caption{
    display: block;
    width: 100%;
    text-align: left;
  }

  .place-distances tr{
    padding: 12px 0;
    border-bottom: 1px solid var(--border-strong);
  }

  .place-distances th,
  .place-distances td{
    padding: 3px 0;
    border: 0;
  }

  .place-distances tbody th{ font-weight: 700; }

  .place-distances td:before{
    content: attr(data-label) ": ";
    color: var(--text-muted);
    font-size: 12.5px;
  }

  .place-distances .is-primary{
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (min-width: 992px){
  /* Facts panel follows the reader down the Markdown body. */
  .place-facts{
    position: sticky;
    top: 92px;
  }
}

/* ---- Guides ------------------------------------------------------------ */
.guide-body h2 { margin-top: 1.8em; }
.guide-body ul { margin-bottom: 1.2em; }

/* ---- Byline inside the dark page head ---------------------------------- */
/* Sits under the lead. Colours are tuned for the dark hero band, not the
   page body: .page-head is a dark gradient (see partials/page-head.php). */
.page-byline{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1;
  color: var(--on-image-text);
}
.page-byline-avatar{
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  /* Hairline ring: a dark portrait would otherwise vanish into the hero. */
  box-shadow: 0 0 0 1px var(--on-image-line);
}
.page-byline-name a{
  color: var(--text-on-dark);
  font-weight: 600;
  border-bottom: 1px solid var(--on-image-line);
}
.page-byline-name a:hover{
  color: var(--text-on-dark);
  border-bottom-color: var(--surface);
}
.page-byline-sep{
  /* flex: 0 0 auto is required: as a flex item this dot would otherwise be
     shrunk to zero width and disappear. */
  flex: 0 0 auto;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--on-image-muted);
}
.page-byline-date{ white-space: nowrap; }

@media (max-width: 480px){
  .page-byline{ font-size: 13px; gap: 8px; }
  .page-byline-avatar{ width: 28px; height: 28px; }
}

/* ---- Author box -------------------------------------------------------- */
.author-box{
  margin: 0;
  padding: 24px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.author-box-kicker{
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.author-box-inner{
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.author-box-photo-link{
  flex: 0 0 auto;
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--border);
}
.author-box-photo{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.author-box-body{ flex: 1 1 auto; min-width: 0; }
.author-box-name{
  margin: 0 0 2px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}
.author-box-name a{ color: var(--text); }
.author-box-name a:hover{ color: var(--brand); }
.author-box-role{
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-muted);
}
.author-box-bio{
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text);
}
.author-box-links{
  margin: 12px 0 0;
  font-size: 13px;
}
.author-box-links a{
  display: inline-block;
  margin: 0 8px 4px 0;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
}
.author-box-links a:hover{
  border-color: var(--brand);
  color: var(--brand);
}

/* Lead variant: the author page header, where the box is not a footnote. */
.author-box--lead{
  background: transparent;
  border: 0;
  padding: 0;
}
.author-box--lead .author-box-inner{ gap: 22px; }
.author-box--lead .author-box-photo-link{ width: 112px; height: 112px; }

/* The index grid puts these in columns; equal height keeps the row tidy. */
.row .author-box{ height: 100%; }

@media (max-width: 767px){
  .author-box-inner{
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
  }
  .author-box-links a{ margin: 0 4px 4px; }
}

/* Guides use Markdown tables; the places directory never needed them. */
.guide-body table {
  width: 100%;
  margin: 0 0 1.4em;
  border-collapse: collapse;
  font-size: 0.9375em;
}
.guide-body th,
.guide-body td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.guide-body th { font-weight: 700; }
.guide-body td:not(:first-child),
.guide-body th:not(:first-child) { text-align: right; }

/* Wide tables scroll inside their own box rather than the page. */
.guide-body { overflow-x: auto; }

/* Tables inside a place body (Markdown pipe tables). The distance table has
   its own component styles; this covers anything an author writes in prose,
   such as the seasonal opening hours on the Petit Sablon. Scrolls rather than
   overflowing on a narrow screen. */
.place-body table{
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 26px;
}

.place-body th,
.place-body td{
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--border-strong);
  text-align: left;
  font-size: 15px;
  vertical-align: top;
}

.place-body thead th{
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

@media (max-width: 480px){
  .place-body table{ display: block; overflow-x: auto; }
}

/* --- The apartment page's own section nav --------------------------------
   The global navbar carries one item per section of the site, so the
   apartment's internal anchors live on the page itself. */

.apt-subnav{
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.apt-subnav ul{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
}
.apt-subnav a{
  display: inline-block;
  padding: 13px 12px;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.apt-subnav a:hover,
.apt-subnav a:focus{
  color: var(--brand);
  border-bottom-color: var(--brand);
}

@media (max-width: 767px){
  /* Wrapping put three rows of chips between the hero and the first section
     on a phone. One scrolling row keeps the page moving; the items are all
     anchors to headings that are also visible further down, so nothing is
     lost by having to swipe for the last of them. */
  .apt-subnav ul{
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .apt-subnav ul::-webkit-scrollbar{ display: none; }
  .apt-subnav a{ white-space: nowrap; }
}

/* --- Brand wordmark on narrow screens ------------------------------------
   "Brussels Grand Place." at the theme's 27px is 305px wide, which wraps to
   two lines under 360px and collides with the .page-head h1 below it. The
   navbar is position:absolute, so a wrapped brand overlaps rather than
   pushing the heading down. Mirrors partials/critical.css, which has to say
   the same thing for first paint because style.css re-asserts 27px. */

@media (max-width: 767px){
  .brand{
    font-size: 20px;
    white-space: nowrap;
  }
}

/* --- The Grand-Place Award on a laureate's page -------------------------
   The seal sits above "The details" because it is a judgement about the
   place rather than a fact about it, and it always carries a link to the
   criteria: a sticker nobody can check is the thing this scheme is trying
   not to be. */

.place-award{
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-strong);
}

.place-award img{
  display: block;
  width: 78px;
  height: 78px;
  flex-shrink: 0;
}

.place-award p{
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
}

.place-award strong{
  display: block;
  color: var(--text);
  font-weight: 700;
}

.place-award a{ font-size: 12.5px; }

/* On a card: small, top-right, opposite the taxonomy chip. */
.place-card-award{
  position: absolute;
  right: 10px;
  top: 10px;
  width: 46px;
  height: 46px;
  padding: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
}

.place-card-award img{
  display: block;
  width: 100%;
  height: 100%;
}
