/* Benefits Section Specific Styles */

.benefits {
  position: relative;
}

.benefit-card {
  padding: 20px;
}

.benefit-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

/* Default size when not specified in config */
.benefit-icon:not([style*="width"]) {
  width: 150px;
  height: 150px;
}

.benefit-icon img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 35px; /* default, override with imageBorderRadius: 0 in config */
}

.benefit-icon .img-placeholder {
  border-radius: 35px; /* default, override with imageBorderRadius: 0 in config */
}

/* For large images - remove flex centering constraints */
.benefit-icon[style*="width: 350px"],
.benefit-icon[style*="width: 300px"],
.benefit-icon[style*="width: 280px"] {
  display: block;
}

.benefit-icon[style*="width: 350px"] img,
.benefit-icon[style*="width: 300px"] img,
.benefit-icon[style*="width: 280px"] img {
  width: 100%;
  height: 100%;
}

.benefit-text {
  flex: 1;
}

.benefit-divider {
  height: 1px;
  border-bottom: 1px solid var(--brand-text);
}

/* 2x2 Grid Layout with Card Style */
.benefits-2x2 .benefit-card-boxed {
  background-color: #FFFFFF;
  border-radius: 20px;
  padding: 25px 30px;
  height: 100%;
}

.benefits-2x2 .benefit-card-boxed .benefit-icon {
  width: 35px;
  height: 35px;
  margin-bottom: 10px;
}

.benefits-2x2 .benefit-card-boxed .benefit-icon .img-placeholder {
  width: 35px !important;
  height: 35px !important;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .benefit-card {
    margin-bottom: 40px;
  }
}

@media (max-width: 768px) {
  /* Vertical layout: full-width image, text below */
  .benefit-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
  }

  .benefit-icon {
    width: 100% !important;
    height: auto !important;
    min-width: 100%;
    margin-bottom: 0;
  }

  .benefit-icon img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 350 / 300;
    object-fit: cover;
    border-radius: 15px !important;
  }

  .benefit-icon .img-placeholder {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 350 / 300;
    border-radius: 15px !important;
  }

  .benefit-text {
    text-align: center;
  }

  /* Benefits 2x2: маленькие иконки слева, текст справа */
  .benefits-2x2 .benefit-card {
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
  }

  .benefits-2x2 .benefit-icon {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px;
    flex-shrink: 0;
  }

  .benefits-2x2 .benefit-icon img {
    width: 60px !important;
    height: 60px !important;
    aspect-ratio: 1 / 1;
  }

  .benefits-2x2 .benefit-icon .img-placeholder {
    width: 60px !important;
    height: 60px !important;
    aspect-ratio: 1 / 1;
  }

  .benefits-2x2 .benefit-text {
    text-align: left;
  }
}

@media (max-width: 576px) {
  .benefit-icon {
    width: 100% !important;
    height: auto !important;
    min-width: 100%;
  }

  .benefit-icon img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 350 / 300;
    border-radius: 10px !important;
  }

  .benefit-icon .img-placeholder {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 350 / 300;
    border-radius: 10px !important;
  }

  /* Benefits 2x2: маленькие иконки */
  .benefits-2x2 .benefit-icon {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px;
  }

  .benefits-2x2 .benefit-icon img {
    width: 50px !important;
    height: 50px !important;
    aspect-ratio: 1 / 1;
  }

  .benefits-2x2 .benefit-icon .img-placeholder {
    width: 50px !important;
    height: 50px !important;
    aspect-ratio: 1 / 1;
  }
}
