/* Dr Kwang Lee Integrative Medicine — book-style tab styling */

#screen-integrative {
  background: linear-gradient(180deg, #0c0e15 0%, #14182a 50%, #0c0e15 100%);
  color: #e8eaf3;
  min-height: 100vh;
}

#integrative-content {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px 80px;
}

/* ====== COVER ====== */
.ig-cover {
  position: relative;
  margin: 16px 0 12px;
  padding: 40px 28px 32px;
  border-radius: 18px;
  overflow: hidden;
  background: #1a1f33;
  border: 1px solid rgba(255, 215, 140, 0.18);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}
.ig-cover-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 208, 138, 0.18) 0%, transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(0, 212, 255, 0.18) 0%, transparent 60%),
    linear-gradient(135deg, #16203a 0%, #1a1f33 100%);
  filter: saturate(1.1);
}
.ig-cover-inner {
  position: relative;
  text-align: center;
}
.ig-cover-edition {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: #ffd08a;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.ig-cover-title {
  font-size: clamp(26px, 4.4vw, 40px);
  line-height: 1.15;
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #ffd08a, #ffeac1, #ffd08a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ig-cover-subtitle {
  font-size: 14px;
  color: #c9cee0;
  max-width: 600px;
  margin: 0 auto 16px;
  line-height: 1.55;
}
.ig-cover-author {
  font-size: 13px;
  color: #e8eaf3;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ====== DISCLAIMER ====== */
.ig-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 196, 98, 0.08);
  border: 1px solid rgba(255, 196, 98, 0.25);
  font-size: 12.5px;
  line-height: 1.5;
  color: #f4e3bd;
}
.ig-disclaimer-icon { flex: 0 0 auto; font-size: 16px; line-height: 1; padding-top: 1px; }

/* ====== TOC ====== */
.ig-toc {
  margin: 0 0 24px;
}
.ig-toc-title {
  font-size: 18px;
  margin: 0 0 12px;
  color: #ffd08a;
  letter-spacing: 0.04em;
}
.ig-toc-grid {
  display: grid;
  gap: 8px;
}
.ig-toc-item {
  display: grid;
  grid-template-columns: 32px 28px 1fr 16px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #1a1f33;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  color: #e8eaf3;
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}
.ig-toc-item:hover {
  background: #222843;
  border-color: rgba(255, 208, 138, 0.32);
  transform: translateY(-1px);
}
.ig-toc-icon { font-size: 20px; }
.ig-toc-num {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 11px;
  color: #8e94a8;
  letter-spacing: 0.05em;
}
.ig-toc-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ig-toc-name { font-weight: 600; font-size: 14.5px; }
.ig-toc-summary { font-size: 12.5px; color: #9aa0b6; line-height: 1.4; }
.ig-toc-arrow { color: #8e94a8; font-size: 14px; }
.ig-toc-sources { border-color: rgba(255, 208, 138, 0.25); }

/* ====== CHAPTER ====== */
.ig-chapter {
  margin: 24px 0 32px;
  padding: 22px 22px 18px;
  background: linear-gradient(180deg, #161a2c 0%, #131625 100%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  scroll-margin-top: 16px;
}
.ig-chapter-header { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.ig-chapter-num {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #ffd08a;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.ig-chapter-title {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 800;
  color: #f8f9ff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ig-ch-icon { font-size: 26px; line-height: 1; }
.ig-chapter-summary { color: #aab0c5; font-size: 13.5px; line-height: 1.55; }

/* ====== SECTION ====== */
.ig-section { margin: 18px 0; }
.ig-section-heading {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #ffd08a;
}
.ig-section-body p { margin: 0 0 10px; line-height: 1.65; color: #d6d9e6; font-size: 14.5px; }
.ig-section-body strong { color: #ffeac1; font-weight: 700; }
.ig-section-body ul { margin: 6px 0 12px; padding-left: 22px; color: #d6d9e6; font-size: 14.5px; line-height: 1.6; }
.ig-section-body li { margin-bottom: 4px; }

/* ====== CLINICAL CASE SECTION ====== */
.ig-section-case {
  margin: 24px 0;
  padding: 18px 18px 14px;
  background: linear-gradient(160deg, rgba(255, 208, 138, 0.06), rgba(0, 212, 255, 0.04) 70%);
  border: 1px solid rgba(255, 208, 138, 0.18);
  border-left: 4px solid #ffd08a;
  border-radius: 14px;
  position: relative;
}
.ig-section-case::before {
  content: '🩺';
  position: absolute;
  top: -14px;
  left: 14px;
  font-size: 20px;
  background: #1a1f33;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 208, 138, 0.32);
}
.ig-section-case .ig-section-heading {
  color: #ffe2b3;
  font-size: 17px;
  margin-bottom: 10px;
  letter-spacing: -0.005em;
}

/* ====== SECTION INLINE GALLERY (for clinical cases) ====== */
.ig-section-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.ig-figure-inline img {
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* ====== GALLERY ====== */
.ig-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 18px 0 6px;
}
.ig-figure {
  margin: 0;
  background: #0e1120;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ig-figure img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  background: #f4f5f8;
  display: block;
}
.ig-figure figcaption { padding: 10px 12px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.ig-figure-desc { font-size: 12.5px; color: #c9cee0; line-height: 1.4; margin-bottom: 6px; }
.ig-figure-credit {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 11px; color: #8e94a8;
}
.ig-license-badge {
  display: inline-block;
  padding: 2px 7px;
  background: rgba(99, 230, 174, 0.12);
  color: #63e6ae;
  border: 1px solid rgba(99, 230, 174, 0.3);
  border-radius: 999px;
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.02em;
}
.ig-author { color: #aab0c5; }
.ig-source-link {
  color: #80c5ff;
  text-decoration: none;
  margin-left: auto;
}
.ig-source-link:hover { text-decoration: underline; }

/* ====== CHAPTER FOOTER ====== */
.ig-chapter-footer { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.06); text-align: center; }
.ig-back-top {
  background: transparent;
  border: 1px solid rgba(255, 208, 138, 0.32);
  color: #ffd08a;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  transition: background 120ms ease, color 120ms ease;
}
.ig-back-top:hover { background: rgba(255, 208, 138, 0.12); }

/* ====== SOURCES PAGE ====== */
.ig-sources-chapter { background: linear-gradient(180deg, #161a2c 0%, #0f1322 100%); }
.ig-license-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ig-license-row {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: #1a1f33;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.06);
}
.ig-license-count { color: #aab0c5; font-size: 12px; font-weight: 600; }

.ig-source-list { list-style: none; padding: 0; margin: 12px 0 0; }
.ig-source-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ig-source-thumb {
  width: 64px; height: 48px; object-fit: cover; border-radius: 6px;
  background: #f4f5f8;
}
.ig-source-info { min-width: 0; }
.ig-source-title { font-size: 12.5px; color: #d6d9e6; line-height: 1.45; margin-bottom: 4px; }
.ig-source-meta {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: 11px; color: #8e94a8;
}
.ig-source-meta a { color: #80c5ff; text-decoration: none; }

/* ====== HOME TILE ====== */
.mode-card.integrative-cta {
  background: linear-gradient(135deg, #16203a 0%, #2a1f3d 100%);
  border: 1px solid rgba(255, 208, 138, 0.32);
  position: relative;
  overflow: hidden;
}
.mode-card.integrative-cta::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 208, 138, 0.22) 0%, transparent 60%);
  pointer-events: none;
}
.mode-card.integrative-cta .mode-icon { background: rgba(255, 208, 138, 0.15); color: #ffd08a; }
.mode-card.integrative-cta .mode-name { color: #ffd08a; font-weight: 700; }

/* ====== RESPONSIVE ====== */
@media (max-width: 600px) {
  .ig-cover { padding: 32px 20px 26px; }
  .ig-chapter { padding: 18px 16px 14px; }
  .ig-toc-item { grid-template-columns: 28px 24px 1fr 14px; padding: 10px 12px; }
  .ig-toc-icon { font-size: 18px; }
  .ig-chapter-title { font-size: 19px; }
  .ig-section-heading { font-size: 15px; }
  .ig-gallery { grid-template-columns: 1fr; }
}
