/* =========================================
   YouTube Slider (Clean & Modern)
========================================= */
.top_youtube_section {
    padding: 0 10cqw;
}

/* =========================================
   スライダーの強制リセット（テーマ干渉防止）
========================================= */
.youtube_slider.splide {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    /* ★修正: 左右のパディングを0にし、下部にページネーション用の余白（3rem等）だけ残す */
    padding: 0 0 3rem !important;
    box-sizing: border-box !important;
}

.youtube_slider .splide__track {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    left: 0 !important;
    box-sizing: border-box !important;
}

.youtube_slider .splide__list {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    width: 100% !important;
    height: auto !important;
}

.youtube_slider .splide__slide {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    transition: opacity 0.5s ease;
    opacity: 0.6; /* 非アクティブは少し暗く */
}

.youtube_slider .splide__slide::before,
.youtube_slider .splide__slide::after {
    display: none !important;
    content: none !important;
}

.youtube_slider .splide__slide.is-active {
    opacity: 1;
    z-index: 2;
}
.youtube_slider .splide__pagination {
    bottom: 0 !important;
    top: 0 !important;
    padding: 0 !important;
    z-index: 10;
    justify-content: center !important;
}

@media (max-width: 767px) {
    .youtube_slider .splide__pagination {
        width: 100%;
        left: 0 !important;
        right: 0 !important;
    }
}
/* =========================================
   カードのデザイン
========================================= */
.youtube_card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.youtube_thumb {
    width: 100%;
    padding-bottom: 56.25%;
    position: relative;
    overflow: hidden;
}

.youtube_thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.youtube_slider
    .splide__slide.is-active
    .youtube_card:hover
    .youtube_thumb
    img {
    transform: scale(1.05);
}

/* =========================================
   再生ボタン（グラスモーフィズム調＋ホバーで赤）
========================================= */
.youtube_play_icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 42px;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s ease;
}

/* ★CSSから文字として「▷」を注入する（これで勝手に画像化されません） */
.youtube_play_icon::before {
    content: "▶"; /* 黒塗りの ▶ にしたい場合はここを変更 */
    color: #ffffff; /* 真っ白にする */
    font-size: 1.2rem;
    font-weight: normal;
    font-family: sans-serif; /* 文字化け・機種依存防止 */
    line-height: 1;
    margin-left: 2px; /* ▷がど真ん中に来るように微調整 */
}

/* ホバー時に赤く光るエフェクト */
.youtube_slider .splide__slide.is-active .youtube_card:hover .youtube_play_icon,
.youtube_card:hover .youtube_play_icon {
    transform: translate(-50%, -50%) scale(1.1);
}

/* =========================================
   テキスト情報エリア
========================================= */
.youtube_info {
    padding: 1.5cqw 2cqw;
}

.youtube_date {
    font-size: var(--font-xs);
    color: #666;
    margin: 0 0 0.5rem;
    font-weight: 600;
}

.youtube_title {
    font-size: var(--font-s);
    font-weight: bold;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================
   Splide 矢印ボタンのカスタマイズ
========================================= */
.youtube_slider .splide__arrow {
    background: #fff;
    opacity: 1;
    width: 3.5rem;
    height: 3.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition:
        transform 0.3s ease,
        background 0.3s ease,
        box-shadow 0.3s ease;
}

.youtube_slider .splide__arrow:hover {
    background: #fdfdfd;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.youtube_slider .splide__arrow svg {
    fill: #333;
    width: 1.4rem;
    height: 1.4rem;
}

.youtube_slider .splide__arrow--prev {
    left: 0;
}

.youtube_slider .splide__arrow--next {
    right: 0;
}

/* =========================================
   動画一覧ページ用のグリッド
========================================= */
.video_archive_grid {
    display: grid;
    padding: 0 0cqw 0 10cqw;
    grid-template-columns: repeat(2, 1fr);
    gap: 3cqw;
}

/* =========================================
   SP Overrides
========================================= */
@media (max-width: 767px) {
    .top_youtube_section {
        margin-top: 10cqw;
        padding: 0 0;
    }
    .youtube_slider.splide {
        padding: 2cqw 0 4cqw !important; /* スマホは矢印用の余白を詰める */
    }
    .youtube_info {
        padding: 4cqw;
    }
    .youtube_play_icon {
        width: 50px;
        height: 35px;
        font-size: 16px;
        padding-left: 3px;
    }
    .youtube_slider .splide__arrow {
        width: 2.5rem;
        height: 2.5rem;
    }
    .youtube_slider .splide__arrow svg {
        width: 1rem;
        height: 1rem;
    }
    .youtube_slider .splide__arrow--prev {
        left: 0.5rem; /* スマホでは端に配置 */
    }
    .youtube_slider .splide__arrow--next {
        right: 0.5rem;
    }
    .video_archive_grid {
        grid-template-columns: 1fr;
        padding: 0;
        gap: 5vw;
    }
}

/* =========================================
   動画一覧への「もっと見る」ボタン
========================================= */
.youtube_more_btn_wrap {
    text-align: center;
}

.youtube_more_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 6.3rem;
    background: #ff0000;
    color: #fff;
    /* font-size: var(--font-m); */
    font-size: min(1.5vw, 22px);
    text-decoration: none;
    border-radius: 36px;
    transition: transform 0.3s ease;
}

/* スマホ用の調整 */
@media (max-width: 767px) {
    .youtube_more_btn_wrap {
        margin-top: 1.5rem;
    }
    .youtube_more_btn {
        font-size: 4vw;
        padding: 1rem 4rem;
    }
}

.video_pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.page_number {
    padding: 8px 16px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.page_number.is-active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.page_number:hover:not(.is-active) {
    background: #f0f0f0;
}

/* モーダル全体のコンテナ */
.video_modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none; /* 初期は非表示 */
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

/* 背景の黒い部分 */
.video_modal_overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

/* コンテンツエリア */
.video_modal_content {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: #000;
}

/* 閉じるボタン */
.video_modal_close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

/* 16:9を維持するビデオ枠 */
.video_modal_video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 の比率 */
    background: #000;
}

.video_modal_video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* モーダル表示中のクラス */
.video_modal.is-open {
    display: flex;
}
