@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+KR:wght@400;500;700;900&display=swap');

:root {
  --inews-font: 'Inter', 'Noto Sans KR', sans-serif;
  --inews-primary: #007aff;
  --inews-dark: #212529;
  --inews-gray-700: #495057;
  --inews-gray-500: #adb5bd;
  --inews-border: #e8e8e9;
  --inews-bg: #fff;
  --inews-footer-bg: #212529;
  --inews-max-width: 1080px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--inews-font);
  color: var(--inews-dark);
  background: var(--inews-bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---- header ---- */
.site-header {
  border-bottom: 1px solid var(--inews-border);
}
.site-header-top {
  max-width: var(--inews-max-width);
  margin: 0 auto;
  padding: 20px 16px 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.site-logo {
  font-family: var(--inews-font);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.5px;
  color: var(--inews-dark);
}
.site-logo span { color: var(--inews-primary); }
.site-updated {
  font-size: 13px;
  color: var(--inews-gray-700);
}
.site-nav {
  border-top: 2px solid var(--inews-primary);
  max-width: var(--inews-max-width);
  margin: 0 auto;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 16px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
.site-nav a {
  display: block;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a.active { color: var(--inews-primary); }

/* ---- layout ---- */
.site-main {
  max-width: var(--inews-max-width);
  margin: 0 auto;
  padding: 28px 16px 60px;
}

/* ---- home top: hero(+related) | side cards ---- */
.home-top {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--inews-border);
}
@media (max-width: 860px) { .home-top { grid-template-columns: 1fr; } }

.related-links {
  list-style: none;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--inews-border);
}
.related-links li { padding: 6px 0; font-size: 14px; }
.related-links li::before { content: "• "; color: var(--inews-primary); font-weight: 700; }
.related-links a:hover { color: var(--inews-primary); }

.home-top-side { display: flex; flex-direction: column; gap: 18px; }
.side-card { display: flex; gap: 12px; }
.side-card .side-thumb {
  width: 100px; height: 68px; flex: 0 0 auto;
  border-radius: 4px; overflow: hidden;
  background: linear-gradient(135deg, #eef2ff, #dbe4ff);
  display: flex; align-items: center; justify-content: center;
}
.side-card .side-thumb img { width: 100%; height: 100%; object-fit: cover; }
.side-card .side-thumb .thumb-fallback { font-size: 10px; color: var(--inews-primary); font-weight: 800; }
.side-card .side-title {
  font-size: 14.5px; font-weight: 700; line-height: 1.4; margin: 0 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.side-card .side-meta { font-size: 12px; color: var(--inews-gray-500); }

/* ---- hero ---- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
}
@media (max-width: 720px) { .hero { grid-template-columns: 1fr; } }
.hero-thumb {
  aspect-ratio: 16/9;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--inews-primary), #212529);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-thumb .thumb-fallback {
  color: #fff; font-weight: 800; font-size: 15px; letter-spacing: 2px; opacity: .85;
}
.hero-body { display: flex; flex-direction: column; justify-content: center; }
.category-tag {
  display: inline-block;
  color: var(--inews-primary);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}
.hero-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 10px;
}
.hero-summary {
  font-size: 15px;
  color: var(--inews-gray-700);
  line-height: 1.6;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-meta {
  font-size: 13px;
  color: var(--inews-gray-500);
}

.section-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--inews-dark);
}

/* ---- grid of cards ---- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 20px;
}
@media (max-width: 860px) { .article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .article-grid { grid-template-columns: 1fr; } }
.card-thumb {
  aspect-ratio: 16/10;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #eef2ff, #dbe4ff);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-thumb .thumb-fallback { color: var(--inews-primary); font-weight: 800; font-size: 13px; letter-spacing: 1px; }
.card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-summary {
  font-size: 13.5px;
  color: var(--inews-gray-700);
  line-height: 1.5;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- article detail ---- */
.article-header { max-width: 760px; margin: 0 auto 24px; text-align: left; }
.article-heading {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.4;
  margin: 8px 0 10px;
}
.article-subheading {
  font-size: 17px;
  font-weight: 500;
  color: var(--inews-gray-700);
  margin: 0 0 16px;
}
.article-byline {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--inews-gray-500);
  border-top: 1px solid var(--inews-border);
  border-bottom: 1px solid var(--inews-border);
  padding: 10px 0;
}
.article-cover { max-width: 760px; margin: 0 auto 24px; border-radius: 6px; overflow: hidden; }
.article-body { max-width: 760px; margin: 0 auto; }
.inews-content p { font-size: 17px; line-height: 1.9; margin: 20px 0; color: #1a1a1a; }
.inews-summary { background: #f7f8fa; border-left: 4px solid var(--inews-primary); padding: 14px 18px; margin: 24px 0; font-size: 15px; }
.inews-quote { border-left: 3px solid var(--inews-border); padding: 10px 18px; margin: 24px 0; color: var(--inews-gray-700); font-style: italic; }
.inews-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
.inews-table th, .inews-table td { border: 1px solid var(--inews-border); padding: 8px 10px; text-align: left; }
.article-back { display: inline-block; margin-top: 40px; max-width: 760px; color: var(--inews-primary); font-weight: 600; }
.article-back-wrap { max-width: 760px; margin: 0 auto; }

/* ---- home: category section boxes + sidebar ---- */
.home-sections {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 36px;
  margin-top: 40px;
}
@media (max-width: 860px) { .home-sections { grid-template-columns: 1fr; } }

.section-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 36px;
}
@media (max-width: 560px) { .section-grid-2 { grid-template-columns: 1fr; } }

.section-box .section-title a { float: right; font-size: 12px; font-weight: 500; color: var(--inews-gray-500); }

.section-list { list-style: none; margin: 0; padding: 0; }
.section-list li {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--inews-border);
}
.section-list li:last-child { border-bottom: none; }
.section-list .list-thumb {
  width: 72px; height: 54px; flex: 0 0 auto;
  border-radius: 4px; overflow: hidden;
  background: linear-gradient(135deg, #eef2ff, #dbe4ff);
  display: flex; align-items: center; justify-content: center;
}
.section-list .list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.section-list .list-thumb .thumb-fallback { font-size: 9px; font-weight: 800; color: var(--inews-primary); }
.section-list .list-title {
  font-size: 14.5px; font-weight: 600; line-height: 1.4; margin: 0 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.section-list .list-meta { font-size: 12px; color: var(--inews-gray-500); }
.section-list.text-only li { padding: 9px 0; }
.section-list.text-only .list-title { -webkit-line-clamp: 1; }

.ad-banner {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  aspect-ratio: 3/2;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--inews-primary), #5856d6);
  color: #fff; text-align: center; padding: 20px;
  margin-bottom: 30px;
}
.ad-banner .ad-title { font-weight: 800; font-size: 15px; }
.ad-banner .ad-sub { font-size: 12px; opacity: .85; }
.ad-banner .ad-btn {
  margin-top: 8px; padding: 6px 16px; border-radius: 999px;
  background: #fff; color: var(--inews-primary); font-size: 12px; font-weight: 700;
}

/* ---- bottom 3-col widget row (above footer) ---- */
.bottom-sections {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--inews-border);
  border-bottom: 1px solid var(--inews-border);
  margin: 50px 0 10px;
}
@media (max-width: 860px) { .bottom-sections { grid-template-columns: 1fr; } }
.bottom-col { padding: 28px 28px 8px; border-right: 1px solid var(--inews-border); }
.bottom-col:last-child { border-right: none; }
@media (max-width: 860px) {
  .bottom-col { border-right: none; border-bottom: 1px solid var(--inews-border); }
  .bottom-col:last-child { border-bottom: none; }
}
.bottom-col-title {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 20px;
}

.read-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 14px 0; }
.read-item:first-child { padding-top: 0; }
.read-item .read-title {
  font-size: 14.5px; font-weight: 600; line-height: 1.45; flex: 1; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.read-item .read-thumb {
  width: 64px; height: 64px; border-radius: 4px; overflow: hidden; flex: 0 0 auto;
  background: linear-gradient(135deg, #eef2ff, #dbe4ff);
  display: flex; align-items: center; justify-content: center;
}
.read-item .read-thumb img { width: 100%; height: 100%; object-fit: cover; }
.read-item .read-thumb .thumb-fallback { font-size: 9px; font-weight: 800; color: var(--inews-primary); }

.rank-item { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; }
.rank-num { font-size: 16px; font-weight: 800; color: var(--inews-gray-500); width: 18px; flex: 0 0 auto; }
.rank-item:nth-child(-n+3) .rank-num { color: var(--inews-primary); }
.rank-title {
  font-size: 14.5px; font-weight: 600; line-height: 1.45; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.feature-thumb {
  aspect-ratio: 4/3; border-radius: 6px; overflow: hidden; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--inews-primary), #212529);
  display: flex; align-items: center; justify-content: center;
}
.feature-thumb img { width: 100%; height: 100%; object-fit: cover; }
.feature-thumb .thumb-fallback { color: #fff; font-weight: 800; font-size: 14px; }
.feature-title { font-size: 15px; font-weight: 700; line-height: 1.5; margin: 0 0 8px; }
.feature-meta { font-size: 12.5px; color: var(--inews-primary); font-weight: 700; }

/* ---- footer ---- */
.site-footer {
  background: #fff;
  color: var(--inews-gray-700);
  border-top: 1px solid var(--inews-border);
  margin-top: 60px;
}
.site-footer-inner {
  max-width: var(--inews-max-width);
  margin: 0 auto;
  padding: 24px 16px 32px;
}
.site-footer-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding-bottom: 22px;
}
.footer-logo { font-size: 16px; }
.site-footer-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  padding: 0;
  margin: 0;
  font-size: 13px;
}
.site-footer-nav a { color: var(--inews-gray-700); }
.site-footer-nav a:hover { color: var(--inews-primary); }
.site-footer-nav a.strong { font-weight: 700; color: var(--inews-dark); }
.site-footer-meta {
  font-size: 13px;
  color: var(--inews-gray-700);
  line-height: 2;
}
.site-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.site-footer-copyright { font-size: 13px; color: var(--inews-gray-700); }
.site-footer-powered {
  font-size: 11px;
  color: var(--inews-gray-500);
  letter-spacing: .5px;
}
.site-footer-powered strong { color: var(--inews-primary); }
