/* works.css */

/* ページ固有のスタイル */

/* 作品コンテナのスタイル */
#works-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin: 40px auto 10px;
    padding: 0 20px;
    max-width: 1200px;
    box-sizing: border-box;
}

.work-item {
    margin: 5px;
    box-sizing: border-box;
    position: relative;
    cursor: pointer;
    display: inline-block;
}

.work-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.work-item:not(.full-width) {
    width: calc(50% - 10px);
    max-width: calc(50% - 10px);
}

.work-item.full-width {
    width: calc(100% - 10px);
    max-width: calc(100% - 10px);
}

/* 3D立体カードスタイル */
.work-card {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 15px;
    /* 3D立体効果 */
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(255, 255, 255, 0.6) 50%, 
        rgba(200, 200, 200, 0.4) 100%);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.3),
        inset -5px -5px 15px rgba(0, 0, 0, 0.1),
        inset 5px 5px 15px rgba(255, 255, 255, 0.4);
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.work-card:hover {
    transform: translateY(-8px) rotateX(5deg) rotateY(-5deg) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        inset -5px -5px 15px rgba(0, 0, 0, 0.1),
        inset 5px 5px 15px rgba(255, 255, 255, 0.5);
}

.work-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    margin: 8px;
    width: calc(100% - 16px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.card-overlay {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(0, 0, 0, 0.1) 100%);
    border-radius: 10px;
    z-index: 2;
    pointer-events: none;
}

.work-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    text-align: center;
    font-size: 1.4em;
    font-weight: bold;
    border-radius: 25px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.work-card:hover .work-title {
    opacity: 1;
}

.work-card:hover img {
    opacity: 0.6;
    transform: scale(0.98);
}

@media (max-width: 768px) {
    #works-container {
        flex-direction: column;
        align-items: center;
    }

    .work-item {
        width: 90%;
        max-width: 90%;
    }

    .work-item:not(.full-width) {
        width: 90%;
        max-width: 90%;
    }

    .work-item.full-width {
        width: 90%;
        max-width: 90%;
    }
}
