/* ============================================================================
 * File    : portfolio.css
 * Desc    : 포트폴리오 갤러리 및 애니메이션 게시판 스타일
 * ============================================================================ */


.portfolio-group {
    margin-bottom: 80px;
}

.portfolio-group h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 30px;
    font-weight: 800;
}

.title-illustration {
    color: #3b82f6;
}

.title-animation {
    color: #14b8a6;
}

.title-opensource {
    color: #f59e0b;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}


/* 5. 포트폴리오 그리드 레이아웃 */
.portfolio-grid,
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    margin-top: 40px;
}

/* 아이템 카드 공통 스타일 */
.item-card {
    background: #191919;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: 0.3s;
    cursor: pointer;
    position: relative;
}

.item-card:hover {
    transform: translateY(-5px);
}

.item-card img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    transition: 0.5s;
    display: block;
}

.item-card:hover img {
    opacity: 0.6;
}

/* 썸네일 영역을 감싸는 박스 */
.thumbnail-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    background: #000;
    overflow: hidden;
}

.thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: 0.5s;
}

.item-card:hover .thumbnail-wrapper img {
    transform: scale(1.1);
    opacity: 0.7;
}

/* 아이템 정보 (제목, 내용) */
.item-info {
    padding: 20px;
}

.item-info h4 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: white;
}

.item-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #aaa;
    line-height: 1.5;
}

/* 재생 버튼 오버레이 (기본) */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.5rem;
    color: white;
    opacity: 0.8;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    z-index: 2;
}

.item-card:hover .play-overlay {
    color: #14b8a6;
    opacity: 1;
}

/* 애니메이션 게시판 전용: 중복 버튼 해결 */
#grid-animation .item-card::before,
#grid-animation .item-card::after {
    content: none !important;
}

#grid-animation .play-overlay {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0;
    transition: 0.3s ease-in-out;
    z-index: 10;
    pointer-events: none;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#grid-animation .item-card:hover .play-overlay {
    opacity: 1;
    color: #14b8a6;
    transform: translate(-50%, -50%) scale(1.1);
}