/* ===== 기본 설정 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange: #C2440A;
  --orange-light: #FAEEDA;
  --orange-mid: #EF9F27;
  --text-dark: #1a1a1a;
  --text-mid: #4a4a4a;
  --text-muted: #888;
  --bg-white: #ffffff;
  --bg-gray: #F7F5F0;
  --border: #e8e2d8;
  --radius: 10px;
  --radius-lg: 16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--text-dark);
  background: var(--bg-white);
  font-size: 16px;
  line-height: 1.7;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 상단 공지바 ===== */
.topbar {
  background: var(--orange);
  color: #fff;
  text-align: center;
  font-size: 13px;
  padding: 9px 20px;
  font-weight: 500;
}

/* ===== 헤더 ===== */
.header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.logo-main {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
}

.logo-accent {
  font-size: 22px;
  font-weight: 700;
  color: var(--orange);
}

.logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 4px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  font-size: 14px;
  color: var(--text-mid);
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover { color: var(--orange); }

.nav-btn {
  background: var(--orange);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px !important;
  transition: background 0.2s !important;
}

.nav-btn:hover { background: #a33808 !important; color: #fff !important; }

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-dark);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  gap: 4px;
}

.mobile-nav a {
  padding: 10px 0;
  font-size: 15px;
  color: var(--text-mid);
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

.mobile-nav.open { display: flex; }

/* ===== 히어로 ===== */
.hero {
  background: linear-gradient(135deg, #FFF8F0 0%, #FFF3E0 60%, #FAEEDA 100%);
  padding: 60px 0 50px;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero-text { flex: 1; }

.hero-badge {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 16px;
  color: var(--text-dark);
}

.hero h1 em {
  font-style: normal;
  color: var(--orange);
}

.hero p {
  font-size: 16px;
  color: var(--text-mid);
  margin-bottom: 28px;
  line-height: 1.8;
}

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--orange);
  color: #fff;
  padding: 13px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-block;
}

.btn-primary:hover { background: #a33808; color: #fff; }

.btn-secondary {
  background: #fff;
  color: var(--orange);
  padding: 13px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  border: 1.5px solid var(--orange);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}

.btn-secondary:hover { background: var(--orange-light); }

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-shrink: 0;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 28px;
  text-align: center;
  min-width: 140px;
}

.stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
}

.stat-num span {
  font-size: 18px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== 공통 섹션 ===== */
.section { padding: 52px 0; }
.section-gray { background: var(--bg-gray); }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
}

.more-link {
  font-size: 13px;
  color: var(--orange);
  font-weight: 500;
}

/* ===== 뉴스 그리드 ===== */
.news-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}

.news-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow 0.2s;
}

.news-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.news-card.featured {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
}

.news-card.featured h3 { font-size: 18px; }
.news-card.featured p { flex: 1; font-size: 14px; color: var(--text-mid); margin-top: 10px; line-height: 1.7; }

.news-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 8px 0 6px;
  line-height: 1.45;
}

.news-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ===== 태그 ===== */
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 6px;
}

.tag-stock { background: #E6F1FB; color: #185FA5; }
.tag-realty { background: #EAF3DE; color: #3B6D11; }
.tag-rate { background: #FAEEDA; color: #854F0B; }
.tag-pension { background: #EEEDFE; color: #534AB7; }

/* ===== 카테고리 ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.category-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  transition: all 0.2s;
  display: block;
}

.category-item:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(194,68,10,0.1);
}

.cat-icon { font-size: 28px; margin-bottom: 8px; }
.cat-name { font-size: 14px; font-weight: 700; color: var(--text-dark); margin-bottom: 4px; }
.cat-count { font-size: 11px; color: var(--text-muted); }

/* ===== 인기글 ===== */
.popular-list { display: flex; flex-direction: column; gap: 12px; }

.popular-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: box-shadow 0.2s;
}

.popular-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.07); }

.rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-gray);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.rank-1 { background: var(--orange); color: #fff; }
.rank-2 { background: #EF9F27; color: #fff; }
.rank-3 { background: #C0DD97; color: #3B6D11; }

.popular-body { flex: 1; }
.popular-body h4 { font-size: 14px; font-weight: 700; margin: 6px 0 6px; line-height: 1.45; }
.popular-body h4 a:hover { color: var(--orange); }
.popular-meta { font-size: 12px; color: var(--text-muted); }

/* ===== 뉴스레터 ===== */
.newsletter-section {
  background: var(--orange);
  padding: 60px 0;
}

.newsletter-inner {
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

.newsletter-text { flex: 1; color: #fff; }
.newsletter-text h2 { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.newsletter-text p { font-size: 15px; opacity: 0.9; margin-bottom: 20px; line-height: 1.7; }

.newsletter-benefits { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.newsletter-benefits li { font-size: 14px; opacity: 0.95; }

.newsletter-form { flex: 1; display: flex; flex-direction: column; gap: 10px; }

.form-input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-family: 'Noto Sans KR', sans-serif;
  background: rgba(255,255,255,0.95);
  color: var(--text-dark);
  outline: none;
}

.form-input:focus { background: #fff; }

.btn-full { width: 100%; text-align: center; padding: 14px; font-size: 16px; background: #fff; color: var(--orange); }
.btn-full:hover { background: var(--orange-light); color: var(--orange); }

.form-note { font-size: 12px; color: rgba(255,255,255,0.7); text-align: center; }

/* ===== 카카오 배너 ===== */
.kakao-banner {
  background: #FAE100;
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.kakao-text h2 { font-size: 20px; font-weight: 700; color: #3C1E1E; margin-bottom: 8px; }
.kakao-text p { font-size: 14px; color: #5a3a2a; line-height: 1.7; }

.kakao-btn {
  background: #3C1E1E;
  color: #FAE100;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
}

.kakao-btn:hover { background: #2a1414; color: #FAE100; }

/* ===== 푸터 ===== */
.footer {
  background: #1a1a1a;
  color: #aaa;
  padding: 48px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand .logo { margin-bottom: 12px; }
.footer-brand .logo-main { color: #fff; font-size: 20px; }
.footer-brand .logo-accent { color: var(--orange); font-size: 20px; }
.footer-brand p { font-size: 13px; line-height: 1.8; color: #888; }

.footer-links h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 0; }
.footer-links a { font-size: 13px; color: #888; padding: 4px 0; transition: color 0.2s; }
.footer-links a:hover { color: var(--orange); }

.footer-bottom {
  border-top: 1px solid #2a2a2a;
  padding-top: 20px;
}

.footer-bottom p { font-size: 12px; color: #666; text-align: center; }

/* ===== 반응형 ===== */
@media (max-width: 768px) {
  .nav { display: none; }
  .hamburger { display: block; }
  .logo-sub { display: none; }

  .hero { padding: 36px 0 32px; }
  .hero-inner { flex-direction: column; gap: 28px; }
  .hero h1 { font-size: 26px; }
  .hero-stats { flex-direction: row; justify-content: center; }
  .stat-card { min-width: 100px; padding: 14px 16px; }
  .stat-num { font-size: 22px; }

  .news-grid { grid-template-columns: 1fr; }
  .news-card.featured { grid-row: span 1; }

  .category-grid { grid-template-columns: repeat(2, 1fr); }

  .newsletter-inner { flex-direction: column; gap: 28px; }

  .kakao-banner { flex-direction: column; text-align: center; padding: 28px 24px; }

  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 22px; }
  .hero-btns { flex-direction: column; }
  .btn-primary, .btn-secondary { text-align: center; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 스티비 구독 박스 ===== */
.stibee-box {
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.3);
}

.stibee-desc {
  color: rgba(255,255,255,0.92);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 18px;
}

/* ===== 유튜브 버튼 ===== */
.youtube-btn {
  background: #FF0000;
  color: #fff;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
  display: inline-block;
}

.youtube-btn:hover { background: #cc0000; color: #fff; }
