/* ============================================================================
 * site.css — gemeinsames Seitenlayout für Hub und Chart-Seiten
 *
 * Orientiert sich am Layout der Hauptdomain (www.anytime-invest.de/fonds/):
 *   Schriften  Raleway (Überschriften, 600) + Open Sans (Fließtext, 400)
 *   Farben     #14283D (primary), #7B90A3 (secondary), #D0A76A (accent),
 *              #1CFF82 (grün), #102132 (dunkles Navy im Footer)
 *   Container  max. 1200px
 *
 * Der Header ist hier bewusst ein SCHMALES Band (max. 200px) am Seitenkopf
 * statt des 75vh-Heros der Hauptdomain — er trägt nur Logo, Überschrift und
 * Subtitle.
 *
 * Die Theme-Variablen (--bg, --surface, --text, --muted, --accent, --border)
 * werden zur Laufzeit von chart-1.js / chart-2.js bzw. page-theme.js gesetzt.
 * Die Marken-Variablen (--brand-*) bleiben in beiden Themes gleich, damit
 * Header und Footer immer im Corporate Design bleiben.
 * ========================================================================== */

:root {
  /* Marke — unabhängig vom Theme */
  --brand-primary: #14283d;
  --brand-primary-dark: #102132;
  --brand-secondary: #7b90a3;
  --brand-accent: #d0a76a;
  --brand-green: #1cff82;
  --brand-white: #ffffff;

  /* Theme-Startwerte = helles Theme (siehe THEMES in chart-1.js/chart-2.js) */
  --bg: #ffffff;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0c293f;
  --muted: #7591a5;
  --accent: #d8a560;
  --accent-2: #1cff82;
  --border: #7591a5;
  --positive: #1cff82;

  /* Layout */
  --container: 1200px;
  --header-max-height: 200px;
  --radius: 16px;
  --font-head: "Raleway", "Trebuchet MS", sans-serif;
  --font-body: "Open Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 30px;
  font-weight: 400;
  background: linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  margin: 0;
  line-height: 1.15;
}

a { color: var(--accent); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* --------------------------------------------------------------------------
 * Header — schmales Band am Seitenkopf (max. 200px)
 * ------------------------------------------------------------------------ */
.site-header {
  background: linear-gradient(180deg, var(--brand-primary), var(--brand-primary-dark));
  color: var(--brand-white);
  max-height: var(--header-max-height);
  overflow: hidden;
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 120px;
  padding-top: 18px;
  padding-bottom: 18px;
  flex-wrap: wrap;
}

.site-header .brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.site-header .brand img {
  display: block;
  height: 46px;
  width: auto;
}

.header-text {
  flex: 1 1 320px;
  min-width: 0;
}

.header-text h1 {
  font-size: clamp(22px, 2.4vw, 34px);
  color: var(--brand-white);
}

.header-text .subtitle {
  margin: 4px 0 0;
  font-size: clamp(14px, 1.3vw, 18px);
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.78);
}

.header-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-nav a {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 80px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 500;
  color: var(--brand-white);
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.header-nav a:hover {
  background: var(--brand-white);
  color: var(--brand-primary);
}

/* --------------------------------------------------------------------------
 * Inhalt
 * ------------------------------------------------------------------------ */
.site-main {
  flex: 1 0 auto;
  padding: 40px 0 50px;
}

p.lead {
  margin: 0 0 28px;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--surface-2);
}

.kicker {
  display: inline-block;
  margin-bottom: 8px;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.card h2 {
  font-size: 1.2rem;
  margin: 0 0 8px;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

#chartdiv {
  width: 100%;
  height: 560px;
}

.meta {
  margin-top: 12px;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Disclaimer-Block unter dem Chart. Der KPI-Block darüber (#chart-kpis) wird
 * von chart-1.js gerendert und bringt sein Styling selbst mit, weil er die
 * Farben des aktiven Themes braucht. */
.disclaimer {
  margin-top: 20px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted);
}

.disclaimer h2 {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.disclaimer p { margin: 0 0 10px; }

.disclaimer p:last-child { margin-bottom: 0; }

.status {
  margin-top: 28px;
  padding: 14px 16px;
  border: 1px solid var(--positive);
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.95rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------------ */
.site-footer {
  flex: 0 0 auto;
  background: linear-gradient(180deg, var(--brand-primary), var(--brand-primary-dark));
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 1.6;
}

.site-footer .container {
  padding-top: 18px;
  padding-bottom: 18px;
}

/* Zeile 1: Kennzeichnung + Link auf die Hauptdomain */
.site-footer .footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}

.site-footer a {
  color: var(--brand-white);
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer a:hover { color: var(--brand-secondary); }

/* Zeile 2: Haftungsdach-Hinweis der NFS (wird von hinweis.js eingefügt).
 * Das Skript liefert eigenes Markup (.nfs-hinweis-*) samt Logo mit. */
.site-footer .footer-disclaimer {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.site-footer .nfs-hinweis-container {
  padding: 0;
}

.site-footer .nfs-hinweis-text {
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

/* Das NFS-Logo ist dunkel — auf dem Navy-Footer braucht es eine helle Fläche.
 * width: fit-content, damit die Fläche mobil (Skript setzt display:block)
 * nicht über die volle Breite läuft. */
/*.site-footer .nfs-hinweis-logo {
  width: fit-content;
  background: var(--brand-white);
  border-radius: 6px;
  padding: 6px 10px;
}*/

/* Zeile 3: rechtliche Links wie im Footer der Hauptdomain + Copyright */
.site-footer .footer-legal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.footer-legal ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.footer-legal .copyright {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

/* --------------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------------ */
@media (max-width: 767px) {
  body { font-size: 15px; line-height: 1.6; }

  /* Kopfzeile zweizeilig: Logo + Link oben, Überschrift darunter. */
  .site-header .container {
    min-height: 0;
    gap: 10px 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .site-header .brand { order: 1; }
  .site-header .brand img { height: 32px; }

  .header-nav {
    order: 2;
    margin-left: auto;
  }

  .header-nav a {
    padding: 6px 14px;
    font-size: 14px;
  }

  .header-text {
    order: 3;
    flex: 1 1 100%;
  }

  #chartdiv { height: 420px; }
}
