/* Startseite: Heimat-Flughafen wählen — gleicher Farbcode & gleiche Breite wie die
   Ergebnisseiten (flight-search.css): Marken-Tokens, 1120px-Inhaltsbreite, Navy-Header. */
:root {
  --brand-dark: #003663;
  --brand-accent: #e8520a;
  --gray-bg: #f5f5f5;
  --gray-border: #ddd;
  --gray-text: #666;
  --white: #fff;
  /* Home-Aliase zeigen jetzt auf die App-Tokens (kein Eigen-Farbschema mehr). */
  --home-bg: var(--gray-bg);
  --home-text: #1a1f2e;
  --home-muted: var(--gray-text);
  --home-link-bg: #fff;
  --home-link-border: var(--gray-border);
  --home-link-hover: #eef2f7;
  --home-accent: var(--brand-dark);
  --home-maxw: 1120px;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body.home-page {
  font-family: "Source Sans 3", system-ui, -apple-system, sans-serif;
  background: var(--gray-bg);
  color: var(--home-text);
}

/* Navy-Kopfleiste — gleiche Marke wie die Ergebnisseiten. */
.home-topbar {
  background: var(--brand-dark);
}
.home-topbar-inner {
  max-width: var(--home-maxw);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.home-brand .home-brand-plane { font-size: 1.15rem; }

/* Inhalt in derselben 1120px-Spalte wie .page-body der Ergebnisseiten. */
.home-shell {
  max-width: var(--home-maxw);
  margin: 0 auto;
  padding: 1.75rem 16px 2.5rem;
}

/* Hero (Heimat-Flughafen wählen) — zentriert, breit genug für 4 Flughafen-Spalten. */
.home-hero {
  max-width: 52rem;
  margin: 0 auto 0.5rem;
  text-align: center;
}

.home-title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.home-airports {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  width: 100%;
}

.home-airport-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 4px;
  border: 1px solid var(--home-link-border);
  background: var(--home-link-bg);
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.home-airport-link:hover,
.home-airport-link:focus-visible {
  background: var(--home-link-hover);
  border-color: var(--brand-dark);
  outline: none;
}

.home-airport-name {
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-airport-code {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--home-accent);
  flex-shrink: 0;
}

.home-search {
  margin: 1.25rem auto 0;
  width: min(100%, 22rem);
  text-align: left;
}

.home-search-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--home-muted);
}

.home-search-field {
  position: relative;
}

.home-search-field.ap-wrap {
  flex: none;
  min-width: 0;
}

.home-search-input.ap-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--home-link-border);
  border-radius: 4px;
  background: var(--home-link-bg);
  font: inherit;
  font-size: 1rem;
  color: var(--home-text);
}

.home-search-input.ap-input:focus {
  outline: none;
  border-color: var(--brand-dark);
  box-shadow: 0 0 0 3px rgba(0, 54, 99, 0.15);
}

/* Gleiche Suggest-Darstellung wie Header */
.home-search-field .ap-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 100%;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(26, 31, 46, 0.12);
  z-index: 500;
  max-height: 16rem;
  overflow-y: auto;
  text-align: left;
}

.home-search-field .ap-dropdown.open {
  display: block;
}

.home-search-field .ap-item {
  padding: 9px 14px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.home-search-field .ap-item:hover,
.home-search-field .ap-item.highlighted {
  background: #f0f4ff;
}

.home-search-field .ap-code {
  font-weight: 700;
  color: var(--brand-dark);
  min-width: 32px;
}

.home-search-field .ap-item-metro .ap-code {
  color: var(--brand-accent);
}

.home-search-field .ap-item-country .ap-code {
  color: #1565c0;
}

.home-search-field .ap-metro-tag {
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-accent);
  opacity: 0.85;
}

.home-search-field .ap-country-tag {
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1565c0;
  opacity: 0.9;
}

.home-search-field .ap-metro-members,
.home-search-field .ap-country-count {
  color: var(--gray-text);
  font-size: 11px;
}

.home-search-field .ap-country {
  color: var(--gray-text);
  font-size: 11px;
}

@media (max-width: 680px) {
  .home-airports {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .home-shell {
    padding-top: 1.25rem;
  }
}

@media (max-width: 340px) {
  .home-airports {
    grid-template-columns: 1fr;
  }
}
