/**
 * Aimstyle – Fleet widget.
 *
 * Original HTML-widget design; already scoped to .swm-fleet-final-v2.
 * Elementor Style controls set the --sf-* custom properties on the widget;
 * var() fallbacks keep the original values and breakpoints (1024/850/600px).
 */

/* ===============================
   SWM FLEET - REFINED FINAL DESIGN
================================ */

.swm-fleet-final-v2 {
  --navy: #052d42;
  --blue: #07577a;
  --muted: #788b96;
  --line: #dce6eb;

  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  font-family: inherit;
  color: var(--navy);
}

.swm-fleet-final-v2 *,
.swm-fleet-final-v2 *::before,
.swm-fleet-final-v2 *::after {
  box-sizing: border-box;
}

/* GRID */
.swm-fleet-final-v2 .sf-grid {
  display: grid;
  grid-template-columns: var(--sf-columns-desktop, repeat(3, minmax(0, 1fr)));
  align-items: stretch;
  gap: 24px;
  width: 100%;
}

/* CARD */
.swm-fleet-final-v2 .sf-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;

  background: #ffffff;
  border: 1px solid var(--sf-card-border, var(--line));
  border-radius: 12px;

  transition:
    transform .3s ease,
    border-color .3s ease,
    box-shadow .3s ease;
}

.swm-fleet-final-v2 .sf-card:hover {
  transform: translateY(calc(-1 * var(--sf-hover-lift, 4px)));
  border-color: var(--sf-card-hover-border, #a5c8d8);
  box-shadow: 0 14px 35px rgba(5,45,66,.09);
}

/* IMAGE - FULL WIDTH, NO STRETCH */
.swm-fleet-final-v2 .sf-image {
  position: relative;
  display: block;
  width: 100%;
  height: auto !important;
  aspect-ratio: 1.55 / 1;
  overflow: hidden;
  background: #064765;
  padding: 0 !important;
  isolation: isolate;
}

.swm-fleet-final-v2 .sf-image img {
  position: absolute !important;
  inset: 0;

  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 0 !important;

  object-fit: cover !important;
  object-position: center center !important;

  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;

  transform: none !important;
  filter: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: none !important;
}

/* IMAGE HOVER FIX */
.swm-fleet-final-v2 .sf-card:hover .sf-image img {
  transform: none !important;
  filter: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* IMAGE NUMBER */
.swm-fleet-final-v2 .sf-number {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 18px;

  display: inline-flex;
  padding: 8px 11px;

  background: rgba(3,35,54,.80);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 4px;

  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 1.4px;

  color: #ffffff !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* BODY */
.swm-fleet-final-v2 .sf-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 25px 25px 24px;
  background: #ffffff;
}

/* SMALL LABEL */
.swm-fleet-final-v2 .sf-label {
  display: block;
  margin-bottom: 8px;

  color: var(--blue) !important;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* VESSEL NAME */
.swm-fleet-final-v2 .sf-title {
  display: block;
  margin: 0 0 25px !important;
  padding: 0 !important;

  color: var(--navy) !important;
  font-size: clamp(23px, 2.1vw, 30px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.5px;
}

/* SPECIFICATIONS */
.swm-fleet-final-v2 .sf-specs {
  margin-top: auto;
  border-top: 1px solid var(--line);
}

.swm-fleet-final-v2 .sf-spec {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;

  padding: 14px 0;
  border-bottom: 1px solid var(--line);

  font-size: 13px;
  line-height: 1.5;
}

.swm-fleet-final-v2 .sf-spec:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.swm-fleet-final-v2 .sf-spec span {
  color: var(--muted) !important;
  font-weight: 400;
}

.swm-fleet-final-v2 .sf-spec strong {
  color: var(--navy) !important;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

/* HOVER TEXT FIX */
.swm-fleet-final-v2 .sf-card:hover .sf-body,
.swm-fleet-final-v2 .sf-card:hover .sf-body *,
.swm-fleet-final-v2 .sf-card:hover .sf-number {
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
}

/* TABLET */
@media (max-width: 1024px) {
  .swm-fleet-final-v2 .sf-grid {
    gap: 16px;
  }

  .swm-fleet-final-v2 .sf-body {
    padding: 22px 18px;
  }

  .swm-fleet-final-v2 .sf-spec {
    font-size: 11px;
  }
}

/* SMALL TABLET */
@media (max-width: 850px) {
  .swm-fleet-final-v2 .sf-grid {
    grid-template-columns: var(--sf-columns-tablet, repeat(2, minmax(0, 1fr)));
  }

  .swm-fleet-final-v2 .sf-image {
    aspect-ratio: 1.5 / 1;
  }
}

/* MOBILE */
@media (max-width: 600px) {
  .swm-fleet-final-v2 .sf-grid {
    grid-template-columns: var(--sf-columns-mobile, 1fr);
    gap: 20px;
  }

  .swm-fleet-final-v2 .sf-image {
    aspect-ratio: 1.5 / 1;
  }

  .swm-fleet-final-v2 .sf-body {
    padding: 23px 20px;
  }

  .swm-fleet-final-v2 .sf-title {
    font-size: 26px;
    margin-bottom: 20px !important;
  }

  .swm-fleet-final-v2 .sf-spec {
    font-size: 12px;
  }

  .swm-fleet-final-v2 .sf-card:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .swm-fleet-final-v2 .sf-card {
    transition: none;
  }
}
