/*
Theme Name: SmartKoreaGuide Editorial Rebuild
Theme URI: https://smartkoreaguide.com/
Author: SmartKoreaGuide
Description: Draft editorial rebuild for SmartKoreaGuide.
Version: 0.2.4
Text Domain: smartkoreaguide
*/

:root {
  --skg-ink: #2b2522;
  --skg-navy: #8f3f32;
  --skg-blue: #a94f3f;
  --skg-teal: #9b5a3c;
  --skg-coral: #c95f4a;
  --skg-paper: #ffffff;
  --skg-mist: #fbf6f1;
  --skg-soft: #f4ebe3;
  --skg-line: #e4d8cf;
  --skg-text: #342f2b;
  --skg-muted: #756a62;
  --skg-subtle: #9b8f86;
  --skg-shadow: 0 18px 48px rgba(43, 37, 34, 0.08);
  --skg-radius: 8px;
  --skg-sans: "Source Sans 3", "Inter", "Segoe UI", Arial, sans-serif;
  --skg-serif: "Lora", Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--skg-sans);
  color: var(--skg-text);
  background: var(--skg-paper);
  font-size: 17px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--skg-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--skg-navy); }

button,
input,
select,
textarea { font: inherit; }

.skg-social-sidebar { display: none !important; }

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.skg-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--skg-line);
  backdrop-filter: blur(10px);
}

.skg-header-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}

.skg-brand {
  display: inline-grid;
  grid-template-columns: 44px auto;
  align-items: center;
  gap: 12px;
  color: var(--skg-ink);
  text-decoration: none;
}

.skg-brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--skg-ink);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.skg-brand-title {
  display: block;
  font-size: 21px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
}

.skg-brand-subtitle {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--skg-muted);
  font-weight: 700;
}

.skg-primary-nav {
  justify-self: center;
}

.skg-primary-nav ul,
.skg-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skg-primary-nav ul {
  display: flex;
  align-items: center;
  gap: 20px;
}

.skg-primary-nav a {
  color: var(--skg-text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.skg-primary-nav a:hover { color: var(--skg-blue); }

.skg-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.skg-search-form {
  display: flex;
  align-items: center;
  width: 230px;
  border: 1px solid var(--skg-line);
  border-radius: 8px;
  background: var(--skg-paper);
  overflow: hidden;
}

.skg-search-field {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 9px 10px;
  color: var(--skg-text);
  background: transparent;
  outline: none;
  font-size: 15px;
}

.skg-search-submit {
  border: 0;
  background: var(--skg-navy);
  color: #fff;
  min-width: 40px;
  height: 38px;
  cursor: pointer;
}

.skg-menu-toggle { display: none; }

.skg-main { background: var(--skg-paper); }

.skg-hero-clean {
  border-bottom: 1px solid var(--skg-line);
  background: var(--skg-mist);
}

.skg-hero-clean > .skg-hero-text,
.skg-hero-clean > .skg-hero-image {
  width: min(1180px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

.skg-hero-clean {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  column-gap: 48px;
  align-items: center;
  padding: 58px max(20px, calc((100vw - 1180px) / 2)) 48px;
}

.skg-hero-clean > .skg-hero-text,
.skg-hero-clean > .skg-hero-image {
  width: 100%;
}

.skg-label,
.skg-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--skg-teal);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.skg-hero-text h1,
.skg-page-title,
.skg-article-title,
.skg-archive-title {
  margin: 0;
  color: var(--skg-ink);
  font-family: var(--skg-sans);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.05;
}

.skg-hero-text h1 { max-width: 720px; font-size: 52px; }
.skg-page-title,
.skg-article-title,
.skg-archive-title,
.skg-page-header h1,
.skg-archive-header h1,
.skg-article-header h1 { font-size: 42px; }

.skg-page-header h1,
.skg-archive-header h1,
.skg-article-header h1 {
  margin: 0;
  color: var(--skg-ink);
  font-family: var(--skg-sans);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.05;
}

.skg-lead {
  max-width: 670px;
  margin: 20px 0 0;
  color: var(--skg-muted);
  font-size: 20px;
  line-height: 1.55;
}

.skg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.skg-button,
.skg-button-light,
.wp-block-button__link,
button[type="submit"],
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--skg-navy);
  background: var(--skg-navy);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  line-height: 1.2;
  cursor: pointer;
}

.skg-button:hover,
.wp-block-button__link:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  background: var(--skg-blue);
  border-color: var(--skg-blue);
  color: #fff;
}

.skg-button-light {
  background: #fff;
  color: var(--skg-ink);
  border-color: var(--skg-line);
}

.skg-button-light:hover {
  color: var(--skg-ink);
  border-color: var(--skg-blue);
  background: var(--skg-soft);
}

.skg-hero-image {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--skg-line);
  box-shadow: var(--skg-shadow);
  background: var(--skg-soft);
}

.skg-hero-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.skg-section,
.skg-content-wrap,
.skg-archive-wrap,
.skg-article-wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.skg-section { padding: 58px 0; }

.skg-muted-section {
  width: 100%;
  max-width: none;
  padding: 56px max(20px, calc((100vw - 1180px) / 2));
  background: var(--skg-mist);
  border-top: 1px solid var(--skg-line);
  border-bottom: 1px solid var(--skg-line);
}

.skg-section-intro { margin-bottom: 26px; }

.skg-section-intro h2,
.skg-standard-block h2,
.skg-author-row h2,
.skg-entry-content h2 {
  margin: 0;
  color: var(--skg-ink);
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0;
}

.skg-section-intro p,
.skg-standard-block p,
.skg-author-row p {
  margin: 10px 0 0;
  max-width: 680px;
  color: var(--skg-muted);
}

.skg-wide-intro { max-width: 760px; }

.skg-split-intro {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.skg-inline-link {
  font-weight: 800;
  color: var(--skg-navy);
  text-decoration: none;
  white-space: nowrap;
}

.skg-start-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.skg-start-list {
  border: 1px solid var(--skg-line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.skg-start-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px 24px;
  border-bottom: 1px solid var(--skg-line);
}

.skg-start-item:last-child { border-bottom: 0; }

.skg-start-item > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--skg-soft);
  color: var(--skg-navy);
  font-weight: 850;
}

.skg-start-item h3,
.skg-topic-row h3,
.skg-card h3 {
  margin: 0;
  color: var(--skg-ink);
  font-size: 21px;
  line-height: 1.22;
  letter-spacing: 0;
}

.skg-topic-row h3 {
  max-width: 100%;
}

.skg-start-item p,
.skg-topic-row p,
.skg-card p {
  margin: 6px 0 0;
  color: var(--skg-muted);
}

.skg-topic-row p {
  margin: 0;
  max-width: 58ch;
  line-height: 1.5;
}

.skg-start-item a {
  color: var(--skg-navy);
  font-weight: 850;
  text-decoration: none;
}

.skg-topic-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.skg-topic-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 172px;
  gap: 10px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--skg-line);
  border-radius: 8px;
}

.skg-topic-row:hover {
  border-color: #b8ccd9;
  box-shadow: 0 10px 28px rgba(22, 34, 51, 0.06);
}

.skg-topic-row a {
  margin-top: auto;
  color: var(--skg-navy);
  font-weight: 850;
  text-decoration: none;
}

.skg-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.skg-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--skg-line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.skg-card-media,
.skg-card-fallback {
  aspect-ratio: 16 / 10;
  background: var(--skg-soft);
}

.skg-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.skg-card-fallback {
  display: grid;
  place-items: center;
  color: var(--skg-navy);
  font-size: 36px;
  font-weight: 850;
}

.skg-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px;
}

.skg-card h3 a {
  color: var(--skg-ink);
  text-decoration: none;
}

.skg-card h3 a:hover { color: var(--skg-blue); }

.skg-card-meta {
  margin-top: auto;
  padding-top: 18px;
  color: var(--skg-subtle);
  font-size: 14px;
  font-weight: 700;
}

.skg-standard-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 38px;
  align-items: start;
  padding: 36px;
  margin-top: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--skg-line);
  border-radius: 8px;
  background: var(--skg-ink);
  color: #fff;
}

.skg-standard-block h2,
.skg-standard-block p { color: #fff; }
.skg-standard-block p { color: #d5e2eb; }

.skg-standard-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  overflow: hidden;
}

.skg-standard-block li {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.16);
  color: #edf5f8;
  font-weight: 700;
}

.skg-standard-block li:last-child { border-bottom: 0; }

.skg-author-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  border-top: 1px solid var(--skg-line);
}

.skg-content-wrap,
.skg-archive-wrap,
.skg-article-wrap {
  padding: 52px 0 70px;
}

.skg-page-header,
.skg-archive-header,
.skg-article-header {
  max-width: 820px;
  margin: 0 auto 34px;
  text-align: left;
}

.skg-article-meta,
.skg-archive-description,
.skg-page-header p {
  color: var(--skg-muted);
  margin-top: 12px;
}

.skg-entry-content,
.skg-prose {
  max-width: 720px;
  margin: 0 auto;
}

.skg-article-header {
  width: min(820px, calc(100% - 40px));
  max-width: 820px;
  margin: 56px auto 38px;
}

.skg-article-header .skg-kicker {
  display: inline-block;
  margin-bottom: 14px;
}

.skg-article-title {
  display: block;
  margin: 0;
  color: var(--skg-ink);
  font-family: var(--skg-serif);
  font-size: clamp(40px, 5vw, 58px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.skg-article-deck {
  max-width: 740px;
  margin: 20px 0 0;
  color: var(--skg-muted);
  font-size: 21px;
  line-height: 1.55;
}

.skg-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  align-items: center;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--skg-line);
  color: var(--skg-muted);
  font-size: 14px;
  line-height: 1.4;
}

.skg-article-meta span {
  display: inline-flex;
  align-items: center;
}

.skg-article-meta span + span::before {
  content: "•";
  margin: 0 10px;
  color: var(--skg-subtle);
}

.skg-article-author {
  color: var(--skg-ink);
  font-weight: 700;
}

.skg-entry-content > *:first-child,
.skg-prose > *:first-child { margin-top: 0; }

.skg-prose {
  color: var(--skg-text);
  font-size: 18px;
  line-height: 1.78;
}

.skg-entry-content h2,
.skg-prose h2 {
  margin: 52px 0 18px;
  padding-top: 30px;
  border-top: 1px solid var(--skg-line);
  color: var(--skg-ink);
  font-family: var(--skg-serif);
  font-size: 31px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.015em;
}

.skg-entry-content h3,
.skg-prose h3 {
  margin: 36px 0 14px;
  color: var(--skg-ink);
  font-size: 23px;
  line-height: 1.3;
}

.skg-entry-content p,
.skg-entry-content li,
.skg-prose p,
.skg-prose li { color: var(--skg-text); }

.skg-prose p { margin: 0 0 1.35em; }

.skg-entry-content a,
.skg-prose a {
  color: var(--skg-blue);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.skg-prose ul,
.skg-prose ol {
  margin: 0 0 1.6em;
  padding-left: 1.4em;
}

.skg-prose li + li { margin-top: 9px; }

.skg-prose blockquote,
.skg-prose .wp-block-quote {
  margin: 32px 0;
  padding: 20px 24px;
  border: 0;
  border-left: 4px solid var(--skg-coral);
  background: var(--skg-mist);
  color: var(--skg-ink);
  font-family: var(--skg-serif);
  font-size: 20px;
  line-height: 1.6;
}

.skg-entry-content img,
.skg-prose img {
  border-radius: 8px;
  border: 1px solid var(--skg-line);
}

/* Article image standard: keep featured and in-content images on the centered reading axis. */
.skg-article-content {
  display: block;
  width: min(820px, calc(100% - 40px));
  max-width: 820px;
  margin: 0 auto;
  padding: 0;
}

.skg-featured-image {
  display: block;
  width: min(760px, 100%);
  margin: 0 auto 48px;
  text-align: center;
}

.skg-featured-image img {
  box-shadow: 0 16px 42px rgba(43, 37, 34, 0.10);
}

.skg-featured-image img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: cover;
  object-position: center;
}

.skg-article-content .skg-article-layout,
.skg-article-content .skg-prose {
  width: 100%;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.skg-prose .wp-block-image,
.skg-prose figure.wp-block-image {
  text-align: center;
}

.skg-prose .wp-block-image img,
.skg-prose figure.wp-block-image img,
.skg-prose > img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.skg-prose .wp-block-image figcaption {
  text-align: center;
}

.skg-prose .has-text-align-center { text-align: center; }
.skg-prose .has-xxlarge-font-size { font-size: 30px; line-height: 1.2; color: var(--skg-ink); }
.skg-prose .has-medium-font-size { font-size: 19px; line-height: 1.55; }
.skg-prose .wp-block-heading:first-child { margin-top: 0; }
.skg-prose ul,
.skg-prose ol { padding-left: 24px; }
.skg-prose li + li { margin-top: 6px; }

.skg-note-box,
.skg-empty-panel {
  border: 1px solid var(--skg-line);
  border-radius: 8px;
  background: var(--skg-mist);
  padding: 24px;
}

.skg-archive-grid,
.skg-search-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.skg-pagination {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.skg-pagination a,
.skg-pagination span {
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--skg-line);
  border-radius: 8px;
  text-decoration: none;
  color: var(--skg-text);
  font-weight: 800;
}

.skg-pagination .current {
  background: var(--skg-ink);
  color: #fff;
  border-color: var(--skg-ink);
}

.skg-footer {
  border-top: 1px solid var(--skg-line);
  background: #2b2522;
  color: #efe7df;
}

.skg-footer a { color: #fff6ee; text-decoration: none; }
.skg-footer a:hover { color: #ffffff; text-decoration: underline; text-underline-offset: 3px; }

.skg-footer-grid {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
  gap: 34px;
}

.skg-footer h2,
.skg-footer h3 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.2;
}

.skg-footer p,
.skg-footer li {
  margin: 0;
  color: #d8cbc1;
  font-size: 15px;
  line-height: 1.6;
}

.skg-footer li + li { margin-top: 8px; }

.skg-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 16px 0;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  color: #aab7c2;
  font-size: 14px;
}

.wp-block-separator { border: 0; border-top: 1px solid var(--skg-line); }
.wp-block-quote { border-left: 4px solid var(--skg-teal); margin-left: 0; padding-left: 18px; color: var(--skg-muted); }
.wp-caption-text { color: var(--skg-muted); font-size: 14px; }

@media (max-width: 1020px) {
  .skg-header-inner { grid-template-columns: 1fr auto; }
  .skg-primary-nav { display: none; }
  .skg-search-form { width: 190px; }
  .skg-hero-clean { grid-template-columns: 1fr; gap: 30px; padding-top: 44px; }
  .skg-hero-text h1 { font-size: 42px; }
  .skg-start-layout,
  .skg-standard-block,
  .skg-author-row { grid-template-columns: 1fr; }
  .skg-card-grid,
  .skg-archive-grid,
  .skg-search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skg-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  body { font-size: 16px; }

  .skg-article-header {
    width: min(100% - 28px, 820px);
    margin-top: 36px;
    margin-bottom: 28px;
  }

  .skg-article-title {
    font-size: clamp(34px, 10vw, 42px);
    line-height: 1.1;
  }

  .skg-article-deck {
    margin-top: 16px;
    font-size: 18px;
    line-height: 1.55;
  }

  .skg-article-meta {
    margin-top: 18px;
    padding-top: 14px;
  }

  .skg-article-content {
    width: min(100% - 28px, 820px);
  }

  .skg-featured-image {
    margin-bottom: 34px;
  }

  .skg-prose {
    font-size: 17px;
    line-height: 1.72;
  }

  .skg-entry-content h2,
  .skg-prose h2 {
    margin-top: 42px;
    padding-top: 24px;
    font-size: 27px;
  }

  .skg-entry-content h3,
  .skg-prose h3 {
    margin-top: 30px;
    font-size: 21px;
  }
  .skg-header-inner,
  .skg-section,
  .skg-content-wrap,
  .skg-archive-wrap,
  .skg-article-wrap,
  .skg-footer-grid,
  .skg-footer-bottom { width: min(100% - 28px, 1180px); }
  .skg-header-inner { min-height: auto; padding: 14px 0; gap: 14px; }
  .skg-brand { grid-template-columns: 38px auto; }
  .skg-brand-mark { width: 38px; height: 38px; }
  .skg-brand-title { font-size: 18px; }
  .skg-brand-subtitle { display: none; }
  .skg-header-actions { display: none; }
  .skg-hero-clean { padding: 34px 14px 36px; }
  .skg-hero-text h1 { font-size: 34px; line-height: 1.08; }
  .skg-page-title,
  .skg-article-title,
  .skg-archive-title { font-size: 32px; }
  .skg-lead { font-size: 18px; }
  .skg-section { padding: 42px 0; }
  .skg-muted-section { padding: 42px 14px; }
  .skg-section-intro h2,
  .skg-standard-block h2,
  .skg-author-row h2,
  .skg-entry-content h2 { font-size: 26px; }
  .skg-split-intro { display: block; }
  .skg-inline-link { display: inline-block; margin-top: 12px; }
  .skg-start-item { grid-template-columns: 42px minmax(0, 1fr); }
  .skg-start-item a { grid-column: 2; }
  .skg-topic-index,
  .skg-card-grid,
  .skg-archive-grid,
  .skg-search-grid,
  .skg-footer-grid { grid-template-columns: 1fr; }
  .skg-standard-block { padding: 26px; }
  .skg-content-wrap,
  .skg-archive-wrap,
  .skg-article-wrap { padding-top: 38px; }
}

.skg-main #topics .skg-topic-index {
  align-items: stretch;
}

.skg-main #topics .skg-topic-row {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  min-height: 176px;
  gap: 10px;
}

.skg-main #topics .skg-topic-row h3,
.skg-main #topics .skg-topic-row p,
.skg-main #topics .skg-topic-row a {
  display: block;
  width: 100%;
  max-width: 100%;
}

.skg-main #topics .skg-topic-row h3 {
  margin: 0;
  white-space: normal;
}

.skg-main #topics .skg-topic-row p {
  margin: 0;
}

.skg-main #topics .skg-topic-row a {
  margin-top: auto;
}
