@import url("fonts.css");
:root {
    --font-scale: 1.0625;
    --base-font-px: 17;
}

html {
    font-size: 100%;
}
body {
    font-family: "Noto Sans Thai", sans-serif !important;
    color: #000;
    background-color: #fff;
    margin: 0;
    padding: 0;
    font-size: 1.0625rem; /* = 17px */
}

.header-logo {
    position: relative;
    z-index: 2;
    height: 80px;
    width: auto;
    background-color: #fff;
    padding: 1px;
    margin-top: 10px;
    margin-left: 50px;
    margin-right: 10px;
    border-radius: 100%;
    filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.2));
}
@media (max-width: 575.98px) {
    .header-logo {
        height: 75px;
    }
}
/*##################### HEADER ####################*/
/* ใช้ min-height แทน height คงที่ — มิฉะนั้น header+navbar สูงเกินกรอบจะล้นทับ main บนจอเล็ก */
.header-wrapper {
    position: relative;
    z-index: 50;
    background-color: transparent;
    background-image: url(../images/bg-header.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center top;
    min-height: 119px;
}
/* ต้องสูงกว่าแถบ .topmenu ที่เลื่อนซ้อนเข้ามาในโซนโลโก้ (ลูกเป็น z-auto อยู่ใต้ nav ได้ถ้าพ่อเทียบเป็น sibling เดียวกัน) */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 15;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.header-title {
    font-family: "Noto Sans Thai", sans-serif;
    color: #000;
    font-size: 1.5rem;
    font-weight: 700;
}
.text-pink {
    color: #a1155d;
}
.text-pink2 {
    color: #ce0164;
}

/* Icon buttons */
.header-icons {
    display: flex;
    gap: 0.75rem;
}
.header-icons button {
    background-color: transparent;
    border: none;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #002244;
    font-size: 1.2rem;
    transition: all 0.2s;
}
.header-icons button:hover,
.header-icons button:focus {
    background-color: transparent;
    color: #000;
}

@media (max-width: 420px) {
    .header {
        flex-direction: column;
    }
    .header-left {
        flex-direction: column;
        text-align: center;
    }
    .header-icons {
        margin-top: 5px;
    }
}

@media (min-width: 0px) and (max-width: 420px) {
    /* เปิดให้ flex ตัดบรรทัด */
    .header-icons {
        flex-wrap: wrap;
        /*justify-content: flex-start !important;*/
        column-gap: 10px;
        row-gap: 8px;
    }

    /* ปุ่มค้นหา + เมนูภาษา แถวเดียว */
    .header-icons > button,
    .header-icons > .dropdown {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
    }
}

@media (min-width: 421px) and (max-width: 991.98px) {
    .header {
        flex-direction: column; /*overflow: hidden;*/
    }
    .header-icons {
        margin-top: 5px;
    }
    .dropdown-menu.language-menu {
        right: 0;
    }
}

@media (max-width: 991.98px) {
    .header-logo {
        margin-left: clamp(12px, 4vw, 40px);
    }

    .header-wrapper {
        padding-bottom: 0.35rem;
        background-image: url(../images/bg-header-mobile.svg);
        background-size: cover;
        background-position: center top;
        background-repeat: no-repeat;
    }

    .header-wrapper .header {
        width: 100%;
        max-width: 100%;
        row-gap: 0.5rem;
        padding-top: 0.35rem;
        padding-bottom: 0.25rem;
    }

    .header-wrapper .header-left {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .header-wrapper .header-icons {
        width: 100%;
        max-width: 100%;
        justify-content: center !important;
        flex-wrap: wrap;
    }

    main#main-content {
        position: relative;
        z-index: 1;
        clear: both;
    }

    /* ต้องต่ำกว่าเลเยอร์หัว (โลโก้+หัวข้อ) เพื่อไม่ทับครอบ */
    .topmenu.navbar {
        z-index: 10;
        width: 100%;
    }

    .topmenu.navbar > .p-0 {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .header-logo {
        margin-left: auto;
        margin-right: auto;
    }
    .header-title {
        font-size: 1.22rem;
        line-height: 1.35;
        word-break: break-word;
        hyphens: auto;
    }
}
/* ปุ่มและเมนูเลือกภาษา (ไม่มีพื้นขาว, ธงจัดชิดซ้ายคงที่, hover เมนู) */
.lang-flag-slot {
    flex: 0 0 32px;
    width: 32px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
}

.lang-flag-slot img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

#lang-btn {
    min-width: 7.75rem;
    width: auto;
    max-width: 11rem;
    min-height: 44px;
    height: auto;
    padding: 0.4rem 0.65rem 0.4rem 0.5rem;
    border-radius: 50px;
    font-size: 1rem;
    color: #000;
    gap: 0.35rem;
    background-color: transparent !important;
    border: 2px solid transparent;
    justify-content: flex-start;
}

#lang-btn.lang-menu-trigger {
    display: inline-flex !important;
    align-items: center;
}

#lang-btn .lang-menu-chevron {
    margin-left: auto;
    flex-shrink: 0;
}

.header-icons #lang-btn:hover,
.header-icons #lang-btn:focus-visible {
    background-color: rgba(161, 21, 93, 0.12) !important;
    border-color: rgba(161, 21, 93, 0.35);
    color: #000;
}

.header-icons #lang-btn:focus-visible {
    outline: 3px solid #a1155d;
    outline-offset: 2px;
}

.language-menu .lang-menu-item {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    min-width: 10rem;
    font-weight: 400 !important;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease;
}

.language-menu .lang-menu-item:hover,
.language-menu .lang-menu-item:focus-visible {
    background-color: #f5e3ec !important;
    color: #1a0a14 !important;
}

.language-menu .lang-menu-item:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(161, 21, 93, 0.55);
}

.language-menu .lang-menu-item[aria-current="true"],
.language-menu .lang-menu-item.active {
    background-color: #edd0e4 !important;
    color: #1a0a14 !important;
    font-weight: 600 !important;
}

.language-menu .lang-menu-label {
    flex: 1 1 auto;
    text-align: start;
}

@media (prefers-reduced-motion: reduce) {
    .language-menu .lang-menu-item {
        transition: none;
    }
}

@media (max-width: 992px) {
    /* เพิ่ม CSS เพื่อป้องกันการซ่อน dropdown บนมือถือ */
    .dropdown-menu.language-menu {
        display: inline-block !important;
        position: absolute !important;
        top: 40px !important;
        opacity: 0;
        visibility: hidden;
        transition:
            opacity 0.3s ease,
            visibility 0.3s ease;
    }
    .dropdown-menu.language-menu.show {
        opacity: 1;
        visibility: visible;
    }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
    .header-icons.gap-1 {
        gap: 0 !important ;
    }
    .header-title {
        font-size: 1.4rem;
    }
}
@media (min-width: 992px) and (max-width: 1399.98px) {
    .navbar-nav .nav-link {
        font-size: 1rem !important;
    }
}
/* ##################### Search #################### */
/* โมดัลค้นหา — โทนสะอาด (พื้นขาว) ข้อความหลักโทนเมจเซนต์ #a41971 อ่านชัดตามธีมแถบเมนู */
:root {
    --gsm-accent: #a41971;
    --gsm-accent-hover: #83155a;
    --gsm-accent-focus: #5c1040;
    --gsm-body-print: #ffffff;
    --gsm-body-soft: #ffffff;
    --gsm-panel: #ffffff;
    --gsm-tag-bg: #ffffff;
    --gsm-heading-magenta: #a41971;
    --gsm-muted-text: #545454;
    --gsm-muted-text-strong: #2c2c2c;
    --gsm-border-strong: #d9d9d9;
    --global-search-primary-color: var(--gsm-accent);
    --global-search-secondary-color: var(--gsm-muted-text);
    --global-search-light-bg: var(--gsm-panel);
    --global-search-border-color: #e8e8e8;
}

.global-search-modal .modal-content {
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--global-search-border-color);
}

.global-search-modal .modal-header {
    padding: 1.35rem 1.5rem;
    border-radius: 13px 13px 0 0;
    border-bottom: 1px solid var(--global-search-border-color);
    background: #ffffff;
    color: var(--gsm-heading-magenta);
}

.global-search-modal .modal-title {
    color: var(--gsm-heading-magenta);
    letter-spacing: 0.02em;
}

.global-search-modal .modal-header .btn-close {
    filter: none;
    opacity: 0.72;
}

.global-search-modal .modal-header .btn-close:focus-visible {
    outline: 3px solid var(--gsm-accent) !important;
    outline-offset: 2px !important;
    box-shadow: none;
    opacity: 1;
}

.global-search-modal .modal-body {
    padding: 1.55rem;
    background: var(--gsm-body-soft);
    color: var(--gsm-muted-text-strong);
}

.global-search-modal .modal-body label,
.global-search-modal .modal-body .form-label,
.global-search-modal .modal-body legend {
    color: var(--gsm-muted-text-strong);
}

.global-search-modal .modal-body .text-muted,
.global-search-modal .modal-body .form-text.text-muted {
    color: var(--gsm-muted-text) !important;
}

.global-search-modal .modal-body small,
.global-search-modal .modal-body .small {
    color: var(--gsm-muted-text) !important;
}

.global-search-input-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.global-search-field-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

@media (min-width: 576px) {
    .global-search-input-container {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }
}

.global-search-modal .global-search-field-wrap .global-search-input {
    padding: 12px 16px;
    border-radius: 9999px;
    border: 2px solid var(--gsm-border-strong);
    font-size: 1.1rem;
    width: 100%;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
    background-color: var(--gsm-body-print);
    color: var(--gsm-muted-text-strong);
}

.global-search-modal .global-search-input:focus {
    outline: none;
}

.global-search-modal .global-search-input:focus-visible {
    border-color: var(--gsm-accent-hover);
    box-shadow: 0 0 0 4px rgba(164, 25, 113, 0.18);
}

.global-search-modal .global-search-input::placeholder {
    color: #797979;
    opacity: 1;
}

.global-search-modal .modal-body .global-search-submit-btn {
    flex: 0 0 auto;
    align-self: stretch;
    background: var(--gsm-accent);
    color: #fff;
    border: none;
    border-radius: 9999px;
    min-width: 7.25rem;
    min-height: 44px;
    padding: 0.5rem 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition:
        background 0.2s,
        box-shadow 0.2s;
    white-space: nowrap;
    box-shadow: none;
}

@media (min-width: 576px) {
    .global-search-modal .modal-body .global-search-submit-btn {
        align-self: center;
    }
}

.global-search-modal .modal-body .global-search-submit-btn:hover,
.global-search-modal .modal-body .global-search-submit-btn:focus-visible {
    background: var(--gsm-accent-hover);
    color: #fff;
    box-shadow: 0 2px 12px rgba(164, 25, 113, 0.25);
}

.global-search-modal .modal-body .global-search-submit-btn:focus-visible {
    outline: 3px solid var(--gsm-accent-focus);
    outline-offset: 3px;
}

.global-search-popular-tags {
    margin-bottom: 1.5rem;
}

.global-search-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 12px;
    background: var(--gsm-tag-bg);
    color: var(--gsm-muted-text-strong);
    border-radius: 20px;
    font-size: 0.95rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        border-color 0.2s,
        box-shadow 0.2s,
        background-color 0.2s;
    border: 2px solid var(--global-search-border-color);
}

.global-search-modal .global-search-tag {
    color: var(--gsm-heading-magenta);
    font-weight: 600;
}

.global-search-tag:hover,
.global-search-tag:focus-visible {
    background: #fafafa;
    border-color: var(--gsm-accent-hover);
    outline: none;
}

.global-search-tag:focus-visible {
    box-shadow:
        0 0 0 3px var(--gsm-body-print),
        0 0 0 6px var(--gsm-accent-hover);
}

.global-search-modal .global-search-advanced-toggle {
    display: flex;
    align-items: center;
    color: var(--gsm-accent);
    cursor: pointer;
    margin-bottom: 1rem;
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 8px;
    transition:
        background 0.2s,
        color 0.2s,
        box-shadow 0.2s;
    border: 2px solid transparent;
}

.global-search-modal .global-search-advanced-toggle:hover,
.global-search-modal .global-search-advanced-toggle:focus-visible {
    background-color: #fafafa;
}

.global-search-modal .global-search-advanced-toggle:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px var(--gsm-body-print),
        0 0 0 6px var(--gsm-accent);
}

.global-search-advanced-toggle i {
    margin-right: 8px;
    transition: transform 0.3s;
}
.global-search-advanced-toggle.collapsed i {
    transform: rotate(0deg);
}
.global-search-advanced-toggle:not(.collapsed) i {
    transform: rotate(180deg);
}

.global-search-modal .global-search-advanced-options {
    background: var(--gsm-panel);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid var(--global-search-border-color);
}

.global-search-filter-group {
    margin-bottom: 1.5rem;
}

.global-search-modal .global-search-filter-title {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--gsm-heading-magenta);
    font-size: 1.05rem;
}

.global-search-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.global-search-filter-option {
    display: flex;
    align-items: center;
}

.global-search-modal .global-search-filter-option .form-check-input {
    accent-color: var(--gsm-accent-hover);
}

.global-search-modal .global-search-filter-option input:focus-visible {
    outline: 3px solid var(--gsm-accent-hover);
    outline-offset: 2px;
}

.global-search-modal .global-search-filter-option .form-check-label {
    cursor: pointer;
    color: var(--gsm-muted-text-strong);
}

.global-search-modal .input-group-text {
    background-color: var(--gsm-panel);
    color: var(--gsm-muted-text-strong);
    border: 2px solid var(--gsm-border-strong);
    font-weight: 600;
}

.global-search-modal .input-group-addon.open-datepicker {
    cursor: pointer;
}

#ui-datepicker-div {
    z-index: 1065 !important;
}

.global-search-modal .form-control:not(.global-search-input) {
    border: 2px solid var(--gsm-border-strong);
    color: var(--gsm-muted-text-strong);
}

.global-search-modal .form-control:focus {
    border-color: var(--gsm-accent-hover);
    box-shadow: 0 0 0 3px rgba(164, 25, 113, 0.15);
}

/* โฟกัสรายตัวคอมโพเนนต์ — หลีกเลี่ยงขอบซ้อนกับทุก selector */
.global-search-modal .modal-body .global-search-tag:focus-visible {
    outline: none;
}
@media (prefers-contrast: high) {
    .global-search-tag {
        border: 2px solid #000;
    }
    .global-search-result-item {
        border: 1px solid #000;
    }
}
@media (prefers-reduced-motion: reduce) {
    .global-search-tag,
    .global-search-result-item,
    .global-search-advanced-toggle {
        transition: none;
    }
}
@media (max-width: 768px) {
    .global-search-result-item {
        flex-direction: column;
    }
    .global-search-result-image {
        width: 100%;
        height: 160px;
        margin-right: 0;
        margin-bottom: 1rem;
    }
    .global-search-filter-options {
        flex-direction: column;
        gap: 0.5rem;
    }
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
    outline: 3px solid #0a58ca;
    outline-offset: 2px;
}

/* WCAG 2.2: เป้าแตะ / ปุ่มภาษา */
#lang-btn.dropdown-toggle::after {
    display: none;
}

.cookie-accept-btn {
    min-height: 44px;
    min-width: 44px;
    padding-inline: 1.25rem;
}

/* ชิดกับ footer — margin เดิมของแถบคุกกี้ / .alert ทำให้เห็นช่องว่าง */
.cookie-consent-aside {
    margin-block: 0;
    padding-top: 0;
}

.cookie-consent-aside .cookie-consent-bar.alert {
    margin-block: 0;
    border-radius: 0;
}

.cookie-consent-bar .cookie-plain {
    color: #333;
}

.btn-back-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1030;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    min-height: 54px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;
    text-decoration: none;
}

.btn-back-top img {
    display: block;
    width: 54px;
    height: auto;
    filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.4));
}

.btn-back-top:is(:hover, :focus-visible) {
    color: inherit;
    outline: none;
    transform: translateY(-2px) scale(1.03);
}

.btn-back-top:focus-visible {
    outline: none;
    border-radius: 50%;
    box-shadow:
        0 0 0 3px #fff,
        0 0 0 6px rgba(164, 25, 113, 0.65),
        0 4px 20px rgba(0, 0, 0, 0.2);
}

.btn-back-top:focus-visible img {
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.25))
        drop-shadow(0 6px 14px rgba(164, 25, 113, 0.22));
}

.btn-back-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
    .btn-back-top {
        transition: none;
    }
}

/* ปุ่มเน้นสีชมพู/ม่วงแดง (ใช้ใน skip link / คุกกี้) */
.btn-magenta {
    background-color: #a41971;
    border: 2px solid #7a0d52;
    color: #fff !important;
}
.btn-magenta:hover,
.btn-magenta:focus-visible {
    background-color: #880e52;
    border-color: #5c0738;
    color: #fff !important;
}

html[lang="en"] body {
    font-family: "Noto Sans", "Noto Sans Thai", sans-serif;
}

/* ผลการค้นหาในโมดัล — ธีมเดียวกับฟอร์ม */
.global-search-results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.global-search-modal .global-search-results-header {
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--gsm-heading-magenta);
}

.global-search-modal .global-search-result-item {
    background: var(--gsm-body-print);
    border: 2px solid var(--global-search-border-color);
    border-radius: 10px;
    padding: 1.25rem;
    transition:
        box-shadow 0.2s,
        border-color 0.2s;
}

.global-search-modal .global-search-result-item:hover,
.global-search-modal .global-search-result-item:focus-within {
    background-color: #fafafa;
    border-color: #cfcfcf;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.global-search-result-image {
    width: 100%;
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.global-search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.global-search-modal .global-search-result-badge {
    background: var(--gsm-accent);
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.global-search-modal .global-search-result-title {
    font-weight: 700;
    color: var(--gsm-muted-text-strong);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    line-height: 1.45;
}

.global-search-modal .global-search-result-title a {
    color: var(--gsm-accent);
    text-decoration: none;
}

.global-search-modal .global-search-result-title a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.global-search-modal .global-search-result-title a:focus-visible {
    outline: none;
    color: var(--gsm-accent-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
}

.global-search-modal .global-search-result-excerpt {
    color: #000;
    font-size: 1rem;
    line-height: 1.55;
    margin-bottom: 1rem;
}

.global-search-result-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.global-search-modal .global-search-result-date {
    color: var(--gsm-muted-text);
    font-size: 0.9rem;
}

.global-search-result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.global-search-modal .global-search-tag-small {
    background: var(--gsm-tag-bg);
    color: var(--gsm-muted-text-strong);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8125rem;
    border: 1px solid var(--global-search-border-color);
}

@media (max-width: 768px) {
    .global-search-result-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    .global-search-result-image {
        height: 100px;
    }
}

.global-search-modal .global-search-no-results {
    text-align: center;
    padding: 2rem;
    color: var(--gsm-muted-text);
}

.global-search-modal .global-search-no-results .bi {
    font-size: 2.8rem;
    color: var(--gsm-accent);
    opacity: 1;
}

/*##################### TOPMENU ####################*/
/* สีเมนูย่อย — โทนแบรนด์ อ่านชัด แยกชั้นได้บนมือถือ (ไม่แตะ .language-menu) */
:root {
    --nav-submenu-bg: #ffffff;
    --nav-submenu-bg-nested: #f9f4f7;
    --nav-submenu-border: rgba(164, 25, 113, 0.14);
    --nav-submenu-text: #1c1318;
    --nav-submenu-hover: #fdeaf6;
    --nav-submenu-focus-ring: #a41971;
    --nav-submenu-active: #e6cde3;
}

.topmenu {
    font-size: 1.1rem;
    position: relative;
    z-index: 10;
    padding-top: 2px;
    padding-bottom: 2px;
    padding-left: 130px;
    margin-top: -17px;
}
.navbar {
    background-color: #a41971; /* padding: 0.5rem 1rem;*/
    border-radius: 0px 0px 100px 100px;
}

@media (max-width: 991.98px) {
    .topmenu {
        padding-left: 14px !important;
        padding-right: 14px !important;
        margin-top: 0;
        padding-top: 8px;
        padding-bottom: 10px;
    }
    .topmenu.navbar .navbar-collapse {
        margin-top: 0.65rem;
        max-height: none;
        overflow: visible;
    }
    .topmenu.navbar {
        border-radius: 0 0 52px 52px !important;
    }
}

@media (max-width: 575.98px) {
    .topmenu.navbar {
        border-radius: 0 0 36px 36px !important;
    }
}
.navbar-nav .nav-link {
    font-size: 1.05rem;
    color: #fff;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    transition:
        background-color 0.22s ease,
        color 0.22s ease,
        box-shadow 0.22s ease;
    white-space: normal;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: #000;
    background-color: #fff; /*background-color: rgba(255, 255, 255, 0.2);*/
}
.navbar-nav .nav-link.active {
    color: #000;
    background-color: #fff;
}

/* เมื่อเปิดดรอปดาวน์ Bootstrap ใส่ .show — ควรเหมือน hover/active เพื่อบอกสถานะและไม่เหลื่อมกับเลเยอร์ขาวเมนูย่อย */
.topmenu.navbar .navbar-nav .nav-link.show,
.topmenu.navbar .navbar-nav .nav-link.dropdown-toggle.show {
    color: #000 !important;
    background-color: #fff !important;
}

.topmenu.navbar .navbar-nav .nav-link.dropdown-toggle.show:hover,
.topmenu.navbar .navbar-nav .nav-link.dropdown-toggle.show:focus {
    color: #000 !important;
    background-color: #fff !important;
}
@media (min-width: 1300px) {
    .navbar-nav .nav-link {
        margin: 0 1rem;
    }
}
@media (min-width: 1200px) {
    .navbar-nav .nav-link {
        margin: 0 0.2rem;
    }
}
@media (max-width: 1199.98px) {
    .navbar-nav .nav-link {
        margin: 0;
    }
}

@media (min-width: 992px) {
    /*
   * โฟกัสอยู่ใน .dropdown หรือคลิกเปิด Bootstrap (.show): ให้เห็นเมนูเหมือนกัน และล็อก top/left
   * ไม่ให้ Popper เลื่อนเมนูขึ้นลงเมื่อ hover
   */
    .topmenu.navbar .nav-item.dropdown > .dropdown-menu {
        display: none;
        position: absolute !important;
        left: 0 !important;
        right: auto !important;
        top: 100% !important;
        bottom: auto !important;
        margin-top: 0 !important;
        transform: none !important;
        translate: none !important;
        inset: auto !important;
    }

    .topmenu.navbar .nav-item.dropdown:hover > .dropdown-menu,
    .topmenu.navbar .nav-item.dropdown:focus-within > .dropdown-menu,
    .topmenu.navbar .nav-item.dropdown > .dropdown-menu.show {
        display: block;
        margin-top: 0 !important;
    }

    .topmenu .dropdown-menu {
        min-width: 15rem;
        max-width: min(22rem, 96vw);
    }

    .topmenu .navbar-nav .nav-link {
        padding-right: 1rem;
        padding-left: 1rem;
    }
}
.dropdown-menu {
    background-color: #fff;
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    max-width: 350px;
}
.dropdown-item {
    padding: 0.5rem 1rem;
    color: #000;
    transition: all 0.2s ease;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.4;
    word-break: break-word;
    white-space: normal;
}
.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #ececec;
    color: #000;
}

/* เมนูย่อยของแถบนำทางหลัก — ทับกฎทั่วไป */
.topmenu .dropdown-menu {
    background-color: var(--nav-submenu-bg);
    border: 1px solid var(--nav-submenu-border);
    box-shadow: 0 8px 24px rgba(55, 12, 38, 0.12);
    padding: 0.4rem 0;
}

.topmenu .dropdown-menu .dropdown-item {
    color: var(--nav-submenu-text);
    font-weight: 500;
    padding: 0.65rem 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.topmenu .dropdown-menu .dropdown-item:hover,
.topmenu .dropdown-menu .dropdown-item:focus {
    background-color: var(--nav-submenu-hover);
    color: #000;
}

.topmenu .dropdown-menu .dropdown-item:focus-visible {
    outline: 2px solid var(--nav-submenu-focus-ring);

    z-index: 1;
}

.topmenu .dropdown-menu .dropdown-item:active {
    background-color: var(--nav-submenu-active);
}

.topmenu .dropdown-divider {
    border-top-color: var(--nav-submenu-border);
    margin-left: 0.75rem;
    margin-right: 0.75rem;
    opacity: 1;
}

.topmenu .nav-link:focus-visible,
.topmenu .navbar-toggler:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.95);
    outline-offset: 2px;
}

.topmenu .dropdown-toggle:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.95);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .topmenu .dropdown-menu .dropdown-item,
    .navbar-nav .nav-link {
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: more) {
    .topmenu .dropdown-menu {
        border-width: 2px;
        border-color: #000;
    }
    .topmenu .dropdown-menu .dropdown-item {
        color: #000;
    }
}
.dropdown-menu .dropdown-item {
    font-size: 1.05rem;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
}
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Menu Responsive adjustments */
@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 1rem;
    }
    .topmenu .navbar-collapse .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    .topmenu .dropdown-menu {
        margin-left: 0.5rem;
        margin-right: 0.25rem;
        margin-top: 0.25rem;
        margin-bottom: 0.4rem;
        position: static !important;
        transform: none !important;
        width: auto;
        max-width: none;
        border-left: none !important;
        background: var(--nav-submenu-bg);
        border-radius: 0.5rem;
        border: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow:
            inset 0 0 0 1px rgba(255, 255, 255, 0.85),
            0 4px 14px rgba(0, 0, 0, 0.06);
    }
    .dropdown-toggle::after {
        display: inline-block;
        margin-left: 0.255em;
        vertical-align: 0.255em;
        content: "";
        border-top: 0.3em solid;
        border-right: 0.3em solid transparent;
        border-bottom: 0;
        border-left: 0.3em solid transparent;
        float: right;
        margin-top: 0.5em;
    }
    .dropdown-toggle[aria-expanded="true"]::after {
        transform: rotate(-180deg);
    }
    .dropdown-item {
        white-space: normal;
        word-break: break-word;
    }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar-nav .nav-link {
        margin: 0rem 0rem;
    }
}

.dropdown-item[href*="//"] {
    word-break: break-all;
}

/* ##################### HOME HERO (highlight carousel) #################### */
.home-hero {
    position: relative;
    z-index: 0;
    margin-top: -46px;
    margin-bottom: clamp(-100px, -12vw, -150px);
    overflow: visible;
}

@media (max-width: 1199.98px) {
    .home-hero {
        margin-top: 0px;
    }
}
.home-hero #homeHeroCarousel.carousel {
    position: relative;
    overflow: visible;
}

.home-hero-slide {
    position: relative;
    width: 100%;
    aspect-ratio: 1920 / 540;
    max-height: 100%;
    min-height: clamp(230px, 28.125vw, 540px);
    overflow: hidden;
    background: #ffceee;
}

.home-hero-bg-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
}
/* จอ 2K+ - ยกเลิก aspect-ratio ใช้ vh ควบคุม */
@media (min-width: 2560px) {
    .home-hero-slide {
        aspect-ratio: auto;
        height: auto;
        max-height: 85vh;
        min-height: 540px;
    }
}
@media (max-width: 991.98px) {
    .home-hero-caption {
        margin-inline-start: clamp(0.625rem, 3.5vw + 0.25rem, 2.75rem);
    }

    .home-hero-cta {
        max-width: 100%;
    }

    .home-hero .home-hero-control.carousel-control-prev,
    .home-hero .home-hero-control.carousel-control-next {
        height: clamp(96px, 20vh, 180px);
    }
}

@media (min-width: 992px) {
    .home-hero-caption {
        margin-inline-start: 60px;
        margin-inline-end: 0;
    }
}

@media (max-width: 575.98px) {
    .home-hero-slide {
        min-height: clamp(200px, 52vw, 340px);
    }

    .home-hero .home-hero-indicators.carousel-indicators {
        bottom: 12px !important;
        gap: 0.35rem;
    }

    .home-hero-caption {
        max-width: min(34rem, 100%);
        margin-inline-start: clamp(0.625rem, 3.2vw + 0.375rem, 1.75rem);
    }

    .home-hero-caption-outer {
        padding-inline: 12px;
    }
}

/* หลัง carousel หน้าแรก: เลื่อนเนื้อหาขึ้นไปในโซนคลื่น — z-index เหนือ hero แต่ pointer-events:none เพื่อไม่บัง indicators */
.home-hero + #main-content {
    position: relative;
    z-index: 3;
    padding-top: clamp(3rem, 8vw + 1.75rem, 7.5rem);
    pointer-events: none;
}

.home-hero + #main-content > .container {
    pointer-events: none;
}

.home-hero + #main-content > .container > *,
.home-hero + #main-content > section {
    pointer-events: auto;
}

.home-hero .carousel-indicators [data-bs-target],
.home-hero .home-hero-control.carousel-control-prev,
.home-hero .home-hero-control.carousel-control-next {
    touch-action: manipulation;
}

.home-hero-caption-outer {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-top: clamp(1rem, 4vw, 3rem);
    padding-bottom: calc(20px + 2.25rem + 10px);
    pointer-events: none;
}

.home-hero-caption {
    pointer-events: auto;
    margin-top: clamp(1rem, 2.75vw, 2.75rem);
    margin-inline-start: 60px;
    max-width: min(34rem, 92vw);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.home-hero-title {
    margin: 0;
    padding: 0;
    color: #fff;
    text-shadow: 2px 3px 0px rgb(23, 63, 136);
    overflow-wrap: break-word;
}

.home-hero-title-row1,
.home-hero-title-row2 {
    display: block;
    font-family: "Playpen Sans Thai", "Noto Sans Thai", sans-serif;
    font-weight: 800;
    font-style: normal;
    letter-spacing: 0.015em;
    line-height: 1.4;
}

.home-hero-title-row1 {
    font-size: 40pt;
}

.home-hero-title-row2 {
    margin-top: 0.06em;
    font-size: 30pt;
}

@media (max-width: 991.98px) {
    .home-hero-title-row1 {
        font-size: clamp(1.65rem, 2.15vw + 1.08rem, 34pt);
    }

    .home-hero-title-row2 {
        font-size: clamp(1.42rem, 1.95vw + 0.92rem, 30pt);
    }
}

.home-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.48rem;
    font-family: "Noto Sans Thai", sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.35;
    text-decoration: none;
    color: #fff !important;
    background-color: #a60d55 !important;
    border-radius: 999px;
    border: none;
    padding: 0.62rem 1.35rem 0.52rem 1.3rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 1px 0 #96144f,
        0 4px 4px rgba(0, 0, 0, 0.24);
}

.home-hero-cta:hover,
.home-hero-cta:focus-visible {
    color: #fff !important;
    background-color: #ba1d68 !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 1px 0 #6e0f39,
        0 5px 5px rgba(0, 0, 0, 0.22);
}

.home-hero-cta:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.95);
    outline-offset: 3px;
}

.home-hero-cta-arrow {
    flex-shrink: 0;
}

.home-hero-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 8;
    line-height: 0;
    pointer-events: none;
    overflow: hidden;
    transform: translateY(44%);
}

.home-hero-wave img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: bottom;
    transform: scale(1.2);
}

.home-hero .home-hero-indicators.carousel-indicators {
    z-index: 10 !important;
    bottom: 20px !important;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

.home-hero .carousel-indicators [data-bs-target] {
    flex: 0 0 auto;
    box-sizing: border-box;
    /* โครงที่เท่ากันทุกจุด แล้วใช้ scale ให้ตัว inactive เล็กลง เพื่อให้กลุ่มกึ่งกลางแนวนอนจริง */
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    margin: 0 !important;
    padding: 0;
    opacity: 1 !important;
    border: 2px solid #fff;
    background-color: #f05a9a !important;
    text-indent: 0 !important;
    transform-origin: center;
    transform: scale(0.75);
    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.home-hero .carousel-indicators [data-bs-target].active {
    transform: scale(1);
    background-color: #db2773 !important;
    border-color: transparent;
    border-width: 0;
    box-shadow: none;
}

.home-hero .home-hero-control.carousel-control-prev,
.home-hero .home-hero-control.carousel-control-next {
    z-index: 11;
    width: clamp(42px, 4.5vw, 52px);
    height: clamp(136px, 26vh, 220px);
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    padding: 0;
    opacity: 1 !important;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
}

.home-hero .home-hero-control.carousel-control-prev:hover,
.home-hero .home-hero-control.carousel-control-prev:focus,
.home-hero .home-hero-control.carousel-control-next:hover,
.home-hero .home-hero-control.carousel-control-next:focus {
    background: transparent !important;
    opacity: 1 !important;
}

.home-hero .home-hero-control.carousel-control-prev {
    left: clamp(10px, 2vw, 22px);
}

.home-hero .home-hero-control.carousel-control-next {
    right: clamp(10px, 2vw, 22px);
}

.home-hero .home-hero-control .carousel-control-prev-icon,
.home-hero .home-hero-control .carousel-control-next-icon {
    width: 2rem;
    height: 2rem;
    filter: invert(100%) grayscale(40%) brightness(1.08);
    opacity: 0.5;
}

/* ##################### e-service carousel (บริการประชาชน)  #################### */
.svc {
    margin-top: 60px;
}
@media (min-width: 992px) {
    .svc {
        margin-top: 130px;
    }
}

.svc-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    width: 100%;
}

.svc-h {
    position: relative;
    z-index: 9;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    font-weight: 600;
    font-size: clamp(1.4rem, 2.05vw + 0.82rem, 1.8125rem);
    color: #23182c;
}

/* ปุ่มชิดขวาในแถบ; วงกลมเล็กซ้ายภายในลิงก์ อยู่หลังข้อความ */
.svc-all {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-inline-start: auto;
    align-self: center;
    padding-block: 0.2rem;
    text-decoration: none;
    box-sizing: border-box;
}

.svc-all__blob {
    position: absolute;
    left: 0;
    top: 50%;
    translate: 25% -50%;
    z-index: 0;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    background-color: #fccdec;
    pointer-events: none;
    transition:
        background-color 0.18s ease,
        scale 0.22s ease;
}

.svc-all__txt {
    position: relative;
    z-index: 1;
    padding: 0.2rem 0.1rem 0.2rem 1.5rem;
    color: #7b034f;
    font-weight: 600;
    font-size: clamp(0.8125rem, 0.42vw + 0.7rem, 1.1rem);
    line-height: 1.28;
    white-space: nowrap;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
    transition:
        color 0.18s ease,
        text-decoration-color 0.18s ease;
}

.svc-all:hover .svc-all__txt {
    color: #690444;
    text-decoration-color: rgba(109, 8, 56, 0.42);
}

.svc-all:hover .svc-all__blob {
    background-color: #f8b2d6;
    scale: 1.06;
}

.svc-all:active .svc-all__txt {
    color: #690444;
}

.svc-all:active .svc-all__blob {
    background-color: #f8b2d6;
    scale: 1.03;
}

@media (prefers-reduced-motion: reduce) {
    .svc-all__blob {
        transition-duration: 0.01ms !important;
    }

    .svc-all__txt {
        transition-duration: 0.01ms !important;
    }

    .svc-all:hover .svc-all__blob {
        scale: none;
    }

    .svc-all:active .svc-all__blob {
        scale: none;
    }
}

.svc-all:focus-visible {
    outline: 3px solid rgba(132, 7, 86, 0.45);
    outline-offset: 3px;
}

.svc-slot {
    container-type: inline-size;
    padding-inline: clamp(28px, 4vw + 14px, 44px);
}

.svc-nav {
    position: absolute;
    top: 50%;
    translate: 0 -50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.75rem;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: rgba(35, 24, 44, 0.35);
    line-height: 1;
}

.svc-nav i {
    font-size: 1.625rem;
    line-height: 1;
}

.svc-nav:hover {
    color: rgba(35, 24, 44, 0.55);
}

.svc-nav:focus-visible {
    outline: 2px solid #23182c;
    outline-offset: 2px;
    border-radius: 4px;
    color: #23182c;
}

.svc-prev {
    left: 0;
}

.svc-next {
    right: 0;
}

.svc-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    overflow-y: clip;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    /* เลื่อนแนวนอนเป็นมาตรฐานเมื่อเลื่อนด้วยนิ้ว ลดโอกาสเลื่อนหน้ารวมเมื่ออยู่บนแถวการ์ด */
    touch-action: pan-x pinch-zoom;
    /* ว่างจากขอบซ้าย/ขวาของกล่องเลื่อน การ์ดใบแรก/สุดท้ายจะได้ไม่โดนครอปเวลาโฮเวอร์ */
    scroll-padding-inline: 16px;
    padding-inline: 16px;
    padding-block: clamp(16px, 2.25vw, 26px);
    -webkit-overflow-scrolling: touch;
    /* พื้นที่การ์ดรวมกว้างกว่าแถว → overflow-x ปกติ; ซ่อนแถบเลื่อน ยังเลื่อนได้ด้วยล้อ/ปุ่ม/สัมผัส */
    scrollbar-width: none;
    cursor: grab;
}

.svc-track.is-dragging {
    cursor: grabbing;
    user-select: none;
    scroll-behavior: auto !important;
    scroll-snap-type: none !important;
}

.svc-track::-webkit-scrollbar {
    display: none;
}

.svc-track:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(35, 24, 44, 0.15);
}

.svc-card {
    position: relative;
    z-index: 0;
    flex: 0 0 min(300px, calc(100vw - 3.5rem));
    scroll-snap-align: start;
    box-sizing: border-box;
    height: 215px;
    min-height: 215px;
    max-height: 215px;
}

.svc-card:hover,
.svc-card:focus-within {
    z-index: 5;
}

/* จอแคบ: ความกว้างการ์ดอิงกล่อง .svc-slot แทน 100vw (ลดเด้งเมื่อ scrollbar / ไม่สัมพันธ์ความกว้างคอนเทนเนอร์) */
@supports (container-type: inline-size) {
    @media (max-width: 575.98px) {
        .svc-card {
            flex: 0 0 clamp(252px, calc(100cqi - 48px), 314px);
        }
    }
}

@media (min-width: 576px) {
    .svc-card {
        flex: 0 0 calc((100% - 1.25rem) / 2);
    }
}

@media (min-width: 992px) {
    .svc-card {
        flex: 0 0 calc((100% - 2 * 1.25rem) / 3);
    }
}

@media (min-width: 1200px) {
    .svc-card {
        flex: 0 0 calc((100% - 3 * 1.25rem) / 4);
    }
}

@media (min-width: 1400px) {
    .svc-card {
        flex: 0 0 calc((100% - 4 * 1.25rem) / 5);
    }
}

.svc-card__link {
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    height: 100%;
    min-height: 0;
    isolation: isolate;
    overflow: hidden;
    border-radius: 1rem;
    border: 2px solid #f5ccee;
    background: transparent;
    transition:
        box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.22s ease;
}

.svc-card:hover .svc-card__link,
.svc-card:focus-within .svc-card__link {
    box-shadow:
        0 12px 32px rgba(35, 24, 44, 0.1),
        0 6px 16px rgba(35, 24, 44, 0.06);
}

.svc-card--t1:hover .svc-card__link,
.svc-card--t1:focus-within .svc-card__link {
    border-color: #b54a93;
}

.svc-card--t2:hover .svc-card__link,
.svc-card--t2:focus-within .svc-card__link {
    border-color: #cf3d54;
}

.svc-card--t3:hover .svc-card__link,
.svc-card--t3:focus-within .svc-card__link {
    border-color: #b6781c;
}

.svc-card--t4:hover .svc-card__link,
.svc-card--t4:focus-within .svc-card__link {
    border-color: #7a38b0;
}

.svc-card--t5:hover .svc-card__link,
.svc-card--t5:focus-within .svc-card__link {
    border-color: #1f9a75;
}

.svc-card--t6:hover .svc-card__link,
.svc-card--t6:focus-within .svc-card__link {
    border-color: #2c5f91;
}

.svc-card--t7:hover .svc-card__link,
.svc-card--t7:focus-within .svc-card__link {
    border-color: #2d7030;
}

.svc-card--t8:hover .svc-card__link,
.svc-card--t8:focus-within .svc-card__link {
    border-color: #5a2490;
}

.svc-card--t9:hover .svc-card__link,
.svc-card--t9:focus-within .svc-card__link {
    border-color: #8a3b1f;
}

.svc-card--t10:hover .svc-card__link,
.svc-card--t10:focus-within .svc-card__link {
    border-color: #067269;
}

.svc-card__link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 1);
    /* จากบนลงล่างขาว → ปลายสี (ค่าปเริ่ม = การ์ด t1) */
    background: linear-gradient(180deg, #ffffff 0%, #fad4f3 100%);
}

.svc-card--t2 .svc-card__link {
    border-color: #f9d2d7;
}

.svc-card--t2 .svc-card__link::before {
    background: linear-gradient(180deg, #ffffff 0%, #fcbfd3 100%);
}

.svc-card--t3 .svc-card__link {
    border-color: #fee3c8;
}

.svc-card--t3 .svc-card__link::before {
    background: linear-gradient(180deg, #ffffff 0%, #fce7d3 100%);
}

.svc-card--t4 .svc-card__link {
    border-color: #e8d4f5;
}

.svc-card--t4 .svc-card__link::before {
    background: linear-gradient(180deg, #ffffff 0%, #eacefd 100%);
}

.svc-card--t5 .svc-card__link {
    border-color: #c3eadf;
}

.svc-card--t5 .svc-card__link::before {
    background: linear-gradient(180deg, #ffffff 0%, #daf9ee 100%);
}

/* t6–t10: สีคู่สำหรับข้อความปกติราว 0.9rem บนพื้นไล่สีอ่อน + ปุ่ม #fff — ตั้งค่าให้จูนเข้า WCAG 2.2 AA/AAA */
.svc-card--t6 .svc-card__link {
    border-color: #b8cee6;
}

.svc-card--t6 .svc-card__link::before {
    background: linear-gradient(180deg, #ffffff 0%, #d8e7f6 100%);
}

.svc-card--t6 .svc-card__cta {
    background-color: #195994;
    color: #ffffff;
}

.svc-card--t6 .svc-card__hint {
    color: #0b1f32;
}

.svc-card--t7 .svc-card__link {
    border-color: #b8d4b8;
}

.svc-card--t7 .svc-card__link::before {
    background: linear-gradient(180deg, #ffffff 0%, #d9edd9 100%);
}

.svc-card--t7 .svc-card__cta {
    background-color: #206424;
    color: #ffffff;
}

.svc-card--t7 .svc-card__hint {
    color: #0e2910;
}

.svc-card--t8 .svc-card__link {
    border-color: #d4c2e8;
}

.svc-card--t8 .svc-card__link::before {
    background: linear-gradient(180deg, #ffffff 0%, #e8dff5 100%);
}

.svc-card--t8 .svc-card__cta {
    background-color: #7534b1;
    color: #ffffff;
}

.svc-card--t8 .svc-card__hint {
    color: #240a3a;
}

.svc-card--t9 .svc-card__link {
    border-color: #e8c4b4;
}

.svc-card--t9 .svc-card__link::before {
    background: linear-gradient(180deg, #ffffff 0%, #f5dfd6 100%);
}

.svc-card--t9 .svc-card__cta {
    background-color: #9c3607;
    color: #ffffff;
}

.svc-card--t9 .svc-card__hint {
    color: #3a1200;
}

.svc-card--t10 .svc-card__link {
    border-color: #a8d9d4;
}

.svc-card--t10 .svc-card__link::before {
    background: linear-gradient(180deg, #ffffff 0%, #d4f2ef 100%);
}

.svc-card--t10 .svc-card__cta {
    background-color: #08645e;
    color: #ffffff;
}

.svc-card--t10 .svc-card__hint {
    color: #052a27;
}

.svc-card__arc {
    position: absolute;
    z-index: 1;
    left: 50%;
    top: clamp(-10px, -1.5vw, -4px);
    translate: -50% 0;
    width: min(108%, 15.5rem);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    pointer-events: none;
}

.svc-card__arc img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.svc-card__link:focus-visible {
    outline: 3px solid rgba(35, 24, 44, 0.75);
    outline-offset: 3px;
    z-index: 3;
}

.svc-card__link:focus-visible .svc-card__ico {
    top: -2px;
}

.svc-card__ico {
    position: relative;
    top: 0;
    z-index: 4;
    display: block;
    box-sizing: content-box;
    width: auto;
    margin-top: 0rem;
    height: var(--ico-h, 90px);
    max-width: 92%;
    object-fit: contain;
    flex-shrink: 0;
    align-self: end;
    justify-self: center;
    transition: top 0.2s ease;
    filter: drop-shadow(0 2px 2px rgba(45, 38, 72, 0.2));
}

.svc-card__bd {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 0;
    padding: 0rem 0.5rem 0rem;
    background: transparent;
}

/* แถวไอคอน + ปุ่มข้อความ — grid แทน wrapper span */
.svc-card__hd {
    width: 100%;
    max-width: 100%;
    text-align: center;
    --ico-h: 90px;
    display: grid;
    grid-template-rows: minmax(var(--ico-h), auto) auto;
    justify-items: center;
    row-gap: 0.18rem;
    margin-bottom: 8px;
}

.svc-card__cta {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    background-color: #a1275e;
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.2;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.svc-card--t2 .svc-card__cta {
    background-color: #9e2f4c;
}

.svc-card--t3 .svc-card__cta {
    background-color: #7b4e0a;
}

.svc-card--t4 .svc-card__cta {
    background-color: #792fb3;
}

.svc-card--t5 .svc-card__cta {
    background-color: #096645;
}

.svc-card__hint {
    margin: 0;
    color: #801a5e;
    font-weight: 700;
    font-size: clamp(0.78rem, 0.4vw + 0.66rem, 0.9rem);
    line-height: 1.2;
    text-align: center;
}

.svc-card--t2 .svc-card__hint {
    color: #790927;
}

.svc-card--t3 .svc-card__hint {
    color: #6b4103;
}

.svc-card--t4 .svc-card__hint {
    color: #592778;
}

.svc-card--t5 .svc-card__hint {
    color: #0f5e42;
}

/* มือถือ: ปุ่มเลื่อนใหญ่ขึ้น (แตะได้ง่าย) + เว้นรอบเข้ากับ notch + ฟอร์มข้อความบนการ์ดไม่ให้เกินจอเล็ก */
@media (max-width: 575.98px) {
    .svc-slot {
        padding-inline-start: max(
            clamp(24px, 5vw + 10px, 44px),
            env(safe-area-inset-left, 0px)
        );
        padding-inline-end: max(
            clamp(24px, 5vw + 10px, 44px),
            env(safe-area-inset-right, 0px)
        );
    }

    .svc-bar {
        gap: 0.5rem 0.875rem;
    }

    /* แถบหัว: โฟกัสขวายังอยู่; หากห่อเมื่อไม่ให้การ์ดกว้างเต็มลิ้งก์เกินจอ */
    .svc-all {
        width: fit-content;
        max-width: 100%;
    }

    .svc-all__blob {
        width: 2.38rem;
        height: 2.38rem;
    }

    .svc-nav {
        width: clamp(44px, 11vw, 54px);
        min-width: 44px;
        height: clamp(48px, 12vw, 58px);
        min-height: 48px;
    }

    .svc-nav i {
        font-size: 1.5rem;
    }

    .svc-card__cta {
        font-size: clamp(0.875rem, 0.42vw + 0.78rem, 1.05rem);
        padding: 0.48rem 0.75rem;
    }

    .svc-card__hd {
        --ico-h: 84px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .svc-track {
        scroll-behavior: auto;
    }

    .svc-card:hover .svc-card__link,
    .svc-card:focus-within .svc-card__link {
        box-shadow: none;
    }

    .svc-card__ico {
        transition: none;
    }
}

/* ##################### HOME news / activities (ข่าวกิจกรรม) — .nwz* #################### */
.nwz {
    font-family: "Noto Sans Thai", "Noto Sans", sans-serif;
}

.nwz-title {
    margin: 0;
    padding: 0;
    font-weight: 600;
    font-size: clamp(1.4rem, 2.05vw + 0.82rem, 1.8125rem);
    color: #23182c;
}

.nwz-shell {
    position: relative;
}

.nwz-tabstrip {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    padding-inline-start: 7px;
    margin-inline-start: 0;
    margin-block-end: 0;
    position: relative;
    /* อยู่ใต้แผง — ให้ nwz-panel ทับโค้งล่างของแท็บตามแบบ */
    z-index: 1;
}

.nwz-tab {
    appearance: none;
    border: none;
    cursor: pointer;
    margin: 0;
    position: relative;
    flex: 0 1 auto;
    min-width: 0;
    padding: 1.05rem clamp(2rem, 5.5vw, 4rem) 2rem;
    font-family: inherit;
    font-weight: 600;
    font-size: clamp(0.95rem, 0.45vw + 0.78rem, 1.34rem);
    line-height: 1.28;
    letter-spacing: 0.03em;
    border-radius: 0;
    background-color: #fcb8e5;
    color: #000;
    transition:
        background-color 0.18s ease,
        color 0.18s ease;
}

.nwz-tab:first-of-type:not(:last-of-type) {
    border-radius: 28px 0 0 0;
}

.nwz-tab:last-of-type:not(:first-of-type) {
    border-radius: 0 28px 0 0;
}

.nwz-tab:first-of-type:last-of-type {
    border-radius: 28px 28px 0 0;
}

/* inactive เทียบโทนกับพื้น #fcb8e5 — เข้มขึ้นเล็กน้อย ไม่ชนกับ active */
.nwz-tab:hover:not(.nwz-tab--active) {
    background-color: #faa3d9;
    color: #281022;
}

.nwz-tab:focus-visible {
    position: relative;
    z-index: 4;
    outline: 3px solid rgba(167, 29, 117, 0.42);
    outline-offset: 2px;
}

.nwz-tab--active {
    z-index: 2;
    background-color: #9e196d;
    color: #fff;
}

.nwz-tab--active:hover {
    background-color: #961967;
    color: #fff;
}

.nwz-panel {
    position: relative;
    /* ทับช่วงล่างของแท็บ — เชื่อมโค้งกับโปร่งด้านบนของแผง */
    z-index: 2;
    margin-top: clamp(-16px, -1.65vw, -22px);
    padding: clamp(1.35rem, 3.2vw, 2.15rem);
    border-radius: clamp(22px, 3vw, 32px);
    background-color: #fef6fe;
    border: none;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 2px 6px rgba(171, 77, 137, 0.22),
        0 8px 24px rgba(171, 77, 137, 0.14);
}

.nwz-feature {
    margin: 0;
    min-height: 0;
}

.nwz-feature__link {
    position: relative;
    display: block;
    height: 100%;
    /* สูงขั้นต่ำใกล้ต้นฉบับ — คอลัมน์ซ้าย/ขวายังยืดเท่ากันด้วย h-100 + align-items-stretch */
    min-height: clamp(280px, 34vw, 440px);
    border-radius: clamp(18px, 2.25vw, 26px);
    overflow: hidden;
    isolation: isolate;
    color: #000;
    box-shadow: 0 3px 16px rgba(35, 24, 44, 0.08);
    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease;
}

.nwz-feature__link:hover,
.nwz-feature__link:focus-visible {
    transform: translateY(-1px);
    box-shadow:
        0 8px 22px rgba(171, 77, 137, 0.14),
        0 4px 14px rgba(35, 24, 44, 0.08);
}

.nwz-feature__link:focus-visible {
    outline: 3px solid rgba(131, 24, 67, 0.55);
    outline-offset: 3px;
}

.nwz-feature__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.nwz-feature__link:hover .nwz-feature__img,
.nwz-feature__link:focus-visible .nwz-feature__img {
    transform: scale(1.012);
}

.nwz-feature__cap {
    position: absolute;
    inset-inline: 0;
    inset-block-end: 0;
    /* ดึงโซนไล่สีสูงขึ้น (~2/3 การ์ด) ไม่ให้ภาพสว่างโผล่ชิดข้อความ */
    top: clamp(26%, 22vw + 14%, 44%);
    box-sizing: border-box;
    padding: clamp(1.35rem, 4vw, 2rem) clamp(1rem, 3vw, 1.65rem)
        clamp(1rem, 3vw, 1.65rem);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    /* ล่างทึบพอให้ตัวอ่านชัด — ด้านบนของแคปโปร่งให้เห็นภาพจางๆ */
    background: linear-gradient(
        to top,
        rgba(100, 48, 88, 0.98) 0%,
        rgba(100, 48, 88, 0.92) 18%,
        rgba(100, 48, 88, 0.7) 42%,
        rgba(100, 48, 88, 0.35) 68%,
        rgba(100, 48, 88, 0.12) 86%,
        rgba(100, 48, 88, 0) 100%
    );
}

.nwz-feature__cap::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: min(65%, 19rem);
    aspect-ratio: 320 / 240;
    background: url("../images/shape-news.svg") no-repeat right bottom / contain;
    pointer-events: none;
    z-index: 0;
}

.nwz-feature__cap > * {
    position: relative;
    z-index: 1;
}

.nwz-feature__title {
    margin: 0 0 0.65rem;
    font-weight: 700;
    font-size: clamp(1.05rem, 1.2vw + 0.82rem, 1.3rem);
    line-height: 1.38;
    color: #fff;
    text-shadow:
        0 0 1px rgba(0, 0, 0, 0.95),
        0 1px 2px rgba(0, 0, 0, 0.85),
        0 2px 10px rgba(0, 0, 0, 0.45);
}

.nwz-feature__excerpt {
    margin: 0 0 0.65rem;
    font-weight: 500;
    font-size: clamp(0.875rem, 0.28vw + 0.76rem, 1rem);
    line-height: 1.42;
    color: rgba(255, 255, 255, 0.93);
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.42),
        0 0 8px rgba(0, 0, 0, 0.2);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    overflow: hidden;
}

.nwz-feature__cap .nwz-meta--light {
    color: #fff;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.55),
        0 0 10px rgba(0, 0, 0, 0.28);
}

.nwz-feature__cap .nwz-meta--light .bi {
    color: #fff;
    opacity: 1;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.nwz-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
}

.nwz-item {
    margin: 0;
}

.nwz-item--sep {
    margin-block-start: clamp(0.85rem, 2vw, 1.15rem);
    padding-block-start: clamp(0.85rem, 2vw, 1.15rem);
    border-block-start: 1px solid #e5ccda;
}

.nwz-item__link {
    display: flex;
    flex-direction: row;
    gap: clamp(0.75rem, 2vw, 1rem);
    align-items: flex-start;
    color: #000;
    border-radius: clamp(12px, 1.65vw, 18px);
    outline-offset: 2px;
    padding-block: 0.42rem;
    padding-inline: clamp(0.4rem, 1.2vw, 0.55rem);
    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.nwz-item__link:hover,
.nwz-item__link:focus-visible {
    background-color: rgba(252, 184, 229, 0.22);
    box-shadow: 0 3px 16px rgba(171, 77, 137, 0.08);
}

.nwz-item__link:focus-visible {
    outline: 2px solid rgba(131, 24, 67, 0.45);
}

.nwz-item__link:hover .nwz-item__title,
.nwz-item__link:focus-visible .nwz-item__title {
    color: #000000;
    text-underline-offset: 0.18em;
}

.nwz-item__thumb {
    /* โทนต้นฉบับ: ~40–45% ความกว้างคอลัมน์ขวา แต่ไม่เกิน 340px */
    flex: 0 0 min(340px, 45%);
    width: min(340px, 45%);
    max-width: 340px;
    min-width: 0;
    border-radius: clamp(12px, 1.85vw, 16px);
    overflow: hidden;
    align-self: flex-start;
    background: rgba(109, 29, 71, 0.06);
}

.nwz-item__thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition:
        transform 0.28s ease,
        filter 0.28s ease;
}

.nwz-item__link:hover .nwz-item__thumb img,
.nwz-item__link:focus-visible .nwz-item__thumb img {
    transform: scale(1.01);
    filter: brightness(1.02);
}

.nwz-item__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.nwz-item__title {
    margin: 0;
    font-weight: 600;
    font-size: clamp(1rem, 0.35vw + 0.82rem, 1.1rem);
    line-height: 1.38;
    color: #000;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    transition: text-decoration 0.18s ease;
}

.nwz-item__excerpt {
    word-break: break-word;
    margin: 0;
    font-size: clamp(1rem, 0.22vw + 0.94rem, 1.1rem);
    line-height: 1.45;
    color: #000;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

.nwz-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1.15rem;
    font-size: clamp(0.75rem, 0.18vw + 0.69rem, 0.8125rem);
    font-weight: 500;
}

.nwz-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.nwz-meta__item .bi {
    font-size: 1rem;
    opacity: 0.95;
}

.nwz-meta--light {
    color: rgba(255, 255, 255, 0.94);
}

.nwz-meta--light .bi {
    color: #fff;
    opacity: 0.92;
}

.nwz-meta--accent {
    color: #80225e;
}

.nwz-meta--accent .bi {
    color: #80225e;
}

/* ============================================
   ข่าวหน้ารวม
============================================ */

.news-thumb-card {
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}
.news-thumb-card:hover {
    box-shadow: 0 12px 24px rgba(164, 25, 113, 0.12) !important;
}
.news-thumb-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.news-thumb-image-wrapper {
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
}
.news-thumb-img {
    aspect-ratio: 16 / 10;
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.4s ease;
}
.news-thumb-card:hover .news-thumb-img {
    transform: scale(1.05);
}
.news-thumb-content {
    padding: 1.25rem;
}

/* หัวข้อข่าว */
.news-thumb-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.45;
    color: #1a1a1a;
    margin: 0 0 0.75rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.2rem;
}
.news-thumb-link:hover .news-thumb-title {
    color: #a41971;
}

/* meta data (วันที่, จำนวนviews) */
.news-thumb-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: #6c757d;
}
.news-thumb-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.news-thumb-meta-item i {
    font-size: 0.9rem;
    color: #a41971;
}

@media (max-width: 768px) {
    .news-thumb-content {
        padding: 1rem;
    }
    .news-thumb-title {
        font-size: 1rem;
        -webkit-line-clamp: 3;
    }
    .news-thumb-meta {
        font-size: 0.75rem;
        gap: 0.8rem;
    }
}
.news-thumb-card.loading .news-thumb-img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ——— ปุ่มค้นหา ——— */
.inner-search-btn {
    background: #a41971;
    min-height: 40px;
    color: #fff;
    border: none;
    border-radius: 9999px;
    transition:
        background 0.2s,
        box-shadow 0.2s;
}

.inner-search-btn:hover {
    background: #932465;
    color: #fff;
    box-shadow: 0 2px 12px rgba(199, 75, 147, 0.25);
}

/* ——— ข่าวจากกระทรวง พม. (การ์ด 3 คอลัมน์) ——— */
.mn-news__heading .mn-news__title-prefix {
    color: #23182c;
}

.mn-news__heading .mn-news__title-accent {
    color: #a41971;
    font-weight: 700;
}

.mn-news-card {
    border-radius: 14px;
    box-shadow:
        0 4px 20px rgba(35, 24, 44, 0.1),
        0 2px 8px rgba(35, 24, 44, 0.06);
    transition:
        box-shadow 0.22s ease,
        transform 0.22s ease;
}

.mn-news-card:hover,
.mn-news-card:focus-within {
    box-shadow:
        0 12px 36px rgba(171, 77, 137, 0.18),
        0 4px 14px rgba(35, 24, 44, 0.08);
    transform: translateY(-1px);
}

.mn-news-card__link:focus-visible {
    outline: none;
}

.mn-news-card:focus-within {
    outline: 3px solid rgba(138, 36, 93, 0.35);
    outline-offset: 3px;
}

.mn-news-card__ratio {
    overflow: hidden;
    background: rgba(109, 29, 71, 0.06);
}

.mn-news-card__meta {
    row-gap: 0.35rem;
}

.mn-news-card__title {
    font-weight: 600;
    font-size: clamp(0.95rem, 0.42vw + 0.8rem, 1.1rem);
    line-height: 1.42;
    color: #23182c;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .mn-news-card {
        transition: none;
    }

    .mn-news-card:hover,
    .mn-news-card:focus-within {
        transform: none;
    }
}

/* ——— วารสาร ——— */
.journal {
    font-family: "Noto Sans Thai", "Noto Sans", sans-serif;
}

.journal-slot {
    position: relative;
}

/* Bootstrap 5.3 carousel — วารสาร */
.journal-carousel {
    position: relative;
}

.journal-carousel .journal-card {
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
}

.journal-carousel__indicators {
    bottom: -0.15rem;
    margin-bottom: 0;
    gap: 0.35rem;
}

.journal-carousel__indicators [data-bs-target] {
    box-sizing: border-box;
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    border: none;
    opacity: 1;
    text-indent: 0;
    background-color: rgba(35, 24, 44, 0.28);
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.journal-carousel__indicators [data-bs-target].active {
    background-color: #a41971;
    transform: scale(1.05);
}

.journal-carousel__control {
    width: clamp(2.25rem, 5vw, 2.75rem);
    opacity: 1;
}

.journal-carousel .carousel-control-prev,
.journal-carousel .carousel-control-next {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    background: none;
    border: none;
    filter: none;
}

.journal-carousel .carousel-control-prev {
    left: -0.25rem;
}

.journal-carousel .carousel-control-next {
    right: -0.25rem;
}

@media (min-width: 576px) {
    .journal-carousel .carousel-control-prev {
        left: -0.5rem;
    }

    .journal-carousel .carousel-control-next {
        right: -0.5rem;
    }
}

.journal-carousel__chev {
    font-size: 1.625rem;
    line-height: 1;
    color: rgba(35, 24, 44, 0.35);
}

.journal-carousel__control:hover .journal-carousel__chev,
.journal-carousel__control:focus .journal-carousel__chev {
    color: rgba(35, 24, 44, 0.55);
}

.journal-carousel__control:focus-visible {
    outline: 2px solid #23182c;
    outline-offset: 2px;
    border-radius: 4px;
    box-shadow: none;
}

.journal-card__link {
    position: relative;
    display: block;
    min-height: clamp(280px, 32vw, 340px);
    border-radius: 999px;
    outline-offset: 3px;
    perspective: 760px;
    overflow: visible;
}
@media (min-width: 991.98px) and (max-width: 1199.98px) {
    .journal-card__link {
        min-height: 275px;
    }
}
.journal-card__halo {
    position: absolute;
    left: 55%;
    top: 33%;
    translate: -50% 0;
    width: clamp(170px, 20vw, 220px);
    height: clamp(170px, 20vw, 220px);
    border-radius: 50%;
    background-color: #f6f6f6;
    transition: background-color 0.22s ease;
}
@media (min-width: 991.98px) and (max-width: 1199.98px) {
    .journal-card__halo {
        top: 22%;
    }
}
.journal-card__stack {
    position: absolute;
    left: 50%;
    top: 10px;
    translate: -50% 0;
    width: clamp(135px, 14vw, 185px);
    aspect-ratio: 240 / 340;
    transform-style: preserve-3d;
    transform: perspective(2000px) rotateY(-30deg) rotateX(0.5deg) rotateZ(1deg)
        scaleY(0.92);
    transform-origin: 50% 88%;
    /* smooth */
    transition:
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.journal-card__cover {
    border: 1px solid rgba(0, 0, 0, 0.1);
}
.journal-card__cover {
    left: -2px !important;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 2px;
}

/* ชั้นหลัง — มุมหนังสือ / spine โผล่ทางขวา */
.journal-card__back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 97%;
    object-fit: cover;
    object-position: top;
    border-radius: 0px;
}
.journal-card__back {
    z-index: 0;
    transform: translate3d(11%, 0px, 0px) scale(1);
    transform-origin: 100% 100%;
    opacity: 1;
}

.journal-card__cover {
    z-index: 1;
    transition:
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.28s ease;
}

/* Hover ทั้งเล่ม */
.journal-card__link:hover .journal-card__stack,
.journal-card__link:focus-visible .journal-card__stack {
    transform: perspective(2000px) rotateY(-30deg) rotateX(0.5deg) rotateZ(1deg)
        scaleY(0.92) scale(1.06);

    filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.18));
}

.journal-card__link:hover .journal-card__halo,
.journal-card__link:focus-visible .journal-card__halo {
    background-color: #fccdec;
}

.journal-card__link:focus-visible {
    outline: 3px solid rgba(164, 25, 113, 0.45);
}

@media (max-width: 575.98px) {
    .journal-slot {
        padding-inline: clamp(24px, 5vw + 10px, 44px);
    }

    .journal-carousel__control {
        width: clamp(44px, 11vw, 54px);
        min-width: 44px;
    }

    .journal-carousel__chev {
        font-size: 1.5rem;
    }
}

/* ——— journal หน้ารวม ——— */
.journal-img {
    max-width: 280px;
    border-radius: 1px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    transition:
        box-shadow 0.3s ease,
        opacity 0.3s ease;
}
.journal-img:hover {
    opacity: 0.9;
    box-shadow: 0 2px 16px rgba(133, 25, 94, 0.4);
}

/* responsive */
@media (max-width: 768px) {
    .journal-img {
        max-width: 220px;
    }
}

@media (max-width: 576px) {
    .journal-img {
        max-width: 180px;
    }
}

/* ——— ข่าวจัดซื้อจัดจ้าง / รับสมัครงาน (.proc-*) ——— */
.proc-band {
    font-family: "Noto Sans Thai", "Noto Sans", sans-serif;
    background-color: #b73889;
    background-image: url("../images/bg-procurement.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center top;
}
.proc-band__title {
    margin: 0;
    padding: 0 0 0 1rem;
    border-left: 7px solid #f3b705;
    color: #fff;
    font-weight: 600;
    font-size: clamp(1.35rem, 2.4vw + 0.75rem, 1.8125);
    line-height: 1.25;
    letter-spacing: 0.01em;
}

.proc-band__title-join {
    font-weight: 700;
}

.proc-tab-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 1rem 1.15rem 1.1rem;
    border: none;
    text-align: start;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.proc-tab-card--proc {
    border-top: 13px solid #f3b705;
    padding-top: 0.85rem;
}

.proc-tab-card--job {
    border-top: 13px solid #8977f6;
    padding-top: 0.85rem;
}

.proc-tab-card--job .proc-tab-card__head {
    border: 0;
    background: transparent;
    padding: 0;
    width: 100%;
    text-align: start;
}

.proc-tab-card.is-active {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

.proc-tab-card__main {
    cursor: pointer;
}

.proc-tab-card__label {
    font-weight: 700;
    color: #23182c;
    font-size: clamp(1rem, 1vw + 0.85rem, 1.5rem);
}

.proc-tab-card.is-active .proc-tab-card__label {
    color: #bf0476;
}

.proc-tab__icon-slot {
    flex: 0 0 auto;
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    position: relative;
}

.proc-tab__icon-slot--yellow {
    background-color: #fff6e1;
}

.proc-tab__icon-slot--lavender {
    background-color: #dadaff;
}

.proc-tab__icon {
    width: 4.5rem;
    height: 4.5rem;
    object-fit: contain;
}
.proc-tab__icon-slot--lavender img {
    width: 5.2rem;
    height: 5.2rem;
}
.proc-tab__sub li + li {
    margin-top: 0.2rem;
}

.proc-tab__sub-btn {
    position: relative;
    display: block;
    width: 100%;
    padding: 0.28rem 0 0.28rem 0.85rem;
    margin: 0;
    border: none;
    background: transparent;
    text-align: start;
    font-size: 1.3rem;
    font-weight: 500;
    color: #000;
    transition:
        color 0.18s ease,
        font-weight 0.18s ease;
    text-decoration: none;
}

.proc-tab__sub-btn::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0.28rem;
    font-weight: 700;
    color: inherit;
}

.proc-tab__sub-btn:hover,
.proc-tab__sub-btn.is-active,
.proc-tab__sub-btn:focus-visible {
    color: #bf0476;
    font-weight: 500;
}

.proc-tab__sub-btn.is-active {
    color: #bf0476;
    font-weight: 600;
}

.proc-tab__sub-btn:focus-visible {
    outline: 2px solid rgba(191, 4, 118, 0.45);
    outline-offset: 2px;
    border-radius: 4px;
}

[data-proc-main="purchase"] .proc-tab-card--job .proc-tab__sub-btn.is-active {
    color: #000;
    font-weight: 500;
}

.proc-pane {
    border-radius: 24px;
    overflow: visible;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.12);
}

.proc-pane__body {
    overflow: hidden;
}

@media (min-width: 992px) {
    .proc-pane::before {
        content: "";
        position: absolute;
        left: -25px;
        top: var(--proc-pointer-top, 3.75rem);
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 15px 25px 15px 0;
        border-color: transparent #fff transparent transparent;
        filter: drop-shadow(-2px 0 1px rgba(0, 0, 0, 0.04));
        transition: top 0.25s ease;
        transform: translateY(-50%);
        pointer-events: none;
        z-index: 2;
    }
}

.proc-pane__hd {
    margin: 0;
}

.proc-pane__list .proc-item:first-child {
    padding-top: 0.25rem !important;
}
.proc-pane__list .proc-item + .proc-item {
    border-top: 1px solid #e4e4e4;
}
.proc-pane__list .proc-item:last-child {
    border-bottom: 1px solid #e4e4e4;
}

.proc-item__date {
    flex: 0 0 auto;
    min-width: 4.25rem;
    padding: 0.45rem 0.5rem;
    background-color: #f0f0f0;
    border-radius: 8px;
    align-self: flex-start;
}

.proc-item__day {
    display: block;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.1;
    color: #bf0476;
}

.proc-item__ym {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #000;
    line-height: 1.25;
    margin-top: 0.15rem;
}

.proc-item__txt {
    font-weight: 500;
    font-size: 1.1rem;
    line-height: 1.5;
    color: #000;
}

.proc-item:hover .proc-item__txt,
.proc-item:focus-visible .proc-item__txt {
    color: #bf0476;
}

.proc-item:focus-visible {
    outline: 2px solid #bf0476;
    outline-offset: 2px;
    border-radius: 4px;
}

.proc-pane__all {
    background-color: #bf0476 !important;
    border: none !important;
    color: #fff !important;
    font-size: 0.95rem;
}

.proc-pane__all:hover,
.proc-pane__all:focus-visible {
    background-color: #9d0360 !important;
    color: #fff !important;
}

.proc-pane__all:focus-visible {
    outline: 3px solid rgba(191, 4, 118, 0.45);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .proc-tab-card,
    .proc-tab__sub-btn,
    .proc-pane::before {
        transition: none;
    }
}
.proc-item__content {
    display: flex;
    flex-direction: column;
}
.proc-item__view {
    margin-top: 5px;
    font-size: clamp(0.72rem, 0.15vw + 0.67rem, 0.8125rem);
    font-weight: 500;
    color: #80225e;
}
/* PDF Procurement */
.inner-pdf-embed {
    width: 100%;
    max-width: 100%;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
}

.news-detail-body .inner-pdf-embed {
    overflow: hidden;
}

.inner-pdf-embed-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.inner-pdf-embed-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: clamp(260px, 68vh, 880px);
    border-radius: var(--msdhs-radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #ebebeb;
    overflow: hidden;
}

.inner-pdf-embed-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 575.98px) {
    .inner-pdf-embed-wrap {
        height: clamp(240px, 55vh, 880px);
        border-radius: 0.375rem;
    }

    .inner-pdf-embed-toolbar .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ——— แบนเนอร์หน้าแรก (Carousel) ——— */
.home-banner-card {
    display: flex;
    justify-content: center;
}
.home-banner-carousel__control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-banner-carousel__control:hover,
.home-banner-carousel__control:focus {
    opacity: 1;
}

.home-banner-carousel__control.carousel-control-prev {
    left: -2.5rem;
}

.home-banner-carousel__control.carousel-control-next {
    right: -2.5rem;
}
@media (min-width: 991.98px) and (max-width: 1199.98px) {
    .home-banner-carousel__control.carousel-control-prev {
        left: -1.5rem;
    }

    .home-banner-carousel__control.carousel-control-next {
        right: -1.5rem;
    }
}
.home-banner-carousel__control .carousel-control-prev-icon,
.home-banner-carousel__control .carousel-control-next-icon {
    filter: invert(0%) sepia(100%) saturate(0%) hue-rotate(0deg) brightness(0%)
        contrast(100%);
    width: 1.2rem;
    height: 1.2rem;
}
.home-banner-carousel__control .carousel-control-prev-icon,
.home-banner-carousel__control .carousel-control-next-icon {
    width: 2rem;
    height: 2rem;
}
.home-banner-card {
    margin: 10px;
    border-radius: 20px;
    transition:
        box-shadow 0.3s ease,
        transform 0.3s ease;
}
.home-banner-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 20px;
}

/* Responsive */
@media (max-width: 991.98px) {
    .home-banner-carousel__control.carousel-control-prev {
        left: -0.5rem;
    }
    .home-banner-carousel__control.carousel-control-next {
        right: -0.5rem;
    }
    .home-banner-carousel__control {
        width: 2rem;
        height: 2rem;
    }
}

@media (max-width: 575.98px) {
    .home-banner-carousel__control {
        width: 2rem;
        height: 2rem;
    }
    .home-banner-carousel__control.carousel-control-prev {
        left: -0.25rem;
    }
    .home-banner-carousel__control.carousel-control-next {
        right: -0.25rem;
    }
}

/* ——— ลิงก์แนะนำ ——— */
.recommend-links {
    position: relative;
    overflow: hidden;
}

.recommend-links__wrap {
    position: relative;
    z-index: 1;
    width: 100%;
}

.recommend-links__intro {
    flex: 0 0 auto;
    background-color: #df3987;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 2;
    overflow: visible;
}

/* สามเหลี่ยมเฉียง */
.recommend-links__intro::before {
    content: "";
    position: absolute;
    top: 0;
    right: -53px;
    width: 80px;
    height: 100%;
    background-color: #df3987;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    transform: skewX(-15deg);
    transform-origin: top left;
    z-index: 2;
    pointer-events: none;
}

@media (max-width: 991.98px) {
    .recommend-links__intro::before {
        display: none;
    }
}

@media (min-width: 992px) {
    .recommend-links__intro {
        flex: 0 0 17.5rem;
        max-width: 20rem;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem 2rem 2rem 1.5rem;
    }
}

.recommend-links__intro-inner {
    max-width: 12rem;
}

.recommend-links__brand-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    margin-bottom: 0.75rem;
}

.recommend-links__brand-icon-bg {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-color: #3c2b95;
}

.recommend-links__brand-icon {
    position: relative;
    z-index: 1;
    width: 36px;
    height: 36px;
}

.recommend-links__title {
    color: #fff; /*background-color: rgba(0, 0, 0, 0.2);*/
    background-color: #b82c6f;
    border-radius: 20px;
    padding-left: 8px;
    padding-right: 8px;
    font-weight: 600;
    font-size: 1.8125rem;
    line-height: 1.25;
}

.recommend-links__panel {
    background-color: #3c2b95;
    min-height: 12rem;
}

.recommend-links__carousel {
    padding: 0.75rem 0;
}

.recommend-links__carousel-bar {
    gap: 0;
}

.recommend-links__round-btn {
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 0.4rem;
    align-self: center;
    border: none;
    border-radius: 50%;
    background-color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
    z-index: 15;
    position: relative;
}

.recommend-links__round-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.recommend-links__round-btn:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.65);
    outline-offset: 2px;
}

.recommend-links__inner {
    overflow: hidden;
}

.recommend-links__ico-ring {
    width: 80px;
    height: 80px;
    background-color: #df3987;
}

.recommend-links__ico-img {
    display: block;
}

.recommend-links__label {
    font-weight: 500;
    font-size: 1.1rem;
    line-height: 1.35;
}

/* desktop divider */
@media (min-width: 992px) {
    .recommend-links__grid
        > .col-lg-3:not(:first-child)
        .recommend-links__cell::after {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 50%;
        background-color: rgba(255, 255, 255, 0.5);
    }
}

/* tablet/mobile divider */
@media (max-width: 991.98px) {
    .recommend-links__grid
        > .col-6:nth-child(even)
        .recommend-links__cell::after {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 50%;
        background-color: rgba(255, 255, 255, 0.5);
    }
}

.recommend-links__cell {
    transition:
        filter 0.3s ease,
        transform 0.3s ease;
    position: relative;
}

.recommend-links__cell:hover,
.recommend-links__cell:focus-visible {
    transform: scale(1.05);
}

.recommend-links__cell:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .recommend-links__round-btn,
    .recommend-links__cell {
        transition: none;
    }
}

.recommend-links::before {
    content: "";
    position: absolute;
    top: 0;
    right: 50%;
    width: 100%;
    height: 100%;
    background-color: #df3987;
    z-index: 0;
    pointer-events: none;
}

.recommend-links::after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: #3c2b95;
    z-index: 0;
    pointer-events: none;
}

/* ——— Infographic — พื้นหลังเต็มความกว้างจอ ——— */
.infographic-band {
    font-family: "Noto Sans Thai", "Noto Sans", sans-serif;
    width: 100%;
    background-color: #efe6f2;
    background-image: url("../images/bg-infographic.jpg");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

.infographic-band__sheet {
    background-color: #fff;
    border-radius: 10px;
    box-shadow:
        0 6px 28px rgba(35, 24, 44, 0.08),
        0 2px 10px rgba(35, 24, 44, 0.04);
}

@media (max-width: 767.98px) {
    .infographic-band__sheet {
        padding-inline: 0.75rem !important;
    }
}

.infographic-card {
    border-radius: 10px;
    transition: transform 0.22s ease;
}

.infographic-card:hover,
.infographic-card:focus-within {
    transform: translateY(-2px);
}

.infographic-card .card-body {
    background-color: #fff;
    border-radius: 0 0 10px 10px;
}

.infographic-card__link:focus-visible {
    outline: none;
}

.infographic-card:focus-within {
    outline: 3px solid rgba(138, 36, 93, 0.35);
    outline-offset: 3px;
}

.infographic-card__ratio {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 10px;
    margin-block-end: clamp(0.65rem, 2vw, 0.85rem);
    background: rgba(109, 29, 71, 0.06);
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.22s ease;
}

.infographic-card:hover .infographic-card__ratio,
.infographic-card:focus-within .infographic-card__ratio {
    box-shadow:
        0 16px 42px rgba(171, 77, 137, 0.16),
        0 8px 24px rgba(35, 24, 44, 0.09),
        0 3px 10px rgba(35, 24, 44, 0.06);
}

.infographic-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.infographic-card__title {
    margin: 0;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.42;
    color: #23182c;
    text-align: center;
    text-wrap: balance;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: calc(1.42em * 2);
}

.infographic-card__rule {
    flex-shrink: 0;
    height: 0;
    margin: 0;
    border: 0;
    border-top: 1px solid #e3e3e3;
}

.infographic-card__meta {
    font-size: clamp(0.72rem, 0.15vw + 0.67rem, 0.8125rem);
    font-weight: 500;
    color: #80225e;
}

.infographic-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.infographic-card__meta-item .bi {
    font-size: 1rem;
    color: #80225e;
    opacity: 0.95;
}

@media (prefers-reduced-motion: reduce) {
    .infographic-card {
        transition: none;
    }

    .infographic-card:hover,
    .infographic-card:focus-within {
        transform: none;
    }

    .infographic-card__ratio {
        transition: none;
    }
}

/* ——— หน้าแรก: วิดีโอน่าสนใจ + ปฏิทินกิจกรรม ——— */
.home-media-split {
    /*border-bottom: 2px dashed #e2e3e4;*/
}
.dashed-line {
    display: block;
    width: 100%;
}

.vdo-strip__ttl {
    color: #23182c;
    font-size: 1.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.25;
}

.vdo-strip__ico {
    width: 67px;
    height: 47px;
    flex-shrink: 0;
    object-fit: contain;
    object-position: left center;
    display: block;
}

.vdo-slot__ratio {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    background: transparent;
}

.vdo-slot__embed-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.vdo-slot__poster {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    cursor: pointer;
    background-color: #1a1a1a;
    color: inherit;
    text-align: start;
}

.vdo-slot__poster:focus-visible {
    outline: 2px solid #bf0476;
    outline-offset: 2px;
}

.video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: middle;
}

.vdo-slot__iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    z-index: 1;
}

.vdo-slot__play {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.play-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 50%;
    width: clamp(52px, 12vw, 76px);
    height: clamp(52px, 12vw, 76px);
    background: transparent;
    box-shadow: none;
}

/* เงาให้เห็นชัดบนภาพปก (รูปเป็น SVG พื้นโปร่งรอบฟอร์ม) */
.play-circle__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5))
        drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35))
        drop-shadow(0 8px 24px rgba(0, 0, 0, 0.2));
}

/* วิดีโอใหญ่ 2 ช่องแรก — ปุ่มเล็กลง */
.vdo-slot--featured .play-circle {
    width: clamp(40px, 8vw, 56px);
    height: clamp(40px, 8vw, 56px);
}

.vdo-slot--featured .play-circle__img {
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.22))
        drop-shadow(0 2px 6px rgba(0, 0, 0, 0.16))
        drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}
.vdo-slot--featured a {
    text-decoration: none;
}
.vdo-slot__cap--featured {
    margin-top: 0.65rem;
    font-weight: 600;
    line-height: 1.42;
    text-align: center;
    color: #23182c;
}
.vdo-slot--featured a:hover .vdo-slot__cap--featured {
    color: #a41971;
}

.vdo-slot--compact {
    display: flex;
    align-items: flex-start;
    gap: clamp(0.65rem, 1.8vw, 0.95rem);
}

.vdo-slot--compact > a.vdo-card-link {
    display: contents;
}

.vdo-slot--compact .vdo-slot__ratio--compact {
    flex: 0 0 clamp(112px, 32vw, 168px);
    max-width: 42%;
    border-radius: 8px;
}

.vdo-slot--compact .vdo-slot__cap {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
    line-height: 1.42;
    color: #23182c;
    margin: 0;
}

.vdo-slot--compact:hover .vdo-slot__cap {
    color: #a41971;
}

@media (min-width: 0px) and (max-width: 991.98px) {
    .vdo-slot {
        margin-bottom: 20px;
    }
}

.act-cal-strip__hd {
    color: #23182c !important;
    font-size: 1.8125rem !important;
}

.act-cal-strip__month {
    font-weight: 600;
    font-size: clamp(1.2rem, 0.35vw + 0.86rem, 1.125rem);
    color: #9e0566;
}

.act-cal-strip__nav.btn-link {
    color: #9e0566;
    text-decoration: none !important;
    line-height: 1 !important;
    font-size: 1rem;
    min-width: clamp(2.25rem, 5vw, 2.65rem);
    min-height: clamp(2.25rem, 5vw, 2.65rem);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.act-cal-strip__nav.btn-link .bi {
    font-size: clamp(1.45rem, 0.65vw + 1.06rem, 1.95rem);
    line-height: 1;
}

.act-cal-strip__nav.btn-link:hover {
    color: #7a044f;
}

.act-cal-strip__nav.btn-link:focus-visible {
    outline: 3px solid rgba(158, 5, 102, 0.35);
    outline-offset: 2px;
    border-radius: 4px;
}

.act-cal {
    border-radius: 6px;
    overflow: hidden;
}

.act-cal__wk-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    border-radius: 6px 6px 0 0;
    overflow: hidden;
}

.act-cal__wk-head {
    font-size: 1.1rem;
    font-weight: 600;
}

.act-cal__wk-head span {
    background: #faddf3;
    color: #000;
    padding: 0.5rem 0.06rem;
}

.act-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 4px;
    padding-top: 6px;
    background: #fef2fc;
    border-radius: 0 0 6px 6px;
}

.act-cal__cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.12rem;
    min-height: 2.5rem;
    padding: 4px 0 5px;
    font-size: 1rem;
    font-weight: 500;
    color: #000;
    border-radius: 4px;
}

.act-cal__cell--adj-month {
    color: #565258;
}

.act-cal__cell--adj-month .act-cal__num {
    color: #565258;
}

.act-cal__cell--adj-month.act-cal__cell--today .act-cal__marker {
    opacity: 0.5;
}

.act-cal__cell--adj-month.act-cal__cell--today .act-cal__num {
    color: #8a878d;
}

.act-cal__day-bundle {
    display: inline-flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
}

.act-cal__date-slot {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.act-cal__num {
    line-height: 1.05;
}

.act-cal__cell--has-act .act-cal__dot {
    display: block;
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fe64b1;
}

.act-cal__cell--today {
    position: relative;
}

.act-cal__cell--today .act-cal__marker {
    position: absolute;
    left: 70%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: clamp(40px, 11vw, 48px);
    height: clamp(40px, 11vw, 48px);
    pointer-events: none;
    background: url("../images/today-marker.svg") center center / contain
        no-repeat;
    z-index: 0;
}

.act-cal__cell--today .act-cal__num {
    position: relative;
    z-index: 1;
}

.act-cal__cell--today .act-cal__dot {
    position: relative;
    z-index: 1;
}

.act-cal__list {
    width: 100%;
}

.act-cal__event {
    display: flex;
    align-items: flex-start;
    gap: clamp(0.65rem, 2vw, 0.95rem);
    padding-bottom: 0.92rem;
    margin-bottom: 0.92rem;
    border-bottom: 1px solid #e5ccda;
}
/*
.act-cal__event--last {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}*/

.act-cal__event-link {
    color: inherit;
    text-decoration: none;
}

.act-cal__event-link:hover .act-cal__event-txt,
.act-cal__event-link:focus-visible .act-cal__event-txt {
    color: #a41971;
    text-underline-offset: 0.2em;
}

.act-cal__event-link:focus-visible {
    outline: 2px solid #bf0476;
    outline-offset: 2px;
}

.act-cal__empty {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.act-cal__meta {
    flex: 0 0 auto;
    width: clamp(54px, 15vw, 64px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0.42rem 0.35rem 0.5rem;
    border-radius: 10px;
    background: #f5f5f5;
}

.act-cal__day-num {
    font-weight: 500;
    font-size: clamp(1.0625rem, 0.4vw + 0.9rem, 1.25rem);
    line-height: 1.08;
    color: #9c1066;
}

.act-cal__meta-rest {
    font-size: clamp(0.75rem, 0.3vw + 0.6rem, 0.8rem);
    font-weight: 400;
    color: #000;
}

.act-cal__event-txt {
    flex: 1 1 auto;
    min-width: 0;
    color: #000;
    font-weight: 500;
}

@media (max-width: 991.98px) {
    .vdo-slot--compact {
        flex-direction: column;
        align-items: stretch;
    }

    .vdo-slot--compact .vdo-slot__ratio--compact {
        flex-basis: auto;
        width: 100%;
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vdo-slot__ratio,
    .vdo-slot__iframe,
    .vdo-slot__poster,
    .video-thumb {
        transition: none !important;
    }
}

.nwz-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-block-start: clamp(1rem, 2.5vw, 1.35rem);
    padding-block-start: clamp(0.85rem, 2vw, 1.1rem);
    border-block-start: 1px solid rgba(35, 24, 44, 0.08);
}

.nwz-footer .svc-all {
    margin-inline-start: 0;
}

@media (prefers-reduced-motion: reduce) {
    .nwz-feature__link,
    .nwz-feature__img,
    .nwz-item__link,
    .nwz-item__thumb img {
        transition: none;
    }

    .nwz-feature__link:hover,
    .nwz-feature__link:focus-visible {
        transform: none;
        box-shadow: 0 3px 16px rgba(35, 24, 44, 0.08);
    }

    .nwz-feature__link:hover .nwz-feature__img,
    .nwz-feature__link:focus-visible .nwz-feature__img {
        transform: none;
    }

    .nwz-item__link:hover .nwz-item__thumb img,
    .nwz-item__link:focus-visible .nwz-item__thumb img {
        transform: none;
        filter: none;
    }
}

@media (max-width: 991.98px) {
    .nwz-feature__link {
        min-height: clamp(220px, 52vw, 320px);
    }

    .nwz-item__link {
        gap: 0.85rem;
        flex-direction: column;
    }

    .nwz-item__thumb {
        flex: 0 1 min(340px, 100%);
        width: 100%;
        max-width: min(340px, 100%);
        min-width: 0;
        margin: 0 auto;
    }
}

@media (max-width: 575.98px) {
    .nwz-tabstrip {
        padding-inline-start: 5px;
    }

    .nwz-tab {
        flex: 1 1 0;
        text-align: center;
        border-radius: 0;
        padding: 1rem clamp(0.85rem, 4.2vw, 1.5rem) 2rem;
    }

    .nwz-tab:first-of-type:not(:last-of-type) {
        border-radius: 18px 0 0 0;
    }

    .nwz-tab:last-of-type:not(:first-of-type) {
        border-radius: 0 18px 0 0;
    }

    .nwz-tab:first-of-type:last-of-type {
        border-radius: 18px 18px 0 0;
    }

    .nwz-item__excerpt {
        -webkit-line-clamp: 5;
    }
}

/* ##################### PAGE #################### */
/* ===== Page inner Hero ===== */
.page-hero {
    background: linear-gradient(to right, #ffffff, #fef6fe);
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem 0;
}
.inner-page-main {
    background-color: #fff;
}
/* Breadcrumb */
.page-hero__breadcrumb {
    margin-bottom: 1.25rem;
    justify-content: flex-end;
    font-size: 0.9rem;
}
.page-hero__breadcrumb .breadcrumb-item a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}
.page-hero__breadcrumb .breadcrumb-item a:hover {
    color: #a41971;
    text-decoration: underline;
}
.page-hero__breadcrumb .breadcrumb-item.active {
    color: #a41971;
    font-weight: 600;
}
.page-hero__breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: #555;
}

/* Content */
.page-hero__content {
    text-align: left;
}
.page-hero__title {
    color: #000;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    border-left: 4px solid #a41971;
    padding-left: 1rem;
}
.page-hero__desc {
    color: #000;
    font-size: 1rem;
    margin-left: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .page-hero__breadcrumb {
        justify-content: flex-start;
    }
    .page-hero__title {
        font-size: 1.35rem;
        border-left-width: 3px;
        padding-left: 0.75rem;
    }
    .page-hero__desc {
        margin-left: 1rem;
        font-size: 0.9rem;
    }
}

.title-page {
    font-size: 1.5rem;
    font-weight: 600;
}
.meta_share {
    font-size: 0.9rem;
    color: #555;
}

.social-share {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease;
}

.social-share a:hover {
    transform: scale(1.08);
}

.social-share a:focus-visible {
    outline: 2px solid var(--msdhs-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .social-share a {
        transition: none;
    }

    .social-share a:hover {
        transform: none;
    }
}

/* pagination */ /* ============================================
   PAGINATION STYLE - กระทรวง พม. (โทนสี #a41971)
   ============================================ */

.inner-pagination {
    gap: 8px;
}

.inner-pagination .page-item {
    margin: 0;
}

.inner-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    color: #a41971;
    background-color: #fff;
    border: 1px solid #a41971;
    transition: all 0.2s ease;
}

/* ไอคอน bi */
.inner-pagination .page-link .bi {
    font-size: 1.2rem;
}

/* Hover */
.inner-pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    background-color: #a41971;
    border-color: #a41971;
    color: white;
}

/* Active (หน้าปัจจุบัน) */
.inner-pagination .page-item.active .page-link {
    background-color: #a41971;
    border-color: #a41971;
    color: white;
    font-weight: 600;
}

/* Disabled (ปุ่มก่อนหน้า/ถัดไป หรือ ...) */
.inner-pagination .page-item.disabled .page-link {
    background-color: #f5f5f5;
    border-color: #cccccc;
    color: #999999;
    cursor: not-allowed;
    opacity: 0.6;
}

/* จุด ... (ellipsis) */
.inner-pagination .page-item.disabled .page-link {
    width: auto;
    padding: 0 12px;
}

/* ปุ่ม Previous / Next */
.inner-pagination .page-item:first-child .page-link,
.inner-pagination .page-item:last-child .page-link {
    background-color: #fff;
    border-color: #a41971;
    color: #a41971;
}

.inner-pagination .page-item:first-child .page-link:hover,
.inner-pagination .page-item:last-child .page-link:hover {
    background-color: #a41971;
    border-color: #a41971;
    color: white;
}

/* responsive สำหรับมือถือ */
@media (max-width: 576px) {
    .inner-pagination {
        gap: 5px;
    }

    .inner-pagination .page-link {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
        border-radius: 4px;
    }

    .inner-pagination .page-link .bi {
        font-size: 1rem;
    }

    .inner-pagination .page-item.disabled .page-link {
        padding: 0 8px;
    }
}

/* focus ring สี #a41971 */
.inner-pagination .page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(164, 25, 113, 0.25);
    outline: none;
}

/* ##################### FOOTER #################### */
/* footer หน้าใน */
.footer-custom.footer--inner {
    padding-top: 100px !important;
}
.two-line {
    height: 4px;
    background: linear-gradient(
        to right,
        #df3987 0%,
        #df3987 28%,
        #3c2b95 28%,
        #3c2b95 100%
    );
}
.bg-copyright {
    background-color: #9e0566;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 400;
    margin-top: 0;
    margin-bottom: 0;
}
.bg-copyright nav a {
    color: #fff;
    text-decoration: none;
}
.bg-copyright a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-custom {
    background: linear-gradient(to bottom, #ffffff, #e4e4e4);
    font-size: 16px;
    margin-bottom: 0;
    padding-bottom: 0;
}

.footer-custom > .two-line ~ .container > .row > .d-flex.gap-3 {
    gap: 0.875rem !important;
}

@media (max-width: 575.98px) {
    .footer-custom > .two-line ~ .container > .row > .d-flex.gap-3 {
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left;
    }
}

@media (max-width: 767.98px) {
    .footer-custom form .input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .footer-custom .custom-input {
        width: 100%;
        flex: none;
        max-width: 100%;
        border-radius: 0;
    }
    .footer-custom .btn-pink {
        width: 100%;
        border-radius: 0;
        margin-left: 0 !important;
    }
}

@media (max-width: 991.98px) {
    .footer-custom .col-lg-5,
    .footer-custom .col-lg-2,
    .footer-custom .col-lg-3 {
        padding-bottom: 0.25rem;
    }
}

.footer-custom h5,
.footer-custom h6 {
    color: #000;
}

.contact-list li {
    margin-bottom: 8px;
    color: #000;
}
.contact-list i {
    color: #dc0a70;
    margin-right: 10px;
}
.footer-links li {
    margin-bottom: 6px;
    font-size: 0.95rem;
    line-height: 1.2rem;
}
.footer-links a {
    text-decoration: none;
    color: #000;
    transition: 0.3s;
}

/* เมนูย่อยใน footer — จุดวงกลมขอบดำกลางโปร่ง (::marker + list-style circle) */
.footer-custom .footer-links li > ul {
    list-style: circle;
    list-style-position: outside;
    padding-left: 2rem !important;
    margin-top: 0.35rem;
    margin-bottom: 0.5rem !important;
}

.footer-custom .footer-links li > ul li {
    margin-bottom: 4px;
}

.footer-custom .footer-links li > ul li::marker {
    color: #000;
    font-size: 1em;
}

.footer-links a:hover {
    color: #d63384;
    padding-left: 4px;
}
.custom-input {
    border: 2px solid #dc0a70;
    border-radius: 0px;
    padding: 10px;
}
.btn-pink {
    background: #dc0a70;
    color: #fff;
    border: none;
    border-radius: 0px;
}
.btn-pink:hover {
    background: #b02a6f;
}

/* Social icon */
.social-icon a {
    display: inline-block;
}

.social-icon a img {
    transition:
        filter 0.3s ease,
        transform 0.3s ease;
    filter: drop-shadow(4px 0 6px rgba(0, 0, 0, 0.1));
}

.social-icon a:hover img {
    transform: scale(1.1);
}

/* ===== ตารางเอกสาร  ===== */
.inner-doc-table-wrap {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(31, 41, 55, 0.08);
}
.inner-doc-table thead th {
    background-color: #f8f9fa;
    color: #000;
    font-weight: 600;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #dee2e6;
}
.inner-doc-table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}
.inner-doc-table tbody tr:last-child td {
    border-bottom: none;
}
.inner-doc-pdf-icon {
    width: 32px;
    height: 32px;
}
/* ไอคอนแสดงชนิดไฟล์ (PDF / Word / Excel / รูปภาพ / ไฟล์บีบอัด ฯลฯ) */
.file-type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
i.inner-doc-pdf-icon.file-type-icon {
    width: auto;
    height: auto;
}
.inner-doc-title {
    color: #000;
    font-weight: 500;
}
.inner-doc-title:hover {
    color: #a41971;
}
.inner-doc-download {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #faf7f9;
    opacity: 0.9;
    transition:
        opacity 0.2s,
        transform 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.inner-doc-download img {
    display: block;
    width: 28px;
    height: 28px;
}
.inner-doc-download:hover {
    opacity: 1;
    background-color: #f3eef1 !important;
}

/* faq */
.msp-faq-scope {
    --msp-faq-fg: #1e293b;
    --msp-faq-bg: #ffffff;
    --msp-faq-border: rgba(172, 9, 88, 0.14);
    --msp-faq-primary: #6d153d;
    --msp-faq-soft: #fef6fa;
    --msp-faq-soft-2: #fcecf4;
    --msp-faq-accent-icon: #ac0958;
    --msp-faq-filter-active-bg: #fce8f3;
    --msp-faq-filter-active-fg: #4a0e26;
    --msp-faq-filter-active-border: #c97aa0;
    --msp-faq-focus: #0f4c75;
}

.msp-faq-scope .msp-faq-category-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    margin-bottom: 2.25rem;
}

.msp-faq-scope .msp-faq-filter-btn {
    display: inline-flex;
    align-items: center;
    background: var(--msp-faq-bg);
    border: 2px solid var(--msp-faq-border);
    padding: 0.55rem 1.15rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.35;
    color: #000;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
    box-shadow: 0 1px 4px rgba(172, 9, 88, 0.06);
}

.msp-faq-scope .msp-faq-filter-btn i {
    margin-right: 0.4rem;
    font-size: 1.1rem;
    color: var(--msp-faq-accent-icon);
}

.msp-faq-scope .msp-faq-filter-btn:hover:not(.active) {
    background: var(--msp-faq-soft);
    border-color: var(--msp-faq-primary);
    color: #000;
}

.msp-faq-scope .msp-faq-filter-btn.active {
    background: var(--msp-faq-filter-active-bg);
    border-color: var(--msp-faq-filter-active-border);
    color: var(--msp-faq-filter-active-fg);
    box-shadow: 0 4px 16px rgba(172, 9, 88, 0.12);
}

.msp-faq-scope .msp-faq-filter-btn.active i {
    color: var(--msp-faq-filter-active-fg);
}

.msp-faq-scope .msp-faq-filter-btn:focus-visible {
    outline: 3px solid var(--msp-faq-focus);
    outline-offset: 3px;
}

.msp-faq-scope .msp-faq-accordion {
    max-width: 980px;
    margin: 0 auto 3rem;
}

.msp-faq-scope .msp-faq-accordion .accordion-item {
    background: var(--msp-faq-bg);
    border: 1px solid var(--msp-faq-border);
    border-radius: 1rem !important;
    margin-bottom: 0.85rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(172, 9, 88, 0.05);
    transition:
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.msp-faq-scope .msp-faq-accordion .accordion-item:hover {
    box-shadow: 0 8px 22px rgba(172, 9, 88, 0.09);
    border-color: rgba(172, 9, 88, 0.22);
}

.msp-faq-scope .msp-faq-accordion .accordion-header {
    background: var(--msp-faq-bg);
}

.msp-faq-scope .msp-faq-accordion .accordion-button {
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.45;
    padding: 1.1rem 1.25rem;
    background-color: var(--msp-faq-bg);
    border: none;
    color: #000;
    border-radius: 1rem !important;
    box-shadow: none;
}

.msp-faq-scope .msp-faq-accordion .accordion-button:not(.collapsed) {
    background: var(--msp-faq-soft);
    color: var(--msp-faq-fg);
    box-shadow: none;
}

.msp-faq-scope .msp-faq-accordion .accordion-button:focus-visible {
    outline: 3px solid var(--msp-faq-focus);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(15, 76, 117, 0.18);
}

.msp-faq-scope .msp-faq-accordion .accordion-button i.bi-question-circle-fill {
    color: var(--msp-faq-accent-icon);
    margin-right: 0.65rem;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.msp-faq-scope .msp-faq-accordion .accordion-body {
    padding: 1.25rem 1.35rem 1.5rem;
    background: var(--msp-faq-bg);
    color: #000;
    font-size: 1rem;
    line-height: 1.65;
    border-top: 1px solid var(--msp-faq-border);
}

.msp-faq-scope .msp-faq-accordion .msp-faq-emphasis {
    color: var(--msp-faq-primary);
    font-weight: 600;
}

.msp-faq-scope .msp-faq-accordion .msp-faq-inline-note {
    display: inline-flex;
    align-items: baseline;
    gap: 0.25rem;
    color: #333;
    font-weight: 600;
}

.msp-faq-scope .msp-faq-cat-badge {
    display: inline-block;
    background: var(--msp-faq-soft-2);
    color: var(--msp-faq-primary);
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    margin-left: 0.5rem;
    border: 1px solid var(--msp-faq-border);
    vertical-align: middle;
    white-space: nowrap;
}

/* sitemap.php — แผนผังเว็บไซต์ (ห่อด้วย .sitemap-page เพื่อไม่ชนกับ .collapse ที่อื่น) */
.sitemap-page .sitemap-tree {
    list-style: none;
    padding-left: 0;
}

.sitemap-page .sitemap-tree ul {
    list-style: none;
    padding-left: 5rem;
    margin-top: 0.25rem;
    margin-left: 1.5rem;
    border-left: 2px solid rgba(172, 9, 88, 0.15);
}

.sitemap-page .sitemap-tree ul > li {
    position: relative;
    padding-left: 8px;
}

.sitemap-page .sitemap-tree ul > li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    top: 3px;
    color: #ac0958;
    font-size: 1.5rem;
}

.sitemap-page .sitemap-item {
    margin-bottom: 0.25rem;
}

.sitemap-page .sitemap-item-header {
    padding: 0.5rem 0.75rem;
    border-radius: var(16px, 12px);
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.sitemap-page .sitemap-item-header:hover,
.sitemap-page .sitemap-item-header:focus-visible {
    background-color: #fdf2f8;
    color: #ac0958;
    outline: none;
}

.sitemap-page .toggle-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    color: #ac0958;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.sitemap-page .toggle-icon i {
    transition: transform 0.2s ease;
}

.sitemap-page a.sitemap-item-header.collapsed .toggle-icon i {
    transform: rotate(-90deg);
}

.sitemap-page .item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fdf2f8;
    border-radius: 8px;
    margin-right: 1rem;
    color: #ac0958;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.sitemap-page .item-content {
    flex-grow: 1;
    min-width: 0;
}

.sitemap-page .item-title {
    font-size: 1rem;
    font-weight: 500;
}

.sitemap-page .item-link {
    font-size: 0.85rem;
    color: #555;
    margin-top: 0.1rem;
    word-break: break-all;
}

.sitemap-page .sitemap-tree .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
    margin-left: 0.5rem;
}

.sitemap-page .sitemap-tree .badge-count {
    background-color: #ac0958;
    color: #fff;
}

@media (max-width: 768px) {
    .sitemap-page .sitemap-tree ul {
        padding-left: 1rem;
    }

    .sitemap-page .item-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* ====== social_data_center ศูนย์ข้อมูลทางสังคม ====== */
:root {
    --pink-50: #fdf2f5;
    --pink-100: #fce4ec;
    --pink-200: #f8bbd0;
    --pink-300: #f48fb1;
    --pink-400: #f06292;
    --pink-500: #e91e63;
    --pink-600: #d81b60;
    --pink-700: #c2185b;
    --pink-800: #ad1457;
    --pink-900: #880e4f;

    --primary-dark: #000;
    --primary-navy: #1a252f;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-400: #bdbdbd;
    --gray-500: #9e9e9e;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;

    /* พื้นหลังและการ์ด */
    --bg-body: #f8f9fa;
    --card-bg: #ffffff;
    --border-light: #e9ecef;

    /* ข้อความ */
    --text-primary: #212121;
    --text-secondary: #5c6bc0;
    --text-muted: #757575;
    --text-on-dark: #ffffff;
    --focus-ring: #ad1457;
}

.sdc-stat-card {
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 1.2rem 0.6rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    height: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.sdc-stat-card:hover {
    border-color: var(--pink-300);
    box-shadow: 0 12px 24px -12px rgba(136, 14, 79, 0.15);
}

.sdc-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--pink-700);
    transition: all 0.2s;
}

.sdc-stat-icon img {
    width: auto;
    height: 56px;
}

.sdc-stat-icon i {
    font-size: 1.8rem;
}

.sdc-stat-label {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.sdc-glass-card {
    border: 1px solid var(--border-light);
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: all 0.3s;
    height: 100%;
}

.sdc-glass-card:hover {
    box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.1);
}

.sdc-section-header {
    border-bottom: 2px solid var(--pink-100);
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
}

.sdc-section-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sdc-section-header h3 i {
    color: var(--pink-600);
}

/* รายการเครือข่าย */
.sdc-network-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sdc-network-item {
    background: var(--gray-50);
    border-radius: 16px;
    padding: 0.5rem 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sdc-network-item:hover {
    background: var(--pink-50);
    border-color: var(--pink-200);
    transform: translateX(4px);
}

.sdc-network-icon {
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--pink-700);
    border: 1px solid var(--gray-200);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    flex-shrink: 0;
}

.sdc-network-item strong {
    font-size: 18px;
    color: var(--primary-dark);
    font-weight: 700;
}

.sdc-network-item p {
    margin: 0;
    font-size: 1rem;
    color: var(--gray-900);
}

/* ป้ายกำกับ (tag) */
.sdc-tag-item {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 40px;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    font-weight: 500;
    color: #000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    text-decoration: none;
}

.sdc-tag-item i {
    font-size: 0.9rem;
    color: var(--pink-500);
}

.sdc-tag-item:hover {
    background: var(--pink-50);
    border-color: var(--pink-200);
    color: var(--pink-800);
    text-decoration: none;
}

/* การ์ดรายงานประจำปี */
.sdc-annual-card {
    background: linear-gradient(115deg, var(--pink-50) 0%, #fce4ec 100%);
    border-radius: 20px;
    padding: 1rem 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--pink-100);
}

.sdc-annual-card:hover {
    background: linear-gradient(115deg, #fce4ec, #f8bbd0);
    border-color: var(--pink-200);
}

/* เส้นคั่น */
.sdc-divider {
    background: var(--gray-300);
    height: 1px;
    opacity: 0.6;
    margin: 1.2rem 0;
}

/* ====== หน้าติดต่อ ====== */

/* การ์ดข้อมูลติดต่อ */
.contact-info-card {
    border-radius: 24px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}
.contact-info-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}
.contact-item {
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--gray-200);
    transition: all 0.2s;
}
.contact-icon {
    width: 40px;
    height: 40px;
    background: var(--pink-50);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.contact-icon .bi,
.contact-header .bi,
.map-header .bi,
.form-card .bi {
    color: #dc0970;
}

/* การ์ดแผนที่ */
.map-card {
    border-radius: 24px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}
.map-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}
.map-container {
    border-radius: 16px;
    overflow: hidden;
}
.map-container iframe {
    width: 100%;
    height: 400px;
    display: block;
}

/* ช่องทางโซเชียล */
.social-icon2 {
    width: 44px;
    height: 44px;
    background: var(--gray-100);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-700);
    transition: all 0.3s ease;
    text-decoration: none;
}
.social-icon2:hover {
    background: #dc0970;
    color: #ffffff;
}

/* แบบฟอร์มติดต่อ */
.form-card {
    border-radius: 28px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}
.btn-pink {
    background: #a41971;
    color: #ffffff;
    border: none;
    transition: all 0.3s ease;
}
.btn-pink:hover {
    background: #a41971;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(216, 27, 96, 0.3);
}
.btn-outline-pink {
    border: 2px solid #a41971;
    color: #a41971;
    background: transparent;
    transition: all 0.3s ease;
}
.btn-outline-pink:hover {
    background: #a41971;
    color: #ffffff;
    transform: translateY(-2px);
}
.form-control:focus {
    border-color: #a41971;
    box-shadow: 0 0 0 0.2rem rgba(216, 27, 96, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .office-hours-card {
        padding: 1rem;
    }
    .hours-icon {
        width: 44px;
        height: 44px;
    }
    .map-container iframe {
        height: 280px;
    }
}

/* About */
.text-gray {
    color: #555;
}
.bg-pink {
    background-color: #a41971;
}
.about-timeline .timeline-year .badge {
    min-width: 120px;
}
.about-timeline .timeline-content {
    flex: 1;
}
@media (max-width: 768px) {
    .timeline-item {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    .timeline-year .badge {
        min-width: auto !important;
    }
    .about-timeline,
    .timeline-list {
        overflow-x: hidden !important;
    }
}

/* Personnel Tabs */

/* Tabs */
.personnel-tabs {
    border-bottom: 1px solid #e9ecef;
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
}

.personnel-tabs .nav-link {
    font-size: 1.2rem;
    color: #000;
    font-weight: 500;
    padding: 0.75rem 2rem;
    border: none;
    background: transparent;
    position: relative;
}

.personnel-tabs .nav-link::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #a41971;
    transition: width 0.2s;
}
.personnel-tabs .nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 1px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #a41971;
}
.personnel-tabs .nav-link.active {
    color: #a41971;
    background: transparent;
}
.personnel-tabs .nav-link.active::after {
    width: 70%;
}
.personnel-tabs .nav-link:hover {
    color: #a41971;
}

/* Content */
.personnel-content {
    padding: 1rem 0;
}

/* Card */
.personnel-card {
    display: block;
    border-radius: 20px;
    padding: 1rem;
    text-align: center;
    height: 100%;
    text-decoration: none;
    transition:
        transform 0.25s cubic-bezier(0.2, 0, 0, 1),
        box-shadow 0.25s cubic-bezier(0.2, 0, 0, 1);
}
.personnel-card:hover {
    transform: scale(1.01);
}
.personnel-img {
    transition:
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.personnel-card:hover .personnel-img {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* รูป */
.personnel-img {
    width: 215px;
    height: 250px;
    object-fit: cover;
    border-radius: 16px;
    margin: 0 auto 1.25rem;
    display: block;
    border: 1px solid #d8d8de;
    background: #f1f1f1;
}
.personnel-img--default {
    object-fit: contain;
    padding: 25px;
    border: 1px solid #d8d8de;
    background: #f1f1f1;
}

/* ข้อความ */
.personnel-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.35rem;
}
.personnel-position {
    font-size: 1.1rem;
    color: #a41971;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.personnel-role {
    font-size: 1rem;
    color: #000;
    margin-bottom: 0;
}
.personnel-contact {
    font-size: 0.9rem;
    color: #000;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}
.personnel-contact i {
    color: #a41971;
    margin-right: 0.35rem;
}

/* Empty */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
}
.empty-state i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
    display: inline-block;
}
.empty-state h5 {
    font-size: 1.1rem;
    font-weight: 500;
    color: #000;
    margin-bottom: 0.25rem;
}
.empty-state p {
    font-size: 1rem;
    color: #000;
}

/* Responsive  */
.personnel-tabs {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.5rem;
    overflow-x: visible !important;
}
.personnel-tabs .nav-item {
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    .personnel-tabs {
        gap: 0.4rem;
    }
    .personnel-tabs .nav-link {
        padding: 0.5rem 1rem;
        font-size: 1.1rem;
    }
    .personnel-name {
        font-size: 1.1rem;
    }
    .personnel-card {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .personnel-tabs {
        gap: 0.3rem;
    }
    .personnel-tabs .nav-link {
        padding: 0.4rem 0.7rem;
        font-size: 1.1rem;
    }
}
