/*
 * Alf Theme — Hydroforming Components We Manufacture + Engineered for Every Platform
 * Figma node: 699:1607
 *
 * Two visual sub-sections on a dark (#252525) background.
 * Loaded only on the Hydroforming page template.
 */

/* ═══════════════════════════════════════════════════════════════════
   SECTION
   ═══════════════════════════════════════════════════════════════════ */
.hydro-components {
  background-color: var(--color-dark);
  padding-block: 160px;
}

/* ── Inner wrap: two sub-sections stacked vertically ────────────── */
.hydro-components__wrap {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ═══════════════════════════════════════════════════════════════════
   SHARED: SECTION HEADER (used in both sub-sections)
   ═══════════════════════════════════════════════════════════════════ */
.hydro-components__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  max-width: var(--header-max-width);
  /* 896px */
  width: 100%;
  margin-inline: auto;
  text-align: center;
}

.hydro-components__title {
  font-size: var(--font-size-h2);
  /* 36px */
  font-weight: var(--font-weight-semibold);
  /* 600 */
  line-height: 1.2;
  color: var(--color-bg);
  /* cream */
  margin: 0;
}

.hydro-components__subtitle {
  font-size: var(--font-size-h4);
  /* 20px */
  font-weight: var(--font-weight-regular);
  /* 400 */
  line-height: 1.5;
  color: var(--color-bg);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   SUB-SECTION 1: SHOWCASE (diagram + chips)
   ═══════════════════════════════════════════════════════════════════ */
.hydro-components__showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

/* ── Dark showcase card ──────────────────────────────────────────── */
.hydro-components__card {
  width: 100%;
  background-color: #0c0c0c;
  border-radius: var(--radius-xl);
  /* 16px */
  padding: 48px 48px 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  overflow: hidden;
}

/* ── Chassis diagram ─────────────────────────────────────────────── */
.hydro-components__diagram {
  position: relative;
  aspect-ratio: 1054 / 384;
  background-color: var(--color-dark);
  /* #252525 */
  border: 1px solid rgba(96, 102, 88, 0.3);
  border-radius: var(--radius-lg);
  /* 14px */
  overflow: hidden;
}

.hydro-components__diagram-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

/* ── Red dot markers (absolute-positioned, percentage-based) ─────── */
.hydro-components__dot {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--color-primary);
  /* #CD261D */
  opacity: 0.94;
  left: var(--dot-x);
  top: var(--dot-y);
  transform: translate(-50%, -50%);
}

/* ── Component label chips (3-column grid) ───────────────────────── */
.hydro-components__chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
}

.hydro-components__chip {
  background-color: var(--color-dark);
  border: 1px solid rgba(96, 102, 88, 0.3);
  border-radius: 10px;
  padding: 16px 17px;
  font-size: var(--font-size-body-md);
  /* 16px */
  font-weight: var(--font-weight-regular);
  color: var(--color-bg);
  text-align: center;
  line-height: 1.5;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

@media (hover: hover) {
  .hydro-components__chip:hover {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(96, 102, 88, 0.55);
  }
}

/* ═══════════════════════════════════════════════════════════════════
   SUB-SECTION 2: PLATFORMS (vehicles)
   ═══════════════════════════════════════════════════════════════════ */
.hydro-components__platforms {
  width: 100%;
  border-left: 12px solid var(--color-primary);
  border-right: 12px solid var(--color-primary);
  padding: 72px 64px;
  display: flex;
  flex-direction: column;
  gap: 64px;
  align-items: center;
}

/* ── Vehicle columns ─────────────────────────────────────────────── */
.hydro-components__vehicles {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
}

.hydro-components__vehicle {
  flex: 1 0 0;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hydro-components__vehicle-label {
  font-size: var(--font-size-body-md);
  /* 16px */
  font-weight: var(--font-weight-regular);
  color: var(--color-bg);
  text-align: center;
  line-height: 1.5;
}

/* ── Vehicle image wrapper (clips the scale hover effect) ───────── */
.hydro-components__vehicle-thumb {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
}

.hydro-components__vehicle-img {
  display: block;
  width: 100%;
  aspect-ratio: 1023 / 557;
  object-fit: cover;
  transition: transform 0.35s ease;
}

@media (hover: hover) {
  .hydro-components__vehicle:hover .hydro-components__vehicle-img {
    transform: scale(1.05);
  }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

/* ── Tablet landscape (≤ 1280px) ─────────────────────────────────── */
@media (max-width: 1280px) {
  .hydro-components {
    padding-block: 120px;
  }

  .hydro-components__card {
    padding: 40px;
  }

  .hydro-components__platforms {
    padding: 60px 48px;
  }
}

/* ── Tablet portrait (≤ 900px) ───────────────────────────────────── */
@media (max-width: 900px) {
  .hydro-components {
    padding-block: 100px;
  }

  .hydro-components__card {
    padding: 32px;
  }

  .hydro-components__platforms {
    padding: 48px 32px;
    gap: 48px;
    border-left-width: 8px;
    border-right-width: 8px;
  }

  /* vehicles remain single flex row on tablet */
}

/* ── Mobile (≤ 640px) — Figma node 699:2116 ─────────────────────── */
@media (max-width: 640px) {
  .hydro-components {
    padding-block: 120px;
    /* matches Figma py-[120px] */
  }

  .hydro-components__wrap {
    gap: 40px;
  }

  /* Mobile typography: 32px H2, 16px body */
  .hydro-components__title {
    font-size: 32px;
  }

  .hydro-components__showcase .hydro-components__subtitle {
    font-size: var(--font-size-body-md);
    /* 16px */
  }

  .hydro-components__platforms .hydro-components__subtitle {
    font-weight: 300;
    /* Light on mobile per Figma */
  }

  /* Card: tighter padding on mobile */
  .hydro-components__card {
    padding: 32px 12px;
    gap: 24px;
  }

  /* Chips: 2-column grid, min-height 70px per Figma */
  .hydro-components__chips {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .hydro-components__chip {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
  }

  /* Platforms: 8px red border, reduced padding */
  .hydro-components__platforms {
    padding: 48px 16px;
    gap: 32px;
    border-left-width: 8px;
    border-right-width: 8px;
  }

  /* Vehicles: horizontal scroll strip — no wrapping */
  .hydro-components__vehicles {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .hydro-components__vehicles::-webkit-scrollbar {
    display: none;
  }

  .hydro-components__vehicle {
    flex: 0 0 160px;
    /* fixed-width, matches Figma ~178px */
    scroll-snap-align: start;
  }
}