
:root {
    --bg: #020914;
    --surface: #081c31;
    --surface2: #0b2845;
    --text: #f7fbff;
    --muted: #8ca5b9;
    --blue: #2d96ff;
    --blue2: #67c6ff;
    --green: #63e6b2;
    --border: rgba(126,193,246,.13);
    --soft-border: rgba(255,255,255,.055);
    --shadow: 0 26px 70px rgba(0,0,0,.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);

    font-family:
        Inter,
        "Noto Sans Thai",
        "Segoe UI",
        system-ui,
        sans-serif;

    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

.event-shell {
    width: min(
        1080px,
        calc(100% - 72px)
    );

    margin-inline: auto;
}


/* HEADER */

.event-header {
    position: sticky;
    z-index: 100;
    top: 0;

    background:
        rgba(2,9,20,.88);

    border-bottom:
        1px solid
        var(--soft-border);

    backdrop-filter:
        blur(20px);
}

.event-header-inner {
    min-height: 74px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.event-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-brand img {
    width: 42px;
    height: 42px;

    object-fit: contain;
}

.event-brand strong {
    font-size: 12px;
}

.event-header-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.event-header-links a {
    padding:
        9px 11px;

    border-radius: 10px;

    color: #9eb3c4;

    font-size: 10px;
}

.event-header-chat {
    color: white !important;

    background:
        rgba(43,148,255,.11);

    border:
        1px solid
        rgba(70,166,255,.17);
}


/* INTRO */

.event-intro {
    padding:
        70px 0 32px;

    background:
        radial-gradient(
            circle at 70% 0,
            rgba(40,145,255,.08),
            transparent 30%
        );
}

.event-intro-copy {
    max-width: 820px;
}

.event-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.event-category,
.event-open {
    min-height: 28px;

    padding:
        0 10px;

    display: inline-flex;
    align-items: center;

    border-radius: 999px;

    font-size: 8px;

    font-weight: 850;

    letter-spacing: .10em;
}

.event-category {
    color: var(--blue2);

    background:
        rgba(43,148,255,.065);

    border:
        1px solid
        rgba(79,168,246,.13);
}

.event-open {
    color: var(--green);

    background:
        rgba(55,208,151,.06);

    border:
        1px solid
        rgba(72,223,165,.12);
}

.event-intro h1 {
    margin:
        14px 0 13px;

    max-width: 820px;

    font-size:
        clamp(
            36px,
            5vw,
            56px
        );

    line-height: 1.10;

    letter-spacing: -.045em;
}

.event-intro-copy > p {
    margin: 0;

    max-width: 740px;

    color: #9db2c3;

    font-size: 13px;

    line-height: 1.75;
}


/* COVER */

.event-cover-section {
    padding-bottom: 30px;
}

.event-cover {
    overflow: hidden;

    border-radius: 24px;

    background: var(--surface);

    border:
        1px solid
        var(--border);

    box-shadow:
        var(--shadow);
}

.event-cover img {
    width: 100%;

    max-height: 720px;

    display: block;

    object-fit: contain;

    background:
        #030913;
}


/* INFO */

.event-info-section {
    padding:
        0 0 34px;
}

.event-info-grid {
    display: flex;

    flex-wrap: wrap;

    gap: 9px;
}

.event-info-item {
    min-width: 150px;

    padding:
        12px 14px;

    display: grid;

    gap: 4px;

    border-radius: 13px;

    background:
        rgba(255,255,255,.025);

    border:
        1px solid
        rgba(255,255,255,.045);
}

.event-info-item small {
    color: #6c859b;

    font-size: 7px;

    font-weight: 850;

    letter-spacing: .11em;
}

.event-info-item strong {
    font-size: 10px;

    line-height: 1.45;
}


/* CONTENT */

.event-content-section {
    padding:
        45px 0 85px;
}

.event-content-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        280px;

    gap: 45px;
}

.event-main {
    min-width: 0;
}

.event-block {
    margin-bottom: 62px;
}

.event-eyebrow {
    color: var(--blue2);

    font-size: 8px;

    font-weight: 850;

    letter-spacing: .13em;
}

.event-block h2 {
    margin:
        6px 0 20px;

    font-size:
        clamp(
            28px,
            4vw,
            38px
        );

    letter-spacing: -.035em;
}

.event-rich-content {
    max-width: 760px;

    color: #b2c3d0;

    font-size: 13px;

    line-height: 1.92;
}


/* GALLERY */

.event-gallery {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 11px;
}

.event-gallery-item {
    overflow: hidden;

    display: block;

    border-radius: 16px;

    background: var(--surface);

    border:
        1px solid
        var(--border);
}

.event-gallery-item img {
    width: 100%;

    aspect-ratio:
        4 / 3;

    display: block;

    object-fit: cover;
}

.event-gallery-item span {
    padding:
        10px 12px;

    display: block;

    color: var(--muted);

    font-size: 9px;

    line-height: 1.5;
}


/* VIDEO */

.event-video-list {
    display: grid;

    gap: 13px;
}

.event-video-frame {
    overflow: hidden;

    aspect-ratio:
        16 / 9;

    border-radius: 18px;

    background: #02060c;

    border:
        1px solid
        var(--border);
}

.event-video-frame iframe {
    width: 100%;
    height: 100%;

    border: 0;
}

.event-video-link {
    min-height: 130px;

    padding: 20px;

    display: flex;
    align-items: center;

    gap: 18px;

    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            #0b2a47,
            #061522
        );

    border:
        1px solid
        var(--border);
}

.event-play {
    width: 50px;
    height: 50px;

    flex: 0 0 auto;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background:
        rgba(43,148,255,.20);

    color: var(--blue2);
}

.event-video-link > div:last-child {
    display: grid;

    gap: 4px;
}

.event-video-link small {
    color: var(--blue2);

    font-size: 8px;

    font-weight: 850;
}

.event-video-link strong {
    font-size: 14px;
}

.event-video-link span {
    color: var(--muted);

    font-size: 9px;
}


/* CHAT CARD */

.event-aside {
    min-width: 0;
}

.event-chat-card {
    position: sticky;

    top: 100px;

    padding: 22px;

    border-radius: 20px;

    background:
        radial-gradient(
            circle at 100% 0,
            rgba(54,159,255,.14),
            transparent 35%
        ),
        var(--surface);

    border:
        1px solid
        var(--border);
}

.event-chat-card small {
    color: var(--blue2);

    font-size: 8px;

    font-weight: 850;

    letter-spacing: .12em;
}

.event-chat-card h3 {
    margin:
        8px 0 8px;

    font-size: 22px;
}

.event-chat-card p {
    margin:
        0 0 18px;

    color: var(--muted);

    font-size: 10px;

    line-height: 1.7;
}

.event-chat-card a {
    min-height: 42px;

    width: 100%;

    padding:
        0 14px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            #2d9cff,
            #155bd2
        );

    font-size: 10px;

    font-weight: 800;
}


/* FOOTER */

.event-footer {
    padding:
        28px 0 50px;

    border-top:
        1px solid
        var(--soft-border);
}

.event-footer .event-shell {
    display: flex;

    justify-content: space-between;

    gap: 20px;
}

.event-footer strong {
    font-size: 11px;
}

.event-footer span {
    color: var(--muted);

    font-size: 8px;
}


/* TABLET */

@media (max-width: 900px) {

    .event-shell {
        width:
            min(
                100% - 48px,
                1080px
            );
    }

    .event-content-layout {
        grid-template-columns: 1fr;
    }

    .event-chat-card {
        position: static;
    }

}


/* MOBILE */

@media (max-width: 640px) {

    .event-shell {
        width:
            calc(100% - 32px);
    }

    .event-header-inner {
        min-height: 66px;
    }

    .event-brand strong {
        font-size: 11px;
    }

    .event-header-links > a:first-child {
        display: none;
    }


    .event-intro {
        padding:
            42px 0 23px;
    }

    .event-intro h1 {
        font-size:
            clamp(
                30px,
                9vw,
                38px
            );

        line-height: 1.15;
    }

    .event-intro-copy > p {
        font-size: 11px;
    }


    .event-cover {
        border-radius: 18px;
    }

    .event-cover img {
        max-height: none;
    }


    .event-info-grid {
        display: grid;

        grid-template-columns:
            1fr 1fr;
    }

    .event-info-item {
        min-width: 0;
    }


    .event-content-section {
        padding:
            34px 0 65px;
    }

    .event-block {
        margin-bottom: 48px;
    }

    .event-block h2 {
        font-size: 28px;
    }

    .event-rich-content {
        font-size: 12px;
    }


    .event-gallery {
        grid-template-columns: 1fr;
    }


    .event-video-link {
        align-items: flex-start;

        flex-direction: column;
    }


    .event-chat-card {
        padding: 20px;
    }


    .event-footer .event-shell {
        flex-direction: column;
    }

}


/* ==========================================================
   v1.3 Typography + Media Balance
   ========================================================== */

.event-intro h1 {
    font-size: clamp(34px, 4.2vw, 48px);
    max-width: 780px;
}

.event-intro-copy > p {
    font-size: 15px;
    line-height: 1.75;
    max-width: 760px;
}

.event-cover-section {
    padding-bottom: 24px;
}

.event-cover {
    border-radius: 20px;
}

.event-info-item strong {
    font-size: 12px;
}

.event-block h2 {
    font-size: clamp(28px, 3.2vw, 34px);
}

.event-rich-content {
    font-size: 15px;
    line-height: 1.82;
}

.event-chat-card p {
    font-size: 12px;
}

.event-gallery {
    display: grid;
}

.event-gallery-item img {
    aspect-ratio: auto;
}

.event-video-frame {
    aspect-ratio: 16 / 9;
}

@media (max-width: 640px) {

    .event-intro h1 {
        font-size: clamp(30px, 8.5vw, 34px);
    }

    .event-intro-copy > p {
        font-size: 13px;
    }

    .event-block h2 {
        font-size: 27px;
    }

    .event-rich-content {
        font-size: 14px;
        line-height: 1.78;
    }

    .event-info-item strong {
        font-size: 11px;
    }
}


/* ==========================================================
   Event Polish v1.3.1
   Typography hierarchy + gallery density
   ========================================================== */

.event-intro h1 {
    font-size: clamp(40px, 4vw, 44px);
    line-height: 1.12;
    max-width: 760px;
}

.event-intro-copy > p {
    font-size: 15px;
    line-height: 1.78;
    max-width: 760px;
}

.event-info-item strong {
    font-size: 13px;
}

.event-block h2 {
    font-size: clamp(30px, 3vw, 32px);
    line-height: 1.15;
}

.event-rich-content {
    font-size: 16px;
    line-height: 1.82;
    max-width: 760px;
}

.event-chat-card p {
    font-size: 12px;
    line-height: 1.72;
}

/* One image: centered, not oversized */
.event-gallery.gallery-count-1 {
    display: block;
}

.event-gallery.gallery-count-1 .event-gallery-item {
    width: min(680px, 100%);
    margin-inline: auto;
}

/* Two images: clean 2-column layout */
.event-gallery.gallery-count-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.event-gallery.gallery-count-2 .event-gallery-item {
    grid-column: auto !important;
}

/* 3+ images: shared adaptive media system handles layout */
.event-gallery:not(.gallery-count-1):not(.gallery-count-2) {
    display: grid;
}

@media (max-width: 640px) {

    .event-intro h1 {
        font-size: clamp(30px, 8.4vw, 34px);
        line-height: 1.16;
    }

    .event-intro-copy > p {
        font-size: 13px;
    }

    .event-block h2 {
        font-size: 27px;
    }

    .event-rich-content {
        font-size: 14px;
        line-height: 1.8;
    }

    .event-info-item strong {
        font-size: 11px;
    }

    .event-gallery.gallery-count-2 {
        grid-template-columns: 1fr;
    }
}
