/* ===========================================================================
   geodom-atlas.css — Kopf, Navigation, Fuß und WhatsApp-Werkzeug im Stil der
   Designfassung "Editorial Atlas" (design/dist).

   Warum eine eigene Datei und nicht design.css direkt:
   Die App arbeitet mit Bootstrap, die Designfassung mit eigenen Klassennamen.
   Beide definieren .card, .badge, .lead und .active. design.css global zu
   laden, wuerde die 44 Bootstrap-Karten der App zerschiessen. Hier stehen
   deshalb nur die Regeln fuer die gemeinsamen Rahmenelemente - die
   Inhaltsbereiche der App bleiben Bootstrap.

   Die Startseite index.php laedt stattdessen das vollstaendige Design-CSS,
   weil sie ohne Bootstrap neu aufgebaut ist.
   =========================================================================== */

:root {
  --atlas-navy:   #06182d;
  --atlas-mint:   #52e3c2;
  --atlas-line:   #d6e2ec;
  --atlas-soft:   #f3f8fb;
  --atlas-ink:    #10253b;
  --atlas-muted:  #607389;
  --atlas-link:   #1d6af4;   /* WCAG AA: 4,75:1 auf Weiß */
}

/* ---------- Kopf ---------- */
.atlas-header {
  background: var(--atlas-navy);
  color: #fff;
  padding: 0 max(4vw, 20px);
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 1030;
}
.atlas-brand { display: inline-flex; align-items: center; text-decoration: none; }
.atlas-brand img { height: 40px; width: auto; display: block; }
.atlas-brand:focus-visible { outline: 3px solid var(--atlas-mint); outline-offset: 4px; border-radius: 4px; }

/* ---------- Navigation ---------- */
.atlas-nav { display: flex; align-items: center; gap: clamp(.5rem, 1.6vw, 1.4rem); }
.atlas-nav > a,
.atlas-nav summary {
  color: #d8e8f4;
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
  padding: .4rem .15rem;
}
.atlas-nav > a:hover,
.atlas-nav > a:focus-visible,
.atlas-nav summary:hover { color: var(--atlas-mint); }
.atlas-nav > a:focus-visible,
.atlas-nav summary:focus-visible {
  outline: 3px solid var(--atlas-mint);
  outline-offset: 3px;
  border-radius: 4px;
}
.atlas-nav > a[aria-current="page"] { color: var(--atlas-mint); }

/* Aufklappmenüs: <details> braucht kein JavaScript und ist tastaturbedienbar */
.atlas-menu { position: relative; }
.atlas-menu summary { cursor: pointer; list-style: none; }
.atlas-menu summary::-webkit-details-marker { display: none; }
.atlas-menu summary::after { content: " ▾"; font-size: .75em; }
.atlas-menu[open] summary::after { content: " ▴"; }
.atlas-menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + .6rem);
  min-width: 200px;
  padding: .4rem;
  background: #fff;
  border: 1px solid var(--atlas-line);
  border-radius: .4rem;
  box-shadow: 0 12px 30px rgba(7, 29, 54, .18);
  z-index: 40;
}
.atlas-menu > div a {
  display: block;
  padding: .55rem .7rem;
  color: var(--atlas-navy);
  text-decoration: none;
  font-size: .93rem;
  border-radius: .25rem;
}
.atlas-menu > div a:hover,
.atlas-menu > div a:focus-visible { background: var(--atlas-soft); color: var(--atlas-link); }
.atlas-menu > div a:focus-visible { outline: 2px solid var(--atlas-link); outline-offset: -2px; }

/* ---------- Burger ---------- */
.atlas-burger {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: .35rem;
  color: #fff;
  padding: .45rem .6rem;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.atlas-burger:focus-visible { outline: 3px solid var(--atlas-mint); outline-offset: 2px; }

@media (max-width: 900px) {
  .atlas-header { flex-wrap: wrap; padding-block: .7rem; }
  .atlas-burger { display: block; }
  .atlas-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
    padding-bottom: .6rem;
  }
  .atlas-nav.is-open { display: flex; }
  .atlas-nav > a,
  .atlas-nav summary {
    padding: .7rem .2rem;
    border-top: 1px solid rgba(255, 255, 255, .12);
  }
  .atlas-menu > div {
    position: static;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: 0 0 .4rem .9rem;
  }
  .atlas-menu > div a { color: #d8e8f4; }
  .atlas-menu > div a:hover,
  .atlas-menu > div a:focus-visible { background: rgba(82, 227, 194, .14); color: var(--atlas-mint); }
}

/* ---------- Fuß ---------- */
.atlas-footer {
  background: var(--atlas-navy);
  color: #b9cbdb;
  padding: 2.6rem max(4vw, 20px) 2rem;
  margin-top: 3rem;
  display: grid;
  gap: 1.6rem;
}
@media (min-width: 700px) { .atlas-footer { grid-template-columns: 2fr 1fr 1fr; } }
.atlas-footer strong { color: #fff; display: block; margin-bottom: .4rem; font-size: 1.05rem; }
.atlas-footer p { margin: 0; font-size: .9rem; max-width: 34rem; }
.atlas-footer a { display: block; color: #b9cbdb; text-decoration: none; padding: .2rem 0; font-size: .9rem; }
.atlas-footer a:hover { color: var(--atlas-mint); }
.atlas-footer a:focus-visible { outline: 3px solid var(--atlas-mint); outline-offset: 2px; border-radius: 3px; }

/* ---------- WhatsApp ---------- */
.whatsapp-tool {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1040;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .7rem .9rem;
  background: #0b7a54;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(7, 29, 54, .22);
  font-weight: 700;
  font-size: .92rem;
}
.whatsapp-tool:hover { background: #0d8f63; color: #fff; }
.whatsapp-tool:focus-visible { outline: 3px solid var(--atlas-mint); outline-offset: 3px; }

/* Auf schmalen Bildschirmen schrumpft der Knopf auf das Symbol. Als breite
   Pille verdeckte er dort Hero-Links, Fusszeilen, Ratgeberbilder und die
   Score-Spalte der Top-500-Tabelle. */
@media (max-width: 700px) {
  .whatsapp-tool {
    right: 14px;
    bottom: 14px;
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
    gap: 0;
    font-size: 1.35rem;
  }
  .whatsapp-tool b { position: absolute; left: -9999px; }  /* Text bleibt vorlesbar */
}

/* Platz am Seitenende, damit der Knopf die letzte Zeile nicht verdeckt. */
.atlas-footer { padding-bottom: 5.5rem; }
@media (min-width: 701px) { .atlas-footer { padding-bottom: 2rem; } }

/* ---------- Sprungmarke ---------- */
.atlas-skip { position: absolute; left: -999px; }
.atlas-skip:focus {
  left: 1rem; top: 1rem; z-index: 1050;
  background: #fff; color: var(--atlas-navy);
  padding: .7rem 1rem; border-radius: .3rem;
}

/* Bootstrap-Navbar der Altfassung stilllegen, falls eine Seite sie noch rendert */
.navbar + .atlas-header { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .atlas-nav, .atlas-menu > div { transition: none !important; }
}
