/* Kosovo Guide — base: design tokens, reset, typography, layout, header, footer, buttons.
   Plain CSS, mobile first (phones → tablets → desktop with a centred max width). */

:root {
  --navy-950: #060A14; --navy-900: #0A0E1A; --navy-800: #0F1629; --navy-750: #131C35;
  --navy-700: #192240; --navy-600: #1E2D55;
  --gold-500: #E8A735; --gold-300: #F5D87A; --gold-soft: rgba(232,167,53,0.12);
  --blue-400: #5B9BD9; --text: #FFFFFF; --text-2: #B8C0CF; --text-muted: #8892A4;
  --border: rgba(255,255,255,0.08); --success: #2FAE60; --danger: #E5484D;
  --bg: var(--navy-900); --surface: var(--navy-800); --card: var(--navy-750);
  --accent: var(--gold-500);

  --radius-sm: 10px; --radius: 14px; --radius-lg: 20px; --pill: 999px;
  --gap: 16px; --container: 1200px; --narrow: 820px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-display: "Marcellus", Georgia, "Times New Roman", serif;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --header-h: 64px; --tabbar-h: 64px;
  --focus: 0 0 0 3px rgba(232,167,53,0.55);
}

@font-face {
  font-family: "Ionicons";
  src: url("../fonts/Ionicons.ttf") format("truetype");
  font-display: block;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
  /* room for the dock on phones and iPads (removed in navbar mode below) */
  padding-bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom));
}
main { flex: 1; outline: none; }
img { max-width: 100%; display: block; }
a { color: var(--gold-300); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-500); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; }
h2 { font-size: clamp(1.2rem, 2.6vw, 1.45rem); }
h3 { font-size: 1.05rem; }
.h2 { font-size: 1.4rem; font-family: var(--font); font-weight: 700; }
p { margin: 0 0 1em; }
small, .small { font-size: .85rem; }
.muted { color: var(--text-muted); }
.center { text-align: center; }
.right { text-align: right; }
.gold { color: var(--accent); }
.mt { margin-top: 1.5rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
::selection { background: rgba(232,167,53,.35); }

/* Icons — the same Ionicons font as the app */
.ion { font-family: "Ionicons"; font-style: normal; font-weight: normal; line-height: 1; display: inline-block; font-size: 1.2em; vertical-align: -0.18em; speak: never; }
.ion-sm { font-size: 1em; vertical-align: -0.12em; }

/* Layout */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 18px; }
.container.narrow { max-width: var(--narrow); }
@media (min-width: 700px) { .container { padding: 0 28px; } }
.section { margin: 36px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.see-all { font-weight: 700; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.stack { display: grid; gap: 12px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-cities { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: 14px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding: 4px 2px 14px; scrollbar-width: thin; scrollbar-color: var(--navy-600) transparent; }
.scroller > * { scroll-snap-align: start; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.btn-row.center { justify-content: center; }
.page-header { padding: 28px 0 10px; }
.page-header .lead { color: var(--text-2); font-size: 1.05rem; max-width: 60ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--accent); margin: 0 0 6px; }
.crumbs { padding-top: 18px; font-size: .9rem; }
.crumbs a { text-decoration: none; }
.prose { color: var(--text-2); }
.prose p { white-space: pre-line; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px;
  border-radius: var(--pill); border: 1.5px solid transparent; font: 600 .95rem/1.2 var(--font); cursor: pointer;
  text-decoration: none; transition: transform .15s ease, background .15s ease, border-color .15s ease; color: var(--text); background: none; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--navy-950); }
.btn-primary:hover { background: var(--gold-300); color: var(--navy-950); }
.btn-outline { border-color: var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--gold-soft); color: var(--gold-300); }
.btn-ghost { background: var(--card); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: rgba(232,167,53,.4); color: var(--text); }
.btn-danger-ghost { color: var(--danger); border-color: rgba(229,72,77,.35); }
.btn-danger-ghost:hover { background: rgba(229,72,77,.1); color: var(--danger); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn.disabled { opacity: .45; pointer-events: none; }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--gold-300); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; font-size: 1.05rem; padding: 0; }
.icon-btn:hover { border-color: rgba(232,167,53,.45); color: var(--text); }
.round-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(6,10,20,.6); color: #fff; display: inline-flex;
  align-items: center; justify-content: center; cursor: pointer; backdrop-filter: blur(6px); font-size: 1.15rem; }
.round-btn:hover { background: rgba(6,10,20,.85); }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--pill); border: 1px solid var(--border);
  background: var(--card); color: var(--text-2); font: 600 .82rem/1.2 var(--font); cursor: pointer; text-decoration: none; }
.chip-btn:hover { color: var(--text); border-color: rgba(232,167,53,.45); }

/* Skip link */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--accent); color: var(--navy-950); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 700; }
.skip-link:focus { top: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 60; background: rgba(10,14,26,.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.wordmark { font-family: var(--font-display); letter-spacing: .2em; font-size: 1rem; color: var(--text); white-space: nowrap; }
.wordmark span { color: var(--accent); }
.wordmark.big { font-size: 1.6rem; }
.main-nav { display: none; gap: 4px; margin: 0 auto; }
.main-nav a { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: .92rem; padding: 8px 12px; border-radius: var(--pill); white-space: nowrap; }
.avatar-initial.sm { width: 22px; height: 22px; font-size: .72rem; }
.main-nav a:hover { color: var(--text); background: var(--surface); }
.main-nav a[aria-current="page"] { color: var(--accent); background: var(--gold-soft); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.avatar-initial { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--accent); color: var(--navy-950); font-weight: 800; font-size: .9rem; flex-shrink: 0; }
.avatar-initial.big { width: 64px; height: 64px; font-size: 1.6rem; }
.account-btn .avatar-initial { width: 100%; height: 100%; }
@media (max-width: 420px) { .brand .wordmark { font-size: .82rem; letter-spacing: .14em; } }

/* Language switcher (flag next to every language) */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 12px; border-radius: var(--pill);
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 700; font-size: .85rem; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu .flag { font-size: 1.1rem; line-height: 1; }
.lang-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; margin: 0; padding: 6px; list-style: none; background: var(--navy-750);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 80; }
.lang-up .lang-list { top: auto; bottom: calc(100% + 8px); left: 0; right: auto; }
.lang-list a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.lang-list a:hover, .lang-list a[aria-current="true"] { background: var(--gold-soft); }
.lang-check { margin-left: auto; color: var(--accent); }

/* Phone tab bar (like the app's floating tab bar) */
.tabbar { position: fixed; z-index: 70; left: 10px; right: 10px; margin: 0 auto; max-width: 560px; bottom: calc(10px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(15,22,41,.94); backdrop-filter: blur(14px); border: 1px solid var(--border); border-radius: 22px; padding: 6px; box-shadow: var(--shadow); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 16px; color: var(--text-muted);
  text-decoration: none; font-size: .7rem; font-weight: 600; min-width: 0; }
.tabbar a span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar a .ion { font-size: 1.3rem; }
.tabbar a[aria-current="page"] { color: var(--accent); background: var(--gold-soft); }

/* Footer */
.site-footer { margin-top: 64px; background: var(--navy-950); border-top: 1px solid var(--border); padding: 40px 0 24px; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-brand p { color: var(--text-muted); max-width: 32ch; }
.site-footer h2 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.site-footer nav a { display: block; color: var(--text-2); text-decoration: none; padding: 4px 0; font-size: .93rem; }
.site-footer nav a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 28px; padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--text-muted); font-size: .85rem; }
.footer-bottom p { margin: 0; }

/* Flash messages and toast */
.flash-wrap { padding-top: 14px; }
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); border: 1px solid; margin-bottom: 8px; }
.flash span { flex: 1; }
.flash-ok { background: rgba(47,174,96,.12); border-color: rgba(47,174,96,.35); }
.flash-ok > .ion { color: var(--success); }
.flash-error { background: rgba(229,72,77,.12); border-color: rgba(229,72,77,.35); }
.flash-error > .ion { color: var(--danger); }
.flash-close { background: none; border: 0; color: var(--text-muted); cursor: pointer; padding: 0; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 30px); z-index: 250; background: var(--navy-700);
  color: var(--text); padding: 10px 18px; border-radius: var(--pill); box-shadow: var(--shadow); border: 1px solid var(--border); font-weight: 600; }


/* ── Layout modes ──────────────────────────────────────────────────────────
   Dock mode (default): phones and iPads — the bottom dock replaces the navigation links.
   Navbar mode: desktop/laptop screens with a mouse — links + quick tools in the header, no dock. */
.navbar-only { display: none !important; }
@media (min-width: 1200px) and (hover: hover) and (pointer: fine) {
  body { padding-bottom: 0; }
  .main-nav { display: flex; }
  .navbar-only { display: inline-flex !important; }
  .tabbar { display: none; }
  .toast { bottom: 30px; }
}

/* Quick tools in the header (Emergency, Currency) */
.tool-btn { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 12px; border-radius: var(--pill); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); text-decoration: none; font-weight: 700; font-size: .85rem; white-space: nowrap; }
.tool-btn .ion { color: var(--accent); }
.tool-btn:hover, .tool-btn[aria-current="page"] { border-color: rgba(232,167,53,.55); color: var(--text); background: var(--gold-soft); }
.tool-btn span { display: none; }
@media (min-width: 1380px) { .tool-btn span { display: inline; } }
.tool-sos .ion { color: #ff6b70; }
.tool-sos:hover, .tool-sos[aria-current="page"] { border-color: rgba(229,72,77,.6); background: rgba(229,72,77,.12); }
.main-nav a, .tool-btn, .icon-btn { flex-shrink: 0; }

/* Elastic search in the header: grows in place, with live results under it */
.hsearch { position: relative; display: flex; align-items: center; height: 42px; border-radius: var(--pill); border: 1px solid var(--border);
  background: var(--surface); transition: border-color .2s ease, background .2s ease; }
.hsearch .hsearch-toggle { border: 0; background: none; width: 40px; height: 40px; }
.hsearch input[type="search"] { width: 0; min-width: 0; padding: 0; border: 0; background: none; min-height: 0; height: 40px; color: var(--text); font: inherit; outline: none;
  box-shadow: none !important; opacity: 0; transition: width .55s cubic-bezier(.34, 1.56, .64, 1), opacity .2s ease, padding .3s ease; }
.hsearch-close { display: none; border: 0; background: none; color: var(--text-muted); width: 36px; height: 36px; cursor: pointer; font-size: 1.05rem; padding: 0; }
.hsearch.is-open { border-color: rgba(232,167,53,.6); background: var(--navy-800); box-shadow: var(--focus); }
.hsearch.is-open input[type="search"] { width: min(320px, 26vw); opacity: 1; padding-right: 4px; }
.hsearch.is-open .hsearch-close { display: inline-flex; align-items: center; justify-content: center; }
.hsearch .search-results { left: auto; right: 0; width: min(420px, calc(100vw - 24px)); }
/* Phones and iPads: the open search takes the whole header row */
@media not all and (min-width: 1200px) and (hover: hover) and (pointer: fine) {
  .site-header.search-open .brand, .site-header.search-open .lang-menu { display: none; }
  .site-header.search-open .header-actions { flex: 1; }
  .site-header.search-open .hsearch { flex: 1; }
  .hsearch.is-open input[type="search"] { width: 100%; flex: 1; }
  .hsearch .search-results { width: calc(100vw - 24px); right: -2px; }
}
/* Desktop: while searching, the field takes the place of the navigation links */
@media (min-width: 1200px) and (hover: hover) and (pointer: fine) {
  .site-header.search-open .main-nav { display: none; }
  .site-header.search-open .header-actions { margin-left: auto; }
  .hsearch.is-open input[type="search"] { width: min(420px, 32vw); }
}
.hsearch input[type="search"]::-webkit-search-cancel-button { display: none; }
@media (prefers-reduced-motion: reduce) { .hsearch input[type="search"] { transition: none; } }

/* Timed popups (advertising, get the app) */
.popup { width: min(400px, calc(100vw - 32px)); padding: 28px 22px 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--navy-800);
  color: var(--text); text-align: center; box-shadow: var(--shadow); }
.popup[open] { animation: popup-in .35s cubic-bezier(.34, 1.4, .64, 1); }
.popup::backdrop { background: rgba(3,5,10,.65); backdrop-filter: blur(3px); }
@keyframes popup-in { from { opacity: 0; transform: scale(.9) translateY(10px); } }
.popup h2 { font-size: 1.2rem; margin: 10px 0 8px; }
.popup p { color: var(--text-2); font-size: .95rem; }
.popup-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface); color: var(--text-muted); cursor: pointer; font-size: 1.1rem; }
.popup-icon { display: inline-flex; width: 64px; height: 64px; border-radius: 50%; align-items: center; justify-content: center; background: var(--gold-soft); color: var(--accent); font-size: 1.8rem; }
.popup-app-icon img { width: 72px; height: 72px; border-radius: 18px; margin: 0 auto; box-shadow: var(--shadow); }
.popup-mail { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; margin: 0 0 16px; border-radius: var(--radius); border: 1px solid rgba(232,167,53,.3);
  background: rgba(232,167,53,.07); color: var(--accent); text-decoration: none; }
.popup-mail > span:not(.ion) { flex: 1; min-width: 0; text-align: left; }
.popup-mail > .ion { flex-shrink: 0; }
.popup-mail small { display: block; font-size: .75rem; opacity: .85; }
.popup-mail strong { display: block; overflow-wrap: anywhere; font-size: clamp(.86rem, 3.9vw, 1rem); }
@media (max-width: 400px) { .popup-mail { gap: 10px; padding: 12px; } }
.store-buttons { display: grid; gap: 10px; margin: 6px 0 14px; }
@media (min-width: 420px) { .store-buttons { grid-template-columns: 1fr 1fr; } }
.store-btn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: #000; border: 1px solid rgba(255,255,255,.25);
  color: #fff; text-decoration: none; text-align: left; }
.store-btn .ion { font-size: 1.6rem; }
.store-btn small { display: block; font-size: .68rem; opacity: .85; line-height: 1.1; }
.store-btn strong { display: block; font-size: 1rem; line-height: 1.2; }
.store-btn:hover { color: #fff; border-color: var(--accent); }
.store-btn.is-soon { opacity: .55; cursor: not-allowed; }
