/* ==========================================================================
   common.css - 뉴스픽투데이 (newspicktoday.com)
   Theme: red_portal
   ========================================================================== */
:root {
  --primary: #ec3838;
  --primary-dark: #b91c1c;
  --primary-light: #fee2e2;
  --accent: #ef4444;
  --bg-main: #f8fafc;
  --bg-sub: #ffffff;
  --text-main: #1e293b;
  --text-sub: #64748b;
  --border: #e2e8f0;
  --container-width: 1160px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: all 0.2s ease; }
a:hover { color: var(--primary); }
ul, ol, li { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; outline: none; }

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

.content-wrapper {
  display: flex;
  gap: 32px;
  padding: 32px 0;
}

.main-content {
  flex: 1;
  min-width: 0;
  background: var(--bg-sub);
  padding: 28px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.aside.view-sidebar {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Header */
.site-header {
  background: #ffffff;
  border-bottom: 3px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 20px 16px 20px;
}
.site-logo img { height: 80px; width: auto; object-fit: contain; }
.header-tagline { font-size: 13px; color: var(--text-sub); font-weight: 500; }
.header-search {
  display: flex;
  align-items: center;
  border: 2px solid var(--primary);
  border-radius: 25px;
  overflow: hidden;
  background: #ffffff;
  padding: 2px 4px 2px 14px;
}
.header-search input {
  border: none;
  background: transparent;
  font-size: 14px;
  width: 190px;
  color: var(--text-main);
}
.header-search button {
  background: var(--primary);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 13px;
}
.btn-mobile-menu {
  display: none;
  font-size: 26px;
  color: var(--text-main);
  padding: 4px;
}

/* Navigation */
.main-nav {
  background: var(--primary);
}
.nav-list {
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow-x: auto;
  white-space: nowrap;
  padding: 0;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-list li { flex: 0 0 auto; }
.nav-list li a {
  display: block;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  transition: all 0.2s;
}
.nav-list li a:hover, .nav-list li a.active {
  background: rgba(255,255,255,0.15);
  color: #fef08a;
}

/* Section Titles */
.section-title {
/*  font-size: 18px;*/
  font-weight: 800;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-main);
}

.section-title .more-link { font-size: 13px; color: var(--text-sub); }

/* Grid Formats */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 36px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 36px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-bottom: 36px; }

.card-item {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.06);
}
.card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}
.card-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}
.card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta { font-size: 12px; color: var(--text-sub); }

/* Feed Row */
.feed-list {     display: grid;
    grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 36px; }
.feed-item {
  display: flex;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.feed-thumb {
  width: 130px;
  height: 120px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
}
.feed-thumb img { width: 100%; height: 100%; object-fit: cover; }
.feed-info { flex: 1; }
.feed-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; line-height: 1.4; }
.feed-desc {
  font-size: 13px;
  color: var(--text-sub);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

/* Article View Page */
.article-view-header {
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}
.article-view-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.article-view-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 14px;
}
.article-view-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-sub);
}
.article-view-body {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-main);
  margin-bottom: 36px;
}
.article-view-body img { margin: 20px auto; border-radius: 8px; }

.article-tools {
  display: flex;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
}
.tool-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-main);
}
.tool-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Footer */
.site-footer {
  background: #111827;
  color: #9ca3af;
  padding: 44px 0 60px;
  font-size: 13px;
  border-top: 1px solid var(--border);
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid #374151;
}
.footer-nav a { color: #e5e7eb; font-weight: 600; }
.footer-nav a:hover { color: var(--accent); }
.footer-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px 24px;
  line-height: 1.8;
}
.footer-info div strong { color: #f3f4f6; margin-right: 10px; }
.footer-copyright {
  margin-top: 28px;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
  .content-wrapper { flex-direction: column; padding: 20px 0; }
  .main-content { width: 100%; padding: 20px; }
    .aside.view-sidebar { width: auto; margin: 0 20px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .header-top { flex-wrap: wrap; gap: 12px; }
  .header-tagline { display: none; }
  .header-search { order: 3; width: 100%; margin-top: 8px; }
  .header-search input { flex: 1; width: auto; }
  .btn-mobile-menu { display: inline-block; }
  .nav-list { display: none; flex-direction: column; width: 100%; }
  .nav-list.active { display: flex; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .article-view-title { font-size: 22px; }
  .feed-item { flex-direction: column; align-items: flex-start; }
  .feed-thumb { width: 100%; height: 120px; }
    .article-view-meta {
    gap: 0;
    flex-direction: column;
}
}


/* ==========================================================================
   히어로 3단 롤링 슬라이더 CSS
   ========================================================================== */
.hero-slider-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 36px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.hero-slides {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.hero-slide {
  flex: 0 0 100%; /* 한 번에 1개의 슬라이드를 가로 꽉 차게 표시 */
  position: relative;
  display: block;
}

.hero-slide img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

.hero-slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 60px 30px 30px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  color: #fff;
  pointer-events: none; /* 텍스트 위에서도 링크 클릭이 되도록 설정 */
}

.hero-slide-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #fff;
  line-height: 1.3;
}

.hero-slide-desc {
  font-size: 15px;
  color: #e2e8f0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 하단 인디케이터(Dots) 스타일 */
.slider-dots {
  position: absolute;
  bottom: 20px;
  right: 30px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.slider-dots .dot {
  width: 10px;
  height: 10px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-dots .dot.active {
  background: var(--primary); /* 메인 테마 색상(빨간색) 적용 */
  width: 24px;
  border-radius: 5px;
}

@media (max-width: 768px) {
  .hero-slide img {
    height: 300px;
  }
  .hero-slide-title {
    font-size: 20px;
  }
  .hero-slide-content {
    padding: 40px 20px 20px;
  }
}


/* 기본 광고 배너 */
.ad-banner { width: 100%; background-color: #161B2E; /*border: 1px solid #1e293b;*/  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; cursor: pointer; margin: 2rem 0; padding:0; border-radius: 0;  }
@media (min-width: 768px) { .ad-banner {  } }
.ad-bg { position: absolute; inset: 0; background: linear-gradient(to right, rgba(30,58,138,0.1), transparent, rgba(30,58,138,0.1)); opacity: 0.5; }
.ad-content { position: relative; z-index: 10; text-align: center; }
.ad-label { font-size: 10px; color: #64748b; text-transform: uppercase; letter-spacing: 0.1em; font-weight: bold; display: block; margin-bottom: 0.25rem; }
.ad-text { color: #94a3b8; font-weight: 500; }
@media (min-width: 768px) { .ad-text { font-size: 1.125rem; } }
.ad-badge {position: absolute;top: 3px;right: 3px;font-weight: bold;margin: auto;display: flex;align-items: center;font-size: 10px;background: rgba(0, 0, 0, 0.1);color: #cecdcd;padding: 2px 6px;border-radius: 0;}

/* 우측 광고배너 */
.banner_ad{position:absolute;top:2px; right:2px; width: auto !important; height: 16px; z-index:1;cursor:pointer}

