/* Custom styles */
body {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    background-color: #000000;
    color: #ffffff;
}
textarea {
    resize: vertical;
}

/* --- Index Page Hero --- */
.index-full-hero-video-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.index-full-hero-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Index Page New Layout --- */
.portfolio-columns-container {
    display: grid;
    grid-template-columns: 1fr; /* 모바일: 1열 */
    gap: 1.5rem;
}
@media (min-width: 768px) { 
    .portfolio-columns-container { 
        grid-template-columns: 1fr 1fr; /* 태블릿 & 데스크탑: 2열 */
    } 
    .portfolio-column.right-column {
        margin-top: 8rem; /* 오른쪽 열을 아래로 내려 어긋나게 배치 */
    }
}

.portfolio-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* 영상 사이의 수직 간격 */
}

/* Visuals 페이지 전용 그리드 설정 */
#works .portfolio-grid {
    column-count: 2;
    column-gap: 1.5rem;
}
@media (min-width: 768px) { #works .portfolio-grid { column-count: 3; } }
@media (min-width: 1024px) { #works .portfolio-grid { column-count: 4; } }


.portfolio-item, .intro-text-block {
    width: 100%;
    position: relative;
}
.intro-text-block {
    padding-bottom: 2rem; 
}

.portfolio-item {
    overflow: hidden;
    cursor: pointer;
}
.portfolio-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}
.portfolio-item:hover img {
    transform: scale(1.05);
}
.portfolio-item .portfolio-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}
.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}
.portfolio-item .play-icon {
    transition: transform 0.3s ease;
    transform: scale(0.9);
}
.portfolio-item:hover .play-icon {
    transform: scale(1);
}

/* --- Video Modal Common Styles --- */
.video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 5rem 1rem 1rem 1rem;
    box-sizing: border-box;
}
.video-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.video-modal-close {
    position: fixed;
    top: 1.5rem;
    right: 2rem;
    color: #aaa;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    z-index: 1001;
    transition: color 0.3s ease;
}
.video-modal-close:hover {
    color: #fff;
}

/* --- Visuals Modal with Credits --- */
#video-modal .video-modal-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-width: 90vw;
    max-height: 100%;
    background-color: transparent;
    gap: 2rem;
}
#video-modal .modal-video-wrapper {
    flex-grow: 1;
    min-height: 0;
}
#video-modal .modal-video-wrapper iframe {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
}
#video-modal .modal-credits-wrapper {
    color: #a0aec0;
    font-size: 0.875rem;
    line-height: 1.6;
    overflow-y: auto;
    flex-basis: 300px;
    flex-shrink: 0;
}
@media (min-width: 1024px) {
    #video-modal .video-modal-content {
        flex-direction: row;
    }
}

/* --- Stories Modal with Credits --- */
#story-video-modal .video-modal-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-width: 95vw;
    max-height: 100%;
    background-color: transparent;
    gap: 1.5rem;
}
#story-video-modal .modal-video-wrapper {
    flex-shrink: 0;
    margin: 0 auto;
    height: 70vh;
}
#story-video-modal .modal-video-wrapper video {
    width: auto;
    height: 100%;
    aspect-ratio: 1080 / 1350;
}
#story-video-modal .modal-credits-wrapper {
    color: #a0aec0;
    font-size: 0.875rem;
    line-height: 1.6;
    overflow-y: auto;
    text-align: center;
}
@media (min-width: 1024px) {
    #story-video-modal .video-modal-content {
        flex-direction: row;
        max-width: 60vw;
        max-height: 85vh;
        align-items: center;
    }
    #story-video-modal .modal-video-wrapper {
        height: 100%;
    }
    #story-video-modal .modal-credits-wrapper {
        flex-basis: 320px;
        flex-shrink: 0;
        text-align: left;
        padding-left: 2rem;
    }
}

/* --- Modal Credits Content Styles --- */
.modal-credits-wrapper h4 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.modal-credits-wrapper p {
    margin-bottom: 1.5rem;
}
.modal-credits-wrapper strong {
    color: #d1d5db;
    display: block;
}

/* --- Filter Styles --- */
.primary-filter-btn { color: #9ca3af; font-weight: 700; font-size: 1.125rem; text-transform: uppercase; letter-spacing: 0.05em; transition: color 0.3s ease; background-color: transparent; padding: 0.5rem; }
.primary-filter-btn:hover { color: #ffffff; }
.primary-filter-btn.active { color: #ffffff; }
.secondary-filter-btn { padding: 0.5rem 1.25rem; border: 1px solid #4a5568; border-radius: 9999px; color: #a0aec0; font-weight: 600; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; transition: all 0.3s ease; background-color: transparent; cursor: pointer; opacity: 0; transform: translateY(-10px); animation: fadeIn 0.5s ease forwards; }
.secondary-filter-btn:hover { background-color: #2d3748; color: #ffffff; }
.secondary-filter-btn.active { background-color: #ffffff; color: #000000; border-color: #ffffff; }
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }
.portfolio-item.hidden { transform: scale(0.95); opacity: 0; transition: transform 0.4s ease, opacity 0.4s ease; }

/* --- More Link Styles --- */
.more-link {
    display: inline-block;
    color: #ffffff;
    font-size: 1.25rem; /* text-2xl */
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 1rem 3rem;
    border: 2px solid #ffffff;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

.more-link:hover {
    background-color: #ffffff;
    color: #000000;
}
