/* Destinations: swiper at all breakpoints, max 4 per view on desktop.
   Featured yachts: mobile swiper only. */

/* Sticky header offset for in-page nav hashes */
#day-charter,
#destinations,
#about-us,
#contact {
  scroll-margin-top: 6.5rem;
}

/* —— Header nav: keep every item on one line (desktop) —— */
@media (min-width: 981px) {
  .header__nav {
    flex-wrap: nowrap !important;
    gap: 0.7rem !important;
    min-width: 0;
  }

  .header__nav > a {
    white-space: nowrap !important;
    flex: 0 0 auto;
    font-size: 12px !important;
    letter-spacing: 0.04em !important;
    line-height: 1.2;
  }

  .header__main {
    gap: 0.75rem;
  }
}

@media (min-width: 1200px) {
  .header__nav {
    gap: 0.95rem !important;
  }

  .header__nav > a {
    font-size: 13px !important;
  }
}

/* —— Mobile menu: roomier link spacing (also for JS-synced links) —— */
@media (max-width: 980px) {
  .header__nav.is-open {
    max-height: 36rem !important;
    padding: 0.5rem 1.25rem 1.4rem !important;
  }

  .header__nav > a {
    display: block;
    width: 100%;
    padding: 1.15rem 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 15px !important;
    letter-spacing: 0.08em !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    opacity: 0.95;
  }

  .header__nav > a:last-child {
    border-bottom: 0;
  }
}

/* —— Destinations (always carousel) —— */
.section.destinations .container {
  overflow: visible;
}

.section.destinations .dest-grid {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 1rem !important;
  margin-top: 2.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  /* Allow vertical page scroll while still enabling horizontal swipe */
  touch-action: pan-x pan-y;
}

.section.destinations .dest-grid::-webkit-scrollbar {
  display: none;
}

/* Desktop / default: max 4 per row */
.section.destinations .dest {
  flex: 0 0 calc((100% - 3rem) / 4);
  width: calc((100% - 3rem) / 4);
  max-width: calc((100% - 3rem) / 4);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.section.destinations .dest:last-child {
  scroll-snap-align: end;
}

.section.destinations .dest .dest__frame {
  max-width: none;
  width: 100%;
}

.section.destinations .jm-carousel-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.5rem;
}

.jm-carousel-nav__btn {
  width: 48px;
  height: 48px;
  border: 1px solid var(--jm-line, #e6f0f8);
  background: #fff;
  color: var(--jm-navy, #011425);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  border-radius: 50%;
  transition: 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.jm-carousel-nav__btn:hover:not(:disabled) {
  border-color: var(--jm-gold, #bfa888);
  color: var(--jm-gold-text, #6e5740);
}

.jm-carousel-nav__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

@media (max-width: 1100px) {
  .section.destinations .dest {
    flex: 0 0 calc((100% - 1rem) / 2);
    width: calc((100% - 1rem) / 2);
    max-width: calc((100% - 1rem) / 2);
  }
}

@media (max-width: 900px) {
  /* Mobile destinations: one card + ~25% next peek */
  .section.destinations .dest {
    flex: 0 0 75%;
    width: 75%;
    max-width: 75%;
  }

  /* Featured yachts: mobile carousel only */
  .section.featured .container {
    overflow: visible;
  }

  .section.featured .yacht-grid {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 0.85rem !important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
  }

  .section.featured .yacht-grid::-webkit-scrollbar {
    display: none;
  }

  .section.featured .yacht-grid > * {
    flex: 0 0 75%;
    width: 75%;
    max-width: 75%;
    min-width: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .section.featured .yacht-grid > *:last-child {
    scroll-snap-align: end;
  }

  .section.featured .yacht-grid .card {
    height: 100%;
  }

  .section.featured .jm-carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.55rem;
    margin-top: 1.25rem;
  }
}

@media (min-width: 901px) {
  .section.featured .jm-carousel-nav {
    display: none !important;
  }
}

/* —— Day Charter (homepage section, always carousel, 4/row desktop) —— */
.section.day-charter {
  background: var(--jm-cream, #f4efec);
}

.section.day-charter .container {
  overflow: visible;
}

.section.day-charter .section-label,
.section.day-charter .section-title {
  text-align: center;
}

.section.day-charter .day-charter__heading {
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section.day-charter .day-charter__intro {
  max-width: 42rem;
  margin: 0 auto 0.55rem;
  color: var(--jm-muted, #54595f);
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
}

.section.day-charter .day-charter__intro--note {
  margin-bottom: 1.75rem;
}

.section.day-charter .day-charter__grid {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 1.25rem !important;
  margin-top: 2rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
}

.section.day-charter .day-charter__grid::-webkit-scrollbar {
  display: none;
}

.section.day-charter .day-charter__card {
  flex: 0 0 calc((100% - 3.75rem) / 4);
  width: calc((100% - 3.75rem) / 4);
  max-width: calc((100% - 3.75rem) / 4);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-width: 0;
}

.section.day-charter .day-charter__card:last-child {
  scroll-snap-align: end;
}

/* Match featured yacht cards (app-yacht-card) */
.section.day-charter .day-charter__card .card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
  border-radius: var(--jm-radius, 12px);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(1, 20, 37, 0.08);
  text-decoration: none;
  text-align: inherit;
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.section.day-charter .day-charter__card .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(1, 20, 37, 0.12);
}

.section.day-charter .day-charter__card .card__media {
  position: relative;
  display: block;
  width: 100%;
  padding-top: 68%;
  background: #f0f0f0;
  overflow: hidden;
}

.section.day-charter .day-charter__card .card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section.day-charter .day-charter__card .card__title {
  margin: 0;
  padding: 18px 18px 12px;
  font-family: var(--jm-font-display, "Playfair Display", Georgia, serif);
  font-size: clamp(1rem, 1.15vw, 1.25rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--jm-navy, #011425);
  text-transform: uppercase;
  text-align: center;
}

.section.day-charter .day-charter__card .card__meta {
  padding: 0 18px 18px;
  margin-top: auto;
}

.section.day-charter .day-charter__card .meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 9px 0;
  border-bottom: 1px solid var(--jm-line, #e6f0f8);
  font-family: var(--jm-font-body, Poppins, system-ui, sans-serif);
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--jm-navy, #011425);
}

.section.day-charter .day-charter__card .meta-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.section.day-charter .day-charter__card .meta-label {
  color: var(--jm-muted, #54595f);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
}

.section.day-charter .day-charter__card .meta-row > span:last-child {
  font-family: var(--jm-font-display, "Playfair Display", Georgia, serif);
  font-weight: 600;
  text-align: right;
}

.section.day-charter .jm-carousel-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.5rem;
}

@media (max-width: 1100px) {
  .section.day-charter .day-charter__card {
    flex: 0 0 calc((100% - 1.25rem) / 2);
    width: calc((100% - 1.25rem) / 2);
    max-width: calc((100% - 1.25rem) / 2);
  }
}

@media (max-width: 900px) {
  .section.day-charter .day-charter__card {
    flex: 0 0 75%;
    width: 75%;
    max-width: 75%;
  }
}

/* Day Charter lightbox */
html.day-charter-lb-open,
body.day-charter-lb-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

body.day-charter-lb-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}

.day-charter-lb[hidden] {
  display: none !important;
}

.day-charter-lb {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.day-charter-lb__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 20, 37, 0.78);
  backdrop-filter: blur(4px);
}

.day-charter-lb__dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  background: #fff;
  border-radius: var(--jm-radius, 12px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}

.day-charter-lb__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--jm-navy, #011425);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.day-charter-lb__media {
  position: relative;
  min-height: 280px;
  background: #0b1a28;
}

.day-charter-lb__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0.04) 20%,
    rgba(255, 255, 255, 0.12) 40%,
    rgba(255, 255, 255, 0.04) 60%
  );
  background-size: 200% 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.day-charter-lb.is-loading .day-charter-lb__media::after {
  opacity: 1;
  animation: day-charter-lb-shimmer 1.1s linear infinite;
}

@keyframes day-charter-lb-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.day-charter-lb__img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  max-height: 92vh;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.day-charter-lb__img.is-loaded {
  opacity: 1;
}

.day-charter-lb__body {
  padding: 1.75rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.day-charter-lb__title {
  margin: 0;
  font-family: var(--jm-font-display, "Playfair Display", Georgia, serif);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 600;
  color: var(--jm-navy, #011425);
  text-transform: uppercase;
  line-height: 1.25;
}

.day-charter-lb__meta {
  margin: 0;
  color: var(--jm-gold-text, #6e5740);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.day-charter-lb__desc {
  margin: 0;
  color: var(--jm-muted, #54595f);
  font-size: 0.95rem;
  line-height: 1.6;
  flex: 1;
}

.day-charter-lb__cta {
  margin-top: 0.75rem;
  appearance: none;
  border: 0;
  cursor: pointer;
  background: var(--jm-navy, #011425);
  color: #fff;
  font-family: var(--jm-font-body, Poppins, system-ui, sans-serif);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.95rem 1.15rem;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.day-charter-lb__cta:hover {
  background: var(--jm-gold-text, #6e5740);
  transform: translateY(-1px);
}

@media (max-width: 800px) {
  .day-charter-lb {
    padding: 0.75rem;
    align-items: center;
    justify-content: center;
  }

  .day-charter-lb__dialog {
    grid-template-columns: 1fr;
    max-height: min(88vh, 720px);
    width: 100%;
    margin: auto;
  }

  .day-charter-lb__img {
    min-height: 200px;
    max-height: 38vh;
  }

  .day-charter-lb__body {
    padding: 1.25rem 1.1rem 1.25rem;
  }

  /* Allow scrolling inside the modal only */
  .day-charter-lb__dialog {
    touch-action: pan-y;
    overscroll-behavior: contain;
  }
}
