/* ════════════════════════════════════════════════════════════════════
   SATHIT WITTHAYA SCHOOL — Premium Pro CSS
   ════════════════════════════════════════════════════════════════════
   1. Tokens & Reset
   2. Layout primitives
   3. Top bar / Header / Navigation
   4. Hero / News ticker
   5. Sections (cards, news, ITA, e-service, stats)
   6. Footer
   7. Forms / Buttons
   8. Utilities & States
   9. Print
   ──────────────────────────────────────────────────────────────────── */

/* ──── 1. TOKENS ──────────────────────────────────────────────────── */
:root {
    /* Brand (Purple & Royal Violet) */
    --brand-50: #faf5ff;
    --brand-100: #f3e8ff;
    --brand-200: #e9d5ff;
    --brand-300: #d8b4fe;
    --brand-400: #c084fc;
    --brand-500: #a855f7;
    --brand-600: #9333ea;
    --brand-700: #7e22ce;
    --brand-800: #6b21a8;
    --brand-900: #581c87;
    --brand-950: #3b0764;

    /* Accent (Royal Gold & Amber) */
    --gold-300: #fde68a;
    --gold-400: #fbbf24;
    --gold-500: #f59e0b;
    --gold-600: #d97706;

    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;

    --rose-500: #f43f5e;
    --rose-600: #e11d48;

    /* Surface & Background (Clean Slate) */
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --surface-3: #e2e8f0;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;

    --ink: #0f172a;
    --ink-2: #1e293b;
    --ink-muted: #64748b;
    --ink-soft: #94a3b8;

    /* Effects */
    --shadow-xs: 0 1px 2px rgba(126, 34, 206, .05);
    --shadow-sm: 0 1px 3px rgba(126, 34, 206, .08), 0 1px 2px rgba(126, 34, 206, .05);
    --shadow-md: 0 4px 14px rgba(126, 34, 206, .08), 0 2px 4px rgba(126, 34, 206, .04);
    --shadow-lg: 0 12px 32px rgba(126, 34, 206, .14), 0 4px 8px rgba(126, 34, 206, .06);
    --shadow-xl: 0 24px 56px rgba(126, 34, 206, .18), 0 8px 16px rgba(126, 34, 206, .08);
    --shadow-glow: 0 0 0 4px rgba(236, 72, 153, .2);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-2xl: 28px;
    --radius-full: 999px;

    /* Animation */
    --ease: cubic-bezier(.4, 0, .2, 1);
    --ease-out: cubic-bezier(0, 0, .2, 1);
    --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);

    /* Typography */
    --font-display: "Kanit", system-ui, sans-serif;
    --font-body: "Sarabun", "Kanit", system-ui, sans-serif;

    /* Container */
    --container: 1280px;
    --container-narrow: 1024px;

    /* Layout */
    --header-h: 96px;
    --topbar-h: 36px;
}

/* ──── DARK MODE — Full Coverage ──────────────────────── */
[data-theme="dark"] {
    --bg: #0b1120;
    --surface: #111827;
    --surface-2: #1f2937;
    --surface-3: #374151;
    --line: #1f2937;
    --line-strong: #374151;

    --ink: #f1f5f9;
    --ink-2: #e2e8f0;
    --ink-muted: #94a3b8;
    --ink-soft: #64748b;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4), 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, .4), 0 2px 4px rgba(0, 0, 0, .3);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5), 0 4px 8px rgba(0, 0, 0, .35);
    --shadow-xl: 0 24px 56px rgba(0, 0, 0, .55), 0 8px 16px rgba(0, 0, 0, .4);
    --shadow-glow: 0 0 0 4px rgba(96, 165, 250, .25);
}

[data-theme="dark"] body {
    background: var(--bg);
    color: var(--ink);
}

[data-theme="dark"] .site-header {
    background: rgba(17, 24, 39, .92);
    border-bottom-color: var(--line);
}

[data-theme="dark"] .header-search {
    background: var(--surface-2);
    border-color: var(--line-strong);
}

[data-theme="dark"] .header-search:focus-within {
    background: var(--surface);
}

[data-theme="dark"] .header-search-input {
    color: var(--ink);
}

[data-theme="dark"] .brand-name {
    color: #fff;
}

[data-theme="dark"] .news-card,
[data-theme="dark"] .three-col-card,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .award-card,
[data-theme="dark"] .news-list-item,
[data-theme="dark"] .eservice-card,
[data-theme="dark"] .personnel-card,
[data-theme="dark"] .ita-category {
    background: var(--surface);
    border-color: var(--line);
}

[data-theme="dark"] .news-card:hover,
[data-theme="dark"] .feature-card:hover,
[data-theme="dark"] .award-card:hover {
    background: var(--surface-2);
}

[data-theme="dark"] .news-card-title,
[data-theme="dark"] .feature-title,
[data-theme="dark"] .award-title,
[data-theme="dark"] .news-list-title,
[data-theme="dark"] .personnel-name {
    color: var(--ink);
}

[data-theme="dark"] .news-card-excerpt,
[data-theme="dark"] .feature-desc,
[data-theme="dark"] .award-excerpt {
    color: var(--ink-muted);
}

[data-theme="dark"] .tcc-header {
    background: linear-gradient(135deg, rgba(30, 64, 175, .15), rgba(30, 58, 138, .25));
}

[data-theme="dark"] .tcc-title {
    color: #93c5fd;
}

[data-theme="dark"] .three-col-card[data-variant="procurement"] .tcc-header {
    background: linear-gradient(135deg, rgba(8, 145, 178, .15), rgba(21, 94, 117, .25));
}

[data-theme="dark"] .three-col-card[data-variant="activity"] .tcc-header {
    background: linear-gradient(135deg, rgba(5, 150, 105, .15), rgba(4, 120, 87, .25));
}

[data-theme="dark"] .features-section {
    background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 100%);
}

[data-theme="dark"] .ita-section {
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}

[data-theme="dark"] .ita-cat-header {
    background: rgba(30, 64, 175, .15);
    border-bottom-color: var(--line);
}

[data-theme="dark"] .ita-cat-title {
    color: #93c5fd;
}

[data-theme="dark"] .ita-item {
    background: var(--surface-2);
}

[data-theme="dark"] .ita-item:hover {
    background: var(--surface-3);
    border-color: var(--brand-500);
}

[data-theme="dark"] .ita-item-title {
    color: var(--ink);
}

[data-theme="dark"] .director-section {
    background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 50%, rgba(120, 53, 15, .15));
}

[data-theme="dark"] .vision-card {
    background: rgba(31, 41, 55, .65);
    border-color: var(--line);
}

[data-theme="dark"] .vision-card strong {
    color: var(--ink);
}

[data-theme="dark"] .vision-card p {
    color: var(--ink-muted);
}

[data-theme="dark"] .director-message blockquote {
    color: var(--ink-2);
}

[data-theme="dark"] .stats-strip {
    background: linear-gradient(135deg, #0b1120, #1e1b4b 50%, #0f172a);
}

[data-theme="dark"] .empty-state {
    background: var(--surface);
    border-color: var(--line-strong);
}

[data-theme="dark"] .empty-icon {
    background: var(--surface-2);
}

[data-theme="dark"] .empty-title {
    color: var(--ink);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-textarea {
    background: var(--surface-2);
    color: var(--ink);
    border-color: var(--line-strong);
}

[data-theme="dark"] .form-label {
    color: var(--ink);
}

[data-theme="dark"] .btn-ghost {
    background: var(--surface-2);
    color: var(--ink);
    border-color: var(--line);
}

[data-theme="dark"] .btn-ghost:hover {
    background: var(--surface-3);
    color: var(--ink);
}

[data-theme="dark"] .pg-link {
    background: var(--surface-2);
    color: var(--ink);
    border-color: var(--line);
}

[data-theme="dark"] .pg-link:hover {
    background: var(--surface-3);
}

[data-theme="dark"] .badge-info {
    background: rgba(96, 165, 250, .2);
    color: #93c5fd;
}

[data-theme="dark"] .badge-success {
    background: rgba(16, 185, 129, .2);
    color: #6ee7b7;
}

[data-theme="dark"] .badge-warning {
    background: rgba(245, 158, 11, .2);
    color: #fcd34d;
}

[data-theme="dark"] .badge-danger {
    background: rgba(239, 68, 68, .2);
    color: #fca5a5;
}

[data-theme="dark"] .content {
    color: var(--ink-2);
}

[data-theme="dark"] .content h2,
[data-theme="dark"] .content h3,
[data-theme="dark"] .content h4 {
    color: #93c5fd;
}

[data-theme="dark"] .content blockquote {
    background: var(--surface-2);
    border-left-color: var(--brand-500);
    color: var(--ink-2);
}

[data-theme="dark"] .content table th {
    background: var(--surface-2);
}

[data-theme="dark"] .content th,
[data-theme="dark"] .content td {
    border-color: var(--line);
}

[data-theme="dark"] .page-hero {
    background: linear-gradient(135deg, #0b1120, #1e3a8a, #0f172a);
}

[data-theme="dark"] .ita-cat-num {
    box-shadow: 0 4px 12px rgba(96, 165, 250, .3);
}

[data-theme="dark"] .skip-link {
    background: #fff;
    color: #0b1120;
}

/* m-app dark mode */
[data-theme="dark"] .m-stat,
[data-theme="dark"] .m-news-card,
[data-theme="dark"] .m-quick-card {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
}

[data-theme="dark"] .m-news-title,
[data-theme="dark"] .m-stat-info strong,
[data-theme="dark"] .m-quick-card strong {
    color: var(--ink);
}

[data-theme="dark"] .m-bottom-nav {
    background: rgba(17, 24, 39, .96);
    border-top-color: var(--line);
}

[data-theme="dark"] .m-nav-item {
    color: var(--ink-muted);
}

[data-theme="dark"] .m-section-head h3 {
    color: var(--ink);
}

[data-theme="dark"] .m-search-overlay {
    background: var(--surface);
}

[data-theme="dark"] .m-search-form {
    background: var(--surface-2);
    border-bottom-color: var(--line);
}

[data-theme="dark"] .m-search-input {
    color: var(--ink);
}

[data-theme="dark"] .m-search-suggest a {
    color: var(--ink);
    border-bottom-color: var(--line);
}

[data-theme="dark"] .m-sheet-content {
    background: var(--surface);
}

[data-theme="dark"] .m-sheet-title {
    color: var(--ink);
    border-bottom-color: var(--line);
}

[data-theme="dark"] .m-sheet-group a {
    color: var(--ink);
}

[data-theme="dark"] .m-sheet-group a:active {
    background: var(--surface-2);
}

[data-theme="dark"] .m-sheet-close {
    background: var(--surface-2);
    color: var(--ink-muted);
}

/* Footer dark mode (already mostly dark) */
[data-theme="dark"] .visitor-stats {
    background: rgba(255, 255, 255, .03);
}

/* Auto dark mode based on system preference (when no explicit choice) */
@media (prefers-color-scheme: dark) {
    [data-theme="auto"] {
        --bg: #0b1120;
        --surface: #111827;
        --surface-2: #1f2937;
        --surface-3: #374151;
        --line: #1f2937;
        --line-strong: #374151;
        --ink: #f1f5f9;
        --ink-2: #e2e8f0;
        --ink-muted: #94a3b8;
        --ink-soft: #64748b;
    }
}

/* High contrast mode */
[data-contrast="high"] {
    --bg: #000;
    --surface: #0f0f0f;
    --surface-2: #1a1a1a;
    --line: #4a4a4a;
    --ink: #fff;
    --ink-2: #f0f0f0;
    --ink-muted: #d0d0d0;
    --brand-800: #ffd700;
    --brand-900: #ffd700;
    --gold-400: #ffe55c;
}

/* ──── Font size accessibility — actual visible scaling ────
   ใช้ CSS zoom เพราะ codebase ใช้ px เยอะ — font-size บน :root
   จะมีผลเฉพาะ rem ที่ไม่ครอบคลุม
   zoom รองรับทุก browser หลัก (Chrome/Safari/Edge ปี 2008+, Firefox 126+) */
:root[data-fs="s"] {
    zoom: 0.9;
}

:root[data-fs="m"] {
    zoom: 1;
}

:root[data-fs="l"] {
    zoom: 1.15;
}

:root[data-fs="xl"] {
    zoom: 1.3;
}

/* Smooth transition when switching */
html {
    transition: zoom .2s ease;
}

/* Fallback for browsers without zoom support — text-size-adjust + rem propagation */
@supports not (zoom: 1) {
    :root[data-fs="s"] {
        font-size: 14px;
        -webkit-text-size-adjust: 90%;
    }

    :root[data-fs="m"] {
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
    }

    :root[data-fs="l"] {
        font-size: 18px;
        -webkit-text-size-adjust: 115%;
    }

    :root[data-fs="xl"] {
        font-size: 20px;
        -webkit-text-size-adjust: 130%;
    }
}

/* ──── 2. RESET & LAYOUT ─────────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:focus-visible {
    outline: 3px solid var(--gold-400);
    outline-offset: 2px;
    border-radius: 4px;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink);
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--brand-700);
    text-decoration: none;
    transition: color .2s var(--ease);
}

a:hover {
    color: var(--brand-900);
}

button {
    font: inherit;
    cursor: pointer;
}

ul,
ol {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    width: 100%;
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 640px) {

    .container,
    .container-narrow {
        padding: 0 16px;
    }
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--ink);
    color: #fff;
    padding: 8px 16px;
    z-index: 9999;
    border-radius: 0 0 8px 0;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* ──── 3. TOP BAR ────────────────────────────────────────────────── */
.topbar {
    background: linear-gradient(135deg, var(--brand-950), var(--brand-900) 60%, var(--brand-800));
    color: #fff;
    font-size: 12.5px;
    border-bottom: 2px solid var(--gold-400);
    position: relative;
    z-index: 100;
}

.topbar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(80% 100% at 50% 0%, rgba(251, 191, 36, .14), transparent 70%);
    pointer-events: none;
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--topbar-h);
    gap: 16px;
    flex-wrap: wrap;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.garuda-mark {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    display: grid;
    place-items: center;
    color: var(--brand-950);
    box-shadow: 0 0 0 2px rgba(251, 191, 36, .25);
    flex-shrink: 0;
}

.garuda-mark i {
    font-size: 13px;
}

.topbar-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-text strong {
    font-weight: 600;
    letter-spacing: .02em;
}

.topbar-sub {
    color: rgba(255, 255, 255, .8);
    font-weight: 300;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.a11y-tools,
.lang-switch {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--radius-full);
    padding: 2px;
}

.a11y-btn,
.lang-btn {
    background: transparent;
    color: rgba(255, 255, 255, .9);
    border: 0;
    border-radius: var(--radius-full);
    padding: 4px 10px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    transition: all .2s var(--ease);
    min-width: 30px;
}

.a11y-btn:hover,
.lang-btn:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.a11y-btn.is-active,
.lang-btn.is-active {
    background: var(--gold-400);
    color: var(--brand-950);
}

.a11y-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, .2);
}

@media (max-width: 720px) {
    .topbar-inner {
        padding-top: 6px;
        padding-bottom: 6px;
        height: auto;
    }

    .a11y-tools,
    .lang-switch {
        font-size: 11px;
    }
}

/* ──── 4. SITE HEADER ────────────────────────────────────────────── */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, .92);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 24px;
    min-height: var(--header-h);
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.brand-logo {
    flex-shrink: 0;
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(251, 191, 36, 0.55);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08), 0 0 12px rgba(251, 191, 36, 0.12);
    transition: all 0.4s var(--ease-bounce);
    overflow: hidden;
    padding: 3px;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s var(--ease-bounce);
}

.site-brand:hover .brand-logo {
    transform: scale(1.07);
    border-color: rgba(251, 191, 36, 0.95);
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.22), 0 0 16px rgba(251, 191, 36, 0.35);
}

.site-brand:hover .brand-logo img {
    transform: scale(1.06) rotate(-6deg);
}

.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 19px;
    color: var(--brand-900);
    letter-spacing: .01em;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-top: 4px;
    padding-bottom: 2px;
}

.brand-name-en {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 12px;
    color: var(--ink-muted);
    letter-spacing: .03em;
}

.brand-motto {
    font-size: 12px;
    color: var(--gold-600);
    font-weight: 500;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-header-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-search {
    display: flex;
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    padding: 4px 4px 4px 16px;
    transition: all .25s var(--ease);
    width: 320px;
}

.header-search:focus-within {
    background: #fff;
    border-color: var(--brand-400);
    box-shadow: var(--shadow-glow);
}

.header-search i {
    color: var(--ink-muted);
    font-size: 16px;
    flex-shrink: 0;
}

.header-search-input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 8px 10px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--ink);
    outline: 0;
}

.header-search-input::placeholder {
    color: var(--ink-soft);
}

.header-search-btn {
    background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
    color: #fff;
    border: 0;
    border-radius: var(--radius-full);
    padding: 8px 18px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    transition: all .2s var(--ease);
    white-space: nowrap;
}

.header-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Auth */
.auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    transition: all .25s var(--ease);
    border: 0;
    box-shadow: var(--shadow-sm);
}

.auth-btn-login {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: #78350f;
}

.auth-btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: #78350f;
}

.auth-pill {
    display: flex;
    gap: 4px;
    background: var(--brand-50);
    border-radius: var(--radius-full);
    padding: 4px;
}

.auth-btn-dashboard {
    background: var(--brand-800);
    color: #fff;
    padding: 7px 16px;
}

.auth-btn-dashboard:hover {
    background: var(--brand-900);
    color: #fff;
}

.auth-btn-logout {
    background: transparent;
    color: var(--rose-600);
    padding: 7px 12px;
}

.auth-btn-logout:hover {
    background: var(--rose-500);
    color: #fff;
}

.mobile-toggle {
    display: none;
    background: var(--surface-2);
    border: 1px solid var(--line);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background .2s var(--ease);
}

.mobile-toggle span {
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: all .3s var(--ease);
}

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

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

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

@media (max-width: 980px) {
    .header-search {
        width: 220px;
    }

    .header-search-btn {
        display: none;
    }

    .auth-btn span {
        display: none;
    }
}

@media (max-width: 720px) {
    .site-header-inner {
        padding: 12px 16px;
        min-height: auto;
    }

    .brand-name {
        font-size: 16px;
    }

    .brand-name-en,
    .brand-motto {
        display: none;
    }

    .header-search {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }
}

/* ──── 5. NAVIGATION ─────────────────────────────────────────────── */
.main-nav {
    background: linear-gradient(135deg, var(--brand-900), var(--brand-800) 50%, var(--brand-700));
    color: #fff;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 40;
}

.main-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent, rgba(251, 191, 36, .08), transparent);
    pointer-events: none;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0;
}

.nav-list::-webkit-scrollbar {
    display: none;
}

.nav-item {
    position: relative;
    flex-shrink: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 14px;
    color: rgba(255, 255, 255, .92);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 14px;
    transition: all .2s var(--ease);
    position: relative;
    white-space: nowrap;
}

.nav-link i {
    font-size: 15px;
    opacity: .9;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 3px;
    background: var(--gold-400);
    transform: translateX(-50%);
    transition: width .3s var(--ease);
    border-radius: 3px 3px 0 0;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.nav-link:hover::after {
    width: 60%;
}

.nav-item.is-active>.nav-link {
    color: #fff;
    background: rgba(0, 0, 0, .15);
}

.nav-item.is-active>.nav-link::after {
    width: 60%;
}

.nav-item.is-highlight>.nav-link {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    color: var(--brand-950);
    border-radius: var(--radius-md);
    margin: 4px 4px;
    padding: 7px 14px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(244, 114, 182, .35);
    white-space: nowrap;
}

.nav-item.is-highlight>.nav-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(244, 114, 182, .5);
}

.nav-item.is-highlight>.nav-link::after {
    display: none;
}

.nav-chev {
    transition: transform .25s var(--ease);
}

.nav-item.has-dropdown:hover .nav-chev {
    transform: rotate(180deg);
}

/* Responsive adjustments for menu items on medium screens */
@media (max-width: 1360px) {
    .nav-link {
        padding: 12px 10px;
        font-size: 13.5px;
        gap: 4px;
    }

    .nav-item.is-highlight>.nav-link {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 1100px) {
    .nav-link {
        padding: 10px 8px;
        font-size: 13px;
    }
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 260px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .25s var(--ease);
    border-top: 3px solid var(--gold-400);
    z-index: 100;
}

.nav-item.has-dropdown:hover .nav-dropdown,
.nav-item.has-dropdown:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--ink);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all .2s var(--ease);
}

.nav-dropdown-link:hover {
    background: var(--brand-50);
    color: var(--brand-800);
    transform: translateX(4px);
}

.nav-dropdown-link i {
    color: var(--gold-500);
}

@media (max-width: 980px) {
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        height: 100vh;
        z-index: 200;
        transition: right .3s var(--ease);
        padding-top: 80px;
        overflow-y: auto;
    }

    body.nav-open .main-nav {
        right: 0;
    }

    body.nav-open::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .5);
        z-index: 150;
        backdrop-filter: blur(4px);
    }

    .nav-list {
        flex-direction: column;
        padding: 16px;
    }

    .nav-link {
        padding: 14px 16px;
        border-radius: var(--radius-md);
    }

    .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(0, 0, 0, .15);
        box-shadow: none;
        padding: 4px 0 4px 28px;
        border: 0;
        margin-top: 4px;
    }

    .nav-dropdown-link {
        color: rgba(255, 255, 255, .85);
        padding: 8px 14px;
    }

    .nav-dropdown-link:hover {
        background: rgba(255, 255, 255, .1);
        color: #fff;
        transform: none;
    }
}

/* ──── 6. NEWS TICKER ────────────────────────────────────────────── */
.news-ticker {
    background: linear-gradient(90deg, var(--gold-400), var(--gold-500), var(--gold-400));
    color: var(--brand-950);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--gold-600);
}

.ticker-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 24px;
    min-height: 40px;
}

.ticker-label {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-900);
    color: #fff;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12.5px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.ticker-label i {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

.ticker-track {
    flex: 1;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.ticker-content {
    display: inline-flex;
    gap: 0;
    white-space: nowrap;
    animation: marquee 60s linear infinite;
    padding-left: 100%;
}

.ticker-content:hover,
.ticker-paused .ticker-content {
    animation-play-state: paused;
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    font-weight: 500;
    font-size: 14px;
}

.ticker-item--urgent {
    color: var(--rose-600);
    font-weight: 700;
}

.ticker-item--high {
    color: var(--brand-900);
    font-weight: 600;
}

.ticker-item a {
    color: inherit;
}

.ticker-item a:hover {
    text-decoration: underline;
}

.ticker-controls {
    flex-shrink: 0;
}

.ticker-btn {
    background: var(--brand-900);
    color: #fff;
    border: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    transition: transform .2s var(--ease);
}

.ticker-btn:hover {
    transform: scale(1.1);
}

@media (max-width: 720px) {
    .ticker-label span {
        display: none;
    }
}

/* ──── 7. HERO SLIDER ────────────────────────────────────────────── */
.hero-slider {
    position: relative;
    overflow: hidden;
    background: #0f172a;
    /* fallback ก่อนภาพโหลด */
    min-height: clamp(360px, 55vw, 540px);
}

/* ⚠ ห้ามใช้ height: 100% เพราะ parent มีแค่ min-height — ไม่ propagate
   ใช้ position: absolute; inset: 0 แทน เพื่อให้ slide fill section จริงๆ */
.hero-slides {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s var(--ease);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1e3a8a;
    /* fallback ก่อน image โหลด */
    display: flex;
    align-items: center;
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 2;
}

/* Overlay — ฝั่งซ้ายเข้ม (ให้ตัวอักษรอ่านง่าย) ฝั่งขวาใส (ให้เห็นภาพ SVG/อัปโหลด) */
.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, .85) 0%, rgba(15, 23, 42, .55) 40%, rgba(15, 23, 42, .15) 75%, rgba(15, 23, 42, 0) 100%);
}

@media (max-width: 720px) {

    /* บนมือถือต้องการพื้นที่อ่านมากขึ้น */
    .hero-slide::before {
        background: linear-gradient(180deg, rgba(15, 23, 42, .65) 0%, rgba(15, 23, 42, .85) 100%);
    }
}

.hero-slide-inner {
    position: relative;
    z-index: 2;
    padding: 64px 24px;
    max-width: var(--container);
    margin: 0 auto;
    width: 100%;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: rgba(251, 191, 36, .15);
    color: var(--gold-300);
    border: 1px solid rgba(251, 191, 36, .3);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(18px, 3.4vw, 48px);
    line-height: 1.45;
    color: #fff;
    margin-bottom: 14px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 4px 24px rgba(0, 0, 0, .3);
    padding-top: 6px;
    padding-bottom: 4px;
}

.hero-title strong {
    background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    color: rgba(255, 255, 255, .9);
    font-size: clamp(15px, 1.6vw, 19px);
    max-width: 640px;
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    border: 0;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    color: var(--brand-950);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 8px 24px rgba(251, 191, 36, .35);
    transition: all .25s var(--ease);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(251, 191, 36, .5);
    color: var(--brand-950);
}

.btn-hero-ghost {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .3);
    backdrop-filter: blur(10px);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    transition: all .25s var(--ease);
}

.btn-hero-ghost:hover {
    background: rgba(255, 255, 255, .2);
    color: #fff;
    transform: translateY(-2px);
}

.hero-controls {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 10;
    background: rgba(0, 0, 0, .35);
    padding: 10px 16px;
    border-radius: var(--radius-full);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .15);
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .4);
    border: 0;
    transition: all .3s var(--ease);
}

.hero-dot.is-active {
    width: 32px;
    border-radius: var(--radius-full);
    background: var(--gold-400);
}

.hero-arrow {
    background: rgba(255, 255, 255, .15);
    border: 0;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    transition: all .2s var(--ease);
}

.hero-arrow:hover {
    background: var(--gold-400);
    color: var(--brand-950);
}

/* ──── 8. SECTION COMMON ─────────────────────────────────────────── */
.section {
    padding: 64px 0;
}

.section-tight {
    padding: 48px 0;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-700);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.section-eyebrow::before {
    content: "";
    width: 32px;
    height: 2px;
    background: var(--gold-500);
    display: inline-block;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.2;
    color: var(--ink);
    margin-top: 6px;
}

.section-title strong {
    background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-700);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: var(--brand-50);
    transition: all .25s var(--ease);
}

.section-link:hover {
    background: var(--brand-100);
    transform: translateX(4px);
}

/* ──── 9. STAT CARDS ─────────────────────────────────────────────── */
.stats-strip {
    background: linear-gradient(135deg, var(--brand-900), var(--brand-800) 50%, var(--brand-700));
    color: #fff;
    padding: 48px 0;
    position: relative;
    overflow: hidden;
}

.stats-strip::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(60% 100% at 20% 0%, rgba(251, 191, 36, .15), transparent 50%),
        radial-gradient(50% 100% at 80% 100%, rgba(59, 130, 246, .25), transparent 50%);
}

.stats-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: var(--radius-xl);
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
    transition: all .3s var(--ease);
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .15), transparent);
    transition: left .8s var(--ease);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 191, 36, .4);
}

.stat-card:hover::before {
    left: 100%;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: grid;
    place-items: center;
    font-size: 24px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: var(--brand-950);
    margin-bottom: 16px;
    box-shadow: 0 8px 16px rgba(251, 191, 36, .3);
}

.stat-value {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 40px;
    color: #fff;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.stat-label {
    color: rgba(255, 255, 255, .8);
    font-size: 14px;
    margin-top: 6px;
}

.stat-delta {
    font-size: 12px;
    color: var(--gold-300);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ──── 10. NEWS / ARTICLES ──────────────────────────────────────── */
.news-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.news-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
    transition: all .35s var(--ease);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-200);
}

.news-card-cover {
    aspect-ratio: 16 / 9;
    background: var(--surface-2);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.news-card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(15, 23, 42, .5));
}

.news-card-pinned {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--rose-500);
    color: #fff;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(244, 63, 94, .4);
}

.news-card-cat {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 2;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(10px);
    color: var(--brand-800);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink-muted);
    font-size: 12px;
    margin-bottom: 10px;
}

.news-card-meta i {
    font-size: 13px;
}

.news-card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    line-height: 1.45;
    color: var(--ink);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card:hover .news-card-title {
    color: var(--brand-700);
}

.news-card-excerpt {
    color: var(--ink-muted);
    font-size: 14px;
    line-height: 1.65;
    flex: 1;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand-700);
    font-weight: 600;
    font-size: 13.5px;
    margin-top: auto;
}

.news-card-action i {
    transition: transform .2s var(--ease);
}

.news-card:hover .news-card-action i {
    transform: translateX(4px);
}

/* News Card — Compact (list/sidebar) */
.news-list-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    transition: all .25s var(--ease);
}

.news-list-item:hover {
    border-color: var(--brand-300);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.news-list-thumb {
    width: 96px;
    height: 72px;
    border-radius: var(--radius-md);
    background: var(--surface-2);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.news-list-body {
    flex: 1;
    min-width: 0;
}

.news-list-meta {
    color: var(--ink-muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.news-list-title {
    font-weight: 600;
    color: var(--ink);
    font-size: 14.5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 3-Column Layout */
.three-col-layout {
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.three-col-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--line);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tcc-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--brand-50), var(--brand-100));
    border-bottom: 1px solid var(--line);
}

.tcc-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--brand-900);
    font-size: 17px;
}

.tcc-title-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: var(--brand-700);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 17px;
}

.tcc-link {
    font-size: 12.5px;
    color: var(--brand-700);
    font-weight: 600;
}

.tcc-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Procurement variant */
.three-col-card[data-variant="procurement"] .tcc-header {
    background: linear-gradient(135deg, #ecfeff, #cffafe);
}

.three-col-card[data-variant="procurement"] .tcc-title {
    color: #155e75;
}

.three-col-card[data-variant="procurement"] .tcc-title-icon {
    background: #0891b2;
}

.three-col-card[data-variant="activity"] .tcc-header {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}

.three-col-card[data-variant="activity"] .tcc-title {
    color: var(--emerald-700);
}

.three-col-card[data-variant="activity"] .tcc-title-icon {
    background: var(--emerald-600);
}

.proc-row {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    transition: all .2s var(--ease);
}

.proc-row:hover {
    border-color: var(--brand-300);
    transform: translateX(2px);
}

.proc-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--brand-50);
    color: var(--brand-700);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 16px;
}

.proc-body {
    flex: 1;
    min-width: 0;
}

.proc-no {
    font-size: 11px;
    color: var(--ink-muted);
    font-weight: 600;
    letter-spacing: .03em;
}

.proc-title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    color: var(--ink);
    margin: 2px 0 4px;
}

.proc-title:hover {
    color: var(--brand-700);
}

.proc-meta {
    font-size: 12px;
    color: var(--ink-muted);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ──── 11. DIRECTOR / VISION ─────────────────────────────────────── */
.director-section {
    background: linear-gradient(135deg, var(--brand-50) 0%, #fff 50%, #fef3c7);
    padding: 72px 0;
    position: relative;
    overflow: hidden;
}

.director-section::before {
    content: "";
    position: absolute;
    top: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, .15), transparent 70%);
}

.director-grid {
    position: relative;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 56px;
    align-items: center;
}

.director-photo {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, var(--brand-200), var(--brand-400));
}

.director-photo::before {
    content: "";
    position: absolute;
    inset: -20px;
    border: 2px solid var(--gold-400);
    border-radius: var(--radius-2xl);
    z-index: -1;
    opacity: .5;
}

.director-photo svg,
.director-photo-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* รูปจริง — full bleed, cover */
.director-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    /* ให้หน้าครูอยู่บน — ไม่ตัดหัว */
    display: block;
    transition: transform .6s var(--ease);
}

.director-photo:hover .director-photo-img {
    transform: scale(1.04);
    /* ซูมขึ้นเบาๆ ตอน hover */
}

.director-name-pill {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(12px);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.director-name-pill strong {
    display: block;
    color: var(--brand-900);
    font-family: var(--font-display);
    font-size: 16px;
}

.director-name-pill span {
    font-size: 12px;
    color: var(--ink-muted);
}

.director-message blockquote {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(20px, 2vw, 26px);
    line-height: 1.6;
    color: var(--ink-2);
    margin-bottom: 28px;
    position: relative;
    padding-left: 32px;
}

.director-message blockquote::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--gold-400), var(--brand-700));
}

.vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.vision-card {
    background: rgba(255, 255, 255, .8);
    backdrop-filter: blur(8px);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
}

.vision-card-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 17px;
    margin-bottom: 10px;
}

.vision-card strong {
    display: block;
    color: var(--ink);
    font-size: 14.5px;
    margin-bottom: 4px;
}

.vision-card p {
    color: var(--ink-muted);
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 820px) {
    .director-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .director-photo {
        max-width: 280px;
        margin: 0 auto;
    }
}

/* ──── 12. ITA SECTION ──────────────────────────────────────────── */
.ita-section {
    background: linear-gradient(180deg, var(--surface-2) 0%, #fff 100%);
    padding: 72px 0;
}

.ita-hero {
    background: linear-gradient(135deg, var(--emerald-600), #047857);
    color: #fff;
    border-radius: var(--radius-2xl);
    padding: 36px 40px;
    margin-bottom: 36px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.ita-hero::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .12), transparent 70%);
}

.ita-hero h2 {
    color: #fff;
    font-size: clamp(24px, 3vw, 34px);
    margin-bottom: 6px;
}

.ita-hero p {
    color: rgba(255, 255, 255, .85);
}

.ita-hero-badge {
    background: rgba(0, 0, 0, .2);
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .15);
}

.ita-hero-badge strong {
    font-size: 36px;
    font-family: var(--font-display);
    display: block;
    line-height: 1;
}

.ita-hero-badge span {
    font-size: 12px;
    color: rgba(255, 255, 255, .8);
}

.ita-categories {
    display: grid;
    gap: 20px;
}

.ita-category {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.ita-cat-header {
    padding: 18px 24px;
    background: var(--brand-50);
    border-bottom: 1px solid var(--brand-100);
    display: flex;
    align-items: center;
    gap: 14px;
}

.ita-cat-num {
    background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(30, 58, 138, .3);
}

.ita-cat-title {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--brand-900);
    font-size: 16px;
}

.ita-cat-body {
    padding: 18px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
}

.ita-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--surface-2);
    transition: all .2s var(--ease);
    border: 1px solid transparent;
}

.ita-item:hover {
    background: #fff;
    border-color: var(--brand-300);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.ita-item-code {
    font-family: var(--font-display);
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    flex-shrink: 0;
    min-width: 44px;
    text-align: center;
}

.ita-item-title {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    line-height: 1.4;
    color: var(--ink);
}

.ita-item-action {
    color: var(--brand-700);
    font-size: 14px;
    flex-shrink: 0;
}

/* ──── 13. E-SERVICE GRID ───────────────────────────────────────── */
.eservice-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.eservice-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 24px 20px;
    text-align: center;
    transition: all .35s var(--ease);
    position: relative;
    overflow: hidden;
}

.eservice-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, var(--brand-100), transparent 50%);
    opacity: 0;
    transition: opacity .35s var(--ease);
}

.eservice-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-200);
}

.eservice-card:hover::before {
    opacity: 1;
}

.eservice-card>* {
    position: relative;
}

.eservice-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    font-size: 28px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
    box-shadow: 0 8px 20px rgba(30, 64, 175, .3);
}

.eservice-card[data-color="emerald"] .eservice-icon {
    background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
    box-shadow: 0 8px 20px rgba(5, 150, 105, .3);
}

.eservice-card[data-color="rose"] .eservice-icon {
    background: linear-gradient(135deg, var(--rose-500), var(--rose-600));
    box-shadow: 0 8px 20px rgba(244, 63, 94, .3);
}

.eservice-card[data-color="amber"] .eservice-icon {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    box-shadow: 0 8px 20px rgba(251, 191, 36, .3);
}

.eservice-card[data-color="indigo"] .eservice-icon {
    background: linear-gradient(135deg, #6366f1, #4338ca);
    box-shadow: 0 8px 20px rgba(99, 102, 241, .3);
}

.eservice-card[data-color="cyan"] .eservice-icon {
    background: linear-gradient(135deg, #06b6d4, #0e7490);
    box-shadow: 0 8px 20px rgba(6, 182, 212, .3);
}

.eservice-card[data-color="violet"] .eservice-icon {
    background: linear-gradient(135deg, #a855f7, #6d28d9);
    box-shadow: 0 8px 20px rgba(168, 85, 247, .3);
}

.eservice-card[data-color="pink"] .eservice-icon {
    background: linear-gradient(135deg, #ec4899, #be185d);
    box-shadow: 0 8px 20px rgba(236, 72, 153, .3);
}

.eservice-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    color: var(--ink);
    margin-bottom: 4px;
}

.eservice-desc {
    font-size: 12.5px;
    color: var(--ink-muted);
    line-height: 1.5;
}

/* ──── 14. PERSONNEL CARDS ──────────────────────────────────────── */
/* ════════════════════════════════════════════════════════════
   PERSONNEL CARDS — Premium Pro Edition
   ════════════════════════════════════════════════════════════ */
.personnel-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    padding-top: 60px;
    /* room for avatars overlapping top */
}

.personnel-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 76px 22px 24px;
    /* large top for overlap avatar */
    text-align: center;
    position: relative;
    overflow: visible;
    transition: all .4s var(--ease);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}

/* Animated top gradient bar — appears on hover */
.personnel-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-500), var(--gold-400), var(--brand-700));
    border-radius: 0 0 3px 3px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .35s var(--ease);
}

.personnel-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, .12);
    border-color: var(--brand-200);
}

.personnel-card:hover::before {
    transform: scaleX(1);
}

/* Dark mode adjustments */
[data-theme="dark"] .personnel-card {
    background: var(--surface);
    border-color: var(--line);
}

[data-theme="dark"] .personnel-card:hover {
    background: var(--surface-2);
}

/* ── Avatar — overlapping circle with animated gradient ring ── */
.personnel-avatar {
    width: 132px;
    height: 132px;
    position: absolute;
    top: -56px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-100), var(--brand-300));
    color: var(--brand-700);
    display: grid;
    place-items: center;
    font-size: 56px;
    border: 5px solid #fff;
    box-shadow: 0 12px 32px rgba(30, 58, 138, .18),
        0 4px 12px rgba(0, 0, 0, .08);
    overflow: hidden;
    transition: all .4s var(--ease);
    z-index: 2;
}

[data-theme="dark"] .personnel-avatar {
    border-color: var(--surface);
    background: linear-gradient(135deg, rgba(59, 130, 246, .2), rgba(30, 64, 175, .35));
}

/* Animated conic gradient ring (orbits around avatar) */
.personnel-avatar::before {
    content: "";
    position: absolute;
    inset: -9px;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
            var(--gold-400),
            var(--brand-500),
            transparent 50%,
            var(--gold-400) 75%,
            var(--brand-700));
    z-index: -1;
    opacity: 0;
    transition: opacity .4s var(--ease);
    animation: avatar-ring-spin 6s linear infinite;
}

.personnel-card:hover .personnel-avatar::before {
    opacity: 1;
    animation-duration: 3s;
}

@keyframes avatar-ring-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Photo inside avatar — full bleed with cover */
.personnel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    /* ใบหน้าอยู่บน ไม่ตัดหัว */
    border-radius: 50%;
    transition: transform .6s var(--ease);
}

.personnel-card:hover .personnel-avatar {
    transform: translateX(-50%) scale(1.04);
}

.personnel-card:hover .personnel-avatar img {
    transform: scale(1.08);
}

/* Avatar fallback icon (no photo uploaded) */
.personnel-avatar i {
    font-size: 64px;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(30, 58, 138, .15));
}

/* ── Name / Position / Rank / Meta ────────────────────── */
.personnel-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16.5px;
    color: var(--ink);
    margin-bottom: 4px;
    line-height: 1.3;
}

[data-theme="dark"] .personnel-name {
    color: var(--ink);
}

.personnel-position {
    font-size: 12.5px;
    color: var(--brand-700);
    font-weight: 500;
    line-height: 1.45;
    margin-bottom: 12px;
    padding: 0 4px;
    min-height: 36px;
    /* keep cards aligned */
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .personnel-position {
    color: #93c5fd;
}

.personnel-rank {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
    color: #78350f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    box-shadow: 0 4px 12px rgba(251, 191, 36, .35);
    position: relative;
    overflow: hidden;
}

/* Shimmer effect on rank badge */
.personnel-rank::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
    transition: left .6s var(--ease);
}

.personnel-card:hover .personnel-rank::after {
    left: 200%;
}

.personnel-meta {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
    font-size: 12px;
    color: var(--ink-muted);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

[data-theme="dark"] .personnel-meta {
    border-top-color: var(--line-strong);
}

.personnel-meta a {
    color: var(--brand-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: color .2s var(--ease);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.personnel-meta a:hover {
    color: var(--brand-900);
}

[data-theme="dark"] .personnel-meta a {
    color: #93c5fd;
}

[data-theme="dark"] .personnel-meta a:hover {
    color: #bfdbfe;
}

/* "Executive" badge (top-right corner for is_executive=1) */
.personnel-card[data-executive] {
    background: linear-gradient(180deg, #fffbeb 0%, #fff 25%);
    border-color: rgba(251, 191, 36, .25);
}

[data-theme="dark"] .personnel-card[data-executive] {
    background: linear-gradient(180deg, rgba(251, 191, 36, .08) 0%, var(--surface) 25%);
}

.personnel-card[data-executive] .personnel-avatar {
    background: linear-gradient(135deg, var(--gold-100, #fef3c7), var(--gold-300));
}

.personnel-card[data-executive] .personnel-avatar i {
    background: linear-gradient(135deg, var(--gold-600), #78350f);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 540px) {
    .personnel-grid {
        padding-top: 50px;
        gap: 24px;
    }

    .personnel-card {
        padding: 64px 20px 22px;
    }

    .personnel-avatar {
        width: 110px;
        height: 110px;
        top: -50px;
        font-size: 48px;
    }

    .personnel-avatar i {
        font-size: 52px;
    }
}

/* ──── 15. FORMS ────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    color: var(--ink);
    margin-bottom: 8px;
}

.form-label .req {
    color: var(--rose-500);
    margin-left: 2px;
}

.form-control,
.form-select,
.form-textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    background: #fff;
    font-family: var(--font-body);
    font-size: 14.5px;
    color: var(--ink);
    transition: all .2s var(--ease);
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
    outline: 0;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .12);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-help {
    font-size: 12px;
    color: var(--ink-muted);
    margin-top: 4px;
}

.form-error {
    color: var(--rose-600);
    font-size: 12.5px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14.5px;
    border: 0;
    cursor: pointer;
    transition: all .25s var(--ease);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
    color: #fff;
    box-shadow: 0 4px 14px rgba(30, 58, 138, .25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(30, 58, 138, .35);
    color: #fff;
}

.btn-ghost {
    background: var(--surface-2);
    color: var(--ink-2);
    border: 1px solid var(--line);
}

.btn-ghost:hover {
    background: var(--surface-3);
    color: var(--ink);
}

.btn-danger {
    background: linear-gradient(135deg, var(--rose-500), var(--rose-600));
    color: #fff;
}

.btn-danger:hover {
    color: #fff;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 600;
}

.badge-primary {
    background: var(--brand-100);
    color: var(--brand-800);
}

.badge-success {
    background: #d1fae5;
    color: var(--emerald-700);
}

.badge-warning {
    background: #fef3c7;
    color: #78350f;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #cffafe;
    color: #155e75;
}

/* ──── 16. FOOTER ───────────────────────────────────────────────── */
.site-footer {
    background: linear-gradient(180deg, var(--brand-950) 0%, #020617 100%);
    color: rgba(255, 255, 255, .85);
    margin-top: 80px;
    position: relative;
}

.footer-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-700), var(--gold-400), var(--brand-700));
}

.footer-agencies {
    padding: 28px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.agencies-title {
    color: rgba(255, 255, 255, .65);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: .04em;
}

.agencies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
    gap: 10px;
}

.agency-card {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, .85);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all .25s var(--ease);
}

.agency-card:hover {
    background: rgba(251, 191, 36, .12);
    border-color: var(--gold-400);
    color: #fff;
    transform: translateY(-2px);
}

.agency-card i {
    color: var(--gold-400);
    font-size: 16px;
}

.footer-main {
    padding: 48px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 40px;
}

.footer-title {
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-title i {
    color: var(--gold-400);
}

.footer-school {
    font-family: var(--font-display);
    font-weight: 700;
    color: #fff;
    font-size: 18px;
    margin-bottom: 6px;
}

.footer-address {
    font-size: 13.5px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .7);
    margin-bottom: 14px;
}

.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.footer-contact-list li {
    font-size: 13.5px;
    color: rgba(255, 255, 255, .85);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-contact-list a {
    color: rgba(255, 255, 255, .85);
}

.footer-contact-list i {
    color: var(--gold-400);
    width: 16px;
}

.footer-map {
    aspect-ratio: 16/9;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .1);
}

.footer-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: invert(.9) hue-rotate(180deg);
}

.social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}

.social-card {
    background: rgba(255, 255, 255, .05);
    padding: 12px;
    border-radius: var(--radius-md);
    display: flex;
    gap: 10px;
    align-items: center;
    color: #fff;
    transition: all .25s var(--ease);
    border: 1px solid rgba(255, 255, 255, .08);
}

.social-card:hover {
    transform: translateY(-2px);
    color: #fff;
}

.social-card i {
    font-size: 24px;
    flex-shrink: 0;
}

.social-card strong {
    display: block;
    font-size: 13.5px;
    line-height: 1.2;
}

.social-card span {
    font-size: 11px;
    color: rgba(255, 255, 255, .65);
}

.social-card--fb:hover {
    background: rgba(24, 119, 242, .25);
    border-color: #1877f2;
}

.social-card--fb i {
    color: #1877f2;
}

.social-card--yt:hover {
    background: rgba(255, 0, 0, .2);
    border-color: #ff0000;
}

.social-card--yt i {
    color: #ff5252;
}

.social-card--line:hover {
    background: rgba(6, 199, 85, .2);
    border-color: #06c755;
}

.social-card--line i {
    color: #06c755;
}

.social-card--ig:hover {
    background: rgba(228, 64, 95, .2);
    border-color: #e4405f;
}

.social-card--ig i {
    color: #e4405f;
}

.qr-pill {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, .04);
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .85);
    font-size: 13px;
}

.qr-box {
    flex-shrink: 0;
}

.footer-link-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.footer-link-list a {
    color: rgba(255, 255, 255, .8);
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    transition: all .2s var(--ease);
}

.footer-link-list a:hover {
    color: var(--gold-400);
    transform: translateX(4px);
}

.footer-link-list i {
    color: var(--gold-500);
    width: 16px;
}

.visitor-stats {
    background: rgba(255, 255, 255, .04);
    border-radius: var(--radius-md);
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
}

.vs-title {
    color: rgba(255, 255, 255, .85);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    gap: 6px;
    align-items: center;
}

.vs-title i {
    color: var(--gold-400);
}

.vs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.vs-cell {
    background: rgba(0, 0, 0, .3);
    padding: 10px;
    border-radius: var(--radius-sm);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, .05);
}

.vs-num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    color: var(--gold-300);
    display: block;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.vs-label {
    font-size: 11px;
    color: rgba(255, 255, 255, .6);
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.vs-label .text-success {
    color: #34d399;
    font-size: 8px;
    animation: pulse 1.5s infinite;
}

.footer-bottom {
    background: rgba(0, 0, 0, .35);
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-copy {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, .65);
    font-size: 13px;
}

.version-pill {
    background: rgba(251, 191, 36, .15);
    color: var(--gold-300);
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    border: 1px solid rgba(251, 191, 36, .2);
}

.footer-dev {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.dev-label {
    color: rgba(255, 255, 255, .5);
    font-size: 12px;
}

.dev-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    background: rgba(255, 255, 255, .06);
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    transition: all .25s var(--ease);
}

.dev-pill:hover {
    background: rgba(251, 191, 36, .15);
    border-color: var(--gold-400);
    color: #fff;
    transform: translateY(-1px);
}

.dev-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    display: grid;
    place-items: center;
    color: #78350f;
    font-size: 13px;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, .25);
}

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

@media (max-width: 540px) {
    .footer-bottom-inner {
        flex-direction: column-reverse;
        text-align: center;
    }
}

/* ──── 17. UTILITIES ─────────────────────────────────────────────── */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--ink-muted);
}

.text-success {
    color: var(--emerald-600);
}

.text-danger {
    color: var(--rose-600);
}

.text-brand {
    color: var(--brand-700);
}

.text-gold {
    color: var(--gold-500);
}

.d-none {
    display: none;
}

.d-flex {
    display: flex;
}

.gap-1 {
    gap: 4px;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.gap-5 {
    gap: 20px;
}

.mt-1 {
    margin-top: 4px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 12px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-5 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 4px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 12px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-5 {
    margin-bottom: 24px;
}

@media (min-width: 540px) {
    .d-md-none {
        display: none;
    }

    .d-md-inline {
        display: inline;
    }
}

@media (max-width: 539px) {
    .d-sm-none {
        display: none;
    }
}

/* ──── 18. PAGINATION ────────────────────────────────────────────── */
.pg {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 32px 0;
}

.pg-link {
    display: grid;
    place-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    transition: all .2s var(--ease);
}

.pg-link:hover {
    background: var(--brand-50);
    border-color: var(--brand-300);
    color: var(--brand-700);
}

.pg-link.is-active {
    background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
    color: #fff;
    border-color: transparent;
}

.pg-link.is-disabled {
    opacity: .4;
    pointer-events: none;
}

/* ──── 19. PAGE HERO (sub pages) ────────────────────────────────── */
.page-hero {
    background: linear-gradient(135deg, var(--brand-900), var(--brand-700));
    color: #fff;
    padding: 56px 0 64px;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(60% 100% at 30% 100%, rgba(251, 191, 36, .2), transparent 50%);
}

.page-hero-inner {
    position: relative;
    z-index: 2;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    color: rgba(255, 255, 255, .75);
    margin-bottom: 14px;
}

.breadcrumbs a {
    color: rgba(255, 255, 255, .85);
}

.breadcrumbs a:hover {
    color: var(--gold-300);
}

.breadcrumbs i {
    font-size: 12px;
    opacity: .5;
}

.page-hero h1 {
    color: #fff;
    font-size: clamp(28px, 4vw, 42px);
    margin-bottom: 8px;
}

.page-hero p {
    color: rgba(255, 255, 255, .85);
    font-size: 16px;
    max-width: 720px;
}

/* ──── 20. EMPTY STATE ──────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 64px 24px;
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1px dashed var(--line-strong);
}

.empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background: var(--surface-2);
    display: grid;
    place-items: center;
    font-size: 36px;
    color: var(--ink-soft);
}

.empty-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    color: var(--ink);
    margin-bottom: 6px;
}

.empty-desc {
    color: var(--ink-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

/* ──── 21. SKELETON ─────────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius-sm);
}

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

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

/* ──── 22. COOKIE BANNER ────────────────────────────────────────── */
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 999;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 18px 22px;
    max-width: 720px;
    margin: 0 auto;
    animation: slideUp .4s var(--ease-out);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.cookie-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: #78350f;
    display: grid;
    place-items: center;
    font-size: 22px;
    flex-shrink: 0;
}

.cookie-text {
    flex: 1;
    min-width: 220px;
}

.cookie-text strong {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    color: var(--ink);
    margin-bottom: 4px;
}

.cookie-text p {
    font-size: 13px;
    color: var(--ink-muted);
    line-height: 1.5;
}

.cookie-actions {
    display: flex;
    gap: 8px;
}

.cookie-btn {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 600;
}

.cookie-btn-primary {
    background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
    color: #fff;
    border: 0;
}

.cookie-btn-ghost {
    background: var(--surface-2);
    color: var(--ink-2);
    border: 1px solid var(--line);
    text-decoration: none;
}

/* ──── 23. BACK TO TOP ──────────────────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 50;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 0;
    background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
    color: #fff;
    box-shadow: var(--shadow-lg);
    display: grid;
    place-items: center;
    font-size: 20px;
    transition: all .25s var(--ease);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* ──── 24. CONTENT (article/news detail) ────────────────────────── */
.content {
    font-size: 16px;
    line-height: 1.85;
    color: var(--ink-2);
}

.content h2,
.content h3,
.content h4 {
    margin-top: 28px;
    margin-bottom: 14px;
    color: var(--brand-900);
}

.content h2 {
    font-size: 24px;
}

.content h3 {
    font-size: 20px;
}

.content p {
    margin-bottom: 14px;
}

.content ul,
.content ol {
    padding-left: 24px;
    margin-bottom: 14px;
}

.content ul li {
    list-style: disc;
    margin-bottom: 6px;
}

.content ol li {
    list-style: decimal;
    margin-bottom: 6px;
}

.content blockquote {
    margin: 20px 0;
    padding: 18px 24px;
    background: var(--brand-50);
    border-left: 4px solid var(--brand-700);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--ink-2);
    font-style: italic;
}

.content img {
    border-radius: var(--radius-md);
    margin: 16px 0;
    box-shadow: var(--shadow-md);
}

.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.content th,
.content td {
    padding: 10px 14px;
    border: 1px solid var(--line);
    text-align: left;
}

.content th {
    background: var(--surface-2);
    font-weight: 600;
}

/* Animation entry */
.fade-in-up {
    animation: fadeInUp .6s var(--ease-out) both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger delay helpers */
.stagger>*:nth-child(1) {
    animation-delay: 0s;
}

.stagger>*:nth-child(2) {
    animation-delay: .08s;
}

.stagger>*:nth-child(3) {
    animation-delay: .16s;
}

.stagger>*:nth-child(4) {
    animation-delay: .24s;
}

.stagger>*:nth-child(5) {
    animation-delay: .32s;
}

.stagger>*:nth-child(6) {
    animation-delay: .4s;
}

.stagger>*:nth-child(7) {
    animation-delay: .48s;
}

.stagger>*:nth-child(8) {
    animation-delay: .56s;
}

/* ════════════════════════════════════════════════════════════════════
   MOBILE + TABLET APP-STYLE LAYOUT (≤1024px — ครอบ Phone + iPad)
   ────────────────────────────────────────────────────────────────────
   Native app experience: header, hero card, app menu grid, bottom nav
   ════════════════════════════════════════════════════════════════════ */

.m-app,
.m-bottom-nav,
.m-search-overlay,
.m-sheet {
    display: none;
}

@media (max-width: 1024px) {

    /* ── Show mobile/tablet, hide desktop sections ───────── */
    .m-app {
        display: block;
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }

    .m-bottom-nav {
        display: flex;
    }

    /* Hide desktop topbar/header/nav/ticker — replaced by m-header */
    body.m-mobile-mode .topbar,
    body.m-mobile-mode .site-header,
    body.m-mobile-mode .main-nav,
    body.m-mobile-mode .news-ticker,
    body.m-mobile-mode .site-footer,
    body.m-mobile-mode .desktop-only,
    body.m-mobile-mode .back-to-top {
        display: none !important;
    }

    /* Default desktop sections in index.php */
    body.m-mobile-mode main>section.hero-slider,
    body.m-mobile-mode main>section.stats-strip,
    body.m-mobile-mode main>section.director-section,
    body.m-mobile-mode main>section.section,
    body.m-mobile-mode main>section.section-tight {
        display: none !important;
    }
}

/* ── Tablet (iPad) layout refinements: 769px – 1024px ─────────── */
@media (min-width: 769px) and (max-width: 1024px) {

    /* Wider container */
    .m-app {
        max-width: 680px;
        margin: 0 auto;
    }

    /* Hero card taller on tablet */
    .m-hero {
        padding: 20px 24px;
    }

    .m-hero-card {
        aspect-ratio: 16 / 7;
    }

    .m-hero-title {
        font-size: clamp(18px, 3vw, 26px);
    }

    /* Stats: 4-col on tablet */
    .m-stats-strip {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
        padding: 0 24px 10px;
    }

    .m-stat {
        padding: 14px;
    }

    .m-stat-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .m-stat-info strong {
        font-size: 20px;
    }

    /* Menu: 6-col on tablet */
    .m-menu-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 10px;
        padding: 0 20px;
    }

    .m-menu-icon {
        width: 60px;
        height: 60px;
        font-size: 26px;
    }

    .m-menu-label {
        font-size: 12px;
    }

    /* Quick service: 4-col on tablet */
    .m-quick-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        padding: 0 24px;
    }

    .m-quick-card {
        padding: 18px;
    }

    .m-quick-card i {
        font-size: 26px;
    }

    .m-quick-card strong {
        font-size: 15px;
    }

    /* News cards wider on tablet */
    .m-news-card {
        flex: 0 0 300px;
    }

    .m-activity-card {
        flex: 0 0 240px;
    }

    /* Section padding */
    .m-section-head {
        padding: 0 24px 14px;
    }

    .m-section {
        padding: 20px 0 10px;
    }

    .m-scroll-row {
        padding: 0 24px 6px;
        gap: 14px;
    }

    /* Header */
    .m-header {
        padding: 14px 24px;
        padding-top: calc(14px + env(safe-area-inset-top));
    }

    .m-header-logo {
        width: 46px;
        height: 46px;
        font-size: 22px;
    }

    .m-header-text strong {
        font-size: 16px;
    }

    .m-greet {
        font-size: 13px;
    }

    .m-icon-btn {
        width: 44px;
        height: 44px;
        font-size: 19px;
    }

    /* Bottom nav wider items */
    .m-nav-item {
        padding: 6px 20px;
        min-width: 80px;
    }

    .m-nav-item i {
        font-size: 23px;
    }

    .m-nav-item span {
        font-size: 11.5px;
    }

    /* Footer */
    .m-footer-info {
        padding: 28px 24px;
    }

    .m-footer-links {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Bottom sheet wider */
    .m-sheet-content {
        left: 50%;
        right: auto;
        width: 540px;
        transform: translateX(-50%) translateY(100%);
        border-radius: 24px 24px 0 0;
    }

    .m-sheet.is-open .m-sheet-content {
        transform: translateX(-50%) translateY(0);
    }

    /* Search overlay max-width */
    .m-search-form {
        padding: 16px 24px;
        padding-top: calc(16px + env(safe-area-inset-top));
    }
}

/* ── 1. Compact App Header ─────────────────────────────────────── */
.m-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: linear-gradient(135deg, var(--brand-900), var(--brand-800));
    color: #fff;
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top));
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .15);
}

.m-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.m-header-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: #78350f;
    display: grid;
    place-items: center;
    font-size: 19px;
    box-shadow: 0 4px 12px rgba(251, 191, 36, .3);
    flex-shrink: 0;
}

.m-header-text {
    min-width: 0;
    flex: 1;
}

.m-greet {
    font-size: 12px;
    color: rgba(255, 255, 255, .75);
    display: block;
    line-height: 1.2;
}

.m-header-text strong {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14.5px;
    color: #fff;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.m-header-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.m-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 17px;
    position: relative;
    transition: background .15s var(--ease);
}

.m-icon-btn:active {
    background: rgba(255, 255, 255, .2);
}

.m-icon-dot {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 8px;
    height: 8px;
    background: var(--rose-500);
    border-radius: 50%;
    border: 2px solid var(--brand-900);
    animation: pulse 1.5s infinite;
}

/* ── 2. Hero Card ──────────────────────────────────────────────── */
.m-hero {
    padding: 16px;
}

.m-hero-card {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    background-color: var(--brand-800);
    background-size: cover;
    background-position: center;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .25);
    transition: transform .2s var(--ease);
}

.m-hero-card:active {
    transform: scale(.99);
}

.m-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, .35) 35%, rgba(15, 23, 42, .92) 100%);
}

.m-hero-content {
    position: absolute;
    inset: 0;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #fff;
}

.m-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(251, 191, 36, .9);
    color: #78350f;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    align-self: flex-start;
    margin-bottom: 8px;
}

.m-hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(16px, 5vw, 22px);
    line-height: 1.4;
    color: #fff;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    padding-top: 2px;
}

.m-hero-sub {
    font-size: 13.5px;
    color: rgba(255, 255, 255, .92);
    margin-bottom: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.m-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    color: #78350f;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    align-self: flex-start;
    box-shadow: 0 8px 20px rgba(251, 191, 36, .4);
}

/* ── 3. Quick Stats Strip ──────────────────────────────────────── */
.m-stats-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 16px 8px;
}

.m-stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform .15s var(--ease);
    color: var(--ink);
}

.m-stat:active {
    transform: scale(.97);
}

.m-stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 17px;
    flex-shrink: 0;
}

.m-stat-info {
    min-width: 0;
}

.m-stat-info strong {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    color: var(--ink);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.m-stat-info span {
    font-size: 11.5px;
    color: var(--ink-muted);
}

/* ── Section common ───────────────────────────────────────────── */
.m-section {
    padding: 16px 0 8px;
}

.m-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px 12px;
}

.m-section-head h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16.5px;
    color: var(--ink);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.m-section-link {
    color: var(--brand-700);
    font-size: 12.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

/* ── 4. App Menu Grid (4-col) ─────────────────────────────────── */
.m-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 0 12px;
}

.m-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 6px;
    border-radius: var(--radius-lg);
    color: var(--ink);
    position: relative;
    transition: transform .15s var(--ease);
}

.m-menu-item:active {
    transform: scale(.94);
}

.m-menu-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
    transition: transform .2s var(--ease);
}

.m-menu-item:active .m-menu-icon {
    transform: rotate(-4deg);
}

.m-menu-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ink-2);
    text-align: center;
    line-height: 1.2;
}

.m-menu-badge {
    position: absolute;
    top: 6px;
    right: 12px;
    background: var(--rose-500);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 4px rgba(244, 63, 94, .4);
}

.m-menu-item-highlight .m-menu-icon {
    box-shadow: 0 8px 20px rgba(251, 191, 36, .35);
    animation: subtle-pulse 2s infinite;
}

@keyframes subtle-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ── 5. Horizontal scroll rows ────────────────────────────────── */
.m-scroll-row {
    display: flex;
    gap: 12px;
    padding: 0 16px 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.m-scroll-row::-webkit-scrollbar {
    display: none;
}

.m-news-card {
    flex: 0 0 240px;
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    color: var(--ink);
    transition: transform .15s var(--ease);
}

.m-news-card:active {
    transform: scale(.97);
}

.m-news-thumb {
    aspect-ratio: 16/10;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-2);
    position: relative;
}

.m-news-pin {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--rose-500);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 12px;
    box-shadow: 0 4px 8px rgba(244, 63, 94, .4);
}

.m-news-cat {
    position: absolute;
    bottom: 8px;
    left: 8px;
    color: #fff;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 10.5px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.m-news-body {
    padding: 12px;
}

.m-news-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    min-height: 38px;
}

.m-news-meta {
    font-size: 11px;
    color: var(--ink-muted);
    display: flex;
    gap: 4px;
    align-items: center;
}

/* ── 6. Quick Service Grid ─────────────────────────────────────── */
.m-quick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 16px;
}

.m-quick-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--ink);
    transition: transform .15s var(--ease);
    position: relative;
    overflow: hidden;
}

.m-quick-card::before {
    content: "";
    position: absolute;
    top: -10px;
    right: -10px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: currentColor;
    opacity: .06;
}

.m-quick-card:active {
    transform: scale(.97);
}

.m-quick-card i {
    font-size: 22px;
    margin-bottom: 6px;
}

.m-quick-card strong {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    color: var(--ink);
}

.m-quick-card span {
    font-size: 11.5px;
    color: var(--ink-muted);
}

/* ── 7. Activity scroll cards ──────────────────────────────────── */
.m-activity-card {
    flex: 0 0 200px;
    scroll-snap-align: start;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform .15s var(--ease);
}

.m-activity-card:active {
    transform: scale(.97);
}

.m-activity-thumb {
    aspect-ratio: 4/5;
    background-size: cover;
    background-position: center;
    background-color: var(--brand-800);
    position: relative;
}

.m-activity-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(15, 23, 42, .9));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
    color: #fff;
}

.m-activity-overlay strong {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.m-activity-overlay span {
    font-size: 11px;
    color: rgba(255, 255, 255, .85);
}

/* ── 8. Footer Info Card ──────────────────────────────────────── */
.m-footer-info {
    padding: 24px 16px;
}

.m-footer-card {
    background: linear-gradient(135deg, var(--brand-900), var(--brand-800));
    color: #fff;
    padding: 24px 18px;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .15);
}

.m-footer-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: #78350f;
    display: grid;
    place-items: center;
    font-size: 24px;
    margin: 0 auto 12px;
    box-shadow: 0 4px 12px rgba(251, 191, 36, .3);
}

.m-footer-card strong {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    color: #fff;
    margin-bottom: 6px;
}

.m-footer-card p {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .75);
    line-height: 1.5;
    margin-bottom: 14px;
}

.m-footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.m-footer-links a {
    background: rgba(255, 255, 255, .1);
    color: #fff;
    padding: 10px;
    border-radius: var(--radius-md);
    font-size: 12.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .15s;
}

.m-footer-links a:active {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.m-footer-copy {
    text-align: center;
    padding: 16px;
    font-size: 11px;
    color: var(--ink-muted);
}

.m-footer-copy a {
    color: var(--brand-700);
    font-weight: 600;
}

/* ════════════════════════════════════════════════════════════
   BOTTOM NAVIGATION
   ════════════════════════════════════════════════════════════ */
.m-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, .08);
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
    align-items: center;
    justify-content: space-around;
}

.m-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    min-width: 60px;
    color: var(--ink-muted);
    border: 0;
    background: transparent;
    transition: color .2s var(--ease);
    position: relative;
}

.m-nav-item i {
    font-size: 21px;
    transition: transform .2s var(--ease);
}

.m-nav-item span {
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1;
}

.m-nav-item:active i {
    transform: scale(.85);
}

.m-nav-item.is-active {
    color: var(--brand-700);
}

.m-nav-item.is-active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, var(--gold-400), var(--gold-500));
}

/* FAB-style center item (highlighted) */
.m-nav-item-fab {
    position: relative;
    margin-top: -22px;
    /* lift above nav */
}

.m-nav-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: #78350f;
    display: grid;
    place-items: center;
    font-size: 24px;
    box-shadow: 0 8px 20px rgba(251, 191, 36, .45);
    border: 4px solid #fff;
}

.m-nav-item-fab .m-nav-fab-label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--gold-600);
    margin-top: 4px;
}

.m-nav-item-fab:active .m-nav-fab {
    transform: scale(.92);
}

/* ════════════════════════════════════════════════════════════
   SEARCH OVERLAY (fullscreen modal)
   ════════════════════════════════════════════════════════════ */
.m-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: #fff;
    flex-direction: column;
    transform: translateY(-100%);
    transition: transform .3s var(--ease);
}

.m-search-overlay.is-open {
    display: flex;
    transform: translateY(0);
}

.m-search-form {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top));
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}

.m-search-back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: 22px;
    display: grid;
    place-items: center;
}

.m-search-input {
    flex: 1;
    border: 0;
    padding: 12px;
    font-size: 15px;
    font-family: var(--font-body);
    background: transparent;
    outline: 0;
    color: var(--ink);
}

.m-search-submit {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: var(--brand-700);
    color: #fff;
    font-size: 17px;
    display: grid;
    place-items: center;
}

.m-search-suggest {
    padding: 16px;
}

.m-search-suggest h4 {
    font-family: var(--font-display);
    font-size: 13px;
    color: var(--ink-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.m-search-suggest a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    font-size: 14.5px;
}

.m-search-suggest a i {
    color: var(--ink-muted);
}

/* ════════════════════════════════════════════════════════════
   BOTTOM SHEET (more menu)
   ════════════════════════════════════════════════════════════ */
.m-sheet {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
}

.m-sheet.is-open {
    display: block;
    pointer-events: auto;
}

.m-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    opacity: 0;
    transition: opacity .3s var(--ease);
    backdrop-filter: blur(4px);
}

.m-sheet.is-open .m-sheet-backdrop {
    opacity: 1;
}

.m-sheet-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 24px 24px 0 0;
    padding: 8px 0 calc(20px + env(safe-area-inset-bottom));
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform .3s var(--ease);
    box-shadow: 0 -12px 32px rgba(15, 23, 42, .25);
}

.m-sheet.is-open .m-sheet-content {
    transform: translateY(0);
}

.m-sheet-handle {
    width: 48px;
    height: 4px;
    background: var(--line-strong);
    border-radius: 2px;
    margin: 8px auto 12px;
}

.m-sheet-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    padding: 0 20px 16px;
    margin: 0;
    border-bottom: 1px solid var(--line);
}

.m-sheet-group {
    padding: 16px 8px 8px;
}

.m-sheet-group h4 {
    font-family: var(--font-display);
    font-size: 11.5px;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 0 12px 8px;
}

.m-sheet-group a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--ink);
    font-size: 14.5px;
    border-radius: 10px;
    transition: background .15s;
}

.m-sheet-group a:active {
    background: var(--surface-2);
}

.m-sheet-group a i {
    width: 24px;
    color: var(--brand-700);
    font-size: 17px;
}

.m-sheet-close {
    margin: 12px 16px 0;
    width: calc(100% - 32px);
    background: var(--surface-2);
    border: 0;
    padding: 14px;
    border-radius: var(--radius-lg);
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ink-muted);
    font-size: 14.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ════════════════════════════════════════════════════════════════════
   LANDING PAGE — Premium Pro Sections
   ════════════════════════════════════════════════════════════════════ */

/* ──── 1. PROMO BAR (sticky top) ──────────────────────── */
.promo-bar {
    background: linear-gradient(90deg, var(--gold-500), var(--gold-400), var(--gold-500));
    color: var(--brand-950);
    font-size: 13.5px;
    position: relative;
    overflow: hidden;
    animation: promo-slide-down .5s var(--ease-out);
}

.promo-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .4), transparent);
    animation: promo-shine 4s infinite;
}

@keyframes promo-shine {
    0% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes promo-slide-down {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.promo-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 48px;
    min-height: 36px;
    position: relative;
    z-index: 2;
}

.promo-bar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--brand-900);
    color: var(--gold-400);
    font-size: 11px;
    flex-shrink: 0;
    animation: pulse 1.8s infinite;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.promo-bar-scroll-container {
    flex: 1;
    width: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

.promo-bar-text {
    display: inline-block;
    color: var(--brand-950);
    font-weight: 600;
    white-space: nowrap;
    will-change: transform;
    animation: marquee-scroll 25s linear infinite;
    padding-left: 10%;
}

.promo-bar-text:hover {
    color: var(--brand-950);
    text-decoration: underline;
    animation-play-state: paused;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.promo-bar-close {
    background: rgba(0, 0, 0, .1);
    border: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--brand-950);
    flex-shrink: 0;
    transition: background .2s;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}

.promo-bar-close:hover {
    background: rgba(0, 0, 0, .25);
}

/* ──── 2. WHY CHOOSE US — Feature Cards ───────────────── */
.features-section {
    background: linear-gradient(180deg, #fff 0%, var(--surface-2) 100%);
    padding: 64px 0;
    position: relative;
    overflow: hidden;
}

.features-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(251, 191, 36, .08), transparent 60%);
    pointer-events: none;
}

.features-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.features-header .section-eyebrow {
    justify-content: center;
}

.features-header .section-title strong {
    background: linear-gradient(135deg, var(--gold-500), var(--brand-700));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-subtitle {
    color: var(--ink-muted);
    font-size: 16px;
    margin-top: 8px;
}

.features-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    position: relative;
}

.feature-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
    transition: all .35s var(--ease);
    text-align: center;
    cursor: default;
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--fc, var(--brand-700));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s var(--ease);
}

.feature-card::after {
    content: "";
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--fc, var(--brand-700));
    opacity: .04;
    transition: all .35s var(--ease);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, .12);
    border-color: var(--fc, var(--brand-300));
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover::after {
    transform: scale(1.4);
    opacity: .08;
}

.feature-icon-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.feature-icon {
    position: relative;
    z-index: 2;
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--fc) 12%, white), color-mix(in srgb, var(--fc) 22%, white));
    color: var(--fc, var(--brand-700));
    display: grid;
    place-items: center;
    font-size: 32px;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--fc) 25%, transparent);
    transition: all .35s var(--ease-bounce);
}

.feature-card:hover .feature-icon {
    transform: rotate(-8deg) scale(1.1);
}

.feature-icon-glow {
    position: absolute;
    inset: -8px;
    border-radius: 24px;
    background: radial-gradient(circle, color-mix(in srgb, var(--fc) 30%, transparent), transparent 60%);
    opacity: 0;
    transition: opacity .3s;
}

.feature-card:hover .feature-icon-glow {
    opacity: 1;
}

.feature-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    color: var(--ink);
    margin-bottom: 8px;
}

.feature-desc {
    font-size: 14px;
    color: var(--ink-muted);
    line-height: 1.6;
}

.feature-arrow {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--fc, var(--brand-700));
    display: grid;
    place-items: center;
    opacity: 0;
    transform: translateX(-8px);
    transition: all .3s var(--ease);
}

.feature-card:hover .feature-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ──── 3. AWARDS SHOWCASE ──────────────────────────────── */
.awards-section {
    background: linear-gradient(180deg, var(--surface-2) 0%, #fffbeb 100%);
}

.awards-track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 20px;
}

.award-card {
    background: #fff;
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
    border: 1px solid var(--line);
    transition: all .35s var(--ease);
    text-decoration: none;
    color: var(--ink);
}

.award-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, .15);
    border-color: var(--gold-400);
    color: var(--ink);
}

.award-medal {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-300), var(--gold-500), var(--gold-600));
    color: #78350f;
    display: grid;
    place-items: center;
    font-size: 22px;
    box-shadow: 0 8px 16px rgba(251, 191, 36, .45);
    border: 3px solid #fff;
    transform: rotate(-12deg);
    transition: transform .3s var(--ease-bounce);
}

.award-card:hover .award-medal {
    transform: rotate(0deg) scale(1.1);
}

.award-cover {
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: var(--brand-700);
    position: relative;
    overflow: hidden;
}

.award-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(15, 23, 42, .6));
}

.award-cat {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 2;
    color: #fff;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.award-body {
    padding: 18px 20px 20px;
}

.award-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.4;
    color: var(--ink);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.award-card:hover .award-title {
    color: var(--brand-700);
}

.award-excerpt {
    color: var(--ink-muted);
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.award-meta {
    display: flex;
    gap: 12px;
    font-size: 11.5px;
    color: var(--ink-muted);
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

/* ──── 4. CTA BANNER ───────────────────────────────────── */
.cta-banner {
    padding: 32px 0;
    position: relative;
}

.cta-banner-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: center;
    background:
        radial-gradient(60% 80% at 100% 0%, rgba(251, 191, 36, .25), transparent 60%),
        radial-gradient(50% 80% at 0% 100%, rgba(59, 130, 246, .25), transparent 60%),
        linear-gradient(135deg, var(--brand-900) 0%, var(--brand-800) 50%, var(--brand-700) 100%);
    color: #fff;
    border-radius: var(--radius-2xl);
    padding: 44px 48px;
    box-shadow: 0 24px 48px rgba(30, 58, 138, .25);
    overflow: hidden;
    position: relative;
}

.cta-banner-bg {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent 0 60px, rgba(255, 255, 255, .025) 60px 61px);
    pointer-events: none;
}

.cta-banner-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
}

.cta-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(251, 191, 36, .25);
    color: var(--gold-300);
    border: 1px solid rgba(251, 191, 36, .4);
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 14px;
    backdrop-filter: blur(8px);
}

.cta-banner h2 {
    color: #fff;
    font-size: clamp(22px, 3vw, 32px);
    line-height: 1.3;
    margin-bottom: 8px;
}

.cta-banner h2 strong {
    background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.cta-banner p {
    color: rgba(255, 255, 255, .85);
    font-size: 15px;
    margin-bottom: 20px;
}

.cta-banner-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    color: #78350f;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    border: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 8px 20px rgba(251, 191, 36, .4);
    transition: all .25s var(--ease);
    text-decoration: none;
}

.btn-cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(251, 191, 36, .55);
    color: #78350f;
}

.btn-cta-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .25);
    padding: 11px 22px;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    backdrop-filter: blur(8px);
    transition: all .25s var(--ease);
    text-decoration: none;
}

.btn-cta-ghost:hover {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.cta-banner-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    position: relative;
    z-index: 2;
    padding-left: 32px;
    border-left: 1px solid rgba(255, 255, 255, .15);
}

.cta-stat-item {
    text-align: center;
}

.cta-stat-item strong {
    display: block;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 32px;
    color: var(--gold-300);
    line-height: 1;
    text-shadow: 0 4px 16px rgba(251, 191, 36, .35);
    font-variant-numeric: tabular-nums;
}

.cta-stat-item span {
    font-size: 11.5px;
    color: rgba(255, 255, 255, .8);
}

@media (max-width: 820px) {
    .cta-banner-inner {
        grid-template-columns: 1fr;
        padding: 32px 24px;
    }

    .cta-banner-stats {
        padding-left: 0;
        border-left: 0;
        padding-top: 24px;
        border-top: 1px solid rgba(255, 255, 255, .15);
    }

    .cta-stat-item strong {
        font-size: 24px;
    }
}

/* ──── 5. PHOTO GALLERY MASONRY ────────────────────────── */
.gallery-section {
    padding-bottom: 64px;
}

.gallery-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 160px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    background-size: cover;
    background-position: center;
    background-color: var(--surface-2);
    overflow: hidden;
    transition: transform .35s var(--ease);
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item.g-big {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item.g-tall {
    grid-row: span 2;
}

.gallery-item.g-wide {
    grid-column: span 2;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, .85));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    color: #fff;
    opacity: 0;
    transition: opacity .3s var(--ease);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-icon {
    align-self: flex-start;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(251, 191, 36, .9);
    color: #78350f;
    display: grid;
    place-items: center;
    font-size: 16px;
    margin-bottom: auto;
    transform: scale(0);
    transition: transform .3s var(--ease-bounce) .1s;
}

.gallery-item:hover .gallery-icon {
    transform: scale(1);
}

.gallery-overlay strong {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    line-height: 1.4;
    color: #fff;
    margin-bottom: 4px;
    transform: translateY(8px);
    transition: transform .3s var(--ease) .15s;
}

.gallery-item:hover .gallery-overlay strong {
    transform: translateY(0);
}

.gallery-date {
    font-size: 11.5px;
    color: rgba(255, 255, 255, .85);
    transform: translateY(8px);
    transition: transform .3s var(--ease) .2s;
}

.gallery-item:hover .gallery-date {
    transform: translateY(0);
}

@media (max-width: 720px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 140px;
    }

    .gallery-item.g-big {
        grid-column: span 2;
        grid-row: span 2;
    }

    .gallery-item.g-wide {
        grid-column: span 2;
        grid-row: span 1;
    }

    .gallery-item.g-tall {
        grid-row: span 1;
    }

    .gallery-overlay {
        opacity: 1;
        background: linear-gradient(180deg, transparent 50%, rgba(15, 23, 42, .9));
    }

    .gallery-icon {
        transform: scale(1);
    }

    .gallery-overlay strong,
    .gallery-date {
        transform: translateY(0);
    }
}

/* ──── 6. FLOATING CTA ────────────────────────────────── */
.floating-cta {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: auto;
    z-index: 45;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px 12px 14px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500), var(--gold-600));
    color: #78350f;
    border-radius: var(--radius-full);
    box-shadow: 0 12px 28px rgba(251, 191, 36, .5), 0 0 0 0 rgba(251, 191, 36, .35);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14.5px;
    text-decoration: none;
    animation: floating-cta-pulse 2.5s infinite;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

@keyframes floating-cta-pulse {

    0%,
    100% {
        box-shadow: 0 12px 28px rgba(251, 191, 36, .5), 0 0 0 0 rgba(251, 191, 36, .5);
    }

    50% {
        box-shadow: 0 12px 28px rgba(251, 191, 36, .5), 0 0 0 16px rgba(251, 191, 36, 0);
    }
}

.floating-cta:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 18px 36px rgba(251, 191, 36, .6);
    color: #78350f;
}

.floating-cta-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .35);
    display: grid;
    place-items: center;
    font-size: 17px;
    backdrop-filter: blur(8px);
    flex-shrink: 0;
}

.floating-cta:hover .floating-cta-icon {
    animation: floating-cta-spin 1s linear infinite;
}

@keyframes floating-cta-spin {
    100% {
        transform: rotate(360deg);
    }
}

.floating-cta-text {
    white-space: nowrap;
}

/* On mobile (when bottom nav exists), shift floating CTA up */
@media (max-width: 768px) {
    .floating-cta {
        bottom: calc(92px + env(safe-area-inset-bottom));
        left: 16px;
        right: auto;
        padding: 10px 16px 10px 12px;
        font-size: 13px;
    }

    .floating-cta-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

/* ════════════════════════════════════════════════════════════
   PREMIUM ADD-ONS — Dark Mode UI · Command Palette · Lightbox · PWA
   ════════════════════════════════════════════════════════════ */

/* ──── 1. Theme Toggle button (header) ──────────────────── */
.header-theme-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface-2);
    display: grid;
    place-items: center;
    color: var(--ink);
    font-size: 17px;
    cursor: pointer;
    transition: all .25s var(--ease);
    position: relative;
    overflow: hidden;
}

.header-theme-btn:hover {
    transform: scale(1.08);
    border-color: var(--gold-400);
}

.header-theme-btn .theme-icon-light,
.header-theme-btn .theme-icon-dark {
    position: absolute;
    transition: all .35s var(--ease-bounce);
}

.header-theme-btn .theme-icon-light {
    color: var(--gold-500);
    transform: rotate(0);
    opacity: 1;
}

.header-theme-btn .theme-icon-dark {
    color: var(--brand-700);
    transform: rotate(-90deg);
    opacity: 0;
}

[data-theme="dark"] .header-theme-btn .theme-icon-light {
    transform: rotate(90deg);
    opacity: 0;
}

[data-theme="dark"] .header-theme-btn .theme-icon-dark {
    color: #fde68a;
    transform: rotate(0);
    opacity: 1;
}

/* ──── 2. ⌘K Header Button ──────────────────────────────── */
.header-cmdk-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 8px 14px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    color: var(--ink-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s var(--ease);
}

.header-cmdk-btn:hover {
    background: var(--surface-3);
    color: var(--ink);
    border-color: var(--brand-300);
}

.header-cmdk-btn i {
    color: var(--brand-700);
    font-size: 15px;
}

.header-cmdk-kbd {
    background: var(--surface);
    color: var(--ink-muted);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 2px 7px;
    font-size: 11px;
    font-family: ui-monospace, monospace;
    font-weight: 600;
    box-shadow: 0 1px 0 var(--line);
}

[data-theme="dark"] .header-cmdk-kbd {
    background: var(--surface-2);
    color: var(--ink);
}

@media (max-width: 980px) {

    .header-cmdk-text,
    .header-cmdk-kbd {
        display: none;
    }

    .header-cmdk-btn {
        padding: 8px;
        width: 42px;
        height: 42px;
        justify-content: center;
        border-radius: 50%;
    }
}

/* ──── 3. Reading Progress Bar ──────────────────────────── */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--brand-500), var(--gold-400), var(--brand-700));
    z-index: 9999;
    pointer-events: none;
    transition: width .1s linear;
    box-shadow: 0 1px 8px rgba(251, 191, 36, .5);
}

/* ──── 4. Command Palette (⌘K Spotlight) ────────────────── */
.cmdk {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    opacity: 0;
    transition: opacity .2s var(--ease);
}

.cmdk.is-open {
    display: flex;
    opacity: 1;
}

.cmdk-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .65);
    backdrop-filter: blur(8px);
}

.cmdk-panel {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 640px;
    margin: 0 16px;
    background: var(--surface);
    border-radius: 18px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .05);
    overflow: hidden;
    transform: scale(.96);
    transition: transform .25s var(--ease-bounce);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.cmdk.is-open .cmdk-panel {
    transform: scale(1);
}

.cmdk-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.cmdk-search-icon {
    color: var(--ink-muted);
    font-size: 18px;
}

.cmdk-input {
    flex: 1;
    border: 0;
    background: transparent;
    font-size: 16px;
    color: var(--ink);
    outline: 0;
    font-family: var(--font-body);
}

.cmdk-input::placeholder {
    color: var(--ink-soft);
}

.cmdk-esc {
    background: var(--surface-2);
    color: var(--ink-muted);
    border: 1px solid var(--line);
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-family: ui-monospace, monospace;
    font-weight: 600;
}

.cmdk-results {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    scrollbar-width: thin;
}

.cmdk-results::-webkit-scrollbar {
    width: 6px;
}

.cmdk-results::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 3px;
}

.cmdk-group {
    padding: 8px 12px 4px;
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.cmdk-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--ink);
    cursor: pointer;
    text-decoration: none;
    transition: background .1s;
    border: 0;
    background: transparent;
    width: 100%;
    text-align: left;
    font-family: var(--font-body);
    font-size: 14px;
}

.cmdk-item:hover,
.cmdk-item.is-selected {
    background: var(--brand-50);
    color: var(--ink);
}

[data-theme="dark"] .cmdk-item:hover,
[data-theme="dark"] .cmdk-item.is-selected {
    background: rgba(96, 165, 250, .15);
}

.cmdk-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--brand-700);
    display: grid;
    place-items: center;
    font-size: 15px;
    flex-shrink: 0;
}

[data-theme="dark"] .cmdk-item-icon {
    background: var(--surface-3);
    color: #93c5fd;
}

.cmdk-item-text {
    flex: 1;
    min-width: 0;
}

.cmdk-item-text strong {
    display: block;
    font-weight: 500;
    line-height: 1.3;
}

.cmdk-item-text span {
    font-size: 11.5px;
    color: var(--ink-muted);
}

.cmdk-item-arrow {
    color: var(--ink-soft);
    font-size: 13px;
}

.cmdk-item.is-selected .cmdk-item-arrow {
    color: var(--brand-700);
}

.cmdk-item-shortcut {
    background: var(--surface-2);
    color: var(--ink-muted);
    border: 1px solid var(--line);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 10.5px;
    font-family: ui-monospace, monospace;
    font-weight: 600;
}

.cmdk-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--ink-muted);
}

.cmdk-empty i {
    font-size: 36px;
    margin-bottom: 8px;
    display: block;
    opacity: .4;
}

.cmdk-empty strong {
    display: block;
    color: var(--ink);
    margin-bottom: 4px;
    font-family: var(--font-display);
}

.cmdk-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
    font-size: 11px;
    color: var(--ink-muted);
}

.cmdk-hints {
    display: flex;
    gap: 12px;
}

.cmdk-hints kbd {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-family: ui-monospace, monospace;
    margin-right: 2px;
}

.cmdk-brand {
    color: var(--brand-700);
    font-weight: 600;
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

@media (max-width: 540px) {
    .cmdk {
        padding-top: 0;
        align-items: flex-end;
    }

    .cmdk-panel {
        margin: 0;
        border-radius: 18px 18px 0 0;
        max-height: 92vh;
        width: 100%;
    }

    .cmdk-hints span:nth-child(2) {
        display: none;
    }
}

/* ──── 5. Image Lightbox ────────────────────────────────── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, .92);
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity .3s var(--ease);
}

.lightbox.is-open {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    z-index: 2;
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    transform: scale(.92);
    transition: transform .35s var(--ease-bounce);
}

.lightbox.is-open .lightbox-content {
    transform: scale(1);
}

.lightbox img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
    display: block;
}

.lightbox-caption {
    color: rgba(255, 255, 255, .9);
    font-size: 14px;
    text-align: center;
    max-width: 720px;
    background: rgba(0, 0, 0, .4);
    padding: 8px 16px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .08);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .15);
    display: grid;
    place-items: center;
    font-size: 18px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all .2s var(--ease);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, .2);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .15);
    display: grid;
    place-items: center;
    font-size: 22px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all .2s var(--ease);
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

.lightbox-nav:hover {
    background: rgba(251, 191, 36, .85);
    color: #78350f;
}

.lightbox-counter {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 3;
    background: rgba(0, 0, 0, .4);
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .08);
}

@media (max-width: 720px) {

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
    }

    .lightbox-counter {
        top: 12px;
        left: 12px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* ──── 6. PWA Install Prompt ────────────────────────────── */
.pwa-prompt {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 100;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 480px;
    width: calc(100% - 32px);
    transition: transform .4s var(--ease-bounce);
    backdrop-filter: blur(12px);
}

.pwa-prompt.is-shown {
    transform: translateX(-50%) translateY(0);
}

.pwa-prompt-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-800));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 22px;
    flex-shrink: 0;
}

.pwa-prompt-text {
    flex: 1;
    min-width: 0;
}

.pwa-prompt-text strong {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    color: var(--ink);
}

.pwa-prompt-text span {
    font-size: 12px;
    color: var(--ink-muted);
}

.pwa-prompt-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.pwa-btn-skip {
    background: transparent;
    border: 0;
    color: var(--ink-muted);
    font-size: 12.5px;
    padding: 8px 12px;
    cursor: pointer;
}

.pwa-btn-install {
    background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
    color: #fff;
    border: 0;
    padding: 8px 16px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(30, 58, 138, .35);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pwa-btn-install:hover {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .pwa-prompt {
        bottom: calc(80px + env(safe-area-inset-bottom));
    }
}

/* ──── 25. PRINT ────────────────────────────────────────────────── */
@media print {

    .topbar,
    .site-header,
    .main-nav,
    .news-ticker,
    .site-footer,
    .cookie-banner,
    .back-to-top,
    .hero-controls {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    @page {
        size: A4 portrait;
        margin: 16mm 14mm;
    }
}

/* ── Inline Edit Pins (admin/editor เท่านั้น — render server-side) ── */
main .container:has(> .edit-pin),
main section:has(> .edit-pin) {
    position: relative;
}

.edit-pin {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 25;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: #3a2a00;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
    border: 2px solid rgba(255, 255, 255, .6);
    transition: width .25s cubic-bezier(.2, .8, .2, 1), transform .15s, box-shadow .2s, opacity .2s;
    font-size: 15px;
    /* ซ่อนไว้ก่อน — โผล่เมื่อชี้เมาส์บน section (ลดความรก) */
    opacity: 0;
    pointer-events: none;
}

main .container:hover>.edit-pin,
main section:hover>.edit-pin {
    opacity: 1;
    pointer-events: auto;
}

/* อุปกรณ์สัมผัส (ไม่มี hover) → แสดงจาง ๆ ให้กดได้ */
@media (hover: none) {
    .edit-pin {
        opacity: .85;
        pointer-events: auto;
    }
}

.edit-pin:hover {
    width: auto;
    padding: 0 18px 0 13px;
    transform: translateY(-2px);
    color: #3a2a00;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
}

.edit-pin .edit-pin-label {
    max-width: 0;
    opacity: 0;
    white-space: nowrap;
    margin-left: 0;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-display);
    transition: max-width .25s, opacity .2s, margin .25s;
}

.edit-pin:hover .edit-pin-label {
    max-width: 240px;
    opacity: 1;
    margin-left: 8px;
}

@media print {
    .edit-pin {
        display: none !important;
    }
}

/* การ์ด Why Choose Us ที่เป็นลิงก์ — คงสไตล์เดิม + คลิกได้ */
a.feature-card {
    text-decoration: none;
    color: inherit;
    display: block
}

a.feature-card.is-linked {
    cursor: pointer
}

/* ════════════════════════════════════════════════════════════
   SATHIT WITTHAYA SCHOOL — 5-Star Premium Pro Enhancements
   ════════════════════════════════════════════════════════════ */

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.hover-lift:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 20px 38px -12px rgba(126, 34, 206, 0.12), 0 8px 16px -8px rgba(126, 34, 206, 0.08) !important;
}

/* Shimmer Hover effect for Cards */
.shimmer-hover {
    position: relative;
    overflow: hidden;
}

.shimmer-hover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    background-size: 200% 100%;
    transform: translateX(-100%);
    pointer-events: none;
    transition: transform 0.6s;
}

.shimmer-hover:hover::after {
    transform: translateX(100%);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Stagger Load Animations */
@keyframes stagger-load {
    0% {
        opacity: 0;
        transform: translateY(16px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.stagger-item {
    opacity: 0;
    animation: stagger-load 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.stagger-item:nth-child(1) {
    animation-delay: 0.05s;
}

.stagger-item:nth-child(2) {
    animation-delay: 0.12s;
}

.stagger-item:nth-child(3) {
    animation-delay: 0.19s;
}

.stagger-item:nth-child(4) {
    animation-delay: 0.26s;
}

.stagger-item:nth-child(5) {
    animation-delay: 0.33s;
}

.stagger-item:nth-child(6) {
    animation-delay: 0.4s;
}

/* Custom Glow effects for buttons and links */
.btn-premium {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800)) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(126, 34, 206, 0.2) !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--ease) !important;
}

.btn-premium:hover {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700)) !important;
    box-shadow: 0 8px 20px rgba(126, 34, 206, 0.35) !important;
    transform: translateY(-1px);
}

/* 🎧 FLOATING BACKGROUND MUSIC PLAYER (5-Star Premium Pro) */
.floating-music-player {
    position: fixed;
    left: 24px;
    bottom: 84px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(22, 163, 74, 0.2);
    padding: 6px 12px 6px 6px;
    border-radius: 40px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 0 12px rgba(22, 163, 74, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateX(-150px);
    opacity: 0;
}

.floating-music-player.show {
    transform: translateX(0);
    opacity: 1;
}

.music-toggle-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.25);
    transition: all 0.25s;
    font-size: 14px;
}

.music-toggle-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 5px 14px rgba(22, 163, 74, 0.35);
}

.music-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-2);
    font-family: var(--font-display);
    white-space: nowrap;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-wave {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
    width: 12px;
    margin-left: 2px;
}

.music-wave-bar {
    width: 2px;
    background: var(--brand-500);
    border-radius: 1px;
    height: 2px;
    transform-origin: bottom;
}

.floating-music-player.playing .music-wave-bar {
    animation: music-wave-bounce 0.8s ease-in-out infinite alternate;
}

.floating-music-player.playing .music-wave-bar:nth-child(1) {
    animation-delay: 0.1s;
}

.floating-music-player.playing .music-wave-bar:nth-child(2) {
    animation-delay: 0.3s;
}

.floating-music-player.playing .music-wave-bar:nth-child(3) {
    animation-delay: 0.5s;
}

@keyframes music-wave-bounce {
    0% {
        transform: scaleY(1);
    }

    100% {
        transform: scaleY(4.5);
    }
}

@media (max-width: 576px) {
    .floating-music-player {
        left: 16px;
        bottom: 74px;
        padding: 5px 8px 5px 5px;
    }

    .music-title {
        max-width: 75px;
        font-size: 10px;
    }
}

/* ════════════════════════════════════════════════════════════════════
   5-STAR PREMIUM PRO MOBILE TYPOGRAPHY & READABILITY ENHANCEMENTS
   ════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

    /* Page hero header on mobile */
    .page-hero {
        padding: 36px 0 42px;
    }

    .page-hero h1 {
        font-size: clamp(22px, 6vw, 30px);
        line-height: 1.35;
        margin-bottom: 8px;
    }

    .page-hero p {
        font-size: 14.5px;
        line-height: 1.6;
        opacity: 0.9;
    }

    .breadcrumbs {
        font-size: 12px;
        gap: 6px;
        margin-bottom: 12px;
    }

    /* Reading Content Improvements (subpages) */
    .content {
        font-size: 15.5px;
        line-height: 1.75;
    }

    .content h2 {
        font-size: 20px;
        margin-top: 22px;
        margin-bottom: 10px;
    }

    .content h3 {
        font-size: 17.5px;
        margin-top: 18px;
        margin-bottom: 8px;
    }

    .content p {
        margin-bottom: 14px;
    }

    .content img {
        border-radius: 14px;
        margin: 14px 0;
    }

    /* Auto-wrap tables in horizontal scroll on mobile */
    .content table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
        margin: 16px 0;
    }

    /* Tab navigation buttons on mobile */
    .d-flex.gap-2.mb-5 {
        gap: 6px !important;
        margin-bottom: 20px !important;
    }

    .d-flex.gap-2.mb-5 .btn {
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 999px;
    }

    /* Cards spacing & padding on mobile */
    .section {
        padding: 36px 0;
    }

    .section-tight {
        padding: 28px 0;
    }

    .section-header {
        margin-bottom: 24px;
    }

    .section-title {
        font-size: clamp(20px, 5vw, 28px);
    }
}