@import url('/custom/assets/fonts/fonts.css');

/* ── Design tokens ── */
:root {
  --font-display: 'Merriweather', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --primary: #129DE8;          /* Brand-Blau */
  --primary-ink: #0B6EA8;      /* Blau für Text/Buttons auf hellem Grund (AA-Kontrast) */
  --primary-deep: #084B75;
  --primary-tint: #E3F2FC;
  --secondary: #0F1E2B;        /* Tiefes Nachtblau */
  --accent: #F0A93B;           /* Warmer Gold-Akzent */

  --bg: #F4F2EC;               /* warmes Papier – das dunkle Logo bleibt gut lesbar */
  --surface: #FFFFFF;
  --text: #2B3641;
  --muted: #667380;
  --border: #DDE3E8;

  --radius: 6px;
  --shadow-sm: 0 1px 2px rgba(15, 30, 43, .06), 0 2px 8px rgba(15, 30, 43, .04);
  --shadow-md: 0 10px 30px rgba(15, 30, 43, .12);
  --t: .22s ease;
  --logo-height: 60px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--secondary);
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0;
  letter-spacing: -.01em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
p:last-child { margin-bottom: 0; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.container-fluid { padding: 0; }
.inner-wrapper { padding: 2rem 0 0; }

/* ── Header / Hauptmenü ── */
.outer-mainmenu-container,
.site-header {
  background-color: var(--primary-tint);
  border-bottom: 1px solid #C5E3F7;
  box-shadow: 0 2px 0 var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .navbar {
  padding: .6rem 0;
  gap: 1rem;
}

.site-header .logo-wrapper { display: block; flex: 0 0 auto; transition: opacity var(--t); }
.site-header .logo-wrapper:hover { opacity: .8; }
.site-header img.logo { height: var(--logo-height); width: auto; max-width: 70vw; }

.site-header .navbar-nav { gap: .15rem; align-items: center; }

.site-header .nav-link {
  font-size: .95rem;
  font-weight: 600;
  color: var(--secondary);
  padding: .5rem .8rem;
  border-radius: var(--radius);
  position: relative;
  transition: color var(--t), background var(--t);
}

.site-header .nav-link:hover { color: var(--primary-ink); background: rgba(18, 157, 232, .12); }

.site-header .nav-link.active { color: var(--primary-ink); }
.site-header .nav-link.active::after {
  content: '';
  position: absolute;
  left: .8rem; right: .8rem; bottom: .15rem;
  height: 2px;
  background: var(--primary);
}

.site-header .nav-link-cta {
  background: var(--primary-ink);
  color: #fff;
  margin-left: .4rem;
  padding: .5rem 1.1rem;
}
.site-header .nav-link-cta:hover,
.site-header .nav-link-cta.active { background: var(--primary-deep); color: #fff; }
.site-header .nav-link-cta.active::after { display: none; }

.site-header .navbar-toggler {
  border: 1px solid #B5D9F0;
  border-radius: var(--radius);
  padding: .45rem .6rem;
  margin-left: auto;
}
.site-header .navbar-toggler:focus { box-shadow: none; }
.site-header .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%230F1E2B' stroke-width='2.5' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

@media (max-width: 1199.98px) {
  .site-header .navbar { flex-wrap: wrap; }
  .site-header .navbar-collapse { flex-basis: 100%; padding: .5rem 0 .75rem; border-top: 1px solid #C5E3F7; margin-top: .5rem; }
  .site-header .navbar-nav { align-items: stretch; }
  .site-header .nav-link { padding: .7rem .5rem; }
  .site-header .nav-link.active::after { left: .5rem; right: auto; width: 2rem; bottom: .3rem; }
  .site-header .nav-link-cta { margin: .4rem 0 0; text-align: center; }
}

@media (max-width: 575.98px) {
  :root { --logo-height: 44px; }
}

/* ── Breadcrumb ── */
.breadcrumb-wrapper { padding: .6rem 0 0; }

.breadcrumb {
  margin: .75rem 0 0;
  padding: 0;
  font-size: .85rem;
  background: transparent;
  --bs-breadcrumb-divider: '›';
}
.breadcrumb .breadcrumb-item a { color: var(--muted); transition: color var(--t); }
.breadcrumb .breadcrumb-item a:hover { color: var(--primary-ink); }
.breadcrumb .breadcrumb-item.active { color: var(--text); }
.breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: var(--muted); }

/* ── Intro (Startseite / Kategorie) ── */
.intro { margin-bottom: 2.5rem; }

.intro h1 {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  margin-bottom: .75rem;
}

.intro > p,
.intro .hero__text {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 62ch;
}

.hero {
  padding: 2rem 2rem 2.25rem;
  background: var(--surface);
  border-radius: var(--radius);
  border-left: 5px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.hero__kicker {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--primary-ink);
  margin-bottom: .6rem;
}

@media (max-width: 575.98px) { .hero { padding: 1.5rem 1.25rem; } }

/* ── Artikel-Karten ── */
.article-list { margin-bottom: 3.25rem; }

.article-list__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem 1.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--secondary);
}
.article-list__head h2 { font-size: 1.75rem; margin: 0; }
.article-list__head h2 a { transition: color var(--t); }
.article-list__head h2 a:hover { color: var(--primary-ink); }

.article-list .row { row-gap: 1.5rem; }

.article-item {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t), transform var(--t);
}
.article-item:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.article-item > a { display: flex; flex-direction: column; height: 100%; }

.article-item .image { aspect-ratio: 66 / 40; overflow: hidden; background: var(--primary-tint); }
.article-item .image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.article-item:hover .image img { transform: scale(1.04); }

.article-item__body { padding: 1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }

.article-item .date,
.article-detail .date {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
}
.article-item .date { margin-bottom: .35rem; }

.article-item h2,
.article-item h3 {
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0 0 .5rem;
  transition: color var(--t);
}
.article-item:hover h2,
.article-item:hover h3 { color: var(--primary-ink); }

.article-item .excerpt {
  font-size: .95rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Artikel-Detail ── */
.article-detail { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 2.25rem 2.5rem 2.5rem; }

.article-detail__head { margin-bottom: 1.5rem; }
.article-detail h1 { font-size: clamp(1.65rem, 3.6vw, 2.25rem); line-height: 1.15; margin-bottom: .75rem; }
.article-detail .date { padding-top: .75rem; border-top: 3px solid var(--primary); display: inline-block; }

.article-detail .image { margin: 0 -2.5rem 2rem; }
.article-detail .image img { width: 100%; max-height: 500px; object-fit: cover; }

.article-detail .content { font-size: 1.125rem; line-height: 1.85; }
.article-detail .content h2 { font-size: 1.65rem; margin: 2.5rem 0 .75rem; }
.article-detail .content h3 { font-size: 1.3rem; margin: 2rem 0 .5rem; }
.article-detail .content p { margin-bottom: 1.3rem; }
.article-detail .content a { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article-detail .content a:hover { color: var(--primary-deep); }
.article-detail .content ul,
.article-detail .content ol { padding-left: 1.4rem; margin-bottom: 1.3rem; }
.article-detail .content li { margin-bottom: .4rem; }
.article-detail .content img { margin: 1.75rem auto; border-radius: var(--radius); }
.article-detail .content blockquote {
  margin: 1.75rem 0; padding: .5rem 0 .5rem 1.25rem;
  border-left: 4px solid var(--accent); color: var(--muted); font-style: italic;
}
.article-detail .content table { width: 100%; margin-bottom: 1.3rem; border-collapse: collapse; font-size: 1rem; }
.article-detail .content th,
.article-detail .content td { border: 1px solid var(--border); padding: .5rem .75rem; }

@media (max-width: 767.98px) {
  .article-detail { padding: 1.5rem 1.25rem 1.75rem; }
  .article-detail .image { margin: 0 -1.25rem 1.5rem; }
}

.related-articles { margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--secondary); }
.related-articles__title { font-size: 1.6rem; margin-bottom: 1.25rem; }

/* ── Normale Seiten ── */
.page-content {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 2.5rem 3rem;
  line-height: 1.8;
}
.page-content h1 { font-size: clamp(1.65rem, 3.6vw, 2.25rem); margin-bottom: 1.5rem; }
.page-content h2 { font-size: 1.5rem; margin: 2.25rem 0 .6rem; }
.page-content h3 { font-size: 1.2rem; margin: 1.5rem 0 .4rem; }
.page-content p { margin-bottom: 1.2rem; }
.page-content a { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.page-content ul,
.page-content ol { padding-left: 1.4rem; margin-bottom: 1.2rem; }
.page-content iframe { max-width: 100%; }

@media (max-width: 767.98px) { .page-content { padding: 1.5rem 1.25rem; } }

/* ── Sidebar ── */
.sidebar { position: sticky; top: 7.5rem; margin-bottom: 1.25rem; }

@media (max-width: 991.98px) { .sidebar { position: static; margin-top: 2rem; } }

.sidebar-label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .75rem;
}

.sidebar-newsletter {
  background: var(--secondary);
  color: #D5DEE6;
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.25rem;
  border-top: 4px solid var(--primary);
}
.sidebar-newsletter .sidebar-label { color: var(--accent); }
.sidebar-newsletter h3 { color: #fff; font-size: 1.35rem; line-height: 1.25; margin-bottom: .6rem; }
.sidebar-newsletter p.fi-newsletter-cta__text,
.sidebar-newsletter .fi-newsletter-cta__text { font-size: .95rem; line-height: 1.55; margin-bottom: 1.25rem; color: #C3CFD9; }

.btn-newsletter {
  display: inline-block;
  background: var(--primary);
  color: var(--secondary);
  font-weight: 700;
  font-size: .95rem;
  padding: .65rem 1.4rem;
  border-radius: var(--radius);
  transition: background var(--t), color var(--t);
}
.btn-newsletter:hover { background: #fff; color: var(--primary-deep); }

.sidebar-categories {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.4rem 1.5rem;
}
.sidebar-categories ul { list-style: none; padding: 0; margin: 0; }
.sidebar-categories li { border-bottom: 1px solid var(--border); }
.sidebar-categories li:last-child { border-bottom: 0; }
.sidebar-categories li a {
  display: flex; justify-content: space-between; align-items: center;
  padding: .65rem 0;
  font-weight: 600;
  font-size: .98rem;
  color: var(--secondary);
  transition: color var(--t);
}
.sidebar-categories li a:hover { color: var(--primary-ink); }
.cat-arrow { color: var(--primary); transition: transform var(--t); }
.sidebar-categories li a:hover .cat-arrow { transform: translateX(4px); }

/* ── Pagination ── */
.pagination { gap: .3rem; margin-top: 2rem; }
.pagination .page-link {
  color: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius) !important;
  background: var(--surface);
  padding: .45rem .9rem;
  transition: all var(--t);
}
.pagination .page-link:hover { background: var(--primary-ink); border-color: var(--primary-ink); color: #fff; }
.pagination .page-item.active .page-link { background: var(--primary-ink); border-color: var(--primary-ink); color: #fff; }
.pagination .page-item.disabled .page-link { background: transparent; color: #A7B1BA; }

/* ── Footer ── */
.site-footer {
  background: var(--secondary);
  color: #C3CFD9;
  margin-top: 4.5rem;
  padding: 2.5rem 0 2.25rem;
  text-align: center;
  border-top: 4px solid var(--primary);
}
.site-footer .footer-logo-link { display: inline-block; margin-bottom: 1.1rem; }
.site-footer .footer-logo { height: 40px; width: auto; filter: brightness(0) invert(1); opacity: .92; }
.site-footer .footer-copy { font-size: .9rem; margin: 0 0 1rem; }
.site-footer .footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.75rem; }
.site-footer .footer-nav a { font-size: .95rem; color: #fff; transition: color var(--t); }
.site-footer .footer-nav a:hover { color: var(--primary); }

/* ── Cookie icon ── */
.cookieicon {
  width: 40px; height: 40px;
  background-color: var(--muted);
  cursor: pointer;
  position: fixed; left: 12px; bottom: 12px;
  mask-image: url(../../themes/base/assets/cookie.png);
  mask-size: contain; mask-repeat: no-repeat;
}
@media (max-width: 575px) { .cookieicon { left: auto; right: 12px; width: 50px; height: 50px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
