/* メインビジュアル用のスタイル */
.top-view {
    position: relative;
    height: 664px;  /* 高さを664pxに固定 */
    display: flex;
    align-items: center;
    margin-top: 70px;  /* padding-topをmargin-topに変更 */
    margin-bottom: 0;  /* ボタンが上に移動したのでマージンを削除 */
    overflow: hidden;
}

.top-view-backgrounds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.top-view-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.top-view-bg.bg-1 {
    opacity: 1;
    animation: fade1 15s infinite;
}

.top-view-bg.bg-2 {
    animation: fade2 15s infinite;
}

.top-view-bg.bg-3 {
    animation: fade3 15s infinite;
}

@keyframes fade1 {
    0%, 25% { opacity: 1; }
    33.33%, 91.66% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes fade2 {
    0%, 25% { opacity: 0; }
    33.33%, 58.33% { opacity: 1; }
    66.66%, 100% { opacity: 0; }
}

@keyframes fade3 {
    0%, 58.33% { opacity: 0; }
    66.66%, 91.66% { opacity: 1; }
    100% { opacity: 0; }
}

/* フェードエフェクト用のオーバーレイ */
.top-view::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.top-view-content {
    position: relative;
    width: 100%;
    margin: 0 auto;
    color: #fff;
    text-align: center;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.top-view-text {
    max-width: 800px;  /* 幅を広げる */
    margin: 0 auto;  /* 中央寄せ */
}

.top-view-title {
    font-size: 26px;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    font-family: 'Noto Sans JP', sans-serif;
}

.top-view-subtitle {
    font-size: 20px;
    font-weight: normal;
    margin-bottom: 1.5rem;
    font-family: 'Noto Sans JP', sans-serif;
}

.top-view-name {
    font-size: 66px;
    font-weight: 700;
    color: #fff;
    font-family: "Roboto Slab", serif;
    letter-spacing: 0.1em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.top-view-medal {
    margin-top: 2rem;
    width: 150px;  /* コンテナのサイズを固定 */
    height: 150px;
    position: relative;  /* 子要素の位置決めの基準に */
}

.top-view-medal img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300%; 
    height: 300%;
    object-fit: contain;
}

.top-view-bottom {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px; /* 最大幅を設定 */
    background: rgba(0, 178, 184, 0.9); /* 透明度を調整 */
    color: #fff;
    text-align: center;
    padding: 1.2rem 0; /* パディングを少し大きく */
    font-size: 18px;
    letter-spacing: 0.1em;
    z-index: 2;
    border: 2px solid #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* シャドウを追加 */
    box-sizing: border-box;
    font-family: 'Noto Sans JP', sans-serif;
    transition: all 0.3s ease; /* ホバーエフェクト用 */
}

.top-view-bottom:hover {
    background: rgba(0, 178, 184, 1); /* ホバー時は透明度なし */
    transform: translateX(-50%) translateY(-3px); /* 少し上に浮かせる */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* シャドウを強く */
}

/* 英語テキスト部分のスタイル */
.top-view-bottom .english-text {
    font-family: "Roboto Slab", serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .top-view {
        height: 55vh;
        margin-top: 60px;
    }

    .top-view-title {
        font-size: 20px;
        margin-bottom: 15px;
        padding: 0;
        line-height: 1.6;
    }

    .top-view-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
        padding: 0;
        line-height: 1.5;
    }

    .top-view-name {
        font-size: 36px;
        padding: 0;
        margin-bottom: 20px;
        line-height: 1.4;
    }

    .top-view-medal {
        margin-top: 15px;
        margin-bottom: 40px;
        width: 120px;
        height: 120px;
    }

    .top-view-medal img {
        width: 250%;
        height: 250%;
    }

    .top-view-bottom {
        width: calc(100% - 40px);  /* 左右に20pxずつ余白 */
        max-width: 500px; /* タブレットでの最大幅 */
        bottom: 40px; /* タブレットでの位置調整 */
        font-size: 14px;
        padding: 15px;
        line-height: 1.4;
    }
}

@media (max-width: 390px) {
    .top-view-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .top-view-subtitle {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .top-view-name {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .top-view-medal {
        width: 100px;
        height: 100px;
        margin-top: 10px;
        margin-bottom: 30px;
    }

    .top-view-medal img {
        width: 250%;
        height: 250%;
    }

    .top-view-bottom {
        font-size: 12px;
        padding: 8px;
        max-width: 280px;
        bottom: 10px; 
    }

    /* オーバーレイの透明度を調整 */
    .top-view::before {
        background: rgba(0, 0, 0, 0.4);
    }
} 