:root {
    --brand-navy-deep: #163e84;
    --brand-navy: #12306b;
    --brand-blue: #2f6fd6;
    --brand-gold: #ffd400;
    --brand-line: #e7e9f0;
    --brand-text: #1c2434;
    --brand-bg-soft: #f2f5fb;
    --brand-text-muted: #6b7280;
    --radius-lg: 18px;
    --radius-pill: 999px;
    --shadow-card: 0 8px 20px -16px rgba(10, 31, 68, 0.3);
    --shadow-card-hover: 0 16px 32px -18px rgba(10, 31, 68, 0.4);
}

* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    margin: 0;
    font-family: "Kanit", sans-serif;
    color: var(--brand-text);
    background: #fafbfc;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ===== Top bar ===== 
.top-banner {
    background: var(--brand-navy-deep);
    color: #fff;
    font-size: 13px;
    position: fixed;
    
}

.top-banner .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100%;
}

.top-banner .orgname a {
    color: #fff;
    line-height: 1.3;
    display: block;
}

.top-banner .orgname .th {
    font-size: 14px;
    font-weight: 600;
}

.top-banner .orgname .en {
    font-size: 11px;
    opacity: 0.75;
}

.top-banner .list-inline {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.top-banner .list-inline a {
    color: #fff;
    opacity: 0.9;
}

.top-banner .list-inline a:hover {
    color: var(--brand-gold);
    opacity: 1;
}*/

/* ===== Main navbar ===== 
.navbar {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(22, 62, 132, 0.08);
    box-shadow: 0 4px 20px -10px rgba(10, 31, 68, 0.12);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;          
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 14px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 14px;
    height: 60px;

}*/

/* ===== Header Wrapper ===== */
.header {
    display: contents;
}

/* ===== Top banner / Top Card ===== */
.top-banner {
    background: var(--brand-navy-deep);
    color: #fff;
    font-size: 13px;
    width: 100%;
    position: relative;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.top-banner .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 1600px; /* ปรับให้เท่ากับ nav-container เพื่อความสมดุล */
    margin: 0 auto;
    box-sizing: border-box;
}

.top-banner .orgname a {
    color: #fff;
    line-height: 1.3;
    display: block;
}

.top-banner .orgname .th {
    font-size: 14px;
    font-weight: 600;
}

.top-banner .orgname .en {
    font-size: 11px;
    opacity: 0.75;
}

.top-banner .list-inline {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.top-banner .list-inline a {
    color: #fff;
    opacity: 0.9;
}

.top-banner .list-inline a:hover {
    color: var(--brand-gold);
    opacity: 1;
}

/* ===== Main navbar ===== */
.navbar {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(22, 62, 132, 0.08);
    box-shadow: 0 4px 20px -10px rgba(10, 31, 68, 0.12);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;          
    width: 100%;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 14px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 14px;
    height: 60px;
    box-sizing: border-box;
}


.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: var(--brand-navy-deep);
    white-space: nowrap;
    flex-shrink: 0;
}


.nav-logo {
    height: 50px;
    width: auto;
}

.logo .badge {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover .badge {
    transform: translateY(-1px) scale(1.02);
    border-color: rgba(22, 62, 132, 0.15);
    box-shadow: 0 6px 16px -2px rgba(22, 62, 132, 0.1);
}

.logo .name {
    font-size: 15px;
    line-height: 1.2;
}


.nav-menu {
    display: flex;
    gap: 2px;
    align-items: center;
    flex-wrap: nowrap;
    list-style: none;
    margin-left: auto;
    margin-right: 0;
    padding: 0;
    flex-shrink: 0;
    height: 100%;
}


.nav-menu>li {
    position: relative;
    flex-shrink: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-menu>li>a {
    font-size: 16px;
    font-weight: 500;
    color: #585d68;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 12px;
    height: 100%;
    white-space: nowrap;
    text-decoration: none;
    border-radius: 0px;
    transition: all 0.2s ease;
}

.nav-menu>li>a:hover,
.nav-menu>li:focus-within>a,
.nav-menu>li.active>a {
    background-color: #eaf1fd;
    color: var(--brand-navy, #0056b3);
}

.nav-menu>li>a i {
    font-size: 10px;
    opacity: 0.6;
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f2f4f9;
    border: 1px solid transparent;
    border-radius: var(--radius-pill, 50px);
    padding: 8px 14px;
    font-size: 12.5px;
    color: #8a92a6;
    white-space: nowrap;
    width: 200px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.nav-search:focus-within {
    background: #ffffff;
    border-color: #4F9EF3;
    box-shadow: 0 0 5px rgba(79, 158, 243, 0.4);
}

.nav-search input {
    border: 0;
    outline: 0;
    background: transparent;
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    color: var(--brand-text);
}

.nav-search input::placeholder {
    color: #a0aec0;
}

.nav-search i {
    color: #8a92a6;
    font-size: 14px;
}


.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    width: max-content;
    min-width: 100%;
    box-shadow: 0 20px 40px -20px rgba(10, 31, 68, 0.35);
    border-radius: 0 0 12px 12px;
    padding: 0;
    border: 1px solid var(--brand-line, #e2e8f0);
    z-index: 1000;
    list-style: none;
    overflow: visible;

}

.dropdown:hover .dropdown-content {
    display: block;
}

.nav-menu>li:last-child .dropdown-content {
    left: auto;
    right: 0;
}

.dropdown-content li {
    width: 100%;
}


.dropdown-content li a {
    display: block;
    padding: 12px 16px;
    border-radius: 0px;
    font-size: 13.5px;
    white-space: nowrap;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
}


.dropdown-content li a:hover {
    background: #eaf1fd;
    color: var(--brand-navy, #0056b3);
}

.dropdown-content li a .star,
.mobile-dropdown-content li a .star {
    color: #e53935;
    margin-left: 5px;
    font-size: 13px;
    vertical-align: middle;
}

/* ===== Dropdown Section Labels ===== */
.dropdown-section-label {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px 8px;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--brand-navy-deep, #163e84);
    background: var(--brand-bg-soft, #f2f5fb);
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

.dropdown-section-label i {
    font-size: 13px;
    opacity: 0.75;
}

.dropdown-section-label--sep {
    border-top: 1px solid var(--brand-line, #e7e9f0);
    margin-top: 4px;
    padding-top: 10px;
}

/* ===== Flyout Sub-dropdown ===== */
.has-submenu {
    position: relative;
}

.has-submenu > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sub-arrow {
    font-size: 9px !important;
    opacity: 0.5;
    margin-left: auto;
    padding-left: 8px;
}

.sub-dropdown {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 260px;
    background: #fff;
    border: 1px solid var(--brand-line, #e2e8f0);
    box-shadow: 4px 8px 24px -8px rgba(10, 31, 68, 0.25);
    border-radius: 0 12px 12px 12px;
    margin-top: 0;
    margin-left: 0;
    z-index: 1100;
    list-style: none;
    padding: 0;
    overflow: visible;
}

.has-submenu:hover > .sub-dropdown {
    display: block;
}

.sub-dropdown ol {
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sub-dropdown ol a {
    display: block;
    padding: 12px 16px;
    font-size: 13.5px;
    white-space: normal;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
}

.sub-dropdown ol a:hover {
    background: #eaf1fd;
    color: var(--brand-navy, #0056b3);
}

/* ===== Hero Slider ===== */
.hero-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero-track {
    display: flex;
    width: 100%;
    height: auto;
    will-change: transform;
    user-select: none;
    touch-action: pan-y;
}

.hero-full-image {
    display: block;
    width: 100%;
    height: auto;
    border: 0;
    padding: 0;
    object-fit: cover;
    object-position: center;
}

.hero-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    color: #fff;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-slide .bg-decor {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.5;
}

.hero-slide .bg-decor svg {
    width: 100%;
    height: 100%;
}

.hero-slide.slide-1 {
    background: linear-gradient(120deg, var(--brand-navy) 0%, var(--brand-navy-deep) 55%, #050d22 100%);
}

.hero-slide.slide-2 {
    background: linear-gradient(120deg, #0f3d2e 0%, #0a2b21 55%, #04140f 100%);
}

.hero-slide.slide-3 {
    background: linear-gradient(120deg, #3a2a63 0%, #241a45 55%, #0d0a1f 100%);
}

.hero-slide .hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-badge {
    display: inline-block;
    background: var(--brand-gold);
    color: var(--brand-navy-deep);
    font-weight: 700;
    font-size: 13px;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    margin-bottom: 14px;
}

.hero-slide h1 {
    font-size: clamp(28px, 4.2vw, 50px);
    line-height: 1.15;
    margin: 0 0 10px;
    font-weight: 800;
    max-width: 680px;
}

.hero-slide h1 .accent {
    color: var(--brand-gold);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin: 20px 0 6px;
    font-size: 15px;
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-meta i {
    color: var(--brand-gold);
}

.hero-note {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 14px 18px;
    margin-top: 22px;
    font-size: 14px;
    line-height: 1.7;
    max-width: 720px;
}

.hero-note i {
    color: var(--brand-gold);
    margin-right: 8px;
}

.hero-icon-graphic {
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 260px;
    color: rgba(255, 255, 255, 0.08);
    z-index: 1;
}



@media (max-width: 900px) {
    .hero-icon-graphic {
        display: none;
    }
}

/* slider controls */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 6;
    backdrop-filter: blur(4px);
    transition: 0.2s;
}

.hero-arrow:hover {
    background: var(--brand-gold);
    color: var(--brand-navy-deep);
    border-color: var(--brand-gold);
}

.hero-arrow.prev {
    left: 24px;
}

.hero-arrow.next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    bottom: 25px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 6;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: 0.2s;
}

.hero-dot.active {
    background: var(--brand-gold);
    width: 26px;
    border-radius: 6px;
}

@media (max-width: 900px) {

    .hero-dots {
        bottom: 16px;
    }

    .hero-arrow {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .hero-arrow.prev {
        left: 12px;
    }

    .hero-arrow.next {
        right: 12px;
    }
}

@media (max-width: 640px) {

    .hero-arrow {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .hero-arrow.prev {
        left: 8px;
    }

    .hero-arrow.next {
        right: 8px;
    }

    .hero-dots {
        bottom: 10px;
    }
}



/* search card overlapping hero */
.search-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(22, 62, 132, 0.06);
    box-shadow: 0 16px 40px -12px rgba(10, 31, 68, 0.863);
    padding: 18px 24px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    /* Overlap hero slider beautifully */
    position: relative;
    z-index: 5;
    transition: all 0.3s ease;
}

@media (max-width: 900px) {
    .search-card {
        margin-top: -30px;
        padding: 14px 18px;
    }
}

@media (max-width: 640px) {
    .search-section {
        padding: 0;
    }

    .search-card {
        flex-direction: column;
        align-items: stretch;
        margin-top: 0;
        border-radius: 0;
        box-shadow: 0 4px 16px rgba(10, 31, 68, 0.08);
        padding: 14px 16px;
        gap: 10px;
    }

    .search-field {
        flex: none;
        width: 100%;
        padding: 12px 16px;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
        padding: 14px;
        font-size: 15px;
    }
}

.search-field {
    flex: 1 1 320px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-pill);
    padding: 12px 20px;
    color: #4a5568;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.search-field:focus-within {
    border-color: var(--brand-blue);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(47, 111, 214, 0.12);
}

.search-field i {
    color: var(--brand-blue);
    font-size: 16px;
}

.search-field input {
    border: 0;
    outline: 0;
    flex: 1;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--brand-text);
    background: transparent;
}

.search-field input::placeholder {
    color: #a0aec0;
}

.search-select {
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-pill);
    padding: 12px 20px;
    font-family: inherit;
    font-size: 14px;
    color: #4a5568;
    background: #f8fafc;
    outline: none;
    transition: all 0.2s ease;
}

.search-select:focus {
    border-color: var(--brand-blue);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(47, 111, 214, 0.12);
}

.search-btn {
    background: var(--brand-navy);
    color: #fff;
    border: 0;
    border-radius: var(--radius-pill);
    padding: 13px 32px;
    font-family: inherit;
    font-weight: 600;
    font-size: 14.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(18, 48, 107, 0.15);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-btn:hover {
    background: var(--brand-gold);
    color: var(--brand-navy-deep);
    box-shadow: 0 6px 20px rgba(255, 212, 0, 0.3);
    transform: translateY(-1px);
}

.search-btn:active {
    transform: translateY(1px);
}

.tag-pill {
    border: 1px solid var(--brand-line);
    background: #fff;
    color: #5a6072;
    font-size: 13px;
    padding: 7px 18px;
    border-radius: var(--radius-pill);
    transition: 0.2s;
}

.tag-pill:hover {
    border-color: var(--brand-gold);
    color: var(--brand-navy);
}

/* ===== Section shared ===== */
.section {
    padding: 52px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 38px;
}

.eyebrow {
    color: var(--brand-blue);
    font-weight: 700;
    font-size: 12.5px;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.section-title {
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 700;
    color: var(--brand-navy);
    margin: 0 0 8px;
    position: relative;
    display: inline-block;
}

.section-title:after {
    content: "";
    display: block;
    width: 52px;
    height: 3px;
    background: var(--brand-gold);
    margin: 10px auto 0;
    border-radius: 3px;
}

.section-subtitle {
    font-size: clamp(14px, 1.6vw, 16px);
    color: #6b7280;
    margin: 0;
}

/* ===== Services ===== */
.services-clean-section {
    width: 100%;
    background-color: #ffffff;
    padding-top: 140px;
    padding-bottom: 160px;
    padding-left: 0;
    padding-right: 0;
}


.services-static-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


.services-header-center {
    text-align: center;
    margin-top: -30px;
    margin-bottom: 60px;
}


.services-static-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 28px;
    align-items: center;
    margin-bottom: 120px;
}


.eyebrow {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #0b3c5d;
    margin-bottom: 10px;
}

.section-title {
    font-size: 34px;
    font-weight: 700;
    color: #12306b;
    margin: 0 0 14px 0;
}

.section-subtitle {
    font-size: 16px;
    color: #666666;
    margin: 0 auto;
    max-width: 600px;
    line-height: 1.5;
}

.services-static-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    align-items: center;
}

.service-static-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(22, 62, 132, 0.08);
    box-shadow: 0 8px 24px -12px rgba(10, 31, 68, 0.15);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-image-box {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #f8fafc;
    border-radius: 0;
}

.card-image-box img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}


.card-content-box {
    padding: 24px 14px;
    text-align: center;
    background-color: #ffffff;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    z-index: 2;
    transition: background-color 0.35s ease;
}

.title-en {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 6px 0;
    transition: color 0.3s ease;
}

.title-th {
    font-size: 13px;
    color: #475569;
    margin: 0;
}

/* =================================================== */
.service-static-card:hover {
    transform: translateY(-16px) scale(1.02);
    z-index: 5;
    box-shadow: 0 35px 70px -10px rgba(11, 60, 93, 0.28), 0 15px 30px -10px rgba(11, 60, 93, 0.12);
}


.service-static-card:hover .card-content-box {
    background-color: #e6eef7;
}


.service-static-card:hover .card-image-box img {
    transform: scale(1.06);
}


.service-static-card:hover .title-en {
    color: #0b3c5d;
}

/* =================================================== */
/* CLICK EFFECT
/* =================================================== */
.service-static-card:active {
    transform: translateY(-4px) scale(0.97);
    box-shadow: 0 10px 20px -8px rgba(11, 60, 93, 0.22);
    transition: transform 0.08s ease;
}

.service-static-card:active .card-content-box {
    background-color: #cbdcf0;

}


@media (max-width: 992px) {


    .services-header-center {
        text-align: center;
        margin-top: 0px;
        margin-bottom: 60px;
    }


    .services-clean-section {
        padding: 70px 0;
    }

    .services-static-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .service-static-card:hover {
        transform: none;
        box-shadow: 0 14px 34px -4px rgba(100, 116, 139, 0.18), 0 4px 14px -1px rgba(100, 116, 139, 0.08);
    }

    .service-static-card:hover .card-content-box {
        background-color: #ffffff;
    }

    .service-static-card:hover .card-image-box img {
        transform: none;
    }

    .service-static-card:hover .title-en {
        color: #0f172a;
    }

    .service-static-card:active {
        transform: scale(0.96);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 576px) {
    .services-static-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .section-title {
        font-size: 28px;
    }
}

/* ===== Recommended courses ===== */
.recommend-section {
    background: linear-gradient(135deg, #f0f4fd 0%, #e5edfb 100%);
    padding: 70px 0 80px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.recommend-section .inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    box-sizing: border-box;
}


/* ===== Course Scroller Wrapper + Nav Buttons ===== */
.course-scroller-wrap {
    position: relative;
}

.scroll-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    color: var(--brand-navy);
    box-shadow: 0 4px 18px -4px rgba(10, 31, 68, 0.28);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    outline: none;
}

.scroll-nav-btn:hover {
    background: var(--brand-navy);
    color: #ffffff;
    box-shadow: 0 8px 24px -6px rgba(10, 31, 68, 0.42);
    transform: translateY(-50%) scale(1.08);
}

.scroll-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.scroll-nav-prev {
    left: -22px;
}

.scroll-nav-next {
    right: -22px;
}

@media (max-width: 1250px) {
    .scroll-nav-prev { left: 4px; }
    .scroll-nav-next { right: 4px; }
}

@media (max-width: 768px) {
    .scroll-nav-prev { left: 4px; }
    .scroll-nav-next { right: 4px; }
    .scroll-nav-btn { width: 36px; height: 36px; font-size: 13px; }
}

.course-scroller {
    position: relative;
    overflow: hidden;
    width: 100%;
    display: flex;
    padding: 16px 0;
    mask-image: none;
    -webkit-mask-image: none;
}


.scroller-track {
    display: flex;
    flex-shrink: 0;
    gap: 18px;
    padding-right: 18px;
    animation: scrollLoop 35s linear infinite;
    will-change: transform;
}


/* Hover-pause ถูกจัดการโดย JS แทน เพื่อให้ getComputedTranslateX ได้ค่าจริงเมื่อกดปุ่ม */
/* .course-scroller:hover .scroller-track { animation-play-state: paused; } */


.training-card {
    flex: 0 0 210px;
    width: 210px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    height: 300px;
    color: #fff;
    box-shadow: 0 8px 24px -4px rgba(16, 37, 66, 0.12), 0 2px 6px -1px rgba(16, 37, 66, 0.08);
    background: linear-gradient(160deg, #233560, #0f1c3d);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
}

/* Mouse เธเธตเน Card */
.training-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 24px 45px -8px rgba(11, 60, 93, 0.25), 0 10px 20px -6px rgba(11, 60, 93, 0.15);
    z-index: 10;
}

.tc-image-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
}

.tc-image-wrapper a,
.tc-image-wrapper .btn-glowx {
    display: block;
    width: 100%;
    height: 100%;
}

.tc-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.training-card .badge-date {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-size: 10.5px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    backdrop-filter: blur(2px);
}

.training-card .tc-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.85), transparent 100%);
}

.training-card .tc-title {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 8px;
}

.training-card .tc-meta {
    font-size: 11px;
    opacity: 0.85;
    display: flex;
    flex-direction: column;
    gap: 3px;
}


@keyframes scrollLoop {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}


/* ===== Course Slider Section (tpif-test.html & sliderTrack) ===== */
.course-slider-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: radial-gradient(circle at 50% 15%, #18376e 0%, #0d1e3a 60%, #071326 100%);
    padding: 60px 0 65px;
}

.course-slider-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 212, 0, 0.4), transparent);
}

.course-slider-section .section-header {
    text-align: center;
    margin-bottom: 26px;
    position: relative;
    z-index: 2;
}

.slider-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 212, 0, 0.12);
    color: #ffd400;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.6px;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 212, 0, 0.35);
    margin-bottom: 12px;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.slider-eyebrow i {
    color: #ffd400;
    font-size: 11px;
}

.course-slider-section .section-title {
    color: #ffffff;
    font-size: clamp(22px, 3.5vw, 32px);
    font-weight: 700;
    margin: 0 0 10px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.course-slider-section .section-title:after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffd400, transparent);
    margin: 10px auto 0;
    border-radius: 99px;
}

.course-slider-section .section-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: clamp(13.5px, 1.8vw, 15.5px);
    margin: 0;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* Mobile swipe hint */
.slider-swipe-hint {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255, 212, 0, 0.95);
    font-size: 12px;
    margin-top: 14px;
    background: rgba(13, 30, 58, 0.65);
    border: 1px solid rgba(255, 212, 0, 0.25);
    padding: 5px 14px;
    border-radius: 99px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.slider-swipe-hint i {
    font-size: 11px;
    animation: swipeHintAnim 2s infinite ease-in-out;
}

@keyframes swipeHintAnim {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.slider-container {
    max-width: 1240px;
    margin: 0 auto;
    position: relative;
    padding: 0 16px;
    box-sizing: border-box;
}

.slider-wrapper {
    position: relative;
    width: 100%;
}

.slider {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 16px 4px 20px;
    mask-image: linear-gradient(to right, transparent 0%, #000 35px, #000 calc(100% - 35px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 35px, #000 calc(100% - 35px), transparent 100%);
}

#sliderTrack,
.slider-track {
    display: flex;
    gap: 18px;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}

#sliderTrack .btn-glowx,
.slider-track .btn-glowx {
    flex: 0 0 215px;
    width: 215px;
    height: 305px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, #182e56 0%, #0b172d 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.45), 0 2px 6px -1px rgba(0, 0, 0, 0.25);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
}

#sliderTrack .btn-glowx:hover,
.slider-track .btn-glowx:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 22px 45px -8px rgba(0, 0, 0, 0.65), 0 0 24px rgba(255, 212, 0, 0.35);
    border-color: rgba(255, 212, 0, 0.6);
    z-index: 10;
}

#sliderTrack .btn-glowx:active,
.slider-track .btn-glowx:active {
    transform: translateY(-2px) scale(0.98);
}

#sliderTrack .slider-img,
.slider-track .slider-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 15px;
    pointer-events: none;
    transition: transform 0.4s ease;
}

#sliderTrack .btn-glowx:hover .slider-img,
.slider-track .btn-glowx:hover .slider-img {
    transform: scale(1.03);
}

/* Fallback card content when image is loading or fails */
.card-fallback-info {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px 14px;
    background: linear-gradient(to top, rgba(7, 18, 38, 0.95) 0%, rgba(7, 18, 38, 0.35) 60%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#sliderTrack .btn-glowx:hover .card-fallback-info,
.slider-track .btn-glowx:hover .card-fallback-info {
    opacity: 1;
}

.img-fallback + .card-fallback-info,
.img-fallback ~ .card-fallback-info {
    opacity: 1 !important;
    background: linear-gradient(160deg, #182e56 0%, #0b172d 100%) !important;
}

.card-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: #ffd400;
    background: rgba(255, 212, 0, 0.16);
    padding: 3px 8px;
    border-radius: 6px;
    width: fit-content;
    margin-bottom: 6px;
}

.card-title-text {
    font-size: 13px;
    line-height: 1.35;
    font-weight: 600;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Slider Nav Buttons for Desktop */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: #ffffff;
    color: var(--brand-navy);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    outline: none;
    user-select: none;
}

.slider-btn:hover {
    background: var(--brand-gold);
    color: var(--brand-navy-deep);
    box-shadow: 0 8px 25px rgba(255, 212, 0, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.slider-btn.left {
    left: -24px;
}

.slider-btn.right {
    right: -24px;
}

/* Mobile Controls Bar (Dots + Prev/Next Buttons) */
.slider-mobile-controls {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 14px;
    padding: 6px 0;
}

.slider-control-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.slider-control-btn:hover,
.slider-control-btn:active {
    background: var(--brand-gold);
    color: var(--brand-navy-deep);
    border-color: var(--brand-gold);
    transform: scale(1.08);
}

.slider-indicator-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-dot.active {
    background: var(--brand-gold);
    width: 24px;
    border-radius: 99px;
    box-shadow: 0 0 10px rgba(255, 212, 0, 0.7);
}

/* Responsive adjustments for Mobile & Tablet */
@media (max-width: 768px) {
    .course-slider-section {
        padding: 38px 0 44px;
    }

    .slider-swipe-hint {
        display: inline-flex;
    }

    .slider-btn.desktop-only,
    .slider-wrapper > .slider-btn {
        display: none !important;
    }

    .slider-mobile-controls {
        display: flex;
    }

    .slider {
        padding: 10px 0 14px;
        mask-image: linear-gradient(to right, transparent 0%, #000 10px, #000 calc(100% - 10px), transparent 100%);
        -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 10px, #000 calc(100% - 10px), transparent 100%);
    }

    #sliderTrack,
    .slider-track {
        gap: 12px;
    }

    #sliderTrack .btn-glowx,
    .slider-track .btn-glowx {
        flex: 0 0 168px;
        width: 168px;
        height: 240px;
        border-radius: 14px;
        box-shadow: 0 6px 18px -3px rgba(0, 0, 0, 0.45);
    }

    #sliderTrack .slider-img,
    .slider-track .slider-img {
        border-radius: 13px;
    }

    .card-title-text {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .slider-container {
        padding: 0 12px;
    }

    #sliderTrack .btn-glowx,
    .slider-track .btn-glowx {
        flex: 0 0 152px;
        width: 152px;
        height: 216px;
    }

    .slider-mobile-controls {
        gap: 12px;
        margin-top: 10px;
    }

    .slider-control-btn {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .slider-dot {
        width: 7px;
        height: 7px;
    }

    .slider-dot.active {
        width: 20px;
    }
}


.course-finder {
    background: var(--brand-bg-soft);
    padding: 96px 0 64px;
}

.cf-toggle-wrap {
    display: flex;
    justify-content: center;
    margin: 12px 0 48px;
}

.cf-toggle {
    display: inline-flex;
    gap: 6px;
    background: #fff;
    padding: 7px;
    border-radius: var(--radius-pill);
    box-shadow: 0 10px 26px -16px rgba(10, 31, 68, 0.35);
    border: 1px solid var(--brand-line);
    max-width: 100%;
}

.cf-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: none;
    background: transparent;
    color: var(--brand-text-muted);
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.1px;
    padding: 13px 28px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.cf-toggle-btn i {
    font-size: 14px;
}

.cf-toggle-btn:active {
    transform: scale(0.96);
}

.cf-toggle-btn .cf-en {
    font-weight: 600;
    opacity: 0.8;
    font-size: 13px;
    margin-left: 6px;
}


.cf-toggle-btn[data-target="cf-position"]:hover {
    color: var(--brand-navy);
    background: rgba(18, 48, 107, 0.07);
}

.cf-toggle-btn[data-target="cf-function"]:hover {
    color: #8a6a00;
    background: rgba(255, 212, 0, 0.16);
}


.cf-toggle-btn[data-target="cf-position"].active {
    background: linear-gradient(135deg, var(--brand-navy), var(--brand-blue));
    color: #fff;
    border: 2px solid var(--brand-blue);
    box-shadow: 0 10px 22px -10px rgba(18, 48, 107, 0.6);
    transform: translateY(-1px);
}

.cf-toggle-btn[data-target="cf-position"].active:hover {
    color: #fff;
}


.cf-toggle-btn[data-target="cf-function"].active {
    background: linear-gradient(135deg, #ffd400, #ffb800);
    color: #4a3600;
    box-shadow: 0 10px 22px -10px rgba(255, 184, 0, 0.6);
    transform: translateY(-1px);
}

.cf-toggle-btn[data-target="cf-function"].active:hover {
    color: #4a3600;
}

.cf-panel {
    display: none;
}

.cf-panel.active {
    display: block;
    animation: cfFadeIn 0.25s ease;
}

@keyframes cfFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cf-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    justify-content: center;
    padding: 0 4px;
}

.cf-card {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1 1 250px;
    max-width: 310px;
    background: #fff;
    border: 1px solid var(--brand-line);
    border-radius: 16px;
    padding: 16px 18px;
    text-decoration: none;
    color: var(--brand-text);
    box-shadow: 0 8px 20px -16px rgba(10, 31, 68, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cf-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -18px rgba(10, 31, 68, 0.4);
}

.cf-card:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 8px 16px -12px rgba(10, 31, 68, 0.4);
}

.cf-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #eaf1fd;
    color: var(--brand-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.2s ease, color 0.2s ease;
}


#cf-position .cf-card:hover {
    border-color: var(--brand-blue);
}

#cf-position .cf-card:hover .cf-icon {
    background: var(--brand-navy);
    color: #fff;
}


#cf-function .cf-icon {
    background: #fff6d9;
    color: #8a6a00;
}

#cf-function .cf-card:hover {
    border-color: #ffd400;
}

#cf-function .cf-card:hover .cf-icon {
    background: #ffd400;
    color: #4a3600;
}

.cf-label {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.4;
}

.cf-viewall-wrap {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.cf-viewall-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: var(--brand-blue);
    border: 1.5px solid var(--brand-blue);
    font-weight: 700;
    font-size: 15px;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    box-shadow: 0 8px 20px -16px rgba(10, 31, 68, 0.3);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cf-viewall-btn i {
    font-size: 14px;
}

.cf-viewall-btn:hover {
    background: var(--brand-navy);
    border-color: var(--brand-navy);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -12px rgba(18, 48, 107, 0.5);
}

.cf-viewall-btn:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 6px 14px -10px rgba(18, 48, 107, 0.5);
}

@media (max-width: 900px) {
    .cf-grid {
        gap: 16px;
    }

    .cf-card {
        flex: 1 1 45%;
        max-width: none;
        padding: 18px 20px;
    }
}

@media (max-width: 640px) {
    .course-finder {
        padding: 32px 0;
    }

    .cf-toggle-wrap {
        margin-bottom: 24px;
    }

    .cf-toggle {
        width: 100%;
        padding: 5px;
    }

    .cf-toggle-btn {
        flex: 1;
        padding: 9px 10px;
        font-size: 12.5px;
        gap: 6px;
    }

    .cf-toggle-btn i {
        font-size: 12px;
    }

    .cf-toggle-btn .cf-en {
        display: none;
    }

    .cf-grid {
        gap: 10px;
    }

    .cf-card {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 10px 14px;
        gap: 12px;
        border-radius: 12px;
    }

    .cf-icon {
        width: 36px;
        height: 36px;
        font-size: 15px;
        border-radius: 8px;
    }

    .cf-label {
        font-size: 14px;
    }

    .cf-viewall-wrap {
        margin-top: 24px;
    }

    .cf-viewall-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 20px;
        font-size: 13.5px;
        gap: 8px;
    }

    .cf-viewall-btn i {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .cf-card {
        padding: 8px 12px;
        gap: 10px;
        border-radius: 10px;
    }

    .cf-icon {
        width: 32px;
        height: 32px;
        font-size: 13px;
        border-radius: 7px;
    }

    .cf-label {
        font-size: 13px;
    }

    .cf-toggle-btn {
        padding: 8px 6px;
        font-size: 12px;
        gap: 5px;
    }

    .cf-toggle-btn i {
        font-size: 11px;
    }

    .cf-viewall-btn {
        font-size: 13px;
        padding: 9px 16px;
    }
}

/* ===== Course plans ===== */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.plan-card {
    border-radius: 18px;
    padding: 26px;
    border: 1px solid transparent;
    box-shadow: 0 10px 26px -18px rgba(10, 31, 68, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.plan-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -16px rgba(10, 31, 68, 0.4);
}

.plan-card:nth-child(1) {
    background: #e2eafc;
    border-color: #c3d4f7;
}

.plan-card:nth-child(1)::before {
    background: var(--brand-navy);
}


.plan-card.dark {
    background: #fffae9;
    border-color: #ffcc06;
}

.plan-card.dark::before {
    background: #ffb800;
}


.plan-card:nth-child(3) {
    background: #eaf3ff;
    border-color: #a9ccf5;
}

.plan-card:nth-child(3)::before {
    background: var(--brand-blue);
}

.plan-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 18px;
}

.plan-card:nth-child(1) .plan-icon {
    background: var(--brand-navy);
    color: var(--brand-gold);
}

.plan-card.dark .plan-icon {
    background: #ffb800;
    color: #4a3600;
}

.plan-card:nth-child(3) .plan-icon {
    background: var(--brand-blue);
    color: #fff;
}

.plan-title {
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 6px;
    color: var(--brand-navy);
}

.plan-desc {
    font-size: 13px;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 14px;
}


.plan-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plan-list li {
    font-size: 13.5px;
    color: var(--brand-navy);
    font-weight: 600;
    padding: 10px 14px;
    border: 1px solid rgba(18, 48, 107, 0.15);
    background: rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-pill);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.plan-list li i {
    color: var(--brand-blue);
    font-size: 11px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.plan-list li:hover {
    background: var(--brand-navy);
    border-color: var(--brand-navy);
    color: #fff;
    transform: translateX(2px);
}

.plan-list li:hover i {
    color: var(--brand-gold);
    transform: translateX(3px);
}

.plan-cta {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--brand-navy);
    color: #fff;
    font-weight: 700;
    font-size: 13.5px;
    padding: 11px 22px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.plan-cta:hover {
    transform: translateY(-2px);
    background: var(--brand-navy-deep);
    box-shadow: 0 10px 22px -10px rgba(18, 48, 107, 0.5);
}

/* ===== Exam banner ===== */
.exam-banner {
    background: linear-gradient(140deg, var(--brand-navy), var(--brand-blue));
    color: #fff;
    border-radius: 20px;
    padding: 26px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.exam-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.exam-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--brand-gold);
    color: var(--brand-navy-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.exam-title {
    font-weight: 700;
    font-size: 17px;
}

.exam-desc {
    font-size: 13px;
    opacity: 0.85;
}

.exam-btn {
    background: var(--brand-gold);
    color: var(--brand-navy-deep);
    font-weight: 700;
    padding: 12px 26px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.exam-btn i {
    transition: transform 0.2s ease;
}

.exam-btn:hover {
    background: #ffe14d;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.35);
}

.exam-btn:hover i {
    transform: translateX(4px);
}

.exam-btn:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 4px 10px -6px rgba(0, 0, 0, 0.35);
}


.block-title {
    display: inline-block;
    font-size: 20px;
    font-weight: 800;
    color: #0f2a4a;
    margin: 0 0 22px;
    padding-bottom: 8px;
    border-bottom: 4px solid #f2b705;

}


.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, #0f2a4a, #1e6fd9);
    transition: transform 0.4s ease;
}

.news-img-2 {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}



.news-item:hover .news-img,
.news-card:hover .news-img,
.news-card:hover .news-img-2 {
    transform: scale(1.08);
}


.view-all-wrap {
    display: flex;
    justify-content: center;
    margin-top: 26px;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0f2a4a;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 999px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.view-all-btn i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.view-all-btn:hover {
    background: #1e6fd9;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -10px rgba(15, 42, 74, 0.5);
}

.view-all-btn:hover i {
    transform: translateX(4px);
}

.view-all-btn:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 4px 10px -6px rgba(15, 42, 74, 0.5);
}


.news-section {
    padding: 56px 0 44px;
}

.news-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}


.news-item {
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e6e9f0;
    box-shadow: 0 6px 20px rgba(15, 42, 74, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.news-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 34px -16px rgba(15, 42, 74, 0.3);
    border-color: #cfe0f5;
}

.news-item:active {
    transform: translateY(-2px) scale(0.99);
}


.news-item-thumb {
    display: block;
    position: relative;
    flex: 0 0 40%;
    background: linear-gradient(135deg, #0f2a4a, #1e6fd9);
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
}


.news-item-thumb .tag {
    position: absolute;
    left: 10px;
    bottom: 10px;
    background: #f2b705;
    color: #0a1c33;
    font-size: 9.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    z-index: 2;
    white-space: nowrap;
}


.news-item-body {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;

}


.news-item-body .news-date {
    font-size: 11px;
    color: #8a92a6;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}


.news-item-body .news-title {
    font-size: 13px;
    font-weight: 400;
    color: #0f2a4a;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    webkit-line-clamp: 3;
    webkit-box-orient: vertical;
    overflow: hidden;
}


.news-item-body .news-link {
    font-size: 12.5px;
    font-weight: 700;
    color: #1e6fd9;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.news-item-body .news-link i,
.news-body .news-link i {
    transition: transform 0.2s ease;
}

.news-link:hover i {
    transform: translateX(4px);
}

.news-link:hover {
    color: #0f2a4a;
}

.pdpa-link {
    color: #1e6fd9;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}


.pdpa-link:hover i {
    transform: translateX(4px);
}

.pdpa-link:hover {
    color: #0f2a4a;
}


@media (max-width: 900px) {
    .news-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .news-item {
        flex-direction: column;
    }

    .news-item-thumb {
        flex: none;
        height: 150px;
    }
}

.article-section {
    background: linear-gradient(180deg, #edf4fc 10%, #dcedff 60%, #ecf5ff 100%);
    padding: 56px 0 60px;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}


.news-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(15, 42, 74, 0.08);
    border: 1px solid #e6e9f0;
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 34px -16px rgba(15, 42, 74, 0.3);
    border-color: #cfe0f5;
}


.news-card:active {
    transform: translateY(-2px) scale(0.99);
}


.news-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f2a4a, #1e6fd9);
    cursor: pointer;
    text-decoration: none;
}


.news-thumb .tag {
    position: absolute;
    left: 14px;
    bottom: 14px;
    background: #f2b705;
    color: #0a1c33;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 999px;
    z-index: 2;
}


.news-body {
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;

}


.news-body .news-date {
    font-size: 12px;
    color: #8a92a6;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}


.news-body .news-title {
    font-size: 13.5px;
    font-weight: 400;
    color: #556987;
    line-height: 1.55;
    margin-bottom: 14px;

    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    line-clamp: 5;
    overflow: hidden;
}

.news-body .news-title strong {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f2a4a;
    line-height: 1.45;
}

.news-body .news-desc {
    font-size: 13.5px;
    font-weight: 400;
    color: #556987;
    line-height: 1.55;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

.news-body .news-link {
    font-size: 13px;
    font-weight: 700;
    color: #1e6fd9;
    text-decoration: none;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Responsive */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Testimonials (Review Carousel) ===== */
.review-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.review-carousel-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.review-carousel-viewport {
    overflow: hidden;
    width: 100%;
    padding: 12px 4px;
}

.review-track {
    display: flex;
    gap: 22px;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.review-card {
    background: #fff;
    border: 1px solid var(--brand-line);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-card);
    display: flex;
    gap: 16px;
    flex: 0 0 calc(50% - 11px);
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 140px;
}

.review-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
}

.review-body {
    flex: 1;
}


.review-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-gold), #c8a600);
    flex-shrink: 0;
    box-shrink: 0;
    box-shadow: 0 0 0 4px #fff, 0 4px 14px rgba(10, 31, 68, 0.18);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}


.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-name {
    font-weight: 700;
    font-size: 14.5px;
}

.review-role {
    font-size: 12px;
    color: #8a92a6;
    margin-bottom: 8px;
}

.review-text {
    font-size: 13.5px;
    color: #4b5262;
    line-height: 1.7;
}


.review-carousel-btn {
    position: absolute;
    top: calc(50% - 14px);
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--brand-line);
    color: var(--brand-navy-deep);
    box-shadow: 0 4px 14px rgba(10, 31, 68, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s ease;
}

.review-carousel-btn:hover {
    background: var(--brand-navy-deep);
    color: #ffffff;
    border-color: var(--brand-navy-deep);
    box-shadow: 0 6px 18px rgba(10, 31, 68, 0.25);
    transform: translateY(-50%) scale(1.08);
}

.review-btn-prev {
    left: -22px;
}

.review-btn-next {
    right: -22px;
}


.review-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.review-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d4d8e3;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.review-dot:hover {
    background: #a4adc1;
}

.review-dot.active {
    width: 28px;
    border-radius: 12px;
    background: var(--brand-navy-deep);
}

@media (max-width: 900px) {
    .review-card {
        flex: 0 0 100%;
    }

    .review-btn-prev {
        left: -12px;
    }

    .review-btn-next {
        right: -12px;
    }
}


.partners-strip {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    position: relative;
    padding: 15px 0;
    background: transparent;
}


.partners-strip::before,
.partners-strip::after {
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    content: "";
    z-index: 2;
    pointer-events: none;
}

.partners-strip::before {
    left: 0;
    background: linear-gradient(to right, #ffffff, rgba(255, 255, 255, 0));
}

.partners-strip::after {
    right: 0;
    background: linear-gradient(to left, #ffffff, rgba(255, 255, 255, 0));
}


.logos-track {
    display: flex;
    width: max-content;
    animation: slideMarquee 60s linear infinite;
}

.partners-strip:hover .logos-track {
    animation-play-state: paused;
}


.logos-slide {
    display: flex;
    align-items: center;
    gap: 40px;
    padding-right: 40px;
}

.logos-slide img {
    height: 48px;
    width: auto;
    object-fit: contain;
    opacity: 1;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.logos-slide a:hover img {
    transform: translateY(-2px);
}


@keyframes slideMarquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* ===== Contact ===== */
.contact-section {
    background: linear-gradient(180deg, #edf4fc 0%, #e1ecf7 60%, #cbdcf0 100%);
    color: #1e293b;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 60px 0;
}

.contact-section .inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
}


.contact-left {
    display: flex;
    flex-direction: column;
}


.contact-eyebrow {
    color: #ebc001;
    font-weight: 700;
    font-size: 12.5px;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.contact-title {
    color: var(--brand-navy);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.contact-desc {
    font-size: 14px;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 26px;
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 16px;
}


.info-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.info-row:first-child {
    padding-top: 0;
}


.info-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--brand-navy);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #fff;
    flex-shrink: 0;
}

.info-label {
    font-size: 11px;
    color: #64748b;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.info-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--brand-navy);
}

.social-follow-label {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
    margin-bottom: 14px;
}

.social-icons-row {
    display: flex;
    gap: 14px;
    margin-top: 0;
}

.social-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #fff;
    transition: 0.25s;
    flex-shrink: 0;
}

.social-circle:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 18px -8px rgba(0, 0, 0, 0.3);
}

.contact-form {
    background: #ffffff;
    border-radius: 18px;
    padding: 32px;
    color: #1e293b;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
}

.contact-form h4 {
    margin: 0 0 20px;
    font-weight: 700;
    font-size: 16px;
    color: var(--brand-navy);
}

.contact-form .form-field textarea {
    flex: 1;
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.form-field label {
    font-size: 12px;
    color: #475569;
    margin-bottom: 6px;
    display: block;
    font-weight: 500;
}


.form-field input,
.form-field textarea {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 11px 14px;
    font-family: inherit;
    font-size: 13.5px;
    outline: 0;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}


.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--brand-navy);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.form-field textarea {
    resize: vertical;
    min-height: 90px;
}

.form-submit {
    width: 100%;
    background: var(--brand-navy);
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: 14px;
    font-family: inherit;
    font-weight: 700;
    font-size: 14.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    margin-top: auto;
    transition: all 0.2s ease;
}

.form-submit:hover {
    background: #ffb800;
    transform: translateY(-1px);
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(135deg, #0e2e6e 0%, #173b7c 55%, var(--brand-navy) 100%);
    color: #c9cfe0;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 56px 0 30px;
}

.footer-section h4 {
    color: #fff;
    font-size: 15px;
    margin: 0 0 16px;
}

.footer-section p {
    font-size: 13px;
    line-height: 2;
    margin: 0;
}

.footer-section a {
    color: #c9cfe0;
}

.footer-section a:hover {
    color: var(--brand-gold);
}

.footer-login {
    display: inline-block;
    margin-top: 6px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 18px 0;
    text-align: center;
    font-size: 12.5px;
    color: #8b93ad;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
    .nav-menu {
        display: none;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .plans-grid {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .review-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .top-banner .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .exam-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .contact-section .inner {
        padding: 0 20px;
    }

    .social-icons-row {
        flex-wrap: wrap;
    }
}

/* Mobile Hamburger Menu button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--brand-navy, #12306b);
    font-size: 22px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle:hover {
    color: var(--brand-blue, #2f6fd6);
}

/* Mobile Menu Drawer */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -320px;
    /* Hidden initially */
    width: 300px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    /* Higher than navbar sticky */
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 60px 24px 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    right: 0;
}

/* Backdrop overlay */
.mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--brand-text-muted, #6b7280);
    cursor: pointer;
    transition: color 0.2s ease;
}

.mobile-menu-close:hover {
    color: var(--brand-text, #1c2434);
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-menu>li {
    border-bottom: 1px solid var(--brand-line, #e7e9f0);
}

.mobile-nav-menu>li:last-child {
    border-bottom: none;
}

.mobile-nav-menu a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    color: var(--brand-text, #1c2434);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.mobile-nav-menu a:hover {
    color: var(--brand-blue, #2f6fd6);
}

.mobile-dropdown-content {
    list-style: none;
    padding-left: 16px;
    margin: 0;
    background: #f8fafc;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.mobile-dropdown.active .mobile-dropdown-content {
    max-height: 500px;
    border-top: 1px solid #e7e9f0;
    padding-top: 4px;
    padding-bottom: 8px;
}

.mobile-dropdown-content li a {
    padding: 10px 0;
    font-size: 14px;
    color: var(--brand-text-muted, #6b7280);
    border-bottom: none;
}

.mobile-dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.mobile-dropdown.active .mobile-dropdown-arrow {
    transform: rotate(180deg);
}

/* Media query adjustments for navbar */
@media (max-width: 1024px) {
    .nav-menu {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-search {
        width: 500px;
    }

    .navbar {
        padding-left: 12px;
    }

    .top-bar {
        padding-left: 12px;
    }

    .top-bar-right {
        padding-right: 12px;
    }

    .navbar-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .navbar-main {
        padding-left: 12px;
    }
}

@media (max-width: 768px) {

    .hero-slide .hero-inner {
        position: relative;
        z-index: 2;
        width: 100%;
    }


    .nav-search {
        display: none;
    }

    .nav-logo {
        height: 44px;
    }


    .search-section {
        padding: 0;
    }

    .search-card {
        flex-direction: column;
        align-items: stretch;
        margin-top: 0;
        border-radius: 0;
        box-shadow: 0 4px 16px rgba(10, 31, 68, 0.08);
        padding: 16px;
        gap: 10px;
    }

    .search-field {
        flex: none;
        width: 100%;
        font-size: 14px;
        border-radius: 50px;
        padding: 13px 16px;
        border-color: #2f6fd6;
        border-width: 1.5px;
    }

    .search-field input {
        font-size: 14px;
        width: 100%;
        min-width: 0;
    }

    .search-field input::placeholder {
        font-size: 13px;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
        padding: 14px;
        font-size: 15px;
        border-radius: 50px;
    }

    .mobile-menu-toggle {
        font-size: 22px;
        padding: 6px 8px;
    }

    .mobile-menu {
        width: 280px;
        padding: 50px 20px 30px;
    }

    .mobile-nav-menu>li {
        border-bottom-width: 0.8px;
    }

    .mobile-nav-menu li:last-child {
        border-bottom-width: 0.8px;
    }

    .mobile-dropdown-content {
        padding-left: 12px;
    }

    .mobile-dropdown-content li a {
        padding: 8px 0;
        font-size: 13px;
    }

    .hero-text h1 {
        font-size: 26px;
        margin-bottom: 8px;
    }

    .hero-text p {
        font-size: 14px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .category-card {
        min-height: 130px;
    }

    .footer-content {
        grid-template-columns: repeat(1, 1fr);
    }

    .copyright {
        font-size: 12px;
    }

    .en {
        display: inline-block;
        font-size: 12px;
        line-height: 22px;
        order: 1;
        justify-content: right;
    }

    .th {
        display: inline-block;
        font-size: 12px;
        line-height: 22px;
        order: 2;
        justify-content: right;
    }

    .services-static-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.tpa-stats {
    --ink: #ffffff;
    --muted: #cfe0f5;
    --hair: rgba(255, 255, 255, 0.2);
    /* soft, desaturated brand-adjacent palette */
    --c-navy: #8fb8ff;
    --c-gold: #f7d774;
    --c-teal: #7fe0d6;
    --c-coral: #ffab8a;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding: 32px 20px;
    isolation: isolate;
    display: flex;
    justify-content: center;
    font-family: "kanit", sans-serif;
}

.tpa-stats::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 100vw;
    height: 100%;
    transform: translateX(-50%);
    z-index: -1;
    background: linear-gradient(120deg, var(--brand-navy, #0a2a5e), var(--brand-blue, #1e5fbf));
}

.tpa-stats-track {
    width: 100%;
    max-width: 1180px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tpa-stat-item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 0 6px;
}

.tpa-stat-dot {
    width: 18px;
    height: 3px;
    border-radius: 2px;
    opacity: 0.85;
}

.dot-a {
    background: var(--c-navy);
}

.dot-b {
    background: var(--c-teal);
}

.dot-c {
    background: var(--c-gold);
}

.dot-d {
    background: var(--c-coral);
}

.tpa-stat-num {
    font-size: clamp(1.05rem, 2.6vw, 1.9rem);
    font-weight: 600;
    line-height: 1.1;
    color: var(--ink);
    letter-spacing: -0.01em;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.tpa-stat-item:nth-child(1) .tpa-stat-num:hover,
.tpa-stat-item:nth-child(1) .tpa-stat-plus {
    color: var(--c-navy);
}

.tpa-stat-item:nth-child(3) .tpa-stat-plus {
    color: var(--c-teal);
}

.tpa-stat-item:nth-child(5) .tpa-stat-plus {
    color: var(--c-gold);
}

.tpa-stat-item:nth-child(7) .tpa-stat-plus {
    color: var(--c-coral);
}

.tpa-stat-plus {
    font-weight: 600;
    font-size: 0.62em;
    margin-left: 3px;
}

.tpa-stat-txt {
    font-size: clamp(0.62rem, 1.4vw, 0.82rem);
    font-weight: 400;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.tpa-stat-divider {
    width: 1px;
    height: 32px;
    flex-shrink: 0;
    background: var(--hair);
}

@media (prefers-reduced-motion: reduce) {
    .tpa-stat-num {
        transition: none;
    }
}


@media (max-width: 560px) {
    .tpa-stats {
        padding: 26px 12px;
    }

    .tpa-stat-item {
        padding: 0 3px;
        gap: 3px;
    }

    .tpa-stat-dot {
        width: 14px;
        height: 2.5px;
    }

    .tpa-stat-divider {
        height: 26px;
    }
}

@media (max-width: 380px) {
    .tpa-stat-txt {
        font-size: 0.56rem;
    }
}


.top-bar2{
    color: #f5a907;   
}

.top-bar2 :hover {
    color: #f57207;
}

/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */
.back-to-top {
    position: fixed;
    right: 28px;
    bottom: 28px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-navy-deep, #163e84) 0%, var(--brand-blue, #2f6fd6) 100%);
    color: #ffffff;
    border: none;
    outline: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(18, 48, 107, 0.3);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(0.9);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.3s,
                box-shadow 0.25s ease,
                background 0.3s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    background: linear-gradient(135deg, var(--brand-navy, #12306b) 0%, #1e56b3 100%);
    box-shadow: 0 10px 24px rgba(18, 48, 107, 0.45);
    transform: translateY(-4px) scale(1.05);
}

.back-to-top:active {
    transform: translateY(-1px) scale(0.96);
    box-shadow: 0 4px 12px rgba(18, 48, 107, 0.3);
}

.back-to-top:focus-visible {
    outline: 2px solid var(--brand-gold, #ffd400);
    outline-offset: 3px;
}

.back-to-top-icon {
    font-size: 18px;
    color: #ffffff;
    transition: transform 0.25s ease, color 0.25s ease;
    position: relative;
    z-index: 2;
}

.back-to-top:hover .back-to-top-icon {
    transform: translateY(-2px);
    color: var(--brand-gold, #ffd400);
}

/* Circular scroll progress SVG */
.back-to-top-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    pointer-events: none;
    z-index: 1;
}

.back-to-top-progress-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.18);
    stroke-width: 2.5;
}

.back-to-top-progress-bar {
    fill: none;
    stroke: var(--brand-gold, #ffd400);
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}

/* Responsive adjustment for mobile devices */
@media (max-width: 768px) {
    .back-to-top {
        right: 18px;
        bottom: 22px;
        width: 44px;
        height: 44px;
    }

    .back-to-top-icon {
        font-size: 16px;
    }
}





