/* News Grid Variation Styles */
.news-grid-variation-page {
  min-height: 100vh;
  background: var(--color-background);
  position: relative;
}

/* Background Image */
.news-grid-variation-page .background-image {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;  /* 뷰포트 전체 너비 */
  height: 100vh !important;  /* 뷰포트 전체 높이 */
  z-index: 1;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important; 
  transition: opacity 0.8s ease-in-out;
  opacity: 1;
  will-change: opacity;
  /* iOS Safari 상태바 영역까지 확장 - 더 강력한 설정 */
  top: -120px !important;  /* iOS 상태바 위쪽까지 확장 */
  height: calc(100vh + 120px + 34px) !important;  /* 위쪽 확장 + 뷰포트 + 하단 영역 */
  min-height: calc(100vh + 120px + 34px) !important;
  /* 기본 배경색 제거 */
  background-color: transparent !important;
  /* 추가 확장 설정 */
  z-index: -1 !important;  /* 더 뒤쪽으로 */
  /* 뷰포트 전체 커버 */
  left: 50% !important;
  transform: translateX(-50%) translateY(-120px) !important;
  /* 상태바 영역 강제 확장 */
  margin-top: -120px !important;
  padding-top: 120px !important;
}

.news-grid-variation-root {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
}

.news-grid-variation-root .news-grid-container {
  position: relative;
  z-index: 2;
}

.news-grid-container {
  display: flex;
  max-width: 100%;
  margin: 0 auto;
}

.news-grid-left-space {
  width: 25rem;
  flex-shrink: 0;
}

.news-grid-content {
  flex: 1;
  padding: 3rem 3rem 8rem;
}

.news-grid-variation-page .page-header {
  margin-bottom: 3rem;
}

.news-grid-variation-page .page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .5rem;
  width: 100%;
}

.news-grid-item {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.news-grid-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.news-grid-thumbnail {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.news-grid-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-grid-item:hover .news-grid-thumbnail img {
  transform: scale(1.05);
}

.news-grid-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  opacity: 0;
}

.news-grid-item:hover .news-grid-overlay {
  transform: translateY(0);
  opacity: 1;
}

.overlay-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.overlay-category {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: var(--color-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  align-self: flex-start;
}

.overlay-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.overlay-summary {
  font-size: 0.875rem;
  line-height: 1.4;
  margin: 0;
  opacity: 0.9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.overlay-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  opacity: 0.8;
}

.overlay-date {
  font-weight: 500;
}

.overlay-source {
  font-weight: 600;
  color: var(--color-primary);
}

/* Responsive Design */
@media (max-width: 1400px) {
  .news-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1200px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .news-grid-left-space {
    width: 20rem;
  }
  
  .news-grid-content {
    padding: 2rem 2rem 8rem 0;
  }
}

@media (max-width: 991px) {
  
  .news-grid-left-space {
    width: 0;
  }
  .news-grid {
    grid-template-columns: 1fr 1fr;
    gap: .25rem;
  }
  
  .news-grid-content {
    padding: var(--header-height) 1rem 8rem 1rem;
  }
  
  .news-grid-variation-page .page-header {
    margin-bottom: 2rem;
  }
  
  .news-grid-variation-page .page-header h1 {
    font-size: 1.75rem;
  }
  
  .news-grid-overlay {
    padding: 1rem;
  }
  
  .overlay-title {
    font-size: 1rem;
  }
  
  .overlay-summary {
    font-size: 0.875rem;
  }
}
