/* ==========================================================================
   About > 인증 및 수상 (Figma 1:5378) — page body only
   Hero/stage: sp-common.css + sp-hero.js. Modal base: subpage.css (.cert-modal-*)
   ========================================================================== */

/* ---------- Gallery section (1:5441) ---------- */
.cert-section {
  padding: clamp(64px, 6.25vw, 120px) 0;
}
.cert-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(1600px, 100% - 2 * clamp(16px, 8.333vw, 160px));
  margin-inline: auto;
}
.cert-title {
  font-weight: 600;
  font-size: clamp(30px, 2.5vw, 48px);
  line-height: 1.3;
  letter-spacing: -0.04em;
  color: #111;
}
.cert-desc {
  font-size: clamp(15px, 0.9375vw, 18px);
  line-height: 1.6;
  letter-spacing: -0.03em;
  color: #333;
  word-break: keep-all;
}

/* style.css의 `section:not(.hero)... > *` (max-width 1440 + 40px gutter)를 이 섹션에서 무력화 */
main section.cert-section.cert-section > .cert-head,
main section.cert-section.cert-section > .cert-body {
  width: min(1600px, 100% - 2 * clamp(16px, 8.333vw, 160px));
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
main section.cert-section.cert-section > .cert-tabs-bar {
  width: 100%;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* Underline tabs (1:5446) */
.cert-tabs-bar {
  margin-top: clamp(32px, 3.125vw, 60px);
  border-bottom: 1px solid #ddd;
}
.cert-tabs {
  display: flex;
  gap: 10px;
  width: min(1600px, 100% - 2 * clamp(16px, 8.333vw, 160px));
  margin-inline: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.cert-tabs::-webkit-scrollbar { display: none; }
.cert-tab {
  flex: 0 0 auto;
  min-width: clamp(88px, 7.292vw, 140px);
  margin: 0 0 -1px;
  padding: clamp(12px, 0.833vw, 16px);
  border: 0;
  box-shadow: inset 0 -2px 0 transparent;
  background: none;
  font-family: inherit;
  font-weight: 400;
  font-size: clamp(16px, 1.042vw, 20px);
  line-height: 1.6;
  letter-spacing: -0.03em;
  color: #999;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s, box-shadow 0.2s;
}
.cert-tab:hover { color: var(--sp-navy); }
.cert-tab.is-active {
  box-shadow: inset 0 -2px 0 var(--sp-navy);
  font-weight: 700;
  color: var(--sp-navy);
}
.cert-tab:focus-visible {
  outline: 2px solid var(--sp-navy);
  outline-offset: -2px;
}

/* Grid (1:5459) */
.cert-body {
  width: min(1600px, 100% - 2 * clamp(16px, 8.333vw, 160px));
  margin: clamp(32px, 3.125vw, 60px) auto 0;
}
.cert-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(36px, 3.125vw, 60px) clamp(12px, 1.042vw, 20px);
}
.cert-empty {
  grid-column: 1 / -1;
  padding: 80px 0;
  font-size: 16px;
  color: #999;
  text-align: center;
}
.cert-card {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 1.25vw, 24px);
  min-width: 0;
  cursor: pointer;
  outline: none;
}
.cert-card-thumb {
  aspect-ratio: 335 / 474;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f7;
}
.cert-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.cert-card:hover .cert-card-thumb img,
.cert-card:focus-visible .cert-card-thumb img { transform: scale(1.03); }
.cert-card:focus-visible .cert-card-thumb {
  outline: 2px solid var(--sp-navy);
  outline-offset: 2px;
}
.cert-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 0 8px;
}
.cert-card-cat {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: -0.03em;
  color: #999;
}
.cert-card-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cert-card-title {
  font-weight: 600;
  font-size: clamp(18px, 1.146vw, 22px);
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #333;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.cert-card-desc {
  font-size: clamp(14px, 0.833vw, 16px);
  line-height: 1.4;
  letter-spacing: -0.03em;
  color: #666;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* Pagination (1:5519) */
.cert-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: clamp(56px, 5.208vw, 100px);
}
.cert-pager[hidden] { display: none; }
.cert-pager-group,
.cert-pager-nums {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cert-pager button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  cursor: pointer;
}
.cert-pager-arrow { width: 18px; height: 18px; }
.cert-pager-arrow img { width: 18px; height: 18px; }
.cert-pager-arrow.is-prev img { transform: rotate(180deg); }
.cert-pager-arrow:disabled { cursor: default; opacity: 0.4; }
.cert-pager-num {
  width: 20px;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: -0.04em;
  color: #999;
}
.cert-pager-num:hover { color: var(--sp-navy); }
.cert-pager-num.is-active { font-weight: 600; color: var(--sp-navy); }
.cert-pager button:focus-visible {
  outline: 2px solid var(--sp-navy);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .cert-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .cert-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .cert-tab { min-width: 0; padding: 12px 14px; }
}
@media (max-width: 600px) {
  .cert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cert-card-meta { padding: 0 2px; gap: 8px; }
  .cert-card-cat { font-size: 12px; padding: 3px 8px; }
}
