/* assets/css/style.css */
:root {
  --accent: #1a5fd6;
  --text: #0f1720;
  --muted: #57606a;
  --border: #e3e8ee;
  --bg: #f6f8fa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #ffffff;
  line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }

.site-header, .site-footer {
  padding: 18px 24px;
}
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(6px);
  z-index: 10;
}
.site-footer { border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.site-header a { text-decoration: none; color: var(--text); font-size: 18px; font-weight: 600; }
.site-header .dim { color: var(--muted); font-weight: 400; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

main { max-width: 800px; margin: 0 auto; padding: 48px 24px 64px; }

.hero-inner { display: flex; align-items: center; gap: 32px; }
.hero-text { flex: 1; min-width: 0; }
.hero-illustration { flex: 0 0 240px; }
.hero-illustration svg { width: 100%; height: auto; display: block; }
.hero h1 { font-size: 34px; margin: 0 0 10px; max-width: 18ch; }
.hero-subhead { margin: 0 0 20px; color: var(--muted); font-size: 16px; max-width: 42ch; }
.hero input#airport-search {
  width: 100%;
  font-size: 16px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  transition: border-color .15s, box-shadow .15s;
}
.hero input#airport-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 95, 214, 0.15);
  background: #fff;
}
#search-results ul { list-style: none; padding: 0; margin: 8px 0 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
#search-results li { border-bottom: 1px solid var(--border); }
#search-results li:last-child { border-bottom: none; }
#search-results a { display: block; padding: 10px 14px; color: var(--text); }
#search-results a:hover { background: var(--bg); text-decoration: none; }

.popular { margin-top: 48px; }
.popular h2, .explainer h2 { font-size: 20px; }
.popular-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.popular-list li a {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.popular-list li a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; background: var(--bg); }

.explainer {
  margin-top: 48px;
  padding: 24px;
  background: var(--bg);
  border-radius: 12px;
}
.explainer h2 { margin-top: 0; }
.explainer h2 ~ h2 { margin-top: 24px; }
.explainer p { margin: 0 0 16px; color: var(--text); }
.explainer p:last-child { margin-bottom: 0; }
.explainer code {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.9em;
}

.breadcrumb { margin: 0 0 20px; font-size: 13px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; padding: 0; margin: 0; }
.breadcrumb li { color: var(--muted); }
.breadcrumb li:not(:last-child)::after { content: "\203A"; margin: 0 6px; color: var(--border); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb li[aria-current="page"] { color: var(--text); font-weight: 600; }

.airport-layout { display: flex; gap: 24px; align-items: flex-start; }

.facts {
  flex: 0 0 30%;
  background: #f6f8fa;
  border-radius: 12px;
  padding: 16px;
  font-size: 15px;
  line-height: 1.7;
}
.facts .fact { margin-bottom: 12px; }
.facts .label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

.airport-main { flex: 1; min-width: 0; }
.airport-subtitle { color: var(--text); font-size: 22px; font-weight: 600; margin: 0 0 4px; }
.airport-type-badge { display: inline-block; background: #eef2f7; color: #57606a; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; padding: 3px 9px; border-radius: 5px; margin: 0 0 12px; }
.seo-lead { font-size: 15px; margin: 0 0 16px; }

.switch-airport-link {
  display: inline-block;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 16px;
}
.switch-airport-link:hover { color: var(--accent); }
.seo-note { margin: 24px 0; padding: 16px; background: var(--bg); border-radius: 10px; font-size: 14px; color: var(--muted); }

.calculator {
  border: 2px dashed var(--accent);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}
.calculator h2 { margin-bottom: 2px; }
.calculator-subtitle { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.calculator-row { display: flex; gap: 8px; margin-top: 8px; }
.calculator-row .calc-origin {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.calc-destination-wrap { flex: 1; min-width: 0; position: relative; }
.calc-destination {
  width: 100%;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.calc-destination-results:not(:empty) {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(15, 23, 32, 0.12);
  overflow: hidden;
}
.calc-destination-results ul { list-style: none; padding: 0; margin: 0; max-height: 240px; overflow-y: auto; }
.calc-destination-results li {
  padding: 10px 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.calc-destination-results li:last-child { border-bottom: none; }
.calc-destination-results li:hover { background: var(--bg); }
.calc-result { margin-top: 10px; font-size: 14px; }
.calc-dest-time, .calc-dest-weather { margin-top: 6px; color: var(--muted); }

.map iframe { border: 1px solid var(--border); border-radius: 10px; display: block; margin-bottom: 16px; }

.directions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
.directions-btn {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
}
.directions-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
  background: #fff;
}

table.runways, table.frequencies {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 14px;
}
table.runways th, table.runways td,
table.frequencies th, table.frequencies td {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid var(--border);
}

.nearby ul { list-style: none; padding: 0; }
.nearby li { padding: 6px 0; border-bottom: 1px solid var(--border); }

.faq-item { margin-bottom: 14px; }
.faq-item h3 { font-size: 16px; margin-bottom: 4px; }

/* Mobile: sidebar stacks above main content, facts become a 2x2 grid */
@media (max-width: 720px) {
  .hero-illustration { display: none; }
  .airport-layout { flex-direction: column; align-items: stretch; }
  .facts {
    flex: none;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .facts .fact:last-child { grid-column: 1 / -1; }
}
