/* Page-specific styles: history.html */
:root {
  --bg: #FFF3E8;
  --bg-alt: #FBE3D1;
  --ink: #211512;
  --ink-soft: #6A4A40;
  --primary: #D71920;
  --primary-dark: #8F1015;
  --accent: #F15A24;
  --accent-soft: #F7C84B;
  --herb-brown: #A52A1E;
  --line: #E8C6B2;
  --white: #FFFDFC;

  --font-display: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --font-body: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;

  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-full: 999px;

  --max-width: 1120px;
}

img { max-width: 100%; height: auto; display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
}

/* ---- Header ---- */

.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }

.nav-links a:not(:last-child)::after {
  content: "｜"; position: absolute; right: -1px; top: 50%;
  transform: translateY(-50%); color: rgba(0,0,0,0.2); font-weight: 400;
}

.nav-links a.is-current { color: var(--primary); }

.mobile-menu {
  display: none; flex-direction: column; gap: 4px; padding: 16px 24px 24px;
  background: rgba(255,243,232,0.96);
}

/* ---- Page hero (작은 배너형) ---- */

.page-hero {
  position: relative;
  overflow: hidden;
  height: 420px;
  padding: 0 24px;
  display: flex;
  align-items: center;   /* ← 이게 "세로" 중앙 정렬 담당 */
  background: linear-gradient(160deg, #C9151B, #49090B);
  color: var(--white);
}

.page-hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.70;
  z-index: 1;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(201,21,27,0.80), rgba(73,9,11,0.88));
  z-index: 2;
}

.page-hero .container {
  position: relative;
  z-index: 3;
  text-align: center;
}

.page-hero .eyebrow { color: var(--accent-soft); }

.page-hero h1 {
  color: var(--white);
  font-size: clamp(28px, 4vw, 42px);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-hero p {
  margin: 14px auto 0;
  color: rgba(255,255,255,0.8);
  font-size: 16px;
  max-width: 560px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- 연혁: 가로 스크롤 타임라인 ---- */

.history-hscroll-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}

.history-hscroll {
  flex: 1;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 24px 20px 24px;
  scrollbar-width: none;
}

.history-hscroll::-webkit-scrollbar { display: none; }

.h-card {
  scroll-snap-align: center;
  flex: 0 0 260px;
  border-radius: var(--radius-md);
  padding: 26px 22px;
  box-shadow: 0 4px 16px rgba(73,9,11,0.50);
}

.h-card-era {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 10px;
}

.h-card-year {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 12px;
}

.h-card h3 { font-size: 16px; margin-bottom: 8px; }

.h-card p { font-size: 13.5px; line-height: 1.6; opacity: 0.85; }

.h-nav {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 18px;
  cursor: pointer;
}

.h-nav:hover { background: var(--bg-alt); }

.h-card.era-meiji { background: #FFF0D8; color: #6A3B1F; }

.h-card.era-meiji h3, .h-card.era-meiji .h-card-year { color: #5D2D17; }

.h-card.era-taisho { background: #F0A24B; color: #5A2514; }

.h-card.era-taisho h3, .h-card.era-taisho .h-card-year { color: #40140D; }

.h-card.era-showa { background: #B9181E; color: #FFF0E5; }

.h-card.era-showa h3, .h-card.era-showa .h-card-year { color: var(--white); }

.h-card.era-showa .h-card-era { color: var(--accent-soft); }

.h-card.era-heisei { background: var(--accent); color: var(--white); }

.h-card.era-heisei h3, .h-card.era-heisei .h-card-year { color: var(--white); }

.h-card.era-heisei p { opacity: 0.92; }

@media (max-width: 560px) {
  .h-card { flex-basis: 220px; padding: 20px 18px; }
  .h-nav { display: none; }
}

/* ---- 브랜드 소개: 처방 인증서 스타일 ---- */

.cert-doc {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  background: var(--white);
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 48px 56px;
  box-shadow: 0 6px 20px rgba(73,9,11,0.08);
}

.cert-doc::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-md) - 4px);
  pointer-events: none;
}

.cert-header {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--line);
}

.cert-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--herb-brown);
  text-transform: uppercase;
}

.cert-header h3 {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--primary-dark);
  margin-top: 8px;
}

.cert-body p {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.8;
  margin: 0 auto 16px;
  max-width: 640px;
}

.cert-clause {
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 24px auto 0;
  max-width: 640px;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.7;
}

.cert-clause strong { color: var(--primary); }

.cert-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px dashed var(--line);
}

.cert-seal {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  transform: rotate(-8deg);
  flex-shrink: 0;
}

.cert-seal::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed var(--accent);
  border-radius: 50%;
  opacity: 0.6;
}

.cert-sign { text-align: left; }

.cert-sign-name {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--primary-dark);
  font-weight: 700;
}

.cert-sign-sub {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}

@media (max-width: 680px) {
  .cert-doc { padding: 32px 24px; }
}

/* ---- 라인업 변천: 나이테(동심원) 스타일 ---- */

.rings-wrap {
  display: flex;
  align-items: center;
  gap: 56px;
  flex-wrap: wrap;
}

.rings-visual {
  flex: 0 0 260px;
  max-width: 260px;
}

.rings-visual svg { width: 100%; height: auto; }

.rings-legend {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ring-legend-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.ring-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}

.ring-dot-1 { background: var(--primary); }

.ring-dot-2 { background: var(--accent); }

.ring-dot-3 { background: var(--accent-soft); }

.ring-legend-item h3 { font-size: 16px; margin-bottom: 4px; }

.ring-legend-item p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }

@media (max-width: 680px) {
  .rings-wrap { flex-direction: column; }
  .rings-visual { flex-basis: auto; max-width: 200px; }
}

/* ---- CTA ---- */

.history-cta {
  background: var(--bg);
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 72px 24px;
}

.history-cta h2 { color: var(--primary-dark); font-size: clamp(24px, 3vw, 32px); }

.history-cta p { color: var(--ink-soft); margin: 14px 0 28px; }

.site-footer {
  padding: 48px 0 40px;
  background: var(--primary-dark);
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  text-align: center;
}

.site-footer span:first-of-type { color: rgba(255,255,255,0.6); font-size: 13px; }

.site-footer span:last-of-type { max-width: 780px; line-height: 1.7; color: rgba(255,255,255,0.35); }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .section { padding: 64px 0; }
  .page-hero { padding: 140px 0 48px; }
}
