/* QBuS - shared stylesheet (colours and typography follow www.uba.be) */
:root {
	--navy: #273b89;
	--navy-dark: #1c2a61;
	--navy-light: #2d449d;
	--orange: #f36f21;
	--orange-dark: #d95a10;
	--text: #3f3f42;
	--muted: #58585b;
	--soft: #f3f3f3;
	--line: #e2e4ea;
	--white: #fff;
	--error: #c62828;
	--radius: 4px;
	--shadow: 0 10px 30px rgba(28, 42, 97, .12);
	--font: "Barlow", "Segoe UI", Arial, sans-serif;
	--font-head: "Barlow", "Segoe UI", Arial, sans-serif;
	--font-mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
	margin: 0;
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--text);
	background: var(--white);
}

img { max-width: 100%; height: auto; }

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--orange); }

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; color: var(--navy); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.container { width: min(1120px, 100% - 2rem); margin-inline: auto; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--orange); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---------- Header ---------- */
/* Logo size and overhang follow www.uba.be: 65px wide, 80px from 768px, 82px from 1200px */
:root { --logo-w: 65px; --logo-gap: 1rem; }
@media (min-width: 768px) { :root { --logo-w: 80px; --logo-gap: 1.5rem; } }
@media (min-width: 1200px) { :root { --logo-w: 82px; } }

.site-header {
	background: var(--white);
	border-bottom: 2px solid var(--orange);
	position: relative;
	z-index: 20;
}
.site-header .container {
	position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
	min-height: 90px; padding-left: calc(var(--logo-w) + var(--logo-gap));
}

.brand { display: flex; align-items: center; text-decoration: none; color: var(--navy); }
.brand img {
	position: absolute; left: 0; top: 10px; z-index: 30;
	width: var(--logo-w); height: auto; aspect-ratio: 123.34 / 222.07;
	filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .25));
}
.brand-name { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; line-height: 1; }
.brand-name span { color: var(--orange); }
.brand-sub { display: block; font-family: var(--font); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: .2rem; }

.lang-switch { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.lang-switch a {
	display: block; padding: .35rem .6rem; border-radius: var(--radius);
	font-weight: 700; font-size: .85rem; letter-spacing: .05em; text-decoration: none; color: var(--navy);
}
.lang-switch a:hover { background: var(--soft); color: var(--navy); }
.lang-switch a[aria-current="page"] { background: var(--navy); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	padding: .8rem 1.4rem; border: 2px solid var(--navy); border-radius: var(--radius);
	background: var(--navy); color: #fff; font: 700 1rem/1 var(--font);
	text-transform: uppercase; letter-spacing: .04em; text-decoration: none; cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: #fff; }
.btn-accent { background: var(--orange); border-color: var(--orange); }
.btn-accent:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-ghost:hover { background: #fff; color: var(--navy); border-color: #fff; }
.btn-light { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-light:hover { background: var(--navy); color: #fff; }

/* ---------- Hero ---------- */
.hero {
	position: relative;
	overflow: hidden;
	color: #fff;
	background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-light) 100%);
}
.hero::before {
	content: ""; position: absolute; inset: 0;
	background: url("../online/pics/background.png") center / cover no-repeat;
	opacity: .08; pointer-events: none;
}
.hero .container { position: relative; display: grid; grid-template-columns: 1.3fr .7fr; gap: 2.5rem; align-items: center; padding-block: 2rem; }
.hero .container > div:first-child { padding-left: calc(var(--logo-w) + var(--logo-gap)); }
.hero h1 { color: #fff; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); margin-bottom: .35em; }
.hero .lead { font-size: 1.05rem; color: rgba(255, 255, 255, .88); max-width: 40em; margin-bottom: 0; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.1rem; }
.hero .btn { padding: .65rem 1.2rem; }
.eyebrow { display: inline-block; font-weight: 700; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); margin-bottom: .35rem; }

.sample {
	background: #fff; color: var(--text); border-radius: 8px; box-shadow: 0 15px 40px rgba(0, 0, 0, .25);
	padding: 1rem 1.25rem; border-top: 4px solid var(--orange);
}
.sample-row { display: flex; align-items: center; gap: .75rem; }
.sample-call { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 700; color: var(--navy); letter-spacing: .08em; padding: .3rem .6rem; background: var(--soft); border-radius: var(--radius); }
.sample-arrow { color: var(--orange); font-size: 1.4rem; font-weight: 700; }
.sample-details { margin: .6rem 0 0; font-weight: 600; color: var(--navy); }
.sample-caption { font-size: .78rem; color: var(--muted); margin: .25rem 0 0; }

/* ---------- Result list (shared by home sample and app) ---------- */
.result-list { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0; }
.result-list dt, .result-list dd { padding: .6rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.result-list dt { font-weight: 600; color: var(--muted); padding-right: 1.25rem; white-space: nowrap; }
.result-list dd { font-weight: 700; color: var(--navy); min-height: 2.6rem; }
.result-list dt:last-of-type, .result-list dd:last-of-type { border-bottom: 0; }
.sort-badge {
	display: inline-block; min-width: 3.5rem; padding: .15rem .7rem; border-radius: var(--radius);
	background: var(--orange); color: #fff; font-family: var(--font-mono); font-size: 1.15rem; letter-spacing: .05em; text-align: center;
}
.sort-badge:empty { display: none; }
.sort-badge.is-error { background: transparent; color: var(--error); font-family: var(--font); font-size: 1rem; letter-spacing: 0; padding-left: 0; text-align: left; }

/* ---------- Content sections ---------- */
.section { padding-block: 4rem; }
.section-soft { background: var(--soft); }
.section-intro { max-width: 46em; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2rem; }
.feature { background: #fff; border-radius: 8px; padding: 1.5rem; box-shadow: var(--shadow); border-top: 4px solid var(--navy); }
.feature h3 { font-family: var(--font); font-size: 1.1rem; margin-bottom: .4rem; }
.feature p { margin: 0; color: var(--muted); }
.feature-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(243, 111, 33, .12); color: var(--orange); margin-bottom: .9rem; }
.feature-icon svg { width: 22px; height: 22px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }

.check-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1.5rem; }
.check-list li { position: relative; padding-left: 1.6rem; }
.check-list li::before {
	content: ""; position: absolute; left: 0; top: .45em; width: .9rem; height: .9rem; border-radius: 50%;
	background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.5' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / 70% no-repeat;
}

.cta-band { background: var(--navy); color: #fff; }
.cta-band .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 2.5rem; }
.cta-band h2 { color: #fff; margin: 0 0 .25rem; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .85); }

.callout { border-left: 4px solid var(--orange); background: #fff; padding: 1.25rem 1.5rem; border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow); }
.callout h3 { font-family: var(--font); font-size: 1.05rem; margin-bottom: .3rem; }
.callout p:last-child { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: rgba(255, 255, 255, .8); font-size: .95rem; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; padding-block: 2rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--orange); }
.site-footer p { margin: 0; }

/* ================= QBuS online application ================= */
.app-body { background: var(--soft); min-height: 100vh; display: flex; flex-direction: column; }
.app-body main { flex: 1; }

.app-nav { display: flex; flex-wrap: wrap; gap: .25rem; }
.app-nav button {
	border: 0; background: transparent; color: var(--navy); cursor: pointer;
	font: 700 .85rem/1 var(--font); letter-spacing: .05em; text-transform: uppercase; padding: .6rem .7rem; border-radius: var(--radius);
}
.app-nav button:hover { background: var(--soft); }

.app-card {
	position: relative; overflow: hidden;
	background: #fff; border-radius: 10px; box-shadow: var(--shadow);
	max-width: 760px; margin: 5rem auto 2.5rem; padding: 2rem 2.25rem;
	border-top: 5px solid var(--navy);
}
.app-card::before {
	content: ""; position: absolute; inset: 0;
	background: url("../online/pics/background.png") center 70% / 110% auto no-repeat;
	opacity: .10; pointer-events: none; transition: opacity .3s ease;
}
.app-card.no-map::before { opacity: 0; }
.app-card > * { position: relative; }
.app-card h1 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem); margin-bottom: .25rem; }
.app-card .subtitle { color: var(--muted); margin-bottom: 1.5rem; }

.search-form label { display: block; font-weight: 700; color: var(--navy); margin-bottom: .4rem; }
.search-row { display: flex; gap: .6rem; }
.search-row input {
	flex: 1; min-width: 0;
	font: 700 1.5rem/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--navy);
	padding: .7rem 1rem; border: 2px solid var(--line); border-radius: var(--radius); background: #fff;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.search-row input::placeholder { color: #b6b9c4; font-weight: 400; letter-spacing: .04em; }
.search-row input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(39, 59, 137, .15); }
.search-row .btn { padding-inline: 1.6rem; }
.hint { font-size: .9rem; color: var(--muted); margin: .5rem 0 0; }

.results { margin-top: 1.75rem; }

/* Country-files update progress (shown inside the app card) */
.update-progress { margin-bottom: 1.25rem; padding: .85rem 1rem; border-radius: var(--radius); background: rgba(243, 111, 33, .08); border: 1px solid rgba(243, 111, 33, .35); }
.update-label { display: flex; justify-content: space-between; gap: 1rem; font-weight: 600; color: var(--navy); font-size: .95rem; margin-bottom: .5rem; }
.update-label #update_pct { font-variant-numeric: tabular-nums; color: var(--orange); }
.progress-track { height: 8px; border-radius: 4px; background: rgba(39, 59, 137, .12); overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--orange), #f89a5e); transition: width .3s ease; }
.update-progress.is-done { background: rgba(46, 125, 50, .08); border-color: rgba(46, 125, 50, .35); }
.update-progress.is-done .progress-bar { background: #2e7d32; }
.update-progress.is-done #update_pct { color: #2e7d32; }
.search-row input:disabled { background: var(--soft); cursor: wait; }

.qslinfo-panel { margin-top: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.qslinfo-panel h2 { font-family: var(--font); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; padding: .6rem 1rem; border-bottom: 1px solid var(--line); }
.qslinfo-panel .qslinfo-body { padding: .75rem 1rem; font-family: var(--font-mono); font-size: .9rem; white-space: pre-wrap; word-break: break-word; color: var(--navy); min-height: 2.75rem; }
.qslinfo-panel .qslinfo-body.is-loading { color: var(--muted); font-family: var(--font); font-style: italic; }

.app-meta { text-align: center; color: var(--muted); font-size: .9rem; margin: 0 auto 2.5rem; padding-inline: 1rem; }

/* Dialogs (About / Settings / How to / Small print) */
dialog {
	width: min(560px, 100% - 2rem); max-height: calc(100vh - 3rem); overflow: auto;
	border: 0; border-top: 5px solid var(--orange); border-radius: 10px; padding: 1.75rem 2rem;
	color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
dialog::backdrop { background: rgba(28, 42, 97, .55); }
dialog h2 { font-size: 1.5rem; }
dialog .dialog-actions { display: flex; justify-content: flex-end; margin-top: 1.5rem; }
dialog ul { padding-left: 1.2rem; }
.qa dt { font-weight: 700; color: var(--navy); }
.qa dd { margin: 0 0 1rem; }
.small-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.small-head img { image-rendering: pixelated; }
.warning { color: var(--error); }

.setting { display: flex; gap: .85rem; align-items: flex-start; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.setting:last-of-type { border-bottom: 0; }
.setting input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; accent-color: var(--orange); flex: none; }
.setting label { font-weight: 700; color: var(--navy); cursor: pointer; }
.setting p { margin: .15rem 0 0; color: var(--muted); font-size: .95rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.hero .container { grid-template-columns: 1fr; gap: 1.25rem; padding-block: 1.75rem; }
	.features { grid-template-columns: 1fr; }
	.two-col { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 600px) {
	.brand-sub { display: none; }
	.check-list { grid-template-columns: 1fr; }
	.app-card { margin: 4.5rem 1rem 1rem; padding: 1.5rem 1.25rem; }
	.search-row { flex-direction: column; }
	.result-list { grid-template-columns: 1fr; }
	.result-list dt { border-bottom: 0; padding-bottom: 0; }
	.result-list dd { padding-top: .1rem; min-height: 0; }
	.site-header .container { min-height: 72px; flex-wrap: wrap; padding-block: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation-duration: 0s !important; }
}
