/* ============================================================
   Finanz Informatik – Übungsklon (Layout-Studie von f-i.de)
   Kein Build-Schritt, keine Abhängigkeiten außer Google Fonts.
   ============================================================ */

:root {
  --red: #ee0000;
  --red-dark: #c80000;
  --red-darker: #8f0000;
  --ink: #212121;
  --gray: #4c4c4c;
  --gray-mid: #878787;
  --gray-line: #d9d9d9;
  --bg: #ffffff;
  --bg-soft: #f2f2f2;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --container: 1200px;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.12);
  --header-h: 76px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }

.icon {
  width: 1.1em;
  height: 1.1em;
  fill: currentColor;
  flex: none;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--red);
  color: #fff;
  padding: 10px 18px;
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid rgba(238, 0, 0, 0.55);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-dark); }
.btn--white { background: #fff; color: var(--ink); }
.btn--white:hover { background: var(--bg-soft); }
.btn--lg { padding: 15px 30px; font-size: 17px; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--ink);
  color: #e8e8e8;
  font-size: 13.5px;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  padding-block: 4px;
}
.topbar__contact, .topbar__right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.topbar__item { display: inline-flex; align-items: center; gap: 7px; }
.topbar__item .icon { opacity: 0.7; }
.topbar__social {
  display: inline-flex;
  color: #cfcfcf;
  padding: 4px;
}
.topbar__social:hover { color: #fff; }
.topbar__cta {
  background: var(--red);
  color: #fff;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.topbar__cta:hover { background: var(--red-dark); text-decoration: none; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--gray-line);
  transition: box-shadow 0.2s ease;
}
.header.is-scrolled { box-shadow: var(--shadow-md); }

.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

/* Logo (nachempfundene Wortmarke, kein Original) */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  flex: none;
}
.brand:hover { text-decoration: none; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: var(--red);
  color: #fff;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.5px;
  border-radius: 4px;
}
.brand__word { display: flex; flex-direction: column; line-height: 1.12; }
.brand__line { font-weight: 800; font-size: 17px; letter-spacing: 0.2px; }

/* ---------- Navigation ---------- */
.nav { margin-left: auto; height: 100%; }
.nav__list {
  display: flex;
  align-items: stretch;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
}
.nav__item { position: static; display: flex; }
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--ink);
  font-weight: 700;
  font-size: 15.5px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav__link:hover, .nav__link[aria-expanded="true"] {
  color: var(--red);
  border-bottom-color: var(--red);
}
.nav__caret { transition: transform 0.2s ease; }
.nav__link[aria-expanded="true"] .nav__caret { transform: rotate(180deg); }

/* Mega-Dropdown */
.dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-top: 1px solid var(--gray-line);
  border-bottom: 3px solid var(--red);
  box-shadow: var(--shadow-md);
  padding: 30px 0 36px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.has-dropdown.is-open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown__grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 32px;
}
.dropdown__heading {
  display: inline-block;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
}
.dropdown__heading::after {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  background: var(--red);
  margin-top: 8px;
}
.dropdown__hint { margin: 0; color: var(--gray); font-size: 14px; }
.dropdown__label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-mid);
  margin-bottom: 10px;
}
.dropdown__col a:not(.dropdown__heading) {
  display: block;
  color: var(--ink);
  font-size: 15px;
  padding: 5px 0;
}
.dropdown__col a:not(.dropdown__heading):hover { color: var(--red); text-decoration: none; }

/* Header-Tools */
.header__tools {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: 8px;
}
.tool-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--bg-soft);
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease;
}
.tool-btn:hover, .tool-btn[aria-expanded="true"] { background: var(--red); color: #fff; }

.lang { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.lang__opt { color: var(--gray); }
.lang__opt.is-active { color: var(--red); }
.lang__sep { color: var(--gray-line); }

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: var(--bg-soft);
  border: 0;
  border-radius: var(--radius);
}
.burger span {
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Suchleiste */
.searchbar {
  border-top: 1px solid var(--gray-line);
  background: var(--bg-soft);
  padding: 16px 0;
}
.searchbar__form { display: flex; gap: 10px; }
.searchbar__form input {
  flex: 1;
  padding: 11px 16px;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
}

/* ---------- Hero / Slider ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
}
.hero__track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}
.slide {
  position: relative;
  flex: 0 0 100%;
  min-height: 520px;
  display: flex;
  align-items: center;
  color: #fff;
  isolation: isolate;
}
.slide__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
/* Dekorative Muster-Ebene für alle Folien */
.slide__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  mask-image: linear-gradient(105deg, transparent 42%, #000 75%);
  -webkit-mask-image: linear-gradient(105deg, transparent 42%, #000 75%);
}
.slide__bg::before {
  content: "";
  position: absolute;
  right: -12%;
  top: 50%;
  width: 640px;
  height: 640px;
  transform: translateY(-50%) rotate(18deg);
  border: 90px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}
/* Farbwelten pro Folie */
.slide--forum .slide__bg      { background: linear-gradient(115deg, #5c0000 0%, #a40000 55%, #ee0000 100%); }
.slide--newsletter .slide__bg { background: linear-gradient(115deg, #212121 0%, #3d3d3d 55%, #8f0000 100%); }
.slide--bericht .slide__bg    { background: linear-gradient(115deg, #1c2a3a 0%, #31465e 55%, #c80000 130%); }
.slide--magazin .slide__bg    { background: linear-gradient(115deg, #7a1400 0%, #c43c00 60%, #ee6a00 100%); }
.slide--podcast .slide__bg    { background: linear-gradient(115deg, #241a2e 0%, #453252 60%, #8f0000 130%); }
.slide--karriere .slide__bg   { background: linear-gradient(115deg, #8f0000 0%, #ee0000 60%, #ff5a3c 115%); }

.slide__inner { padding-block: 90px; max-width: var(--container); }
.slide__kicker {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.slide__title {
  margin: 0 0 14px;
  font-size: clamp(34px, 5.2vw, 60px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.01em;
  max-width: 14ch;
}
.slide__text {
  margin: 0 0 28px;
  font-size: clamp(16px, 1.8vw, 19px);
  max-width: 52ch;
  color: rgba(255, 255, 255, 0.92);
}
/* sanftes Einblenden der aktiven Folie */
.slide .slide__inner > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.slide.is-active .slide__inner > * { opacity: 1; transform: none; }
.slide.is-active .slide__inner > *:nth-child(2) { transition-delay: 0.08s; }
.slide.is-active .slide__inner > *:nth-child(3) { transition-delay: 0.16s; }
.slide.is-active .slide__inner > *:nth-child(4) { transition-delay: 0.24s; }

.hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(4px);
  transition: background 0.15s ease;
  z-index: 2;
}
.hero__arrow:hover { background: var(--red); }
.hero__arrow .icon { width: 26px; height: 26px; }
.hero__arrow--prev { left: 18px; }
.hero__arrow--next { right: 18px; }

.hero__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  display: flex;
  justify-content: center;
  gap: 9px;
  z-index: 2;
}
.hero__dots button {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: background 0.15s ease, transform 0.15s ease;
}
.hero__dots button.is-active { background: #fff; transform: scale(1.3); }

/* ---------- Sections allgemein ---------- */
.section-title {
  margin: 0 0 26px;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 900;
  letter-spacing: -0.01em;
}
.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: var(--red);
  margin-top: 12px;
}

/* ---------- News ---------- */
.news { padding: 72px 0 84px; background: var(--bg-soft); }

.news__filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}
.chip {
  padding: 9px 18px;
  border: 1.5px solid var(--gray-line);
  border-radius: 999px;
  background: #fff;
  color: var(--gray);
  font-weight: 600;
  font-size: 14.5px;
  transition: all 0.15s ease;
}
.chip:hover { border-color: var(--red); color: var(--red); }
.chip.is-active { background: var(--red); border-color: var(--red); color: #fff; }

.news__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card.is-hidden { display: none; }

.card__media {
  position: relative;
  aspect-ratio: 16 / 8.5;
  display: grid;
  place-items: center;
}
.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
}
.card__media svg {
  width: 64px;
  height: 64px;
  fill: rgba(255, 255, 255, 0.9);
  position: relative;
  z-index: 1;
}
.card__media--leaf   { background: linear-gradient(120deg, #1f5c2d, #3f9e57); }
.card__media--people { background: linear-gradient(120deg, #8f0000, #ee0000); }
.card__media--chart  { background: linear-gradient(120deg, #20344a, #3f6ea5); }
.card__media--shield { background: linear-gradient(120deg, #3d3d3d, #6b6b6b); }
.card__media--bank   { background: linear-gradient(120deg, #5c0000, #a40000); }
.card__media--doc    { background: linear-gradient(120deg, #31465e, #5b7ea6); }
.card__media--lock   { background: linear-gradient(120deg, #b33c00, #ee6a00); }
.card__media--home   { background: linear-gradient(120deg, #7a1400, #c43c00); }
.card__media--desk   { background: linear-gradient(120deg, #453252, #7a5f96); }
.card__media--code   { background: linear-gradient(120deg, #212121, #4c4c4c); }
.card__media--run    { background: linear-gradient(120deg, #c80000, #ff5a3c); }
.card__media--mic    { background: linear-gradient(120deg, #241a2e, #5a4470); }

.card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 24px;
  flex: 1;
}
.card__meta {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--gray-mid);
}
.card__cat {
  padding: 3px 10px;
  background: rgba(238, 0, 0, 0.09);
  color: var(--red);
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}
.card__title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
}
.card__text {
  margin: 0;
  color: var(--gray);
  font-size: 14.5px;
  flex: 1;
}
.card__link {
  font-weight: 700;
  font-size: 14.5px;
  margin-top: 4px;
}
.card__link:hover { text-decoration: none; }
.card__link span { display: inline-block; transition: transform 0.15s ease; }
.card__link:hover span { transform: translateX(4px); }

/* ---------- CTA-Band ---------- */
.cta {
  background:
    radial-gradient(rgba(255, 255, 255, 0.12) 1.5px, transparent 1.5px) 0 0 / 26px 26px,
    linear-gradient(115deg, #8f0000 0%, #ee0000 70%, #ff5a3c 120%);
  color: #fff;
  padding: 64px 0;
}
.cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  flex-wrap: wrap;
}
.cta__title {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 900;
}
.cta__text { margin: 0; max-width: 58ch; color: rgba(255, 255, 255, 0.92); }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: #cfcfcf;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 40px;
  padding: 64px 20px 48px;
}
.brand--footer { color: #fff; margin-bottom: 18px; }
.footer__addr { font-size: 14.5px; line-height: 1.7; margin: 0 0 22px; }
.footer__addr a { color: #fff; }
.footer__nl label {
  display: block;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  font-size: 14.5px;
}
.footer__nl-row { display: flex; gap: 8px; }
.footer__nl-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid #555;
  border-radius: var(--radius);
  background: #333;
  color: #fff;
  font: inherit;
  font-size: 14px;
}
.footer__nl-row input::placeholder { color: #999; }

.footer__heading {
  margin: 0 0 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.footer__heading::after {
  content: "";
  display: block;
  width: 26px;
  height: 3px;
  background: var(--red);
  margin-top: 8px;
}
.footer__col nav, .footer__col a { font-size: 14.5px; }
.footer__col > a {
  display: block;
  color: #cfcfcf;
  padding: 4px 0;
}
.footer__col > a:hover { color: #fff; text-decoration: none; }

.subfooter {
  border-top: 1px solid #3a3a3a;
  padding: 20px 0;
  font-size: 13px;
}
.subfooter__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.subfooter__links { display: flex; flex-wrap: wrap; gap: 18px; }
.subfooter__links a { color: #cfcfcf; }
.subfooter__links a:hover { color: #fff; }
.subfooter__note { margin: 0; color: var(--gray-mid); max-width: 60ch; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1020px) {
  .dropdown__grid { grid-template-columns: repeat(2, 1fr); }
  .news__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__col--brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .topbar__item--hide-sm { display: none; }

  /* Mobile Navigation als Overlay */
  .burger { display: inline-flex; }
  .nav {
    position: fixed;
    inset: 0;
    top: var(--header-h);
    background: #fff;
    margin: 0;
    padding: 12px 20px 40px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 90;
    visibility: hidden;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav__list { flex-direction: column; align-items: stretch; height: auto; gap: 0; }
  .nav__item { display: block; border-bottom: 1px solid var(--gray-line); }
  .nav__link {
    width: 100%;
    justify-content: space-between;
    padding: 16px 4px;
    border-bottom: 0;
    font-size: 17px;
  }
  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    border-bottom: 0;
    padding: 0 4px 0;
    display: none;
  }
  .has-dropdown.is-open .dropdown { display: block; padding-bottom: 16px; }
  .dropdown__grid { grid-template-columns: 1fr; gap: 18px; }
  .dropdown__hint { display: none; }

  .slide { min-height: 460px; }
  .hero__arrow { display: none; }
}

@media (max-width: 620px) {
  .news__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .cta__inner { flex-direction: column; align-items: flex-start; }
  .subfooter__inner { flex-direction: column; align-items: flex-start; }
}

/* Bewegungsreduktion respektieren */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
