body {
    font-family: "Noto Sans Thai", sans-serif;
    font-optical-sizing: auto;
    margin: 0;
    scroll-behavior: smooth;
}

.navbar {
    background-color: #178ed5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-left img {
    height: 50px;
}

/* ปุ่มเมนูมือถือ (ซ่อนใน Desktop) */
.navbar-toggle {
    display: none;
    font-size: 26px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* เมนูหลัก */
.navbar-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.navbar-menu li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: 400;
    transition: 0.3s;
}

.navbar-menu li a:hover {
    text-decoration: underline;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ฟอร์มล็อกอิน */
.login-form {
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-small {
    padding: 5px;
    font-size: 13px;
    border-radius: 4px;
    border: none;
    width: 100px;
    font-family: inherit;
}

.btn-small {
    background-color: #00bfff;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: auto;
}

.btn-small:hover {
    background-color: #0090c9;
}

.live-chat {
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid white;
    padding: 4px 8px;
    background: none;
    color: white;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
}

.lang-switch img {
    height: 16px;
}












.header-input-title {
    margin: 0;
    font-size: 12px;
    color: #fff;
}

.header-input {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
}

.header-input-username,
.header-input-password {
    display: flex;
    flex-direction: column;
}

.remember-password-control {
    margin-top: 4px;
}

.forgot-password {
    font-size: 11px;
    color: #ccc;
    text-decoration: underline;
    cursor: pointer;
    margin: 0;
}

.logo img {
    height: 40px;
}

.auth-buttons a {
    margin-left: 10px;
    padding: 6px 12px;
    background: #00bfff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 13px;
}

.auth-buttons a:hover {
    background: #0090c9;
}

/* Sections */
header img {
    width: 100%;
    height: auto;
    display: block;
}

section,
footer {
    padding: 40px 20px;
    text-align: center;
}

h2,
h3 {
    color: #178ed5;
    margin-bottom: 20px;
}

.section {
    background: white;
    margin-bottom: 20px;
}

.section-subtitle {
    text-align: center;
    color: #888;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    margin-top: 0rem;
}

.steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    /* หรือ center */
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.step {
    text-align: center;
    flex: 0 0 23%;
    max-width: 23%;
    padding: 20px;
    border-radius: 16px;
    background: #f9f9f9;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}


.step:hover {
    transform: translateY(-6px);
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.step-number {
    font-size: 1.5rem;
    background: #007bff;
    color: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}

.how-cta {
    text-align: center;
    margin-top: 40px;
}

.btn-primary {
    padding: 12px 28px;
    background-color: #007bff;
    color: #fff;
    font-size: 1.1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.step i,
.step img {
    display: block;
    margin: 0 auto 10px;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th,
td {
    padding: 10px;
    border: 1px solid #ccc;
    text-align: center;
}

th {
    background: #178ed5;
    color: white;
}

.btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #178ed5;
    border: none;
    font-family: "Noto Sans Thai", sans-serif;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    transition: 0.3s;
}

.btn:hover {
    background: #005bbb;
}

footer {
    padding: 3px 20px;
    background: #178ed5;
    color: white;
}

.commission-title {
    background-color: #367df8;
    padding: 10px;
    color: #FFF;
    margin-top: 0;
    margin-bottom: 0;
}

.commission-desc {
    font-size: 14px;
    line-height: 1.7;
    max-width: 800px;
    margin: auto;
    margin-bottom: 20px;
}

.commission-tabs {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-bottom: 6px;
}

.tab-button {
    padding: 10px 20px;
    border: 1px solid #178ed5;
    background-color: white;
    color: #178ed5;
    font-weight: bold;
    font-family: "Noto Sans Thai", sans-serif;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.2s;
}

.tab-button.active,
.tab-button:hover {
    background-color: #178ed5;
    color: white;
}

.commission-table-wrapper {
    overflow-x: auto;
}

.commission-table {
    width: 100%;
    margin: auto;
    border-collapse: collapse;
}

.commission-table th,
.commission-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: center;
}

.commission-table th {
    background-color: #178ed5;
    color: white;
}

.commission-table .highlight {
    font-weight: bold;
    background-color: #f1faff;
}

.center-button {
    text-align: right;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
    box-sizing: border-box;
}

.modal-content {
    background: white;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    /* ✅ บังคับขอบ radius */
}

.modal-close-outer {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    width: 36px;
    height: 36px;
    background: #ff4d4f;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.modal-close-outer:hover {
    background: #d9363e;
}

.modal-body-scroll {
    overflow-y: auto;
    overflow-x: auto;
    padding: 12px;
    box-sizing: border-box;
    height: 100%;
}


/* ✅ ปุ่มปิดอยู่ด้านใน modal-content */
.modal-close-outer {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: #ff4d4f;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.modal-close-outer:hover {
    background: #d9363e;
}

.popup-section {
    text-align: left;
    font-weight: 300;
}

.popup-section h3 {
    font-size: 1.25rem;
    margin-bottom: 0;
}

.popup-section h3 {
    font-size: 1.25rem;
}

/* ✅ ตาราง scroll ได้แนวนอน */
.commission-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
}

.commission-table {
    min-width: 900px;
    border-collapse: collapse;
    width: 100%;
}

.commission-table th,
.commission-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: center;
    font-size: 14px;
}

.commission-table th {
    background-color: #178ed5;
    color: white;
}

.commission-table .highlight {
    background: #f1faff;
    font-weight: bold;
}

.no-bullet {
    list-style: none;
    padding-left: 0;
    margin: 0 0 1em 0;
    /* สามารถปรับ margin ตามต้องการ */
}


#why {
    padding: 60px 20px;
    background-color: #f8f9fa;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.feature-box {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    padding: 20px;
    text-align: center;
}

.feature-box:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.feature-box img {
    margin-bottom: 0;
    width: 150px;
}


@media (max-width: 768px) {
    .auth-buttons {
        margin-top: 10px;
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
}

/* ✅ Responsive สำหรับมือถือ */
@media screen and (max-width: 768px) {
    .commission-title {
        border-radius: 10px;
    }

    .modal-content {
        max-height: 85vh;
        padding: 7px;
    }

    .modal-close-outer {
        width: 32px;
        height: 32px;
        font-size: 16px;
        top: 10px;
        right: 10px;
    }

    .commission-table th,
    .commission-table td {
        font-size: 13px;
        padding: 8px;
    }

    .popup-section {
        font-size: 14px;
    }

    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 6px 5px;
    }

    .navbar-toggle {
        display: block;
        margin-left: auto;
        font-size: 40px;
        right: 0;
        position: absolute;
    }

    .navbar-menu {
        flex-direction: column;
        width: 100%;
        display: none;
        padding-top: 10px;
    }

    .navbar-menu.open {
        display: flex;
    }

    .navbar-right {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        margin-top: 0px;
        gap: 10px;
    }

    .login-form {
        flex-direction: initial;
        width: 100%;
        gap: 6px;
    }

    .input-small {
        width: 100%;
    }

    .btn-small {
        width: 100%;
        max-width: 70px;
    }

    .live-chat,
    .lang-switch {
        display: none;
    }

    .step {
        flex: 0 0 40%;
        max-width: 40%;
    }
}

@media screen and (max-width: 480px) {
    .step {
        flex: 0 0 100%;
        max-width: 100%;
    }
}