/* ── 중국한의원 홈페이지 CSS ── */

:root {
  --primary: #2A6B7C;      /* 딥 틸 (해변의 수영장) */
  --primary-light: #3D8E9E; /* 아쿠아 블루 */
  --accent: #E8873A;        /* 서머 탠저린 */
  --accent-light: #F5D4B0;
  --bg: #F8F9F5;            /* 아이보리 */
  --bg-card: #ffffff;
  --text: #2c2c2c;
  --text-light: #666666;
  --border: #e8e2da;
  --hero-overlay: rgba(42, 107, 124, 0.75);
}

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

body {
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}

/* ── 네비게이션 ── */
.navbar {
  background: var(--primary);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.nav-logo {
  color: white;
  font-size: 1.15em;
  font-weight: 700;
  text-decoration: none;
  padding: 16px 0;
  letter-spacing: -0.5px;
  white-space: nowrap;
  margin-right: 8px;
}

.nav-logo span {
  color: var(--accent-light);
  font-weight: 400;
  font-size: 0.75em;
  margin-left: 8px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0;
  flex-wrap: nowrap;
}

.nav-menu li a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 18px 14px;
  display: block;
  font-size: 1.05em;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  color: white;
  background: rgba(255,255,255,0.08);
  border-bottom-color: var(--accent);
}

/* 모바일 메뉴 */
.nav-toggle { display: none; cursor: pointer; color: white; font-size: 1.5em; padding: 16px 0; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }
  .nav-menu.open { display: flex; }
  .nav-menu li a { padding: 14px 24px; border-bottom: 1px solid rgba(255,255,255,0.1); }
}

/* ── 히어로 섹션 ── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 80px 20px;
  text-align: center;
}

.hero h1 {
  font-size: 2.8em;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero p {
  font-size: 1.2em;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 30px;
  line-height: 1.8;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.hero-badge {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  padding: 10px 24px;
  font-size: 0.95em;
  backdrop-filter: blur(4px);
}

/* ── 진료시간 배너 ── */
.clinic-banner {
  background: linear-gradient(135deg, #1E4A5A 0%, #2A6B7C 100%);
  padding: 0;
}

.clinic-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 50px 40px;
}

.banner-left {
  flex: 1;
  color: white;
}

.banner-tag {
  display: inline-block;
  background: rgba(200, 149, 108, 0.25);
  color: var(--accent);
  border: 1px solid rgba(200, 149, 108, 0.4);
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.9em;
  font-weight: 600;
  margin-bottom: 20px;
}

.banner-left h2 {
  font-size: 2.2em;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.banner-left h2 strong {
  font-weight: 700;
  color: #F5C84A;
}

.banner-left > p {
  font-size: 1em;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  margin-bottom: 24px;
}

.banner-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.b-badge {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85em;
}

.banner-right {
  flex-shrink: 0;
  width: 380px;
}

.schedule-card {
  background: white;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.schedule-card h3 {
  font-size: 1.2em;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.schedule-row {
  display: flex;
  align-items: baseline;
  padding: 10px 0;
}

.schedule-day {
  width: 90px;
  font-size: 0.95em;
  color: var(--text-light);
  flex-shrink: 0;
}

.schedule-time {
  flex: 1;
}

.schedule-time strong {
  font-size: 1.05em;
  color: var(--text);
  display: block;
}

.schedule-time small {
  font-size: 0.82em;
  color: var(--text-light);
}

.schedule-divider {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}

.schedule-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.s-tag {
  background: #EEF6F8;
  color: var(--primary);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.82em;
  font-weight: 600;
  border: 1px solid #C8E0E6;
}

.schedule-buttons {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.sched-btn {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95em;
  transition: all 0.2s;
}

.sched-btn-naver {
  background: #03c75a;
  color: white;
}

.sched-btn-naver:hover {
  background: #02b351;
}

.sched-btn-info {
  background: var(--text);
  color: white;
}

.sched-btn-info:hover {
  background: #444;
}

@media (max-width: 900px) {
  .clinic-banner-inner {
    flex-direction: column;
    padding: 36px 20px;
    gap: 28px;
  }
  .banner-left h2 { font-size: 1.6em; }
  .banner-right { width: 100%; }
  .schedule-card { padding: 24px 20px; }
}

/* ── 섹션 공통 ── */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

.section-title {
  font-size: 1.8em;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1.05em;
  margin-bottom: 40px;
}

/* ── 카테고리 카드 그리드 ── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.category-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 32px 28px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(42,107,124,0.12);
  border-color: var(--primary-light);
}

.category-card .card-icon {
  font-size: 2.2em;
  margin-bottom: 16px;
  display: block;
}

.category-card h3 {
  font-size: 1.2em;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary);
}

.category-card p {
  font-size: 0.92em;
  color: var(--text-light);
  line-height: 1.6;
}

.category-card .card-count {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--accent-light);
  color: var(--primary);
  font-size: 0.8em;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
}

/* ── 카테고리 메인 페이지 ── */
.category-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 50px 20px;
  text-align: center;
}

.category-hero h1 {
  font-size: 2.2em;
  font-weight: 700;
  margin-bottom: 12px;
}

.category-hero p {
  font-size: 1.1em;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
}

/* ── 아티클 카드 ── */
.article-list {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

.article-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 16px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}

.article-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 4px 16px rgba(42,107,124,0.08);
  transform: translateX(4px);
}

.article-card h3 {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.article-card p {
  font-size: 0.9em;
  color: var(--text-light);
  line-height: 1.6;
}


/* ── 칼럼 시리즈 그리드 ── */
.column-series-grid {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
@media (max-width: 680px) {
  .column-series-grid {
    grid-template-columns: 1fr;
    padding: 24px 16px 40px;
    gap: 20px;
  }
}
.series-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.series-card:hover {
  box-shadow: 0 8px 28px rgba(42,107,124,0.14);
  transform: translateY(-2px);
}
.series-header {
  background: linear-gradient(135deg, var(--primary) 0%, #1e5a6b 100%);
  color: #fff;
  padding: 24px 24px 20px;
  position: relative;
}
.series-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,0.3), transparent);
}
.series-header h2 {
  font-size: 1.25em;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.series-count {
  display: inline-block;
  font-size: 0.78em;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(4px);
  padding: 4px 12px;
  border-radius: 14px;
  font-weight: 500;
}
.series-articles {
  padding: 6px 0 8px;
}
.series-article {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: background 0.15s, padding-left 0.2s;
}
.series-article:last-child {
  border-bottom: none;
}
.series-article:hover {
  background: linear-gradient(90deg, rgba(42,107,124,0.05), transparent);
  padding-left: 26px;
}
.series-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary) 0%, #1e5a6b 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88em;
  font-weight: 700;
  margin-top: 2px;
  box-shadow: 0 2px 6px rgba(42,107,124,0.2);
}
.series-text {
  flex: 1;
  min-width: 0;
}
.series-text h3 {
  font-size: 0.98em;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
  line-height: 1.4;
}
.series-text p {
  font-size: 0.82em;
  color: var(--text-light);
  line-height: 1.55;
  margin: 0;
}
.series-arrow {
  flex-shrink: 0;
  color: var(--primary);
  font-size: 1.3em;
  margin-top: 6px;
  opacity: 0.4;
  transition: opacity 0.2s, transform 0.2s;
}
.series-article:hover .series-arrow {
  opacity: 1;
  transform: translateX(3px);
}
/* 준비 중 카드 */
.series-coming {
  border-style: dashed;
  border-color: #c0cdd4;
}
.series-coming .series-header {
  background: linear-gradient(135deg, #8a9bae 0%, #6d7f8e 100%);
}
.series-placeholder {
  padding: 56px 24px;
  text-align: center;
}
.series-placeholder p {
  color: var(--text-light);
  font-size: 0.92em;
  line-height: 1.6;
}
.series-placeholder::before {
  content: '✍️';
  display: block;
  font-size: 2rem;
  margin-bottom: 12px;
}

/* ── 시리즈 인라인 배지 ── */
.series-badge-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.series-badge-tag {
  background: var(--primary);
  color: #fff;
  font-size: 0.78em;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}
.series-badge-num {
  font-size: 0.82em;
  color: var(--text-light);
}

/* ── 시리즈 이전/다음 네비게이션 ── */
.series-nav {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px 60px;
}
.series-nav-inner {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.series-nav-label {
  background: var(--primary);
  color: #fff;
  font-size: 0.82em;
  font-weight: 600;
  padding: 10px 20px;
  text-align: center;
}
.series-nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.series-nav-btn {
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
}
.series-nav-btn + .series-nav-btn {
  border-left: 1px solid var(--border);
}
.series-nav-btn.next {
  text-align: right;
}
.series-nav-btn:hover:not(.disabled) {
  background: rgba(42,107,124,0.04);
}
.series-nav-btn.disabled {
  color: var(--text-muted, #bbb);
}
.nav-dir {
  font-size: 0.78em;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 4px;
}
.series-nav-btn.disabled .nav-dir {
  color: var(--text-muted, #bbb);
}
.nav-title {
  font-size: 0.88em;
  line-height: 1.4;
}
@media (max-width: 480px) {
  .series-nav-links {
    grid-template-columns: 1fr;
  }
  .series-nav-btn + .series-nav-btn {
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .series-nav-btn.next {
    text-align: left;
  }
}

.series-nav-inline {
  padding: 0;
  margin: 2rem 0 1.5rem;
  background: linear-gradient(135deg, #f0f6f8 0%, #e8f0f2 100%);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(42,107,124,0.12);
}
.series-nav-inline .series-nav-inner {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(42,107,124,0.08);
}

/* ── 글 발행일 ── */
.article-date {
  display: block;
  font-size: 0.82em;
  color: var(--text-light, #888);
  margin-bottom: 12px;
}
/* ── 아티클 본문 ── */
.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.article-content h1 {
  font-size: 1.8em;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  line-height: 1.4;
}

.article-content h2 {
  font-size: 1.35em;
  font-weight: 700;
  color: var(--primary);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-light);
}

.article-content h3 {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--primary-light);
  margin: 28px 0 12px;
}

.article-content p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.article-content ul, .article-content ol {
  margin: 12px 0 20px 24px;
}

.article-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.article-breadcrumb {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 20px 0;
  font-size: 0.85em;
  color: var(--text-light);
}

.article-breadcrumb a {
  color: var(--primary-light);
  text-decoration: none;
}

.article-breadcrumb a:hover { text-decoration: underline; }

/* ── CTA 박스 ── */
.cta-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  margin: 40px 0;
}

.cta-box h3 {
  font-size: 1.3em;
  margin-bottom: 12px;
}

.cta-box p {
  opacity: 0.9;
  margin-bottom: 20px;
}

.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 14px 36px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.cta-btn:hover {
  background: #D07530;
  transform: translateY(-2px);
}

/* ── 클리닉 정보 ── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.info-card .info-icon { font-size: 2em; margin-bottom: 12px; }
.info-card h4 { font-size: 1em; color: var(--primary); margin-bottom: 8px; }
.info-card p { font-size: 0.9em; color: var(--text-light); }

/* ── 푸터 ── */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: 40px 20px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

.footer h4 {
  color: white;
  margin-bottom: 12px;
  font-size: 1em;
}

.footer p, .footer a {
  font-size: 0.88em;
  line-height: 1.8;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}

.footer a:hover { color: white; }

.footer-buttons {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.footer-btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.2s;
}
.footer-btn:hover { opacity: 0.85; color: white; }
.footer-btn-naver {
  background: #03c75a;
  color: white;
}
.footer-btn-map {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}

.footer-bottom {
  max-width: 1200px;
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.82em;
  text-align: center;
}

/* ── 치료계획서 예시 카드 ── */
.care-plan-example { margin-bottom: 28px; }
.care-plan-example h3 {
  font-size: 1.05em;
  color: var(--primary);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent-light);
}
.plan-card {
  background: #fafafa;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  padding: 18px 20px;
}
.plan-section {
  margin-bottom: 14px;
}
.plan-section:last-child { margin-bottom: 0; }
.plan-label {
  font-size: 0.75em;
  font-weight: 700;
  color: #2e6da4;
  letter-spacing: 1px;
  margin-bottom: 4px;
  border-left: 3px solid #2e6da4;
  padding-left: 8px;
}
.plan-section p {
  background: white;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.92em;
  line-height: 1.8;
}

/* ── 반응형 ── */
@media (max-width: 768px) {
  .hero { padding: 50px 16px; }
  .hero h1 { font-size: 1.9em; }
  .hero p { font-size: 1em; }
  .section { padding: 40px 16px; }
  .section-title { font-size: 1.4em; }
  .category-grid { grid-template-columns: 1fr; }
  .article-content h1 { font-size: 1.4em; }
  .cta-box { padding: 28px 20px; }
}

/* 빈 섹션 (원장 칼럼 준비중) */
.empty-section {
  text-align: center;
  padding: 40px 20px;
  color: #888;
  font-size: 15px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px dashed #ddd;
}

/* ═══ 내부 링크 (같은 섹션 내 다른 카테고리) ═══ */
.sibling-links {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e0e0e0;
  text-align: center;
}
.sibling-links h3 {
  font-size: 0.85em;
  font-weight: 600;
  color: var(--text-light, #888);
  margin-bottom: 14px;
}
.sibling-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.sibling-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 24px;
  padding: 8px 18px;
  text-decoration: none;
  color: inherit;
  font-size: 0.88em;
  transition: all 0.2s;
}
.sibling-card:hover {
  background: var(--primary, #2a6b7c);
  color: #fff;
  border-color: var(--primary, #2a6b7c);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(42,107,124,0.2);
}
.sibling-card:hover .sib-name {
  color: #fff;
}
.sibling-card:hover .sib-arrow {
  color: rgba(255,255,255,0.6);
}
.sib-icon {
  font-size: 1em;
  flex-shrink: 0;
}
.sib-name {
  font-size: 0.92em;
  font-weight: 600;
  color: var(--primary, #2a6b7c);
}
.sib-arrow {
  display: none;
}
