/* ==========================================================================
   work.css — WORK 페이지 전용 스타일
========================================================================== */

/* ========================
   섹션1 : Hero 타이틀
======================== */
.work-hero {
    padding: 120px 0 40px;
    text-align: center;
}

.work-hero__title {
    color: var(--color-black);
    line-height: 1;
    margin-bottom: 16px;
}

.work-hero__sub {
    color: var(--color-text);
}


/* ========================
   섹션2 : 필터 탭
======================== */
.work-filter {
    padding: 40px 0 90px;
}

.work-filter__btn.is-active {
    color: var(--color-red);
    font-weight: 700;
    position: relative;
}

.work-filter__btn.is-active::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: var(--color-red);
}


.work-card {
    width: 100%;        /* ← 추가 */
}

.work-filter__list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    list-style: none;
    flex-wrap: wrap;
}

.work-filter__btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 999px;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}

.work-filter__btn:hover {
    color: var(--color-black);
}

.work-filter__btn.is-active {
    color: var(--color-red);
    font-weight: 700;
}


/* ========================
   섹션3 : 게시물 그리드
======================== */
.work-grid {
    padding-bottom: 60px;
}

.work-grid__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;        /* ← 추가 */
}


/* ========================
   카드
======================== */
.work-card__thumb {
	 width: 100%;        /* ← 추가 */
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #111;
}

.work-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

/* 호버 시 이미지 살짝 줌 + 어둡게 */
.work-card:hover .work-card__thumb img {
    transform: scale(1.04);
    opacity: 0.4;
}

/* 오버레이 */
.work-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-card:hover .work-card__overlay {
    opacity: 1;
}

/* 오버레이 정보 */
.work-card__info {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    margin: 0;
}

.work-card__label, .work-card__value {
	color: #fff;
    white-space: nowrap;
}



.work-grid .center {
    display: block;
    margin-left: auto;
    margin-right: auto;
}



/* ========================
   섹션4 : 페이지네이션
======================== */
.work-pagination {
    padding: 20px 0 100px;
}

.work-pagination__list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #999;
    list-style: none;
}

.work-pagination__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--color-text);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.work-pagination__btn:hover {
    background: #f5f5f5;
    color: var(--color-black);
}

.work-pagination__btn.is-active {
    color: #000;
    font-weight: 700;
}

.work-pagination__btn--arrow {
    font-size: 20px;
    color: #212529 !important;
}

.work-pagination__btn--arrow.is-disabled {
    opacity: 0.3;
    pointer-events: none;
}


/* ========================
   반응형
======================== */
@media (max-width: 900px) {
    .work-hero {
        padding: 80px 0 28px;
    }

    .work-grid__list {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .work-grid__list {
        grid-template-columns: 1fr;
    }

    .work-filter__list {
        gap: 6px;
    }

    .work-filter__btn {
        padding: 6px 14px;
        font-size: 14px;
    }
}



/* ========================
   모달
======================== */
.wm-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    gap: 20px;               /* ← 화살표와 모달 사이 간격 */
}


.wm-backdrop.is-open {
    display: flex;
}

.wm {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 990px;
    max-height: 800px;
    overflow-y: auto;
    border-radius: 20px;
}

.wm__close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #333;
    z-index: 10;
    line-height: 1;
}

/* 슬라이더 */
.wm__slider {
    position: relative;
    width: 100%;
    background: #fff;
    box-sizing: border-box;
    overflow: hidden;
}

.wm__slides {
	padding:55px;
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.wm__slide {
    flex: 0 0 100%;
    height: 100%;
}

.wm__slide img {
    width: 880px;
    height: 450px;
    object-fit: cover;   /* ← cover → contain 으로 변경 */
    display: block;
}

.wm__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    font-size: 20px;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.wm__arrow:hover {
    background: rgba(0,0,0,0.7);
}

.wm__arrow--prev { left: 12px; }
.wm__arrow--next { right: 12px; }

/* 본문 */
.wm__body {
    padding: 0 55px 55px 55px;
}

.wm__desc {
    font-size: 15px;
    color: #444;
    line-height: 1.8;
}