@charset "utf-8";

main {
    margin: auto 150px 120px;
}

/* * {
    outline: 1px solid rgba(255, 0, 0, 0.3);
} */

.title h2 {
    padding-top: 180px;
    text-align: center;
    font-weight: normal;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 4px;

}

.project-filter {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-top: 120px;
    margin-bottom: 70px;
}

.filter-btn {
    cursor: url("../image/cursor_link.png") 4 4, auto;
    padding-bottom: 4px;
    color: #666;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    color: #305662;
}

.filter-btn.now {
    border-bottom: 2px solid rgba(48, 86, 98, 0.4);
    color: #305662;
}

.project-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 80px;
    margin-top: 40px;
    justify-content: start;
}



.project-item img {
    width: 100%;
    height: 90%;
    object-fit: cover;
    border: 1px solid #e5e5e5;

}

.project-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.project-item.hide {
    display: none;
}

.project-title {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
    max-height: 90%;
    word-break: break-word;
    /* ← 長いタイトルでも折り返す */
    box-sizing: border-box;
}


.project-item:hover .project-title {
    opacity: 1;
}