/* 블로그 페이지 히어로 */
.sub-page-hero {
  position: relative;
  background: url('../img/blog-banner.webp') center/cover no-repeat;
  padding: 80px 20px;
  text-align: center;
  color: white;
  z-index: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 300px;
}

.sub-page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* 검은색 50% 투명도 */
  z-index: 0;
}

.sub-page-hero h1,
.sub-page-hero p {
  position: relative;
  z-index: 1;
}

.sub-page-hero h1 {
  font-size: var(--font-h1);
  margin-bottom: 1rem;
}

.sub-page-hero p {
  font-size: var(--font-p);
  opacity: 0.9;
}

/* 최신글 슬라이드 */
.blog-hero-swiper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  position: relative;
}

.blog-hero-swiper .swiper-container {
  width: 100%;
  height: 400px;
}

.blog-hero-swiper .swiper-slide {
  position: relative;
  height: 100%;
  overflow: hidden;
}

/* 이미지 오버레이 구조 */
.image-overlay-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.image-overlay-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0));
  color: var(--color-bg);
  font-family: var(--font-family);
  display: block;
  box-sizing: border-box;
  padding: 0;
}

.image-overlay .text-meta {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 100%;
  padding: 0 2rem;
  box-sizing: border-box;
}

.image-overlay h2 {
  font-size: var(--font-h2);
  margin-bottom: 0.5rem;
}

.image-overlay p {
  font-size: var(--font-p);
  margin-bottom: 1rem;
  opacity: 0.9;
}

.image-overlay .read-more {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(255,255,255,0.1);
  color: var(--color-accent);
  border-radius: 4px;
  font-size: 0.95rem;
  text-decoration: none;
}

/* 고구려's NEWS 영역 */
.blog-news {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.blog-news .section-header h2 {
  font-size: var(--font-h2);
  text-align: center;
  margin-bottom: 30px;
}

/* 카드형 포스트 목록 */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.blog-card {
  position: relative;
  overflow: hidden;
}

.blog-card img {
  width: 100%;
  height: auto;
  display: block;
}

.blog-card .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 1rem;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
  color: var(--color-bg);
  box-sizing: border-box;
}

.blog-card .overlay h3 {
  font-size: var(--font-h3);
  margin-bottom: 0.3rem;
}

.blog-card .overlay .meta {
  font-size: 0.875rem;
  opacity: 0.8;
  display: flex;
  gap: 10px;
}

/* 더보기 버튼 */
.load-more-wrapper {
  text-align: center;
  margin-top: 30px;
}

.load-more-button {
  padding: 12px 24px;
  font-size: 1rem;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* 반응형 */
@media (max-width: 768px) {
  .sub-page-hero {
    height: 240px;
    padding: 40px 20px;
  }

  .blog-hero-swiper,
  .blog-news {
    padding: 30px 20px;
  }

  .image-overlay .text-meta {
    padding: 0 1rem;
  }
}
