/*
Theme Name:  HallyuWords
Description: Korean dictionary theme for K-Pop & K-Drama fans
Template:    cocoon-master
Version:     2.0
*/

/* ===== VARIABLES ===== */
:root {
  --cr:   #FAF7F0;
  --cr2:  #F2EDE3;
  --ink:  #1C1917;
  --ink2: #44403C;
  --ink3: #78716C;
  --ac:   #E8372E;
  --ac2:  #FF6B5E;
  --bd:   #E7E2D9;
  --gold: #C9A84C;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: #FAF7F0; color: #44403C; font-family: Georgia, 'Times New Roman', serif; line-height: 1.75; }
a { text-decoration: none; }
img { max-width: 100%; }

/* ===== HEADER ===== */
.hw-header {
  background: #1C1917 !important;
  padding: 10px 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  border-bottom: 1px solid #2C2C2A !important;
}
.hw-logo { display: flex; align-items: baseline; gap: 5px; }
.logo-kr { font-size: 11px; color: #78716C; font-family: sans-serif; }
.logo-en { font-size: 18px; font-weight: 500; color: #FAF7F0; }
.logo-en em { font-style: normal; color: #FF6B5E; }
.hw-nav { display: flex; gap: 0; list-style: none; }
.hw-nav li a { color: #A8A29E; font-size: 12px; padding: 6px 12px; display: block; font-family: sans-serif; }
.hw-nav li a:hover, .hw-nav li.current a { color: #FAF7F0; }
.hw-search { display: flex; }
.hw-search input { padding: 6px 12px; border: 1px solid rgba(255,255,255,.15); border-right: none; background: rgba(255,255,255,.06); color: #FAF7F0; font-size: 12px; border-radius: 3px 0 0 3px; width: 120px; font-family: sans-serif; }
.hw-search input::placeholder { color: #5F5E5A; }
.hw-search button { padding: 6px 12px; background: #E8372E; color: #fff; border: none; font-size: 11px; font-weight: 500; border-radius: 0 3px 3px 0; cursor: pointer; font-family: sans-serif; text-transform: uppercase; letter-spacing: .04em; }

/* Admin bar adjustment */
.admin-bar .hw-header { top: 32px !important; }

/* ===== HERO ===== */
.hw-hero {
  background: #1C1917;
  padding: 48px 40px 40px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.hw-hero::before {
  content: '한';
  position: absolute;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 400px;
  color: rgba(255,255,255,.03);
  font-family: 'Malgun Gothic', sans-serif;
  pointer-events: none; line-height: 1;
}
.hero-eye {
  font-size: 11px; font-weight: 500; color: #E8372E;
  letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 16px; font-family: sans-serif;
  display: flex; align-items: center; justify-content: center; gap: 8px; position: relative;
}
.hero-eye::before, .hero-eye::after { content: ''; width: 24px; height: 1px; background: #E8372E; display: block; }
.hero-h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 500; color: #FAF7F0;
  line-height: 1.15; margin-bottom: 16px; position: relative;
  text-transform: uppercase; letter-spacing: .04em;
}
.hero-h1 em { font-style: normal; color: #C9A84C; display: block; }
.hero-sub {
  font-size: 16px; color: #78716C; line-height: 1.6;
  margin-bottom: 28px; font-family: sans-serif;
  max-width: 520px; margin-left: auto; margin-right: auto; position: relative;
}
.hero-search {
  display: flex; max-width: 480px; margin: 0 auto 20px;
  border: 1.5px solid rgba(255,255,255,.15); border-radius: 5px; overflow: hidden; position: relative;
}
.hero-search input {
  flex: 1; padding: 12px 16px; border: none;
  background: rgba(255,255,255,.07); color: #FAF7F0;
  font-size: 14px; outline: none; font-family: sans-serif;
}
.hero-search input::placeholder { color: #5F5E5A; }
.hero-search button {
  padding: 12px 20px; background: #E8372E; color: #fff;
  border: none; font-size: 12px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; cursor: pointer; font-family: sans-serif;
}
.hero-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; position: relative; }
.hero-tag {
  font-size: 11px; padding: 4px 12px;
  border: 1px solid rgba(255,255,255,.15); border-radius: 3px;
  color: #A8A29E; font-family: sans-serif; display: inline-block;
}

/* ===== STATS BAR ===== */
.hw-stats {
  background: #111;
  border-bottom: 1px solid #2C2C2A;
  display: flex; justify-content: space-around;
  padding: 14px 24px;
}
.stat { text-align: center; }
.stat-n { font-size: 20px; font-weight: 500; color: #ED93B1; display: block; font-family: sans-serif; }
.stat-l { font-size: 10px; color: #5F5E5A; text-transform: uppercase; letter-spacing: .08em; font-family: sans-serif; }

/* ===== AD BANNER ===== */
.hw-ad {
  background: #F2EDE3;
  border-bottom: 1px solid #E7E2D9;
  padding: 8px 24px;
  text-align: center;
  font-size: 10px; color: #78716C; font-family: sans-serif;
}

/* ===== SECTION HEADER ===== */
.sec-hdr {
  padding: 20px 24px 12px;
  display: flex; align-items: baseline; justify-content: space-between;
  border-top: 1.5px solid #1C1917;
}
.sec-hdr-t { font-size: 15px; font-weight: 500; color: #1C1917; }
.sec-hdr-a { font-size: 11px; color: #E8372E; text-transform: uppercase; letter-spacing: .06em; font-family: sans-serif; }

/* ===== WORD OF THE DAY ===== */
.hw-wotd {
  background: #1C1917;
  margin: 20px 24px;
  border-radius: 7px;
  padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  position: relative; overflow: hidden;
}
.hw-wotd::before {
  content: attr(data-hangul);
  position: absolute; right: -10px; bottom: -16px;
  font-size: 100px; font-weight: 500; color: rgba(255,255,255,.05);
  line-height: 1; pointer-events: none; font-family: 'Malgun Gothic', sans-serif;
}
.wotd-eye { font-size: 10px; font-weight: 500; color: #E8372E; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; font-family: sans-serif; }
.wotd-kr  { font-size: 36px; font-weight: 500; color: #FAF7F0; line-height: 1; margin-bottom: 4px; font-family: 'Malgun Gothic', sans-serif; }
.wotd-rom { font-size: 12px; color: #888780; font-style: italic; margin-bottom: 6px; font-family: sans-serif; }
.wotd-def { font-size: 13px; color: #D3D1C7; line-height: 1.5; font-family: sans-serif; }
.wotd-btn {
  padding: 9px 18px; background: #E8372E; color: #fff;
  border: none; border-radius: 3px; font-size: 12px;
  font-weight: 500; cursor: pointer; white-space: nowrap;
  font-family: sans-serif; display: inline-block;
}
.wotd-btn:hover { background: #FF6B5E; color: #fff; }

/* ===== WORD GRID ===== */
.wgrid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; border-bottom: 1.5px solid #1C1917;
}
@media (max-width: 768px) { .wgrid { grid-template-columns: repeat(2, 1fr); } }
.wcard {
  border-right: 1.5px solid #1C1917;
  border-bottom: 1.5px solid #1C1917;
  padding: 16px 18px;
  background: #FAF7F0;
  display: block; color: #44403C;
  transition: background .15s;
}
.wcard:nth-child(4n) { border-right: none; }
.wcard:hover { background: #EDE8DF; }
.wc-badge { font-size: 10px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 6px; display: block; font-family: sans-serif; }
.kpop-c   { color: #E8372E; }
.drama-c  { color: #185FA5; }
.food-c   { color: #854F0B; }
.basic-c  { color: #5F5E5A; }
.wc-kr  { font-size: 22px; font-weight: 500; color: #1C1917; line-height: 1; margin-bottom: 2px; font-family: 'Malgun Gothic', sans-serif; }
.wc-rom { font-size: 11px; color: #78716C; font-style: italic; margin-bottom: 4px; font-family: sans-serif; }
.wc-en  { font-size: 12px; color: #44403C; font-family: sans-serif; }

/* ===== CATEGORY GRID ===== */
.cgrid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0; border-bottom: 1.5px solid #1C1917;
}
@media (max-width: 600px) { .cgrid { grid-template-columns: repeat(2, 1fr); } }
.ccard {
  border-right: 1.5px solid #1C1917;
  border-bottom: 1.5px solid #1C1917;
  padding: 20px;
  background: #FAF7F0;
  display: block; color: #1C1917;
  transition: background .15s;
}
.ccard:nth-child(3n) { border-right: none; }
.ccard:hover { background: #EDE8DF; }
.cc-num  { font-size: 10px; color: #78716C; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; font-family: sans-serif; }
.cc-name { font-size: 15px; font-weight: 500; color: #1C1917; margin-bottom: 4px; }
.cc-desc { font-size: 12px; color: #78716C; font-family: sans-serif; }
.cc-tag  { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 2px; font-weight: 500; font-family: sans-serif; margin-top: 8px; }
.t-kpop   { background: #FBEAF0; color: #72243E; }
.t-drama  { background: #E6F1FB; color: #0C447C; }
.t-travel { background: #E1F5EE; color: #085041; }
.t-gram   { background: #EEEDFE; color: #3C3489; }
.t-food   { background: #FAEEDA; color: #633806; }
.t-basic  { background: #F1EFE8; color: #444441; }

/* ===== SINGLE — BREADCRUMB ===== */
.hw-bc { font-size: 11px; color: #78716C; padding: 10px 24px; border-bottom: 1px solid #E7E2D9; font-family: sans-serif; }
.hw-bc a { color: #78716C; }
.hw-bc a:hover { color: #E8372E; }
.hw-bc span { color: #1C1917; }

/* ===== SINGLE — LAYOUT ===== */
.content-sidebar { display: grid; grid-template-columns: 1fr 240px; border-top: 1.5px solid #1C1917; }
@media (max-width: 768px) { .content-sidebar { grid-template-columns: 1fr; } }
.main-col { padding: 0; }
.side-col { background: #F2EDE3; border-left: 1.5px solid #1C1917; padding: 16px; }
@media (max-width: 768px) { .side-col { display: none; } }

/* ===== SINGLE — WORD HERO ===== */
.word-hero {
  background: #1C1917;
  margin: 16px;
  border-radius: 7px;
  padding: 20px 24px;
  position: relative; overflow: hidden;
}
.word-hero::before {
  content: attr(data-hangul);
  position: absolute; right: -10px; top: -16px;
  font-size: 120px; color: rgba(232,55,46,.07);
  font-family: 'Malgun Gothic', sans-serif;
  line-height: 1; pointer-events: none;
}
.wh-issue { font-size: 10px; font-weight: 500; color: #E8372E; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px; font-family: sans-serif; }
.wh-kr    { font-size: 48px; font-weight: 500; color: #FAF7F0; line-height: 1; margin-bottom: 4px; font-family: 'Malgun Gothic', sans-serif; }
.wh-rom   { font-size: 14px; color: #888780; font-style: italic; margin-bottom: 12px; font-family: sans-serif; }
.wh-tags  { display: flex; gap: 6px; flex-wrap: wrap; }
.wh-tag   { font-size: 10px; padding: 3px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 2px; color: #D3D1C7; font-family: sans-serif; }
.wh-tag-ac { border-color: #E8372E; color: #FF6B5E; }

/* ===== SINGLE — ENTRY BODY ===== */
.entry-body { padding: 0 16px 16px; }
.def-block {
  border: 1px solid #E7E2D9;
  border-left: 3px solid #E8372E;
  border-radius: 0 5px 5px 0;
  padding: 14px 16px; margin-bottom: 12px;
}
.def-lbl {
  font-size: 10px; font-weight: 500; color: #78716C;
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 6px; font-family: sans-serif;
  display: flex; align-items: center; gap: 6px;
}
.def-lbl::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #E8372E; display: inline-block; }
.def-text { font-size: 14px; color: #44403C; line-height: 1.7; font-family: sans-serif; }

.ex-lbl {
  font-size: 10px; font-weight: 500; color: #78716C;
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 10px; font-family: sans-serif;
  display: flex; align-items: center; gap: 8px;
}
.ex-lbl::after { content: ''; flex: 1; height: 1px; background: #E7E2D9; }
.ex-card { margin-bottom: 10px; border-radius: 3px; overflow: hidden; border: 1px solid #E7E2D9; }
.ex-kr  { background: #1C1917; padding: 10px 14px; font-size: 15px; color: #FAF7F0; font-family: 'Malgun Gothic', sans-serif; }
.ex-bot { padding: 8px 14px; background: #F2EDE3; }
.ex-rom { font-size: 11px; color: #78716C; font-style: italic; font-family: sans-serif; }
.ex-en  { font-size: 13px; color: #44403C; font-family: sans-serif; }

.ad-mid {
  background: #F2EDE3; border: 1px dashed #E7E2D9;
  padding: 8px; text-align: center;
  font-size: 10px; color: #78716C; margin: 12px 0; border-radius: 3px; font-family: sans-serif;
}
.rel-lbl {
  font-size: 10px; font-weight: 500; color: #78716C;
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 10px; font-family: sans-serif;
  display: flex; align-items: center; gap: 8px;
}
.rel-lbl::after { content: ''; flex: 1; height: 1px; background: #E7E2D9; }
.rel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rel-card { border: 1px solid #E7E2D9; border-radius: 3px; padding: 10px 12px; display: block; color: #44403C; }
.rel-card:hover { background: #F2EDE3; }
.rel-kr { font-size: 15px; font-weight: 500; color: #1C1917; margin-bottom: 2px; font-family: 'Malgun Gothic', sans-serif; }
.rel-en { font-size: 11px; color: #78716C; font-family: sans-serif; }

/* ===== SIDEBAR ===== */
.side-ad { background: #E7E2D9; border: 1px dashed #C7C0B4; height: 160px; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #78716C; border-radius: 3px; margin-bottom: 14px; text-align: center; line-height: 1.6; font-family: sans-serif; }
.side-title { font-size: 10px; font-weight: 500; color: #78716C; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1.5px solid #1C1917; padding-bottom: 5px; margin-bottom: 8px; font-family: sans-serif; }
.sw { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; border-bottom: 1px solid #E7E2D9; font-size: 13px; color: #44403C; }
.sw:last-of-type { border-bottom: none; }
.sw:hover { color: #E8372E; }
.sw-kr { font-size: 15px; font-weight: 500; color: #1C1917; font-family: 'Malgun Gothic', sans-serif; }
.sw-en { font-size: 11px; color: #78716C; font-family: sans-serif; }

/* ===== ARCHIVE ===== */
.archive-hero { background: #1C1917; padding: 48px 40px 40px; }
.archive-num  { color: #C9A84C; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; font-family: sans-serif; }
.archive-title { color: #FAF7F0; font-size: clamp(28px, 4vw, 44px); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.archive-desc { color: rgba(255,255,255,.5); margin-top: 10px; font-size: 15px; font-family: sans-serif; }

/* ===== FOOTER ===== */
.hw-footer {
  background: #1C1917;
  border-top: 1.5px solid #2C2C2A;
  padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; font-family: sans-serif;
  margin-top: 0;
}
.flogo { font-size: 16px; font-weight: 500; color: #FAF7F0; }
.flogo em { font-style: normal; color: #FF6B5E; }
.flinks { display: flex; gap: 16px; }
.flinks a { color: #A8A29E; }
.flinks a:hover { color: #FAF7F0; }
.fcopy { font-size: 11px; color: #5F5E5A; }

/* ===== PAGINATION ===== */
.hw-pagination { display: flex; justify-content: center; gap: 4px; padding: 32px 24px; }
.hw-pagination a, .hw-pagination span { display: inline-block; padding: 8px 14px; border: 1px solid #E7E2D9; font-size: 13px; color: #44403C; font-family: sans-serif; }
.hw-pagination .current { background: #1C1917; color: #fff; border-color: #1C1917; }
.hw-pagination a:hover { border-color: #E8372E; color: #E8372E; }

/* ===== CATEGORY PAGE ===== */

/* --- Tabs --- */
.cat-tabs {
  background: #F2EDE3;
  border-bottom: 1.5px solid #1C1917;
  display: flex;
  overflow-x: auto;
}
.ct {
  padding: 10px 16px;
  font-size: 12px;
  color: #78716C;
  white-space: nowrap;
  font-family: sans-serif;
  border-bottom: 2px solid transparent;
  display: block;
  flex-shrink: 0;
  transition: color .15s;
}
.ct:hover { color: #1C1917; }
.ct.on    { color: #1C1917; font-weight: 500; border-bottom-color: #E8372E; }

/* --- Category Hero --- */
.cat-hero {
  background: #1C1917;
  padding: 28px 28px 22px;
  position: relative;
  overflow: hidden;
}
.cat-hero::before {
  content: attr(data-bg);
  position: absolute;
  right: -8px; top: -16px;
  font-size: 160px;
  font-weight: 500;
  color: rgba(255,255,255,.04);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  font-family: 'Malgun Gothic', sans-serif;
}
.ch-eye {
  font-size: 10px; font-weight: 500;
  color: #E8372E;
  letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 8px; font-family: sans-serif;
  display: flex; align-items: center; gap: 6px;
}
.ch-eye::before { content: ''; width: 16px; height: 1.5px; background: #E8372E; display: block; }
.ch-title { font-size: 20px; font-weight: 500; color: #FAF7F0; margin-bottom: 4px; }
.ch-sub   { font-size: 12px; color: #78716C; line-height: 1.5; margin-bottom: 14px; font-family: sans-serif; }
.ch-filters { display: flex; gap: 5px; flex-wrap: wrap; }
.cf {
  font-size: 11px; padding: 3px 10px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 3px; color: #A8A29E;
  font-family: sans-serif; background: transparent;
}
.cf.on { border-color: #FF6B5E; color: #FF6B5E; }

/* --- Layout --- */
.cat-wrap {
  display: grid;
  grid-template-columns: 1fr 220px;
  border-top: 1.5px solid #1C1917;
}
@media (max-width: 768px) { .cat-wrap { grid-template-columns: 1fr; } }
.cat-main    { min-width: 0; }
.cat-sidebar {
  background: #F2EDE3;
  border-left: 1.5px solid #1C1917;
  padding: 14px;
}
@media (max-width: 768px) { .cat-sidebar { display: none; } }

/* --- Ad bar --- */
.cat-ad {
  background: #F2EDE3;
  border-bottom: 1px solid #E7E2D9;
  padding: 8px 18px;
  text-align: center;
  font-size: 10px; color: #78716C; font-family: sans-serif;
  min-height: 36px;
}

/* --- Sort bar --- */
.cat-sort {
  padding: 9px 18px;
  border-bottom: 1.5px solid #1C1917;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: #78716C; font-family: sans-serif;
}
.cat-sort strong { color: #1C1917; }
.sort-btns { display: flex; gap: 4px; }
.sb {
  font-size: 11px; padding: 2px 9px;
  border: 1px solid #E7E2D9; border-radius: 2px;
  color: #78716C; font-family: sans-serif;
  background: transparent; display: inline-block;
}
.sb:hover { border-color: #1C1917; color: #1C1917; }
.sb.on    { border-color: #1C1917; color: #1C1917; background: transparent; }

/* --- Word card background character --- */
.wcard { position: relative; overflow: hidden; }
.wc-bg {
  position: absolute; right: -3px; bottom: -8px;
  font-size: 40px; font-weight: 500;
  color: rgba(28,25,23,.05);
  line-height: 1; pointer-events: none;
  font-family: 'Malgun Gothic', sans-serif;
}

/* --- Sidebar --- */
.side-cat {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #E7E2D9;
  font-size: 12px; color: #44403C; font-family: sans-serif;
}
.side-cat:last-of-type { border-bottom: none; }
.side-cat:hover { color: #E8372E; }
.side-cat.on    { color: #E8372E; font-weight: 500; }
.side-cat-n     { font-size: 10px; color: #78716C; }
.side-tags      { margin-top: 6px; }
.side-tag {
  display: inline-block; font-size: 10px;
  padding: 2px 8px;
  border: 1px solid #E7E2D9; border-radius: 2px;
  color: #78716C; margin: 2px 2px 0 0; font-family: sans-serif;
}
.side-tag:hover { border-color: #E8372E; color: #E8372E; }

/* --- Empty state --- */
.cat-empty {
  padding: 48px 24px; text-align: center;
  color: #78716C; font-family: sans-serif; font-size: 14px;
}

/* ===== PAGE TEMPLATE (Privacy Policy / About / Static Pages) ===== */
.page-wrap {
  max-width: 760px;
  margin: 48px auto;
  padding: 0 24px 64px;
}
.page-title {
  font-size: 28px;
  font-weight: 500;
  color: #1C1917;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 2px solid #E7E2D9;
  font-family: Georgia, serif;
}
.page-body {
  font-family: Georgia, serif;
  font-size: 15px;
  line-height: 1.85;
  color: #44403C;
}
.page-body h2 { font-size: 22px; color: #1C1917; margin: 36px 0 12px; font-family: Georgia, serif; }
.page-body h3 { font-size: 16px; color: #1C1917; margin: 24px 0 8px; font-weight: 600; font-family: sans-serif; }
.page-body p  { margin-bottom: 14px; }
.page-body ul { padding-left: 24px; margin-bottom: 14px; }
.page-body li { margin-bottom: 6px; }
.page-body a  { color: #E8372E; text-decoration: underline; }
.page-body a:hover { color: #C02820; }
.page-body strong { color: #1C1917; }
.page-last-updated {
  font-size: 12px; color: #78716C; font-family: sans-serif;
  margin-bottom: 28px;
}

/* ===== SCREEN READER ===== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
