/* ========================================================================
   상세 비주얼
   ======================================================================== */
.custom-news-detail {
  width: 100%;
  margin: 0 auto;
  padding: 60px 190px 380px;
  position: relative;
}

.custom-news-detail .detail-content {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
}

/* 언어 래퍼 — 빌드(convert.strip_lang)가 남긴 언어 쪽에 active + 인라인 display:block 을 붙임.
   !important 는 그 인라인 값을 이기기 위해 필요(모바일은 display:contents) */
.news-lang-wrapper { 
  display: none !important; 
}

.news-lang-wrapper.active { 
  display: block !important; 
}

/* 좌측 텍스트 영역 */
.custom-news-detail .detail-text-col {
  flex: 0 0 30%;
  max-width: 30%;
  position: sticky;
  top: calc(var(--pl-header-h) + 82px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
}

/* 우측 이미지 영역 */
.custom-news-detail .detail-image-col {
  flex: 0 0 45%;
  max-width: 45%;
}

.custom-news-detail .mo-image-wrap {
  display: none !important;
}

.custom-news-detail .detail-image-col img,
.custom-news-detail .detail-inline-gallery img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 48px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.custom-news-detail .detail-image-col img:last-child,
.custom-news-detail .detail-inline-gallery img:last-child {
  margin-bottom: 0 !important;
}

.custom-news-detail .detail-inline-gallery {
  width: 100%;
  display: block;
  padding: 0;
  margin: 0;
}

/* 텍스트 타이틀 & 내용 */
.custom-news-detail .detail-text-col h3 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  color: #1d1d1d;
  margin-top: 0;
  margin-bottom: 40px;
  word-break: keep-all;
}

.custom-news-detail .detail-meta {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: #999;
  margin: 0;
  word-break: keep-all;
}

.custom-news-detail .detail-desc p {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.68;
  color: #333 !important;
  margin: 18px 0 0;
  word-break: break-all;
}

/* 링크 */
.detail-link {
  font-family: var(--font-en);
  display: inline-flex !important;
  width: max-content !important;
  align-items: center;
  text-decoration: none;
  color: #1d1d1d !important;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0; 
  margin-top: 38px;
}

.detail-link .txt {
  position: relative;
  padding-bottom: 4px;
}

.detail-link .txt::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: #d3d3d3;
}

.detail-link .txt::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: #000; 
  z-index: 1;
  transform: scaleX(0); 
  transform-origin: left; 
  transition: transform 0.3s ease-out; 
}

.detail-link:hover .txt::before { transform: scaleX(1); }

.detail-link::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 0 2px 6px;
  background: url('/wp-content/uploads/2026/05/sub_black_arrow.png') no-repeat center;
  background-size: contain;
}

/* 영문 제목 자간 (본문 제목 + 하단 목록 제목 — 둘 다 #news-wrap-en 안). 영문 폰트는 common.css body.lang-en */
#news-wrap-en h3 {
  letter-spacing: -0.01em;
}

@media (max-width: 1920px) {
  .custom-news-detail {
    padding: 60px 108px 380px;
  }
  
  .custom-news-detail .detail-text-col {
    flex: 0 0 40%;
    max-width: 40%;
  }
}

@media (max-width: 1499px) {
  .custom-news-detail {
    padding: 60px 72px 380px;
  }
}

@media (max-width: 959px) {
  /* 레이아웃 */
  .custom-news-detail {
    padding: 40px 20px 100px;
    position: relative;
  }
  
  /* 모바일 세로 배치 */
  .custom-news-detail .detail-content {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
  }
  
  .custom-news-detail .detail-text-col { 
    display: contents !important; 
  }
  
  .news-lang-wrapper { 
    display: none !important; 
  }
  
  .news-lang-wrapper.active { 
    display: contents !important;
  }
  
  /* 개별 요소 블록화 */
  .custom-news-detail .detail-meta,
  .custom-news-detail .detail-image-col,
  .custom-news-detail .detail-text-col h3,
  .custom-news-detail .detail-desc,
  .detail-link {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    float: none !important;
    display: block !important;
  }
  
  /* 순서 재배치 */
  .custom-news-detail .detail-text-col h3 {
    order: 1 !important;
    font-size: 24px !important;
    margin: 0 0 38px 0 !important;
  }
  
  .custom-news-detail .detail-meta {
    order: 2 !important;
    font-size: 12px !important;
  }

  .custom-news-detail .detail-desc {
    order: 3 !important;
    margin: 0 !important;
  }

  .custom-news-detail .detail-desc p {
    font-size: 14px !important;
    margin: 14px 0 0 !important;
  }

  .detail-link { 
    order: 4 !important;
    display: inline-flex !important;
    width: max-content !important; 
    align-self: flex-start !important;
    align-items: center !important;
    margin: 40px 0 80px !important;
    font-size: 13px !important;
    box-sizing: border-box;
  }
  
  .detail-link::after {
    width: 8px !important;
    height: 8px !important;
    margin: 0 0 2px 6px !important;
  }

  /* 모바일 이미지 슬라이더 */
  .custom-news-detail .mo-image-wrap {
    display: block !important;
    order: 5 !important;
    margin: 0 !important;
    overflow: hidden;
  }
  
  .custom-news-detail .pc-image-wrap {
    display: none !important;
  }
  
  /* 이미지 비율 적용 */
  .mo-image-wrap .swiper-slide img {
    width: 100%;
    aspect-ratio: 3 / 4 !important;
    object-fit: cover;
    margin-bottom: 0;
  }
  
  /* 모바일 슬라이더 페이징(점) 스타일 */
  .detail-swiper .swiper-pagination {
    position: relative !important;
    bottom: auto !important;
    margin-top: 18px;
    line-height: 1;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .detail-swiper .swiper-pagination-bullet {
    width: 6px !important;
    height: 6px !important; 
    border-radius: 10px !important; 
    background: #ccc !important;
    opacity: 1;
    margin: 0 4px !important;
    transition: all 0.3s ease;
  }
  
  .detail-swiper .swiper-pagination-bullet-active {
    background: #1d1d1d !important;
  }
}


/* ===== 하단 최신 글(custom_post_nav) ===== */
.custom-news-section {
  position: relative;
  width: 100%;
  margin: 0 auto;
  padding: 0 190px 240px;
  box-sizing: border-box;
}

/* 상단 타이틀 영역 (PC 좌측 고정) */
.custom-news-section .news-top-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
}

.custom-news-section .news-title-area {
  flex: 0 0 30%;
  max-width: 30%;
  text-align: left;
  position: sticky;
  top: calc(var(--pl-header-h) + 82px);
}

.custom-news-section .news-title {
  font-family: var(--font-en);
  font-size: 30px !important;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 18px !important;
  color: #1d1d1d !important;
}

/* 서브 문구 */
.news-subtitle {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.68;
  color: #333 !important;
  margin: 0 !important;
  word-break: keep-all;
}

/* 슬라이더 영역 & 더보기 */
.custom-news-section .news-slider-area {
  flex: 0 0 45%;
  max-width: 45%;
}

.news-slider-controls {
  display: none;
}

.swiper-wrapper {
  display: flex;
  flex-direction: column;
}

.swiper-slide {
  height: auto;
}

.custom-news-section .news-item {
  display: flex !important;
  align-items: stretch !important; 
  padding: 25px 0 50px;
  border-top: 1px solid #222;
}

.custom-news-section .news-item:last-child {
  border-bottom: none !important;
}

.custom-news-section .swiper {
  border-bottom: 1px solid #000;
}

.custom-news-section .news-image-wrap {
  flex: 0 0 32%;
  max-width: 32%;
  padding-right: 34px;
  overflow: hidden;
}

.custom-news-section .news-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f5f5f5;
}

.custom-news-section .news-content {
  flex: 0 0 64%;
  max-width: 64%;
  display: flex;
  flex-direction: column !important;
  justify-content: flex-start;
  text-align: left;
}

.custom-news-section .news-heading {
  font-size: 18px !important;
  font-weight: 700;
  color: #1d1d1d !important;
  line-height: 1.3;
  margin: 0 0 8px 0 !important;
  width: 100%;
  word-break: keep-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-news-section .news-heading a {
  color: #222 !important;
  text-decoration: underline !important;
  text-decoration-color: transparent !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 5px !important;
  transition: border-color 0.2s ease;
}

.custom-news-section .news-heading a:hover {
  text-decoration-color: #1d1d1d !important;
}

.custom-news-section .news-desc {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
  font-size: 15px;
  color: #333;
  margin: 0 !important;
}

/* 영문 뉴스 제목 및 본문 */
#news-wrap-en .news-desc {
  word-break: break-all !important;
}

.news-link { 
  margin-top: auto !important; 
  font-family: var(--font-en); 
  display: inline-flex !important; 
  width: max-content !important; 
  align-items: center; 
  color: #1d1d1d !important; 
  font-size: 13px; 
  font-weight: 500; 
  cursor: pointer; 
  padding: 0; 
  text-decoration: none; 
}

.news-link .txt { 
  position: relative; 
  padding-bottom: 4px; 
}

.news-link .txt::after { 
  content: ''; 
  position: absolute; 
  left: 0; 
  bottom: 0; 
  width: 100%; 
  height: 2px; 
  background-color: #d3d3d3; 
}

.news-link .txt::before { 
  content: ''; 
  position: absolute; 
  left: 0; 
  bottom: 0; 
  width: 100%; 
  height: 2px; 
  background-color: #000; 
  z-index: 1; 
  transform: scaleX(0); 
  transform-origin: left; 
  transition: transform 0.3s ease-out; 
}

.news-link:hover .txt::before { 
  transform: scaleX(1); 
}

.news-link::after { 
  content: ''; 
  display: inline-block; 
  width: 8px; 
  height: 8px; 
  margin: 0 0 2px 6px; 
  background: url('/wp-content/uploads/2026/05/sub_black_arrow.png') no-repeat center; 
  background-size: contain; 
}

/* 더보기 버튼 */
.news-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.news-load-more-btn {
  padding: 6px 42px;
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 500;
  color: #1d1d1d;
  background: #fff;
  border: 1px solid #1d1d1d;
  cursor: pointer;
  transition: all 0.3s ease;
}

.news-load-more-btn:hover {
  background: #1d1d1d;
  color: #fff;
}

/* PC: 처음 2묶음(4개)만 노출, 3번째 묶음부터 숨김 (MORE 클릭 시 2묶음씩 노출) */
@media (min-width: 960px) {
  .slide-chunk-ko:nth-child(n+3),
  .slide-chunk-en:nth-child(n+3) {
    display: none;
  }
  
  .slide-chunk-ko.is-visible,
  .slide-chunk-en.is-visible {
    display: flex !important;
    flex-direction: column;
  }
}

@media (min-width: 960px) {
  .custom-news-section .news-meta {
    display: none !important;
  }
}

@media (max-width: 1920px){
  .custom-news-section {
    padding: 0 108px 300px
  }
  
  .custom-news-section .news-title-area {
    flex: 0 0 40%;
    max-width: 40%;
  }
  
  .custom-news-section .news-desc {
    line-height: 1.6;
    -webkit-line-clamp: 2
  }
}

@media (max-width: 1499px) {
  .custom-news-section {
    padding: 0 72px 240px;
  }
}

@media (max-width: 1200px) {
  .custom-news-section .news-desc {
    display: none
  }
  
  .custom-news-section .news-image-wrap {
    flex: 0 0 40%;
    max-width: 40%;
    padding-right: 28px;
  }
  
  .custom-news-section .news-meta {
    display: block !important;
    font-family: var(--font-en);
    font-size: 12px;
    color: #999 !important;
    margin: 0 0 16px 0 !important;
  }
  
  .news-link {
    font-size: 12px;
  }
  
  .news-load-more-btn {
    padding: 5px 34px;
    font-size: 12px;
  }
}

@media (max-width: 959px) {
  .custom-news-section {
    padding: 0 20px 160px;
  }
  
  .custom-news-section .news-title-area {
    position: static;
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 38px;
  }
  
  .custom-news-section .news-title {
    font-size: 24px !important;
    margin: 0 0 18px !important;
  }
  
  .news-subtitle {
    font-size: 14px;
  }
  
  .custom-news-section .news-slider-area {
    flex: 0 0 100%;
    max-width: 100%;
    position: relative;
  }
  
  .news-slider-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end !important;
    width: 100%;
    margin-bottom: 12px;
    padding: 0;
  }
  
  .news-slider-arrows {
    display: none !important;
  }
  
  /* 숫자 페이징 스타일링 */
  .news-slider-counter {
    font-family: var(--font-en);
    font-size: 13px;
    font-weight: 500;
    color: #999;
    text-align: right;
    display: block;
  }

  .news-slider-counter .swiper-pagination-current {
    color: #1d1d1d;
    font-weight: 500;
  }
  
  .swiper-wrapper {
    flex-direction: column;
  }
  
  .swiper-initialized .swiper-wrapper {
    flex-direction: row !important; 
  }
  
  /* 모바일 환경: 더보기 버튼 대신 스와이퍼(좌우 슬라이드) */
  .news-load-more-wrap {
    display: none !important;
  }
  
  .custom-news-section .news-item {
    padding: 20px 0 38px;
  }
  
  /* 이미지 영역 */
  .custom-news-section .news-image-wrap {
    flex: 0 0 42%;
    max-width: 42%;
    padding-right: 20px;
  }
  
  /* 텍스트 영역 */
  .custom-news-section .news-content {
    flex: 0 0 54%;
    max-width: 54%;
  }
  
  /* 뉴스 제목 */
  .custom-news-section .news-heading {
    font-size: 16px !important;
    word-break: keep-all;
  }
  
  .custom-news-section .news-heading a,
  .custom-news-section .news-heading a:hover {
    border-bottom: none !important; 
    padding-bottom: 0;
  }
}
