/* ! =========================
   PRODUCTS MAIN HERO
========================= */

.products-main-hero-section {
  position: relative;

  width: 100%;
  min-height: 430px;

  overflow: hidden;

  background: #10202c;

  isolation: isolate;
}

/* =========================
   BACKGROUND IMAGE
========================= */

.products-main-hero-image {
  position: absolute;
  inset: 0;

  z-index: 1;

  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
}

/* =========================
   OVERLAY
========================= */

.products-main-hero-overlay {
  position: absolute;
  inset: 0;

  z-index: 2;

  background:
    linear-gradient(
      90deg,
      rgba(5, 40, 67, 0.72) 0%,
      rgba(24, 67, 94, 0.54) 32%,
      rgba(30, 49, 62, 0.42) 60%,
      rgba(12, 21, 28, 0.56) 100%
    ),
    linear-gradient(180deg, rgba(5, 15, 22, 0.1) 0%, rgba(5, 15, 22, 0.3) 100%);
}

/* =========================
   WRAPPER
========================= */

.products-main-hero-wrapper {
  position: relative;

  z-index: 3;

  width: min(100% - 32px, 1320px);
  min-height: 500px;

  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   CONTENT
========================= */

.products-main-hero-content {
  width: 100%;
  max-width: 1000px;

  padding: 70px 0;

  color: #ffffff;

  text-align: center;
}

/* Kicker */

.products-main-hero-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 12px;

  margin-bottom: 22px;

  color: #ffffff;

  font-size: 0.78rem;
  line-height: 1;
  font-weight: 800;

  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.products-main-hero-kicker::before,
.products-main-hero-kicker::after {
  content: "";

  width: 44px;
  height: 3px;

  border-radius: 999px;

  background: #00b2e9;
}

/* =========================
   H1
========================= */

.products-main-hero-content h1 {
  max-width: 1000px;

  margin: 0 auto;

  color: #ffffff;

  font-size: clamp(2.7rem, 5vw, 3rem);
  line-height: 0.96;

  font-weight: 900;
  letter-spacing: -0.06em;

  text-shadow: 0 10px 30px rgba(7, 18, 25, 0.24);
}

/* =========================
   SUBTITLE
========================= */

.products-main-hero-content p {
  max-width: 820px;

  margin: 24px auto 0;

  color: rgba(255, 255, 255, 0.94);

  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.38;

  font-weight: 500;
}

/* =========================
   TABLET
========================= */

@media (max-width: 991.98px) {
  .products-main-hero-section,
  .products-main-hero-wrapper {
    min-height: 400px;
  }

  .products-main-hero-content {
    padding: 60px 0;
  }

  .products-main-hero-content h1 {
    max-width: 850px;

    font-size: clamp(2.5rem, 6vw, 4rem);
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 767.98px) {
  .products-main-hero-section,
  .products-main-hero-wrapper {
    min-height: 460px;
  }

  .products-main-hero-wrapper {
    width: min(100% - 24px, 1320px);
  }

  .products-main-hero-image {
    object-position: center;
  }

  .products-main-hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(5, 32, 50, 0.66) 0%,
      rgba(6, 27, 42, 0.84) 100%
    );
  }

  .products-main-hero-content {
    padding: 56px 0;
  }

  .products-main-hero-kicker {
    margin-bottom: 18px;

    font-size: 0.72rem;
  }

  .products-main-hero-kicker::before,
  .products-main-hero-kicker::after {
    width: 30px;
  }

  .products-main-hero-content h1 {
    font-size: 2.35rem;
    line-height: 0.98;
  }

  .products-main-hero-content p {
    margin-top: 18px;

    font-size: 1.08rem;
    line-height: 1.45;
  }
}

/* ! =========================
   PRODUCTS MAIN INTRO
========================= */

.products-main-intro-section {
  padding: 52px 0;

  background: #f7f7f5;
}

.products-main-intro-wrapper {
  width: min(100% - 32px, 1320px);
  margin: 0 auto;
}

.products-main-intro-content {
  max-width: 1050px;

  margin: 0 auto;

  text-align: center;
}

/* =========================
   TITLE
========================= */

.products-main-intro-content h2 {
  margin: 0 0 18px;

  color: #717985;

  font-size: clamp(2rem, 3vw, 2.5rem);
  line-height: 1;

  font-weight: 900;
  letter-spacing: -0.05em;
}

/* =========================
   TEXT
========================= */

.products-main-intro-content p {
  margin: 0;

  color: #252a31;

  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.5;

  font-weight: 400;
}

.products-main-intro-content strong,
.products-main-intro-content b {
  color: #15191e;

  font-weight: 900;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 767.98px) {
  .products-main-intro-section {
    padding: 42px 0;
  }

  .products-main-intro-wrapper {
    width: min(100% - 24px, 1320px);
  }

  .products-main-intro-content h2 {
    margin-bottom: 16px;

    font-size: 2rem;
  }

  .products-main-intro-content p {
    font-size: 0.95rem;
    line-height: 1.55;
  }
}

/* ! =========================
   PRODUCTS CONFIGURATION
========================= */

.products-config-section {
  padding: 80px 0;
  background: #f0f1f3;
}

.products-config-wrapper {
  width: min(100% - 32px, 1320px);
  margin: 0 auto;
}

/* =========================
   HEADER
========================= */

.products-config-header {
  margin-bottom: 30px;
  text-align: center;
}

.products-config-header h2 {
  margin: 0;

  color: #717985;

  font-size: clamp(2rem, 3vw, 2.5rem);
  line-height: 1;

  font-weight: 900;
  letter-spacing: -0.05em;
}

/* =========================
   GRID
========================= */

.products-config-grid {
  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 16px;

  /*
   * Le card della stessa riga assumono
   * l'altezza della card più alta.
   */
  align-items: stretch;
}

/* =========================
   CARD BASE
========================= */

.products-config-card {
  position: relative;

  min-width: 0;
  min-height: 650px;
  height: 100%;

  overflow: hidden;

  border-radius: 16px;

  /*
   * Immagine e contenuto sono due
   * blocchi separati reali.
   */
  display: flex;
  flex-direction: column;

  background: #111b24;

  color: #ffffff;
  text-decoration: none;

  isolation: isolate;

  box-shadow: 0 18px 38px rgba(15, 17, 25, 0.12);

  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease;
}

a.products-config-card {
  cursor: pointer;
}

.products-config-card:hover {
  color: #ffffff;
  text-decoration: none;

  transform: translateY(-4px);

  box-shadow: 0 26px 52px rgba(15, 17, 25, 0.18);
}

.products-config-card:focus-visible {
  outline: 3px solid #00b2e9;
  outline-offset: 3px;
}

/* =========================
   IMAGE BLOCK
========================= */

.products-config-media {
  position: relative;

  z-index: 1;

  flex: 0 0 370px;

  width: 100%;
  height: 370px;

  overflow: hidden;

  background: #dce2e7;
}

.products-config-media img {
  display: block;

  width: 100%;
  height: 100%;

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

  transform: scale(1);

  transition:
    transform 0.55s ease,
    filter 0.35s ease;
}

.products-config-card:hover .products-config-media img {
  transform: scale(1.05);

  filter: saturate(1.06);
}

/* =========================
   FULL CARD OVERLAY
========================= */

/*
 * Overlay sull'intera card.
 *
 * Nella zona alta rimane quasi trasparente
 * per lasciare ben visibile il prodotto.
 *
 * La parte scura inizia poco prima della
 * fine dell'immagine e prosegue nel content.
 */

.products-config-overlay {
  position: absolute;
  inset: 0;

  z-index: 2;

  pointer-events: none;

  background: linear-gradient(
    180deg,
    rgba(8, 18, 26, 0) 0%,
    rgba(8, 18, 26, 0.02) 30%,
    rgba(8, 18, 26, 0.08) 42%,
    rgba(8, 18, 26, 0.3) 50%,
    rgba(8, 18, 26, 0.68) 58%,
    rgba(10, 21, 30, 0.9) 67%,
    rgba(10, 21, 30, 0.98) 78%,
    rgba(10, 21, 30, 1) 100%
  );

  transition: background 0.35s ease;
}

/* Hover leggermente brand */

.products-config-card:hover .products-config-overlay {
  background: linear-gradient(
    180deg,
    rgba(0, 178, 233, 0.02) 0%,
    rgba(0, 178, 233, 0.03) 28%,
    rgba(0, 178, 233, 0.08) 40%,
    rgba(7, 45, 60, 0.34) 50%,
    rgba(7, 37, 51, 0.72) 59%,
    rgba(8, 28, 39, 0.92) 68%,
    rgba(9, 23, 32, 0.99) 80%,
    rgba(9, 22, 31, 1) 100%
  );
}

/* =========================
   CONTENT BLOCK
========================= */

.products-config-content {
  position: relative;

  z-index: 3;

  width: 100%;

  /*
   * Il contenuto risale leggermente
   * sopra l'immagine.
   *
   * Questo crea la fusione visiva
   * immagine -> gradiente -> contenuto.
   */
  margin-top: -85px;

  padding: 105px 28px 28px;

  flex: 1 1 auto;

  display: flex;
  flex-direction: column;

  min-height: 0;

  /*
   * Seconda sfumatura locale:
   * rende impossibile vedere uno stacco
   * netto tra immagine e blocco testo.
   */
  background: linear-gradient(
    180deg,
    rgba(10, 21, 30, 0) 0%,
    rgba(10, 21, 30, 0.65) 32px,
    rgba(10, 21, 30, 0.94) 78px,
    #0a151e 110px,
    #0a151e 100%
  );
}

/* =========================
   TITLE
========================= */

.products-config-content h3 {
  margin: 0 0 10px;

  color: #ffffff;

  font-size: clamp(1.7rem, 2.1vw, 2.25rem);

  line-height: 0.98;

  font-weight: 900;

  letter-spacing: -0.055em;

  overflow-wrap: break-word;

  text-shadow: 0 8px 22px rgba(15, 17, 25, 0.28);
}

/* =========================
   SUBTITLE
========================= */

.products-config-subtitle {
  margin-bottom: 13px;

  color: rgba(255, 255, 255, 0.97);

  font-size: 0.98rem;

  line-height: 1.35;

  font-weight: 500;
}

/* =========================
   DESCRIPTION
========================= */

.products-config-content p {
  margin: 0 0 22px;

  color: rgba(255, 255, 255, 0.88);

  font-size: 0.84rem;

  line-height: 1.48;

  overflow-wrap: break-word;
}

/* =========================
   PRODUCT CTA
========================= */

.products-config-btn {
  width: 100%;
  min-height: 44px;

  /*
   * Se la card viene allungata dalla
   * sorella più alta, il bottone rimane
   * comunque allineato in fondo.
   */
  margin-top: auto;

  padding: 0 18px;

  border-radius: 9px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(90deg, #3f6fd7 0%, #00b2e9 100%);

  color: #ffffff;

  font-size: 0.78rem;

  line-height: 1.1;

  font-weight: 900;

  letter-spacing: 0.015em;

  text-align: center;
  text-transform: uppercase;

  box-shadow: 0 10px 24px rgba(0, 178, 233, 0.2);

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.products-config-card:hover .products-config-btn {
  transform: translateY(-2px);

  box-shadow: 0 14px 30px rgba(0, 178, 233, 0.3);
}

/* ! =========================
   CONSULTANCY CARD
========================= */

/*
 * Ultima card:
 * nessuna immagine e nessun sistema
 * di overlap. Rimane una card normale.
 */

.products-config-card-cta {
  min-height: 650px;

  display: flex;
  flex-direction: column;

  padding: 0;

  background: linear-gradient(145deg, #477fd0 0%, #315b94 48%, #293c50 100%);

  isolation: isolate;
}

/* Decorative glow */

.products-config-card-cta::before {
  content: "";

  position: absolute;

  top: -120px;
  right: -120px;

  width: 360px;
  height: 360px;

  border-radius: 50%;

  background: radial-gradient(
    circle,
    rgba(0, 178, 233, 0.2) 0%,
    rgba(0, 178, 233, 0) 70%
  );

  pointer-events: none;
}

/* CTA content */

.products-config-cta-content {
  position: relative;

  z-index: 3;

  width: 100%;
  height: 100%;

  padding: 30px;

  flex: 1;

  display: flex;
  flex-direction: column;

  min-height: 0;
}

/* CTA title */

.products-config-cta-content h3 {
  max-width: 320px;

  margin: 0 0 18px;

  color: #ffffff;

  font-size: clamp(2rem, 2.5vw, 2.65rem);

  line-height: 0.94;

  font-weight: 900;

  letter-spacing: -0.06em;
}

/* CTA lead */

.products-config-cta-lead {
  margin-bottom: 20px;

  color: #ffffff;

  font-size: clamp(1.15rem, 1.45vw, 1.4rem);

  line-height: 1.15;

  font-weight: 600;
}

/* CTA body */

.products-config-cta-content p {
  margin: 0 0 28px;

  color: rgba(255, 255, 255, 0.9);

  font-size: 0.88rem;

  line-height: 1.48;
}

.products-config-cta-content strong,
.products-config-cta-content b {
  color: #ffffff;

  font-weight: 900;
}

/* Consultancy button */

.products-config-consultancy-btn {
  width: fit-content;
  max-width: 100%;

  min-height: 44px;

  margin-top: auto;

  padding: 0 9px 0 18px;

  border-radius: 999px;

  display: inline-flex;
  align-items: center;

  gap: 12px;

  background: linear-gradient(90deg, #00b2e9 0%, #3772bc 100%);

  color: #ffffff;

  text-decoration: none;

  font-size: 0.82rem;

  line-height: 1;

  font-weight: 900;

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.products-config-consultancy-btn span {
  flex: 0 0 28px;

  width: 28px;
  height: 28px;

  border-radius: 50%;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: #ffffff;

  color: #3772bc;

  font-size: 1rem;

  transition: transform 0.22s ease;
}

.products-config-consultancy-btn:hover {
  color: #ffffff;

  transform: translateY(-2px);

  box-shadow: 0 14px 28px rgba(0, 178, 233, 0.28);
}

.products-config-consultancy-btn:hover span {
  transform: translateX(3px);
}

/* =========================
   TABLET
========================= */

@media (max-width: 991.98px) {
  .products-config-section {
    padding: 68px 0;
  }

  .products-config-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .products-config-card {
    min-height: 640px;
  }

  .products-config-media {
    flex-basis: 350px;

    height: 350px;
  }

  .products-config-card-cta {
    min-height: 640px;
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 767.98px) {
  .products-config-section {
    padding: 52px 0;
  }

  .products-config-wrapper {
    width: min(100% - 24px, 1320px);
  }

  .products-config-header {
    margin-bottom: 24px;
  }

  .products-config-header h2 {
    font-size: 2rem;
  }

  /* Grid */

  .products-config-grid {
    grid-template-columns: 1fr;

    gap: 14px;
  }

  /* Card */

  .products-config-card {
    min-height: 0;
    height: auto;

    border-radius: 16px;
  }

  /* Image */

  .products-config-media {
    flex: 0 0 320px;

    height: 320px;
  }

  /* Content */

  .products-config-content {
    margin-top: -75px;

    padding: 92px 22px 24px;
  }

  .products-config-content h3 {
    font-size: 2rem;
  }

  .products-config-subtitle {
    font-size: 0.95rem;
  }

  .products-config-content p {
    font-size: 0.85rem;
  }

  /* CTA gradient card */

  .products-config-card-cta {
    min-height: 500px;
  }

  .products-config-cta-content {
    padding: 24px;
  }

  .products-config-cta-content h3 {
    font-size: 2.3rem;
  }
}
