/*
Theme Name: GeneratePress Dark Optimized – TechOpinionsNet
Theme URI: https://techopinionsnet.com
Description: GeneratePress Child Theme – Full Dark Mode for TechOpinionsNet (AI 용어 사전 포함)
Author: TechOpinionsNet
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: #33ffcc;
  --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); }

/* ===============================
   Hero Section (page-id-7214)
=============================== */
.home-hero {
  position: relative;
  color: var(--text-color);
  text-align: center;
  padding: 100px 20px;
  margin: 0 auto;
  max-width: 1200px;
  width: 100%;
  overflow: visible;
  z-index: 1;
  pointer-events: auto;
}

/* Title */
.home-title {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-family: var(--font-sans, 'Segoe UI', sans-serif);
  font-weight: 700;
  color: var(--text-color);
  letter-spacing: 2px;
  margin-bottom: 16px;
  animation: fadeInUpScale 1.1s ease forwards;
}

.home-title span {
  color: var(--accent);
  text-shadow: 0 0 14px rgba(51,255,204,0.9), 0 0 28px rgba(51,255,204,0.5);
}

/* Sub Title */
.home-sub {
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: var(--sub-text);
  margin-top: 12px;
  opacity: 0.95;
  animation: fadeInUpScale 1.6s ease forwards;
}


/* ===============================
   메뉴 버튼
=============================== */
.home-menu-wrapper {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 32px;
  margin: 5px auto 60px;
  position: relative;
  z-index: 5;
}

.home-menu-btn {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(51,255,204,0.4);
  border-radius: 50%;
  backdrop-filter: blur(10px);
  transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-align: center;
  cursor: pointer;
  position: relative;
  box-shadow: inset 0 0 12px rgba(51,255,204,0.15);
  overflow: visible;
  pointer-events: none; /* 부모는 클릭 이벤트 제거 */
}

/* a 태그가 실제 클릭 영역을 담당 */
.home-menu-btn a {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 2;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* hover는 a를 기준으로 작동 */
.home-menu-btn:hover {
  background: rgba(51,255,204,0.18);
  border-color: var(--accent);
  transform: scale(1.12);
  box-shadow: 0 0 20px rgba(51,255,204,0.6);
}

.home-menu-btn:hover a {
  color: #eafff8;
  text-shadow: 0 0 8px rgba(51,255,204,0.7);
}

/* ===============================
   섹션 구조
=============================== */
.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;
}

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

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

.ai-dictionary-wrap .search-box input {
  width: 100%;
  max-width: 400px;
  padding: 10px 15px;
  border-radius: 8px;
  background: var(--base-2); /* 기존 #1f2735 → 통일된 base */
  border: 1px solid rgba(51,255,204,0.25);
  color: var(--text-color);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.ai-dictionary-wrap .search-box input:focus {
  outline: none;
  border-color: var(--accent);
  background: #1a1a1a; /* 기존보다 통일된 다크톤 */
}

.ai-dictionary-wrap .hero-box {
  background: var(--base-2);
  padding: 25px 20px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 25px;
  border: 1px solid rgba(51,255,204,0.25); /* accent 계열로 변경 */
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.ai-dictionary-wrap .hero-box h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 10px;
  text-shadow: 0 0 8px rgba(51,255,204,0.4); /* accent glow */
}

.ai-dictionary-wrap .hero-box p {
  color: var(--sub-text);
  line-height: 1.5;
}

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

.ai-dictionary-wrap .index-links a {
  padding: 8px 12px;
  background: var(--base-2);
  color: var(--text-color);
  border: 1px solid rgba(51,255,204,0.25);
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.25s ease;
}

.ai-dictionary-wrap .index-links a:hover,
.ai-dictionary-wrap .index-links a:focus {
  background: var(--accent);
  color: #0f172a;
}

.ai-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: var(--text-color);
}

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

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

.ai-dictionary-wrap .section ul li a {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px;
  background: var(--base-2);
  border: 1px solid rgba(51,255,204,0.2);
  border-radius: 8px;
  color: var(--text-color);
  font-weight: 600;
  transition: all 0.3s ease;
}

.ai-dictionary-wrap .section ul li a:hover {
  background: var(--accent);
  color: #0f172a;
  box-shadow: 0 0 12px rgba(51,255,204,0.4);
}

/* ===============================
   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);   
}

/* ===============================
   표 스타일 (다크모드 대응)
=============================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid rgba(255,255,255,0.15);
}

th, td {
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,0.15);
  text-align: left;
}

th {
  background-color: var(--hover-bg);
  color: #66ffd9;
  border: 1px solid rgba(51,255,204,0.3);
}

tr:nth-child(even) {
  background-color: #222;
}

tr:hover {
  background-color: var(--hover-bg);
}

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

/* ===============================
   Back to Top Button
=============================== */
#techopinionsnet-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;
}
#techopinionsnet-back-to-top:hover {
  background: var(--hover-bg);
  color: var(--hover-text);
}
#techopinionsnet-back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* ===============================
   반응형 (모바일)
=============================== */
@media (max-width: 768px) {
  .home-hero { padding: 80px 20px; }
  .home-title { font-size: 1.75rem; }
  .home-sub { font-size: 0.85rem; }
  .home-menu-wrapper { flex-direction: column; align-items: center; margin-bottom: 60px; }
  .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;
}