/* ==========================================================================
   회사소개 > 특허 및 인증서 (company/certification.php)
   - 비주얼 · 탭은 about.css · history.css 그대로, 제목은 메인 FEATURE 제목(.aw-strengths__*, common.css 12)
   - 아이콘: about.css 의 얇은 선 아이콘(.aw-about-icon + --aw-stats-icon) 사용
   - 동작: main.js initCertFlip (터치 기기 카드 뒤집기), initTestSwiper (시험성적서 Swiper), initSeqReveal (카드 순차 등장)
   1. 특허 및 인증서 — 뒤집히는 카드 (.aw-cert)
   2. 시험성적서 — Swiper (.aw-test)
   ========================================================================== */

/* 시험성적서 아이콘 (문서 + 체크, Lucide 모양) */
.fidelity .aw-about-icon.aw-icon-file-check {
  --aw-stats-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='m9 15 2 2 4-4'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   1. 특허 및 인증서 — 5칸(1500px 이하 3칸 · 1023px 이하 2칸 · 539px 이하 1칸)
      - 카드 앞: 둥근 아이콘 · 영문 배지 · 이름 · 내용 · 날짜 · 발급기관 (안쪽 얇은 테두리 액자)
      - 카드 뒤: 원본 이미지 / 마우스를 올리거나(.is-flipped: 터치) 키보드로 초점이 가면 뒤집힘
   -------------------------------------------------------------------------- */
.fidelity .aw-cert {
  padding: clamp(80px, 8vw, 160px) 0;
}

.fidelity .aw-cert__inner,
.fidelity .aw-test__inner {
  width: 100%;
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: clamp(16px, 5vw, 0px);
}

/* 한글 제목 — Marcellus 대신 Noto Serif KR (연혁 제목과 같음) */
.fidelity .aw-cert__title,
.fidelity .aw-test__title {
  font-family: "Noto Serif KR", serif;
  letter-spacing: -0.02em;
}

.fidelity .aw-cert__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(20px, 2vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.fidelity .aw-cert-card {
  min-width: 0;
  perspective: 1500px;
}

.fidelity .aw-cert-card__inner {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 330 / 470;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: center;
  color: inherit;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fidelity .aw-cert-card__front,
.fidelity .aw-cert-card__back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-bg-02);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.fidelity .aw-cert-card__front {
  gap: 8px;
  padding: clamp(24px, 2.4vw, 40px);
  padding-top: 0;
}

/* 안쪽 얇은 액자 테두리 */
.fidelity .aw-cert-card__front::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgb(var(--color-secondary-rgb) / 0.35);
  pointer-events: none;
}

.fidelity .aw-cert-card__back {
  padding: 16px;
  background: var(--color-white);
  transform: rotateY(180deg);
}

.fidelity .aw-cert-card__back img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (hover: hover) and (pointer: fine) {
  .fidelity .aw-cert-card__inner:hover {
    transform: rotateY(180deg);
  }
}

.fidelity .aw-cert-card__inner:focus-visible,
.fidelity .aw-cert-card__inner.is-flipped {
  transform: rotateY(180deg);
}

.fidelity .aw-cert-card__inner:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 4px;
}

.fidelity .aw-cert-card__mark {
  display: grid;
  place-items: center;
  width: clamp(72px, 2.4vw + 40px, 96px);
  aspect-ratio: 1;
  margin-top: 40px;
  margin-bottom: clamp(16px, 1.2vw, 24px);
  background-color: transparent
}
.fidelity .aw-cert-card__mark.patent {
  margin-top: 10px;
}
.fidelity .aw-cert-card__mark.patent.type-2 {
  margin-bottom: 0;
}
.fidelity .aw-cert-card__mark.mainbiz {
  width: clamp(120px, 2.4vw + 40px, 140px);
}


.fidelity .aw-cert-card__badge {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgb(var(--color-secondary-rgb) / 0.12);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-secondary);
}

.fidelity .aw-cert-card__title {
  margin-top: 8px;
  font-family: var(--font-base);
  font-size: clamp(18px, 0.5vw + 13px, 22px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: var(--color-text);
  word-break: keep-all;
}

.fidelity .aw-cert-card__name {
  font-family: var(--font-base);
  font-size: clamp(14px, 0.2vw + 12px, 16px);
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-text-secondary);
  word-break: keep-all;
}

.fidelity .aw-cert-card__date {
  font-family: var(--font-en);
  font-size: 14px;
  color: var(--color-text-secondary);
  opacity: 0.75;
}

.fidelity .aw-cert-card__authority {
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}


@media (prefers-reduced-motion: reduce) {
  .fidelity .aw-cert-card__inner {
    transition: none;
  }
}
/* --------------------------------------------------------------------------
   2. 시험성적서 — 밝은 배경(--color-bg-03), 왼쪽 제목 · 오른쪽 화살표, 아래 Swiper (오른쪽 끝까지 넘침)
      - 카드: 아이콘 · 배지 · 수종 · 규격 · 시험 항목 · 날짜 · 시험기관
      - 마우스를 올리거나(.is-flipped: 터치) 초점이 가면 원본 이미지(.aw-test-card__doc)가 나타남
   -------------------------------------------------------------------------- */
.fidelity .aw-test {
  overflow: hidden;
  padding: clamp(80px, 8vw, 160px) 0 clamp(100px, 9vw, 180px);
  background: var(--color-bg-03);
}

.fidelity .aw-test__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: clamp(40px, 4vw, 72px);
}

.fidelity .aw-test__eyebrow {
  margin: 0;
  font-family: Marcellus, serif;
  font-size: clamp(16px, 0.2589vw + 15.0291px, 20px);
  letter-spacing: 1.5px;
  color: var(--color-secondary);
}

.fidelity .aw-test__title {
  margin: clamp(12px, 1vw, 20px) 0 0;
  font-size: clamp(30px, 1.4vw + 22px, 52px);
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-primary);
  word-break: keep-all;
}

.fidelity .aw-test__title .aw-title-point {
  color: var(--color-secondary);
}

.fidelity .aw-test__lead {
  margin: clamp(16px, 1.4vw, 28px) 0 0;
  font-family: var(--font-base);
  font-size: clamp(15px, 0.3vw + 13px, 18px);
  line-height: 1.6;
  color: var(--color-text-secondary);
  word-break: keep-all;
}

/* 이전 · 다음 버튼 — 모양은 메인 PORTFOLIO 버튼(.aw-portfolio__nav-btn, common.css 14) 그대로, 간격도 같게 */
.fidelity .aw-test__nav {
  display: flex;
  flex: none;
  gap: 10px;
}

/* 처음 · 끝에서 더 갈 수 없는 쪽 (Swiper 가 붙이는 클래스) */
.fidelity .aw-test__arrow.swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* 슬라이드는 오른쪽 화면 끝까지 넘쳐 보이도록 */
.fidelity .aw-test__swiper {
  overflow: visible;
}

.fidelity .aw-test__swiper .swiper-slide {
  width: clamp(260px, 18vw + 60px, 330px);
  height: auto;
}

.fidelity .aw-test-card {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  min-height: clamp(380px, 12vw + 220px, 440px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--color-bg);
  font: inherit;
  color: var(--color-text);
  text-align: center;
  cursor: pointer;
}

.fidelity .aw-test-card__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px;
  transition: opacity 0.4s ease;
}

.fidelity .aw-test-card__body::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgb(var(--color-secondary-rgb) / 0.3);
  pointer-events: none;
}

/* 원본 이미지 — 평소에는 숨김 */
.fidelity .aw-test-card__doc {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--color-white) no-repeat center / contain;
  background-origin: content-box;
  padding: 14px;
  opacity: 0;
  transition: opacity 0.45s ease;
}

@media (hover: hover) and (pointer: fine) {
  .fidelity .aw-test-card:hover .aw-test-card__doc {
    opacity: 1;
  }
}

.fidelity .aw-test-card:focus-visible .aw-test-card__doc,
.fidelity .aw-test-card.is-flipped .aw-test-card__doc {
  opacity: 1;
}

.fidelity .aw-test-card:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 4px;
}

.fidelity .aw-test-card__mark {
  display: grid;
  place-items: center;
  width: 100px;
  aspect-ratio: 1;
  /* margin-bottom: 24px;
  border-radius: 50%;
  background: var(--color-bg-04); */
  background: url(/assets/images/company/cert/mark_tr.png) no-repeat center;
  background-size: contain;
}

.fidelity .aw-test-card__badge {
  margin-top: 16px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-secondary);
}

.fidelity .aw-test-card__title {
  margin-top: 4px;
  font-family: var(--font-base);
  font-size: clamp(19px, 0.4vw + 15px, 22px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.03em;
  word-break: keep-all;
}

.fidelity .aw-test-card__spec {
  font-family: var(--font-en);
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
}

.fidelity .aw-test-card__item {
  font-family: var(--font-base);
  font-size: clamp(14px, 0.2vw + 12px, 16px);
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-text-secondary);
  word-break: keep-all;
}

.fidelity .aw-test-card__date {
  margin-top: 8px;
  font-family: var(--font-en);
  font-size: 14px;
  color: var(--color-text-secondary);
  opacity: 0.75;
}

.fidelity .aw-test-card__authority {
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 600;
}

/* 진행 막대 (Swiper progressbar) */
.fidelity .aw-test__progress {
  position: relative;
  height: 2px;
  margin-top: clamp(32px, 3vw, 56px);
  background: rgb(var(--color-primary-rgb) / 0.12);
}

.fidelity .aw-test__progress .swiper-pagination-progressbar-fill {
  background: var(--color-secondary);
}

@media (prefers-reduced-motion: reduce) {
  .fidelity .aw-test-card__doc,
  .fidelity .aw-test-card__body {
    transition: none;
  }
}