/* =========================================================
 * MUSK - CAM KẾT CỦA CHÚNG TÔI
 *
 * Element nằm trong Section / Row / Column có sẵn.
 * Không đặt container hoặc max-width tổng.
 * ========================================================= */

.musk-commitments {
  position: relative;
  z-index: 0;
  isolation: isolate;
  width: 100%;
  padding: 100px 0px 50px 0px;
  color: #080a0f;
}

/* =========================================================
 * TIÊU ĐỀ
 * ========================================================= */

.musk-commitments__title {
  position: relative;
  z-index: 2;
  margin-bottom: 16px;
}

.musk-commitments__description {
  position: relative;
  z-index: 2;
  margin-bottom: 42px;
  color: white;
  line-height: 1.7;
}

.musk-commitments__description--center {
  max-width: 620px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.musk-commitments__description p {
  margin: 0;
}

.musk-commitments__description p + p {
  margin-top: 10px;
}

/* =========================================================
 * LƯỚI THẺ
 * ========================================================= */

.musk-commitments__grid {
  position: relative;
  z-index: 2;
  display: grid;
  align-items: stretch;
  gap: 26px;
}

.musk-commitments__grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.musk-commitments__grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Chưa thêm thẻ con nào. */

.musk-commitments__empty {
  position: relative;
  z-index: 2;
  padding: 34px 20px;
  border: 1px dashed #c3ccda;
  border-radius: 10px;
  color: #66707f;
  font-size: 15px;
  text-align: center;
}

/* =========================================================
 * THẺ
 *
 * Góc dưới bên phải vát chéo bằng clip-path.
 * clip-path thay thế hoàn toàn hình dạng nên không dùng kèm
 * border-radius được — các góc còn lại là góc vuông.
 * ========================================================= */

.musk-commitments__card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-radius: 10px;
  padding: 34px 32px 36px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(8, 20, 46, 0.07);
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - 50px),
    calc(100% - 50px) 100%,
    0 100%
    );
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease;
}

/* Icon */

.musk-commitments__icon {
  display: flex;
  height: 62px;
  align-items: center;
  margin-bottom: 24px;
}

/* Chưa chọn icon: dùng icon khiên mặc định. */

.musk-commitments__icon--default {
  color: #1558f4;
}

.musk-commitments__icon--default svg {
  display: block;
  width: 54px;
  height: 54px;
}

.musk-commitments__icon img {
  display: block;
  width: auto !important;
  max-width: 62px !important;
  height: 100%;
  max-height: 62px;
  margin: 0 !important;
  object-fit: contain;
  object-position: left center;
}

/* Nội dung */

.musk-commitments__card-title {
  margin: 0 0 12px;
  color: #0b1b3b;
  font-weight: 700;
  line-height: 1.3;
}

.musk-commitments__card-text {
  color: #4b5768;
  line-height: 1.7;
}

.musk-commitments__card-text p {
  margin: 0;
}

.musk-commitments__card-text p + p {
  margin-top: 10px;
}

@media (hover: hover) {
  .musk-commitments__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 48px rgba(8, 20, 46, 0.13);
  }
}

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

@media (max-width: 767px) {
  .musk-commitments__grid--3,
  .musk-commitments__grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .musk-commitments__description {
    margin-bottom: 30px;
  }

  .musk-commitments {
    padding: 46px 0;
  }

  .musk-commitments__grid--2,
  .musk-commitments__grid--3,
  .musk-commitments__grid--4 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .musk-commitments__icon {
    height: 52px;
    margin-bottom: 18px;
  }

  .musk-commitments__icon img {
    max-width: 52px !important;
    max-height: 52px;
  }

  .musk-commitments__card {
    padding: 24px 20px 26px;
    clip-path: polygon(
      0 0,
      100% 0,
      100% calc(100% - 26px),
      calc(100% - 26px) 100%,
      0 100%
      );
  }
}

@media (prefers-reduced-motion: reduce) {
  .musk-commitments__card {
    transition: none !important;
  }

  .musk-commitments__card:hover {
    transform: none !important;
  }
}
