/* Charming About — multi certificate slider + lightbox */

#profile,
#chairman-message,
#history,
#honors {
  scroll-margin-top: 110px;
}

.ce-about-honors {
  background: #f3f4f5 !important;
  color: #17191c !important;
}

.ce-about-honors .ce-section-title {
  color: #17191c !important;
}

.ce-about-honors .ce-section-desc {
  color: #62666b !important;
}

.ce-about-honors .ce-eyebrow {
  color: #ff6a00 !important;
}

.ce-cert-nav {
  display: flex;
  gap: 10px;
}

.ce-cert-nav__btn {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(23, 25, 28, 0.18);
  border-radius: 50%;
  background: #fff;
  color: #17191c;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ce-cert-nav__btn:hover {
  background: #ff6a00;
  border-color: #ff6a00;
}

.ce-cert-slider {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin: 16px -4px 0;
  padding: 8px 4px 16px;
  scrollbar-width: none;
}

.ce-cert-slider::-webkit-scrollbar {
  display: none;
}

.ce-cert-slider__track {
  display: flex;
  gap: 24px;
  width: max-content;
}

.ce-cert-card {
  flex: 0 0 min(260px, 72vw);
  width: min(260px, 72vw);
  scroll-snap-align: start;
  margin: 0;
  cursor: default;
}

.ce-cert-card__hit {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(23, 25, 28, 0.1);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  cursor: default;
  aspect-ratio: 3 / 4;
  pointer-events: none;
  user-select: none;
}

.ce-cert-card__hit img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  cursor: default;
}

.ce-cert-card h3 {
  margin: 12px 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #25282b;
}

.ce-cert-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #62666b;
}

/* Lightbox */
.ce-lightbox {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2000 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ce-lightbox.is-open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.ce-lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: pointer;
}

.ce-lightbox__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(980px, 100%);
  max-height: 90vh;
}

.ce-lightbox__figure {
  margin: 0;
  max-width: min(720px, calc(100% - 120px));
  text-align: center;
}

.ce-lightbox__figure img {
  display: block;
  max-width: 100%;
  max-height: 75vh;
  margin: 0 auto;
  border-radius: 8px;
  background: #111;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

.ce-lightbox__figure figcaption {
  margin-top: 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.ce-lightbox__close,
.ce-lightbox__nav {
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.ce-lightbox__close:hover,
.ce-lightbox__nav:hover {
  background: #ff6a00;
}

.ce-lightbox__close {
  position: absolute;
  top: -6px;
  right: 0;
  width: 44px;
  height: 44px;
  z-index: 2;
}

.ce-lightbox__nav {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
}

body.ce-modal-open {
  overflow: hidden !important;
}

@media (max-width: 700px) {
  .ce-lightbox__dialog {
    flex-wrap: wrap;
    gap: 16px;
  }

  .ce-lightbox__nav--prev { order: 2; }
  .ce-lightbox__nav--next { order: 3; }
  .ce-lightbox__figure { order: 1; width: 100%; max-width: 100%; }
  .ce-lightbox__close { top: 8px; right: 8px; }
}
