.heritage-page {
  background: #f5fbff;
}

.heritage-page h1,
.heritage-page h2,
.heritage-page h3 {
  font-family: "Montserrat", sans-serif;
}

/* HERO */
.heritage-hero {
  position: relative;
  isolation: isolate;
  min-height: 330px;
  background: url("../../img/geral/hero/moinho.JPG") center 47% / cover no-repeat;
}

.heritage-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(4, 46, 75, .91), rgba(4, 46, 75, .50) 56%, rgba(4, 46, 75, .12));
}

.heritage-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 330px;
  padding-top: 25px;
  padding-bottom: 88px;
}

.heritage-hero-copy {
  max-width: 760px;
}

.hero-kicker,
.section-kicker,
.results-label {
  display: inline-block;
  color: #2aa8e1;
  font: 800 .76rem/1 "Montserrat", sans-serif;
  letter-spacing: .14em;
}

.hero-kicker {
  margin-bottom: 10px;
  color: #8dd8f7;
}

.heritage-hero h1 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.045em;
}

.heritage-hero p {
  max-width: 720px;
  margin: 0;
  color: #fff;
  font-size: clamp(1.05rem, 1.55vw, 1.35rem);
  line-height: 1.55;
}

.heritage-waves {
  position: absolute;
  z-index: 3;
  inset: auto 0 -1px;
  height: clamp(65px, 7vw, 105px);
  pointer-events: none;
}

.heritage-waves svg {
  display: block;
  width: 100%;
  height: 100%;
}

.heritage-wave-blue { fill: rgba(58, 171, 221, .86); }
.heritage-wave-green { fill: rgba(35, 151, 73, .91); }
.heritage-wave-white { fill: #f5fbff; }

/* EXPLORADOR */
.heritage-explorer {
  padding: 24px 0 84px;
  background:
    radial-gradient(circle at 7% 18%, rgba(222, 244, 255, .9), transparent 29%),
    linear-gradient(#f5fbff, #fff 55%);
}

.heritage-container {
  max-width: 1500px;
  padding-inline: clamp(18px, 4vw, 62px);
}

.heritage-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 20px;
}

.heritage-heading h2 {
  margin: 6px 0 5px;
  color: #142d50;
  font-size: clamp(1.9rem, 3vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -.04em;
}

.heritage-heading p {
  max-width: 780px;
  margin: 0;
  color: #617791;
  font-size: 1rem;
}

/* PESQUISA + FILTROS */
.heritage-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.heritage-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 330px;
  min-width: 250px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid #d4e5f2;
  border-radius: 13px;
  background: #fff;
  color: #1b5e8c;
  box-shadow: 0 4px 14px rgba(19, 73, 108, .05);
}

.heritage-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #193a58;
  font-size: .95rem;
}

.heritage-search input::placeholder { color: #8195a8; }

.heritage-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.heritage-filter {
  min-height: 40px;
  padding: 7px 16px;
  border: 1px solid #d6e5ef;
  border-radius: 999px;
  background: #fff;
  color: #335a77;
  font: 700 .82rem "Montserrat", sans-serif;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.heritage-filter:hover {
  border-color: #9ecce5;
  transform: translateY(-1px);
}

.heritage-filter.is-active,
.heritage-filter[aria-pressed="true"] {
  border-color: #114983;
  background: #114983;
  color: #fff;
}

/* MAPA + LISTA */
.heritage-browser {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, .55fr);
  min-height: 590px;
  overflow: hidden;
  border: 1px solid #d6e6ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 45px rgba(7, 55, 87, .09);
}

.heritage-map-panel {
  position: relative;
  min-width: 0;
  background: #dfeef5;
}

.heritage-map {
  width: 100%;
  height: 100%;
  min-height: 590px;
}


.heritage-results-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-left: 1px solid #dce8ef;
  background: #fbfdff;
}

.heritage-results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 20px 15px;
  border-bottom: 1px solid #e3edf3;
}

.heritage-results-head strong {
  display: block;
  margin-top: 4px;
  color: #173c5b;
  font: 800 .94rem "Montserrat", sans-serif;
}

.scroll-hint {
  color: #8ba0b1;
  font-size: .72rem;
}

.heritage-results {
  flex: 1;
  min-height: 0;
  max-height: 525px;
  overflow-y: auto;
  padding: 12px;
  scrollbar-width: thin;
  scrollbar-color: #b9d3e3 transparent;
}

.heritage-results::-webkit-scrollbar { width: 7px; }
.heritage-results::-webkit-scrollbar-thumb { border-radius: 10px; background: #b9d3e3; }

.heritage-card {
  display: grid;
  grid-template-columns: 118px 1fr;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dce9f0;
  border-radius: 12px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 4px 13px rgba(11, 55, 85, .045);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.heritage-card:hover {
  transform: translateY(-1px);
  border-color: #a8cfe4;
  box-shadow: 0 7px 18px rgba(11, 55, 85, .08);
}

.heritage-card.is-active {
  border-color: #176da8;
  box-shadow: 0 0 0 2px rgba(23, 109, 168, .10), 0 8px 20px rgba(11, 55, 85, .09);
}

.heritage-card.is-hovered:not(.is-active) {
  border-color: #9fcde7;
  box-shadow: 0 8px 20px rgba(10, 72, 110, .10);
}


.heritage-card-thumb {
  min-height: 108px;
  background: linear-gradient(135deg, #d9edf6, #c6dde8);
}

.heritage-card-thumb.no-image::after {
  content: "Imagem";
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: inherit;
  color: #7794a7;
  font: 700 .72rem "Montserrat", sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.heritage-card-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 108px;
  object-fit: cover;
}

.heritage-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 13px 14px;
}

.heritage-card-category {
  margin-bottom: 4px;
  color: #176da8;
  font: 800 .67rem "Montserrat", sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.heritage-card[data-category="moinhos"] .heritage-card-category { color: #b45e0f; }
.heritage-card[data-category="miradouros"] .heritage-card-category { color: #267b57; }
.heritage-card[data-category="monumentos"] .heritage-card-category { color: #765335; }
.heritage-card[data-category="natural"] .heritage-card-category { color: #1e7749; }

.heritage-card h3 {
  margin: 0 0 5px;
  color: #173858;
  font-size: .94rem;
  line-height: 1.24;
  font-weight: 800;
}

.heritage-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #71869a;
  font-size: .78rem;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.heritage-empty {
  padding: 38px 22px;
  text-align: center;
  color: #6e8295;
}

.heritage-empty strong {
  display: block;
  margin-bottom: 6px;
  color: #254b67;
}

.heritage-empty p { margin: 0; font-size: .9rem; }

/* PINS MAPLIBRE */
.heritage-map-marker {
  --pin-color: #176da8;
  display: grid;
  place-items: end center;
  width: 44px;
  height: 52px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: pointer;
}

/* O vermelho fica reservado exclusivamente ao local selecionado. */
.heritage-map-marker[data-category="igrejas"] { --pin-color: #176da8; }
.heritage-map-marker[data-category="moinhos"] { --pin-color: #e58a27; }
.heritage-map-marker[data-category="miradouros"] { --pin-color: #168d73; }
.heritage-map-marker[data-category="monumentos"] { --pin-color: #7257a5; }
.heritage-map-marker[data-category="natural"] { --pin-color: #3a9453; }

.heritage-map-pin {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 9px;
  background: var(--pin-color);
  box-shadow: 0 4px 10px rgba(8, 52, 82, .22);
  transform: rotate(-45deg);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.heritage-map-pin-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  transform: rotate(45deg);
  pointer-events: none;
}

.heritage-map-marker.is-hovered:not(.is-active) .heritage-map-pin {
  transform: rotate(-45deg) scale(1.08);
  box-shadow: 0 5px 12px rgba(8, 52, 82, .28);
}

.heritage-map-marker.is-active {
  --pin-color: #df2f2f;
  z-index: 3;
}

.heritage-map-marker.is-active .heritage-map-pin {
  transform: rotate(-45deg) scale(1.10);
  box-shadow: 0 5px 12px rgba(110, 18, 18, .28);
}

.heritage-map-marker:focus-visible .heritage-map-pin {
  outline: 2px solid #114983;
  outline-offset: 3px;
}

.maplibregl-ctrl-group button { color: #114983; }

/* ==================================================
   DETALHE DO LOCAL / EDIFÍCIO
================================================== */
.heritage-detail {
  margin-top: 30px;
  overflow: hidden;
  border: 1px solid #d9e8f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 15px 42px rgba(7, 55, 87, .08);
}

.heritage-detail[hidden] { display: none !important; }

.heritage-detail-main-grid {
  display: grid;
  grid-template-columns: minmax(430px, 1.05fr) minmax(390px, .98fr) minmax(220px, .46fr);
  align-items: stretch;
  gap: clamp(24px, 2.6vw, 38px);
  padding: clamp(24px, 2.4vw, 34px);
}

/* GALERIA - imagem principal + miniaturas, sem limite de fotografias */
.heritage-detail-gallery {
  min-width: 0;
}

.heritage-main-photo {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  margin: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #dceef7, #c9e0eb);
}

.heritage-main-photo img {
  display: block;
  width: 100%;
  height: 430px;
  object-fit: cover;
}

.heritage-image-placeholder {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: #7895a9;
  font: 700 .75rem "Montserrat", sans-serif;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.heritage-main-photo.no-image .heritage-image-placeholder { display: grid; }
.heritage-main-photo.no-image img { display: none; }

.gallery-nav {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 50%;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: 0 !important;
  outline: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .97) !important;
  color: #174b78;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  touch-action: manipulation;
  pointer-events: auto;
  box-shadow: 0 5px 16px rgba(7, 55, 87, .16);
  transform: translateY(-50%);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.gallery-nav::before,
.gallery-nav::after {
  content: none !important;
  display: none !important;
}

.gallery-nav svg {
  display: block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  overflow: visible;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.gallery-nav:hover {
  border: 0 !important;
  outline: 0 !important;
  background: #fff !important;
  transform: translateY(-50%) scale(1.06);
  box-shadow: 0 7px 20px rgba(7, 55, 87, .20);
}

.gallery-nav:active {
  transform: translateY(-50%) scale(.97);
}

.gallery-nav:focus {
  outline: 0;
}

.gallery-nav:focus-visible {
  outline: 2px solid #1684c5;
  outline-offset: 3px;
}

.gallery-nav--prev { left: 16px; }
.gallery-nav--next { right: 16px; }
.gallery-nav[hidden] { display: none !important; }

.gallery-counter {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(9,43,68,.82);
  color: #fff;
  font: 700 .72rem "Montserrat", sans-serif;
}

.heritage-thumbnails {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  max-height: 185px;
  margin-top: 10px;
  padding-right: 4px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #bdd4e2 transparent;
}

.heritage-thumbnails::-webkit-scrollbar { width: 6px; }
.heritage-thumbnails::-webkit-scrollbar-thumb { border-radius: 10px; background: #bdd4e2; }

.heritage-thumb {
  position: relative;
  aspect-ratio: 1.45 / 1;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 9px;
  background: #dcecf4;
  cursor: pointer;
}

.heritage-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.heritage-thumb.is-active {
  border-color: #1684c5;
  box-shadow: 0 0 0 2px rgba(22,132,197,.12);
}

.heritage-thumb.no-image::after {
  content: "Imagem";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #7895a9;
  font: 700 .62rem "Montserrat", sans-serif;
  text-transform: uppercase;
}

/* TEXTO */
.heritage-detail-content {
  min-width: 0;
  padding: 8px 0 0;
}

.heritage-detail-content h3 {
  margin: 0 0 14px;
  color: #142d50;
  font-size: clamp(2rem, 2.65vw, 3rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -.045em;
}

.heritage-detail-intro {
  padding-bottom: 16px;
  color: #586f86;
  font-size: clamp(.95rem, 1vw, 1.04rem);
  line-height: 1.58;
}

.heritage-detail-intro p { margin: 0 0 10px; }
.heritage-detail-intro p:last-child { margin-bottom: 0; }

.heritage-detail-text-scroll {
  max-height: 410px;
  overflow-y: auto;
  padding-right: 13px;
  scrollbar-width: thin;
  scrollbar-color: #afc6d5 transparent;
}

.heritage-detail-text-scroll::-webkit-scrollbar { width: 7px; }
.heritage-detail-text-scroll::-webkit-scrollbar-thumb { border-radius: 10px; background: #afc6d5; }

.detail-text-section {
  margin: 0 0 22px;
}

.detail-text-section[hidden] { display: none !important; }

.detail-text-section h4 {
  margin: 0 0 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid #9ecce6;
  color: #153c62;
  font-size: 1.04rem;
  font-weight: 800;
}

.detail-text-body {
  color: #60778d;
  font-size: .93rem;
  line-height: 1.55;
}

.detail-text-body p { margin: 0 0 10px; }
.detail-text-body p:last-child { margin-bottom: 0; }

/* INFORMAÇÃO GERAL */
.heritage-detail-meta {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 20px 20px 18px;
  border: 1px solid #dbe8f0;
  border-radius: 14px;
  background: #fbfdff;
}

.heritage-detail-meta > h4 {
  margin: 0 0 8px;
  color: #153c62;
  font-size: 1rem;
  font-weight: 800;
}

.heritage-meta-item {
  display: grid;
  grid-template-columns: 27px 1fr;
  gap: 10px;
  align-items: start;
  padding: 15px 0;
  border-bottom: 1px solid #e3edf3;
}

.heritage-meta-item[hidden] { display: none !important; }

.heritage-meta-icon {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  color: #1376b7;
}

.heritage-meta-icon svg {
  width: 19px;
  height: 19px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.heritage-meta-item > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.heritage-meta-item > div > span {
  color: #73889b;
  font-size: .68rem;
  font-weight: 700;
}

.heritage-meta-item strong {
  color: #173f64;
  font-size: .8rem;
  line-height: 1.35;
}


/* LINHA HISTÓRICA ONDULADA */
.heritage-timeline {
  position: relative;
  padding: 24px clamp(24px, 2.4vw, 34px) 28px;
  border-top: 1px solid #d6e7f0;
  background:
    radial-gradient(circle at 88% 18%, rgba(72, 177, 221, .10), transparent 22%),
    radial-gradient(circle at 8% 100%, rgba(70, 170, 104, .08), transparent 25%),
    linear-gradient(180deg, #fbfdff 0%, #f2f9fd 100%);
  overflow: hidden;
}

.heritage-timeline[hidden] { display: none !important; }

.heritage-timeline-heading {
  position: relative;
  z-index: 2;
  max-width: 650px;
  padding-left: 28px;
}

.heritage-timeline-heading::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #1684c5;
}

.heritage-timeline-heading h4 {
  margin: 0 0 4px;
  color: #14395d;
  font-size: 1.18rem;
  font-weight: 800;
}

.heritage-timeline-heading p {
  margin: 0;
  color: #74899b;
  font-size: .79rem;
  line-height: 1.45;
}

.heritage-timeline-scroll {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 7px;
  scrollbar-width: thin;
  scrollbar-color: #bdd4e2 transparent;
}

.heritage-timeline-scroll::-webkit-scrollbar { height: 6px; }
.heritage-timeline-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #bdd4e2;
}

.heritage-timeline-track {
  position: relative;
  min-width: 980px;
  height: 250px;
}

.heritage-timeline-wave {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 170px;
  overflow: visible;
  pointer-events: none;
}

.heritage-timeline-wave-glow,
.heritage-timeline-wave-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.heritage-timeline-wave-glow {
  stroke: rgba(83, 184, 224, .15);
  stroke-width: 26;
}

.heritage-timeline-wave-line {
  stroke-width: 4;
  filter: drop-shadow(0 3px 5px rgba(19, 104, 151, .12));
}

.heritage-timeline-item {
  position: absolute;
  z-index: 2;
  top: 0;
  width: 190px;
  height: 232px;
}

.timeline-period {
  position: absolute;
  top: calc(var(--timeline-y) - 43px);
  left: 50%;
  display: block;
  min-width: 100px;
  color: #126fc0;
  font-size: .76rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  transform: translateX(-50%);
}

.timeline-period::after {
  content: "";
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  height: 16px;
  border-left: 2px dotted rgba(22, 132, 197, .55);
  transform: translateX(-50%);
}

.timeline-dot {
  position: absolute;
  z-index: 3;
  top: calc(var(--timeline-y) - 9px);
  left: 50%;
  width: 18px;
  height: 18px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #1684c5;
  box-shadow:
    0 0 0 2px #1684c5,
    0 4px 10px rgba(14, 91, 139, .18);
  transform: translateX(-50%);
}

.heritage-timeline-item.is-current .timeline-period {
  color: #238b58;
}

.heritage-timeline-item.is-current .timeline-period::after {
  border-left-color: rgba(59, 169, 103, .60);
}

.heritage-timeline-item.is-current .timeline-dot {
  width: 22px;
  height: 22px;
  top: calc(var(--timeline-y) - 11px);
  background: #3ba967;
  box-shadow:
    0 0 0 2px #3ba967,
    0 0 0 8px rgba(59, 169, 103, .12),
    0 5px 12px rgba(31, 120, 77, .18);
}

.timeline-copy {
  position: absolute;
  top: calc(var(--timeline-y) + 28px);
  left: 0;
  width: 100%;
  padding: 0 8px;
  text-align: left;
}

.timeline-copy > span {
  display: block;
  margin-bottom: 4px;
  color: #244a69;
  font-size: .76rem;
  font-weight: 800;
  line-height: 1.25;
}

.timeline-copy p {
  margin: 0;
  color: #71879a;
  font-size: .71rem;
  line-height: 1.38;
}

.heritage-filter:focus-visible,
.heritage-card:focus-visible,
.heritage-thumb:focus-visible,
.heritage-search:focus-within {
  outline: 3px solid #2d91c7;
  outline-offset: 3px;
}

/* RESPONSIVO */
@media (max-width: 1200px) {
  .heritage-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .heritage-search {
    flex-basis: auto;
    width: 100%;
  }

  .heritage-filters { justify-content: flex-start; }

  .heritage-browser {
    grid-template-columns: minmax(0, 1.2fr) minmax(310px, .8fr);
  }

  .heritage-detail-main-grid {
    grid-template-columns: minmax(390px, .95fr) minmax(0, 1.05fr);
  }

  .heritage-detail-meta {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 22px;
  }

  .heritage-detail-meta > h4 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 850px) {
  .heritage-browser { grid-template-columns: 1fr; }

  .heritage-map,
  .heritage-map-panel { min-height: 430px; }

  .heritage-results-panel {
    border-top: 1px solid #dce8ef;
    border-left: 0;
  }

  .heritage-results {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 78vw);
    gap: 10px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 12px;
  }

  .heritage-card {
    grid-template-columns: 105px 1fr;
    margin: 0;
  }

  .scroll-hint { display: inline; }

  .heritage-detail-main-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px;
  }

  .heritage-main-photo,
  .heritage-main-photo img { height: 390px; min-height: 390px; }

  .heritage-detail-text-scroll { max-height: 360px; }

  .heritage-detail-meta {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .heritage-timeline {
    padding-inline: 20px;
  }
}

@media (max-width: 560px) {
  .heritage-hero,
  .heritage-hero-inner { min-height: 295px; }

  .heritage-hero-inner { padding-bottom: 72px; }
  .heritage-explorer { padding-top: 18px; }

  .heritage-filter {
    min-height: 37px;
    padding: 6px 12px;
    font-size: .74rem;
  }

  .heritage-map,
  .heritage-map-panel { min-height: 350px; }

  .heritage-results-head { padding: 16px 14px 11px; }
  .heritage-results { grid-auto-columns: minmax(250px, 86vw); }

  .heritage-detail { margin-top: 20px; }
  .heritage-detail-main-grid { padding: 13px; }

  .heritage-main-photo,
  .heritage-main-photo img { height: 285px; min-height: 285px; }

  .gallery-nav {
    width: 36px;
    height: 36px;
  }

  .gallery-nav svg {
    width: 18px;
    height: 18px;
  }

  .heritage-thumbnails {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 165px;
  }

  .heritage-detail-content h3 {
    font-size: clamp(1.8rem, 9vw, 2.35rem);
  }

  .heritage-detail-text-scroll { max-height: 330px; }

  .heritage-detail-meta {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .heritage-timeline {
    padding: 16px 14px 19px;
  }
}
