/* レビューセクション - YouTubeカルーセルスタイル */

/* レビューパネルを拡大 */
.reviews-panel-expanded {
    min-height: 1040px;
    padding: 56px 56px 72px 56px !important;
    overflow-x: clip;
}

/* YouTube専用オーバーレイコンテナ（パネル上に重ねて表示） */
.reviews-youtube-overlay {
    position: absolute;
    top: 152px;
    left: 50%;
    /* 親の回転を打ち消す: -50%移動 + 1度回転（親の-1degを打ち消し） */
    transform: translateX(-50%) rotate(1deg);
    width: min(78%, 760px);
    max-width: 760px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.98);
    padding: 22px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 3px solid var(--black);
    /* マウス操作を無効化（ただしiframeは有効） */
    pointer-events: auto;
}

/* ホバー時: 親が1degになるので+1degで打ち消し */
.comic-panel:hover .reviews-youtube-overlay {
    transform: translateX(-50%) rotate(1deg);
}

.youtube-carousel-section {
    margin-top: 6px;
    margin-bottom: 6px;
    margin-left: 0;
    margin-right: 0;
    padding: 12px;
    position: relative;
    z-index: 1;
}

.youtube-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 18px;
    color: #333;
    font-weight: bold;
    writing-mode: horizontal-tb !important;
}

.youtube-carousel-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.youtube-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: visible;
}

/* 3本縦並び表示（カルーセル方式から変更） */
.youtube-slide {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9アスペクト比 */
    opacity: 1;
    pointer-events: auto;
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.youtube-slide:last-child {
    margin-bottom: 0;
}

.youtube-slide.active {
    /* 縦並びでは active の視覚差分なし（音声制御は JS が管理） */
    opacity: 1;
    pointer-events: auto;
}

.youtube-slide iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: auto;
    max-width: 100%;
}

/* ドットインジケータ - 縦並びでは不要 */
.carousel-dots {
    display: none;
}

.carousel-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dots .dot:hover {
    background-color: #999;
    transform: scale(1.2);
}

.carousel-dots .dot.active {
    background-color: #8B4513;
    transform: scale(1.3);
}

/* レビューカード関連のスタイル */
.reviews-wrapper {
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
}

#reviews-cards {
    width: 100%;
}

.section-title {
    text-align: center;
    font-size: 2.1rem;
    margin-bottom: 6px;
    font-family: 'Bebas Neue', sans-serif;
}

.section-subtitle {
    text-align: center;
    font-size: 1rem;
    color: #666;
    margin-bottom: 24px;
}

/* レビューカルーセルラッパー */
.reviews-grid {
    margin-top: 620px;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}

.review-card {
    background: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    min-width: 0;
    max-width: none;
    width: 100%;
    height: 100%;
}

.review-card.visible {
    opacity: 1;
    transform: translateY(0);
    animation: fadeIn 0.5s ease;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.reviewer-name {
    font-weight: bold;
    color: #333;
}

.review-date {
    color: #999;
    font-size: 0.82rem;
}

.review-rating {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.star {
    font-size: 1.05rem;
    position: relative;
    display: inline-block;
    -webkit-text-stroke: 1px #333;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}

/* ゴールド色の星（満点） */
.star-full {
    color: #FFD700;
}

/* 半分の星（左半分ゴールド、右半分白） */
.star-half {
    background: linear-gradient(90deg, #FFD700 50%, white 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 白色の星（空） */
.star-empty {
    color: white;
}

/* 評価数字 */
.rating-number {
    font-size: 0.92rem;
    font-weight: bold;
    color: #333;
    margin-left: 4px;
}

.review-comment {
    color: #666;
    font-size: 0.94rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

.verified-badge {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 3px 7px;
    border-radius: 15px;
    font-size: 0.78rem;
}

.visit-badge {
    display: inline-block;
    background: #8F2022;
    color: white;
    padding: 3px 7px;
    border-radius: 15px;
    font-size: 0.78rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .reviews-panel-expanded {
        min-height: 860px;
        padding: 28px 14px 220px 14px !important;
    }

    .reviews-youtube-overlay {
        top: 118px;
        width: calc(100% - 16px);
        max-width: calc(100vw - 56px);
        padding: 14px;
        border-width: 2px;
        /* モバイルでも回転打ち消しを維持 */
        transform: translateX(-50%) rotate(1deg);
    }

    .comic-panel:hover .reviews-youtube-overlay {
        transform: translateX(-50%) rotate(1deg);
    }

    .youtube-carousel-container {
        margin: 0;
    }

    .youtube-title {
        font-size: 1.15rem;
        margin-bottom: 12px;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .reviews-grid {
        margin-top: 430px;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .review-card {
        min-width: 0;
        max-width: none;
        padding: 13px 12px;
    }

    .review-comment {
        font-size: 0.88rem;
        line-height: 1.45;
    }

    .reviewer-name {
        font-size: 0.92rem;
    }

    .review-date {
        font-size: 0.76rem;
    }

    .carousel-dots {
        gap: 10px;
        margin-top: 10px;
    }

    .carousel-dots .dot {
        width: 9px;
        height: 9px;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
