/* ปุ่มเล่นวิดีโอหน้าแรก: วงแหวนเรืองแสงเต้นเบา ๆ */
@keyframes videoPulse {
    0%   { box-shadow: 0 0 0 0 #4b070866, 0 6px 18px 0 #4b070877; }
    70%  { box-shadow: 0 0 0 16px #4b070800, 0 6px 18px 0 #4b070877; }
    100% { box-shadow: 0 0 0 0 #4b070800, 0 6px 18px 0 #4b070877; }
}

@media (prefers-reduced-motion: reduce) {
    main .video a .play-btn { animation: none !important; }
}

main {
    h2 {
        text-align: center;
        width: 100%;
        font-size: 32px;
    }

    p {
        text-align: center;
        width: 100%;
        color: #000;
    }

    .video {
        margin-top: 24px;
        width: 100%;
        display: flex;
        gap: 20px;
        overflow-x: auto;
        padding: 4px 4px 14px;
        -webkit-overflow-scrolling: touch;
        /* ซ่อน scrollbar (ยังปัด/ลากได้ปกติ) — เลื่อนอัตโนมัติผ่าน data-autoscroll */
        scrollbar-width: none;
        -ms-overflow-style: none;

        &::-webkit-scrollbar { width: 0; height: 0; display: none; }

        img:not(.play-btn) {
            width: 100% !important;
            aspect-ratio: 9 / 16;
            object-fit: cover;
            border-radius: 16px;
            box-shadow: 0 8px 22px -6px #4b070855, 0 2px 6px 0 #0003;
        }

        a {
            flex: 0 0 auto;
            width: 264px;
            position: relative;
            display: block;
            transition: transform .25s ease, filter .25s ease;

            /* ปุ่มเล่นวงกลม gradient + วงแหวนเรืองแสง + เต้นเบา ๆ */
            .play-btn {
                position: absolute;
                top: 50%;
                left: 50%;
                translate: -50% -50%;
                width: 64px !important;
                height: 64px !important;
                padding: 16px;
                background: radial-gradient(circle at 30% 30%, #7a1416, #4b0708);
                border: 2px solid #ffffffcc;
                border-radius: 100%;
                box-shadow: 0 0 0 0 #4b070866, 0 6px 18px 0 #4b070877;
                animation: videoPulse 2.4s ease-out infinite;
                transition: width .2s ease, height .2s ease;
            }

            &:hover {
                transform: translateY(-6px);
                filter: brightness(1.03);

                .play-btn {
                    width: 76px !important;
                    height: 76px !important;
                    animation: none;
                }
            }
        }
    }

    .promotion {
        margin-top: 16px;
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        align-items: center;
        gap: 16px;

        img:not(.play-btn) {
            width: 100% !important;
            border-radius: 12px;
            box-shadow: 2px 2px 8px 0 #0004;
        }

        a {
            width: 100%;
            position: relative;

            &:hover {
                filter: brightness(0.9);
            }
        }
    }

    .bg-promotion {
        background-color: #fef6f3;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 48px;
        padding-bottom: 16px;
        /* transform: skewY(-3deg); 
        margin: 3% 0;
        padding: 3% 0;
        section {
            margin-top: 0;
            transform: skewY(3deg); 
        } */
    }

    .doctor {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 48px;
        margin-top: 16px;

        h3 {
            font-size: 24px;
            width: 100%;
            text-align: center;
        }

        .id {
            color: #fff;
            font-weight: bold;
            background-color: #4b0708;
            padding: 8px;
            border-radius: 12px;
            width: fit-content;
        }

        div {
            display: flex;
            align-items: center;
            flex-direction: column;
        }
    }

    .reviews-all-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 12px 40px;
        background-color: #4b0708;
        color: #fff;
        border-radius: 50px;
        font-weight: 600;
        font-size: 18px;
        box-shadow: 0 4px 12px rgba(75, 7, 8, 0.25);
        transition: filter .15s ease;
    }

    .reviews-all-btn:hover {
        filter: brightness(1.18);
    }

    .review {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        place-items: center;
        gap: 8px;
        margin-top: 16px;

        img {
            max-width: 800px;
        }

        a {
            width: 50% ;
            padding: 12px 64px;
            background-color: #06C755;
            color: #fff;
            border-radius: 12px;
            margin: 16px 0;
            display: flex;
            align-items: center;
			justify-content: center;
            gap: 12px;
            font-size: 22px;
            font-weight: 600;
            box-shadow: 0 4px 12px rgba(6, 199, 85, 0.4);
            transition: transform 0.2s;

            &:hover {
                transform: scale(1.05);
            }

            img {
                width: 32px !important;
                height: 32px !important;
            }
        }
    }
}


@media only screen and (max-width:1000px) {
    main {
        .video {
            gap: 14px;
        }

        /* มือถือ: โชว์คลิปถัดไป "แอบโผล่" ให้รู้ว่าปัดต่อได้ */
        .video a {
            width: 78vw;
        }

        .promotion {
            grid-template-columns: 1fr 1fr;
        }

        .doctor {
            grid-template-columns: 1fr 1fr;
        }

        .review {
            grid-template-columns: 1fr;
        }
    }

}

/* ===== ส่วนรีวิวหน้าแรก (B: กริดรูปเด่น + C: การ์ดข้อความเลื่อนแนวนอน) ===== */
.home-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 4px auto 22px;
    padding: 9px 20px;
    background: #fff;
    border: 1px solid #e8d9bd;
    border-radius: 50px;
    box-shadow: 0 4px 14px rgba(75, 7, 8, 0.08);
    color: #4b0708;
    text-decoration: none;
    font-size: 16px;
}
.home-rating-badge .hrb-stars { color: #f2b705; letter-spacing: 1px; }
.home-rating-badge strong { font-size: 18px; }
.home-rating-badge .hrb-count { color: #777; font-size: 14px; }

/* แกลเลอรีรูปก่อน-หลัง (.review-carousel) ย้ายไป default.css แล้ว (ใช้ร่วมทุกหน้า) */

/* C: แถวการ์ดรีวิวข้อความ เลื่อนแนวนอน (swipe) */
.home-review-cards {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    padding: 22px 4px 14px;
    margin-top: 6px;
    /* ซ่อน scrollbar (ยังปัด/ลากได้ปกติ) */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.home-review-cards::-webkit-scrollbar { width: 0; height: 0; display: none; }
.home-review-cards .hr-card {
    flex: 0 0 auto;
    width: 280px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    border: 1px solid #e8d9bd;
    border-radius: 14px;
    padding: 18px;
    text-align: left;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 14px rgba(75, 7, 8, 0.06);
    transition: transform .15s ease, box-shadow .15s ease;
}
a.hr-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(75, 7, 8, 0.13);
}
.hr-card .hr-stars { color: #f2b705; font-size: 16px; letter-spacing: 1px; }
.hr-card .hr-body {
    color: #333;
    font-size: 14.5px;
    line-height: 1.6;
    text-align: left;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hr-card .hr-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 6px;
}
.hr-card .hr-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4b0708;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}
.hr-card .hr-name { font-weight: 600; color: #4b0708; font-size: 14px; }
.hr-card .hr-src { margin-left: auto; color: #b78a3f; font-size: 12px; font-weight: 600; white-space: nowrap; }

@media only screen and (max-width: 768px) {
    .home-review-cards .hr-card { width: 250px; }
}

/* ส่วนรีวิว Google — คั่นให้แยกจากรีวิวรูปลูกค้าอย่างชัดเจน */
main .home-google-reviews {
    border-top: 1px solid #e8d9bd;
    margin-top: 8px;
    padding-top: 8px;
}
