.contact-cards-wrapper {
  position: relative;

  @media (width >=768px) {
    padding-bottom: 48px;

    &::before {
      content: '';
      width: 100%;
      height: 100%;
      background: var(--corp-table-bg);
      z-index: -1;
      position: absolute;
      top: 0;
      left: 0;
    }
  }

  @media (width >=1200px) {
    padding-bottom: 80px;
  }
}

.contact-cards.block {
  margin-top: -40px;

  @media (width >=1200px) {
    margin-top: -115px;
  }

  .contact-cards__grid {
    width: calc(100% - (var(--container-margin) * 2));
    margin: 0 auto;

    .contact-cards__grid-inner {
      background: var(--corp-color-surface);
      border-radius: 8px 8px 0 0;
      display: grid;
      grid-template-columns: 1fr;
      gap: 12px 20px;

      @media (width >=768px) {
        padding: 28px 28px 0;
        grid-template-columns: repeat(2, 1fr);
      }

      @media (width >=1200px) {
        padding: 60px 60px 0;
        grid-template-columns: repeat(3, 1fr);
      }

      .contact-cards__card {
        border: 1px solid var(--secondary-gray-200);
        border-radius: 8px;
        padding: 18px 20px;

        @media (width >=768px) {
          position: relative;
          padding: 24px;
          min-height: 340px;
          display: flex;
          flex-direction: column;
        }

        @media (width >=1200px) {
          min-height: 395px;
        }

        .contact-cards__title-cell {
          margin-bottom: 14px;

          * {
            font-size: var(--corp-type-mobile-heading-2-medium-font-size);
            font-weight: var(--corp-type-mobile-heading-2-medium-font-weight);
            line-height: var(--corp-type-mobile-heading-2-medium-line-height);
            color: var(--corp-color-text);
          }

          @media (width >=768px) {
            margin-bottom: 16px;

            * {
              font-size: var(--corp-type-tablet-heading-2-font-size);
              font-weight: var(--corp-type-tablet-heading-2-font-weight);
              line-height: var(--corp-type-tablet-heading-2-line-height);
            }
          }

          @media (width >=1200px) {
            * {
              font-size: var(--corp-type-desktop-heading-4-font-size);
              font-weight: var(--corp-type-desktop-heading-4-font-weight);
              line-height: var(--corp-type-desktop-heading-4-line-height);
            }
          }
        }

        .contact-cards__body-cell {
          margin-bottom: 32px;

          * {
            font-size: var(--corp-type-mobile-body-2-font-size);
            font-weight: var(--corp-type-mobile-body-2-font-weight);
            line-height: var(--corp-type-mobile-body-2-line-height);
            color: var(--corp-color-text);
          }

          @media (width >=768px) {
            margin-bottom: 0;
            padding-bottom: 48px;

            * {
              font-size: var(--corp-type-tablet-body-2-font-size);
              font-weight: var(--corp-type-tablet-body-2-font-weight);
              line-height: var(--corp-type-mobile-body-sm-2-line-height);
            }
          }

          @media (width >=1200px) {
            * {
              font-size: var(--corp-type-desktop-body-3-font-size);
              font-weight: var(--corp-type-desktop-body-3-font-weight);
              line-height: var(--corp-type-desktop-body-3-line-height);
            }
          }
        }

        .contact-cards__contacts-cell {
          margin-top: auto;

          @media (width >=768px) {
            position: absolute;
            left: 24px;
            right: 24px;
            bottom: 24px;
            margin-top: 0;
          }

          ul {
            position: relative;
            display: flex;

            li:first-child {
              padding-left: 20px;
              padding-right: 16px;
              flex-shrink: 0;
            }

            &::before {
              content: '';
              position: absolute;
              top: 50%;
              left: 0;
              transform: translateY(-50%);
              width: 16px;
              height: 16px;
              background: url(/corporate/icons/corp-phone-logo.png) no-repeat center / contain;
            }
          }

          li:nth-child(2) {
            padding-left: 16px;
            text-align: left;
            border-left: 1px solid rgba(0, 0, 0, 0.2);
            word-break: break-all;
          }

          * {
            color: var(--corp-color-primary);
            font-size: var(--corp-type-mobile-body-2-font-size);
            font-weight: var(--corp-type-mobile-body-2-font-weight);
            line-height: var(--corp-type-mobile-body-1-line-height);

            &:hover {
              color: var(--corp-color-primary-hover);
            }

            @media (width >=768px) {
              font-size: var(--corp-type-tablet-body-2-font-size);
              font-weight: var(--corp-type-tablet-body-2-font-weight);
              line-height: var(--corp-type-mobile-body-1-line-height);
            }

            @media (width >=1200px) {
              font-size: var(--corp-type-desktop-body-3-font-size);
              font-weight: var(--corp-type-desktop-body-3-font-weight);
              line-height: var(--corp-type-desktop-body-3-line-height);
            }
          }
        }
      }
    }
  }
}

.contact-cards__footer {
  width: calc(100% - (var(--container-margin) * 2));
  margin: 0 auto;
  background: var(--corp-color-surface);
  padding-top: 12px;
  padding-bottom: 42px;

  * {
    font-size: var(--corp-type-mobile-body-2-font-size);
    font-weight: var(--corp-type-mobile-body-2-font-weight);
    line-height: var(--corp-type-mobile-body-2-line-height);
    color: var(--corp-color-text);
  }

  a {
    color: var(--corp-color-link);
    text-decoration: underline;
  }

  @media (width >=768px) {
    padding-left: 28px;
    padding-bottom: 28px;
  }

  @media (width >=1200px) {
    text-align: center;
    padding-top: 32px;
    padding-bottom: 60px;
  }
}

/* reach us variation */

.contact-cards-wrapper {
  &:has(.contact-cards.reach-us) {
    padding: 60px 20px 49px;

    &::before {
      display: none;
    }

    @media (width >= 768px) {
      padding: 40px 20px 66px 34px;
    }

    @media (width >= 1200px) {
      padding: 72px 56px;
    }
  }
}

.contact-cards.block {
  &.reach-us {
    margin-top: 0;

    .contact-cards__header {
      padding-bottom: 50px;
      align-items: center;
    }

    .contact-cards__eyebrow {
      margin-bottom: 11px;

      * {
        font-weight: var(--fw-500);
        font-size: var(--corp-type-mobile-body-2-font-size);
        line-height: var(--corp-type-mobile-body-1-line-height);
        letter-spacing: 0;
        opacity: 40%;
      }
    }

    .contact-cards__heading {
      * {
        font-weight: var(--fw-400);
        font-size: var(--corp-type-mobile-display-1-font-size);
        line-height: var(--corp-type-mobile-display-5-line-height);
        letter-spacing: -0.02em;
      }
    }

    .contact-cards__grid {
      width: 100%;
      margin: 0;

      .contact-cards__grid-inner {
        background: transparent;
        border-radius: 0;
        padding: 0;

        .contact-cards__card {
          display: flex;
          flex-direction: column;
          align-items: flex-start;
          gap: 0;
          border-radius: var(--corp-radius-sm);
          border: 1px solid var(--corp-border-blue);
        }

        .contact-cards__icon {
          position: static;
          margin-bottom: 16px;

          picture,
          img,
          svg,
          a {
            width: 24px;
            height: 24px;
            display: block;
          }

          img,
          svg {
            object-fit: contain;
          }
        }

        .contact-cards__title-cell {
          margin-bottom: 16px;

          * {
            color: var(--corp-color-primary);
            font-weight: var(--fw-400);
            font-size: var(--corp-type-mobile-heading-xl-font-size);
            line-height: var(--corp-type-mobile-heading-xl-line-height);
            letter-spacing: -0.01em;
          }
        }

        .contact-cards__body-cell {
          width: 100%;
          margin-bottom: 32px;
          padding-bottom: 0;

          * {
            font-weight: var(--fw-400);
            font-size: var(--corp-type-mobile-body-2-font-size);
            line-height: var(--corp-type-mobile-body-2-line-height);
            letter-spacing: -0.01em;
          }
        }

        .contact-cards__contacts-cell {
          margin-top: auto;

          .button-container {
            margin: 0;
          }

          .corp-cta {
            color: var(--corp-color-white);
            padding: 12px 40px;
            border-radius: var(--corp-radius-xxl);
            border-width: 1px;
            font-weight: var(--fw-400);
            font-size: var(--corp-type-mobile-body-2-font-size);
            line-height: var(--corp-type-mobile-display-4-line-height);
            letter-spacing: -0.03em;
            gap: 8px;
          }
        }
      }
    }

    .contact-cards__footer {
      display: none;
    }

    /* ── tablet ── */
    @media (width >= 768px) {
      .contact-cards__header {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding-bottom: 40px;
        gap: 5px;
      }

      .contact-cards__eyebrow,
      .contact-cards__heading {
        width: 100%;
        text-align: center;
      }

      .contact-cards__eyebrow {
        * {
          font-weight: var(--fw-500);
          font-size: var(--corp-type-tablet-body-2-font-size);
          line-height: var(--corp-type-tablet-body-2-line-height);
          letter-spacing: -0.01em;

        }
      }

      .contact-cards__heading {
        * {
          letter-spacing: -0.015em;
        }
      }

      .contact-cards__grid {
        .contact-cards__grid-inner {
          display: flex;
          flex-wrap: wrap;
          overflow: visible;
          /* row-gap: 16px;
          column-gap: 17px; */
          margin-left: 0;
          margin-right: 0;

          .contact-cards__card {
            min-height: 236px;
            box-sizing: border-box;
            margin: 0;
            padding: 18px 20px;
          }

          .contact-cards__icon {
            position: static;

            picture,
            img,
            svg,
            a {
              width: 32px;
              height: 32px;
              display: block;
            }

            img,
            svg {
              object-fit: contain;
            }
          }

          .contact-cards__body-cell {
            * {
              font-size: var(--corp-type-tablet-body-lg-font-size);
              line-height: var(--corp-type-tablet-body-lg-line-height);
              font-weight: var(--corp-type-tablet-body-lg-font-weight);
            }
          }

          .contact-cards__title-cell {
            * {
              font-weight: var(--fw-500);
              font-size: var(--corp-type-tablet-heading-2-font-size);
              line-height: var(--corp-type-tablet-heading-2-line-height);
              letter-spacing: 0;
            }
          }

          .contact-cards__contacts-cell {
            margin:0;
            position: static;
            .corp-cta {
              font-size: var(--corp-type-tablet-body-2-font-size);
              line-height: 140%;
              letter-spacing: -0.03em;
              padding: 12px 20px;
            }
          }
        }
      }
    }

    /* ── desktop ── */
    @media (width >= 1200px) {
      .contact-cards__header {
        padding-bottom: 0;
        margin-bottom: 56px;
        gap:24px;
      }
      .contact-cards__grid {
        .contact-cards__grid-inner {
          gap: 24px;
        }
      }

      .contact-cards__heading {
        * {
          font-weight: var(--fw-400);
          font-size: var(--corp-type-desktop-heading-xxl-font-size);
          line-height: var(--corp-type-desktop-heading-4-line-height);
          letter-spacing: -0.03em;
        }
      }

      .contact-cards__eyebrow {
        margin-bottom: 0;
        * {
          font-weight: var(--fw-500);
          font-size: var(--corp-type-desktop-heading-4-font-size);
          line-height: var(--corp-type-tablet-body-2-line-height);
          letter-spacing: -0.02em;
        }
      }

      .contact-cards__grid {
        width: 100%;
        margin: 0;

        .contact-cards__grid-inner {
          /* row-gap: 20px;
          column-gap: 20px; */

          .contact-cards__card {
            min-height: 238px;
            padding: 32px;
          }

          .contact-cards__icon {
            position: static;
            margin-bottom: 32px;

            picture,
            img,
            svg,
            a {
              width: 44px;
              height: 44px;
              display: block;
            }

            img,
            svg {
              object-fit: contain;
            }
          }

          .contact-cards__title-cell {
            * {
              font-weight: var(--fw-400);
              font-size: var(--corp-type-desktop-heading-2-font-size);
              line-height: var(--corp-type-desktop-heading-2-line-height);
              letter-spacing: 0;
              margin-bottom: 8px;
            }
          }

          .contact-cards__body-cell {
            margin-bottom: 24px;
            * {
              font-weight: var(--fw-400);
              font-size: var(--corp-type-desktop-body-font-size);
              line-height: var(--corp-type-desktop-body-line-height);
              letter-spacing: -0.01em;
            }
          }

          .contact-cards__contacts-cell {
            .corp-cta {
              color: var(--corp-color-white);
              padding: 12px 40px;
              font-weight: var(--fw-400);
              font-size: var(--corp-type-desktop-body-3-font-size);
              line-height: var(--corp-type-desktop-body-line-height);
              letter-spacing: -0.03em;
            }
          }
        }
      }
    }
  }
}
