/* =============================================
   US-TRADE Landing Page Stylesheet v3
   ============================================= */

/* --- Font Face --- */
@font-face {
    font-family: 'DB Heavent Blk';
    src: url('fonts/DB Heavent Blk v3.2.ttf') format('truetype');
}

@font-face {
    font-family: 'DB Heavent Blod';
    src: url('fonts/DB Heavent Bd v3.2.ttf') format('truetype');
}

@font-face {
    font-family: 'DB Heavent Med';
    src: url('fonts/DB Heavent Med v3.2.ttf') format('truetype');
}

@font-face {
    font-family: 'DB Heavent Light';
    src: url('fonts/DB Heavent Li v3.2.ttf') format('truetype');
}

@font-face {
    font-family: 'DB Heavent';
    src: url('fonts/DB Heavent v3.2.ttf') format('truetype');
}

/* --- Base (copied from global-trade/style.css) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DB Heavent', Arial, Helvetica, sans-serif !important;
    overflow-x: hidden;
}

a {
    cursor: pointer;
}

/* =============================================
   DISPLAY HELPERS  (!important = ชนะ specificity ทุก rule)
   ============================================= */
.__desktop-only {
    display: block !important;
}

.__mobile-only {
    display: none !important;
}

/* =============================================
   NAVBAR  (ใช้ตาม nav.css เดียวกับ global-trade)
   ============================================= */
#__navbar {
    position: sticky;
    top: 0;
    z-index: 999999999;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.dropdown-toggle::after {
    display: inline-block !important;
    width: 0.35em !important;
    height: 0.35em !important;
    margin: -0.2em 0 0 0.4em !important;
    vertical-align: middle !important;
    content: "" !important;
    border: none !important;
    border-right: 2px solid #4f4f4f !important;
    border-bottom: 2px solid #4f4f4f !important;
    transform: rotate(45deg) !important;
    /* ลูกศรชี้ลงสมบูรณ์แบบ */
}

/* Hamburger — เหมือน global-trade/nav.css บรรทัด 43-85 */
.navbar-toggler span {
    display: block;
    background-color: #4f4f4f;
    height: 3px;
    width: 25px;
    margin-top: 5px;
    margin-bottom: 5px;
    position: relative;
    left: 0;
    opacity: 1;
    transition: all 0.35s ease-out;
    transform-origin: center left;
}

.navbar-toggler span:nth-child(1) {
    transform: translate(0%, 0%) rotate(0deg);
    margin-top: 0.3em;
}

.navbar-toggler span:nth-child(2) {
    opacity: 1;
}

.navbar-toggler span:nth-child(3) {
    transform: translate(0%, 0%) rotate(0deg);
}

.navbar-toggler:not(.collapsed) span:nth-child(1) {
    transform: translate(15%, -33%) rotate(45deg);
}

.navbar-toggler:not(.collapsed) span:nth-child(2) {
    opacity: 0;
}

.navbar-toggler:not(.collapsed) span:nth-child(3) {
    transform: translate(15%, 33%) rotate(-45deg);
}

/* =============================================
   ANCHOR HELPER
   ============================================= */
.anchor {
    display: block;
    height: 84px;
    margin-top: -84px;
    visibility: hidden;
}

/* =============================================
   SECTION COMMON  (ตรงตาม global-trade/style.css)
   ============================================= */
.section {
    padding-top: 12px;
    padding-bottom: 12px;
    padding-left: 20px;
    padding-right: 20px;
}

.section-header {
    font-size: 3rem;
    line-height: 3rem;
    text-align: center;
    color: #0A3B85;
    font-family: 'DB Heavent Blod', Arial, Helvetica, sans-serif;
}

/* บรรทัดที่ 2 ของหัวข้อ Section 3 */
.section-header-sub {
    font-size: 2.6rem;
    color: #0067b8;
    display: block;
    text-align: center;
    line-height: 1.2;
}

/* CTA Button */
.btn-open-acc {
    background-color: #005ea1;
    color: #fff;
    font-family: 'DB Heavent Blod', Arial, Helvetica, sans-serif;
    font-size: 1.8rem;
    border: none;
    border-radius: 15px;
    padding: 5px 72px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
    display: inline-block;
}

.btn-open-acc:hover {
    background-color: #004080;
    color: #fff;
    transform: translateY(-2px);
}

/* =============================================
   HERO BANNER & OVERLAY BUTTON
   ============================================= */
.hero-banner {
    position: relative;
    width: 100%;
    line-height: 0;
}

.hero-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-btn-overlay {
    position: absolute;
    bottom: 7.2%;
    /* [ปรับระดับลอยสูง-ต่ำจากขอบล่างเพื่อให้ปิดทับปุ่มเดิมพอดี] */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
    width: 100%;
}

.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 320px;
    /* ← [เพิ่มความยาวปุ่มขั้นต่ำ] เพื่อให้ทับปุ่มเดิมในรูปภาพ */
    background: #ffffff;
    color: #0273C2;
    /* [สีตัวอักษร] น้ำเงิน SBITO Main */
    font-family: 'DB Heavent Blod', Arial, Helvetica, sans-serif;
    font-size: 2rem;
    line-height: 1;
    padding: 12px 60px;
    /* ← [ขยายขนาดปุ่ม] */
    border-radius: 12px;
    /* [กรอบความมนของปุ่ม] */
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0, 41, 121, 0.3);
    border: 2px solid #ffffff;
    transition: all 0.25s ease-in-out;
}

.hero-cta-btn:hover {
    background: #002979;
    /* [สีพื้นหลังเวลา Hover] */
    color: #ffffff;
    border-color: #002979;
    transform: scale(1.04);
    box-shadow: 0 8px 24px rgba(0, 41, 121, 0.4);
}

.hero-cta-btn strong {
    font-family: 'DB Heavent Blk', 'DB Heavent Blod', Arial, Helvetica, sans-serif;
    font-weight: 700;
}

/* =============================================
   SECTION 2 - CUSTOMER TYPE BOXES
   ไม่มีกรอบ ไม่มีพื้นหลัง คลิกได้
   ============================================= */
.customer-type-section {
    padding: 24px 20px 36px;
    background: transparent;
    overflow: visible;
}

.customer-box-wrapper {
    display: flex;
    gap: 28px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 8px 6px 16px;
}

.customer-box {
    flex: 1;
    max-width: 520px;
    min-width: 280px;
    /* ไม่มี border / shadow / background */
}

.customer-box a {
    display: block;
    text-decoration: none;
}

.customer-box img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.25s ease, filter 0.25s ease;
}

.customer-box:hover img {
    transform: translateY(-4px) scale(1.01);
    filter: drop-shadow(0px 7px 12px rgba(0, 0, 0, 0.15));
}

/* =============================================
   SECTION 3 - WHY TRADE ICONS (ไอคอนซ้อนเหลื่อมกัน)

   [วิธีทำให้รูปทับกัน]:
   - ใช้ margin-left: -30px (หรือค่าติดลบตามต้องการ) รูปจะเกยทับกันทางซ้าย
   - ใช้ width: 210px ควบคุมขนาดของแต่ละรูป
   ============================================= */
.why-section {
    background: #fff;
    padding-left: 20px;
    padding-right: 20px;
}

/* [การตั้งค่าขนาดรูป ปรับ Padding ป้องกันขอบเงา/Hover ตัดขอบบน-ล่าง โดยไม่ให้มี Scrollbar แนวนอน] */
.why-section {
    position: relative;
}

.owl-carousel-why {
    padding-top: 15px !important;
    padding-bottom: 25px !important;
}

.owl-carousel-why .owl-stage {
    padding-top: 15px !important;
    padding-bottom: 25px !important;
}

.owl-carousel-why .owl-item {
    margin-left: 0;
    position: relative;
    z-index: 1;
    padding-top: 10px !important;
    padding-bottom: 15px !important;
}

.owl-carousel-why .owl-item:first-child {
    margin-left: 0;
}

.owl-carousel-why .owl-item:hover {
    z-index: 10;
}

.feature-icon {
    width: 100% !important;
    max-width: 280px;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    filter: drop-shadow(0px 6px 16px rgba(0, 0, 0, 0.08));
    transition: transform 0.25s ease, filter 0.25s ease;
}

.feature-icon:hover {
    transform: translateY(-6px);
    filter: drop-shadow(0px 12px 22px rgba(0, 0, 0, 0.14));
}

/* =============================================
   SECTION 4 - COMMISSION TABLE
   ไม่มีพื้นหลัง เงา 3 ด้าน ไม่ตัด

   [แก้ไขเงา] ปรับที่ .table-image-wrapper img { box-shadow }
   [แก้ไขพื้นที่รอบรูป] ปรับที่ .table-image-wrapper { padding }
   ============================================= */
.commission-section {
    /* [ลบพื้นหลัง] */
    background: transparent;
}

.table-image-wrapper {
    text-align: center;
    overflow-x: auto;
    /* [ปรับพื้นที่รอบรูป] */
    padding: 16px 20px 20px;
}

.table-image-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: inline-block;
    /* [แก้ไขเงา] x y blur spread color
       offset-x: 0=ล่าง, ±n=ซ้าย/ขวา
       ปรับค่า rgba alpha สำหรับความเข้ม */
    box-shadow:
        0 6px 20px rgba(0, 40, 100, 0.06),
        /* ล่าง (จางลง) */
        -6px 0 16px rgba(0, 40, 100, 0.03),
        /* ซ้าย (จางลง) */
        6px 0 16px rgba(0, 40, 100, 0.03);
    /* ขวา (จางลง) */
}

/* =============================================
   SECTION 5 - TRADING HOURS TABLE
   เงาเหมือน Section 4

   [แก้ไขเงา] ตรงเดียวกับ .table-image-wrapper img
   ============================================= */
.time-section {
    background: transparent;
}

/* =============================================
   SECTION 6 - STEPS
   รูปเท่านั้น ไม่มีกรอบ ไม่มีเงา ไม่มีพื้นหลัง

   [แก้ไขขนาดรูป] ปรับที่ .step-img { height }
   ============================================= */
.steps-section {
    padding: 20px 48px;
    /* [ลบพื้นหลัง] */
    background: transparent;
}

.steps-carousel-wrapper {
    overflow-x: auto;
    padding: 8px 4px 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.steps-carousel-wrapper::-webkit-scrollbar {
    display: none;
}

.steps-track {
    display: flex;
    gap: 20px;
    /* [แก้ไขช่องว่าง] ปรับที่ gap */
    width: max-content;
    align-items: flex-start;
}

/* [แก้ไขขนาดรูป] ปรับ height ตามต้องการ */
.step-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: transform 0.2s ease;
}

.step-img:hover {
    transform: translateY(-4px);
}

/* =============================================
   SECTION 7 - HOW TO DOWNLOAD
   ============================================= */
.howto-section {
    padding: 20px 20px 32px;
    background: #fff;
}

.howto-header-img {
    max-width: 600px;
    width: 100%;
    display: block;
    margin: 0 auto 16px;
}

.howto-content-img {
    max-width: 900px;
    width: 100%;
    display: block;
    margin: 0 auto;
}

/* =============================================
   FOOTER  (ตรงตาม global-trade/style.css)
   ============================================= */

/* พื้นหลัง footer — global-trade ใช้ #f7f7f7 */
.__footer-bg {
    background-color: #f7f7f7;
}

.footer-url {
    font-size: 1.2rem;
    line-height: 1.2;
    text-decoration: none;
    color: #7e7d7d;
}

.footer-url:hover {
    color: #333;
}

.sbi-address {
    font-size: 1.5rem;
    line-height: 1.2;
}

.__icon-footer {
    width: 40px;
    height: 40px;
}

.__social-padding {
    padding: 0 0 16px 0;
}

.opacity-footer {
    opacity: 0.85;
}

.text__copyright {
    font-size: 1.2rem;
    color: #949598;
}

.__copyright-border {
    border-top: 1px solid #bfbfc1;
}

.__footer {
    background-color: #f7f7f7;
}

/* ipad show/hide (ตรงตาม global-trade) */
.ipad__show {
    display: none;
}

.ipad__hide {
    display: block;
}

/* faq-drawer accordion (ตรงตาม global-trade/style.css) */
.faq-drawer {
    margin-bottom: 9px;
}

.faq-drawer__content-wrapper {
    font-size: 1.25em;
    line-height: 1.4em;
    max-height: 0;
    overflow: hidden;
    transition: 0.25s ease-in-out;
}

.faq-drawer__titleFirst {
    cursor: pointer;
    display: block;
    font-size: 1.25em;
    font-weight: 500;
    padding: 11px 0 0 0;
    position: relative;
    margin-bottom: 0;
    transition: all 0.25s ease-out;
}

.faq-drawer__title {
    border-top: #bfbfc1 1px solid;
    cursor: pointer;
    display: block;
    font-size: 1.25em;
    font-weight: 500;
    padding: 11px 0 0 0;
    position: relative;
    margin-bottom: 0;
    transition: all 0.25s ease-out;
}

.faq-drawer__titleFirst::after,
.faq-drawer__title::after {
    border-style: solid;
    border-width: 1px 1px 0 0;
    content: " ";
    display: inline-block;
    float: right;
    height: 10px;
    left: 2px;
    position: relative;
    right: 20px;
    top: 2px;
    transform: rotate(135deg);
    transition: 0.35s ease-in-out;
    vertical-align: top;
    width: 10px;
}

.faq-drawer__title:hover,
.faq-drawer__titleFirst:hover {
    color: #4e4b52;
}

.faq-drawer__trigger:checked+.faq-drawer__title+.faq-drawer__content-wrapper,
.faq-drawer__trigger:checked+.faq-drawer__titleFirst+.faq-drawer__content-wrapper {
    max-height: 350px;
}

.faq-drawer__trigger:checked+.faq-drawer__title::after,
.faq-drawer__trigger:checked+.faq-drawer__titleFirst::after {
    transform: rotate(-45deg);
    transition: 0.25s ease-in-out;
}

input[type="checkbox"] {
    display: none;
}

/* =============================================
   RESPONSIVE — TABLET (<=992px)
   ============================================= */
@media (max-width: 992px) {
    .section-header {
        font-size: 2.4rem;
        line-height: 2.4rem;
    }

    .hero-btn-overlay {
        bottom: 7%;
    }

    .hero-cta-btn {
        font-size: 1.6rem;
        padding: 10px 48px;
        min-width: 260px;
    }

    /* [แก้ไขขนาด Section 3 tablet] */
    .owl-carousel-why .owl-item {
        margin-left: 0;
    }

    .owl-carousel-why .owl-item:first-child {
        margin-left: 0;
    }

    .feature-icon {
        width: 100%;
        max-width: 220px;
    }

    /* [แก้ไขขนาด Section 6 tablet] */
    .step-img {
        height: 170px;
    }

    .ipad__show {
        display: block;
    }

    .ipad__hide {
        display: none;
    }
}

/* =============================================
   RESPONSIVE — MOBILE (<=767px)
   ============================================= */
@media (max-width: 767px) {

    /* 1. ปรับความห่างระหว่างแต่ละ Section บน Mobile ให้น้อยลง */
    .section {
        margin-top: 4px !important;
        margin-bottom: 4px !important;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .section-header {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
        margin-top: 2px !important;
        margin-bottom: 6px !important;
    }

    .__desktop-only {
        display: none !important;
    }

    .__mobile-only {
        display: block !important;
    }

    .hero-btn-overlay {
        bottom: 5%;
    }

    .hero-cta-btn {
        font-size: 1.3rem;
        padding: 8px 30px;
        min-width: 210px;
        border-radius: 10px;
    }

    /* Section 2 stack */
    .customer-type-section {
        padding: 20px 12px 30px !important;
    }

    .customer-box-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 16px !important;
        padding: 6px 4px 12px !important;
    }

    .customer-box {
        max-width: 100%;
        width: 100%;
    }

    /* 2. Section 3 Mobile - ปรับการแสดงผลรูปไอคอนบน Mobile ไม่ให้ทับซ้อน มีระยะห่าง และใส่เงาจางๆ โดยไม่ถูกตัดขอบ */
    .owl-carousel-why {
        padding-top: 10px !important;
        padding-bottom: 20px !important;
    }

    .owl-carousel-why .owl-item {
        margin-left: 0 !important;
        display: flex;
        justify-content: center;
        align-items: center;
        padding-top: 8px !important;
        padding-bottom: 12px !important;
    }

    .owl-carousel-why .owl-item:first-child {
        margin-left: 0 !important;
    }

    .feature-icon {
        width: 100% !important;
        max-width: 290px !important;
        height: auto !important;
        margin: 0 auto !important;
        object-fit: contain !important;
        filter: drop-shadow(0px 6px 14px rgba(0, 0, 0, 0.08)) !important;
    }

    /* 3. ตารางค่าธรรมเนียมและเวลา - ขยายให้ใหญ่และ Scroll ได้ */
    .table-image-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        padding: 10px 4px 20px !important;
        text-align: left !important;
    }

    .table-image-wrapper img {
        min-width: 1050px !important;
        /* ← [จุดแก้ไขขนาดความกว้างตาราง Mobile] เพิ่ม/ลดขนาดตรงนี้ */
        width: 1050px !important;
        max-width: none !important;
        height: auto !important;
        border-radius: 8px;
    }

    /* 4. รูป Steps บน Mobile - ขยายขนาดรูปใหญ่ อ่านชัดบนจอเล็ก */
    .owl-carousel-steps .owl-item {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .step-img {
        width: 100% !important;
        max-width: 290px !important;
        height: auto !important;
        max-height: none !important;
        object-fit: contain !important;
        margin: 0 auto !important;
    }

    /* 5. Section 7 Howto Carousel - ขยายเต็มขนาดความกว้างหน้าจอ Mobile */
    .owl-carousel-howto {
        padding: 0 4px;
    }

    .owl-carousel-howto .item img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        border-radius: 12px;
    }

    /* ซ่อน owl-dots บนหน้าจอ Mobile */
    .owl-dots {
        display: none !important;
    }

    /* Footer */
    .ipad__hide {
        display: block;
    }
}

/* =============================================
   CUSTOM SCROLLBAR STYLING
   - ซ่อน Scrollbar เมื่อเนื้อหาไม่เกินขนาดซ้าย-ขวา
   - ซ่อนปุ่มลูกศร 2 ข้าง (เส้น 2 เส้นที่ดูไม่สวยงาม)
   - ปรับแต่งหลอด Scrollbar ให้บาง เรียบหรู และจางลง
   ============================================= */
.mCS_no_scrollbar+.mCSB_scrollTools,
.mCS_no_scrollbar_x+.mCSB_scrollTools,
.mCS_x_hidden+.mCSB_scrollTools,
.mCS_no_scrollbar_y+.mCSB_scrollTools,
.mCS_y_hidden+.mCSB_scrollTools,
.mCSB_scrollTools.mCS_no_scrollbar {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* ซ่อนปุ่มลูกศรซ้าย-ขวา (เส้น 2 เส้น) */
.mCSB_scrollTools .mCSB_buttonLeft,
.mCSB_scrollTools .mCSB_buttonRight,
.mCSB_scrollTools .mCSB_buttonUp,
.mCSB_scrollTools .mCSB_buttonDown {
    display: none !important;
}

/* ลบเส้นแถบพื้นหลัง (Rail) */
.mCSB_scrollTools .mCSB_draggerRail {
    background-color: transparent !important;
    border: none !important;
}

/* ปรับลักษณะของ Dragger ให้บาง สวยงาม และไม่เข้มเกินไป */
.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar {
    height: 4px !important;
    margin: 6px auto !important;
    background-color: rgba(0, 0, 0, 0.2) !important;
    border-radius: 4px !important;
    transition: background-color 0.2s ease;
}

.mCSB_scrollTools_horizontal .mCSB_dragger:hover .mCSB_dragger_bar,
.mCSB_scrollTools_horizontal .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
    background-color: rgba(0, 0, 0, 0.4) !important;
}