/**
 * Hayaoポートフォリオサイト - 作品一覧ページスタイル
 */

/* ページヘッダー */
.page-header {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, 
        rgba(255, 107, 107, 0.05) 0%, 
        rgba(78, 205, 196, 0.05) 100%);
}

.page-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-title i {
    margin-right: 0.5rem;
}

.page-description {
    color: var(--gray-medium);
    font-size: 1.1rem;
}

/* 作品コンテナ */
.works-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 作品なしの表示 */
.no-works {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-medium);
}

.no-works i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* 作品グリッド */
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

/* 作品アイテム */
.work-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    opacity: 0;
    cursor: pointer;
}

.work-item.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 1;
}

.work-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* 作品画像 */
.work-image-wrapper {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--gray-light);
}

.work-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.work-item:hover .work-image {
    transform: scale(1.1);
}

/* オーバーレイ */
.work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.7) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-item:hover .work-overlay {
    opacity: 1;
}

/* 作品情報 */
.work-info {
    color: var(--white);
    margin-bottom: 1rem;
}

.work-title {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.work-description {
    font-size: 0.9rem;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 表示ボタン */
.view-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    transform: scale(0);
}

.work-item:hover .view-button {
    transform: scale(1);
}

.view-button:hover {
    background: var(--white);
    transform: scale(1.1);
}

.view-button i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* ページネーション */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: var(--transition);
    font-weight: 500;
}

.pagination-prev,
.pagination-next,
.pagination-page {
    background: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.pagination-prev:hover,
.pagination-next:hover,
.pagination-page:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.pagination-current {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    box-shadow: var(--shadow-md);
}

/* ライトボックス */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 1;
}

.lightbox-close:hover {
    background: var(--white);
    transform: scale(1.1);
}

.lightbox-close i {
    font-size: 1.2rem;
    color: var(--text-color);
}

.lightbox-image {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    background: var(--black);
}

.lightbox-info {
    padding: 1.5rem;
    background: var(--white);
}

.lightbox-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.lightbox-description {
    color: var(--gray-medium);
    line-height: 1.6;
}

/* レスポンシブデザイン */
@media (max-width: 992px) {
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .works-grid {
        gap: 1.5rem;
    }
    
    .work-overlay {
        opacity: 1;
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 50%,
            rgba(0, 0, 0, 0.8) 100%
        );
    }
    
    .view-button {
        transform: scale(1);
    }
}

@media (max-width: 576px) {
    .works-container {
        padding: 1rem;
    }
    
    .works-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .work-title {
        font-size: 1.1rem;
    }
    
    .lightbox-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .lightbox-title {
        font-size: 1.2rem;
    }
}