/* ===== Base ===== */
:root {
  --text: #111;
  --muted: #666;
  --line: #111;
  --gap: 34px;
  --youtube: #e62117;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Noto Sans KR", Arial, sans-serif;
  color: var(--text);
  background: #fff;
}
a {
  color: inherit;
  text-decoration: none;
}

/* ===== Section ===== */
.latest-videos {
  max-width: 1280px;
  margin: 34px auto 80px;
  padding: 0 22px;
}

/* Header row */
.lv-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 40px;
}
.lv-title {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.6px;
  line-height: 1.1;
  white-space: nowrap;
}
.lv-title strong {
  font-weight: 800;
}
.lv-more {
  font-size: 14px;
  letter-spacing: 0.5px;
  color: #8d8d8d;
  white-space: nowrap;
}

/* Thin line */
.lv-line {
  height: 2px;
  background: var(--line);
  width: 100%;
  margin-bottom: 18px;
}

/* Body layout: left feature + right grid */
.lv-body {
  display: flex;
  gap: var(--gap);
  align-items: flex-start;
}
.lv-feature {
  flex: 0 0 58%;
  min-width: 520px;
}
.lv-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 26px;
  padding-top: 6px;
}

/* ===== Video thumbs ===== */
.thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Featured frame */
.lv-feature .thumb {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08) inset;
}

/* Big play overlay */
.play-big {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 50px;
  border-radius: 12px;
  background: rgba(230, 33, 23, 0.95);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}
.play-big:before {
  content: "";
  position: absolute;
  left: 30px;
  top: 15px;
  width: 0;
  height: 0;
  border-left: 16px solid #fff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

/* Titles under thumbs */
.lv-caption {
  margin: 10px 0 8px;
  font-size: 14px;
  color: #111;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 1.35em;
}

/* Small youtube icon row under each thumb */
.yt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 18px;
}
.yt-icon {
  width: 22px;
  height: 14px;
  border-radius: 3px;
  background: var(--youtube);
  position: relative;
  flex: 0 0 auto;
}
.yt-icon:before {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: 0;
  height: 0;
  border-left: 7px solid #fff;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

/* Item hover */
.lv-item:hover .thumb img,
.lv-feature a:hover .thumb img {
  filter: brightness(0.95);
  transform: scale(1.01);
  transition: transform 0.18s ease, filter 0.18s ease;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .lv-title {
    font-size: 30px;
  }
  .lv-feature {
    flex-basis: 56%;
    min-width: 460px;
  }
  .lv-grid {
    gap: 22px;
  }
}
@media (max-width: 980px) {
  .lv-body {
    flex-direction: column;
  }
  .lv-feature {
    flex: 1 1 auto;
    min-width: 0;
  }
  .lv-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .lv-title {
    font-size: 22px;
    white-space: normal;
  }
  .lv-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 420px) {
  .lv-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   REAL SELFIE REVIEW
   ========================= */
.selfie-review {
  background: #f0f0f0;
  padding: 110px 0 120px;
}

.selfie-review__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 40px;
}

.selfie-review__title {
  margin: 0 0 60px;
  text-align: center;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #222;
}

/* 그리드(5x2), 이미지 사이 간격 없이 붙이기 */
.selfie-review__grid {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border: 1px solid #eee;
  overflow: hidden;
}

.selfie-review__item {
  position: relative;
  border-right: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

/* 마지막 열 오른쪽 선 제거 */
.selfie-review__item:nth-child(5n) {
  border-right: 0;
}

/* 마지막 행 아래 선 제거 (10개 기준: 6~10) */
.selfie-review__item:nth-child(n + 6) {
  border-bottom: 0;
}

.selfie-review__link {
  display: flex; /* 원본 크기/비율 유지 + 중앙정렬 */
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.selfie-review__img {
  display: block;
  width: auto; /* 강제 확대/축소 제거 */
  height: auto;
  max-width: 100%; /* 칸보다 크면 줄이기 */
  max-height: 100%;
  aspect-ratio: auto; /* 기존 4/3 강제 제거 */
  object-fit: initial; /* cover 제거(크롭 방지) */
}

/* Hover */
.selfie-review__link:hover .selfie-review__img {
  filter: brightness(0.95);
  transform: scale(1.01);
  transition: transform 0.18s ease, filter 0.18s ease;
}

/* ============================================================
   SELFIE REVIEW - Hover Overlay + Text + Swipe + FOUC 방지
   ============================================================ */

/* FOUC 방지: 스와이프 구성 전(초기 렌더) 2번째 슬라이드(11~) 처음부터 숨김 */
.selfie-review:not([data-swipe-built="1"])
  .selfie-review__grid
  > .selfie-review__item:nth-child(n + 11) {
  display: none;
}

/* hover overlay + text (JS가 span 주입) */
.selfie-hover__overlay {
  position: absolute;
  inset: 0;
  background: rgba(128, 0, 128, 0.45);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.selfie-hover__text {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 15px;
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
  text-align: center;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  letter-spacing: 1.2px;
  font-weight: 200;
  -webkit-text-stroke: 0.2px rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.selfie-review__item.is-hover .selfie-hover__overlay {
  opacity: 1;
}
.selfie-review__item.is-hover .selfie-hover__text {
  opacity: 1;
  transform: translateY(0);
}

/* Swipe wrapper (JS가 .selfie-swipe / viewport / track / dots 주입) */
.selfie-review.is-swipe .selfie-swipe {
  position: relative;
}
.selfie-review.is-swipe .selfie-swipe__viewport {
  overflow: hidden;
  touch-action: pan-y;
}
.selfie-review.is-swipe .selfie-swipe__track {
  display: flex;
  will-change: transform;
}
.selfie-review.is-swipe .selfie-swipe__track.is-anim {
  transition: transform 0.35s ease;
}
.selfie-review.is-swipe .selfie-review__page {
  flex: 0 0 100%;
}

/* dots */
.selfie-review.is-swipe .selfie-swipe__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}
.selfie-review.is-swipe .selfie-swipe__dot {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  border: 0;
  background: #222;
  opacity: 0.25;
  cursor: pointer;
  padding: 0;
}
.selfie-review.is-swipe .selfie-swipe__dot.is-active {
  opacity: 1;
}

/* 반응형 (SELFIE REVIEW) */
@media (max-width: 1200px) {
  .selfie-review__inner {
    padding: 0 24px;
  }
  .selfie-review__title {
    font-size: 38px;
    margin-bottom: 48px;
  }
  .selfie-review__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .selfie-review__item:nth-child(5n) {
    border-right: 1px solid #eee;
  }
  .selfie-review__item:nth-child(4n) {
    border-right: 0;
  }
  .selfie-review__item:nth-child(n + 6) {
    border-bottom: 1px solid #eee;
  }
  .selfie-review__item:nth-child(n + 9) {
    border-bottom: 0;
  }
}
@media (max-width: 900px) {
  .selfie-review {
    padding: 80px 0 90px;
  }
  .selfie-review__title {
    font-size: 32px;
  }
  .selfie-review__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .selfie-review__item:nth-child(4n) {
    border-right: 1px solid #eee;
  }
  .selfie-review__item:nth-child(3n) {
    border-right: 0;
  }
}
@media (max-width: 620px) {
  .selfie-review__title {
    font-size: 24px;
    margin-bottom: 28px;
  }
  .selfie-review__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .selfie-review__item:nth-child(3n) {
    border-right: 1px solid #eee;
  }
  .selfie-review__item:nth-child(2n) {
    border-right: 0;
  }
}

/* =========================
   검증된 병원 SC301
   ========================= */
.sc301-verified {
  background: #fff;
  padding: 80px 0 90px;
}

.sc301-verified__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Header */
.sc301-verified__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.sc301-verified__title {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.5px;
  color: #111;
  line-height: 1.15;
  white-space: nowrap;
}

.sc301-verified__title strong {
  font-weight: 800;
}

/* line + nav 한 줄 */
.sc301-verified__line-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0 28px;
}

.sc301-verified__line {
  flex: 1;
  height: 2px;
  background: #111;
}

.sc301-verified__nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.sc301-verified__arrow {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  font-weight: normal;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  color: #111;
  padding: 0;
}

.sc301-verified__arrow:hover {
  opacity: 0.75;
}

/* Cards grid */
.sc301-verified__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}

/* Card */
.sc301-card__link {
  display: block;
}

.sc301-card__thumb {
  width: 100%;
  background: #f3f3f3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* hover overlay(검은색) */
.sc301-card__thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
  z-index: 2;
}

/* 가운데 얇은 십자가 */
.sc301-card__thumb::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88px;
  height: 88px;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(#fff, #fff) center/1px 88px no-repeat,
    linear-gradient(#fff, #fff) center/88px 1px no-repeat;
}

.sc301-card__thumb img {
  display: block;
  width: auto; /* 기존 width:100% 제거 */
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto; /* 기존 강제 비율 제거 */
  object-fit: initial; /* cover 제거 */
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease, filter 0.2s ease; /* 느리게 */
}

/* Texts */
.sc301-card__name {
  margin: 14px 0 6px;
  font-size: 18px;
  font-weight: 800;
  color: #111;
  letter-spacing: -0.3px;
}

.sc301-card__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #666;
  letter-spacing: -0.2px;
}

/* Hover */
.sc301-card__link:hover .sc301-card__thumb::before {
  opacity: 1;
}
.sc301-card__link:hover .sc301-card__thumb::after {
  opacity: 1;
}
.sc301-card__link:hover .sc301-card__thumb img {
  filter: brightness(0.96);
  transform: scale(1.08);
  transition: transform 0.28s ease, filter 0.28s ease;
}

/* Responsive */
@media (max-width: 1200px) {
  .sc301-verified__inner {
    padding: 0 24px;
  }
  .sc301-verified__title {
    font-size: 30px;
  }
  .sc301-verified__grid {
    gap: 22px;
  }
}
@media (max-width: 980px) {
  .sc301-verified__title {
    white-space: normal;
  }
  .sc301-verified__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .sc301-verified {
    padding: 60px 0 70px;
  }
  .sc301-verified__head {
    align-items: center;
  }
  .sc301-verified__title {
    font-size: 22px;
  }
  .sc301-verified__grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   SC301 이벤트, EVENT
   (현재 HTML: line-row 내부 우측에 nav)
   ========================= */
.sc301-event {
  background: #f5f4ff;
  padding: 78px 0 90px;
}

.sc301-event__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Header */
.sc301-event__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.sc301-event__title {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.5px;
  color: #111;
  line-height: 1.15;
  white-space: nowrap;
}

.sc301-event__title strong {
  font-weight: 900;
}

/* line-row: line(좌) + nav(우) */
.sc301-event__line-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0 28px;
}

.sc301-event__line {
  flex: 1;
  height: 2px;
  background: #111;
}

.sc301-event__nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.sc301-event__arrow {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  font-weight: normal;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  color: #111;
  padding: 0;
}
.sc301-event__arrow:hover {
  opacity: 0.75;
}

/* Cards grid */
.sc301-event__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
}

/* FOUC 방지(요청 버그 해결):
   캐러셀 JS 적용 전엔 5번째부터 숨겨서
   "모든 카드가 잠깐 보였다가 사라지는" 현상 제거 */
.sc301-event:not([data-carousel-built="1"])
  .sc301-event__grid
  > .event-card:nth-child(n + 5) {
  display: none;
}

/* 5개(또는 그 이상) 들어올 수 있으니 자동 줄바꿈 유지 */
.event-card__link {
  display: block;
}

.event-card__thumb {
  width: 100%;
  background: #e9e9f3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.event-card__thumb img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  object-fit: initial;
  position: relative;
  z-index: 1;
  transition: transform 0.28s ease, filter 0.28s ease;
}

.event-card__name {
  margin: 14px 0 8px;
  font-size: 18px;
  font-weight: 900;
  color: #111;
  letter-spacing: -0.3px;
}

.event-card__tags {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #7a7a7a;
  letter-spacing: -0.2px;
}

/* Hover */
.event-card__link:hover .event-card__thumb::before {
  opacity: 1;
}
.event-card__link:hover .event-card__thumb::after {
  opacity: 1;
}
.event-card__link:hover .event-card__thumb img {
  filter: brightness(0.96);
  transform: scale(1.08);
  transition: transform 0.28s ease, filter 0.28s ease;
}

/* 병원 소개 */
.cont4.flex_x {
  background-color: #f0f0f0;
}

/* footer */
footer.flex_x {
  margin-bottom: 200px;
}

/* Responsive */
@media (max-width: 1200px) {
  .sc301-event__inner {
    padding: 0 24px;
  }
  .sc301-event__title {
    font-size: 30px;
  }
  .sc301-event__grid {
    gap: 20px;
  }
}
@media (max-width: 980px) {
  .sc301-event__title {
    white-space: normal;
  }
  .sc301-event__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .sc301-event {
    padding: 60px 0 70px;
  }
  .sc301-event__head {
    align-items: center;
  }
  .sc301-event__title {
    font-size: 22px;
  }
  .sc301-event__grid {
    grid-template-columns: 1fr;
  }
}
