.boat-gallery { background: #f0eee6; }
.boat-gallery .section-heading { align-items: end; margin-bottom: var(--section-heading-space); }
.boat-gallery h2 em { color: var(--sea); font-weight: inherit; }
.boat-gallery-intro { max-width: 390px; padding-bottom: 8px; }
.boat-gallery-intro p { color: var(--muted); }
.boat-gallery-instagram { display: inline-flex; gap: 30px; padding-bottom: 5px; border-bottom: 1px solid var(--ink); font-size: 13px; font-weight: 700; }
.boat-gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 180px; gap: 14px; }
.boat-gallery-tile { position: relative; display: block; overflow: hidden; isolation: isolate; border-radius: 14px; background: var(--ink); }
.boat-gallery-tile:nth-child(8n + 1) { grid-column: span 2; grid-row: span 2; }
.boat-gallery-tile:nth-child(8n) { grid-column: span 2; }
.boat-gallery-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .65s ease, opacity .35s ease; }
.boat-gallery-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(4,29,35,.72)); pointer-events: none; }
.boat-gallery-tile-copy { position: absolute; inset: auto 17px 16px; z-index: 1; display: flex; align-items: end; justify-content: space-between; gap: 12px; color: #fff; font-size: 12px; font-weight: 500; line-height: 1.4; }
.boat-gallery-tile:nth-child(8n + 1) .boat-gallery-tile-copy { font-size: 19px; inset: auto 24px 24px; }
.boat-lightbox-copy { min-width: 0; max-height: 25dvh; overflow-y: auto; text-align: center; }
.boat-gallery-expand { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; border: 1px solid #ffffff70; border-radius: 50%; transition: background .25s; }
.boat-gallery-tile:hover img, .boat-gallery-tile:focus-visible img { transform: scale(1.055); }
.boat-gallery-tile:hover .boat-gallery-expand, .boat-gallery-tile:focus-visible .boat-gallery-expand { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.boat-gallery-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 16px; }
.boat-gallery-bottom p { font-size: 12px; color: var(--muted); }
.boat-gallery [hidden] { display: none !important; }
body.boat-gallery-open { overflow: hidden; }
.boat-lightbox { width: min(1400px, calc(100vw - 40px)); max-width: none; height: min(940px, calc(100dvh - 40px)); max-height: none; padding: 0; border: 0; border-radius: 18px; color: #fff; background: var(--ink-deep); box-shadow: 0 30px 100px #0008; }
.boat-lightbox::backdrop { background: rgba(1,13,17,.93); }
.boat-lightbox-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; padding: 12px 20px; }
.boat-lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 6px 0; }
.boat-lightbox-bar > span { font-size: 10px; letter-spacing: .18em; color: #c2d7d7; }
.boat-lightbox-bar > span > span { margin-left: 16px; }
.boat-lightbox-control { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid #ffffff40; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; font-size: 24px; }
.boat-lightbox-control:hover { color: var(--ink); background: var(--sun); border-color: var(--sun); }
.boat-lightbox-stage { display: grid; min-height: 0; place-items: center; overflow: hidden; }
.boat-lightbox-stage img { width: 100%; height: 100%; min-height: 0; object-fit: contain; opacity: .25; transition: opacity .2s; }
.boat-lightbox-stage img.is-loaded { opacity: 1; }
.boat-lightbox-stage p { max-width: 360px; text-align: center; }
#boat-lightbox-caption { margin: 8px 0; text-align: center; font-size: 14px; line-height: 1.4; }
@media (min-width: 1400px) { .boat-gallery-grid { grid-auto-rows: 210px; } }
@media (max-width: 900px) { .boat-gallery-grid { grid-auto-rows: 150px; gap: 10px; } .boat-gallery-tile-copy { inset: auto 12px 12px; font-size: 11px; } }
@media (max-width: 600px) {
  .boat-gallery .section-heading { gap: 12px; margin-bottom: var(--section-heading-space); }
  .boat-gallery-intro { padding: 0; }
  .boat-gallery-intro p { margin: 0 0 12px; }
  .boat-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; gap: 10px; }
  .boat-gallery-tile-copy { font-size: 12px; }
  .boat-gallery-tile:nth-child(8n + 1) { grid-row: span 1; }
  .boat-gallery-tile:nth-child(8n + 1) .boat-gallery-tile-copy { font-size: 17px; inset: auto 17px 17px; }
  .boat-gallery-bottom { align-items: start; }
  .boat-gallery-bottom .button { padding: 14px 18px; font-size: 12px; }
  .boat-lightbox { width: 100vw; height: 100dvh; border-radius: 0; }
  .boat-lightbox-shell { padding: max(8px, env(safe-area-inset-top)) 12px max(8px, env(safe-area-inset-bottom)); }
  .boat-lightbox-bar { gap: 10px; }
  #boat-lightbox-caption { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .boat-gallery-tile img, .boat-gallery-expand, .boat-lightbox-stage img { transition: none; } }
