/* =========================================
   News & Activities 레이아웃
   ========================================= */
.sub-news-wrapper {
  width: 100%;
  margin: 0 auto;
  padding: 80px 108px 260px;
  background: #fff;
  box-sizing: border-box;
}

.sub-news-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 68px;
}

.header-titles {
  display: flex;
  flex-direction: column;
}

.sub-news-header .sub-title {
  display: block;
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 400;
  color: #1d1d1d;
  margin-bottom: 12px;
}

.sub-news-header .main-title {
  font-family: var(--font-en);
  font-size: 30px !important;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #1d1d1d;
  margin: 0;
}

/* 4열 그리드 & 왼쪽 기준선 */
.sub-news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-left: 1px solid #e0e0e0;
}

/* 개별 카드 & 오른쪽 기준선 */
.sub-news-item {
  display: flex;
  flex-direction: column;
  padding: 0 28px 140px;
  border-right: 1px solid #e0e0e0;
  text-decoration: none;
  color: #1d1d1d;
  box-sizing: border-box;
  min-width: 0;
}

/* 순서 지정 */
.news-meta { 
  font-size: 12px; 
  color: #999 !important; 
  margin-bottom: 10px; 
  order: 1; 
}

.news-title { 
  font-size: 18px !important; 
  font-weight: 700; 
  line-height: 1.3; 
  color: #222 !important; 
  margin: 0 0 16px 0;
  order: 2; 
  word-break: keep-all; 
}

.news-title a {
  color: #222 !important; 
  text-decoration: none;
  transition: text-decoration 0.2s ease;
}

.news-title a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

.news-img { 
  position: relative !important;
  width: 100% !important;
  margin-bottom: 28px; 
  order: 3; 
  overflow: hidden !important;
  flex-shrink: 0 !important;
}

.news-img::before {
  content: "";
  display: block;
  width: 100%;
  padding-top: 125%; 
}

.news-img a {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

.news-img img { 
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important; 
  height: 100% !important; 
  object-fit: cover !important; 
  display: block !important; 
}

.news-excerpt { 
  font-size: 14px; 
  font-weight: 400; 
  line-height: 1.6; 
  color: #333 !important; 
  word-break: keep-all; 
  margin: 0; 
  order: 4; 
}


@media (max-width: 1499px){
  .sub-news-wrapper {
    padding: 80px 72px 200px;
  }
  
  .sub-news-grid { 
    grid-template-columns: repeat(3, 1fr); 
  }
}

@media (max-width: 1080px){
  .sub-news-grid { 
    grid-template-columns: repeat(2, 1fr); 
  }
}

@media (max-width: 959px) {
  /* 칼럼/소식 */
  .sub-news-wrapper {
    box-sizing: border-box !important;
    padding: 20px 20px 160px !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }
  
  .sub-news-header {
    margin-bottom: 48px;
  }
  
  .sub-news-header .sub-title {
    font-size: 12px;
    margin-bottom: 8px;
  }
  
  .sub-news-header .main-title {
    font-size: 24px !important;
  }
  
  /* Flex 적용 */
  .sub-news-grid { 
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
  }
  
  .sub-news-item { 
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important; 
    max-width: 100% !important;
    flex: none !important;
    padding: 0 !important; 
    margin-bottom: 90px !important; 
    border: none !important; 
    box-sizing: border-box !important;
    overflow: hidden !important;
    min-width: 0 !important;
  }
  
  .sub-news-item:last-child { 
    margin-bottom: 0 !important; 
  }

  /* 텍스트 줄바꿈 */
  .sub-news-item .news-excerpt {
    word-break: break-word;
  }
  
  /* 출력 순서 */
  .sub-news-item .news-meta { 
    order: 1 !important; 
    margin: 0 0 8px 0 !important; 
    font-size: 12px !important; 
  }
  
  .sub-news-item .news-title { 
    order: 2 !important; 
    margin: 0 0 16px 0 !important; 
    font-size: 18px !important;
    line-height: 1.4 !important;
  }
  
  .sub-news-item .news-img {
    order: 3 !important;
    margin: 0 0 24px 0 !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
  }
  
  .sub-news-item .news-excerpt { 
    order: 4 !important; 
    font-size: 13px !important; 
    margin: 0 !important;
  }
}


/* 정적 빌드 보강 */
.news-meta .meta-sep { margin: 0 8px; color: #d3d3d3; }
.sub-news-item.is-hidden { display: none !important; }
.no-news-msg { grid-column: 1 / -1; text-align: center; color: #999; }
