/* ── Katha Reference Page ── */
/* Uses TAC design system variables from variables.css */
/* All kh- prefixed classes for katha-specific interactive components */

/* GP width override */
.page-template-page-katha .site-content,
.page-template-page-katha .content-area,
.page-template-page-katha .entry-content {
  max-width: 100%;
  width: 100%;
  padding: 0;
  margin: 0;
}

/* ── HERO (homepage-style split panel) ── */
.katha-hero-outer { background: #0A0806; overflow: hidden; }
.katha-hero {
  display: grid;
  grid-template-columns: 40% 60%;
  height: 480px;
  width: 100%;
  background: #0A0806;
  overflow: hidden;
}
.katha-hero-img {
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(78,55,28,.25) 0%, transparent 70%);
}
.katha-hero-icon-wrap {
  width: 200px;
  height: 200px;
  animation: hero-float 4s ease-in-out infinite;
}
.katha-hero-icon-wrap svg {
  width: 100%;
  height: 100%;
}
@keyframes hero-float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.katha-hero-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2;
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(8px);
  border: .5px solid rgba(255,255,255,.15);
  border-radius: 6px;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(255,255,255,.80);
  font-family: var(--font-b);
}
.katha-hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-bright, #D4AF37);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(212,175,55,.25);
}
.katha-hero-txt {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px,4vw,56px) clamp(48px,5vw,80px) clamp(36px,4vw,56px) clamp(72px,7vw,100px);
  background: #0C0A08;
}
.katha-hero-txt .hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: rgba(184,134,11,.70);
  margin-bottom: 16px;
}
.katha-hero-txt .hero-eyebrow-line {
  width: 22px;
  height: .5px;
  background: rgba(184,134,11,.50);
  flex-shrink: 0;
}
.katha-hero-txt .hero-h1 {
  font-family: var(--font-d);
  font-size: clamp(32px,3.8vw,54px);
  font-weight: 400;
  line-height: 1.12;
  color: #F5EDD8;
  margin-bottom: 8px;
  letter-spacing: -.02em;
}
.katha-hero-txt .hero-h1 em {
  color: #C4A45A;
  font-style: italic;
}
.kh-hero-th {
  font-size: 15px;
  color: rgba(184,134,11,.55);
  letter-spacing: .04em;
  display: block;
  margin-bottom: 14px;
}
.katha-hero-txt .hero-sub {
  font-size: clamp(13px,1.2vw,15px);
  color: rgba(255,255,255,.46);
  line-height: 1.70;
  margin-bottom: 28px;
  max-width: 400px;
}
.katha-hero-txt .hero-stats {
  display: flex;
  gap: 28px;
}
.katha-hero-txt .hero-stat-n {
  font-family: var(--font-d);
  font-size: 22px;
  font-weight: 400;
  color: #E8DBBF;
  line-height: 1;
}
.katha-hero-txt .hero-stat-l {
  font-size: 10.5px;
  color: rgba(255,255,255,.32);
  margin-top: 4px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── BODY ── */
.kh-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 36px 24px 60px;
}
.kh-sh { margin-bottom: 16px; }
.kh-sh h2 {
  font-family: var(--font-d);
  font-size: 20px;
  font-weight: 400;
  color: var(--t1);
}
.kh-sh-sub {
  font-size: 12px;
  color: var(--t3);
  margin-top: 3px;
}

/* ── INTRO (SEO content) ── */
.kh-intro {
  margin-bottom: 36px;
}
.kh-intro p {
  font-size: 14px;
  color: var(--t2);
  line-height: 1.8;
  margin-bottom: 12px;
}

/* ── CATEGORY GRID ── */
.kh-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.kh-cat-card {
  background: var(--bg0);
  border: 1px solid var(--br);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all .22s;
  user-select: none;
}
.kh-cat-card:hover,
.kh-cat-card.active {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
}
.kh-cat-card.active {
  background: var(--gold-l);
}
.kh-cat-ico {
  width: 40px;
  height: 40px;
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
}
.kh-cat-ico svg {
  width: 20px;
  height: 20px;
  stroke: var(--gold-dim);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.kh-cat-en {
  font-family: var(--font-d);
  font-size: 14px;
  color: var(--t1);
  line-height: 1.25;
}
.kh-cat-th {
  font-size: 11px;
  color: var(--gold-dim);
}
.kh-cat-desc {
  font-size: 11px;
  color: var(--t3);
  line-height: 1.5;
  flex: 1;
}
.kh-cat-cnt {
  font-size: 10px;
  font-weight: 600;
  color: var(--t3);
  background: var(--bg2);
  border-radius: 20px;
  padding: 2px 7px;
  align-self: flex-start;
  margin-top: auto;
}

/* ── PANELS ── */
.kh-panel {
  display: none;
  background: var(--bg0);
  border: 1px solid var(--br);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 28px;
}
.kh-panel.open { display: block; }
.kh-panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 8px;
  flex-wrap: wrap;
}
.kh-panel-title {
  font-family: var(--font-d);
  font-size: 17px;
  color: var(--t1);
}
.kh-pclose {
  font-size: 12px;
  color: var(--gold-dim);
  cursor: pointer;
  font-weight: 600;
  background: none;
  border: 1px solid var(--br);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: var(--font-b);
  transition: all .15s;
}
.kh-pclose:hover {
  background: var(--gold-l);
  border-color: var(--gold-b);
}

/* ── KATHA CARD GRID ── */
.kh-kg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.kh-kc {
  background: var(--bg1);
  border: 1px solid var(--br);
  border-radius: var(--r);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  cursor: pointer;
  transition: all .18s;
}
.kh-kc:hover,
.kh-kc.active {
  border-color: var(--gold);
  background: var(--gold-l);
}
.kh-kc.active {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}
.kh-kc-id {
  font-size: 9px;
  font-weight: 700;
  color: var(--t3);
  letter-spacing: .1em;
}
.kh-kc-th {
  font-size: 15px;
  color: var(--t1);
  line-height: 1.3;
}
.kh-kc-en {
  font-size: 11px;
  color: var(--t3);
}
.kh-kc-pu {
  font-size: 11px;
  color: var(--t2);
  line-height: 1.5;
  border-top: 1px solid var(--br);
  padding-top: 7px;
}
.kh-kc-ft {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.kh-kc-re {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-dim);
  background: var(--gold-l);
  border-radius: 20px;
  padding: 2px 7px;
}

/* ── KATHA DETAIL EXPAND ── */
.kh-detail {
  display: none;
  grid-column: 1 / -1;
  background: var(--bg0);
  border: 1.5px solid var(--gold);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  padding: 22px;
  margin-top: -10px;
}
.kh-detail.open {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 20px;
}
.kh-dtx {
  font-size: clamp(18px, 3vw, 26px);
  color: var(--t1);
  line-height: 1.8;
  margin-bottom: 6px;
  white-space: pre-wrap;
}
.kh-drm {
  font-size: 13px;
  color: var(--t3);
  font-style: italic;
  font-family: var(--font-i);
  line-height: 1.7;
  margin-bottom: 10px;
}
.kh-dhr {
  border: none;
  border-top: 1px solid var(--bg2);
  margin: 10px 0;
}
.kh-dpu {
  font-size: 13px;
  color: var(--t2);
  line-height: 1.65;
  margin-bottom: 14px;
}

/* ── ACTION BUTTONS ── */
.kh-dac {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.kh-dre, .kh-apb, .kh-cpb, .kh-dcls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-b);
  white-space: nowrap;
  transition: all .16s;
  border: 1px solid var(--br);
  background: var(--bg1);
  color: var(--t2);
  vertical-align: middle;
}
.kh-dre {
  background: var(--gold-l);
  border-color: var(--gold-b);
  color: var(--gold-dim);
  cursor: default;
}
.kh-dre svg, .kh-apb svg, .kh-cpb svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.kh-apb:hover {
  background: var(--gold-l);
  border-color: var(--gold-b);
  color: var(--gold-dim);
}
.kh-apb.playing {
  background: var(--gold-l);
  border-color: var(--gold);
  color: var(--gold-dim);
}
.kh-cpb:hover {
  background: var(--gold-l);
  border-color: var(--gold-b);
  color: var(--gold-dim);
}
.kh-cpb.ok {
  background: #F0FDF4;
  border-color: #BBF7D0;
  color: #15803D;
}

/* ── DETAIL SIDEBAR ── */
.kh-dsb {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kh-dlbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--t3);
  margin-bottom: 5px;
}
.kh-dmk {
  background: var(--bg1);
  border: 1px solid var(--br);
  border-radius: var(--r);
  padding: 11px 13px;
}
.kh-dmkn {
  font-size: 12px;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 2px;
}
.kh-dmkt {
  font-size: 11px;
  color: var(--t3);
}
.kh-dtags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.kh-dtag {
  font-size: 10px;
  color: var(--t2);
  background: var(--bg2);
  border-radius: 20px;
  padding: 2px 8px;
}
.kh-dcls {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-dim);
  cursor: pointer;
  background: none;
  border: 1px solid var(--br);
  border-radius: 6px;
  padding: 5px 10px;
  font-family: var(--font-b);
  transition: all .15s;
  margin-top: auto;
  align-self: flex-start;
}
.kh-dcls:hover {
  background: var(--gold-l);
}

/* ── PILLS (Amulet Type Filter) ── */
.kh-sbox {
  background: var(--bg0);
  border-radius: var(--r-lg);
  border: 1px solid var(--br);
  padding: 20px;
  margin-bottom: 28px;
}
.kh-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.kh-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg1);
  border: 1px solid var(--br);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--t2);
  cursor: pointer;
  transition: all .16s;
}
.kh-pill:hover,
.kh-pill.active {
  background: var(--gold-l);
  border-color: var(--gold);
  color: var(--gold-dim);
}
.kh-pill-th {
  font-size: 10px;
  color: var(--t3);
}

/* ── MONK GRID ── */
.kh-mgrid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.kh-mc {
  background: var(--bg0);
  border: 1px solid var(--br);
  border-radius: var(--r);
  padding: 10px 12px;
  cursor: pointer;
  transition: all .16s;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.kh-mc:hover {
  border-color: var(--gold);
  background: var(--gold-l);
}
.kh-mc-ico {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 5px;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kh-mc-ico svg {
  width: 14px;
  height: 14px;
  stroke: var(--gold-dim);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.kh-mn {
  font-size: 11px;
  font-weight: 600;
  color: var(--t1);
  line-height: 1.3;
  margin-bottom: 1px;
}
.kh-mt {
  font-size: 10px;
  color: var(--t3);
  line-height: 1.3;
}

/* ── NOTE & DISCLAIMER ── */
.kh-note {
  background: var(--bg1);
  border: 1px solid var(--br);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  font-size: 11.5px;
  color: var(--t3);
  line-height: 1.7;
  margin-top: 32px;
}
.kh-note strong {
  color: var(--t1);
}
.kh-disclaimer {
  background: var(--bg1);
  border-radius: var(--r);
  border: 1px solid var(--br);
  color: var(--t3);
  font-size: 11px;
  line-height: 1.65;
  margin-top: 12px;
  padding: 14px 20px;
}
.kh-disclaimer strong {
  color: var(--t2);
}


/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .katha-hero { grid-template-columns: 1fr; height: auto; }
  .katha-hero-img { height: 220px; }
  .katha-hero-icon-wrap { width: 140px; height: 140px; }
  .katha-hero-txt { padding: 36px 24px 40px; }
  .kh-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .kh-kg { grid-template-columns: repeat(2, 1fr); }
  .kh-mgrid { grid-template-columns: repeat(3, 1fr); }
  .kh-detail.open { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .katha-hero-img { height: 180px; }
  .katha-hero-icon-wrap { width: 110px; height: 110px; }
  .katha-hero-txt { padding: 28px 16px 32px; }
  .katha-hero-txt .hero-stats { gap: 20px; flex-wrap: wrap; }
  .kh-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .kh-kg { grid-template-columns: 1fr; }
  .kh-mgrid { grid-template-columns: repeat(2, 1fr); }
  .kh-body { padding: 24px 16px 40px; }
}
@media (max-width: 480px) {
  .kh-cat-grid { grid-template-columns: 1fr; }
  .kh-mgrid { grid-template-columns: repeat(2, 1fr); }
}
