/* ==========================================================================
   Langsen Theme - Certificate & Honors Page Styles
   Aligned with Factory Gallery layout specifications
   Unified container width managed exclusively by common.css
   ========================================================================== */

.langsen-certificate-page-main {
  color: #132d54;
  background-color: #ffffff;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   1. Hero Banner
   -------------------------------------------------------------------------- */
.ls-cert-hero {
  position: relative;
  width: 100%;
  background-position: center 36%;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.ls-cert-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 26, 61, 0.88) 0%, rgba(6, 26, 61, 0.55) 45%, rgba(6, 26, 61, 0.15) 100%);
  pointer-events: none;
}

.ls-cert-hero__inner {
  position: relative;
  z-index: 2;
  padding: 50px 0;
}

.ls-cert-hero__title {
  color: #ffffff;
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin: 0;
  text-transform: uppercase;
}

.ls-cert-hero__bar {
  width: 36px;
  height: 3px;
  background-color: #ee141d;
  margin: 14px 0 12px;
  border-radius: 1px;
}

.ls-cert-hero__breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 600;
}

.ls-cert-hero__breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s ease;
}

.ls-cert-hero__breadcrumb a:hover {
  color: #ffffff;
}

.ls-cert-bc-sep {
  opacity: 0.6;
  font-size: 11px;
}

/* --------------------------------------------------------------------------
   2. Main Content Heading
   -------------------------------------------------------------------------- */
.ls-cert-content {
  padding: 54px 0 68px;
}

.ls-cert-heading {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 40px;
}

.ls-cert-heading-bar {
  display: block;
  width: 32px;
  height: 3px;
  background-color: #ee141d;
  margin: 0 auto 12px;
  border-radius: 1px;
}

.ls-cert-heading-title {
  color: #062a63;
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.ls-cert-heading-title em {
  color: #ee141d;
  font-style: normal;
}

.ls-cert-heading-desc {
  color: #64748b;
  font-size: 15.5px;
  line-height: 1.7;
  margin: 0;
}

/* --------------------------------------------------------------------------
   3. 4-Column Certificate Grid
   -------------------------------------------------------------------------- */
.ls-cert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: start;
}

.ls-cert-card {
  margin: 0;
  height: auto;
  align-self: start;
}

.ls-cert-card__btn {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  height: auto;
  padding: 0;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background-color: #ffffff;
  color: inherit;
  text-align: center;
  cursor: zoom-in;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: 0 4px 18px rgba(6, 42, 99, 0.05);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ls-cert-card__btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 32px rgba(6, 42, 99, 0.12);
  border-color: #cbd5e1;
}

.ls-cert-card__btn:focus-visible {
  outline: 3px solid #ee141d;
  outline-offset: 2px;
}

/* 图片框完全占满卡片整宽，不固定高度 */
.ls-cert-card__img-box {
  position: relative;
  width: 100%;
  height: auto;
  padding: 0;
  margin: 0;
  display: block;
  overflow: hidden;
  background: #f8fafc;
  box-sizing: border-box;
}

.ls-cert-card__img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background-color: #ffffff;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ls-cert-card__btn:hover .ls-cert-card__img {
  transform: scale(1.04);
}

/* 放大镜徽标 */
.ls-cert-card__zoom-badge {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background-color: rgba(6, 42, 99, 0.35);
  color: #062a63;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.ls-cert-card__zoom-badge svg {
  width: 46px;
  height: 46px;
  padding: 11px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transform: scale(0.65);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ls-cert-card__btn:hover .ls-cert-card__zoom-badge {
  opacity: 1;
  visibility: visible;
}

.ls-cert-card__btn:hover .ls-cert-card__zoom-badge svg {
  transform: scale(1);
}

.ls-cert-card__info {
  padding: 16px 14px;
  background-color: #ffffff;
  width: 100%;
  height: auto;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid #f1f5f9;
}

.ls-cert-card__title {
  color: #062a63;
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
  text-align: center;
  transition: color 0.2s ease;
}

.ls-cert-card__btn:hover .ls-cert-card__title {
  color: #ee141d;
}

.ls-cert-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px;
  color: #64748b;
  font-size: 16px;
}

/* --------------------------------------------------------------------------
   5. Call To Action (Bottom Banner)
   -------------------------------------------------------------------------- */
.ls-cert-cta {
  position: relative;
  width: 100%;
  min-height: 220px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  text-align: center;
  padding: 56px 0;
  box-sizing: border-box;
}

.ls-cert-cta__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 26, 61, 0.78) 0%, rgba(6, 26, 61, 0.52) 50%, rgba(6, 26, 61, 0.78) 100%);
  pointer-events: none;
}

.ls-cert-cta__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ls-cert-cta__title {
  color: #ffffff;
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(26px, 2.5vw, 34px);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 10px;
}

.ls-cert-cta__desc {
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  margin: 0 0 22px;
  max-width: 600px;
}

.ls-cert-btn-red {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: #ee141d;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-decoration: none;
  padding: 13px 34px;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(238, 20, 29, 0.35);
  transition: all 0.25s ease;
}

.ls-cert-btn-red:hover {
  background-color: #d60f17;
  color: #ffffff;
  box-shadow: 0 6px 22px rgba(238, 20, 29, 0.45);
  transform: translateY(-2px);
}

.ls-cert-btn-red svg {
  transition: transform 0.25s ease;
}

.ls-cert-btn-red:hover svg {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   6. Modern Fullscreen Lightbox Modal
   -------------------------------------------------------------------------- */
.ls-cert-lightbox {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background-color: transparent;
  color: #ffffff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.ls-cert-lightbox:not([open]) {
  display: none;
}

.ls-cert-lightbox::backdrop {
  background-color: rgba(3, 12, 28, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: lsLbFadeIn 0.25s ease-out;
}

.ls-cert-lightbox-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: min(1200px, calc(100vw - 120px));
  max-height: calc(100vh - 80px);
  padding: 0;
  box-sizing: border-box;
}

.ls-cert-lightbox-figure {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  max-width: 100%;
  max-height: 100%;
}

.ls-cert-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
}

.ls-cert-lightbox-img.is-loaded {
  transform: scale(1);
  opacity: 1;
}

.ls-cert-lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  padding: 8px 22px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  max-width: 90vw;
}

.ls-cert-lightbox-caption {
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ls-cert-lightbox-counter {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-weight: 600;
  font-family: monospace;
}

.ls-cert-lightbox-close {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: all 0.25s ease;
}

.ls-cert-lightbox-close:hover {
  background-color: #ee141d;
  border-color: #ee141d;
  transform: rotate(90deg) scale(1.08);
  box-shadow: 0 4px 16px rgba(238, 20, 29, 0.4);
}

.ls-cert-lightbox-prev,
.ls-cert-lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ls-cert-lightbox-prev {
  left: 28px;
}

.ls-cert-lightbox-next {
  right: 28px;
}

.ls-cert-lightbox-prev:hover {
  background-color: #ee141d;
  border-color: #ee141d;
  transform: translateY(-50%) translateX(-3px) scale(1.06);
  box-shadow: 0 6px 20px rgba(238, 20, 29, 0.35);
}

.ls-cert-lightbox-next:hover {
  background-color: #ee141d;
  border-color: #ee141d;
  transform: translateY(-50%) translateX(3px) scale(1.06);
  box-shadow: 0 6px 20px rgba(238, 20, 29, 0.35);
}

.ls-cert-lightbox [hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   7. Responsive Design (No private container width overrides)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .ls-cert-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

@media (max-width: 768px) {
  .ls-cert-hero__title {
    font-size: 32px;
  }

  .ls-cert-heading-title {
    font-size: 26px;
  }

  .ls-cert-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .ls-cert-card__info {
    padding: 12px 10px;
  }

  .ls-cert-card__title {
    font-size: 13.5px;
  }

  .ls-cert-lightbox-prev {
    left: 12px;
    width: 42px;
    height: 42px;
  }

  .ls-cert-lightbox-next {
    right: 12px;
    width: 42px;
    height: 42px;
  }

  .ls-cert-lightbox-close {
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
  }

  .ls-cert-lightbox-wrap {
    max-width: calc(100vw - 28px);
  }
}

@media (max-width: 480px) {
  .ls-cert-hero__title {
    font-size: 28px;
  }

  .ls-cert-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ls-cert-cta__title {
    font-size: 22px;
  }
}
