@import url("https://fonts.googleapis.com/css2?family=Bitter:wght@400;700&family=Barlow:wght@400;700&display=swap");

:root {
  --afd-blue: #1E5BA8;
  --afd-red: #E4002B;
  --afd-dark: #0A2F5F;
  --max-width: 1200px;
  --shadow-lg: 0 10px 20px rgba(16, 24, 40, 0.08);
  --shadow-xl: 0 20px 40px rgba(16, 24, 40, 0.12);
  --container-pad: 24px;
  --radius-lg: 14px;
}

/* --- Base --- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Barlow", "Bitter", sans-serif;
  color: #1f2937;
  background: white;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* --- Utilities --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--container-pad); }
.flex { display: flex; }
.grid { display: grid; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.hide-sm { display: block; }
.mt-top-nav { margin-top: 80px; } /* Platzhalter für fixierten Header */

/* --- Header --- */
.header {
  position: fixed; left: 0; right: 0; top: 0; z-index: 60;
  background: #fff; border-bottom: 1px solid rgba(15, 23, 42, 0.04);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}
.header-inner { height: 80px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { height: 48px; display: block; }
.brand h1 { margin: 0; font-size: 16px; color: var(--afd-blue); font-weight: 700; }
.brand p { margin: 0; font-size: 12px; color: #6b7280; }

/* --- Navigation --- */
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { text-decoration: none; font-weight: 500; color: #374151; padding-bottom: 6px; transition: color .18s, border-color .18s; }
.nav a:hover { color: var(--afd-blue); }
.nav a.active { color: var(--afd-red); border-bottom: 2px solid var(--afd-red); padding-bottom: 4px; }

/* --- Mobile Menu --- */
.mobile-btn { display: none; background: transparent; border: none; padding: 8px; border-radius: 8px; cursor: pointer; color: #374151; transition: background-color 0.2s; }
.mobile-btn:hover { background-color: #f3f4f6; }
.mobile-menu {
  display: flex; position: absolute; top: 100%; left: 0; right: 0;
  background: white; border-top: 1px solid #e5e7eb; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 16px; flex-direction: column; gap: 8px;
  transform: translateY(-20px); opacity: 0; visibility: hidden; transition: all 0.3s ease; pointer-events: none;
}
.mobile-menu.active { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: all; }
.mobile-menu a { display: block; padding: 12px 16px; text-decoration: none; color: #374151; font-weight: 500; border-radius: 8px; transition: background-color 0.2s, color 0.2s; }
.mobile-menu a:hover { background-color: #f3f4f6; color: var(--afd-blue); }

/* --- Hero General --- */
.hero { position: relative; height: 520px; overflow: hidden; }
.hero .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 47, 95, 0.9) 0%, rgba(30, 91, 168, 0.8) 100%); mix-blend-mode: normal; }
.hero .content { position: relative; z-index: 20; height: 100%; display: flex; align-items: center; }
.hero h1 { color: white; font-size: 40px; margin: 0 0 18px 0; line-height: 1.05; font-weight: 800; }
.hero .lead { color: rgba(255, 255, 255, 0.92); margin: 0 0 26px 0; font-weight: 300; font-size: 20px; }
.hero-centered .content { text-align: center; }
.hero-centered .content > div { margin: 0 auto; }

/* --- Page Headers (Small Hero) --- */
.page-header { background: linear-gradient(90deg, var(--afd-blue), var(--afd-dark)); padding: 48px 0; color: white; text-align: center; }
.page-header h1 { font-size: 36px; margin: 0 0 12px 0; font-weight: 800; }
.page-header p { margin: 0; font-size: 18px; color: rgba(255, 255, 255, 0.9); }

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--afd-red); color: white; padding: 12px 22px; border-radius: 12px; text-decoration: none; font-weight: 600; box-shadow: var(--shadow-lg); transition: transform .18s, box-shadow .18s; border: none; cursor: pointer; }
.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-xl); background: #c00025; }
.btn-large { padding: 14px 28px; font-weight: 700; }

/* --- Sections & Layout --- */
.section { padding: 64px 0; }
.bg-gray { background: #f9fafb; }
.bg-blue-light { background: #eff6ff; }
.section-title-wrap { text-align: center; margin-bottom: 28px; }
.section .title { font-size: 28px; color: var(--afd-dark); font-weight: 700; margin-bottom: 8px; }
.section .subtitle { max-width: 820px; margin: 0 auto; color: #4b5563; }
.section .small { font-size: 13px; color: #6b7280; display: block; }
.separator { width: 80px; height: 4px; background: var(--afd-red); margin: 10px auto; border-radius: 6px; }

/* --- Cards Standard --- */
.cards { display: grid; gap: 24px; }
.cards.cols-3 { grid-template-columns: 1fr; }
.card { background: white; border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; transition: box-shadow .25s, transform .2s; }
.card:hover { box-shadow: var(--shadow-xl); transform: translateY(-6px); }
.card-inner { padding: 28px; }
.icon-wrap { width: 56px; height: 56px; border-radius: 10px; background: #e6f0fb; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; transition: background .2s; }
.card:hover .icon-wrap { background: var(--afd-blue); color: white; }
.meta-date { color: var(--afd-red); font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
.card h3 { margin: 0 0 10px 0; font-size: 20px; color: #111827; }
.card p { color: #4b5563; margin: 0; }

/* --- Feature Grid (Themen) --- */
.topic-grid { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; }
.topic-card { background: white; border-radius: 12px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06); padding: 24px; max-width: 280px; text-align: center; }
.topic-icon { width: 40px; height: 40px; margin-bottom: 12px; color: var(--afd-blue); }
.topic-card h3 { font-size: 18px; margin-bottom: 6px; margin-top: 0; }
.topic-card p { color: #4b5563; font-size: 15px; margin: 0; }

/* --- Call to Action Box --- */
.cta-content { text-align: center; }
.cta-text { color: #374151; font-size: 16px; max-width: 720px; margin: 0 auto 20px; }

/* --- News / Aktuelles Specific --- */
.news-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
.news-article { background: white; border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.news-article:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.news-image { width: 100%; height: 240px; object-fit: cover; background-color: #eee; }
.news-content { padding: 28px; }
.news-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 14px; }
.news-date { color: var(--afd-red); font-weight: 700; text-transform: uppercase; }
.news-category { background: #e6f0fb; color: var(--afd-blue); padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.news-title { font-size: 24px; color: var(--afd-dark); margin: 0 0 16px 0; line-height: 1.3; }
.news-excerpt { color: #4b5563; line-height: 1.6; margin-bottom: 20px; }

/* --- Team / Fraktion Specific --- */
.team-grid { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; }
.member-card { background: white; border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; text-align: center; }
.member-card.large { flex: 1 1 200px; max-width: 200px; }
.member-card.small { flex: 1 1 170px; max-width: 170px; }
.member-card .top { height: 180px; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #eef6ff, #f8fbff); }
.member-card h3 { margin: 16px 0 6px 0; font-size: 18px; color: #111827; }
.member-role { color: var(--afd-red); font-weight: 700; font-size: 13px; margin: 0; }
.member-city { margin-top: 8px; color: #4b5563; font-size: 13px; margin-bottom: 16px; }

/* Avatar Optimization */
.avatar-container { position: relative; overflow: hidden; border-radius: 999px; background: #e6f0fb; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); width: 140px; height: 140px; margin: 0 auto; }
.avatar-container.small { width: 120px; height: 120px; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; object-position: center 10%; image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; transform: translateZ(0); }

/* Info Box (Fraktion Footer) */
.info-box { background: #eff6ff; padding: 28px; border-radius: 18px; box-shadow: var(--shadow-lg); text-align: center; }
.info-icon { width: 64px; height: 64px; border-radius: 999px; background: var(--afd-blue); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; color: white; }
.info-box h3 { margin: 0 0 8px 0; color: var(--afd-dark); font-size: 20px; }
.info-box p { margin: 0; color: #374151; }

/* --- Membership Page --- */
.mw-card { max-width: 820px; margin: -40px auto 60px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); padding: 36px; text-align: center; }
.mw-card h2 { color: var(--afd-dark); margin-top: 0; }
.mw-card p { color: #374151; font-size: 18px; line-height: 1.6; margin: 18px 0 28px; }
.spacer-large { height: 100px; }

/* --- Contact Page --- */
.contact-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.contact-card { background: white; border-radius: 12px; padding: 18px; box-shadow: var(--shadow-lg); display: flex; gap: 12px; align-items: flex-start; }
.contact-icon-box { width: 48px; height: 48px; border-radius: 10px; background: #e6f0fb; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-link { color: var(--afd-blue); text-decoration: none; }
.contact-link:hover { text-decoration: underline; }
.contact-hours { margin-top: 18px; background: #eff6ff; padding: 16px; border-radius: 12px; }

/* --- Impressum --- */
.legal-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 22px; }
.legal-box { background: white; padding: 28px; border-radius: 12px; box-shadow: var(--shadow-lg); }
.legal-box h3 { margin-top: 0; color: var(--afd-dark); }
.legal-box h4 { margin-bottom: 8px; color: #111827; }
.legal-box p { color: #374151; line-height: 1.6; }

/* --- Footer --- */
.footer { background: var(--afd-dark); color: white; padding: 28px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.footer .links a { color: rgba(255, 255, 255, 0.9); text-decoration: none; font-size: 14px; }
.footer .links a:hover { text-decoration: underline; }
.footer p { margin: 0; font-size: 13px; }

/* --- Media Queries --- */
@media (min-width: 768px) {
  .cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
  .nav { display: none; }
  .mobile-btn { display: inline-flex; }
  .header-inner { height: 64px; padding: 0 12px; }
  .hide-sm { display: none; }
  .hero { height: 420px; }
  .hero h1 { font-size: 32px; }
  .brand h1 { font-size: 14px; }
  .brand p { font-size: 11px; }
  .mw-card { margin: -20px 16px 40px; padding: 20px; }
  .mw-card p { font-size: 16px; }
  .footer-inner { flex-direction: column; text-align: center; }
}