:root {
    --blue: #1B5EA4;
    --blue-dark: #123F73;
    --orange: #E88832;
    --ink: #333333;
    --muted: #66727E;
    --line: #E9E4E4;
    --bar-h: 51px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 64px;
}

body {
    margin: 0;
    padding-top: var(--bar-h);
    font-family: 'Noto Sans Thai', Tahoma, system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink);
    background: #fff;
}

img,
svg {
    max-width: 100%;
}

a {
    color: inherit;
}

.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 10px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip {
    position: absolute;
    left: 8px;
    top: -60px;
    z-index: 100;
    padding: 8px 14px;
    background: #fff;
    color: var(--blue);
    font-weight: 700;
    border-radius: 0 0 6px 6px;
}

.skip:focus {
    top: 0;
}

:focus-visible {
    outline: 3px solid #F6B02A;
    outline-offset: 2px;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 60;
    height: var(--bar-h);
    background: linear-gradient(90deg, #25609D, #155EA8);
    color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}

.site-header .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 100%;
    color: #fff;
    text-decoration: none;
}

.brand img {
    display: block;
    height: 50px;
    width: auto;
}

.brand .mark {
    width: 24px;
    height: 24px;
    flex: none;
}

.wordmark {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.wordmark small {
    font-size: 11px;
    opacity: .92;
}

.wordmark strong {
    font-size: 17px;
    font-weight: 700;
}

.nav-list {
    display: flex;
    height: var(--bar-h);
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-list>li {
    position: relative;
    display: flex;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 17px;
    font: inherit;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
    white-space: nowrap;
}

.nav-link:hover,
.has-sub.open>.nav-link {
    background: rgba(255, 255, 255, .13);
}

.nav-link[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 17px;
    right: 17px;
    bottom: 5px;
    height: 2px;
    background: #fff;
}

.chev {
    width: 6px;
    height: 6px;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s;
}

.has-sub.open>.nav-link .chev {
    transform: rotate(225deg) translate(-1px, -1px);
}

.sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #fff;
    color: var(--ink);
    border-top: 3px solid var(--orange);
    box-shadow: 0 10px 26px rgba(10, 40, 80, .24);
}

.has-sub:nth-last-child(-n+2)>.sub {
    left: auto;
    right: 0;
}

.has-sub.open>.sub {
    display: block;
}

.sub a {
    display: block;
    padding: 9px 18px;
    font-size: 14.5px;
    color: var(--ink);
    text-decoration: none;
}

.sub a:hover,
.sub a:focus-visible {
    background: #EEF4FA;
    color: var(--blue);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    margin-right: -8px;
    padding: 0;
    background: none;
    border: 0;
    color: #fff;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: currentColor;
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 991.98px) {
    .menu-toggle {
        display: block;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: var(--bar-h);
        left: 0;
        right: 0;
        max-height: calc(100vh - var(--bar-h));
        overflow: auto;
        background: var(--blue-dark);
        box-shadow: 0 10px 20px rgba(0, 0, 0, .25);
    }

    .site-nav.open {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        height: auto;
    }

    .nav-list>li {
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, .12);
    }

    .nav-link {
        width: 100%;
        justify-content: space-between;
        min-height: 48px;
        padding: 0 20px;
    }

    .nav-link[aria-current="page"]::after {
        left: 20px;
        right: auto;
        width: 28px;
        bottom: 9px;
    }

    .sub {
        position: static;
        min-width: 0;
        border-top: 0;
        box-shadow: none;
        background: rgba(0, 0, 0, .18);
        padding: 2px 0 8px;
    }

    .sub a {
        padding: 10px 20px 10px 36px;
        color: #fff;
    }

    .sub a:hover,
    .sub a:focus-visible {
        background: rgba(255, 255, 255, .12);
        color: #fff;
    }
}

.hero {
    position: relative;
    height: clamp(300px, 46vw, 440px);
    overflow: hidden;
    background: #0E2A47;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .9s ease, visibility .9s;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slide::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(6, 24, 48, .66) 0%, rgba(6, 24, 48, .3) 55%, rgba(6, 24, 48, 0) 100%);
}

.slide .art,
.slide .photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
}

.slide .photo {
    object-fit: cover;
}

.slide-inner {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    padding-bottom: 28px;
}

.slide-title {
    margin: 0;
    font-family: 'Noto Sans Thai', Tahoma, system-ui, sans-serif;
    font-weight: 600;
    font-size: clamp(26px, 4.2vw, 64px);
    line-height: 1.22;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}

.slide-title em {
    font-style: normal;
    font-weight: 700;
    color: #F6B02A;
    background: linear-gradient(180deg, #FFE680 0%, #F6B02A 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5));
}

.slide-title .l2 {
    display: block;
    margin-left: clamp(0px, 9vw, 200px);
}

.slide-sub {
    margin: .5em 0 0;
    font-size: clamp(15px, 1.7vw, 24px);
    color: #fff;
    text-shadow: 0 1px 5px rgba(0, 0, 0, .6);
    max-width: 36em;
}

.hero-ctrl {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 30px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.dot {
    width: 15px;
    height: 15px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.dot:hover {
    transform: scale(1.15);
}

.dot[aria-current="true"] {
    background: var(--orange);
}

.pp {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    margin-left: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .38);
    color: #fff;
    cursor: pointer;
}

.pp:hover {
    background: rgba(0, 0, 0, .55);
}

.pp svg {
    width: 12px;
    height: 12px;
}

.pp .i-play {
    display: none;
}

.pp[aria-pressed="true"] .i-play {
    display: block;
}

.pp[aria-pressed="true"] .i-pause {
    display: none;
}

.crumb {
    border-bottom: 1px solid var(--line);
}

.crumb ol {
    margin: 0;
    padding: 6px 0 9px;
    list-style: none;
    font: 12px/1.4 Arial, Helvetica, sans-serif;
    color: var(--ink);
}

.cards {
    padding-top: 40px;
    padding-bottom: 60px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 17px;
}

@media (max-width: 899.98px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #EDEDED;
    box-shadow: 0 1px 7px rgba(0, 0, 0, .12);
    transition: box-shadow .25s, transform .25s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(10, 40, 80, .18);
}

.card-media {
    position: relative;
    aspect-ratio: 416 / 174;
    overflow: hidden;
    background: #DDE6EF;
}

.card-media .art,
.card-media .photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
}

.card-media .photo {
    object-fit: cover;
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 12px 16px 22px;
}

.card h2 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--ink);
}

.card p {
    margin: 0 0 14px;
    font-size: 14.5px;
    line-height: 1.85;
    text-align: justify;
    text-indent: 2.2em;
    color: var(--ink);
}

.more {
    align-self: flex-start;
    margin-top: auto;
    font-weight: 700;
    font-size: 14px;
    color: var(--blue);
    text-decoration: none;
}

.more::after {
    content: " \2192";
    display: inline-block;
    transition: transform .2s;
}

.more:hover {
    text-decoration: underline;
}

.more:hover::after {
    transform: translateX(3px);
}

.site-footer {
    background: var(--blue-dark);
    color: #E7EEF7;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
    padding-top: 36px;
    padding-bottom: 28px;
}

.site-footer h2 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li {
    margin: 4px 0;
}

.site-footer a {
    color: #E7EEF7;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.site-footer dl {
    margin: 0;
}

.site-footer dt {
    font-weight: 700;
    color: #fff;
}

.site-footer dd {
    margin: 0 0 8px;
}

.footer-brand strong {
    display: block;
    margin-bottom: 4px;
    font-size: 18px;
    color: #fff;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, .16);
    padding: 12px 0 16px;
    font-size: 13px;
    color: #BFD0E4;
}

@media (max-width: 767.98px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

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

    .slide,
    .card,
    .dot,
    .more::after {
        transition: none;
    }

    .card:hover {
        transform: none;
    }
}

#slides {
    position: relative;
    width: 100%;
    height: 440px;
    /* Adjust slide height as needed */
    overflow: hidden;
}

#slides .slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out;
}

#slides .slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

#slides .slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* แทน inline style เดิมของ SVG sprite (เพื่อให้ CSP ไม่ต้องใช้ 'unsafe-inline') */
.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}
