/* ──────────────────────────────────────────────────────────────
   유진안과 — Home page styles
   ──────────────────────────────────────────────────────────── */

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: min(860px, 92vh);
  overflow: hidden;
  display: flex; align-items: center;
  color: #fff;
  isolation: isolate;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(135deg, #0F2418 0%, #1E3A2C 40%, #2D5440 100%);
}
.hero__bg::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 800px 600px at 70% 30%, rgba(95,162,122,0.35), transparent 60%),
    radial-gradient(ellipse 600px 400px at 20% 80%, rgba(127,181,149,0.18), transparent 70%);
}

/* Animated iris / eye background */
.hero__iris {
  position: absolute; top: 50%; right: -5%; transform: translateY(-50%);
  width: 720px; height: 720px; z-index: -1;
  opacity: 0.55;
  mix-blend-mode: screen;
}
.hero__iris svg { width: 100%; height: 100%; }

/* subtle floating particles */
.hero__dots {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
}
.hero__dot {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: rgba(169,212,179,0.5);
  animation: drift 14s linear infinite;
}
@keyframes drift {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-120vh) translateX(40px); opacity: 0; }
}

.hero__inner {
  max-width: 1280px; margin: 0 auto; padding: 0 32px;
  width: 100%;
  position: relative; z-index: 1;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: 9999px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  font-size: 13px; font-weight: 500; letter-spacing: 0.15em;
  text-transform: uppercase; color: rgba(255,255,255,0.9);
  margin-bottom: 32px;
}
.hero__eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-300);
  box-shadow: 0 0 12px var(--brand-300);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero .hero__title,
h1.hero__title {
  color: #fff;
  font-size: clamp(48px, 6.5vw, 92px);
  font-weight: 600; line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 32px;
  text-wrap: pretty;
  max-width: 900px;
}
.hero__title .accent {
  background: linear-gradient(120deg, var(--brand-200) 0%, var(--brand-300) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-style: italic;
  font-weight: 500;
  padding-right: 10px;
}
.hero__sub {
  font-size: 18px; line-height: 1.75;
  color: rgba(255,255,255,0.75);
  max-width: 560px; margin-bottom: 48px;
  text-wrap: pretty;
}
.hero__ctas { display: flex; gap: 16px; flex-wrap: wrap; }
.hero .btn--fill {
  background: #fff; color: var(--brand-700); border-color: #fff;
}
.hero .btn--fill:hover {
  background: var(--brand-50); color: var(--brand-600); border-color: var(--brand-50);
}
.hero .btn--outline {
  background: transparent; color: #fff; border-color: rgba(255,255,255,0.3);
}
.hero .btn--outline:hover { background: rgba(255,255,255,0.08); border-color: #fff; color: #fff; }

/* hero layout variants */
.hero.layout-split {
  display: grid; grid-template-columns: 1.1fr 1fr;
  padding: 0 0 0 0;
  align-items: stretch;
}
.hero.layout-split .hero__inner { padding: 96px 32px; max-width: 720px; margin-left: auto; margin-right: 0; }
.hero.layout-split .hero__iris {
  position: relative; inset: auto;
  transform: none; width: 100%; height: 100%;
  opacity: 1; mix-blend-mode: normal;
}
.hero.layout-split .hero__meta { position: relative; bottom: auto; margin-top: 48px; padding: 0; }

.hero.layout-center .hero__inner { text-align: center; }
.hero.layout-center .hero__title, .hero.layout-center .hero__sub { margin-inline: auto; }
.hero.layout-center .hero__ctas { justify-content: center; }
.hero.layout-center .hero__eyebrow { margin-inline: auto; }

/* ─── KPI strip ─── */
.kpi {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.kpi__item {
  padding: 56px 32px; text-align: left;
  border-right: 1px solid var(--border-subtle);
  transition: background 250ms;
}
.kpi__item:last-child { border-right: none; }
.kpi__item:hover { background: var(--bg-section); }
.kpi__num {
  font-size: 64px; font-weight: 600; line-height: 1;
  letter-spacing: -0.04em; color: var(--fg-heading);
  margin-bottom: 8px; font-variant-numeric: tabular-nums;
}
.kpi__num sup {
  font-size: 24px; color: var(--brand-400); margin-left: 2px;
  vertical-align: top; top: 0.6em;
}
.kpi__label {
  font-size: 14px; color: var(--fg-muted);
  letter-spacing: 0.04em;
}

/* ─── Specialty grid ─── */
.spec-grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px;
}
.spec-card {
  position: relative; overflow: hidden;
  background: var(--neutral-950);
  border-radius: 12px; color: #fff;
  padding: 36px 32px;
  min-height: 300px;
  display: flex; flex-direction: column; justify-content: space-between;
  cursor: pointer;
  transition: transform 400ms var(--ease-out), box-shadow 400ms var(--ease-out);
}
.spec-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.spec-card--lg { grid-column: span 6; min-height: 400px; }
.spec-card--md { grid-column: span 4; }
.spec-card--sm { grid-column: span 3; min-height: 240px; }

.spec-card__visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

/* 이미지를 가진 카드: 실제 사진 */
.spec-card__visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  /* 기본 상태: 약간 어둡게 */
  filter: brightness(0.45);
  transition:
    transform 600ms var(--ease-out),
    filter 600ms var(--ease-out);
}

/* 호버 시: 이미지 확대 + 밝기 증가 */
.spec-card:hover .spec-card__visual img {
  transform: scale(1.08);
  filter: brightness(0.72);
}

/* 그라디언트 전용 카드(07) 호버 효과 */
.spec-card:hover .spec-card__visual--gradient {
  opacity: 0.8;
  transition: opacity 400ms;
}

/* 공통 하단 그라디언트 오버레이 — 텍스트 가독성 확보 */
.spec-card__visual::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.82) 100%);
  pointer-events: none;
}

.spec-card__num {
  position: relative; z-index: 1;
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.15em; color: var(--brand-300);
}
.spec-card__body { position: relative; z-index: 1; }
.spec-card__en {
  display: block; font-size: 13px; letter-spacing: 0.15em;
  text-transform: uppercase; color: rgba(255,255,255,0.6);
  margin-bottom: 10px;
}
h3.spec-card__name,
.spec-card__name {
  color: #fff;
  font-size: 26px; font-weight: 600;
  margin-bottom: 12px; letter-spacing: -0.01em;
}
.spec-card--lg .spec-card__name { font-size: 32px; }
.spec-card__desc {
  font-size: 14px; line-height: 1.7;
  color: rgba(255,255,255,0.72);
  max-width: 360px;
}
.spec-card__arrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 20px; font-size: 13px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff;
}
.spec-card__arrow span {
  display: inline-block; width: 28px; height: 1px; background: #fff;
  transition: width 250ms var(--ease-out);
}
.spec-card:hover .spec-card__arrow span { width: 44px; }

/* ─── Doctor row ─── */
.doctors {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.doctor {
  background: var(--bg1); border: 1px solid var(--border-subtle);
  border-radius: 12px; overflow: hidden;
  cursor: pointer;
  transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
}
body.dark .doctor { background: var(--bg2); }
.doctor:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.doctor__img {
  aspect-ratio: 4/5;
  position: relative;
  overflow: hidden;
  /* 이미지 로드 전 폴백 배경 */
  background: linear-gradient(160deg, var(--brand-100) 0%, var(--brand-300) 70%, var(--brand-600) 100%);
}
.doctor__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 얼굴이 상단에 위치하도록 */
  object-position: top center;
  display: block;
  transition: transform 500ms var(--ease-out);
}
.doctor:hover .doctor__img img {
  transform: scale(1.04);
}
.doctor__body { padding: 28px 28px 32px; }
.doctor__pos {
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--brand-400); margin-bottom: 10px;
}
.doctor__name {
  font-size: 26px; font-weight: 600;
  color: var(--fg-heading); margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.doctor__spec {
  font-size: 14px; color: var(--fg-muted); margin-bottom: 18px;
}
.doctor__tags {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.doctor__tag {
  font-size: 12px; padding: 4px 10px;
  background: var(--brand-50); color: var(--brand-600);
  border-radius: 9999px; letter-spacing: 0.02em;
}
body.dark .doctor__tag { background: rgba(95,162,122,0.15); color: var(--brand-200); }

/* ─── Trust / Promise blocks ─── */
.promise {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
}
.promise__item {
  padding: 48px 36px;
  border-right: 1px solid rgba(255,255,255,0.08);
  transition: background 300ms;
}
.promise__item:last-child { border-right: none; }
.promise__item:hover { background: rgba(255,255,255,0.04); }
.promise__num {
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.15em; color: var(--brand-200);
  margin-bottom: 20px;
}
.promise__title {
  font-size: 22px; font-weight: 600;
  color: #fff; margin-bottom: 14px;
  letter-spacing: -0.01em; line-height: 1.4;
}
.promise__desc {
  font-size: 14px; color: rgba(255,255,255,0.65);
  line-height: 1.75;
}

/* ─── News / Notices ─── */
.news-row {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 80px;
}
.news-list { display: flex; flex-direction: column; }
.news-item {
  display: grid; grid-template-columns: 90px 1fr auto;
  gap: 24px; padding: 24px 0;
  border-top: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: padding 200ms, background 200ms;
}
.news-item:hover { padding-left: 12px; padding-right: 12px; color: var(--brand-500); }
.news-item:first-child { border-top: none; padding-top: 0; }
.news-item__date {
  font-size: 13px; color: var(--fg-muted);
  letter-spacing: 0.02em; font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.news-item__title {
  font-size: 16px; color: var(--fg-heading);
  font-weight: 500; line-height: 1.5;
}
.news-item:hover .news-item__title { color: var(--brand-500); }
.news-item__tag {
  font-size: 12px; padding: 4px 10px;
  background: var(--bg2); color: var(--fg2);
  border-radius: 9999px; white-space: nowrap; align-self: start;
}

/* ══════════════════════════════════════════════════════════════
   반응형 — 홈 페이지 전용
   ══════════════════════════════════════════════════════════ */

/* ── 태블릿 (≤ 1024px) ───────────────────────────────────── */
@media (max-width: 1024px) {

    /* 히어로: 아이리스 축소 + 위치 조정 */
    .hero {
        min-height: min(720px, 92vh);
    }

    .hero__iris {
        width: 520px;
        height: 520px;
        right: -6%;
        opacity: 0.4;
    }

    .hero__sub {
        font-size: 16px;
    }

    /* KPI: 2열 */
    .kpi {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 진료과목 카드: 6열 (2개씩) */
    .spec-card--lg,
    .spec-card--md,
    .spec-card--sm {
        grid-column: span 6;
    }

    /* 의료진: 2열 */
    .doctors {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 약속: 2열 */
    .promise {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 공지 + 진료시간: 1열 */
    .news-row {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}


/* ── 모바일 (≤ 767px) ────────────────────────────────────── */
@media (max-width: 767px) {

    /* 히어로: 아이리스 숨김, 전체 높이 */
    .hero {
        min-height: 100svh;
        min-height: 100vh;
    }

    .hero__iris {
        display: none;
    }

    .hero__inner {
        padding: 0 20px;
    }

    .hero__eyebrow {
        font-size: 12px;
        padding: 6px 12px;
        margin-bottom: 20px;
    }

    /* 히어로 제목은 clamp로 유연하게 */
    .hero .hero__title,
    h1.hero__title {
        font-size: clamp(32px, 9vw, 52px);
        margin-bottom: 20px;
    }

    .hero__sub {
        font-size: 15px;
        margin-bottom: 32px;
    }

    /* CTA 버튼: 세로 배치 */
    .hero__ctas {
        flex-direction: column;
        gap: 12px;
    }

    .hero__ctas .btn {
        width: 100%;
        justify-content: center;
    }

    /* KPI: 2열 유지, 패딩·숫자 축소 */
    .kpi {
        grid-template-columns: repeat(2, 1fr);
    }

    .kpi__item {
        padding: 32px 20px;
    }

    .kpi__num {
        font-size: 44px;
    }

    .kpi__num sup {
        font-size: 18px;
    }

    .kpi__label {
        font-size: 13px;
    }

    /* 진료과목 카드: 전체 너비 */
    .spec-grid {
        gap: 12px;
    }

    .spec-card--lg,
    .spec-card--md,
    .spec-card--sm {
        grid-column: span 12;
        min-height: 220px;
    }

    .spec-card--lg {
        min-height: 280px;
    }

    /* 의료진: 1열 */
    .doctors {
        grid-template-columns: 1fr;
    }

    /* 약속: 1열 + 구분선 방향 전환 */
    .promise {
        grid-template-columns: 1fr;
    }

    .promise__item {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 36px 28px;
    }

    .promise__item:last-child {
        border-bottom: none;
    }

    /* 공지사항 */
    .news-row {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .news-item {
        grid-template-columns: 70px 1fr;
        gap: 12px;
    }

    /* 뉴스 태그: 모바일에서 숨김 (공간 부족) */
    .news-item__tag {
        display: none;
    }

    /* 섹션 CTA 타이포 */
    .hero__title .accent {
        font-style: normal;
    }
}
