/* Progressive enhancement of the server-rendered certificate cards. */
.certificate-types[data-enhanced="true"] {
  display: grid;
  grid-template-columns: minmax(170px, 230px) minmax(0, 1fr);
  gap: 24px;
  padding: 48px;
  margin-bottom: 40px;
  border-radius: 48px;
  background: #222;
  align-items: stretch;
}

.certificate-types[data-enhanced="true"] .certificate-tab-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.certificate-types[data-enhanced="true"] .certificate-tab {
  padding: 2px 0;
  border: 0;
  color: #a3a3a3;
  background: transparent;
  font: inherit;
  font-size: 20px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.certificate-types[data-enhanced="true"] .certificate-tab:hover,
.certificate-types[data-enhanced="true"] .certificate-tab[aria-selected="true"] {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.certificate-types[data-enhanced="true"] .certificate-tab:focus-visible,
.certificate-types[data-enhanced="true"] button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 5px;
}

.certificate-types[data-enhanced="true"] .certificate-tab-content {
  min-width: 0;
  border-left: 1px solid #373737;
  padding: 0 0 0 24px;
}

.certificate-types[data-enhanced="true"] .certificate-type {
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.certificate-types[data-enhanced="true"] .certificate-type[hidden] { display: none !important; }
.certificate-types[data-enhanced="true"] .certificate-type > img,
.certificate-types[data-enhanced="true"] .certificate-type > h3,
.certificate-types[data-enhanced="true"] .certificate-thumbs { display: none; }

.certificate-types[data-enhanced="true"] .certificate-type > p {
  max-width: 550px;
  margin: 48px auto 0;
  color: #e6e6e6;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
}

.certificate-gallery {
  position: relative;
  width: 100%;
  height: clamp(240px, 28vw, 400px);
  margin-bottom: 38px;
}

.certificate-gallery-image {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  object-fit: cover;
}

.certificate-gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 1px solid #eee;
  border-radius: 50%;
  background: #1117;
  color: #fff;
  font-size: 42px;
  font-weight: 200;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.certificate-gallery-arrow:hover { background: #c92929; }
.certificate-gallery-prev { left: 24px; }
.certificate-gallery-next { right: 24px; }
.certificate-gallery-arrow[hidden],
.certificate-gallery-dots[hidden] { display: none; }

.certificate-gallery-dots {
  position: absolute;
  right: 0;
  bottom: -30px;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.certificate-gallery-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #707a8f;
  cursor: pointer;
}

.certificate-gallery-dot[aria-current="true"] { background: #c92929; }

@media (max-width: 1024px) {
  .certificate-types[data-enhanced="true"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 32px;
  }
  .certificate-types[data-enhanced="true"] .certificate-tab-list {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    border-bottom: 1px solid #373737;
    padding-bottom: 20px;
  }
  .certificate-types[data-enhanced="true"] .certificate-tab-content {
    border-left: 0;
    padding: 0;
  }
}

@media (max-width: 600px) {
  .certificate-types[data-enhanced="true"] {
    padding: 24px 16px;
    border-radius: 30px;
  }
  .certificate-types[data-enhanced="true"] .certificate-tab { font-size: 16px; }
  .certificate-gallery { height: 247px; }
  .certificate-gallery-image { border-radius: 24px; }
  .certificate-gallery-arrow {
    width: 42px;
    height: 42px;
    font-size: 32px;
  }
  .certificate-gallery-prev { left: 10px; }
  .certificate-gallery-next { right: 10px; }
  .certificate-types[data-enhanced="true"] .certificate-type > p {
    margin-top: 42px;
    font-size: 14px;
  }
}
