.travel-page { overflow-x: hidden; }
.travel-page .section { overflow: hidden; }

.travel-hero {
  min-height: min(820px, calc(100vh - 88px));
  position: relative;
  display: flex;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}
.travel-hero-media,
.travel-hero-shade { position: absolute; inset: 0; }
.travel-hero-media { z-index: 0; }
.travel-hero-shade { z-index: 1; }
.travel-hero-media picture,
.travel-hero-media img { width: 100%; height: 100%; display: block; }
.travel-hero-media img { object-fit: cover; object-position: center 48%; }
.travel-hero-shade { background: linear-gradient(90deg, rgba(8, 13, 14, .9) 0%, rgba(8, 13, 14, .58) 42%, rgba(8, 13, 14, .1) 75%), linear-gradient(0deg, rgba(8, 13, 14, .85), transparent 55%); }
.travel-hero-copy { position: relative; z-index: 2; padding-block: 105px 56px; }
.travel-hero-copy .eyebrow { display: inline-block; }
.travel-hero h1 { max-width: 780px; margin: 22px 0; font: 800 clamp(50px, 7vw, 92px)/1.02 Manrope, sans-serif; letter-spacing: -5px; }
.travel-hero-copy > p { max-width: 590px; color: #d3dbd7; font-size: 17px; line-height: 1.85; }
.travel-hero-meta { margin-top: 78px; padding-top: 22px; border-top: 1px solid #ffffff42; display: flex; justify-content: space-between; gap: 20px; color: #d8e0dc; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.travel-hero-meta a { color: var(--sage); }

.route-line { list-style: none; margin: 70px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.route-line::before { content: ""; position: absolute; top: 15px; left: 12%; right: 12%; border-top: 1px solid #aeb7ae; }
.route-line li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.route-line li::before { content: ""; width: 12px; height: 12px; margin: 10px 0 14px; border: 5px solid var(--ivory); border-radius: 50%; background: #527159; box-shadow: 0 0 0 1px #75887a; z-index: 1; }
.route-index { position: absolute; top: -20px; color: #718077; font-size: 10px; letter-spacing: 2px; }
.route-line strong { font: 800 21px Manrope, sans-serif; }
.route-line li > span:last-child { color: #65736d; font-size: 12px; }

.cities-section { background: #171f20; }
.city-story { display: grid; grid-template-columns: .38fr 1fr; gap: 44px; padding: 64px 0; border-top: 1px solid #ffffff20; }
.city-copy { position: relative; align-self: start; padding-left: 54px; }
.city-number { position: absolute; left: 0; top: 7px; color: var(--sage); font-size: 11px; letter-spacing: 2px; }
.city-dates { margin: 0 0 10px; color: #91a29a !important; font-size: 11px !important; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
.city-copy h3 { margin: 0 0 16px; font: 800 clamp(36px, 5vw, 62px)/1 Manrope, sans-serif; letter-spacing: -3px; }
.city-copy p:last-child { max-width: 320px; color: #b7c2bd; font-size: 15px; line-height: 1.8; }
.city-photos { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.city-photos figure { grid-column: span 6; margin: 0; min-height: 430px; position: relative; overflow: hidden; border-radius: 5px; background: #26302f; }
.city-photos figure:nth-child(2),
.city-photos figure:nth-child(3) { grid-column: span 3; min-height: 320px; }
.city-photos picture,
.city-photos img { width: 100%; height: 100%; display: block; }
.city-photos img { position: absolute; inset: 0; object-fit: cover; transition: transform .45s ease; }
.city-photos figure:hover img { transform: scale(1.02); }
.city-photos figcaption { position: absolute; left: 18px; bottom: 17px; padding: 7px 10px; border-radius: 3px; background: #0e1315d9; color: #f5f5f1; font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.city-story-pisa .city-photos figure,
.city-story-venice .city-photos figure { min-height: 610px; }
.city-story-pisa .city-photos img,
.city-story-venice .city-photos img { object-position: center 48%; }

.place-card { display: grid; grid-template-columns: 1.2fr .8fr; background: white; border: 1px solid #e1e4dd; }
.place-photo { min-width: 0; margin: 0; background: #111719; color: #f5f5f1; }
.place-photo-frame { height: 390px; overflow: hidden; }
.place-photo-frame picture,
.place-photo-frame img { width: 100%; height: 100%; display: block; }
.place-photo-frame img { object-fit: cover; }
.place-photo figcaption { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 22px; }
.place-photo figcaption div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.place-photo figcaption strong { font: 800 15px Manrope, sans-serif; }
.place-photo figcaption div span { color: #aebbb5; font-size: 11px; line-height: 1.5; }
.place-location { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 14px; border: 1px solid #71817a; border-radius: 30px; color: var(--sage); font-size: 11px; font-weight: 800; white-space: nowrap; transition: background-color .2s, color .2s; }
.place-location:hover,
.place-location:focus-visible { background: var(--sage); color: #162019; }
.place-copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 55px; }
.place-copy > span { color: #527159; font-size: 11px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; }
.place-copy h3 { margin: 15px 0; font: 800 clamp(31px, 4vw, 48px)/1.1 Manrope, sans-serif; letter-spacing: -2px; }
.place-copy > p { color: #64716b; line-height: 1.8; }

.gallery-section { background: #111719; }
.photo-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 210px; gap: 13px; }
.gallery-item { grid-column: span 4; grid-row: span 2; position: relative; overflow: hidden; border-radius: 4px; background: #222c2c; }
.gallery-item:nth-child(1), .gallery-item:nth-child(6) { grid-column: span 8; }
.gallery-item:nth-child(3), .gallery-item:nth-child(7) { grid-row: span 3; }
.gallery-item picture,
.gallery-item img { width: 100%; height: 100%; display: block; }
.gallery-item img { position: absolute; inset: 0; object-fit: cover; transition: transform .4s ease, filter .4s ease; }
.gallery-item:nth-child(3) img,
.gallery-item:nth-child(7) img { object-position: center; }
.gallery-item::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, #000b); pointer-events: none; }
.gallery-item > span { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; color: white; font-size: 11px; font-weight: 700; letter-spacing: .8px; }
.gallery-item:hover img,
.gallery-item:focus-visible img { transform: scale(1.025); filter: saturate(1.08); }

.gallery-dialog { width: min(1100px, calc(100% - 36px)); max-height: calc(100vh - 36px); padding: 0; border: 1px solid #ffffff2b; border-radius: 6px; background: #101617; color: #f5f5f1; overflow: hidden; }
.gallery-dialog::backdrop { background: rgba(4, 7, 8, .88); backdrop-filter: blur(5px); }
.dialog-toolbar, .dialog-footer { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 18px; }
.dialog-toolbar { border-bottom: 1px solid #ffffff20; }
.dialog-toolbar h2 { margin: 0; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; }
.dialog-toolbar button, .dialog-footer button { min-width: 44px; min-height: 44px; border: 1px solid #52605c; border-radius: 50%; background: transparent; color: white; cursor: pointer; }
.dialog-photo { height: min(72vh, 720px); }
.dialog-photo img { width: 100%; height: 100%; display: block; }
.dialog-photo img { object-fit: contain; background: #080c0d; }
.dialog-footer { border-top: 1px solid #ffffff20; }
.dialog-footer p { margin: 0; color: #cad4cf; text-align: center; font-size: 12px; }
body.has-open-dialog { overflow: hidden; }

@media (max-width: 1020px) {
  .travel-hero h1 { letter-spacing: -4px; }
  .city-story { grid-template-columns: .42fr 1fr; gap: 28px; }
  .city-copy { padding-left: 42px; }
  .photo-grid { grid-auto-rows: 170px; }
}

@media (max-width: 720px) {
  .travel-hero { min-height: 690px; }
  .travel-hero-media img { object-position: 58% center; }
  .travel-hero-shade { background: linear-gradient(0deg, rgba(8, 13, 14, .95), rgba(8, 13, 14, .12) 78%); }
  .travel-hero-copy { padding-block: 80px 35px; }
  .travel-hero h1 { margin-top: 17px; font-size: clamp(43px, 13vw, 64px); letter-spacing: -3px; }
  .travel-hero-copy > p { font-size: 14px; }
  .travel-hero-meta { margin-top: 48px; align-items: flex-end; font-size: 9px; }
  .route-line { grid-template-columns: 1fr; gap: 0; margin-top: 42px; }
  .route-line::before { top: 0; bottom: 0; left: 15px; right: auto; border-top: 0; border-left: 1px solid #aeb7ae; }
  .route-line li { min-height: 93px; padding-left: 54px; align-items: flex-start; justify-content: center; text-align: left; }
  .route-line li::before { position: absolute; left: 5px; margin: 0; }
  .route-index { position: static; order: -1; }
  .city-story { grid-template-columns: 1fr; gap: 22px; padding: 52px 0; }
  .city-copy { padding-left: 42px; }
  .city-photos { gap: 9px; }
  .city-photos figure { min-height: 310px; }
  .city-photos figure:nth-child(2), .city-photos figure:nth-child(3) { grid-column: span 6; min-height: 260px; }
  .city-story-pisa .city-photos figure, .city-story-venice .city-photos figure { min-height: 520px; }
  .place-card { grid-template-columns: 1fr; }
  .place-photo-frame { height: 300px; }
  .place-photo figcaption { align-items: flex-start; flex-direction: column; gap: 14px; }
  .place-copy { padding: 34px 25px; }
  .photo-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; gap: 8px; }
  .gallery-item, .gallery-item:nth-child(1), .gallery-item:nth-child(6) { grid-column: span 1; grid-row: span 1; }
  .gallery-item:nth-child(3), .gallery-item:nth-child(7) { grid-row: span 2; }
  .gallery-item > span { left: 11px; right: 11px; bottom: 10px; font-size: 9px; }
  .gallery-dialog { width: calc(100% - 18px); max-height: calc(100vh - 18px); }
  .dialog-photo { height: calc(100vh - 154px); }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-dialog::backdrop { backdrop-filter: none; }
}
