/* ==========================================================================
   1986 NEWS - Swiper + Custom Styles (통합 버전)
   ========================================================================== */
@import url("./swiper.css");

/* 아임웹 기본 스타일 초기화 */
#news-section-wrapper * {
  box-sizing: border-box !important;
}

#news-section-wrapper {
  width: 100vw !important;
  max-width: none !important;
  margin: 0 !important;
  margin-left: calc(50% - 50vw) !important;
  padding: 0 !important;
  overflow: visible !important;
  background-color: #f7f7f7;
}


.news-shell {
  background: linear-gradient(180deg, #f7f7f7 0%, #ececec 100%);
  padding: var(--section-pad-block) var(--section-pad-inline);
  display: flex;
  justify-content: center;
}

.news-shell.is-init-hidden {
  opacity: 0;
  visibility: hidden;
}

.news-shell.is-ready {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease;
}

@media screen and (min-width: 1025px) {
  .news-shell.is-ready {
    max-width: none;
    width: 100%;
  }
}

/* 뉴스 섹션 컨테이너 */
.home-news {
  max-width: 1800px !important;
  margin: 0 !important;
  width: 100% !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 0 !important;
}

@media screen and (min-width: 1025px) {
  .home-news {
    max-width: 1250px !important;
  }
}

.news-shell.portfolio-shell-1 .home-news {
  max-width: 1800px !important;
  width: 100% !important;
  overflow: visible !important;
}

.news-shell.portfolio-shell-1 .popular-grid {
  max-width: 1800px;
}


.section-header-row {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 16px !important;
  width: 100% !important;
  flex-wrap: wrap !important;
}


@media screen and (max-width: 1199px) {
  .home-news {
    max-width: none !important;
    margin: 0 !important;
    width: 100% !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .news-shell {
    padding-left: var(--section-pad-inline) !important;
    padding-right: var(--section-pad-inline) !important;
  }
}

@media screen and (max-width: 420px) {
  .section-header-row {
    flex-wrap: nowrap !important;
    align-items: flex-end !important;
    gap: 10px !important;
  }

  .swiper-nav {
    margin-left: auto !important;
    align-self: flex-end !important;
  }
}

/* 네비게이션 버튼 컨테이너 */
.swiper-nav {
  display: flex !important;
  gap: 10px !important;
  justify-content: flex-end !important;
  width: auto !important;
  flex: 0 0 auto !important;
}

/* 네비게이션 버튼 */
.nav-button {
  width: 35px !important;
  height: 35px !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  position: relative !important;
  transition: transform 0.2s ease !important;
}

.nav-button::after {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 16px !important;
  height: 16px !important;
  border: 2.5px solid #111 !important;
  border-left: none !important;
  border-bottom: none !important;
  transform-origin: center !important;
  transition: transform 0.2s ease, border-color 0.2s ease !important;
}

.nav-button--next::after {
  transform: translate(-50%, -50%) rotate(45deg) !important;
}

.nav-button--prev::after {
  transform: translate(-50%, -50%) rotate(225deg) !important;
}

.nav-button:hover {
  transform: translateY(-2px) !important;
}

.nav-button:hover::after {
  border-color: #ff7f00 !important;
}

/* Swiper 슬라이더 - 그림자 잘림 방지 */
.swiper {
  width: 100% !important;
  padding-bottom: 0px !important;
  overflow: hidden !important;
  margin: 0 !important;
}

.swiper-wrapper {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
}

.news-carousel {
  display: block !important;
  overflow: visible !important;
}

@media screen and (min-width: 768px) and (max-width: 1199px) {
  .news-carousel {
    overflow: visible !important;
  }

  .news-carousel .swiper-wrapper {
    overflow: visible !important;
  }
}

/* 슬라이드 카드 */
.swiper-slide {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.0)), var(--slide-bg, url("https://cdn.imweb.me/upload/S20200402f6a4097001dd3/fc561b56820b9.png")) !important;
  border-radius: 26.4px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
  overflow: hidden !important;
  background-size: 100% 100% !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  height: auto !important;
  will-change: transform, box-shadow;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45) !important;
}

/* 호버 효과 */
.swiper-slide:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
  z-index: 10 !important;
}

@media (max-width: 768px) {
  .news-shell.portfolio-shell-1 .swiper-slide:hover {
    transform: none !important;
    z-index: auto !important;
  }

  .news-shell.portfolio-shell-1 .news-heading,
  .news-shell.portfolio-shell-1 .news-desc {
    text-align: left !important;
  }
}

.news-item--dark-text {
  text-shadow: none !important;
  background-image: var(--slide-bg) !important;
  background-color: #ffffff !important;
  border: 1px solid rgba(17, 17, 17, 0.18) !important;
}

.news-shell.whats-next-shell {
  background: #ffffff;
}

/* 뉴스 아이템 링크 */
.news-item a {
  display: block !important;
  text-decoration: none !important;
  color: inherit !important;
  height: 100% !important;
}

/* 카드 내용 영역 */
.item-content {
  padding: 40px 40px 40px 40px !important;
  border-radius: 26.4px 26.4px 0 0 !important;
}

.item-content h4 {
  font-weight: 600 !important;
  margin: 0 0 10px 0 !important;
  padding: 0 !important;
  color: inherit !important;
  line-height: 1.4 !important;
}

.item-divider {
  border: 0 !important;
  height: 1px !important;
  margin: 10px 0 !important;
}

.item-content p {
  line-height: 1.5 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 카드 하단 영역 */
.item-footer {
  padding: 40px 40px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-radius: 0 0 26.4px 26.4px !important;
}

/* 링크 버튼 */
.link-button {
  width: 40px !important;
  height: 40px !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-color: transparent !important;
  border-radius: 100% !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  flex-shrink: 0 !important;
}

/* 날짜 텍스트 */
.date {
  white-space: nowrap !important;
}

/* ==========================================================================
   반응형 디자인
   ========================================================================== */

/* 1024px 이하 - 태블릿 */
@media screen and (max-width: 1024px) {
  .link-button {
    width: 35px !important;
    height: 35px !important;
  }

  .home-news {
    padding: 0 !important;
  }

  .item-content,
  .item-footer {
    padding: 20px 24px !important;
  }
}

/* 768px 이하 - 모바일 */
@media screen and (max-width: 768px) {
  #news-section-wrapper {
    width: 100% !important;
    margin-left: 0 !important;
  }

  .home-news {
    padding: 0 !important;
  }

  .swiper-slide {
    border-radius: 22px !important;
  }

  .item-content,
  .item-footer {
    padding: 18px !important;
  }

  .item-footer {
    padding-bottom: 18px !important;
  }

  .nav-button {
    width: 30px !important;
    height: 30px !important;
  }

  .link-button {
    width: 32px !important;
    height: 32px !important;
  }
}
