@font-face { font-family: Kanit; src: url("/wp-content/mu-plugins/rg-robotics-events/media/kanit-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Kanit; src: url("/wp-content/mu-plugins/rg-robotics-events/media/kanit-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Kanit; src: url("/wp-content/mu-plugins/rg-robotics-events/media/kanit-800.ttf") format("truetype"); font-weight: 800; font-display: swap; }
:root { color-scheme: light; --navy: #0b2036; --ink: #10283a; --muted: #476172; --brand: #4aa9d4; --light: #7eccee; --link: #00678d; --pale: #edf8fd; --line: #d2e4ed; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--ink); font: 400 17px/1.55 Kanit, sans-serif; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid #e87527; outline-offset: 4px; }
section[id] { scroll-margin-top: 20px; }
.wrap { width: min(1180px, calc(100% - 80px)); margin-inline: auto; }
.skip { position: absolute; inset: 8px auto auto 8px; padding: 12px; background: var(--navy); color: #fff; z-index: 5; transform: translateY(-140%); }
.skip:focus { transform: none; }
.header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { width: 177px; height: auto; }
.header-nav, .languages, .actions { display: flex; align-items: center; gap: 24px; }
.header-nav a, .languages a, .footer a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }
.header-nav a:hover, .footer a:hover { color: var(--link); }
.languages { gap: 3px; }
.languages a { min-width: 44px; justify-content: center; border-radius: 6px; font-size: 14px; }
.languages a[aria-current] { color: var(--navy); background: #d5effb; }
.hero { background: var(--navy); color: #fff; }
.hero-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(28px, 5vw, 70px); align-items: center; padding-block: clamp(34px, 5vw, 68px); }
.eyebrow { color: var(--link); font-size: 14px; font-weight: 600; letter-spacing: .045em; }
.hero .eyebrow, .consult .eyebrow { color: #a4dbf5; }
.eyebrow span { font-variant-numeric: tabular-nums; }
h1 { margin-top: 10px; font-size: clamp(49px, 6.4vw, 92px); line-height: 1.05; font-weight: 800; letter-spacing: -.025em; }
h1 span { display: block; color: var(--light); }
.color-strip { width: 112px; height: 4px; margin-block: 19px 16px; border-radius: 10px; background: linear-gradient(to right,#59b6e2 25%,#87bc43 25% 44%,#f3d44d 44% 63%,#ef725b 63% 82%,#aa86bd 82%); }
.hero-intro { max-width: 440px; color: #d9ebf7; font-size: clamp(17px, 1.6vw, 21px); }
.actions { margin-top: 22px; gap: 10px; flex-wrap: wrap; }
.button, .outline { display: inline-flex; min-height: 49px; align-items: center; justify-content: center; gap: 9px; border-radius: 8px; padding: 8px 16px; font-weight: 600; line-height: 1.22; }
.button { color: #08253d; background: var(--brand); }
.button:hover { background: #92d7f6; }
.outline { border: 1px solid #8baec4; color: #edf8ff; }
.outline:hover { background: #1a4160; }
.button img, .text-link img { filter: brightness(0) saturate(100%) invert(27%) sepia(46%) saturate(1292%) hue-rotate(159deg); }
.hero-photo { border: 1px solid #41718d; border-radius: 12px; overflow: hidden; background: #15334c; }
.hero-photo > img { width: 100%; height: auto; aspect-ratio: 1.47; object-fit: cover; object-position: center 58%; }
figcaption { padding: 11px 15px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
figcaption span { font-size: 13px; color: #bbd8e8; }
.section { padding-block: clamp(38px, 6vw, 77px); }
.section-head { max-width: 760px; margin-bottom: 24px; }
h2 { font-size: clamp(29px, 4.1vw, 53px); line-height: 1.16; font-weight: 800; margin: 5px 0 9px; letter-spacing: -.015em; }
.section-head > p:last-child { color: var(--muted); }
h3 { margin-block: 8px 6px; font-size: clamp(20px, 2vw, 26px); font-weight: 800; line-height: 1.21; }
summary { min-height: 44px; padding-block: 10px; cursor: pointer; color: var(--link); font-weight: 600; }
.faq details p { color: var(--muted); padding-bottom: 10px; }
.text-link { display: inline-flex; min-height: 44px; align-items: center; gap: 6px; margin-top: 14px; color: var(--link); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.consult { display: grid; grid-template-columns: 1.07fr .93fr; gap: clamp(22px,5vw,64px); padding: clamp(22px,4vw,54px); border-radius: 11px; background: var(--navy); color: #fff; }
.consult p:not(.eyebrow) { color: #d5e8f3; }
.consult ol { list-style: none; margin: 0; padding: 0; }
.consult li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid #3d6077; }
.consult li > span { color: var(--light); font-weight: 800; }
.faq { padding-bottom: clamp(35px, 6vw, 68px); }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; padding-block: 12px; align-items: center; gap: 16px; }
@media (max-width: 720px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { min-height: 64px; }
  .logo { width: 142px; }
  .header-nav { display: none; }
  .hero-grid, .consult { grid-template-columns: 1fr; }
  .hero-grid { gap: 24px; padding-block: 28px 30px; }
  h1 { font-size: clamp(43px, 10.3vw, 66px); }
  .actions { margin-top: 17px; }
  .button, .outline { min-height: 44px; font-size: 15px; padding-inline: 12px; }
  .hero-photo > img { aspect-ratio: 1.62; }
}
[hidden] { display: none !important; }
html:has(dialog[open]) { overflow: hidden; }
:lang(en) h1 { font-size: clamp(40px, 5vw, 68px); }
:lang(th) h1 { font-size: clamp(40px, 5.6vw, 77px); }
.hero-copy { min-width: 0; }
.hero-photo > img { filter: brightness(1.04); }
.gallery-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 16px; flex-wrap: wrap; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filters button, .viewer-heading button, .viewer-controls button {
  border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink);
  font: 600 15px/1.25 Kanit, sans-serif; min-height: 44px; padding: 8px 13px; cursor: pointer;
}
.filters button:hover { background: var(--pale); }
.filters button[aria-pressed="true"] { background: var(--navy); color: white; border-color: var(--navy); }
.gallery-status { color: var(--muted); font-size: 14px; }
.album-grid, .format-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.album { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: white; }
.album-cover { display: block; position: relative; background: var(--pale); }
.album-cover:focus-visible { outline-offset: -4px; }
.album-cover img { width: 100%; height: auto; aspect-ratio: 1.62; object-fit: cover; }
.album-count { position: absolute; bottom: 10px; right: 10px; border-radius: 5px; color: white; background: var(--navy); font-size: 13px; padding: 3px 8px; }
.album-copy { padding: 15px 17px 12px; display: flex; flex-direction: column; flex: 1; }
.album-copy p { color: var(--muted); }
.album-copy .eyebrow { color: var(--link); }
.album-copy h3, .format-grid h3 { text-wrap: pretty; }
.album-copy .place { margin-bottom: 7px; color: var(--ink); font-size: 14px; font-weight: 600; }
.album-link { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; padding-top: 4px; min-height: 44px; color: var(--link); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; margin-top: auto; }
.formats { background: var(--pale); }
.format-grid article { padding: 15px 16px 10px 0; border-top: 3px solid var(--brand); }
.format-grid article:nth-child(2) { border-color: #85ac41; }
.format-grid article:nth-child(3) { border-color: #e0aa38; }
.format-grid p { color: var(--muted); }
.format-index { font-size: 24px; font-weight: 800; color: var(--link); }
.consult ul { margin: 0; padding-left: 24px; }
.consult ul li { display: list-item; border-top: 0; border-bottom: 1px solid #3d6077; }
.album-viewer { width: min(900px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 15px; border: 1px solid #6d9cb6; border-radius: 10px; background: var(--navy); color: white; }
.album-viewer::backdrop { background: rgb(4 15 26 / .78); }
.viewer-heading, .viewer-controls { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.viewer-heading h2 { font-size: clamp(20px, 3vw, 32px); }
.viewer-heading form { margin: 0; flex-shrink: 0; }
.viewer-photo { display: block; width: 100%; max-height: min(61dvh, 650px); object-fit: contain; margin-top: 10px; background: #091829; border-radius: 5px; }
.viewer-caption { display: block; color: #d6ecf6; padding: 9px 0; font-size: 14px; }
.viewer-controls button:disabled { cursor: default; background: #243c51; border-color: #48657a; color: #adc0cf; }
@media (max-width: 960px) { .album-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 720px) {
  :lang(en) h1 { font-size: clamp(36px, 9.5vw, 55px); }
  :lang(th) h1 { font-size: clamp(39px, 10vw, 60px); }
  .album-grid, .format-grid { grid-template-columns: 1fr; gap: 13px; }
  .filters button { font-size: 14px; padding-inline: 10px; }
  .hero-photo > img { aspect-ratio: 1.53; }
}

.legacy-archive { border-top: 1px solid var(--line); padding-block: 35px 55px; overflow-wrap: anywhere; }
.legacy-archive h2, .legacy-archive h3, .legacy-archive h4 { margin-block: 20px 10px; }
.legacy-archive :is(p,figure,blockquote,ul,ol,details) { margin-block: 10px; }
.legacy-archive :is(img,figure,table,div) { max-width: 100%; }
.legacy-archive img { height: auto; }
.legacy-archive table { display: block; overflow-x: auto; }
.legacy-archive a { color: var(--link); text-decoration: underline; }
.legacy-archive #service-gallery > div, .legacy-archive .rg-bank-grid {
    display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); gap: 16px;
}
