/*
Theme Name: KSV Academy
Theme URI: https://ksvacademy.info
Author: KSV Academy
Description: Bilingual (Lao / English) theme for KSV Academy — training and data consulting. Includes Courses, a registration form with payment-slip upload, and a Registrations admin list.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: ksv-academy
*/

/*
VOICE: confident, practical, warm — a trainer who also ships real systems.
IDEA: a live dashboard on a projector in a training room.
PICTURE: layered dashboard panel with KPI tiles, bars, donut and a floating spreadsheet card.
COLOUR and TYPE: deep sea #0a2540 ground, sky #8fd3ff, white, signal pink #ff5c8a; Hanken Grotesk + Noto Sans Lao.
LAYOUT: deep hero band, white service/course bands, deep about band, sky-tinted register band, footer.
*/

:root {
	color-scheme: light;
	--deep: #0a2540;
	--deep-2: #11304f;
	--sky: #8fd3ff;
	--blue: #2f86d1;
	--pink: #ff5c8a;
	--ink: #0b1d33;
	--muted: #4d6178;
	--bg: #ffffff;
	--tint: #eef7ff;
	--line: #d6e4f0;
	--r: 14px;
	--font: "Hanken Grotesk", "Noto Sans Lao", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font); overflow-x: clip; -webkit-font-smoothing: antialiased; }
html[data-lang="lo"] body { line-height: 1.75; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }

/* Language switching */
html[data-lang="lo"] .en, html[data-lang="en"] .lo { display: none !important; }
html[data-lang="lo"] .ksv-lang [data-l="lo"], html[data-lang="en"] .ksv-lang [data-l="en"] { background: var(--sky); color: var(--deep); }

.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: var(--deep); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { max-width: 1240px; margin: 0 auto; }
.narrow { max-width: 760px; }
.band { padding: clamp(48px, 7vw, 96px) max(5vw, 18px); }

/* Type scale */
.display { font-size: clamp(40px, 6vw, 68px); line-height: 1.05; font-weight: 300; letter-spacing: -0.02em; margin: 0 0 20px; text-wrap: balance; }
html[data-lang="lo"] .display { font-weight: 800; line-height: 1.25; letter-spacing: 0; font-size: clamp(34px, 5vw, 56px); }
.h1, .h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; font-weight: 800; margin: 0 0 14px; text-wrap: balance; }
html[data-lang="lo"] .h1, html[data-lang="lo"] .h2 { line-height: 1.35; }
.h3 { font-size: 21px; line-height: 1.3; margin: 0 0 8px; font-weight: 800; }
.h4 { font-size: 17px; margin: 0 0 8px; font-weight: 800; }
.lead { font-size: 19px; color: var(--muted); max-width: 62ch; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 22px; border-radius: 999px; background: var(--pink); color: #fff; font-weight: 700; text-decoration: none; border: 2px solid var(--pink); cursor: pointer; font: inherit; font-weight: 700; transition: transform .15s ease, background .15s ease; }
.btn:hover { background: #ff3d74; border-color: #ff3d74; transform: translateY(-1px); }
.btn-lg { min-height: 52px; padding: 12px 28px; font-size: 17px; }
.btn-sm { min-height: 40px; padding: 6px 16px; font-size: 15px; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-block { width: 100%; }

/* Header */
.top { position: sticky; top: 0; z-index: 50; background: rgba(10,37,64,.96); backdrop-filter: blur(8px); color: #fff; border-bottom: 1px solid rgba(143,211,255,.15); }
.top-in { max-width: 1240px; margin: 0 auto; padding: 10px max(5vw,18px); display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 19px; margin-right: auto; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--sky); color: var(--deep); font-weight: 800; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav > a:not(.btn) { color: #dbeeff; text-decoration: none; font-weight: 600; font-size: 15px; }
.nav > a:not(.btn):hover { color: #fff; }
.ksv-lang { display: inline-flex; border: 1px solid rgba(143,211,255,.5); border-radius: 999px; padding: 3px; background: transparent; cursor: pointer; font: inherit; }
.ksv-lang span { padding: 4px 10px; border-radius: 999px; color: #dbeeff; font-size: 14px; font-weight: 700; min-width: 38px; }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; position: relative; }
.bars, .bars::before, .bars::after { position: absolute; left: 11px; width: 22px; height: 2px; background: #fff; content: ""; transition: transform .2s; }
.bars { top: 21px; } .bars::before { top: -7px; left: 0; } .bars::after { top: 7px; left: 0; }
.menu-btn[aria-expanded="true"] .bars { background: transparent; }
.menu-btn[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { background: radial-gradient(1200px 600px at 85% 10%, #15426e 0%, transparent 60%), var(--deep); color: #fff; padding-top: clamp(40px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.05fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero .lead { color: #c9e2f7; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 36px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin: 0; border-top: 1px solid rgba(143,211,255,.25); padding-top: 22px; }
.stats div { margin: 0; }
.stats dt { font-size: 14px; color: #a9cbe6; }
.stats dd { margin: 2px 0 0; font-size: clamp(28px, 3vw, 38px); font-weight: 800; color: #fff; white-space: nowrap; }
.hero-art svg { width: 100%; height: auto; display: block; }
@media (prefers-reduced-motion: no-preference) {
	.bars-anim rect { transform-origin: bottom; transform-box: fill-box; animation: grow .9s cubic-bezier(.2,.8,.2,1) both; }
	.bars-anim rect:nth-child(2) { animation-delay: .08s; } .bars-anim rect:nth-child(3) { animation-delay: .16s; }
	.bars-anim rect:nth-child(4) { animation-delay: .24s; } .bars-anim rect:nth-child(5) { animation-delay: .32s; } .bars-anim rect:nth-child(6) { animation-delay: .40s; }
	@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}

/* Section heads */
.sec-head { margin-bottom: 36px; }

/* Services */
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.svc { padding: 26px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.svc p { margin: 0; color: var(--muted); }
.ico { width: 40px; height: 40px; padding: 8px; border-radius: 10px; background: var(--tint); stroke: var(--blue); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 14px; }
.svc-cta { margin: 28px 0 0; }

/* Courses */
.courses { background: var(--tint); }
.course-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.course { position: relative; display: flex; flex-direction: column; padding: 28px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 30px -18px rgba(10,37,64,.35); }
.course p { color: var(--muted); margin: 0 0 18px; }
.course .btn { margin-top: auto; }
.tag { align-self: flex-start; background: var(--deep); color: var(--sky); font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-bottom: 12px; }
.course-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.course-meta dt, .facts dt { font-size: 13px; color: var(--muted); }
.course-meta dd, .facts dd { margin: 0; font-weight: 800; white-space: nowrap; }
.price { color: var(--deep); font-size: 19px; }
.steps { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; counter-reset: s; }
.steps li { display: grid; gap: 2px; padding: 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.steps .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--pink); color: #fff; font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.steps span:last-child { color: var(--muted); font-size: 14px; }

/* About */
.about { background: var(--deep); color: #fff; }
.about p { color: #c9e2f7; max-width: 62ch; }
.about-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: clamp(24px,5vw,72px); align-items: start; }
.creds { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.creds li { display: grid; gap: 2px; padding: 18px 20px; border-radius: 12px; background: var(--deep-2); border: 1px solid rgba(143,211,255,.2); }
.creds strong { color: #fff; }
.creds span { color: var(--sky); font-size: 15px; }

/* Register */
.register { background: linear-gradient(180deg, #fff 0%, var(--tint) 100%); }
.reg-grid { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: clamp(24px,5vw,64px); align-items: start; }
.reg-side p { color: var(--muted); }
.pay { margin-top: 24px; padding: 22px; border-radius: var(--r); background: var(--deep); color: #fff; }
.pay p { color: #c9e2f7; margin: 8px 0 0; }
.pay .muted { color: #a9cbe6; }
.qr { width: 180px; max-width: 100%; border-radius: 10px; background: #fff; padding: 8px; display: block; }
.reg-form { padding: clamp(20px, 3vw, 34px); background: #fff; border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 20px 50px -30px rgba(10,37,64,.45); display: grid; gap: 16px; }
.row2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 15px; }
.field label b { color: var(--pink); }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); min-height: 48px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); }
.field input[type="file"] { padding: 10px; background: var(--tint); }
.notice { padding: 14px 16px; border-radius: 10px; font-weight: 600; }
.notice.ok { background: #e3f8ee; color: #0b5b37; border: 1px solid #a8e3c4; }
.notice.err { background: #ffe9ef; color: #8a1036; border: 1px solid #ffbfd0; }

/* Online system cards */
.online-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-bottom: 18px; }
.online-card { display: grid; gap: 6px; align-content: start; padding: 26px; border-radius: 18px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: 0 16px 40px -30px rgba(10,37,64,.5); transition: transform .15s, border-color .15s; }
.online-card:hover { transform: translateY(-2px); border-color: var(--blue); }
.online-card .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--deep); font-weight: 800; }
.online-card strong { font-size: 20px; }
.online-card span:not(.n) { color: var(--muted); }
.online-card em { font-style: normal; font-weight: 700; color: var(--blue); margin-top: 6px; }
.online-card.primary { background: var(--deep); border-color: var(--deep); color: #fff; }
.online-card.primary .n { background: var(--pink); color: #fff; }
.online-card.primary span:not(.n) { color: #c9e2f7; }
.online-card.primary em { color: var(--sky); }
@media (max-width: 900px) { .online-grid { grid-template-columns: minmax(0,1fr); } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin: 18px 0; }
.c-card { display: grid; gap: 4px; padding: 20px; border-radius: var(--r); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.c-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.c-label { font-size: 14px; color: var(--muted); }
.c-val { font-weight: 800; overflow-wrap: anywhere; }

/* Footer */
.foot { background: #061a2e; color: #a9cbe6; padding: 40px max(5vw,18px) 28px; }
.foot-in { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px 40px; }
.foot-brand { color: #fff; font-size: 19px; }
.foot p { margin: 6px 0 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.foot-links a { color: #dbeeff; text-decoration: none; }
.copy { grid-column: 1 / -1; font-size: 14px; border-top: 1px solid rgba(143,211,255,.15); padding-top: 16px; }

/* Generic pages */
.page .entry { margin-bottom: 32px; }
.entry-body { font-size: 17px; }
.facts { display: flex; gap: 32px; margin: 24px 0; }

/* Responsive */
@media (max-width: 1000px) {
	.svc-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
	.steps { grid-template-columns: repeat(3, minmax(0,1fr)); }
	.contact-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 900px) {
	.menu-btn { display: block; }
	.nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--deep); padding: 8px max(5vw,18px) 18px; border-bottom: 1px solid rgba(143,211,255,.2); }
	.nav.open { display: flex; }
	.nav > a:not(.btn) { padding: 12px 0; font-size: 17px; border-bottom: 1px solid rgba(143,211,255,.12); }
	.nav .btn { margin-top: 12px; }
	.nav .ksv-lang { margin-top: 12px; align-self: flex-start; }
	.hero-grid, .about-grid, .reg-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 600px) {
	body { font-size: 16px; }
	.svc-grid, .row2, .contact-grid { grid-template-columns: minmax(0,1fr); }
	.steps { grid-template-columns: repeat(2, minmax(0,1fr)); }
	.stats { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
	.stats dt { font-size: 13px; }
	.foot-in { grid-template-columns: minmax(0,1fr); }
	.lead { font-size: 17px; }
}
