/* ============================================================
   PRODUCTS PAGE STYLES
   BEM: Block Element Modifier
   Mobile-First Progressive Enhancement
   ============================================================ */

/* ---- BANNER SECTION (MOBILE BASE) ---- */
.products__banner {
  position: relative;
  background: rgba(242, 249, 255, 0.4);
  width: 100vw;
  padding: 40px 16px 64px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}

.products__banner__video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  transform: scaleY(-1);
}

.products__banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.5) 5%,
    rgba(255, 255, 255, 0) 15%
  );
  z-index: 0;
}

.products__banner__content {
  position: relative;
  z-index: 1;
  text-align: left;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
}

.products__banner__eyebrow {
  font-family: "Lato", sans-serif;
  font-size: 16px;
  font-weight: 400;
  text-transform: uppercase;
  color: #191919;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  border-bottom: 4px solid #4bcce5;
  display: inline-block;
  opacity: 0;
}

.products__banner__headline {
  font-family: "Chubb Publico App", serif;
  font-size: 26px;
  font-weight: 300;
  color: #4d4d4d;
  margin-bottom: 16px;
  line-height: 1.16;
  opacity: 0;
}

.products__banner__subheadline {
  font-family: "Lato", sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #4d4d4d;
  line-height: 1.26;
  max-width: 776px;
  margin: 0;
  opacity: 0;
}

/* ---- PRODUCTS SECTION (MOBILE BASE) ---- */
.products__section {
  background: var(--color-bg-white-transparent);
  padding: 40px 16px;
  width: 100%;
  margin: 0 auto;
}

.products__container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.products__section-header {
  text-align: left;
  margin-bottom: 48px;
}

.products__section-eyebrow {
  font-family: "Lato", sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  color: #005866;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  display: block;
  line-height: 1.375;
}

.products__section-title {
  font-family: "Chubb Publico App", serif;
  font-size: 50px;
  font-weight: 300;
  color: #191919;
  margin-bottom: 12px;
  line-height: 1.2;
}

.products__section-description {
  font-family: "Lato", sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #191919;
  margin: 0;
  line-height: 1.375;
}

/* ---- GRID LAYOUT (MOBILE BASE: auto-arrange with 16px gap) ---- */
.products__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  width: 100%;
}

/* ---- PRODUCT CARD (MOBILE BASE) ---- */
.products__card {
  background: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow:
    0px 1px 2px rgba(0, 0, 0, 0.3),
    0px 1px 3px 1px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 100%;
  transition: box-shadow 0.3s ease;
}

.products__card.card-lift:hover {
  box-shadow: 0px 4px 12px rgba(101, 38, 217, 0.2);
}

.products__card__image {
  width: 100%;
  height: 142px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.products__card__image-inner {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: translateZ(0);
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.products__card:hover .products__card__image-inner {
  transform: scale(1.1);
}

.products__card__content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-grow: 1;
}

.products__card__header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.products__card__title {
  font-family: "Lato", sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: #191919;
  margin: 0;
  line-height: 1.26;
}

.products__card__body {
  flex-grow: 1;
}

.products__card__description {
  font-family: "Lato", sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #4d4d4d;
  margin: 0;
  line-height: 1.38;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.products__card__footer {
  display: flex;
  justify-content: flex-start;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}

.products__card__link {
  font-family: "Lato", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #191919;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease-in-out;
}

.products__card__link:hover {
  color: #4bcce5;
}

/* ============================================================
   TABLET BREAKPOINT: 768px and up
   Reduces banner height, increases spacing
   ============================================================ */
@media (min-width: 768px) {
  .products__banner {
    padding: 40px 24px 100px;
  }

  .products__banner__content {
    text-align: left;
  }

  .products__banner__headline {
    font-size: 62px;
  }

  .products__banner__subheadline {
    font-size: 22px;
    margin-left: 0;
    margin-right: 0;
  }

  .products__section {
    padding: 64px 24px;
  }

  .products__section-title {
    font-size: 50px;
    margin-bottom: 40px;
  }

  .products__grid {
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(336px, 1fr));
  }

  .products__card__image {
    height: 400px;
  }

  .products__card__title {
    font-size: 22px;
  }

  .products__card {
    max-width: 336px;
  }

  .products__card__description {
    font-size: 16px;
  }
}

/* ============================================================
   DESKTOP BREAKPOINT: 1200px and up
   Full height banner, 120px gutter, scales grid to 3 columns
   ============================================================ */
@media (min-width: 1200px) {
  .products__banner {
    padding: 64px 120px 240px;
  }

  .products__section {
    padding: 64px 120px;
  }

  .products__container {
    padding: 0;
  }

  .products__grid {
    grid-template-columns: repeat(auto-fit, minmax(384px, 1fr));
  }

  .products__card {
    max-width: 384px;
  }

  .products__card__image {
    height: 484px;
  }
}
