/*
Theme Name: Salgoo Lite
Theme URI: https://ptliver4889.com
Author: Daon Media
Description: Lightweight high-speed Korean internet newspaper theme inspired by Salgoo News layout with CLS-safe AdSense slots, NewsArticle schema, and native news sitemaps.
Version: 1.0.0
Text Domain: salgoo-lite
*/

:root {
  --brand-primary: #0f4c81;
  --brand-dark: #0a345a;
  --brand-accent: #e11d48;
  --text-main: #111827;
  --text-muted: #4b5563;
  --text-light: #6b7280;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e5e7eb;
  --max-width: 1180px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
  line-height: 1.65;
  word-break: keep-all;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--brand-primary);
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* Top Utility Strip */
.top-strip {
  background: #111827;
  color: #d1d5db;
  font-size: 12px;
  border-bottom: 1px solid #1f2937;
}

.top-strip-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 32px;
  gap: 12px;
  flex-wrap: wrap;
}

.top-strip-links {
  display: flex;
  gap: 14px;
}

.top-strip-links a:hover {
  color: #ffffff;
}

/* Masthead */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
}

.brand-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--brand-primary);
  line-height: 1.1;
}

.brand-tagline {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-light);
}

.header-search {
  display: flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
  background: #f9fafb;
}

.header-search input {
  border: 0;
  background: transparent;
  padding: 8px 12px;
  font-size: 14px;
  min-width: 190px;
  outline: none;
}

.header-search button {
  border: 0;
  background: var(--brand-primary);
  color: #ffffff;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* Sticky GNB */
.gnb-bar {
  background: var(--brand-primary);
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 2px 6px rgba(15, 76, 129, 0.14);
}

.gnb-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.gnb-list::-webkit-scrollbar {
  display: none;
}

.gnb-list a {
  display: block;
  padding: 12px 16px;
  color: #f1f5f9;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}

.gnb-list a:hover,
.gnb-list a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-bottom-color: #38bdf8;
}

/* CLS-Reserved AdSense Slots */
.ad-slot {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin: 18px auto;
  text-align: center;
  overflow: hidden;
}

.ad-slot-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #94a3b8;
  padding: 2px 0;
  text-transform: uppercase;
}

.ad-slot-top {
  min-height: 100px;
  max-width: 970px;
}

.ad-slot-mid {
  min-height: 120px;
  margin: 22px 0;
}

.ad-slot-sidebar {
  min-height: 280px;
  margin-top: 18px;
}

.ad-slot-bottom {
  min-height: 260px;
  margin: 26px 0;
}

/* Hero 1+4 Grid */
.hero-section {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 18px;
  margin-top: 18px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 20px;
}

.hero-lead {
  display: flex;
  flex-direction: column;
}

.thumb-16x9 {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.thumb-16x9 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.hero-lead:hover .thumb-16x9 img,
.news-card:hover .thumb-16x9 img {
  transform: scale(1.02);
}

.cat-badge {
  display: inline-block;
  background: var(--brand-primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.cat-badge-edu { background: #1d4ed8; }
.cat-badge-economy { background: #0f766e; }
.cat-badge-ent { background: #be123c; }
.cat-badge-life { background: #b45309; }
.cat-badge-tech { background: #4338ca; }

.hero-lead-title {
  margin: 12px 0 8px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.hero-lead-excerpt {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.hero-side-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-side-item {
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: 12px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.hero-side-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.hero-side-item h3 {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

/* Main 2-Column Layout */
.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  margin-top: 22px;
  align-items: start;
}

.panel-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--brand-primary);
  font-size: 18px;
  font-weight: 800;
}

.section-heading a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
}

.stream-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stream-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.stream-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.stream-item h3 {
  margin: 6px 0 6px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.stream-meta {
  font-size: 12px;
  color: var(--text-light);
}

.stream-excerpt {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sidebar Ranking TOP 10 */
.sidebar-sticky {
  position: sticky;
  top: 62px;
}

.ranking-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ranking-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.ranking-list li:last-child {
  border-bottom: 0;
}

.rank-num {
  flex: 0 0 24px;
  height: 24px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rank-num.top3 {
  background: var(--brand-primary);
  color: #ffffff;
}

.ranking-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.42;
}

/* Category 3-Column Bands */
.category-bands {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.band-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.band-list li {
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.band-list li:last-child {
  border-bottom: 0;
}

/* Single Article Page */
.breadcrumb {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.article-title {
  margin: 8px 0 12px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--text-light);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 18px;
}

.summary-box {
  background: #f1f5f9;
  border-left: 4px solid var(--brand-primary);
  border-radius: 0 6px 6px 0;
  padding: 14px 18px;
  margin: 14px 0 18px;
}

.summary-box-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-primary);
  margin-bottom: 6px;
}

.summary-box ul {
  margin: 0;
  padding-left: 18px;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
}

.article-hero-figure {
  margin: 18px 0 22px;
}

.article-hero-figure img {
  width: 100%;
  border-radius: 6px;
}

.article-hero-figure figcaption {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-light);
}

.article-body {
  font-size: 17px;
  line-height: 1.85;
  color: #1f2937;
}

.article-body h2 {
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid #e2e8f0;
  font-size: 21px;
  font-weight: 800;
  color: var(--brand-dark);
}

.article-body h3 {
  margin: 22px 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.article-body p {
  margin: 0 0 16px;
}

.article-body a {
  color: var(--brand-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body table,
.news-data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

.article-body th,
.news-data-table th {
  background: var(--brand-primary);
  color: #ffffff;
  font-weight: 700;
  padding: 10px 12px;
  text-align: left;
  border: 1px solid #cbd5e1;
}

.article-body td,
.news-data-table td {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
}

.article-body tr:nth-child(even) td {
  background: #f8fafc;
}

.salgoo-related-inline {
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  padding: 14px 18px;
  margin: 22px 0;
}

.salgoo-related-inline strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--brand-primary);
}

.salgoo-related-inline ul {
  margin: 0;
  padding-left: 18px;
  font-size: 15px;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.article-tags a {
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
}

/* Related 6-Card Grid */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.news-card h3 {
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.42;
}

/* Pagination */
.pagination-wrap {
  margin-top: 24px;
  display: flex;
  gap: 8px;
  justify-content: center;
}

.pagination-wrap .page-numbers {
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: #ffffff;
  font-size: 14px;
}

.pagination-wrap .page-numbers.current {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  font-weight: 700;
}

/* Footer */
.site-footer {
  margin-top: 40px;
  background: #111827;
  color: #cbd5e1;
  padding: 30px 0 36px;
  font-size: 13px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #334155;
  margin-bottom: 16px;
}

.footer-nav a {
  color: #f1f5f9;
  font-weight: 600;
}

.footer-meta p {
  margin: 4px 0;
  color: #94a3b8;
  line-height: 1.7;
}

@media (max-width: 960px) {
  .hero-grid,
  .main-layout,
  .category-bands {
    grid-template-columns: 1fr;
  }
  .sidebar-sticky {
    position: static;
  }
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .masthead {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-search {
    width: 100%;
  }
  .header-search input {
    flex: 1;
  }
  .stream-item {
    grid-template-columns: 1fr;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .article-title {
    font-size: 24px;
  }
}
