.benefit-grid {}

.benefit-grid__accent {
  background-color: var(--black);
  width: 100%;
  height: 400px;
  position: relative;
  z-index: 1;
}

.benefit-grid__wrapper {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  position: relative;
  z-index: 2;
  margin-top: -380px;
}

.benefit-grid__header {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.benefit-grid__header aside p {
  color: var(--white);
  font-size: 15px;
  margin-bottom: 1rem;
}

/* For tablet landscape up */
@media (min-width: 900px) {
  .benefit-grid__header aside p {
    text-align: center;
  }
}

.benefit-grid__header h2 {
  color: var(--white);
  font-size: 30px;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin-bottom: 1rem;
}

/* For tablet landscape up */
@media (min-width: 900px) {
  .benefit-grid__header h2 {
    font-size: 36px;
    text-align: center;
  }
}

.benefit-grid__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.benefit-grid__list article {
  width: 100%;
  background-color: var(--white);
  border: 1px solid var(--gray);
  border-radius: 10px;
  margin-bottom: 2rem;
}

/* For tablet landscape up */
@media (min-width: 900px) {
  .benefit-grid__list article {
    width: 32%;
  }
}

.benefit-grid__list article figure {}

.benefit-grid__list article figure img {
  width: 100%;
  height: auto;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.benefit-grid__list article header {
  padding: 1rem;
  border-bottom: 1px dotted var(--gray);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

/* For tablet landscape up */
@media (min-width: 900px) {
  .benefit-grid__list article header {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.benefit-grid__list article header aside {
  width: 50px;
}

.benefit-grid__list article header h3 {
  font-size: 26px;
  flex: 1;
  letter-spacing: -0.5px;
}

/* Whole Card Link */
.benefit-grid__list article.is-clickable {
  position: relative;
}

.benefit-grid__card-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
}

/* For tablet landscape up */
@media (min-width: 900px) {
  .benefit-grid__list article header h3 {
    font-size: 26px;
  }
}

.benefit-grid__list article footer {
  padding: 1rem;
}

/* For tablet landscape up */
@media (min-width: 900px) {
  .benefit-grid__list article footer {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.benefit-grid__modal-background {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  /* dark overlay */
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
  visibility: hidden;
  overflow-y: auto;
  /* Allows scrolling if the modal content is taller than the viewport */
}

.benefit-grid__modal-background.is-active {
  display: block;
  opacity: 1;
  visibility: visible;
}

/* BENEFIT GRID MODAL */
.benefit-grid-modal {
  display: none;
  position: relative;
  /* Change from fixed to relative for scrolling */
  margin: 20px auto;
  /* Adds some margin at the top and bottom */
  background: white;
  z-index: 20;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
  visibility: hidden;
  max-height: calc(100% - 40px);
  /* Ensures the modal doesn't exceed the viewport height */
  overflow-y: auto;
  /* Allows the content inside the modal to scroll if necessary */
  border-radius: 10px;
  border: 1px solid var(--gray);
}

.benefit-grid-modal.is-active {
  display: block;
  opacity: 1;
  visibility: visible;
}

.benefit-grid-modal__image {
  width: 100%;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.benefit-grid-modal__header {
  padding-top: 1rem;
  padding-bottom: 1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  border-bottom: 1px dotted var(--gray);
  margin-bottom: 1rem;
  background-color: #F1FFED;
}

/* For tablet landscape up */
@media (min-width: 900px) {
  .benefit-grid-modal__header {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.benefit-grid-modal__header h3 {
  font-size: 24px;
  font-weight: bold;
  letter-spacing: -0.5px;
  text-align: center;
}

/* For tablet landscape up */
@media (min-width: 900px) {
  .benefit-grid-modal__header h3 {
    font-size: 32px;
    margin-left: auto;
    margin-right: auto;
  }
}

.benefit-grid-modal__checklist {
  padding-top: 1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* For tablet landscape up */
@media (min-width: 900px) {
  .benefit-grid-modal__checklist {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.benefit-grid-modal__checklist article {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px dotted var(--gray);
}

.benefit-grid-modal__checklist article figure {
  width: 32px;
}

.benefit-grid-modal__checklist article p {
  flex: 1;
  margin-left: 1rem;
}

.benefit-grid-modal__description {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* For tablet landscape up */
@media (min-width: 900px) {
  .benefit-grid-modal__description {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.benefit-grid-modal__footer {
  padding-bottom: 2rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* For tablet landscape up */
@media (min-width: 900px) {
  .benefit-grid-modal__footer {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
