/* 
 * Gemeinde Güllesheim - Barrierefreie Website
 * Stylesheet nach WCAG 2.1/2.2 AA Standard
 * Erstellt: August 2025
 */

/* ---------- Basisthemen (WCAG-konforme Defaults) ---------- */
:root {
  /* Hauptfarben - Grüne Grundfarbe basierend auf Güllesheim */
  --primary: #4a7c59;
  --primary-light: #6b9b7a;
  --primary-dark: #3a5f44;
  --primary-darker: #2d4a35;
  --secondary: #e49b3d;
  --secondary-dark: #c37d28;
  --accent: #8c6d62;

  /* Neutrale Farben */
  --bg: #ffffff;
  --fg: #2b2b2b;
  --light-gray: #f8f9fa;
  --mid-gray: #e9ecef;
  --dark-gray: #6c757d;

  /* UI-Elemente */
  --focus: #ffbf47;
  --link: var(--primary);
  --link-hover: var(--primary-dark);
  --btn-bg: var(--primary);
  --btn-fg: #ffffff;
  --btn-secondary-bg: var(--light-gray);
  --btn-secondary-fg: var(--fg);
  --header-bg: var(--primary);
  --header-fg: #ffffff;

  /* Layout */
  --container-width: 1200px;
  --header-height: 180px;
  --logo-size: 70px;
  --footer-bg: var(--light-gray);
  --border-radius: 8px;
  --card-border-radius: 12px;

  /* Abstände */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-xxl: 3rem;

  /* Schatten - einheitliche und moderne Werte */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
}

/* ---------- Barrierefreiheits-Toolbar Styles ---------- */
/* A11y Toolbar Styles sind in a11y.css definiert - keine Duplizierung */

/* ---------- Reset & Basis ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--fg);
  background-color: var(--bg);
  margin: 0;
  padding: 0;
  padding-top: var(--header-height);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- Typografie ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  margin-bottom: var(--space-md);
  line-height: 1.2;
  font-weight: 700;
  color: var(--fg);
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.75rem;
  margin-top: var(--space-xl);
}

h3 {
  font-size: 1.5rem;
  margin-top: var(--space-lg);
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--link-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* ---------- Layout & Container ---------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

section {
  padding: var(--space-xl) 0;
}

/* ---------- Page Content ---------- */
.page-content {
  padding: var(--space-xl) 0;
  position: relative;
  z-index: 10;
  /* Niedrigerer z-index als der Header */
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px;
  z-index: 100;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* ---------- Header & Navigation ---------- */
.main-header {
  background-image: url('../assets/aussicht.png');
  background-size: cover;
  background-position: center 40%;
  background-attachment: scroll;
  color: white;
  position: fixed;
  /* Fix header at top */
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  height: var(--header-height);
  width: 100%;
  overflow: hidden;
}

/* Keine diagonale Ecke mehr */
.main-header::after {
  display: none;
}

.header-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
  gap: var(--space-md);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-shrink: 0;
}

.logo-container img {
  width: var(--logo-size);
  height: var(--logo-size);
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo-text h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
}

.tagline {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  font-style: italic;
}

/* Mobile Navigation Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--header-fg);
  transition: background-color 0.3s ease;
}

.menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.hamburger-icon {
  display: block;
  width: 24px;
  height: 2px;
  background-color: white;
  position: relative;
  transition: background-color 0.3s ease;
  margin: 0 auto;
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: white;
  transition: transform 0.3s ease;
  left: 0;
}

.menu-icon::before {
  transform: translateY(-7px);
}

.menu-icon::after {
  transform: translateY(7px);
}

.menu-toggle[aria-expanded="true"] .menu-icon {
  background-color: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-icon::before {
  transform: translateY(0) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-icon::after {
  transform: translateY(0) rotate(-45deg);
}

/* Main Navigation */
.main-nav {
  display: flex;
  list-style: none;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

.main-nav a {
  text-decoration: none;
  font-weight: 600;
  padding: var(--space-xs) var(--space-md);
  position: relative;
  color: white !important;
  border-radius: var(--border-radius);
  transition: background-color 0.3s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  font-size: 0.9rem;
}

.main-nav a:hover,
.main-nav a:focus {
  background-color: rgba(255, 255, 255, 0.1);
}

.main-nav a[aria-current="page"] {
  background-color: rgba(255, 255, 255, 0.2);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--space-md);
  right: var(--space-md);
  height: 2px;
  background-color: var(--header-fg);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a:focus::after,
.main-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* ---------- Hero Section/* Hero-Bereich */
.hero {
  background: var(--primary-light);
  padding: var(--space-xxl) 0;
  text-align: center;
  margin-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
  color: white;
  z-index: 1;
  /* Unter dem Header */
}

/* Schräge Ecke im Hero-Bereich */
.hero::after {
  content: '';
  position: absolute;
  bottom: -50px;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom right, var(--primary-light) 0%, var(--primary-light) 49%, white 50%, white 100%);
  z-index: 1;
}

/* Keine dekorativen Kreise mehr */
.hero::before {
  display: none;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
}

.hero .lead {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
}

/* Page Hero für Unterseiten - IDENTISCH zur Startseite */
.page-hero {
  background: var(--primary-light);
  color: white;
  padding: var(--space-xxl) 0;
  margin-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
  z-index: 1;
  /* Unter dem Header */
}

/* Schräge Ecke im Page-Hero-Bereich */
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -50px;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom right, var(--primary-light) 0%, var(--primary-light) 49%, white 50%, white 100%);
  z-index: 1;
}

/* Keine dekorativen Kreise mehr für Unterseiten */
.page-hero::before {
  display: none;
}

.page-hero h1 {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
}

.page-hero .lead {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
}

/* EINHEITLICHES DESIGN für alle Saisonklassen */
.season-spring,
.season-summer,
.season-autumn,
.season-winter {
  transition: all 0.5s ease-in-out;
  /* Einheitlicher Fallback, aber kein Überschreiben von Inline-Hintergründen */
  background-image:
    linear-gradient(135deg,
      rgba(74, 124, 89, 0.75) 0%,
      rgba(107, 155, 122, 0.65) 50%,
      rgba(74, 124, 89, 0.75) 100%),
    url('../assets/hero-placeholder.svg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* Einheitliche Textfarben für alle Saisons */
.season-spring h1,
.season-spring h2,
.season-spring .lead,
.season-summer h1,
.season-summer h2,
.season-summer .lead,
.season-autumn h1,
.season-autumn h2,
.season-autumn .lead,
.season-winter h1,
.season-winter h2,
.season-winter .lead {
  color: white !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4) !important;
}

/* Entfernt harte Überschreibungen, damit Inline-Hintergründe (Image-Slots) greifen */

.lead {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto;
}

/* ---------- News Section ---------- */
.news-section {
  text-align: center;
}

.news-section h2 {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.home-intro {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.news-card {
  border: 1px solid var(--mid-gray);
  border-radius: var(--border-radius);
  padding: var(--space-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.news-card h3 {
  margin-top: 0;
  font-size: 1.25rem;
}

.news-card time {
  display: block;
  color: var(--dark-gray);
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
}

/* ---------- Events Section ---------- */
.events-section {
  background-color: var(--light-gray);
}

.events-list {
  list-style: none;
  margin-bottom: var(--space-xl);
}

.event-item {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background-color: var(--bg);
  border-radius: var(--card-border-radius);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.council-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-lg);
  align-items: start;
  margin-top: var(--space-md);
  margin-bottom: var(--space-xl);
}

@media (max-width: 768px) {
  .council-layout {
    grid-template-columns: 1fr;
  }
}

.council-members,
.council-protocols,
.council-meetings,
.committee-card,
.budget-card {
  background-color: var(--bg);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--card-border-radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
}

.council-members table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-sm);
}

.council-members caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.council-members th,
.council-members td {
  text-align: left;
  padding: var(--space-sm);
  border-bottom: 1px solid var(--mid-gray);
  vertical-align: top;
}

.council-members th {
  background-color: var(--light-gray);
}

.council-protocols ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.council-protocols li {
  margin-bottom: var(--space-sm);
}

.meeting-dates ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.meeting-dates li {
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--mid-gray);
}

.meeting-dates li:last-child {
  border-bottom: none;
}

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

.committee-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.committee-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.budget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: var(--space-sm);
  background-color: var(--primary);
  color: white;
  border-radius: var(--border-radius);
  text-align: center;
}

.event-date .day {
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1;
}

.event-date .month {
  font-size: 0.9rem;
  text-transform: uppercase;
}

.event-details {
  flex: 1;
}

.event-details h3 {
  margin-top: 0;
  margin-bottom: var(--space-xs);
  font-size: 1.2rem;
}

.event-details p {
  margin-bottom: var(--space-sm);
  color: var(--dark-gray);
}

/* ---------- Stats Section ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-lg) 0;
}

.stat-card {
  text-align: center;
  padding: var(--space-lg);
  background-color: var(--light-gray);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.stat-label {
  font-size: 1.1rem;
  color: var(--dark-gray);
}

/* ---------- Life Section ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.feature-card {
  border: 1px solid var(--mid-gray);
  border-radius: var(--border-radius);
  padding: var(--space-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.feature-card h3 {
  margin-top: 0;
  font-size: 1.25rem;
}

.feature-card p {
  padding: 0 var(--space-md);
}

.feature-card .btn-more {
  display: inline-block;
  margin: var(--space-md);
}

/* ---------- Services Section ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-lg);
  background-color: var(--light-gray);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover,
.service-card:focus {
  background-color: var(--mid-gray);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.service-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.service-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

/* ---------- Footer ---------- */
.main-footer {
  background-color: var(--footer-bg);
  padding: var(--space-xl) 0;
  margin-top: var(--space-xxl);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
}

.main-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--secondary), var(--accent));
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

footer h2 {
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: var(--space-md);
}

footer h3 {
  font-size: 1rem;
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
}

.footer-contact address {
  font-style: normal;
  margin-bottom: var(--space-md);
}

.footer-contact p {
  margin-bottom: var(--space-xs);
}

.opening-hours dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-xs) var(--space-md);
}

.footer-nav ul {
  list-style: none;
}

.footer-nav li {
  margin-bottom: var(--space-sm);
}

.search-container {
  display: flex;
  gap: var(--space-xs);
}

.footer-search input[type="search"] {
  flex: 1;
  padding: var(--space-sm);
  border: 1px solid var(--mid-gray);
  border-radius: var(--border-radius);
}

.footer-search button {
  padding: var(--space-sm);
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
}

.social-links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.footer-bottom {
  border-top: 1px solid var(--mid-gray);
  padding-top: var(--space-md);
  text-align: center;
  font-size: 0.9rem;
  color: var(--dark-gray);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  background-color: var(--btn-bg);
  color: var(--btn-fg);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.btn:hover::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }

  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }

  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-more:hover,
.btn-more:focus {
  background-color: var(--light-gray);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  background-color: var(--btn-secondary-bg);
  color: var(--btn-secondary-fg);
  border: 1px solid var(--mid-gray);
  border-radius: var(--border-radius);
  padding: var(--space-sm) var(--space-lg);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: var(--mid-gray);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero,
  .page-hero {
    padding: var(--space-xl) 0;
    /* Erzwinge einheitliches grünes Design auch auf Mobile */
    background: linear-gradient(135deg,
        rgba(74, 124, 89, 0.95) 0%,
        rgba(107, 155, 122, 0.85) 50%,
        rgba(74, 124, 89, 0.95) 100%) !important;
  }

  .hero h1,
  .hero h2,
  .page-hero h1 {
    font-size: 1.8rem;
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4) !important;
  }

  .hero .lead,
  .page-hero .lead {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .header-container {
    flex-direction: column;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    gap: var(--space-sm);
  }

  .logo-container {
    gap: var(--space-md);
  }

  .logo-text h1 {
    font-size: 1.3rem;
  }

  .tagline {
    font-size: 0.8rem;
  }

  /* Kleinere schräge Ecke auf Mobile */
  .hero::after,
  .page-hero::after {
    bottom: -30px;
    height: 60px;
  }

  .hero,
  .page-hero {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    text-align: center;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--primary);
    z-index: 100;
    box-shadow: var(--shadow-md);
  }

  .main-nav.active {
    display: flex;
    background-color: var(--primary-dark);
  }

  .main-nav li {
    margin: 0;
    width: 100%;
  }


  .main-nav a {
    padding: var(--space-md);
    border-radius: var(--border-radius);
    color: white !important;
    /* Weiße Schriftfarbe auch im mobilen Menü */
  }

  .main-nav a:hover,
  .main-nav a:focus {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .site-title h1 {
    font-size: 1.25rem;
  }

  .claim {
    font-size: 0.8rem;
  }

  .stats-grid,
  .feature-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Ensure the menu is visible when expanded on mobile */
#mainmenu:not([hidden]) {
  display: flex;
}

/* ---------- Accessibility Enhancements ---------- */
/* High contrast focus styles */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* Ensure links have sufficient contrast */
a {
  color: var(--link);
}

/* Ensure form elements have sufficient contrast */
input,
select,
textarea {
  border: 1px solid var(--dark-gray);
  padding: var(--space-sm);
  border-radius: var(--border-radius);
}

/* Ensure form labels are visible */
label {
  display: block;
  margin-bottom: var(--space-xs);
}

/* Ensure error messages are visible */
.error-message {
  color: var(--accent);
  font-weight: bold;
  margin-top: var(--space-xs);
}

/* Ensure buttons have sufficient padding for touch targets */
button,
.btn-more,
.btn-secondary {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Scroll-to-Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover,
.scroll-to-top:focus {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.scroll-to-top:focus {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* High-Contrast-Modus Anpassungen */
[data-theme="hc"] .scroll-to-top {
  background-color: #ffcc00;
  color: #000000;
  border: 2px solid #ffffff;
}

[data-theme="hc"] .scroll-to-top:hover,
[data-theme="hc"] .scroll-to-top:focus {
  background-color: #ffffff;
  color: #000000;
}

/* Reduzierte Bewegung */
.reduced-motion .scroll-to-top {
  transition: none;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
  .scroll-to-top {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
  }
}
