/* Boat gallery, spec tiles and on-board list. Used by boat-gallery.php and onboard-list.php */
.bgal { position: relative; border-radius: var(--radius-card); overflow: hidden; background: var(--color-surface); }
.bgal__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; aspect-ratio: 4 / 3; }
.bgal__track::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .bgal__track { aspect-ratio: 16 / 10; } }
@media (min-width: 1024px) { .bgal { flex: 1 1 auto; min-height: 0; } .bgal__track { aspect-ratio: auto; height: 100%; min-height: 26rem; } }
.bgal__slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; }
.bgal__slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bgal__bar { position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0.75rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; pointer-events: none; }
.bgal__cap { display: inline-flex; align-items: center; gap: 0.6rem; margin: 0; padding: 0.45rem 0.9rem; border-radius: 999px; background: rgb(255 255 255 / 0.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-weight: 600; font-size: 0.875rem; color: var(--color-primary); box-shadow: 0 8px 24px -12px rgb(var(--rgb-primary-deep) / 0.45); }
.bgal__cap .num { color: var(--color-muted); font-weight: 600; }
.bgal__nav { display: flex; gap: 0.4rem; pointer-events: auto; }
.bgal__btn { display: flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border: 0; border-radius: 50%; cursor: pointer; background: rgb(255 255 255 / 0.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--color-primary); box-shadow: 0 8px 24px -12px rgb(var(--rgb-primary-deep) / 0.45); transition: background-color 0.25s, color 0.25s, opacity 0.25s; }
.bgal__btn:hover { background: var(--color-primary); color: #fff; }
.bgal__btn:disabled { opacity: 0.45; cursor: default; background: rgb(255 255 255 / 0.9); color: var(--color-primary); }
.bgal__btn svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bspecs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-top: 0.75rem; }
@media (min-width: 640px) { .bspecs { grid-template-columns: repeat(4, 1fr); } }
.bspecs dd { margin: 0; padding: 1rem 1.1rem; border-radius: 20px; background: #fff; box-shadow: inset 0 0 0 1px var(--color-line); }
.bspecs .display { font-size: clamp(1.9rem, 3.2vw, 2.5rem); }
.bspecs .u { font-weight: 650; color: var(--color-muted); }
.bspecs .l { display: block; margin-top: 0.15rem; font-size: 0.875rem; color: var(--color-muted); }
.bcard { display: flex; flex-direction: column; padding: 1.75rem; border-radius: var(--radius-card); background: #fff; box-shadow: inset 0 0 0 1px var(--color-line); }
@media (min-width: 768px) { .bcard { padding: 2.25rem; } }
.bfeat { display: grid; gap: 0.25rem 1.25rem; margin-top: 1.25rem; }
@media (min-width: 560px) and (max-width: 1023px) { .bfeat { grid-template-columns: 1fr 1fr; } }
.bfeat li { display: flex; align-items: center; gap: 0.85rem; padding: 0.7rem 0; border-bottom: 1px solid var(--color-line); }
.bfeat li:last-child { border-bottom: 0; }
.bfeat svg { flex: none; width: 2.5rem; height: 2.5rem; padding: 0.55rem; border-radius: 12px; background: var(--color-surface); fill: none; stroke: var(--color-accent-strong); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .bgal__track { scroll-behavior: auto; } }

/* photo mosaic of the boat page */
.bmosaic { display: grid; gap: 2.25rem; }
.bmosaic__tile img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-card); background: var(--color-surface); }
@media (min-width: 1024px) {
  .bmosaic { grid-template-columns: repeat(12, 1fr); gap: 2.5rem 1.75rem; }
  .bmosaic__tile--wide { grid-column: span 7; }
  .bmosaic__tile--narrow { grid-column: span 5; }
  .bmosaic__tile--third { grid-column: span 4; }
  .bmosaic__tile--wide img, .bmosaic__tile--narrow img { aspect-ratio: auto; height: 26rem; }
  .bmosaic__tile--third img { aspect-ratio: 4 / 3; }
}

/* technical data */
.btech { display: grid; border-top: 1px solid var(--color-line); }
@media (min-width: 768px) { .btech { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }
.btech > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--color-line); }
.btech dt { color: var(--color-muted); }
.btech dd { margin: 0; font-weight: 650; text-align: right; }

/* gallery with full screen viewer (boat page) */
.bgal__zoom { display: block; height: 100%; cursor: zoom-in; }
.bgal__zoom img { display: block; width: 100%; height: 100%; object-fit: cover; }

.lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(var(--rgb-primary-deep) / 0.96); color: #fff; }
.lightbox:not([open]) { display: none; }
.lightbox[open] { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.5rem; padding: 3.75rem 0.75rem 1rem; }
.lightbox::backdrop { background: rgb(var(--rgb-primary-deep) / 0.96); }
.lightbox__fig { margin: 0; min-width: 0; display: grid; justify-items: center; gap: 0.9rem; }
.lightbox__fig img { display: block; max-width: 100%; max-height: calc(100svh - 9rem); width: auto; height: auto; border-radius: 14px; background: rgb(255 255 255 / 0.06); }
.lightbox__fig figcaption { display: inline-flex; gap: 0.7rem; align-items: center; font-weight: 600; font-size: 0.9375rem; }
.lightbox__fig figcaption .num { color: rgb(255 255 255 / 0.6); }
.lightbox__btn { display: flex; align-items: center; justify-content: center; width: 2.9rem; height: 2.9rem; border: 0; border-radius: 50%; cursor: pointer; background: rgb(255 255 255 / 0.14); color: #fff; transition: background-color 0.25s, color 0.25s; }
.lightbox__btn:hover { background: #fff; color: var(--color-primary); }
.lightbox__btn svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__close { position: absolute; top: 0.75rem; right: 0.75rem; }
@media (max-width: 767px) {
  /* phones: arrows sit at the bottom corners, swipe also works */
  .lightbox[open] { grid-template-columns: 1fr; align-content: center; padding: 3.75rem 0.5rem 1rem; }
  .lightbox__prev, .lightbox__next { position: absolute; bottom: 1rem; width: 2.6rem; height: 2.6rem; }
  .lightbox__prev { left: 0.75rem; }
  .lightbox__next { right: 0.75rem; }
}
body.lb-open { overflow: hidden; }
.bgal__cap { min-width: 0; white-space: nowrap; }
.bgal__cap [data-caption] { overflow: hidden; text-overflow: ellipsis; }
.bgal__bar { gap: 0.5rem; }

/* "Your boat" in the side column of the tour pages: a photo with a smaller one overlapping its corner, title and link below */
.yboat__media { position: relative; padding-bottom: 1.75rem; }
.yboat__fig { margin: 0; }
.yboat__fig--main img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 22px; }
.yboat__fig--inset { position: absolute; right: 1rem; bottom: 0; width: 40%; }
.yboat__fig--inset img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; border: 4px solid #fff; box-shadow: 0 10px 24px rgb(7 31 62 / 0.18); }
.yboat__link { margin: 0.25rem 0 0; padding: 0 0.25rem; }
