/* ==========================================
   Projects Section
   ========================================== */

.projects-section {
    padding: 48px 24px;
    background-color: var(--color-sf-00);
}

.projects-section .container {
    max-width: 936px;
    margin: 0 auto;
}

.section-title {
    font-size: 48px;
    font-family: 'The Bold Font', sans-serif;
    font-weight: 700;
    letter-spacing: -2%;
    text-align: center;
    margin-bottom: 40px;
    color: var(--color-obj-00);
}

/* ===== Featured Video ===== */
.featured-video {
    margin-bottom: 16px;
}

.featured-video-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 16px;
}

.featured-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background-color: var(--color-obj-00);
    overflow: hidden;
}

.featured-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none; /* Disable controls by default */
}

/* Enable controls on hover */
.featured-video-wrapper:hover .featured-video-container iframe {
    pointer-events: auto;
}

/* ===== Video Info ===== */
.featured-video-info {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    width: 100%;
}

.featured-video-title-wrapper {
    width: 360px;
    flex-shrink: 0;
}

.featured-video-title {
    font-size: 32px;
    font-family: 'The Bold Font', sans-serif;
    font-weight: 700;
    letter-spacing: -2%;
    color: var(--color-obj-00);
    margin-bottom: 0;
}

.featured-video-meta {
    display: flex;
    gap: 4px;
    align-items: center;
}

.featured-video-year,
.featured-video-category {
    font-size: 16px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 400;
    letter-spacing: -4%;
    color: var(--color-obj);
}

.featured-video-dot {
    width: 1px;
    height: 16px;
    background-color: var(--color-obj);
}

.featured-video-description {
    flex: 1;
    font-size: 16px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: -4%;
    color: var(--color-obj);
    text-align: right;
}

/* ===== Category Filter ===== */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    margin-top: 40px;
}

.category-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 32px;
    font-family: 'The Bold Font', sans-serif;
    font-weight: 700;
    letter-spacing: -2%;
    color: var(--color-sf-03);
    transition: color var(--transition-fast);
    white-space: nowrap;
    padding: 8px 8px 0 0;
}

.category-btn:hover {
    color: var(--color-obj-00);
}

.category-btn.active {
    color: var(--color-obj-00);
}

/* ===== Masonry Grid ===== */
.masonry-grid-wrapper {
    width: 100%;
}

.masonry-grid {
    width: 100%;
    /* Masonry.js will handle positioning */
}

/* Grid sizer for column width calculation */
.grid-sizer,
.masonry-item {
    width: calc((100% - 48px) / 3); /* 3 columns, 24px * 2 gaps = 48px total */
}

.masonry-item {
    margin-bottom: 24px;
}

.portfolio-card {
    position: relative;
    width: 100%;
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.portfolio-card:hover {
    transform: translateY(-4px);
}

.portfolio-card-media {
    position: relative;
    width: 100%;
    background-color: var(--color-sf-01);
    overflow: hidden;
}

/* Video iframe */
.portfolio-card-media iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none; /* Disable controls by default */
}

/* Enable controls on hover for video cards */
.portfolio-card-video:hover .portfolio-card-media iframe {
    pointer-events: auto;
}

/* Image Thumbnail */
.portfolio-card-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-fast);
}

/* Image hover scale effect */
.portfolio-card-image:hover .portfolio-card-media img {
    transform: scale(1.05);
}

/* Overlay removed - video cards now use inline iframes */

/* Card info removed for clean visual design */

/* Loading State */
.masonry-grid-loading {
    text-align: center;
    padding: 64px 0;
    color: var(--color-mid);
    font-family: 'Pretendard', sans-serif;
}

/* Empty State */
.masonry-grid-empty {
    text-align: center;
    padding: 64px 0;
    color: var(--color-mid);
    font-family: 'Pretendard', sans-serif;
}

/* Responsive */
@media (max-width: 768px) {
    .projects-section {
        padding: 32px 16px;
    }

    .section-title {
        font-size: 32px;
        margin-bottom: 24px;
    }

    .featured-video {
        margin-bottom: 16px;
    }

    .featured-video-info {
        flex-direction: column;
        gap: 16px;
    }

    .featured-video-title-wrapper {
        width: 100%;
    }

    .featured-video-title {
        font-size: 24px;
    }

    .featured-video-year,
    .featured-video-category {
        font-size: 14px;
    }

    .featured-video-description {
        font-size: 14px;
        text-align: left;
    }

    .category-filter {
        margin-top: 24px;
        margin-bottom: 16px;
        gap: 8px;
    }

    .category-btn {
        font-size: 20px;
    }

    .masonry-item {
        width: 100%; /* 1 column on mobile */
        margin-bottom: 16px;
    }
}
