/*
Theme Name: EveryInfoBox
Author: EveryInfoBox
Description: 노란 포인트와 카드형 본문을 사용하는 한국어 정보 블로그 테마.
Version: 0.3.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: everyinfobox
*/

:root {
  --eib-ink: #202124;
  --eib-muted: #70737a;
  --eib-paper: #f6f6f6;
  --eib-card: #ffffff;
  --eib-line: #e7e7e7;
  --eib-primary: #0f766e;
  --eib-primary-dark: #164e4a;
  --eib-primary-soft: #e6f4f1;
  --eib-yellow: #ffe500;
  --eib-yellow-soft: #fff9c8;
  --eib-green: #36d799;
  --eib-hero: #164e4a;
  --eib-dark: #202020;
  --eib-radius: 18px;
  --eib-shadow: 0 10px 34px rgba(20, 20, 20, 0.07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--eib-paper);
  color: var(--eib-ink);
  font-family: Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

a { text-underline-offset: 0.18em; }
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--eib-primary);
  outline-offset: 3px;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus {
  clip: auto !important;
  width: auto;
  height: auto;
  top: 12px;
  left: 12px;
  z-index: 100000;
  padding: 12px 16px;
  background: #fff;
  color: #000;
  border-radius: 8px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--eib-line);
  background: #fff;
}
.site-header__brand-row {
  min-height: 86px;
  gap: 28px;
}
.brand-title {
  margin: 0;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(23px, 2.4vw, 30px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.045em;
}
.brand-title a { text-decoration: none; }
.header-search { width: 240px; margin: 0 !important; }
.header-search .wp-block-search__inside-wrapper {
  min-height: 40px;
  padding: 0 4px 0 14px;
  border: 1px solid #e4e4e4;
  border-radius: 999px;
  background: #fff;
}
.header-search .wp-block-search__input {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
}
.header-search .wp-block-search__button {
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 7px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #555;
}
.site-nav-row {
  min-height: 56px;
  border-top: 1px solid #f1f1f1;
}
.primary-nav { font-size: 14px; font-weight: 650; }
.primary-nav a { text-decoration: none; }
.primary-nav a:hover { color: var(--eib-primary); }
.wp-block-navigation__responsive-container.is-menu-open {
  padding: 28px;
  background: #fff;
}

/* Shared title band */
.content-header,
.home-hero {
  padding: clamp(72px, 8vw, 112px) 0;
  background: var(--eib-hero);
  color: #fff;
}
.content-header .taxonomy-category,
.content-header .wp-block-post-terms,
.content-header .section-kicker {
  margin: 0 0 22px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.content-header .taxonomy-category a,
.content-header .wp-block-post-terms a { color: #fff; text-decoration: none; }
.content-header h1,
.content-header .wp-block-query-title,
.home-hero h1 {
  max-width: 900px;
  margin: 0;
  color: #fff;
  font-size: clamp(36px, 4.4vw, 54px);
  line-height: 1.28;
  letter-spacing: -0.055em;
  font-weight: 500;
}
.content-header .wp-block-post-excerpt,
.archive-description,
.hero-description {
  max-width: 740px;
  margin: 22px 0 0;
  color: rgba(255,255,255,.86);
  font-size: 17px;
  line-height: 1.75;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 30px;
  color: rgba(255,255,255,.82);
  font-size: 13px;
}

/* Main two-column blog layout */
.post-body-wrap,
.blog-index-wrap { padding: 74px 0 100px; }
.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(220px, 1fr);
  align-items: start;
  gap: 72px;
  width: min(1080px, calc(100% - 40px));
  max-width: 1080px;
  margin-inline: auto;
}
.article-column,
.index-column { min-width: 0; }
.post-content {
  counter-reset: article-section;
  max-width: none;
  margin: 0;
  font-size: 17px;
  line-height: 1.92;
  letter-spacing: -0.015em;
}
.post-content > * { margin-top: 0; margin-bottom: 1.5em; }
.post-content a { color: var(--eib-primary); font-weight: 700; }
.post-content img { max-width: 100%; height: auto; border-radius: 14px; }

/* Reference-style article intro */
.post-content > .info-box:first-child {
  position: relative;
  overflow: hidden;
  min-height: 270px;
  padding: 48px 42px;
  border: 0;
  border-radius: var(--eib-radius);
  background: var(--eib-dark);
  color: #fff;
  box-shadow: var(--eib-shadow);
  font-size: 21px;
  line-height: 1.7;
}
.post-content > .info-box:first-child::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -92px;
  top: -78px;
  border-radius: 50%;
  background: rgba(255,229,0,.14);
}
.post-content > .info-box:first-child::before {
  content: "핵심 요약";
  display: table;
  margin-bottom: 24px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--eib-yellow);
  color: #242424;
  font-size: 12px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: .03em;
}
.post-content > .info-box:first-child strong { color: var(--eib-yellow); }
.post-content > .info-box:first-child + p {
  margin: 34px 0;
  padding: 30px 32px;
  border-left: 5px solid #222;
  border-radius: 14px;
  background: var(--eib-yellow);
  color: #292929;
  font-weight: 650;
  line-height: 1.95;
}

.article-toc {
  margin: 0 0 34px;
  padding: 26px 28px;
  border: 1px solid #eadb30;
  border-radius: 14px;
  background: var(--eib-yellow-soft);
}
.article-toc__title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  font-size: 17px;
  font-weight: 850;
}
.article-toc__title::before { content: "☰"; font-size: 14px; }
.article-toc ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}
.article-toc a { color: #3d3d3d; text-decoration: none; font-size: 15px; }
.article-toc a:hover { text-decoration: underline; }

.eib-section-card {
  counter-increment: article-section;
  margin: 0 0 26px;
  padding: 30px 28px 32px;
  border: 1px solid #eeeeee;
  border-radius: var(--eib-radius);
  background: #fff;
  box-shadow: var(--eib-shadow);
}
.eib-section-card > :last-child { margin-bottom: 0; }
.eib-section-card h2 {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 24px;
  padding: 0 0 17px;
  border-bottom: 2px solid var(--eib-yellow);
  font-size: 21px;
  line-height: 1.45;
  letter-spacing: -0.035em;
  font-weight: 850;
}
.eib-section-card h2::before {
  content: counter(article-section);
  display: inline-grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--eib-yellow);
  color: #222;
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
}
.eib-section-card h3 {
  margin: 1.65em 0 .7em;
  font-size: 19px;
  letter-spacing: -0.025em;
}
.eib-section-card p { margin: 0 0 1.35em; }
.eib-section-card ul,
.eib-section-card ol { padding-left: 1.4em; }
.eib-section-card li { margin-bottom: .65em; }
.post-content blockquote {
  margin: 1.6em 0;
  padding: 22px 24px;
  border: 1px solid #eadb30;
  border-radius: 12px;
  background: var(--eib-yellow-soft);
}
.post-content blockquote p { margin: 0; }
.post-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.post-content th,
.post-content td { padding: 13px; border: 1px solid var(--eib-line); text-align: left; vertical-align: top; }
.post-content th { background: #f3f3f3; }
.eib-seat-photo { margin: 26px 0 30px; }
.eib-seat-photo img { display: block; width: 100%; height: auto; border: 1px solid var(--eib-line); border-radius: 12px; }
.eib-seat-photo figcaption { margin-top: 9px; color: var(--eib-muted); font-size: 12px; line-height: 1.6; }
.eib-seatmap-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.eib-seatmap-legend { margin-bottom: 4px; }
.eib-seatmap-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}
.eib-seatmap-legend span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; }
.eib-seatmap-legend .is-immersive::before { background: #ffb020; }
.eib-seatmap-legend .is-best::before { background: #12dcaa; }
.eib-seatmap-legend .is-comfort::before { background: #74b9ff; }
.eib-related { margin: 0; padding-left: 20px; }
.eib-related li { margin-bottom: 10px; }
.eib-related a { font-weight: 800; }
.eib-price-cell { display: block; }
.eib-price-cell small {
  display: block;
  margin-top: 3px;
  color: var(--eib-muted);
  font-size: 12px;
  font-weight: 700;
}
.eib-compare-table th:first-child { width: 22%; }
.source-note {
  padding: 20px 22px;
  border: 1px solid #dddddd;
  border-radius: 12px;
  background: #fafafa;
  color: var(--eib-muted);
  font-size: 14px;
}
.post-footer-nav {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--eib-line);
}
.post-footer-nav .wp-block-post-navigation-link { margin-bottom: 12px; font-weight: 750; }

/* Sidebar */
.blog-sidebar { min-width: 0; }
.sidebar-inner {
  position: sticky;
  top: 28px;
  font-size: 14px;
}
.sidebar-section {
  margin-bottom: 34px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--eib-line);
}
.sidebar-title {
  margin: 0 0 17px;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: -0.02em;
}
.sidebar-search { margin: 0 0 34px !important; }
.sidebar-search .wp-block-search__inside-wrapper {
  min-height: 43px;
  border: 1px solid #dddddd;
  border-radius: 8px;
  background: #fff;
}
.sidebar-search .wp-block-search__input { min-width: 0; border: 0; font-size: 13px; }
.sidebar-search .wp-block-search__button {
  margin: 4px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: var(--eib-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.sidebar-categories,
.sidebar-categories ul,
.sidebar-posts .wp-block-post-template { margin: 0; padding: 0; list-style: none; }
.sidebar-categories li { margin: 0 0 11px; }
.sidebar-categories a { color: #5e5e5e; text-decoration: none; }
.sidebar-categories a:hover { color: #111; }
.sidebar-posts .wp-block-post { margin: 0 0 16px; }
.sidebar-posts .wp-block-post-title { margin: 0 0 4px; font-size: 14px; line-height: 1.5; }
.sidebar-posts .wp-block-post-title a { text-decoration: none; }
.sidebar-posts .wp-block-post-date { color: #969696; font-size: 12px; }
.sidebar-note {
  padding: 18px;
  border-radius: 10px;
  background: #fff;
  color: #666;
  font-size: 13px;
  line-height: 1.7;
}
.sidebar-note strong { display: block; margin-bottom: 5px; color: #222; }

/* Home and listings */
.home-hero__copy { max-width: 780px; }
.home-hero .eyebrow { margin: 0 0 20px; font-size: 13px; font-weight: 800; }
.home-hero .hero-search {
  max-width: 600px;
  margin-top: 32px !important;
}
.home-hero .hero-search .wp-block-search__inside-wrapper {
  min-height: 54px;
  padding: 5px;
  border: 0;
  border-radius: 10px;
  background: #fff;
}
.home-hero .hero-search .wp-block-search__input { border: 0; }
.home-hero .hero-search .wp-block-search__button {
  margin: 0;
  padding: 0 23px;
  border: 0;
  border-radius: 8px;
  background: var(--eib-primary);
  color: #fff;
  font-weight: 850;
}
.index-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.index-heading h2 { margin: 0; font-size: 28px; letter-spacing: -0.04em; }
.index-heading a { font-size: 13px; font-weight: 750; }
.post-grid .wp-block-post-template {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 0;
  padding: 0;
}
.post-grid .wp-block-post {
  padding: 26px 28px;
  border: 1px solid #ebebeb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(20,20,20,.045);
}
.post-grid .taxonomy-category { margin: 0 0 10px; }
.post-grid .taxonomy-category a {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--eib-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
}
.post-grid .wp-block-post-title { margin: 0; font-size: 23px; line-height: 1.45; letter-spacing: -0.04em; }
.post-grid .wp-block-post-title a { text-decoration: none; }
.post-grid .wp-block-post-excerpt { margin: 12px 0 0; color: var(--eib-muted); font-size: 14px; line-height: 1.75; }
.post-grid .wp-block-post-excerpt__more-link { font-weight: 800; }
.post-grid .wp-block-post-date { margin-top: 16px; color: #9a9a9a; font-size: 12px; }
.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 30px;
}
.category-links a {
  padding: 9px 13px;
  border: 1px solid #dedede;
  border-radius: 999px;
  background: #fff;
  color: #444;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.category-links a:first-child { border-color: var(--eib-primary); background: var(--eib-primary); color: #fff; }
.wp-block-query-pagination { margin-top: 32px; font-weight: 750; }

/* Pages and utility states */
.page-template-default .post-content,
.page .post-content { max-width: 720px; margin-inline: auto; }
.page .post-content > h2 {
  margin-top: 2em;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--eib-yellow);
  font-size: 25px;
}
.empty-state {
  padding: 64px 24px;
  border: 1px dashed #ccc;
  border-radius: 14px;
  background: #fff;
  text-align: center;
}
.error-code { margin: 0; color: var(--eib-primary); font-size: clamp(86px,16vw,170px); line-height: .9; font-weight: 900; }

/* Footer */
.site-footer {
  padding: 52px 0 34px;
  border-top: 1px solid #e2e2e2;
  background: #fff;
  color: #555;
}
.site-footer__top { gap: 36px; align-items: start; }
.footer-brand { margin: 0 0 10px; color: #222; font-family: Georgia, serif; font-size: 22px; font-weight: 700; }
.footer-copy { max-width: 470px; margin: 0; color: #888; font-size: 13px; line-height: 1.7; }
.footer-nav { font-size: 13px; font-weight: 650; }
.footer-nav a { color: #555; text-decoration: none; }
.footer-bottom { margin-top: 35px; padding-top: 22px; border-top: 1px solid #ededed; color: #9a9a9a; font-size: 12px; }

@media (max-width: 960px) {
  .blog-layout { grid-template-columns: minmax(0, 1fr) 220px; gap: 40px; }
}

@media (max-width: 782px) {
  .site-header__brand-row { min-height: 72px; }
  .header-search { display: none; }
  .site-nav-row { min-height: 52px; }
  .primary-nav { width: 100%; }
  .blog-layout { display: block; width: min(100% - 32px, 720px); }
  .blog-sidebar { display: none; }
  .content-header,
  .home-hero { padding: 72px 0; }
  .content-header h1,
  .content-header .wp-block-query-title,
  .home-hero h1 { font-size: 34px; }
  .content-header .wp-block-post-excerpt,
  .archive-description,
  .hero-description { font-size: 15px; }
  .post-body-wrap,
  .blog-index-wrap { padding: 42px 0 70px; }
  .post-content { font-size: 16px; line-height: 1.82; }
  .post-content > .info-box:first-child { min-height: 0; padding: 34px 28px; font-size: 18px; }
  .post-content > .info-box:first-child + p { padding: 24px 22px; }
  .eib-section-card { padding: 25px 22px 27px; border-radius: 15px; }
  .eib-section-card h2 { font-size: 19px; }
  .index-heading { align-items: start; flex-direction: column; }
  .site-footer__top { flex-direction: column; }
}

@media (max-width: 480px) {
  body { word-break: normal; overflow-wrap: anywhere; }
  .brand-title { font-size: 22px; }
  .content-header,
  .home-hero { padding: 58px 0 62px; }
  .content-header h1,
  .content-header .wp-block-query-title,
  .home-hero h1 { font-size: 30px; line-height: 1.36; }
  .post-meta { margin-top: 23px; }
  .post-content > .info-box:first-child { padding: 30px 23px; }
  .post-content > .info-box:first-child::after { width: 190px; height: 190px; }
  .article-toc { padding: 22px; }
  .post-grid .wp-block-post { padding: 23px 21px; }
  .post-grid .wp-block-post-title { font-size: 21px; }
  .eib-section-card { padding-inline: 19px; }
  .eib-section-card h2 { align-items: flex-start; }
  .post-content table { table-layout: fixed; }
  .post-content th,
  .post-content td { overflow-wrap: anywhere; }

  .post-content .mobile-stack-table,
  .post-content .mobile-stack-table table,
  .post-content .mobile-stack-table tbody,
  .post-content .mobile-stack-table tr,
  .post-content .mobile-stack-table td { display: block; width: 100%; }
  .post-content .mobile-stack-table { overflow: visible; }
  .post-content .mobile-stack-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
  .post-content .mobile-stack-table tr {
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--eib-line);
    border-radius: 10px;
    background: #ffffff;
  }
  .post-content .mobile-stack-table td {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    padding: 11px 13px;
    border: 0;
    border-bottom: 1px solid var(--eib-line);
  }
  .post-content .mobile-stack-table td:last-child { border-bottom: 0; }
  .post-content .mobile-stack-table td::before {
    color: var(--eib-muted);
    font-size: 13px;
    font-weight: 800;
  }
  /* 라벨은 표의 thead에서 functions.php가 data-label로 복사해 넣는다. */
  .post-content .mobile-stack-table td::before { content: attr(data-label); }
  .post-content .mobile-stack-table caption { display: block; margin-bottom: 10px; font-weight: 800; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
