/* =========================================================
   Fleet — Cinematic component + Comparison table + Overlay
   ========================================================= */

/* ---------- Section wrapper ---------- */
.fleet-cinematic {
  background: var(--navy-900);
  position: relative;
}
.fleet-cinematic .section-head__main {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
}

/* ---------- Stage (image + info) ---------- */
.fc-stage {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  min-height: calc(100svh - var(--header-height));
  height: clamp(520px, 70vh, 760px);
  overflow: hidden;
  background: var(--navy-1000);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Two stacked image layers so we can cross-fade */
.fc-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 700ms var(--ease-out);
  content-visibility: auto;
}
.fc-bg.is-active { opacity: 1; }

/* Inside Swiper slides fc-bg is always fully visible — Swiper handles slide opacity */
.fc-swiper .fc-bg { opacity: 1; transition: none; }
.fc-bg img,
.fc-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  display: block;
}

.fc-video {
  background: var(--navy-1000);
}

/* Side-darkening gradient — text remains readable on left half */
.fc-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(6,15,31,0.96) 0%, rgba(6,15,31,0.7) 38%, rgba(6,15,31,0.15) 75%, rgba(6,15,31,0.05) 100%),
    linear-gradient(180deg, rgba(6,15,31,0.0) 60%, rgba(6,15,31,0.5) 100%);
  pointer-events: none;
}

.fc-counter {
  position: absolute;
  top: 32px;
  right: var(--gutter);
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--steel-300);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(6, 15, 31, 0.5);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.fc-counter strong {
  color: var(--white);
  font-weight: 500;
}

/* Inner positioned content */
.fc-stage-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}
.fc-info {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  align-self: flex-start;
}

.fc-type {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel-400);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.fc-type::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent, #86BB63);
}

.fc-name {
  font-weight: 200;
  font-size: clamp(48px, 6vw, 92px);
  letter-spacing: -0.04em;
  line-height: 0.92;
  color: var(--white);
  margin-bottom: 10px;
}

.fc-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-500);
  margin-bottom: 36px;
}

/* LOA measurement strip */
.fc-loa {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 440px;
  margin-bottom: 28px;
}
.fc-loa-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}
.fc-loa-line {
  flex: 1;
  height: 2px;
  background: var(--accent);
  opacity: 0.7;
  position: relative;
}
.fc-loa-val {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
  white-space: nowrap;
  font-weight: 600;
}
.fc-loa-lbl {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--steel-500);
}

/* Spec cards */
.fc-specs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.fc-spec {
  background: rgba(6, 15, 31, 0.55);
  border: 1px solid var(--line);
  padding: 10px 16px;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 96px;
}
.fc-spec dt {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-500);
}
.fc-spec dd {
  font-weight: 500;
  font-size: 18px;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
  margin: 0;
}

/* Live status */
.fc-live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(6, 15, 31, 0.55);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-300);
  align-self: flex-start;
}
.fc-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(134, 187, 99, 0.6);
  animation: fcLivePulse 1.6s ease-in-out infinite;
}
@keyframes fcLivePulse { 50% { opacity: 0.4; } }

/* Cross-fade text — no longer used after SwiperJS migration */

/* ---------- Bottom controls bar (arrows + dots) — overlaid on stage ---------- */
.fc-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 24px 0 28px;
  background: linear-gradient(to top, rgba(6,15,31,0.75) 0%, transparent 100%);
}
.fc-controls-inner {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 24px;
  align-items: center;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.fc-arrow {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--white);
  font-size: 14px;
  transition: all 400ms var(--ease-out);
  border-radius: 50%;
}
.fc-arrow:hover {
  background: var(--ivory);
  color: var(--navy-800);
  border-color: var(--ivory);
}
.fc-arrow svg { width: 18px; height: 18px; }

.fc-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.fc-dot.swiper-pagination-bullet {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: var(--steel-600);
  border: none;
  cursor: pointer;
  padding: 0;
  transition:  400ms var(--ease-out);
  border-radius: 100px;
}
.fc-dot.is-active {
  width: 28px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(134, 187, 99, 0.5);
}
.fc-dot:hover:not(.is-active) {
  background: var(--steel-400);
}

@media (max-width: 720px) {
  .fc-stage { height: auto; min-height: 500px;aspect-ratio: .6; }
  .fc-name { font-size: clamp(40px, 12vw, 64px); }
  .fc-specs { gap: 6px; }
  .fc-spec { min-width: auto; padding: 8px 12px; }
  .fc-spec dd { font-size: 15px; }
  .fc-controls-inner { grid-template-columns: 40px 1fr 40px; }
  .fc-arrow { width: 40px; height: 40px; }
  .fc-counter,
  .fc-spec,
  .fc-live { backdrop-filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fc-bg {
    transition: none;
  }

  .fc-live-dot {
    animation: none;
  }
}

/* =========================================================
   Fleet page — Stacked Comparison table
   ========================================================= */

.fleet-table-wrap {
  padding-bottom: var(--space-section-lg);
}

.fleet-table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.fleet-table-head__count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-400);
}
.fleet-table-head__count strong {
  color: var(--white);
  font-weight: 500;
}
.fleet-table-filters {
  /* display: flex; */
  display: none;
  gap: 8px;
  flex-wrap: wrap;
}
.fleet-filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-200);
  cursor: pointer;
  transition: all 200ms;
  background: transparent;
}
.fleet-filter-btn:hover {
  border-color: var(--steel-300);
  color: var(--white);
}
.fleet-filter-btn.is-active {
  background: var(--ivory);
  color: var(--navy-800);
  border-color: var(--ivory);
}

.fleet-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
}
.fleet-table thead th {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel-500);
  text-align: left;
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.fleet-table thead th.num { text-align: right; }

.fleet-row {
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 200ms var(--ease-out);
}
.fleet-row:hover {
  background: var(--navy-700);
}
.fleet-row.is-hidden { display: none; }

.fleet-row td {
  padding: 18px 12px;
  vertical-align: middle;
  transition: padding 200ms var(--ease-out);
}
.fleet-row td:nth-child(2){
  padding-block: 0;
}



.fleet-row__idx {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--steel-600);
  width: 48px;
}
.fleet-row:hover .fleet-row__idx {
  color: var(--accent);
}

.fleet-row__vessel {
  display: flex;
  align-items: center;
  gap: 16px;
}
.fleet-row__thumb {
  height: 70px;
  aspect-ratio: 5 / 3;
  background: var(--navy-600);
  border: 1px solid var(--line);
  overflow: hidden;
  flex-shrink: 0;
  transition: width 200ms var(--ease-out), height 200ms var(--ease-out);
}

.fleet-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fleet-row__name {
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.005em;
  color: var(--steel-200);
  transition: color 200ms;
}
.fleet-row:hover .fleet-row__name { color: var(--white); }
.fleet-row__imo {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel-500);
  margin-top: 4px;
}

.fleet-row__type {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-300);
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  white-space: nowrap;
  display: inline-block;
}

.fleet-row__num {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-align: right;
}
.fleet-row__num--mute {
  color: var(--steel-300);
  font-size: 12px;
}

.fleet-row__dl {
  width: 36px;
  text-align: center;
  align-self: center;
}
.fleet-row__dl-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--steel-500);
  transition: color 200ms;
}
.fleet-row__dl-link:hover {
  color: var(--white);
}

.fleet-row__arrow {
  width: 28px;
  text-align: right;
  color: var(--steel-500);
  transition: color 200ms, transform 200ms;
}
.fleet-row:hover .fleet-row__arrow {
  color: var(--white);
  transform: translateX(4px);
}

@media (max-width: 900px) and (min-width: 641px) {
  .fleet-table thead th:nth-child(6),
  .fleet-table thead th:nth-child(7),
  .fleet-row td:nth-child(6),
  .fleet-row td:nth-child(7) { display: none; }
  .fleet-table thead th:nth-child(3),
  .fleet-row td:nth-child(3) { display: none; }
}

@media (max-width: 640px) {
  .fleet-table thead { display: none; }

  .fleet-table,
  .fleet-table tbody { display: block; width: 100%; }

  .fleet-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 4px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }


  .fleet-row td {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0;
  }

  .fleet-row td[data-label]::before {
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--steel-500);
  }

  .fleet-row td:nth-child(2) {
    width: 100%;
    order: -1;
  }

  .fleet-row td[data-label="Type"] { flex: 1 1 calc(100% - 72px); }

  .fleet-row td[data-label="Docs"] {
    width: auto;
    padding-left: 24px;
    align-items: flex-start;
  }

  .fleet-row td[data-label="DWT"],
  .fleet-row td[data-label="LOA"],
  .fleet-row td[data-label="Beam"],
  .fleet-row td[data-label="Draft"] { flex: 1 1 20%; }

  .fleet-row td[data-label="No."],
  .fleet-row td.fleet-row__arrow,
  .fleet-row td.fleet-row__dl:empty { display: none; }

  .fleet-row__num { text-align: left; }
}

/* =========================================================
   Vessel detail page — fc-stage modifier + back link
   ========================================================= */

.fc-stage--detail {
  min-height: 100svh;
  padding-top: var(--header-height);
}


/* =========================================================
   Swiper overrides — homepage fleet carousel
   ========================================================= */

.fc-swiper.swiper,
.fc-swiper .swiper-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Neutralise Swiper default bullet styles so fc-dot takes full control */
.swiper-pagination-bullet {
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  opacity: 1;
  margin: 0 !important;
}
.swiper-pagination-bullet-active.fc-dot {
  width: 28px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(134, 187, 99, 0.5);
}
.swiper-pagination-fc {
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  position: static;
}
.swiper-btn-prev.swiper-button-disabled,
.swiper-btn-next.swiper-button-disabled {
  opacity: 1;
  pointer-events: auto;
}

/* =========================================================
   Fleet map section
   ========================================================= */


#fleet-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}



/* =========================================================
   Vessel popup (Mapbox)
   ========================================================= */

.vessel-popup .mapboxgl-popup-content {
  background: var(--navy-800);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0;
  overflow: hidden;
  width: 240px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}
.vessel-popup .mapboxgl-popup-tip { display: none; }
.vessel-popup .mapboxgl-popup-close-button {
  color: var(--steel-400);
  font-size: 16px;
  padding: 6px 8px;
  line-height: 1;
  background: transparent;
  top: 2px;
  right: 2px;
}
.vessel-popup .mapboxgl-popup-close-button:hover { color: var(--white); }

.vessel-popup__img {
  width: 100%;
  aspect-ratio: 24/13;
  object-fit: cover;
  display: block;
}
.vessel-popup__body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vessel-popup__name {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0;
}
.vessel-popup__status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--steel-300);
  margin: 0;
}
.vessel-popup__link {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  transition: opacity 200ms;
  outline: none;
  user-select: none;
}
.vessel-popup__link:hover { opacity: 0.7; }
.vessel-popup__port {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--steel-500);
  margin: 0;
}
@media (max-width:900px) {
  .vessel-popup .mapboxgl-popup-content{
    width: 160px;
  }
  .vessel-popup__body{
    padding: 8px;
  }
  .mapboxgl-popup .vessel-popup__img{
    display: none;
  }
}

/* =========================================================
   Vessels strip — horizontal cards under the fleet map
   ========================================================= */
.geo-vessels-wrap{
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}
.geo-vessels-wrap .geo--vessels{
  flex-grow: 1;
}
.geo--vessels { position: relative;flex-shrink: 0;min-height: unset;display: flex;flex-direction: column;justify-content: center; }
.geo--vessels .geo__overlay{
  min-height: unset
}
.geo--vessels .geo__panel{padding-block: var(--space-lg);}

.vessels-swiper {
  z-index: 3;
  flex-shrink: 0;
  padding:0;
  overflow: hidden;
  pointer-events: none;
  width: 100%;min-width: 0;
}
.vessels-swiper .swiper-wrapper { align-items: flex-end; pointer-events: none; }
.vessels-swiper .swiper-slide {
  height: auto;
}
.vessels-swiper .vessel-card {
  width: auto;
  height: auto;
  pointer-events: auto;
  cursor: pointer;
}
.vessels-swiper .vessel-popup .mapboxgl-popup-content{
  height: 100%;
  box-shadow: none;
}
.vessels-swiper .vessel-card.is-active .mapboxgl-popup-content {
  border-color: var(--accent);
}
.vessels-swiper .vessel-card.is-hidden { display: none; }
.vessels-swiper .vessel-card img{filter: grayscale(1); transition: filter 400ms var(--ease-out);}
.vessels-swiper .vessel-card.is-active img{filter: none;}

@media (max-width: 900px) {
  .geo--vessels .geo__map{aspect-ratio: unset;height: 100%;flex-grow: 1;min-height: 300px;}
  .geo-vessels-wrap .geo__panel{padding-top: var(--space-lg);}
}
