/* ==========================================================================
   TOP PAGE: HERO NAVIGATION (Dual Gate)
   ========================================================================== */

.top-hero {
    display: flex;
    width: 100%;
    height: 75vh; 
    min-height: 550px;
    background: #000;
    overflow: hidden;
    position: relative;
    /* 下部を少し斜めにカットして格ゲー感を演出 */
    clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
}

.hero-gate {
    flex: 1;
    position: relative;
    text-decoration: none;
    transition: flex 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 左側：BEGINNER */
.gate-beginner {
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
    margin-right: -10%; 
    z-index: 2;
    background-image: url('/assets/img/top/beginner.jpg');
    border-right: 2px solid rgba(255, 255, 255, 0.3);
}

/* 右側：CHARACTERS */
.gate-expert {
    z-index: 1;
    background-image: url('/assets/img/top/experienced.jpg');
}

.hero-gate:hover {
    flex: 1.4;
    z-index: 3;
    filter: brightness(1.15);
}

/* --- ヒーローエリアのボックス調整 --- */
.gate-frame-outer {
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 8px;
    transition: transform 0.4s ease;
    width: 90%; /* 幅を少し広げて横方向の余裕を持たせる */
    max-width: 480px;
}

.gate-frame-inner {
    border: 2px solid #fff;
    /* height: 180px; ← これを削除！ */
    min-height: 160px; /* 最低限の高さは維持 */
    padding: 30px 20px; /* 上下に余裕を持たせて文字を包む */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
}

.hero-gate:hover .gate-frame-outer {
    transform: scale(1.05);
}

/* タイトルのフォントサイズを微調整（はみ出し防止） */
.gate-title {
    font-size: clamp(1.6rem, 4vw, 2.8rem); /* 最小値を少し下げて安全策 */
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-style: italic;
    text-decoration: underline;
    text-underline-offset: 8px;
    text-decoration-thickness: 3px;
    white-space: normal; /* 折り返しを許可してはみ出しを防ぐ */
    text-align: center;
}

.gate-subtitle {
    font-size: 0.9rem;
    color: #fff;
    margin-top: 20px;
    letter-spacing: 1px;
    font-weight: 700;
    font-style: italic;
}

/* ============================================================
   GENERIC SECTION HEADER
   ============================================================ */
.section-header {
    text-align: center;
    /* 25pxから10pxへ：タイトルと記事の隙間をほぼ無くす */
    margin-bottom: 10px; 
}

.section-title {
    display: inline-block;
    font-size: 2.8rem; 
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border-bottom: 4px solid #8e2de2;
    padding-bottom: 2px; /* 下線との距離も極小に */
    line-height: 1;
}

/* ============================================================
   LATEST UPDATES SECTION (さらにタイトに)
   ============================================================ */
.top-news {
    max-width: 1200px;
    margin: 40px auto; 
    padding: 0 20px;
}

/* --- グリッド部分の余白リセット --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 0 auto !important; /* 上下の隙間を完全排除 */
    padding: 0 !important;
}

/* --- ボタンエリアを限界まで引き上げる --- */
.top-news-footer {
    display: flex;
    justify-content: center;
    gap: 40px;
    /* 0でも遠い場合は、マイナス値を指定してカードの底に張り付かせます */
    margin-top: 40px !important; 
    padding: 0 !important;
}

.btn-more {
    color: #aaa;
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1; /* 行の高さを最小限に */
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-more:hover {
    color: #fff;
    border-color: #8e2de2;
    text-shadow: 0 0 10px #8e2de2;
}

/* ==========================================================================
   RESPONSIVE (Smartphone)
   ========================================================================== */

@media screen and (max-width: 768px) {
    .top-hero {
        flex-direction: column;
        height: 80vh;
        clip-path: none;
    }

    .hero-gate {
        width: 100%;
        height: 50%;
        flex: none !important;
        margin: 0 !important;
    }

    .gate-beginner {
        clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
        border-right: none;
        border-bottom: 2px solid #fff;
    }

    .gate-expert {
        margin-top: -12%; 
    }

    .gate-frame-inner {
        height: 130px;
    }

    .gate-title {
        font-size: 1.8rem;
        text-underline-offset: 6px;
    }

    .section-title {
        font-size: 1.8rem; /* スマホではタイトルサイズを抑える */
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr); /* スマホは2列 */
    }
}

@media screen and (max-width: 480px) {
    .news-grid {
        grid-template-columns: 1fr; /* 極小画面は1列 */
    }
    .top-news-footer {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}