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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text-body);
  background: var(--body-bg);
  -webkit-font-smoothing: antialiased;
}

.content-box {
  background: var(--color-box-bg);
  border-radius: var(--box-radius);
  padding: var(--box-padding);
  box-shadow: var(--box-shadow);
}

/* 박스·섹션 공통 타이틀 (최신뉴스, 인터뷰, 포토뉴스, 많이 본 뉴스 등) */
.section__title {
  flex-shrink: 0;
  font-size: var(--font-size-section);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 16px;
}

.section__title--sub {
  font-size: var(--font-size-section-sub);
  margin-top: 20px;
  margin-bottom: 12px;
}

/* 리스트 아이템 간격 — margin-top 0, margin-bottom + padding-bottom(구분선 위) */
.ranking-list__item,
.news-list__item,
.text-list__item {
  margin-top: 0;
  margin-bottom: var(--list-item-gap);
  padding-top: 0;
  padding-bottom: var(--list-item-padding-bottom);
  border-bottom: 1px solid var(--color-border);
}

.ranking-list__item:last-child,
.news-list__item:last-child,
.text-list__item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* 우측 사이드 박스 공통 (많이 본 뉴스, 포토뉴스 등) */
.sidebar-box {
  width: 100%;
  max-width: var(--sidebar-width);
  height: 100%;
  min-height: var(--sidebar-min-height);
  display: flex;
  flex-direction: column;
  justify-self: end;
}

.sidebar-box__body {
  flex: 1;
  min-height: 0;
}

/* 메인+사이드바 그리드 */
.layout-main-sidebar {
  display: grid;
  grid-template-columns: var(--grid-main-sidebar);
  gap: var(--gap-box);
  align-items: stretch;
}

.layout-three-sidebar {
  display: grid;
  grid-template-columns: var(--grid-three-with-sidebar);
  gap: var(--gap-box);
  align-items: stretch;
}

.layout-three-sidebar > .content-box:not(.sidebar-box) {
  height: 100%;
}

#main {
  background: var(--body-bg);
  padding-bottom: var(--gap-section);
}

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

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

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input {
  font: inherit;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
