:root {
    --mst-navy: #15395f;
    --mst-navy-deep: #0f2744;
    --mst-ink: #22364a;
    --mst-muted: #667a8f;
    --mst-gold: #f3b51b;
    --mst-gold-deep: #d99a09;
    --mst-sky: #eaf4ff;
    --mst-mint: #dff7f4;
    --mst-card: #ffffff;
    --mst-border: #dce6f2;
    --mst-bg: #f7fbff;
}

body.site-body {
    margin: 0;
    font-family: "Mulish", "Sarabun", sans-serif;
    color: var(--mst-ink);
    background: var(--mst-bg);
}

a {
    color: #1e5a8e;
    text-decoration: none;
}

a:hover {
    color: #143d61;
}

.utility-bar {
    background: var(--mst-navy-deep);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.85rem;
    padding: 0.55rem 0;
}

.utility-meta {
    display: inline-flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.main-nav-wrap {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(21, 57, 95, 0.08);
    box-shadow: 0 14px 36px rgba(15, 39, 68, 0.08);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.main-nav {
    min-height: 88px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--mst-ink);
}

.brand-mark strong,
.brand-mark small {
    display: block;
}

.brand-mark small {
    color: var(--mst-muted);
}

.brand-badge {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--mst-gold), #ffd86d);
    color: var(--mst-navy-deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    box-shadow: 0 16px 30px rgba(243, 181, 27, 0.22);
}

.brand-logo {
    width: auto;
    height: 56px;
    display: block;
}

.nav-link {
    font-weight: 700;
    color: var(--mst-ink) !important;
}

.nav-link.active,
.nav-link:hover {
    color: var(--mst-navy) !important;
}

.nav-cta {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.btn-cta-primary,
.btn-cta-secondary,
.btn-ghost-light {
    border-radius: 999px;
    font-weight: 700;
    padding: 0.8rem 1.35rem;
    border: 0;
}

.btn-cta-primary {
    background: linear-gradient(135deg, var(--mst-gold), #ffd258);
    color: var(--mst-navy-deep);
}

.btn-cta-primary:hover {
    color: var(--mst-navy-deep);
    background: linear-gradient(135deg, #f7c94d, #ffe182);
}

.btn-cta-secondary {
    background: rgba(21, 57, 95, 0.08);
    color: var(--mst-navy);
}

.btn-ghost-light {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.hero-section {
    position: relative;
    overflow: hidden;
    padding: 4rem 0 5rem;
    background:
        radial-gradient(circle at top right, rgba(243, 181, 27, 0.12), transparent 22%),
        linear-gradient(135deg, rgba(15, 39, 68, 0.96), rgba(21, 57, 95, 0.95));
    color: #fff;
}

.home-popup-modal .modal-content {
    border: 0;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(15, 39, 68, 0.24);
}

.home-popup-modal .modal-header {
    padding: 1.35rem 1.5rem;
    background: linear-gradient(135deg, var(--mst-navy-deep), var(--mst-navy));
    color: #fff;
    border-bottom: 0;
}

.home-popup-modal .modal-title {
    font-family: "Playfair Display", "Sarabun", serif;
    font-size: 1.75rem;
    margin: 0;
}

.home-popup-modal .btn-close {
    filter: invert(1) grayscale(100%);
    opacity: 0.92;
}

.home-popup-modal .modal-body {
    padding: 1.6rem 1.6rem 1.8rem;
    color: var(--mst-ink);
    font-size: 1rem;
    line-height: 1.75;
}

.home-popup-modal .modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 18px;
}

.home-popup-modal .modal-body p:last-child {
    margin-bottom: 0;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../../../images/bg-top.jpg") center center / cover no-repeat;
    opacity: 0.25;
    pointer-events: none;
}

.hero-section > .container {
    position: relative;
    z-index: 1;
}

.hero-copy h1,
.page-header-block h1,
.section-heading h2,
.cta-panel h2 {
    font-family: "Playfair Display", "Sarabun", serif;
    font-weight: 100%;
}

.hero-copy h1 {
    font-size: clamp(2.4rem, 5vw, 4.1rem);
    line-height: 1.06;
}

.hero-kicker,
.section-kicker {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--mst-gold);
}

.hero-copy p {
    margin: 1.35rem 0 1.75rem;
    color: rgba(255, 255, 255, 0.82);
    max-width: 38rem;
}

.hero-actions,
.cta-actions,
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.hero-stats {
    margin-top: 2rem;
}

.hero-stats div {
    min-width: 140px;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.hero-stats strong {
    display: block;
    font-size: 1.8rem;
}

.hero-stats span {
    color: rgba(255, 255, 255, 0.72);
}

.hero-media-card,
.content-card,
.auth-card,
.feature-card,
.list-panel,
.resource-card,
.side-spotlight,
.team-card,
.story-tile,
.link-card,
.cta-panel,
.empty-state-card {
    background: var(--mst-card);
    border-radius: 28px;
    border: 1px solid var(--mst-border);
    box-shadow: 0 24px 52px rgba(15, 39, 68, 0.10);
}

.hero-media-card {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.hero-slide-image {
    aspect-ratio: 1.1 / 0.82;
    object-fit: cover;
    border-radius: 22px;
}

.hero-note {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--mst-ink);
    border-radius: 20px;
}

.section-block,
.page-shell {
    padding: 4.75rem 0;
}

.section-soft {
    background: linear-gradient(180deg, rgba(234, 244, 255, 0.78), rgba(247, 251, 255, 1));
}

.news-activity-section {
    position: relative;
    overflow: hidden;
}

.news-activity-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../../../images/bg-committee.jpg");
    background-position: center;
    background-size: cover;
    opacity: 0.6;
    pointer-events: none;
}

.news-activity-section > .container {
    position: relative;
    z-index: 1;
}

.resource-directory-section {
    position: relative;
    overflow: hidden;
}

.resource-directory-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../../../images/bg-coms.jpg");
    background-position: center;
    background-size: cover;
    opacity: 0.05;
    pointer-events: none;
}

.resource-directory-section > .container {
    position: relative;
    z-index: 1;
}

.section-heading {
    max-width: 48rem;
    margin: 0 auto 2.4rem;
}

.section-heading p,
.page-header-block span.story-date {
    color: var(--mst-muted);
}

.feature-card,
.story-tile,
.team-card,
.link-card,
.content-card,
.auth-card {
    padding: 1.45rem;
}

.feature-card {
    height: 100%;
}

.story-tile {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.team-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.feature-card h3,
.list-panel h3,
.side-spotlight h3 {
    font-size: 1.15rem;
    margin-bottom: 0.7rem;
}

.feature-card-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.feature-stat {
    display: inline-block;
    margin-bottom: 0.85rem;
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1;
    color: var(--mst-navy);
}

.feature-stat-link {
    color: inherit;
}

.feature-stat-link:hover {
    color: inherit;
}

.feature-link {
    display: inline-flex;
    align-items: center;
    margin-top: 0.45rem;
    font-weight: 700;
    color: var(--mst-navy);
}

.feature-link:hover {
    color: var(--mst-navy-deep);
}

.feature-card-btn {
    margin-top: auto;
}

.list-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.story-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    padding: 0.85rem;
    border-radius: 20px;
    background: var(--mst-bg);
    margin-bottom: 0.85rem;
}

.story-card img,
.story-tile img,
.team-card img,
.resource-card img,
.link-card img,
.detail-hero-image,
.gallery-grid img {
    width: 100%;
    border-radius: 18px;
    object-fit: cover;
}

.story-card img {
    aspect-ratio: 1 / 0.8;
}

.story-date {
    display: inline-block;
    margin-bottom: 0.45rem;
    font-size: 0.88rem;
    color: var(--mst-muted);
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.resource-card {
    display: block;
    padding: 1rem;
    color: var(--mst-ink);
}

.resource-card img {
    aspect-ratio: 1.15 / 0.75;
    margin-bottom: 0.9rem;
}

.resource-card strong,
.resource-card span {
    display: block;
}

.resource-card span {
    color: var(--mst-muted);
    margin-top: 0.2rem;
}

.spotlight-list {
    margin: 0;
    padding-left: 1.1rem;
}

.spotlight-list li + li {
    margin-top: 0.7rem;
}

.team-card img {
    aspect-ratio: 0.95 / 1;
}

.team-card-body {
    padding-top: 1rem;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.team-card-body span {
    color: #836422;
    font-weight: 700;
    display: block;
}

.team-card-body h3 {
    font-size: 1rem;
    line-height: 1.35;
}

.team-card-body p {
    color: var(--mst-muted);
    margin-bottom: 0;
}

.page-header-block {
    margin-bottom: 2rem;
}

.rich-content {
    line-height: 1.75;
}

.rich-content img {
    max-width: 100%;
    height: auto;
}

.rich-content table {
    width: 100%;
    margin-bottom: 1rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.gallery-grid img {
    aspect-ratio: 1 / 0.82;
}

.story-tile img {
    aspect-ratio: 1.15 / 0.8;
    margin-bottom: 1rem;
}

.story-tile-body span {
    color: var(--mst-muted);
    font-size: 0.88rem;
}

.story-tile-body {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.story-tile-body h2 {
    font-size: 1.1rem;
    line-height: 1.4;
}

.link-card {
    display: grid;
    grid-template-columns: 56px 150px 1fr;
    gap: 1rem;
    align-items: center;
}

.link-card-index {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: var(--mst-sky);
    color: var(--mst-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.link-card img {
    aspect-ratio: 1 / 0.72;
}

.auth-shell .container,
.page-shell .container {
    max-width: 1180px;
}

.auth-card {
    max-width: 560px;
    margin: 0 auto;
    padding: 2rem;
}

.form-card {
    padding: 1.8rem;
}

.register-wizard-shell {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    border-radius: 34px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(21, 57, 95, 0.09);
    box-shadow: 0 28px 60px rgba(15, 39, 68, 0.10);
}

.register-wizard-side {
    padding: 2.5rem 2rem;
    background: linear-gradient(180deg, #eef9f7 0%, #f8fcfc 100%);
    border-right: 1px solid rgba(21, 57, 95, 0.08);
}

.register-wizard-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 2rem;
    color: var(--mst-navy);
    font-weight: 700;
}

.register-wizard-brand-logo {
    width: auto;
    height: 48px;
    display: block;
}

.register-wizard-side h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--mst-ink);
}

.register-step-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.register-step-list li {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 74px;
    color: rgba(44, 63, 86, 0.55);
    font-weight: 700;
}

.register-step-list li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 21px;
    top: 48px;
    width: 2px;
    height: 42px;
    background: rgba(96, 149, 149, 0.24);
}

.register-step-index {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(21, 57, 95, 0.08);
    color: rgba(44, 63, 86, 0.72);
    flex-shrink: 0;
}

.register-step-label {
    font-size: 1.05rem;
}

.register-step-list li.is-active,
.register-step-list li.is-complete {
    color: var(--mst-ink);
}

.register-step-list li.is-active .register-step-index,
.register-step-list li.is-complete .register-step-index {
    background: linear-gradient(135deg, #67c4b7, #4ea79d);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 16px 28px rgba(78, 167, 157, 0.24);
}

.register-wizard-main {
    padding: 2.3rem 2.4rem;
    background: #ffffff;
}

.register-wizard-form {
    min-height: 100%;
}

.wizard-step-panel {
    display: none;
}

.wizard-step-panel.is-active {
    display: block;
}

.wizard-step-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid rgba(21, 57, 95, 0.08);
}

.wizard-step-kicker {
    display: inline-block;
    margin-bottom: 0.35rem;
    color: #5aa59a;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.wizard-step-header h3 {
    margin-bottom: 0.35rem;
    font-size: 1.8rem;
    color: var(--mst-ink);
}

.wizard-step-header p {
    margin-bottom: 0;
    color: var(--mst-muted);
}

.wizard-step-panel .form-label {
    font-weight: 700;
    color: var(--mst-navy);
}

.wizard-step-panel .form-control,
.wizard-step-panel .form-select {
    min-height: 56px;
    border-radius: 18px;
    border: 1px solid rgba(21, 57, 95, 0.12);
    padding: 0.9rem 1rem;
}

.wizard-step-panel textarea.form-control {
    min-height: 120px;
}

.wizard-step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.35rem;
    border-top: 1px solid rgba(21, 57, 95, 0.08);
}

.wizard-submit-note {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(234, 244, 255, 0.65);
    border: 1px solid var(--mst-border);
    color: var(--mst-ink);
}

.consent-panel {
    padding: 1.4rem 1.5rem;
    border-radius: 22px;
    background: linear-gradient(180deg, #fff3cb 0%, #fff7de 100%);
    border: 1px solid #f3d47b;
    color: #6d4f0f;
}

.consent-panel h4 {
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.4rem;
    color: #6d4f0f;
    text-decoration: underline;
}

.consent-panel p {
    margin-bottom: 1.2rem;
    line-height: 1.7;
}

.consent-check {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    line-height: 1.7;
}

.consent-check + .consent-check {
    margin-top: 0.95rem;
}

.consent-check input {
    margin-top: 0.35rem;
    flex-shrink: 0;
}

.consent-recaptcha {
    margin-top: 1.25rem;
}

.form-section-title {
    padding-top: 0.35rem;
    margin-bottom: 0.35rem;
    border-top: 1px solid var(--mst-border);
}

.form-section-title h3 {
    margin-bottom: 0.35rem;
    font-size: 1.2rem;
    color: var(--mst-navy);
}

.form-section-title p {
    margin-bottom: 0;
    color: var(--mst-muted);
    font-size: 0.95rem;
}

.form-section-note {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(234, 244, 255, 0.75);
    border: 1px solid var(--mst-border);
    color: var(--mst-ink);
    line-height: 1.7;
}

.side-spotlight {
    padding: 1.4rem;
    position: sticky;
    top: 120px;
}

.cta-panel {
    padding: 1.75rem 1.8rem;
    background: linear-gradient(135deg, var(--mst-navy), var(--mst-navy-deep));
    color: #fff;
}

.cta-panel .section-kicker {
    color: #ffe28f;
}

.cta-panel h2 {
    margin: 0.35rem 0 0;
}

.empty-state-card {
    padding: 3rem 2rem;
    text-align: center;
}

.site-footer {
    background: var(--mst-navy-deep);
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../../../images/bg-foot.jpg");
    background-position: center;
    background-size: cover;
    opacity: 0.2;
    pointer-events: none;
}

.site-footer > * {
    position: relative;
    z-index: 1;
}

.footer-top {
    padding: 4rem 0 2.4rem;
}

.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.footer-brand-logo {
    width: auto;
    height: 60px;
    display: block;
    flex-shrink: 0;
}

.site-footer h3 {
    font-size: 1rem;
    color: #fff2ba;
    margin-bottom: 1rem;
}

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

.footer-links li + li {
    margin-top: 0.55rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.82);
}

.footer-bottom {
    padding: 1rem 0 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
}

.dt-container .dt-search input,
.dt-container .dt-length select {
    border-radius: 12px;
    border-color: var(--mst-border);
}

.public-row-number {
    white-space: nowrap;
    font-weight: 700;
    color: var(--mst-navy);
}

.back-link {
    display: inline-flex;
    margin-bottom: 1rem;
    color: var(--mst-navy);
    font-weight: 700;
}

@media (max-width: 1199.98px) {
    .nav-cta {
        margin-top: 1rem;
    }

    .side-spotlight {
        position: static;
    }

    .register-wizard-shell {
        grid-template-columns: 1fr;
    }

    .register-wizard-side {
        border-right: 0;
        border-bottom: 1px solid rgba(21, 57, 95, 0.08);
    }

    .register-step-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem 1rem;
    }

    .register-step-list li {
        min-height: auto;
    }

    .register-step-list li:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .story-card,
    .link-card {
        grid-template-columns: 1fr;
    }

    .hero-section,
    .section-block,
    .page-shell {
        padding: 3.25rem 0;
    }

    .hero-copy h1 {
        font-size: 2.35rem;
    }

    .register-wizard-main,
    .register-wizard-side {
        padding: 1.5rem;
    }

    .register-step-list {
        grid-template-columns: 1fr;
    }

    .wizard-step-header h3 {
        font-size: 1.45rem;
    }

    .wizard-step-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .wizard-step-actions > * {
        width: 100%;
    }
}
