/* Unit cards and their photos, activity tags and the missing-photo fallback. */

.website-unit {
  display: grid;
  grid-template-columns: 31% 1fr auto;
  align-items: center;
  gap: 30px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.website-unit-photo {
  height: 190px;
  overflow: hidden;
}
.website-unit-photo > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.website-unit-photo:hover > img {
  transform: scale(1.03);
}
.website-unit h3 {
  margin-bottom: 10px;
}
.website-unit p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.website-unit .website-location {
  margin-bottom: 7px;
}
.website-unit > .website-button {
  font-size: 13px;
  padding: 11px 20px;
  gap: 20px;
}
.website-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.website-tags a {
  display: inline-flex;
  background: #e9f8f0;
  color: #225c46;
  border-radius: 30px;
  font-size: 12px;
  padding: 5px 14px;
}
.website-tags a:hover {
  background: #d4eddf;
}
.website-no-photo {
  height: 100%;
  position: relative;
  overflow: hidden;
}
.website-no-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.website-no-photo span {
  position: absolute;
  bottom: 8px;
  inset-inline-start: 10px;
  font-size: 10px;
  padding: 3px 7px;
  background: #ffffffeb;
  color: #455a50;
  border-radius: 3px;
}

/* ── A unit's own page ──────────────────────────────────────────────────
   The gallery is the hero: the photos fill the top of the page and the name,
   the location and the actions sit on top of them. Every slide is
   server-rendered and the first one is visible through these rules alone;
   the island adds `is-interactive`, which is what reveals the arrows and the
   full-screen button -- so a blocked bundle never leaves a dead control. */
/* Full-bleed: the hero is the first thing on the page and runs edge to
   edge, so it is deliberately outside the container the rest sits in. */
.public-unit-hero {
  position: relative;
  margin-bottom: 36px;
}
.public-unit-hero-media {
  position: relative;
  background: #0d1b2a;
  overflow: hidden;
  height: clamp(420px, 56vh, 620px);
}
/* The overlay text lines up with the page's container rather than with the
   window edge, so the title sits over the same column as the content. */
.public-unit-hero-overlay > * {
  max-width: 1200px;
  margin-inline: auto;
}
.website-gallery-slide {
  display: none;
  width: 100%;
  height: 100%;
  margin: 0;
}
.website-gallery-slide.is-current {
  display: block;
}
.website-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* The text sits on the photo, so the photo needs a floor under it: a
   gradient rather than a flat veil keeps the top of the image readable. */
.public-unit-hero-overlay {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 110px 24px 32px;
  background: linear-gradient(to top, #081423f2 15%, #0814238c 55%, transparent);
  color: #fff;
}
/* The text sits on a photograph, so every line carries its own shadow: the
   gradient alone cannot be trusted against a bright or busy image. */
.public-unit-hero-overlay .website-eyebrow {
  color: #a9e8c6;
  text-shadow: 0 1px 6px #00000080;
}
.public-unit-hero-overlay h1 {
  margin: 6px 0 10px;
  font-size: 38px;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 2px 14px #000000a6, 0 1px 3px #00000073;
}
.public-unit-hero-location,
.public-unit-hero-groups {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: #e8eef8;
  text-shadow: 0 1px 8px #000000a6;
}
.public-unit-hero-groups {
  margin-top: 4px;
}
.public-unit-hero-groups strong {
  color: #fff;
}
.public-unit-hero-illustration {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  padding: 4px 10px;
  border-radius: 4px;
  background: #ffffffe0;
  color: #455a50;
  font-size: 11px;
}
.website-gallery-arrow,
.website-gallery-expand {
  position: absolute;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 999px;
  background: #ffffffe6;
  color: #15233b;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.website-gallery-arrow {
  width: 42px;
  height: 42px;
  font-size: 26px;
  top: calc(50% - 21px);
}
.public-unit-hero.is-interactive .website-gallery-arrow,
.public-unit-hero.is-interactive .website-gallery-expand {
  display: flex;
}
.website-gallery-arrow:hover,
.website-gallery-expand:hover {
  background: #fff;
}
.website-gallery-arrow.previous {
  inset-inline-start: 14px;
}
.website-gallery-arrow.next {
  inset-inline-end: 14px;
}
.website-gallery-expand {
  top: 14px;
  inset-inline-end: 14px;
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
}
.website-gallery-counter {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  padding: 4px 12px;
  border-radius: 20px;
  background: #0d1b2ab3;
  color: #fff;
  font-size: 12px;
  z-index: 2;
}
.website-gallery-thumbs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  padding: 0;
  list-style: none;
  overflow-x: auto;
}
.website-gallery-thumbs button {
  width: 92px;
  height: 62px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: none;
  cursor: pointer;
}
.website-gallery-thumbs button.is-current {
  border-color: var(--green);
}
.website-gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Two columns under the hero: what the facility is, and where it is with
   how to reach it. One column on a phone, information first. */
.public-unit-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}
.public-unit-panel {
  padding: 26px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.public-unit-panel .public-detail-label:first-child {
  margin-top: 0;
}
.public-unit-aside {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.public-unit-contacts {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}
.public-unit-contacts li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.public-unit-contacts a:hover {
  color: var(--blue);
}
.public-unit-map {
  width: 100%;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.public-unit-social a {
  background: #eef2fb;
  color: #2b4470;
}
.public-unit-social a:hover {
  background: #e0e7f6;
}
.public-unit-groups {
  margin-top: 40px;
}
@media (max-width: 980px) {
  .public-unit-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 860px) {
  .public-unit-hero-media {
    height: clamp(340px, 62vh, 480px);
  }
  .public-unit-hero-overlay {
    padding: 70px 20px 22px;
  }
  .public-unit-hero-overlay h1 {
    font-size: 27px;
  }
  .website-gallery-expand span {
    display: none;
  }
  .website-gallery-thumbs button {
    width: 72px;
    height: 50px;
  }
}
