/* ベースのスタイル */
.keyvisual {
    background-color: #DC5A52;
    width: 100%;
}

.main-content {
    max-width: 1045px;
    margin: 30px auto 60px;
    padding: 0 20px;
}

.body-text {
    font-size: clamp(16px, 4vw, 24px);
}

.first-section-container {
    padding: clamp(40px, 8vw, 120px) 0 clamp(30px, 6vw, 100px) 0;
    margin: 0 auto;
    display: flex;
    width: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    row-gap: clamp(40px, 6vw, 100px);
}

.beginning-text, .button-group {
    width: 100%;
    font-size: 16px;
    text-align: center;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.item-button {
    border: none;
    background-color: #3B4FAC;
    padding: 5px 15px;
    color: #FFFFFF;
    font-size: clamp(18px, 3vw, 32px);
    cursor: pointer;
    transition: background-color 0.3s;
}

.item-button:hover {
    background-color: #2c3b82;
}

.published-year {
    font-size: clamp(28px, 5vw, 40px);
    color: #000000;
    width: 100%;
    max-width: 200px;
    border-bottom: 1px solid #000000;
    text-align: center;
    padding-bottom: 5px;
    margin: 0 auto 20px;
}

.paper-info-container {
    display: flex;
    flex-direction: column;
    row-gap: 10px;
    padding-left: clamp(20px, 4vw, 65px);
    list-style: none;
    margin-bottom: 40px;
}

.published-date {
    font-size: clamp(18px, 3vw, 24px);
}

.publisher, .author {
    font-size: clamp(14px, 2vw, 16px);
}

.paper-title {
    font-size: clamp(20px, 4vw, 32px);
    padding: 12px 0;
    text-align: left;
    border-bottom: 1px solid #000000;
    word-break: break-word;
}

.paper-title a {
    display: inline-block;
    word-wrap: break-word;
    width: 100%;
}

/* モバイル対応 */
@media screen and (max-width: 768px) {
    .first-section-container {
        padding: 40px 20px;
    }
    
    .paper-info-container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .button-group {
        flex-direction: row; /* 横並びを維持 */
        justify-content: center;
        gap: 8px; /* スマホでは間隔を少し狭める */
    }
    
    .item-button {
        padding: 5px 10px; /* パディングを少し狭める */
        min-width: auto; /* 最小幅の制限を解除 */
        font-size: 16px; /* フォントサイズを固定 */
    }
}

/* 小さな画面対応 */
@media screen and (max-width: 480px) {
    .main-content {
        margin: 15px auto 30px;
    }
    
    .paper-title {
        padding: 8px 0;
    }
    
    .paper-info-container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* アニメーション関連のスタイルは維持 */
.paper-list {
    overflow: hidden;
}

.yearly-paper {
    opacity: 0;
    visibility: hidden; 
    height: 0;
    width: 0;
    transition: opacity 0.5s ease, display 0.5s ease;
}

.yearly-paper.js-active {
    visibility: visible; 
    opacity: 1;
    width: auto;
    height: auto;
    display: block;
    font-size: 1px;
}