/* =========================================================
   BENEFITS SECTION
========================================================= */

.benefits-section {
  margin: 72px 0;
}

.benefits-section__header {
  max-width: 760px;
  margin-bottom: 28px;
}

.benefits-section__title {
  margin: 0;

  color: var(--text);

  font-size: clamp(30px, 3.5vw, 42px);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -0.04em;

  text-wrap: balance;
}

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

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 14px;

  width: 100%;
}

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

.benefit-card {
  position: relative;

  display: flex;
  flex-direction: column;

  width: 100%;
  min-width: 0;
  min-height: 220px;
  padding: 24px;

  overflow: hidden;

  background: rgba(255, 255, 255, 0.025);

  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 18px;

  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);

  transition:
    background 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

.benefit-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.13);

  box-shadow:
    0 20px 46px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);

  transform: translateY(-4px);
}

/* =========================================================
   ICON
========================================================= */

.benefit-card__icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;

  width: 46px;
  height: 46px;
  margin-bottom: 22px;

  color: var(--accent);
  background: rgba(255, 49, 87, 0.07);

  border: 1px solid rgba(255, 49, 87, 0.16);
  border-radius: 13px;

  font-size: 20px;
  line-height: 1;

  transition:
    color 220ms ease,
    background 220ms ease,
    border-color 220ms ease,
    transform 220ms ease;
}

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

.benefit-card__content {
  display: flex;
  flex: 1;
  flex-direction: column;

  width: 100%;
  min-width: 0;
}

.site-main .benefit-card__title,
.benefit-card__title {
  width: 100%;
  margin: 0 0 12px;

  color: var(--text);

  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;

  overflow-wrap: break-word;
  word-break: normal;
}

.benefit-card__text {
  width: 100%;
  margin: 0;

  color: var(--muted);

  font-size: 14px;
  line-height: 1.72;

  overflow-wrap: break-word;
  word-break: normal;
}

.benefit-card__text p {
  width: 100%;
  margin: 0;
}

.benefit-card__text p + p {
  margin-top: 9px;
}

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

@media (max-width: 1024px) {
  .benefits-section {
    margin: 58px 0;
  }

  .benefits-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 12px;
  }

  .benefit-card {
    min-height: 200px;
    padding: 22px;
  }
}

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

@media (max-width: 760px) {
  .benefits-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  }

  .benefit-card {
    min-height: 190px;
  }
}

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

@media (max-width: 640px) {
  .benefits-section {
    margin: 46px 0;
  }

  .benefits-section__header {
    margin-bottom: 22px;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .benefit-card {
    align-items: flex-start;
    gap: 14px;

    width: 100%;
    min-width: 0;
    min-height: auto;
    padding: 18px;

    border-radius: 15px;
  }

  .benefit-card__icon {
    flex: 0 0 44px;

    width: 44px;
    height: 44px;
    margin: 0;

    border-radius: 12px;

    font-size: 18px;
  }

  .benefit-card__content {
    display: block;
    flex: 1 1 auto;

    width: auto;
    min-width: 0;
    max-width: none;
  }

  .site-main .benefit-card__title,
  .benefit-card__title {
    display: block;

    width: 100%;
    margin: 1px 0 7px;

    font-size: 17px;
    line-height: 1.25;

    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }

  .benefit-card__text,
  .benefit-card__text p {
    display: block;

    width: 100%;
    max-width: none;
    margin: 0;

    font-size: 13px;
    line-height: 1.62;

    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }
}

/* =========================================================
   TOUCH DEVICES
========================================================= */

@media (hover: none) {
  .benefit-card:hover,
  .benefit-card:hover .benefit-card__icon {
    transform: none;
  }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .benefit-card,
  .benefit-card__icon {
    transition: none;
  }
}
