/* =====================================================
   main.css — 메인 페이지 스킨 CSS
   ===================================================== */

/* ── 히어로 섹션 ───────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  height:500px;
  color: #fff;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("https://images.unsplash.com/photo-1774677783913-28d8e6470c34?q=80&w=1632&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D");
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0,0,0,.15);
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: .9;
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

/* ── 반응형 ────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero {
    padding: 70px 0 60px;
  }
}


/* ── 카드뉴스 섹션 ───────────────────────────────────── */
.card-news {
  padding: 60px 0;
  background: #f9fafb;
}

/* 그리드 레이아웃 */
.card-news__grid {
  display: grid;
  gap: 24px;
  /* 기본: 4열 */
  grid-template-columns: repeat(4, 1fr);
}

/* 카드 아이템 */
.card-news__item {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  transition: transform .2s, box-shadow .2s;
}
.card-news__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
}

/* 썸네일 */
.card-news__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;          /* 가로세로 비율 고정 */
  background-size: cover;
  background-position: center;
}

/* 제목 */
.card-news__title {
  padding: 16px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

/* ── 반응형 ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .card-news__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .card-news__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .card-news__grid {
    grid-template-columns: 1fr;
  }
}