/* =========================================================
   IMPIANTI MECCANICI — RENIX
   Struttura coerente con le altre pagine servizi
========================================================= */

:root {
  --mec-bg: #566667;
  --mec-bg-dark: #344243;
  --mec-card: #cde4c5;
  --mec-green: #91c3a2;
  --mec-ink: #344041;
  --mec-white: #ffffff;
}

.meccanici-page {
  margin: 0;
  background: #ffffff;
  color: var(--mec-ink);
  font-family: "Montserrat", sans-serif;
}

.meccanici-page *,
.meccanici-page *::before,
.meccanici-page *::after {
  box-sizing: border-box;
}

.meccanici-page main {
  overflow: hidden;
}

.mec-shell {
  width: min(1180px, calc(100% - 80px));
  margin: 0 auto;
}

/* HERO */
.mec-hero {
  background: #536364;
  padding: 180px 0 92px;
  color: #ffffff;
}

.mec-hero__grid {
  width: min(100% - 120px, 1280px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 90px;
  align-items: center;
}

.mec-hero__copy {
  width: auto;
  max-width: none;
}

.mec-kicker {
  margin: 0 0 58px;
  color: #cde4c5;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
}

.mec-hero h1 {
  margin: 0 0 28px;
  font-size: 48px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  white-space: nowrap;
}

.mec-hero__text {
  width: auto;
  max-width: 480px;
  margin: 0;
  font-size: 22px;
  line-height: 1.38;
  color: rgba(255, 255, 255, 0.94);
}

.mec-hero__media {
  width: 100%;
  height: auto;
  max-width: none;
  overflow: hidden;
  border-radius: 10px;
}

.mec-hero__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.52 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}

/* TITOLI */
.mec-section-title {
  margin-bottom: 58px;
  text-align: center;
}

.mec-section-title h2 {
  margin: 0;
  color: var(--mec-ink);
  font-size: 34px;
  line-height: 1.05;
  font-weight: 700;
}

.mec-section-title span {
  display: block;
  width: 255px;
  max-width: 70%;
  height: 3px;
  margin: 9px auto 0;
  background: var(--mec-ink);
}

.mec-section-title--light h2 {
  color: #ffffff;
}

.mec-section-title--light span {
  background: #ffffff;
}

/* DETTAGLIO */
.mec-details {
  padding: 56px 0 100px;
  background: #ffffff;
}

.mec-details__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 54px 40px;
}

.mec-detail-card {
  min-height: 210px;
  padding: 26px 30px 28px;
  background: var(--mec-card);
  color: var(--mec-ink);
  border-radius: 12px;
  box-shadow: 0 5px 7px rgba(31, 46, 47, .14);
}

.mec-detail-card__head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.mec-detail-card__icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  color: var(--mec-ink);
}

.mec-detail-card__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mec-detail-card h3 {
  margin: 0;
  color: var(--mec-ink);
  font-size: 23px;
  line-height: 1.05;
  font-weight: 600;
}

.mec-detail-card p {
  margin: 0;
  color: rgba(52, 64, 65, .92);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
}

/* GALLERIA */
.mec-works {
  width: 100%;
  background: var(--mec-bg);
  padding: 66px 0 78px;
  color: #ffffff;
  overflow: hidden;
}

.mec-works__shell {
  width: 100%;
  max-width: none;
  margin: 0;
}

.mec-works .mec-section-title {
  width: fit-content;
  margin: 0 auto 58px;
}

.mec-works__scroller {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  display: flex;
  align-items: stretch;
  gap: 42px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 160px 14px 160px;
  scroll-snap-type: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}

.mec-works__scroller::-webkit-scrollbar {
  display: none;
}

.mec-works__scroller.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.mec-works__scroller > .mec-work {
  width: 34vw;
  min-width: 430px;
  flex: 0 0 34vw;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 10px;
}

.mec-works__scroller > .mec-work img {
  display: block;
  width: 100%;
  height: 345px;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  pointer-events: none;
  user-select: none;
}

/* PREFOOTER */
.mec-prefooter {
  width: 100%;
  height: 288px;
  background: linear-gradient(
    to bottom,
    var(--mec-bg-dark) 0,
    var(--mec-bg-dark) calc(100% - 64px),
    #536364 calc(100% - 64px),
    #536364 100%
  );
}

/* TABLET */
@media (max-width: 980px) {
  .mec-shell {
    width: min(100% - 36px, 900px);
  }

  .mec-hero {
    padding: 112px 0 62px;
  }

  .mec-hero__grid {
    grid-template-columns: 1fr 1fr;
    gap: 34px;
  }

  .mec-kicker {
    margin-bottom: 28px;
    font-size: 14px;
  }

  .mec-hero h1 {
    font-size: 34px;
  }

  .mec-hero__text {
    font-size: 15px;
  }

  .mec-details {
    padding: 48px 0 72px;
  }

  .mec-details__grid {
    gap: 24px;
  }

  .mec-detail-card {
    min-height: 190px;
    padding: 22px 20px;
  }

  .mec-detail-card h3 {
    font-size: 18px;
  }

  .mec-detail-card p {
    font-size: 12px;
  }

  .mec-prefooter {
    height: 230px;
  }
}

/* MOBILE */
@media (max-width: 700px) {
  .mec-shell {
    width: calc(100% - 28px);
  }

  .mec-hero {
    padding: 92px 0 44px;
  }

  .mec-hero__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .mec-kicker {
    margin-bottom: 22px;
    font-size: 12px;
  }

  .mec-hero h1 {
    margin-bottom: 16px;
    font-size: 30px;
    white-space: normal;
  }

  .mec-hero__text {
    max-width: 420px;
    font-size: 14px;
    line-height: 1.45;
  }

  .mec-hero__media img {
    aspect-ratio: 16 / 10;
    border-radius: 10px;
  }

  .mec-details {
    padding: 40px 0 54px;
  }

  .mec-section-title {
    margin-bottom: 34px;
  }

  .mec-section-title h2 {
    font-size: 25px;
  }

  .mec-section-title span {
    width: 190px;
  }

  .mec-details__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .mec-detail-card {
    min-height: 165px;
    padding: 16px 14px 18px;
    border-radius: 10px;
  }

  .mec-detail-card__head {
    gap: 10px;
    margin-bottom: 26px;
  }

  .mec-detail-card__icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .mec-detail-card h3 {
    font-size: 14px;
    line-height: 1.1;
  }

  .mec-detail-card p {
    font-size: 9.5px;
    line-height: 1.4;
  }

  .mec-works {
    padding: 46px 0 54px;
  }

  .mec-works .mec-section-title {
    margin-bottom: 32px;
  }

  .mec-works__scroller {
    gap: 16px;
    padding: 0 20px 10px 40px;
  }

  .mec-works__scroller > .mec-work {
    width: 76vw;
    min-width: 76vw;
    flex: 0 0 76vw;
  }

  .mec-works__scroller > .mec-work img {
    width: 100%;
    height: auto;
    aspect-ratio: 1.55 / 1;
  }

  .mec-prefooter {
    height: 188px;
  }
}

@media (max-width: 420px) {
  .mec-details__grid {
    gap: 10px;
  }

  .mec-detail-card {
    min-height: 155px;
    padding: 14px 12px;
  }

  .mec-detail-card h3 {
    font-size: 12.5px;
  }

  .mec-detail-card p {
    font-size: 8.5px;
  }
}

/* DESKTOP MATCH CON LE ALTRE PAGINE */
@media (min-width: 981px) {
  .mec-details {
    padding: 54px 0 92px;
  }

  .mec-details .mec-shell {
    width: min(calc(100% - 100px), 1290px);
    max-width: none;
  }

  .mec-details .mec-section-title {
    margin-bottom: 64px;
  }

  .mec-details .mec-section-title h2 {
    font-size: 30px;
    line-height: 1.05;
    font-weight: 700;
  }

  .mec-details .mec-section-title span {
    width: 220px;
    height: 2px;
    margin: 7px auto 0;
  }

  .mec-details__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 48px;
    row-gap: 88px;
    align-items: stretch;
  }

  .mec-detail-card {
    width: 100%;
    height: 268px;
    min-height: 268px;
    padding: 38px 36px 32px;
    background: #cde4c5;
    border-radius: 10px;
    box-shadow: 0 5px 8px rgba(31, 46, 47, 0.14);
  }

  .mec-detail-card__head {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    min-height: 58px;
    margin: 0 0 27px;
  }

  .mec-detail-card__icon {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    margin: 0;
  }

  .mec-detail-card__icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .mec-detail-card h3 {
    margin: 0;
    font-size: 24px;
    line-height: 1.08;
    font-weight: 600;
    letter-spacing: 0;
    color: #344041;
  }

  .mec-detail-card p {
    width: 100%;
    max-width: 100%;
    margin: 0;
    font-size: 15px;
    line-height: 1.48;
    font-weight: 400;
    color: rgba(52, 64, 65, 0.92);
  }
}
