/*
Theme Name: GeneratePress Dark Optimized
Theme URI: https://healthycareinsights.com
Description: GeneratePress Child Theme – Full Dark Mode for 건강바로ON (의학 용어 사전 포함)
Author: HealthyCareInsights
Template: generatepress
Version: 1.0
*/

/* ===============================
   다크모드 기본 변수
=============================== */
:root {
  --base: #1f1f1f;
  --base-2: #1f1f1f;
  --base-3: #1f1f1f;
  --contrast: #ffffff;
  --border: #2a2a2a;
  --bg-main: var(--base);
  --bg-card: var(--base-2);
  --text-main: #e8eaed;
  --text-sub: #9aa0a6;
  --accent: #58c4b6;
  --hover-bg: #2a2a2a;
  --hover-text: #f5f5f5;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', 'Noto Sans KR', sans-serif;
}

/* ===============================
   전체 구조 및 기본 설정
=============================== */
body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.75;
}
.page .entry-title { display: none; }

a, a * { 
  color: var(--accent);
  text-decoration: none;
  transition: all 0.3s ease;
}
a:hover, a:hover * { color: var(--hover-text); }

/* 선택 방지 */
body, html, .no-drag {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* ===============================
   헤딩 계층
=============================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 1.9rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.6rem); }

/* ===============================
   홈 히어로 섹션
=============================== */
.home-hero {
  text-align: center;
  padding: 80px 20px;
  border-bottom: 1px solid #2a2a2a;
}

.home-title {
  font-size: 3.2rem; 
  color: #e8eaed; 
  margin-bottom: 15px;
}

.home-sub {
  font-size: 1.3rem;
  color: #9aa0a6; 
  margin-bottom: 20px;
}

/* ===============================
   홈 메뉴
=============================== */
.home-menu-wrapper {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin: 30px auto;
}

.home-menu-btn {
  padding: 15px 35px;
  background-color: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.3s ease;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.03);
}

.home-menu-btn a {
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
}

.home-menu-btn:hover {
  background-color: var(--hover-bg);
}

.home-menu-btn:hover a {
  color: var(--hover-text);
}

/* ===============================
   섹션 구조
=============================== */
.newsroom-section {
  max-width: 1100px;
  margin: 0 auto 60px;
  padding: 40px 20px;
  border-bottom: 1px solid var(--border);
}
.newsroom-section h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
}
.section-desc {
  font-size: 1rem;
  color: var(--text-sub);
  margin-bottom: 25px;
}

/* ===============================
   카드 / 리스트
=============================== */
.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.post-list article {
  background-color: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  transition: all 0.3s ease;
}
.post-list article:hover {
  background-color: var(--hover-bg);
  transform: translateY(-2px);
}
.post-list h3, .post-list p { color: var(--text-main); }

/* ===============================
   단일 글 내부 리스트
=============================== */
.single .entry-content ul,
.single .entry-content ol {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
  counter-reset: item;
  font-size: 18px;
  line-height: 1.75;
}
.single .entry-content ul > li,
.single .entry-content ol > li {
  position: relative;
  padding-left: 1.2em;
}
.single .entry-content ul > li::before {
  content: "•";
  color: var(--accent);
  position: absolute;
  left: 0;
}
.single .entry-content ol > li::before {
  content: counter(item) ". ";
  counter-increment: item;
  color: var(--accent);
  position: absolute;
  left: 0;
}

/* ===============================
   medical-dictionary / Search / Section
=============================== */
.medical-dictionary-wrap {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
  color: #e8eaed;
  font-family: var(--font-sans);
}

.medical-dictionary-wrap .search-box {
  margin-bottom: 20px;
  text-align: center;
}

.medical-dictionary-wrap .search-box input {
  width: 100%;
  max-width: 400px;
  padding: 10px 15px;
  border-radius: 8px;
  background: #2c2c2c;
  color: #e8eaed;
  font-size: 1rem;
}

.medical-dictionary-wrap .search-box input:focus {
  outline: none;
  border-color: #58c4b6;
  background: #222222;
}

.medical-dictionary-wrap .hero-box {
  background: #2c2c2c;
  padding: 25px 20px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 25px;
}

.medical-dictionary-wrap .hero-box h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: #58c4b6;
  margin-bottom: 10px;
}

.medical-dictionary-wrap .hero-box p {
  color:  #e8eaed; 
  line-height: 1.5;
}

.medical-dictionary-wrap .index-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 25px;
}

.medical-dictionary-wrap .index-links a {
  padding: 8px 12px;
  background: #2c2c2c;
  color: #e8eaed; 
  border-radius: 6px;
  font-weight: 600;
}

.medical-dictionary-wrap .index-links a:hover,
.medical-dictionary-wrap .index-links a:focus {
  background:  #585858;
  color: #111;
}

.medical-dictionary-wrap .section h3.gb-text {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  border-bottom: 1px solid #2a2a2a;
  padding-bottom: 4px;
  color: #e8eaed;
}

.medical-dictionary-wrap .section ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.medical-dictionary-wrap .section ul li {
  flex: 1 1 180px;
  display: flex;
  justify-content: center;
}

.medical-dictionary-wrap .section ul li a {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px;
  background: #2c2c2c;
  border-radius: 8px;
  color: #e8eaed;
  font-weight: 600;
}

.medical-dictionary-wrap .section ul li a:hover {
  background: #585858;
  color: #111111;
}

/* ===============================
   Highlight Box
=============================== */
.highlight-box {
  background-color: var(--bg-main);
  color: #e2e2e2;
  font-size: 17px;
  padding: 10px 18px;
  border-radius: 12px;
  margin-bottom: 18px;
  border: 1px solid #2f2f2f;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);   
}

/* ===============================
   사이드바 제거
=============================== */
.sidebar, .site-sidebar { display: none; }
.content-area, .site-main {
  width: 100%;
  margin: 0 auto;
}

/* ===============================
   Back to Top Button
=============================== */
#hc-back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--bg-main);
  color: var(--contrast);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}
#hc-back-to-top:hover {
  background: var(--hover-bg);
  color: var(--hover-text);
}
#hc-back-to-top.show {
  opacity: 1;
  visibility: visible;
}


/* ===============================
   반응형 (모바일)
=============================== */
@media (max-width: 768px) {
  .home-hero { padding: 40px 15px; }
  .home-title { font-size: 1.9rem; }
  .home-menu-wrapper { flex-direction: column; align-items: center; }
  .post-list { grid-template-columns: 1fr; }

  .adsbygoogle {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  .content-area, .site-main, .entry-content {
    max-width: 100%;
    overflow-x: hidden;
    overflow: visible; /* 세로 스크롤은 body/html에서 처리 */
  }
}

html, body {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* iOS에서 부드러운 스크롤 */
  scroll-behavior: smooth;
}



