/*work, news css 통합*/
/* ==========================================================================
   1. 테마 변수 설정 (Dark/Light 대응)
   ========================================================================== */
:root {
    --section-bg: #ffffff;
    --text-main: #000000;
    --btn-bg: #ffffff;
    --btn-border: #eeeeee;
    --btn-stroke: #000000;
    --slide-border: #eeeeee;
    --img-fallback: #f0f0f0;
}

[data-bs-theme="dark"] {
    --section-bg: #121212;
    --text-main: #ffffff;
    --btn-bg: #000000;
    --btn-border: #333333;
    --btn-stroke: #ffffff;
    --slide-border: #333333;
    --img-fallback: #252525;
}

/* ==========================================================================
   2. Swiper & Slide 공통 레이아웃
   ========================================================================== */
.swiper {
    position: relative;
}

.works-section, .news-section {
    padding: 60px 0;
    background-color: var(--section-bg);
}

.title-main {
    color: var(--text-main) !important;
    font-weight: bold;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-decoration: none;
    display: block;
}

.swiper-slide {
    width: auto;
    display: flex;
    justify-content: center;
}

/* 섹션별 Wrapper 초기화 */
.work-section .swiper-wrapper,
.works-section .swiper-wrapper,
.news-section .swiper-wrapper {
    display: flex !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.news-swiper, .works-swiper {
    overflow: hidden !important;
}

.swiper-container-outer {
    position: relative;
    padding: 0;
    width: 100%;
}

/* ==========================================================================
   3. 화살표 버튼 (btn-arrow) 공통 스타일 및 개별 위치
   ========================================================================== */
.btn-arrow {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 70px !important;
    height: 70px !important;
    background: var(--btn-bg) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    border: 1px solid var(--btn-border) !important;
    z-index: 2 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

/* [개별] Works 섹션 화살표 위치 (포스터 중앙 기준) */
.works-section .btn-arrow {
    top: 100px !important;
    transform: none !important;
}

/* [개별] News 섹션 화살표 위치 (썸네일 중앙 기준) */
.news-section .btn-arrow {
    top: 30px !important;
    transform: none !important;
}

/* 화살표 좌우 간격 (Works/News 구분) */
.custom-prev { left: -30px !important; }
.custom-next { right: -30px !important; }
.custom-prev2 { left: -30px !important; }
.custom-next2 { right: -30px !important; }

/* 비활성화 상태 */
.swiper-button-disabled {
    opacity: 0.3 !important;
    cursor: auto !important;
}

/* 화살표 내부 아이콘(SVG) 및 선 설정 */
.btn-arrow svg {
    width: 45px !important;
    height: 45px !important;
}

.btn-arrow svg path {
    stroke: var(--btn-stroke) !important;
    stroke-width: 3 !important;
    fill: none;
}

/* 호버 효과 */
.btn-arrow:hover {
    transform: scale(1.1) !important;
    background: var(--btn-bg) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2) !important;
}

/* Works/News 섹션 호버 시 공통 스케일 확대 유지 */
.works-section .btn-arrow:hover,
.news-section .btn-arrow:hover {
    transform: scale(1.1) !important;
}

.btn-arrow:hover svg path {
    stroke: var(--btn-stroke) !important;
}

/* ==========================================================================
   4. 이미지 스타일 (News/Works 공통 및 개별)
   ========================================================================== */
/* News 섹션 전용 이미지 비율 */
.news-swiper .swiper-slide img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    transition: filter 0.3s ease;
    border: 1px solid var(--btn-stroke);
}

/* 공통 이미지 스타일 */
.img-ratio img, .img-box.thumb img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    background-color: var(--img-fallback);
}

/* ==========================================================================
   5. 텍스트 및 제목 말줄임 (두 줄 고정)
   ========================================================================== */
.typo-area dt, .typo-area .title span {
    /*color: var(--text-main) !important;*/
    color: var(--text-main);
    display: block;
    margin-top: 10px;
}

.typo-area dt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* 두 줄 말줄임 */
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 18px;
    line-height: 28px;
    font-weight: 500 !important;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

@media (max-width: 520px) {
    /* [개별] Works 섹션 화살표 위치 (포스터 중앙 기준) */
    .works-section .btn-arrow {
        top: 70px !important;
        transform: none !important;
    }

    /*!* [개별] News 섹션 화살표 위치 (썸네일 중앙 기준) *!*/
    /*.news-section .btn-arrow {*/
    /*    top: 30px !important;*/
    /*    transform: none !important;*/
    /*}*/
}