/* ========================================
   WORK PAGE STYLES - LOCOMOTIVE STYLE
======================================== */

body {
    background-color: #fff;
    color: #000;
}

/* ========================================
   HEADER (index/about와 동일)
======================================== */

header {
    width: 93%;
    margin: 0 auto;
    height: 80px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: 400;
    letter-spacing: -0.5px;
    color: #000;
    text-decoration: none;
}

.logo::after {
    content: "®";
    font-size: 12px;
    vertical-align: super;
}

.gnb {
    display: flex;
}

.gnb ul {
    display: flex;
}

.gnb ul li a {
    display: inline-block;
    padding: 0 30px;
    height: 80px;
    line-height: 80px;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: -0.5px;
    color: #000;
    text-decoration: none;
    transition: 0.3s;
}

.gnb ul li a:hover {
    font-weight: 500;
}

/* ========================================
   HERO SECTION
======================================== */

.work-hero {
    width: 93%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 80px;
    padding-bottom: 180px;
}

.work-hero__filter {
    flex: 0 0 auto;
}

.filter-trigger {
    background: none;
    border: none;
    font-family: 'Roboto', sans-serif;
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 0;
    color: #000;
}

.filter-trigger__icon {
    font-size: 22px;
    transition: transform 0.3s ease;
}

.filter-trigger:hover .filter-trigger__icon {
    transform: scaleY(1.3);
}

.filter-trigger__count {
    font-size: 12px;
    vertical-align: super;
    margin-left: 2px;
}

.work-hero__description {
    flex: 0 0 50%;
    text-align: left;
}

.work-hero__description p {
    font-family: 'Roboto', sans-serif;
    font-size: 20px;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: -0.3px;
}

/* ========================================
   FILTER MODAL
======================================== */

.filter-modal {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 1) 70%,
        rgba(255, 255, 255, 0.5) 85%,
        rgba(255, 255, 255, 0) 100%
    );
}

.filter-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.filter-modal__inner {
    width: 93%;
    margin: 0 auto;
    padding-top: 80px;
}

.filter-modal__close {
    background: none;
    border: none;
    font-family: 'Roboto', sans-serif;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    color: #000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 50px;
}

.filter-modal__close i {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.filter-modal__close:hover i {
    transform: rotate(45deg);
}

.filter-modal__content {
    line-height: 1;
}

.filter-modal__item {
    display: inline;
    cursor: pointer;
    opacity: 0.25;
    transition: opacity 0.3s ease;
}

.filter-modal__item:hover,
.filter-modal__item.active {
    opacity: 1;
}

.filter-modal__text {
    font-family: 'Roboto Serif', serif;
    font-size: clamp(56px, 10vw, 120px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.filter-modal__count {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 400;
    vertical-align: super;
    margin-left: 3px;
    margin-right: 12px;
}

/* ========================================
   WORK LIST - LOCOMOTIVE STYLE
======================================== */

.work-list {
    width: 93%;
    margin: 0 auto;
}

.work-item {
    position: relative;
}

/* 기본 상태: border 없음 */
.work-item__row {
    display: grid;
    grid-template-columns: 1fr 1fr 80px;
    align-items: center;
    padding: 15px 0;
    cursor: pointer;
    position: relative;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

/* 호버 시 아래쪽에 굵은 라인 */
.work-item:hover .work-item__row {
    border-bottom-color: #000;
}

/* 오픈 시 라인 유지 */
.work-item.is-open .work-item__row {
    border-bottom-color: #000;
}

.work-item__name {
    position: relative;
    z-index: 1;
}

.work-item__title {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: #000;
}

/* 카테고리 - Hero description과 라인업 (50% 위치) */
.work-item__category {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #000;
    text-align: left;
    position: relative;
    padding-left: calc(50% - 50%);
}

/* 호버 이미지 - 카테고리 왼쪽에 붙어서 표시 */
.work-item__image-holder {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 15px;
    z-index: 10;
    pointer-events: none;
}

.work-item__image {
    width: 0;
    height: 80px;
    overflow: hidden;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
}

.work-item:not(.is-open):hover .work-item__image {
    width: 120px;
}

.work-item__image img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    filter: blur(6px) saturate(0.5);
    transition: filter 0.4s ease;
}

.work-item:not(.is-open):hover .work-item__image img {
    filter: blur(0) saturate(1);
}

/* 위치/인디케이터 */
.work-item__location {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #000;
    text-align: right;
    position: relative;
}

.work-item__location .location-text {
    transition: opacity 0.3s ease;
}

.work-item__location .indicator {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 호버 시: 위치 숨기고 (+) 표시 */
.work-item:hover .work-item__location .location-text {
    opacity: 0;
}

.work-item:hover .work-item__location .indicator {
    opacity: 1;
}

/* 오픈 시: (-) 표시 */
.work-item.is-open .work-item__location .location-text {
    opacity: 0;
}

.work-item.is-open .work-item__location .indicator {
    opacity: 1;
}

/* ========================================
   WORK ITEM DETAIL PANEL - LOCOMOTIVE STYLE
======================================== */

.work-item__detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-item.is-open .work-item__detail {
    max-height: 650px;
}

/* 아코디언과 다음 리스트 아이템 사이 간격 */
.work-item.is-open {
    margin-bottom: 60px;
}

.work-item__detail-inner {
    display: grid;
    grid-template-columns: 120px 1fr 1fr;
    gap: 30px;
    padding: 30px 0 50px;
}

/* 왼쪽: 작은 썸네일 + 태그 */
.work-item__detail-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.work-item__detail-image {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 3px;
}

.work-item__detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-item__detail-tags {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.work-item__detail-tags span {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #000;
    line-height: 1.5;
}

/* 중앙: 큰 이미지 + 연도 */
.work-item__detail-center {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.work-item__detail-hero {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: 3px;
    position: relative;
}

.work-item__detail-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(20px) saturate(0.3);
    transform: scale(1.1);
    transition: filter 1s ease, transform 1s ease;
}

.work-item.is-open .work-item__detail-hero img {
    filter: blur(0) saturate(1);
    transform: scale(1);
}

.work-item__detail-year {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #000;
}

/* 오른쪽: 설명 + 링크들 */
.work-item__detail-right {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.work-item__detail-description {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: 40px;
}

/* 링크 영역 */
.work-item__detail-links {
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

.work-item__detail-link {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #000;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.work-item__detail-link:last-child {
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.work-item__detail-link .arrow {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.work-item__detail-link:hover .arrow {
    transform: translateX(5px);
}

.work-item__detail-link.external:hover .arrow {
    transform: translate(4px, -4px);
}

/* ========================================
   FOOTER
======================================== */

footer {
    width: 93%;
    margin: 0 auto;
    padding: 140px 0 40px;
}

.footer_btm {
    text-align: center;
}

.footer_copyright {
    width: 100%;
    height: auto;
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 1200px) {
    .work-item__detail-inner {
        grid-template-columns: 100px 1fr 1fr;
    }
    
    .filter-modal__text {
        font-size: 80px;
    }
}

@media (max-width: 1024px) {
    .work-hero {
        flex-direction: column;
        gap: 50px;
        padding-top: 60px;
        padding-bottom: 120px;
    }
    
    .work-hero__description {
        flex: 0 0 100%;
    }
    
    .work-hero__description p {
        font-size: 18px;
    }
    
    .filter-trigger {
        font-size: 18px;
    }
    
    .filter-trigger__icon {
        font-size: 20px;
    }
    
    .filter-modal__close {
        font-size: 18px;
    }
    
    .filter-modal__close i {
        font-size: 22px;
    }
    
    .work-item__title,
    .work-item__category,
    .work-item__location {
        font-size: 16px;
    }
    
    .work-item__detail-inner {
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }
    
    .work-item__detail-left {
        display: none;
    }
    
    .filter-modal__text {
        font-size: 60px;
    }
    
    .filter-modal {
        top: 60px;
        height: calc(100vh - 60px);
    }
    
    .filter-modal__inner {
        padding-top: 60px;
    }
    
    .work-item.is-open {
        margin-bottom: 40px;
    }
}

@media (max-width: 768px) {
    header {
        height: 60px;
    }
    
    .logo {
        font-size: 16px;
    }
    
    .gnb ul li a {
        padding: 0 15px;
        height: 60px;
        line-height: 60px;
        font-size: 16px;
    }
    
    .work-hero {
        padding-top: 50px;
        padding-bottom: 80px;
    }
    
    .work-hero__description p {
        font-size: 16px;
    }
    
    .filter-trigger {
        font-size: 16px;
    }
    
    .filter-trigger__icon {
        font-size: 18px;
    }
    
    .filter-modal__inner {
        padding-top: 50px;
    }
    
    .filter-modal__close {
        font-size: 16px;
        margin-bottom: 35px;
    }
    
    .filter-modal__close i {
        font-size: 20px;
    }
    
    .filter-modal__text {
        font-size: 44px;
    }
    
    .work-item__row {
        grid-template-columns: 1fr 1fr;
    }
    
    .work-item__title {
        font-size: 16px;
    }
    
    .work-item__category {
        display: none;
    }
    
    .work-item__location {
        font-size: 14px;
        text-align: right;
    }
    
    .work-item__image-holder {
        display: none;
    }
    
    .work-item__detail-inner {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .work-item__detail-right {
        order: -1;
    }
    
    .work-item.is-open .work-item__detail {
        max-height: 800px;
    }
    
    .work-item__detail-link {
        font-size: 16px;
        padding: 15px 0;
    }
    
    footer {
        padding-top: 80px;
    }
}

@media (max-width: 480px) {
    .filter-modal__text {
        font-size: 32px;
    }
    
    .work-item__title {
        font-size: 14px;
    }
    
    .work-item__location {
        font-size: 12px;
    }
    
    .work-hero__description p {
        font-size: 14px;
    }
    
    .filter-trigger {
        font-size: 14px;
    }
    
    .filter-trigger__icon {
        font-size: 16px;
    }
    
    .filter-modal__close {
        font-size: 14px;
    }
    
    .filter-modal__close i {
        font-size: 18px;
    }
    
    .work-item__detail-description {
        font-size: 14px;
    }
    
    .work-item__detail-link {
        font-size: 14px;
    }
}
