/* JugendFinanz Hannover – Monochrome Sophisticated CSS Theme */

/* =====================
   CSS Variables & Base
   ===================== */
:root {
  --color-bg: #fff;
  --color-bg-alt: #f5f5f5;
  --color-bg-dark: #181818;
  --color-bg-light: #fafbfc;
  --color-text: #181818;
  --color-text-light: #fff;
  --color-text-muted: #888;
  --color-border: #e0e0e0;
  --color-border-dark: #222;
  --color-primary: #1A3566;
  --color-secondary: #27A468;
  --color-accent: #F5BE28;
  --color-shadow: rgba(0,0,0,0.08);
  --color-shadow-strong: rgba(0,0,0,0.16);
  --radius: 12px;
  --radius-sm: 6px;
  --transition: 0.25s cubic-bezier(.4,0,.2,1);
  --font-display: 'Montserrat', Arial, Helvetica, sans-serif;
  --font-body: 'Roboto', Arial, Helvetica, sans-serif;
  --header-height: 72px;
  --z-header: 100;
  --z-mobile-menu: 200;
  --z-cookie: 300;
}

html {
  box-sizing: border-box;
  font-size: 16px;
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
}
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
  min-height: 100vh;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

/* =====================
   Typography
   ===================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-text);
  margin-top: 0;
  margin-bottom: 0.5em;
  font-weight: 700;
  letter-spacing: 0.01em;
}
h1 {
  font-size: 2.2rem;
  line-height: 1.15;
  margin-bottom: 0.7em;
}
h2 {
  font-size: 1.6rem;
  line-height: 1.2;
  margin-bottom: 0.6em;
}
h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5em;
}
h4 {
  font-size: 1.05rem;
  margin-bottom: 0.4em;
}
p, ul, ol {
  margin-top: 0;
  margin-bottom: 1.1em;
}
strong {
  font-weight: 700;
}
em {
  font-style: italic;
  color: var(--color-text-muted);
}
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover, a:focus {
  color: var(--color-secondary);
  text-decoration: underline;
}

/* =====================
   Layout Containers
   ===================== */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--color-bg);
  border-radius: var(--radius);
  box-shadow: 0 2px 16px var(--color-shadow);
}

/* =====================
   Header & Navigation
   ===================== */
header {
  background: var(--color-bg);
  box-shadow: 0 2px 12px var(--color-shadow);
  position: sticky;
  top: 0;
  z-index: var(--z-header);
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 24px;
}
header img {
  height: 44px;
  width: auto;
  display: block;
}
.main-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 28px;
}
.main-nav a {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-text);
  font-weight: 600;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}
.main-nav a:hover, .main-nav a:focus {
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
}
.cta-button {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  border: none;
  box-shadow: 0 2px 8px var(--color-shadow);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  margin-left: 12px;
  letter-spacing: 0.03em;
  display: inline-block;
  text-align: center;
}
.cta-button:hover, .cta-button:focus {
  background: var(--color-primary);
  color: var(--color-accent);
  box-shadow: 0 4px 16px var(--color-shadow-strong);
}

/* Hide mobile menu toggle on desktop */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-text);
  cursor: pointer;
  margin-left: 16px;
  transition: color var(--transition);
}
.mobile-menu-toggle:focus {
  outline: 2px solid var(--color-primary);
}

/* =====================
   Mobile Navigation
   ===================== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(24,24,24,0.98);
  z-index: var(--z-mobile-menu);
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 32px 24px 24px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(.4,0,.2,1);
}
.mobile-menu.open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-close {
  background: none;
  border: none;
  color: var(--color-text-light);
  font-size: 2.2rem;
  align-self: flex-end;
  margin-bottom: 24px;
  cursor: pointer;
  transition: color var(--transition);
}
.mobile-menu-close:focus {
  outline: 2px solid var(--color-accent);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}
.mobile-nav a {
  color: var(--color-text-light);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color var(--transition);
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--color-accent);
}

/* Slide-in animation */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1), opacity 0.35s cubic-bezier(.4,0,.2,1);
}
.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
}

/* =====================
   Main Content Layouts
   ===================== */
section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--color-bg);
  border-radius: var(--radius);
  box-shadow: 0 2px 16px var(--color-shadow);
}

.feature-grid, .team-grid, .tool-grid, .service-list, .tool-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 24px;
}
.feature-grid > div, .team-grid > div, .tool-grid > div, .service-list > div, .tool-overview > div {
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 8px var(--color-shadow);
  padding: 24px 20px;
  flex: 1 1 260px;
  min-width: 220px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow var(--transition), background var(--transition);
}
.feature-grid > div:hover, .team-grid > div:hover, .tool-grid > div:hover, .service-list > div:hover, .tool-overview > div:hover {
  box-shadow: 0 4px 24px var(--color-shadow-strong);
  background: #ededed;
}

.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.text-image-section > div {
  flex: 1 1 260px;
}
.text-image-section img {
  max-width: 320px;
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 2px 16px var(--color-shadow);
}

.photo-gallery, .event-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 24px 0 20px 0;
}
.photo-gallery img, .event-photos img {
  width: 180px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 8px var(--color-shadow);
}

.article-list, .tip-list, .event-list {
  padding-left: 20px;
  margin-bottom: 24px;
}
.article-list li, .tip-list li, .event-list li {
  margin-bottom: 12px;
  color: var(--color-text);
  font-size: 1rem;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.faq-accordion > div {
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 8px var(--color-shadow);
  padding: 18px 20px;
  margin-bottom: 20px;
  transition: box-shadow var(--transition), background var(--transition);
}
.faq-accordion > div:hover {
  box-shadow: 0 4px 24px var(--color-shadow-strong);
  background: #ededed;
}

.testimonial-slider {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 24px;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 20px;
  background: #f7f7f7;
  color: #181818;
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 8px var(--color-shadow);
  min-width: 220px;
  flex: 1 1 260px;
  margin-bottom: 20px;
  font-size: 1.05rem;
  transition: box-shadow var(--transition), background var(--transition);
}
.testimonial-card:hover {
  box-shadow: 0 4px 24px var(--color-shadow-strong);
  background: #ededed;
}
.testimonial-card span {
  color: var(--color-text-muted);
  font-size: 0.98rem;
  font-style: italic;
}

/* Feature item pattern */
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* Content grid pattern */
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 8px var(--color-shadow);
  padding: 24px 20px;
  flex: 1 1 260px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow var(--transition), background var(--transition);
}
.card:hover {
  box-shadow: 0 4px 24px var(--color-shadow-strong);
  background: #ededed;
}

/* =====================
   Footer
   ===================== */
footer {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
  padding: 48px 0 24px 0;
  margin-top: 60px;
}
footer .container {
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-nav a {
  color: var(--color-text-light);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  transition: color var(--transition);
}
.footer-nav a:hover, .footer-nav a:focus {
  color: var(--color-accent);
}
.footer-contact {
  font-size: 0.98rem;
  color: var(--color-text-light);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* =====================
   Cookie Consent Banner
   ===================== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: var(--z-cookie);
  background: #222;
  color: #fff;
  padding: 24px 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 -2px 16px var(--color-shadow-strong);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(.4,0,.2,1);
}
.cookie-banner.visible {
  opacity: 1;
  pointer-events: auto;
}
.cookie-banner .cookie-text {
  flex: 1 1 0;
  font-size: 1rem;
  color: #fff;
}
.cookie-banner .cookie-actions {
  display: flex;
  flex-direction: row;
  gap: 16px;
}
.cookie-banner button {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.cookie-banner .accept {
  background: var(--color-secondary);
  color: #fff;
}
.cookie-banner .accept:hover, .cookie-banner .accept:focus {
  background: #1e7c4a;
}
.cookie-banner .reject {
  background: #fff;
  color: #222;
  border: 1px solid #888;
}
.cookie-banner .reject:hover, .cookie-banner .reject:focus {
  background: #ededed;
}
.cookie-banner .settings {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}
.cookie-banner .settings:hover, .cookie-banner .settings:focus {
  background: var(--color-accent);
  color: #222;
}

/* Cookie Modal */
.cookie-modal-overlay {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(24,24,24,0.85);
  z-index: calc(var(--z-cookie) + 1);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(.4,0,.2,1);
}
.cookie-modal-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.cookie-modal {
  background: #fff;
  color: #181818;
  border-radius: var(--radius);
  box-shadow: 0 4px 32px var(--color-shadow-strong);
  padding: 36px 28px 28px 28px;
  min-width: 320px;
  max-width: 95vw;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  animation: cookieModalIn 0.4s cubic-bezier(.4,0,.2,1);
}
@keyframes cookieModalIn {
  from { transform: translateY(40px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.cookie-modal h2 {
  font-size: 1.3rem;
  margin-bottom: 0.5em;
}
.cookie-modal .cookie-category {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.cookie-modal .cookie-category label {
  font-size: 1rem;
  font-weight: 500;
}
.cookie-modal .cookie-toggle {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #e0e0e0;
  position: relative;
  cursor: pointer;
  transition: background var(--transition);
  display: inline-block;
}
.cookie-modal .cookie-toggle input {
  display: none;
}
.cookie-modal .cookie-toggle .slider {
  position: absolute;
  left: 2px; top: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px var(--color-shadow);
  transition: left var(--transition), background var(--transition);
}
.cookie-modal .cookie-toggle input:checked + .slider {
  left: 20px;
  background: var(--color-secondary);
}
.cookie-modal .cookie-category.essential label {
  color: var(--color-text-muted);
}
.cookie-modal .cookie-category.essential .cookie-toggle {
  background: #bdbdbd;
  cursor: not-allowed;
}
.cookie-modal .cookie-category.essential .slider {
  background: var(--color-secondary);
}
.cookie-modal .cookie-modal-actions {
  display: flex;
  flex-direction: row;
  gap: 16px;
  justify-content: flex-end;
}
.cookie-modal .cookie-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  color: #888;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--transition);
}
.cookie-modal .cookie-modal-close:hover, .cookie-modal .cookie-modal-close:focus {
  color: var(--color-primary);
}

/* =====================
   Miscellaneous
   ===================== */
.map img {
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 8px var(--color-shadow);
  margin: 20px 0;
}
.social-links {
  margin: 16px 0;
  font-size: 1.1rem;
}
.social-links a {
  color: var(--color-primary);
  font-weight: 600;
  margin: 0 6px;
  transition: color var(--transition);
}
.social-links a:hover {
  color: var(--color-secondary);
}

/* =====================
   Responsive Design
   ===================== */
@media (max-width: 1100px) {
  .container {
    max-width: 98vw;
  }
}
@media (max-width: 900px) {
  .feature-grid > div, .team-grid > div, .tool-grid > div, .service-list > div, .tool-overview > div, .card {
    min-width: 180px;
    flex: 1 1 180px;
  }
}
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  header .container {
    flex-direction: row;
    gap: 12px;
  }
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .cta-button {
    margin-left: 0;
    padding: 12px 18px;
    font-size: 1rem;
  }
  .container {
    padding: 0 10px;
  }
  section {
    padding: 28px 8px;
    margin-bottom: 40px;
  }
  .feature-grid, .team-grid, .tool-grid, .service-list, .tool-overview, .testimonial-slider, .card-container, .content-grid {
    flex-direction: column;
    gap: 20px;
  }
  .feature-grid > div, .team-grid > div, .tool-grid > div, .service-list > div, .tool-overview > div, .card {
    min-width: 0;
    width: 100%;
    padding: 18px 12px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 20px;
  }
  .photo-gallery, .event-photos {
    flex-direction: row;
    gap: 10px;
    justify-content: flex-start;
  }
  .photo-gallery img, .event-photos img {
    width: 100px;
    height: 70px;
  }
  footer .container {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 10px;
  }
  .cookie-banner .cookie-actions {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .cookie-modal {
    min-width: 0;
    padding: 24px 10px 18px 10px;
  }
}
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  h1 {
    font-size: 1.5rem;
  }
  h2 {
    font-size: 1.15rem;
  }
  .cta-button {
    font-size: 0.98rem;
    padding: 10px 12px;
  }
}

/* =====================
   Utility Classes
   ===================== */
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.text-muted {
  color: var(--color-text-muted);
}
.bg-dark {
  background: var(--color-bg-dark) !important;
  color: var(--color-text-light) !important;
}
.bg-light {
  background: var(--color-bg-light) !important;
}

/* =====================
   Micro-interactions
   ===================== */
button, .cta-button, .cookie-banner button, .cookie-modal button {
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), border-color var(--transition);
}

/* =====================
   Accessibility
   ===================== */
:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* =====================
   Prevent Overlapping
   ===================== */
section, .card, .testimonial-card, .faq-accordion > div, .feature-grid > div, .team-grid > div, .tool-grid > div, .service-list > div, .tool-overview > div {
  margin-bottom: 20px;
}

/* =====================
   End of CSS
   ===================== */
