.nearby-hero { position: relative; overflow: hidden; background: var(--navy); }
.nearby-hero > img { width: 100%; height: clamp(300px, 36vw, 550px); object-fit: cover; }
.nearby-categories { background: #fff; }
.nearby-categories__control { display: none; }
.nearby-categories__inner { display: flex; align-items: stretch; width: 100%; margin: auto; overflow-x: auto; scrollbar-width: none; }
.nearby-categories__tab { flex: 1 0 auto; min-height: 74px; padding: 13px 24px; border: 0; background: transparent; color: var(--navy); font: inherit; font-size: max(13px, calc(clamp(23px, 2.65vw, 40px) * var(--content-text-scale, 1))); font-style: italic; line-height: 1.2; white-space: nowrap; cursor: pointer; }
.nearby-categories__tab[aria-selected="true"] { background: #d1cfcf; }
.nearby-categories__tab:focus-visible { outline: 3px solid var(--navy); outline-offset: -3px; }
.nearby-stories { background: var(--paper); }
.nearby-stories[hidden] { display: none; }
.nearby-story { position: relative; isolation: isolate; overflow: hidden; padding: 17px 24px 164px; }
.nearby-story::before { content: ""; position: absolute; z-index: -1; inset: 0 0 auto; height: 223px; background: var(--navy); }
/* La torre queda al extremo de la franja, fuera de las fotografías y del texto. */
.nearby-story--with-mark::after { content: ""; position: absolute; z-index: -1; top: 26px; right: 0; width: 194px; height: 197px; background: url('/assets/figma/desktop-elemento-grafico-correccion2.png') center / 100% 100% no-repeat; opacity: 1; pointer-events: none; }
.nearby-story__inner { display: grid; grid-template-columns: 347fr 469fr 347fr; gap: 25px; width: min(100%, var(--content-width)); margin: auto; }
.nearby-story--city .nearby-story__inner, .nearby-story--reverse .nearby-story__inner { grid-template-columns: 347fr 347fr 469fr; }
.nearby-story__small-images { display: grid; grid-template-rows: 300fr 278fr; height: 608px; gap: 30px; min-width: 0; }
.nearby-story__small-images img, .nearby-story__main-image { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.nearby-story__main-image, .nearby-story__main-frame { height: 608px; min-width: 0; overflow: hidden; }
.nearby-story__main-frame .nearby-story__main-image { height: 100%; transform: scale(2.1); transform-origin: 65% 52%; }
.nearby-story--home .nearby-story__main-image { object-position: 78% center; }
.nearby-story__copy { display: flex; flex-direction: column; min-width: 0; color: #080808; }
.nearby-story__copy h2 { min-height: 206px; padding: 2px 0 22px; color: #fff; font-size: max(13px, calc(50px * var(--content-text-scale, 1))); font-style: italic; font-weight: 400; line-height: 1.2; }
.nearby-story__copy h2 strong { font-weight: 700; }
.nearby-story__text { text-align: justify; display: flex; flex: 1; flex-direction: column; padding-top: 10px; }
.nearby-story__text p { margin: 0; font-size: max(13px, calc(22px * var(--content-text-scale, 1))); line-height: 1.18; }
.nearby-story__read-more { align-self: flex-start; margin-top: auto; padding-top: 23px; padding-bottom: 12px; color: var(--navy); font-size: max(13px, calc(40px * var(--content-text-scale, 1))); font-style: italic; line-height: 1.2; }
.nearby-story__read-more:hover { text-decoration: underline; text-underline-offset: 5px; }
.nearby-story__read-more:focus-visible { outline: 3px solid var(--navy); outline-offset: 5px; }
.nearby-story + .nearby-story::before { border-top: 0; }
.nearby-story__inner::after { content: ""; position: absolute; bottom: 82px; left: 50%; width: min(calc(100% - 80px), 1111px); height: 8px; border-radius: 8px; background: #d9d9d9; transform: translateX(-50%); }
@media (min-width: 801px) and (max-width: 1450px) {
  .nearby-story__inner { width: min(100%, calc(100vw - 160px)); gap: 20px; }
  .nearby-story__copy h2 { font-size: max(13px, calc(clamp(32px, 3.3vw, 48px) * var(--content-text-scale, 1))); }
  .nearby-story__text p { font-size: max(13px, calc(clamp(16px, 1.45vw, 21px) * var(--content-text-scale, 1))); }
  .nearby-story--with-mark::after { width: clamp(100px, 12.75vw, 185px); }
}
@media (max-width: 800px) {
  .nearby-hero > img { height: 140px; }
  .nearby-categories__inner { flex-wrap: wrap; justify-content: flex-start; gap: 8px; padding: 12px 16px; overflow: visible; }
  .nearby-categories__tab { flex: 0 0 auto; min-height: 32px; padding: 6px 12px; border: 1px solid #d9d9d9; border-radius: 999px; font-size: 12px; }
  #tab-decoracion { font-size: 0; }
  #tab-decoracion::after { content: "Decoración"; font-size: 12px; }
  .nearby-story { padding: 0 16px 118px; }
  .nearby-story::before, .nearby-story--with-mark::after { display: none; }
  .nearby-story__inner, .nearby-story--city .nearby-story__inner, .nearby-story--reverse .nearby-story__inner { grid-template-columns: minmax(0, 1fr); gap: 8px; width: 100%; }
  .nearby-story__copy { display: contents; }
  .nearby-story__copy h2 { grid-row: 1; min-height: 101px; margin: 0 -16px 16px; padding: 22px 20px; background: var(--navy); font-size: max(13px, calc(26px * var(--content-text-scale, 1))); line-height: 1.2; }
  .nearby-story__main-image, .nearby-story__main-frame { grid-row: 2; height: auto; aspect-ratio: 358 / 280; border-radius: 12px; }
  .nearby-story__main-frame .nearby-story__main-image { height: 100%; aspect-ratio: auto; }
  .nearby-story__small-images { grid-row: 3; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); gap: 8px; height: auto; }
  .nearby-story__small-images img { aspect-ratio: 175 / 140; border-radius: 6px; }
  .nearby-story__text { grid-row: 4; display: block; padding-top: 16px; }
  .nearby-story__text p { display: inline; font-size: max(13px, calc(14px * var(--content-text-scale, 1))); line-height: 1.65; }
  .nearby-story__text p + p::before { content: " "; }
  .nearby-story__text br { display: none; }
  .nearby-story__read-more { display: block; width: fit-content; margin-top: 16px; padding: 0; font-size: max(13px, calc(23px * var(--content-text-scale, 1))); }
  .nearby-story__inner::after { bottom: 32px; width: calc(100% - 48px); height: 4px; }
}

.nearby-page--scrolled .desktop-nav { top: 43px; }
.nearby-story__gallery { display: contents; }
@media (max-width: 800px) {
  .nearby-page .site-header { position: relative; }
  .nearby-story__gallery { display: flex; grid-row: 2; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 12px; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; }
  .nearby-story__gallery .nearby-story__small-images { display: contents; }
  .nearby-story__gallery > .nearby-story__main-image, .nearby-story__gallery > .nearby-story__main-frame, .nearby-story__gallery .nearby-story__small-images img { flex: 0 0 88%; width: 88%; height: 250px; aspect-ratio: auto; border-radius: 12px; object-fit: cover; scroll-snap-align: start; }
  .nearby-story__gallery > .nearby-story__main-image, .nearby-story__gallery > .nearby-story__main-frame { order: -1; }
  .nearby-story__gallery .nearby-story__main-frame .nearby-story__main-image { width: 100%; height: 100%; }
  .nearby-story__gallery:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }
  .nearby-story__text { grid-row: 3; }
}
