/* ThaiGyro.com: same blue and silver family as GyroHolics */
@font-face { font-family: "Barlow"; src: url(fonts/barlow-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(fonts/barlow-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url(fonts/barlow-semi-condensed-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
/* Thai letters come from Prompt; Barlow has no Thai */
@font-face { font-family: "Prompt"; src: url(fonts/prompt-thai-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Prompt"; src: url(fonts/prompt-thai-600-normal.woff2) format("woff2"); font-weight: 600 700; font-display: swap; unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }

:root {
    --navy: #0f2e48;
    --blue: #1d5f8a;
    --blue-hover: #164b6d;
    --silver: #c4ccd4;
    --sun: #ffc61a;
    --bg: #eef2f5;
    --card: #fff;
    --text: #1b2733;
    --muted: #5b6875;
    --line: #d8dee4;
    --green: #2f7d4f;
    --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 400 1.05rem/1.65 "Barlow", "Prompt", system-ui, sans-serif; }
html[lang="th"] body { line-height: 1.8; }
h1, h2, h3 { font-family: "Barlow Semi Condensed", "Prompt", "Barlow", sans-serif; font-weight: 700; line-height: 1.15; margin: 0 0 .5em; color: var(--navy); }
html[lang="th"] h1, html[lang="th"] h2, html[lang="th"] h3 { line-height: 1.35; font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--blue); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ----- Top bar ----- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(15, 46, 72, .96); color: #fff;
          backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none;
         font: 700 1.45rem "Barlow Semi Condensed", sans-serif; letter-spacing: .3px; }
.menu { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.menu a { color: #dbe4ec; text-decoration: none; font-size: .95rem; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.menu a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.menu a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--sun); border-radius: 0; }
.menu a.forum { color: #ffe08a; }
.menu-btn { display: none; margin-left: auto; align-items: center; gap: 6px; background: none; border: 1px solid rgba(196, 204, 212, .5);
            color: #fff; border-radius: 8px; padding: 6px 10px; font: 600 .9rem "Barlow", "Prompt", sans-serif; cursor: pointer; }
.menu-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.langs { display: flex; border: 1px solid rgba(196, 204, 212, .5); border-radius: 99px; overflow: hidden; flex: none; }
.langs a { color: #dbe4ec; text-decoration: none; padding: 4px 12px; font-size: .9rem; font-weight: 600; }
.langs a[aria-current] { background: var(--silver); color: var(--navy); }

/* ----- Hero ----- */
.hero { position: relative; min-height: min(80vh, 720px); display: flex; align-items: flex-start;
        background: #6fa3cf url(images/hero-art.svg) center bottom / cover no-repeat; color: #fff; }
/* With a photo: the photo fills the top, and the text sits below the gyro,
   over the dark bottom of the photo, so it never covers the aircraft. */
.hero.has-photo { --photo-h: min(66.6vw, max(78vh, calc(27.6vw + 190px))); display: block; min-height: 0; background: #1b140e; }
.hero-photo { position: absolute; left: 0; right: 0; top: 0; height: var(--photo-h);
              background: center 30% / cover no-repeat; }
.hero-photo::after { content: ""; position: absolute; inset: 0;
              background: linear-gradient(180deg, rgba(27, 20, 14, 0) 55%, rgba(27, 20, 14, .8) 85%, #1b140e 100%); }
.hero.has-photo .hero-text { padding-top: calc(var(--photo-h) - 100px); padding-bottom: 56px; }
.hero:not(.has-photo)::before { content: ""; position: absolute; inset: 0;
        background: linear-gradient(90deg, rgba(15, 46, 72, .45) 0%, rgba(15, 46, 72, .2) 45%, rgba(15, 46, 72, 0) 65%); }
.hero-gyro { position: absolute; right: 2%; top: 9%; width: min(52%, 720px); pointer-events: none;
             filter: drop-shadow(0 18px 18px rgba(15, 46, 72, .25)); animation: float 7s ease-in-out infinite; }
.hero-gyro img { display: block; width: 100%; height: auto; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-.6deg); } }
.hero-text { position: relative; width: 100%; padding-top: clamp(40px, 8vh, 90px); padding-bottom: 60px; }
.hero:not(.has-photo) .hero-text { padding-right: 38%; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-weight: 600; font-size: .85rem; color: #ffe9a8; margin-bottom: .6em; text-shadow: 0 1px 8px rgba(15, 46, 72, .6); }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 4.2rem); max-width: 13em; text-shadow: 0 2px 18px rgba(15, 46, 72, .35); }
.lead { font-size: clamp(1.08rem, 1.7vw, 1.25rem); max-width: 34em; text-shadow: 0 1px 10px rgba(15, 46, 72, .4); }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4em; }

/* ----- Inner page banner: a photo strip with the page title ----- */
.banner { position: relative; color: #fff; background: #2d5f8a url(images/hero-art.svg) center 70% / cover no-repeat; }
.banner:not(.no-photo) { background-position: center 62%; background-size: cover; background-repeat: no-repeat; }
.banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15, 46, 72, .85) 0%, rgba(15, 46, 72, .55) 55%, rgba(15, 46, 72, .25) 100%); }
.banner .wrap { position: relative; padding-top: 64px; padding-bottom: 56px; }
.banner h1 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.2rem); margin-bottom: .3em; }
.banner .lead { margin: 0; max-width: 40em; color: #eef3f7; }

/* ----- Buttons ----- */
.btn { display: inline-block; background: var(--blue); color: #fff; padding: 11px 22px; border-radius: 10px; border: 0;
       font: 600 1rem "Barlow", "Prompt", sans-serif; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--blue-hover); }
.btn.small { padding: 7px 14px; font-size: .92rem; }
.btn.sun { background: var(--sun); color: var(--navy); box-shadow: 0 4px 0 #c98700; }
.btn.sun:hover { background: #ffd447; }
.btn.ghost { background: rgba(15, 46, 72, .25); color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .8); }
.btn.ghost:hover { background: rgba(15, 46, 72, .45); }

/* ----- Sections ----- */
.block { padding-top: 64px; padding-bottom: 64px; }
.band { background: #e3eaf0; }
.section-intro { max-width: 46em; color: var(--muted); font-size: 1.1rem; }
.note { color: var(--muted); font-size: .92rem; }
.cards { display: grid; gap: 18px; margin-top: 24px; }
.cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card p:last-child { margin-bottom: 0; }
.icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: #e2ebf3; color: var(--blue); margin-bottom: 12px; }
.icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.link-card { display: block; color: inherit; text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s; }
.link-card:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: 0 10px 24px rgba(15, 46, 72, .1); }
.link-card .more { display: inline-block; margin-top: 10px; color: var(--blue); font-weight: 600; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; }
.narrow > * { max-width: 820px; }
.block > .note { margin-top: 18px; }

/* Airfields, times of day, passenger checklist */
.sub { margin-top: 28px; font-size: 1.35rem; }
.airfield { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.airfield .pin { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: #fff3cc; color: #9a6a00; }
.airfield .pin svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.airfield .months, .time .months { font-weight: 600; color: var(--muted); margin-bottom: .5em; }
.small-link { font-size: .95rem; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.time { border-top: 5px solid #3aa36a; }
.time.off { border-top-color: var(--silver); background: #f7f9fb; }
.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { position: relative; padding: 10px 0 10px 34px; border-bottom: 1px solid var(--line); }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 16px; height: 9px; border-left: 3px solid #3aa36a; border-bottom: 3px solid #3aa36a; transform: rotate(-45deg); }

/* Chiang Mai Airsport page */
.as-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 32px; align-items: start; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
.glance { border-top: 5px solid var(--sun); }
.glance dl { margin: 0 0 18px; }
.glance dt { font-weight: 600; color: var(--muted); font-size: .9rem; margin-top: 12px; }
.glance dd { margin: 2px 0 0; }

/* Map */
.map-box { position: relative; aspect-ratio: 16 / 8; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #dfe6ec; }
.map-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.photos-block { padding-top: 0; }
.photos-block .gallery { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

/* Airshow */
.show { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 36px; align-items: start; }
.show-date { display: inline-flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; font-weight: 600;
             font-size: 1.15rem; padding: 8px 16px; border-radius: 10px; }
.show-date svg { width: 22px; height: 22px; fill: none; stroke: var(--sun); stroke-width: 2; stroke-linecap: round; }
.poster { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: 0 12px 30px rgba(15, 46, 72, .18); }
.poster img { display: block; width: 100%; height: auto; }

/* Home page airshow advert (temporary), top-right of the big photo */
.hero-ad { position: absolute; top: 22px; right: 22px; z-index: 2; width: min(330px, 26vw); display: block; text-decoration: none;
           border-radius: 12px; overflow: hidden; background: var(--navy); box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
           border: 2px solid rgba(255, 255, 255, .85); transition: transform .2s; }
.hero-ad:hover { transform: translateY(-3px); }
.hero-ad img { display: block; width: 100%; height: auto; }
.hero-ad-bar { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; color: #fff; font-size: .85rem; font-weight: 600; }
.hero-ad-bar span:last-child { color: var(--sun); white-space: nowrap; }
.home-show { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 36px; align-items: center; padding-bottom: 0; }
.kicker.dark { color: #b07800; text-shadow: none; }

/* Seasons */
.season { border-top: 5px solid var(--silver); }
.season .tag { display: inline-block; font-size: .8rem; font-weight: 600; padding: 2px 10px; border-radius: 99px; margin-bottom: 10px; background: #e2ebf3; color: var(--blue); }
.season .months { font-weight: 600; color: var(--muted); margin-bottom: .6em; }
.season.good { border-top-color: #3aa36a; } .season.good .tag { background: #dcf1e4; color: #1f6b40; }
.season.bad  { border-top-color: #c8553d; } .season.bad .tag  { background: #f8e0da; color: #9a3520; }
.season.warm { border-top-color: #f0a51b; } .season.warm .tag { background: #fdefd2; color: #8a5a00; }
.season.wet  { border-top-color: #3d84c6; } .season.wet .tag  { background: #dcebf8; color: #1d5f8a; }
.band .note { margin-top: 18px; }

/* Where + rules */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.ask { background: #fff8de; border: 1px solid #f3e1a1; border-radius: var(--radius); padding: 14px 18px; }
.rules { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--sun); border-radius: var(--radius); padding: 24px 28px; }
.rules ul { padding-left: 1.1em; margin: 0 0 1.2em; }
.rules li { margin-bottom: .55em; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 20px; }
.gallery a { position: relative; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: #d5dee6; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.04); }
.gallery span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 8px; color: #fff; font-size: .9rem;
                background: linear-gradient(transparent, rgba(15, 46, 72, .8)); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(10, 20, 30, .88); }
.lightbox img { display: block; max-width: 94vw; max-height: 84vh; width: auto; border-radius: 8px; }
.lb-caption { color: #fff; text-align: center; margin: 8px 0 0; }
.lb-close { position: fixed; top: 12px; right: 16px; background: none; border: 0; color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; }

/* Forum band */
.forum-band { background: linear-gradient(120deg, var(--navy), #1d5f8a); color: #e8eef4; }
.forum-inner { display: flex; align-items: center; gap: 28px; padding-top: 44px; padding-bottom: 44px; }
.forum-inner h2 { color: #fff; margin-bottom: .3em; }
.forum-inner p { margin: 0; max-width: 40em; }
.forum-inner .btn { flex: none; margin-left: auto; }

/* Contact */
.contact > * { max-width: 760px; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .95rem; }
.contact-form .full { grid-column: 1 / -1; }
.contact-form input, .contact-form textarea { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: transparent; }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-foot .note { margin: 0; }
.hp { position: absolute; left: -5000px; }
.error { background: #fbe4df; color: #8a2a17; padding: 10px 14px; border-radius: 8px; }
.success { background: #dcf1e4; color: #1f5c3a; padding: 14px 18px; border-radius: 10px; font-weight: 600; }

/* Footer */
.footer { background: var(--navy); color: #b9c6d2; font-size: .92rem; }
.footer a { color: #fff; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 22px; }
.footer-links { display: flex; gap: 18px; }

/* ----- Tablets & phones ----- */
@media (max-width: 1240px) {
    .topbar-inner { gap: 12px; position: relative; }
    .menu-btn { display: inline-flex; }
    .menu { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
            background: var(--navy); padding: 8px 20px 16px; box-shadow: 0 12px 24px rgba(0, 0, 0, .25); }
    .menu.open { display: flex; }
    .menu a { padding: 12px 4px; font-size: 1.05rem; border-bottom: 1px solid rgba(255, 255, 255, .08); border-radius: 0; }
    .menu a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--sun); padding-left: 14px; }
}
@media (max-width: 960px) {
    .cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cards.three { grid-template-columns: 1fr; }
    .as-top, .show, .home-show { grid-template-columns: 1fr; }
    .two-col { grid-template-columns: 1fr; gap: 36px; }
    .hero:not(.has-photo) .hero-text { padding-right: 20px; }
}
@media (max-width: 640px) {
    .block { padding-top: 44px; padding-bottom: 44px; }
    .cards.four, .cards.two { grid-template-columns: 1fr; }
    .map-box { aspect-ratio: 4 / 5; }
    .hero { min-height: 660px; background-position: 72% bottom; }
    .hero:not(.has-photo) .hero-text { padding-top: 200px; padding-bottom: 40px; }
    .hero-gyro { width: 96%; right: -14%; top: 14px; }
    .hero.has-photo { --photo-h: 470px; }
    .hero-photo { background-position: 42% top; }
    .hero.has-photo .hero-text { padding-top: calc(var(--photo-h) - 90px); padding-bottom: 40px; }
    .hero-ad { display: none; }
    .hero:not(.has-photo)::before { background: linear-gradient(180deg, rgba(15, 46, 72, 0) 22%, rgba(15, 46, 72, .5) 45%, rgba(15, 46, 72, .55) 100%); }
    .forum-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
    .forum-inner .btn { margin-left: 0; }
    .contact-form { grid-template-columns: 1fr; padding: 18px; }
    .rules { padding: 20px; }
}
@media (max-width: 640px) {
    .banner .wrap { padding-top: 44px; padding-bottom: 40px; }
    .brand { font-size: 1.3rem; }
    .menu-btn span { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .gallery img, .link-card, .hero-ad { transition: none; } .hero-gyro { animation: none; } }
