/* ============================================================
   IEUM Pediatrics — showcase demo
   Theme: light-locked (warm ivory + terracotta)
   Shape rule: containers 24px / interactive pill / hero image arch
   ============================================================ */

:root {
  --bg: #fbf7f2;
  --surface: #ffffff;
  --ink: #2b2320;
  --muted: #71655e;
  --line: #ece2d8;
  --accent: #d95f43;
  --accent-deep: #b8442b;
  --accent-soft: #fbe7e0;
  --accent-ink: #46251c;
  --radius: 24px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Hiragino Sans", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary {
  background: var(--accent);
  color: #fff7f4;
  box-shadow: 0 8px 24px rgba(217, 95, 67, 0.26);
}
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-deep); transform: translateY(-2px); }
.btn-nav { padding: 10px 20px; font-size: 14px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 247, 242, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--accent-ink); }
.brand-mark { width: 30px; height: 30px; color: var(--accent); }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 14.5px; font-weight: 500; color: var(--muted); transition: color 0.2s var(--ease); }
.nav-links a:hover { color: var(--accent-deep); }
.nav-right { display: flex; align-items: center; gap: 14px; }

.lang-switch { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-btn {
  border: 0; background: transparent; font: inherit;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  padding: 6px 11px; border-radius: 999px; cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.lang-btn:hover { color: var(--accent-deep); }
.lang-btn.is-active { background: var(--accent); color: #fff7f4; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 88px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: center; }
.hero-title {
  font-size: clamp(38px, 5.2vw, 58px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.hero-title em { font-style: italic; color: var(--accent); padding-bottom: 4px; }
.hero-sub { margin-top: 22px; font-size: 18px; color: var(--muted); max-width: 46ch; }
.hero-cta { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-media { overflow: hidden; border-radius: 260px 260px var(--radius) var(--radius); }
.hero-media img { width: 100%; height: 540px; object-fit: cover; }

/* ---------- Info strip ---------- */
.info-strip { background: var(--surface); border-block: 1px solid var(--line); padding: 28px 0; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.info-item { display: flex; flex-direction: column; gap: 4px; }
.info-label { font-size: 13px; font-weight: 600; color: var(--accent-deep); }
.info-value { font-size: 15px; font-weight: 500; }

/* ---------- Sections ---------- */
.section { padding: 104px 0; }
.section-head { max-width: 60ch; margin-bottom: 52px; }
.section-head h2, .vaccine-inner h2, .doctor-copy h2, .contact-copy h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.section-head p { margin-top: 14px; font-size: 17px; color: var(--muted); }

/* ---------- Services : mixed grid ---------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 250px;
  gap: 18px;
}
.svc-card {
  position: relative;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.svc-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(43, 35, 32, 0.1); }
.svc-card h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.svc-card p { margin-top: 8px; font-size: 14.5px; color: var(--muted); line-height: 1.55; }

.svc-photo { grid-column: span 3; grid-row: span 2; padding: 0; border: 0; }
.svc-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.svc-overlay {
  position: relative;
  z-index: 1;
  padding: 30px;
  margin-top: auto;
  background: linear-gradient(to top, rgba(43, 27, 20, 0.85) 0%, rgba(43, 27, 20, 0.35) 60%, transparent 100%);
}
.svc-overlay h3 { color: #fff9f5; }
.svc-overlay p { color: rgba(255, 243, 236, 0.85); }
.svc-tint { grid-column: span 3; background: var(--accent-soft); border-color: transparent; }
.svc-tint h3 { color: var(--accent-ink); }
.svc-card:nth-child(3) { grid-column: 4 / 7; }

/* ---------- Vaccine band ---------- */
.section-vaccine { background: var(--accent-ink); }
.vaccine-inner h2 { color: #fff3ec; }
.vaccine-inner > p { margin-top: 14px; font-size: 17px; color: rgba(251, 231, 224, 0.72); max-width: 52ch; }
.vaccine-cols { margin-top: 52px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.vaccine-col { padding: 0 32px; border-left: 1px solid rgba(251, 231, 224, 0.18); }
.vaccine-col:first-child { padding-left: 0; border-left: 0; }
.vaccine-col h3 { color: #fbe7e0; font-size: 17px; font-weight: 700; }
.vaccine-col p { margin-top: 8px; color: rgba(251, 231, 224, 0.62); font-size: 14.5px; }

/* ---------- Doctor ---------- */
.section-doctor { background: var(--surface); border-block: 1px solid var(--line); }
.doctor-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
.doctor-media { border-radius: var(--radius); overflow: hidden; }
.doctor-media img { width: 100%; height: 540px; object-fit: cover; }
.doctor-name { margin-top: 24px; font-size: 20px; }
.doctor-role {
  margin-left: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
  vertical-align: 2px;
}
.doctor-bio { margin-top: 18px; font-size: 16.5px; color: var(--muted); max-width: 58ch; }
.doctor-creds { margin-top: 26px; display: grid; gap: 10px; }
.doctor-creds li { padding-left: 24px; position: relative; font-size: 15px; font-weight: 500; }
.doctor-creds li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.doctor-note {
  margin-top: 26px;
  font-size: 13.5px;
  color: var(--muted);
  border-left: 2px solid var(--accent);
  padding-left: 14px;
}

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 860px; }
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s var(--ease);
}
.faq-item[open] { border-color: var(--accent); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  font-size: 16.5px;
  font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon { flex: none; width: 14px; height: 14px; position: relative; }
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--accent);
  border-radius: 2px;
  transition: transform 0.3s var(--ease);
}
.faq-icon::before { left: 0; top: 6px; width: 14px; height: 2px; }
.faq-icon::after { left: 6px; top: 0; width: 2px; height: 14px; }
.faq-item[open] .faq-icon::after { transform: scaleY(0); }
.faq-item > p { padding: 0 26px 24px; color: var(--muted); font-size: 15.5px; max-width: 68ch; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 6fr 6fr; gap: 64px; align-items: center; }
.contact-list { margin: 36px 0 40px; display: grid; gap: 22px; }
.contact-list div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; }
.contact-list dt { font-size: 14px; font-weight: 700; color: var(--accent-deep); padding-top: 2px; }
.contact-list dd { font-size: 15.5px; color: var(--ink); }
.contact-list dd a { font-weight: 600; }
.contact-media { border-radius: var(--radius); overflow: hidden; }
.contact-media img { width: 100%; height: 440px; object-fit: cover; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0 56px; }
.footer-inner p { font-size: 13.5px; color: var(--muted); }
.footer-legal { margin-top: 8px; font-size: 12.5px; opacity: 0.8; }

/* ---------- Reveal motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .svc-card { transition: none; }
}

/* ---------- Language fade ---------- */
body.lang-fading [data-i18n],
body.lang-fading [data-i18n-html] { opacity: 0.25; transition: opacity 0.18s ease; }
[data-i18n], [data-i18n-html] { transition: opacity 0.18s ease; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-media { border-radius: 160px 160px var(--radius) var(--radius); }
  .hero-media img { height: 420px; }
  .svc-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 230px; }
  .svc-photo { grid-column: span 2; }
  .svc-tint, .svc-card:nth-child(3) { grid-column: auto; }
  .vaccine-cols { grid-template-columns: 1fr; gap: 28px; }
  .vaccine-col { padding: 0; border-left: 0; }
  .doctor-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .doctor-media img { height: 420px; }
}

@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .brand-name { display: none; }
  .btn-nav { display: none; }
  .info-grid { grid-template-columns: 1fr; gap: 18px; }
  .svc-grid { grid-template-columns: 1fr; }
  .svc-photo { grid-column: span 1; }
  .contact-list div { grid-template-columns: 1fr; gap: 4px; }
}

/* nav overflow guard */
.nav-links a { white-space: nowrap; }
@media (max-width: 1180px) { .nav-links { display: none; } }


/* ---------- Facility gallery ---------- */
.facility-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.facility-grid figure { margin: 0; }
.facility-grid img { width: 100%; height: 250px; object-fit: cover; border-radius: var(--radius); }
.facility-grid figcaption { margin-top: 12px; }
.fc-t { display: block; font-size: 14.5px; font-weight: 700; }
.fc-d { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }

/* ---------- Global care band ---------- */
.section-gcare { background: var(--accent-soft); }
.gcare-head { max-width: 60ch; margin-bottom: 48px; }
.gcare-head h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
.gcare-head p { margin-top: 14px; font-size: 17px; color: var(--muted); }
.gcare-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.gcare-col h3 { font-size: 17px; font-weight: 700; color: var(--accent); }
.gcare-col p { margin-top: 8px; font-size: 14.5px; color: var(--muted); line-height: 1.6; }

@media (max-width: 1024px) {
  .facility-grid { grid-template-columns: 1fr; }
  .facility-grid img { height: 220px; }
  .gcare-cols { grid-template-columns: 1fr; gap: 24px; }
}
