:root {
    /* บอกเบราว์เซอร์ว่าเว็บนี้เป็นธีมสว่างเท่านั้น — กัน mobile auto-dark invert พื้นหลังเป็นดำ */
    color-scheme: light;
}

html, body {
    background-color: #fff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    text-decoration: none;
    color: #4b0708;
    font-family: "IBM Plex Sans Thai", serif;
}

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

section {
    width: 100%;
    max-width: 1280px;
    margin-top: 48px;
    padding: 0 16px;
}

/* Global Hero Contact Buttons */
.hero-contact-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    padding: 0 20px;
}

.hero-contact-buttons a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    color: #fff !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 220px;
}

.hero-contact-buttons a span {
    color: #fff !important;
}

.hero-contact-buttons a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.hero-contact-buttons a img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.hero-contact-buttons .btn-line {
    background-color: #06C755;
}

.hero-contact-buttons .btn-line:hover {
    background-color: #05b34c;
}

.hero-contact-buttons .btn-line img {
    filter: none;
}

.hero-contact-buttons .btn-call {
    background-color: #4b0708;
}

.hero-contact-buttons .btn-call:hover {
    background-color: #3b0607;
}

@media only screen and (max-width: 600px) {
    .hero-contact-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .hero-contact-buttons a {
        width: 100%;
        max-width: 280px;
    }
}

/* ===== Legal license bars (สบส.) ===== */
.legal-topbar {
    background-color: #4b0708;
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    padding: 5px 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 12px;
    text-align: center;
}

.legal-topbar span {
    color: #fff;
}

.legal-topbar .sep {
    opacity: .5;
}

.legal-bottombar {
    background-color: #1a1a1a;
    color: #c9c9c9;
    font-size: 12px;
    line-height: 1.5;
    padding: 12px 16px;
    text-align: center;
}

.legal-bottombar p {
    margin: 0 0 4px;
    color: #e6e6e6;
}

.legal-bottombar span {
    color: #c9c9c9;
}

.legal-bottombar .legal-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 24px;
}

@media only screen and (max-width: 600px) {
    .legal-topbar {
        flex-direction: column;
        font-size: 10px;
        gap: 1px;
    }

    .legal-topbar .sep {
        display: none;
    }

    .legal-bottombar {
        font-size: 11px;
    }

    .legal-bottombar .legal-numbers {
        flex-direction: column;
        gap: 2px;
    }
}

/* ============================================================
   แถบ CTA ติดขอบล่าง — มือถือ/แท็บเล็ต (<768px) เท่านั้น
   Mobile-first: กำหนดสไตล์มือถือเป็นค่าเริ่มต้น แล้วปิดบน desktop (≥768px) ท้ายบล็อก
   Desktop คงเลย์เอาต์เดิม 100% (แถบถูกซ่อน)
   ============================================================ */
/* แถบลอยกระจกฝ้า (frosted glass) — เว้นขอบ ลอยขึ้นเล็กน้อย มุมโค้ง เส้นขอบทอง */
.mobile-cta-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)); /* ลอยเหนือขอบ + กันแถบ home iPhone */
    z-index: 45; /* เหนือเนื้อหา แต่แถบจะถูกซ่อนเองตอนเปิดเมนูมือถือ (กฎด้านล่าง) */
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(247, 241, 227, 0.72); /* ครีมโปร่งแสง */
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(183, 138, 63, 0.55); /* เส้นขอบทองบาง */
    box-shadow: 0 8px 28px rgba(75, 7, 8, 0.16);
}

/* Fallback: เบราว์เซอร์ที่ไม่รองรับ backdrop-filter ให้พื้นทึบครีมแทน (ยังอ่านง่าย) */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .mobile-cta-bar {
        background: #f7f1e3f7;
    }
}

/* ปุ่มหลัก: ปรึกษาฟรีทาง LINE (เขียว เต็มพลัง) */
.mobile-cta-bar .mcta-primary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    border-radius: 50px;
    background: #06c755;
    color: #fff !important;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
}

.mobile-cta-bar .mcta-primary span {
    color: #fff !important;
}

.mobile-cta-bar .mcta-primary img {
    width: 22px;
    height: 22px;
}

/* ปุ่มรอง: ไอคอนโทรกลม แดงเลือดหมู + วงแหวนทอง */
.mobile-cta-bar .mcta-call-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #4b0708;
    border: 1.5px solid #cfa855;
    text-decoration: none;
}

.mobile-cta-bar .mcta-call-icon img {
    width: 22px;
    height: 22px;
    filter: brightness(0) invert(1); /* ไอคอนโทรสีขาวบนพื้นแดง */
}

/* เว้นที่ท้ายหน้าให้เนื้อหาไม่ถูกแถบลอยบัง (มือถือ) */
body {
    padding-bottom: 84px;
}

/* ซ่อนปุ่ม CTA ก้อนใหญ่ในฮีโร่บนมือถือ — แถบล่างทำหน้าที่แทนแล้ว */
@media only screen and (max-width: 767.98px) {
    .hero-contact-buttons {
        display: none;
    }
}

/* ปิดแถบชั่วคราวขณะเปิดเมนูมือถือ กันแถบลอยทับเมนู */
body:has(.mobile-menu[open]) .mobile-cta-bar {
    display: none;
}

/* ===== Desktop (≥768px): ปิดแถบ + คืน UI เดิมทั้งหมด ===== */
@media only screen and (min-width: 768px) {
    .mobile-cta-bar {
        display: none;
    }

    body {
        padding-bottom: 0;
    }
}

/* ============================================================
   แกลเลอรีรีวิวเลื่อนแนวนอน (auto-scroll + ปัดเอง) — ใช้ร่วมทุกหน้า
   JS auto-scroll อยู่ใน layouts/default.blade (target .review-carousel[data-autoscroll])
   ============================================================ */
.review-carousel {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    overflow-x: auto;
    scroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 4px 18px;
    margin: 8px auto 0;
    /* ซ่อน scrollbar (ยังปัด/ลากได้ปกติ) */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.review-carousel::-webkit-scrollbar { width: 0; height: 0; display: none; }

.review-carousel img {
    flex: 0 0 auto;
    width: 260px;
    height: auto;
    border-radius: 14px;
    display: block;
    box-shadow: 0 6px 18px rgba(75, 7, 8, 0.12);
}

@media only screen and (max-width: 560px) {
    .review-carousel img { width: 78vw; max-width: 330px; }
}
