/* ===========================
   references.css — homepagerenewal/education-referance.html 시안을 교육 레퍼런스(/references/)에 이식
   치수/색은 시안 style.css의 `.er-*` 규칙(EDUCATION REFERENCE PAGE 섹션)을 그대로 따른다.

   시안은 전역 :root 변수(--orange/--navy/--white/--max)와 .wrap에 의존하는데
   이 프로젝트에는 없다. insights.css / about.css와 동일하게 .ref-page 스코프 안에서 자체 정의한다.
   =========================== */

.ref-page {
  --er-white: #fafafa;
  --er-navy: #0d1b3e;
  --er-orange: #ff7900;
  --er-ink: #1b1b1b;
  --er-border: #c7cbce;
  --er-max: 1200px;
}

/* 시안의 .wrap 대체 */
.ref-page .er-wrap {
  width: 100%;
  max-width: var(--er-max);
  margin: 0 auto;
  padding: 0 40px;
}

/* 필터로 감춘 카드 — .er-card의 display:flex를 이기도록 한 단계 더 구체적으로 */
.ref-page .er-card.is-hidden {
  display: none;
}

/* ── Hero ── */
.ref-page .er-hero {
  background: linear-gradient(180deg, #d33500, #962500);
  overflow: hidden;
}

.ref-page .er-hero-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 40px;
  min-height: 480px;
}

.ref-page .er-hero-txt {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 21px;
  padding: 70px 0;
}

.ref-page .er-hero-txt h1 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(40px, 5vw, 64px);
  letter-spacing: -1.28px;
  line-height: 1.3;
  color: #fff;
  word-break: keep-all;
  text-wrap: balance;
}

.ref-page .er-hero-txt p {
  margin: 0;
  font-weight: 500;
  font-size: clamp(17px, 2vw, 24px);
  letter-spacing: -0.24px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  word-break: keep-all;
  text-wrap: balance;
}

.ref-page .er-hero-art {
  flex: 0 0 auto;
  align-self: stretch;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
}

.ref-page .er-hero-art img {
  height: 94%;
  width: auto;
  max-width: none;
  display: block;
}

/* ── Intro + 필터 ── */
.ref-page .er-intro {
  background: var(--er-white);
  padding: 100px 0 0;
}

.ref-page .er-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}

.ref-page .er-head .eb {
  margin: 0;
  font-weight: 800;
  font-size: clamp(20px, 2vw, 24px);
  letter-spacing: 1.2px;
  color: var(--er-orange);
  text-transform: uppercase;
  line-height: 1.42;
}

.ref-page .er-head h2 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.49px;
  color: var(--er-ink);
  line-height: 1.42;
}

.ref-page .er-head .desc {
  margin: 0;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  color: var(--er-ink);
}

.ref-page .er-filter {
  margin-top: 50px;
  background: #fff;
  border: 0.88px solid var(--er-border);
  border-radius: 14px;
  padding: 8px 50px;
  display: flex;
  flex-direction: column;
}

.ref-page .er-filter .er-row {
  display: flex;
  gap: 43px;
  align-items: center;
  padding: 8px 0;
}

.ref-page .er-filter .er-row:first-child {
  border-bottom: 1px solid var(--er-border);
}

.ref-page .er-filter .flabel {
  font-weight: 700;
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: -0.8px;
  color: #222;
  min-width: 44px;
}

.ref-page .er-opts {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.ref-page .er-opt {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 10px;
  height: 52px;
  cursor: pointer;
  user-select: none;
}

.ref-page .er-opt input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ref-page .er-opt .box {
  width: 16px;
  height: 16px;
  border: 1.25px solid #686868;
  border-radius: 3px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.ref-page .er-opt .box::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  opacity: 0;
}

.ref-page .er-opt input:checked + .box {
  background: var(--er-orange);
  border-color: var(--er-orange);
}

.ref-page .er-opt input:checked + .box::after {
  opacity: 1;
}

/* 키보드 포커스 표시 — 시안은 input을 완전히 숨겨 포커스 링이 사라진다 */
.ref-page .er-opt input:focus-visible + .box {
  outline: 2px solid var(--er-orange);
  outline-offset: 2px;
}

.ref-page .er-opt .t {
  font-weight: 500;
  font-size: clamp(16px, 1.7vw, 18px);
  letter-spacing: -0.8px;
  color: #686868;
  line-height: 1;
}

.ref-page .er-opt input:checked ~ .t {
  color: var(--er-ink);
  font-weight: 700;
}

/* ── 카드 그리드 ── */
.ref-page .er-list {
  background: var(--er-white);
  padding: 50px 0 130px;
}

.ref-page .er-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.ref-page .er-card {
  /* 카드 전체가 레퍼런스 상세로 가는 링크다 */
  text-decoration: none;
  color: inherit;
  background: var(--er-white);
  border: 0.88px solid var(--er-border);
  border-radius: 16px;
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ref-page .er-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(211, 53, 0, 0.12);
}

.ref-page .er-card .head {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.ref-page .er-card .tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ref-page .er-card .tag {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.15px;
  line-height: 1.42;
  padding: 5px 16px;
  border-radius: 22px;
  white-space: nowrap;
}

.ref-page .er-card .tag-size {
  background: var(--er-orange);
  color: #fff;
}

.ref-page .er-card .tag-ind {
  background: var(--er-navy);
  color: #fff;
}

.ref-page .er-card .tag-target {
  border: 0.833px solid var(--er-border);
  color: var(--er-ink);
}

.ref-page .er-card .tag-extra {
  background: rgba(255, 121, 0, 0.1);
  border: 0.833px solid #ff522c;
  color: #ff522c;
}

.ref-page .er-card h3 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(24px, 2vw, 32px);
  letter-spacing: -0.56px;
  line-height: 1.5;
  color: #111;
}

.ref-page .er-card .thumb {
  position: relative;
  height: 227px;
  border-radius: 9px;
  overflow: hidden;
  background: #b7b7b7;
}

.ref-page .er-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 시안에 없는 보강 — 노션 '유형'이 베스트인 사례 표식.
   시안 카드 4장에 마침 베스트 사례가 없어 대응 요소가 없다. */
.ref-page .er-card .best {
  position: absolute;
  left: 12px;
  top: 12px;
  background: #ff522c;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.15px;
  padding: 4px 12px;
  border-radius: 22px;
}
.ref-page .er-card .desc {
  margin: 0;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(42, 42, 42, 0.72);
  flex: 1 1 auto;
}

.ref-page .er-empty {
  text-align: center;
  font-weight: 500;
  font-size: 18px;
  color: #8a8f98;
  padding: 60px 0;
}

/* ── CTA ── */
.ref-page .er-cta {
  background: var(--er-ink);
  padding: 100px 0 130px;
}

.ref-page .er-cta h2 {
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.49px;
  color: var(--er-white);
  line-height: 1.42;
  margin: 0 0 50px;
}

.ref-page .er-cta-grid {
  display: flex;
  gap: 24px;
}

.ref-page .er-cta-card {
  flex: 1 1 0;
  min-height: 312px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  overflow: hidden;
  position: relative;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  text-decoration: none;
  isolation: isolate;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ref-page .er-cta-card .bgpat {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -2;
  display: block;
}

.ref-page .er-cta-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
}

.ref-page .er-cta-card.purple {
  background: #abaaff;
}

.ref-page .er-cta-card.blue {
  background: #9acdff;
}

.ref-page .er-cta-card.purple::before {
  background: linear-gradient(160deg, rgba(74, 28, 255, 0.72), rgba(36, 0, 134, 0.86));
}

.ref-page .er-cta-card.blue::before {
  background: linear-gradient(160deg, rgba(10, 134, 255, 0.66), rgba(0, 84, 167, 0.86));
}

.ref-page .er-cta-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.ref-page .er-cta-card .ct-top {
  display: flex;
  flex-direction: column;
  gap: 35px;
}

.ref-page .er-cta-card .ct-eb {
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -0.49px;
  line-height: 1.42;
}

.ref-page .er-cta-card .ct-title {
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.56px;
  line-height: 1.4;
}

.ref-page .er-cta-card .ct-more {
  font-weight: 700;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.5;
}

/* ── 반응형 (시안 브레이크포인트 그대로) ── */
@media (max-width: 1000px) {
  .ref-page .er-hero-inner {
    flex-direction: column;
    text-align: center;
    padding: 60px 0 0;
    min-height: 0;
  }
  .ref-page .er-hero-txt {
    align-items: center;
    padding: 0 0 30px;
  }
  .ref-page .er-hero-txt p {
    white-space: normal;
  }
  .ref-page .er-hero-art {
    align-self: center;
  }
  .ref-page .er-hero-art img {
    height: auto;
    width: 100%;
    max-width: 380px;
  }
  .ref-page .er-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ref-page .er-filter {
    padding: 8px 24px;
  }
  .ref-page .er-cta-grid {
    flex-direction: column;
  }
  .ref-page .er-intro {
    padding: 70px 0 0;
  }
}

@media (max-width: 640px) {
  .ref-page .er-grid {
    grid-template-columns: 1fr;
  }
  /* 시안에 없는 보강 — 좁은 화면에서 라벨/옵션이 가로로 눌리지 않게 세로 정렬 */
  .ref-page .er-filter .er-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
