/**
 * Mütter bewegen – Komponentenstile
 *
 * Versorgt Astra/Elementor-Layouts und Plugin-Shortcodes mit
 * konsistenten Komponentenklassen. Reine Darstellung – keine Logik.
 *
 * Pflichtquellen:
 *   - docs/09_CORPORATE_DESIGN_100000_MUETTER.md
 *   - docs/design/design-tokens.css
 *   - .claude/skills/bitv-accessibility-release-gate/SKILL.md
 */

/* ============================================================
 * 1. Globale Basis
 * ============================================================ */

body,
.mbw-child {
  background-color: var(--hma-color-background);
  color: var(--hma-color-text);
  font-family: var(--hma-font-body);
  font-size: 1.125rem;        /* 18 px */
  line-height: 1.65;
}

@media (max-width: 768px) {
  body,
  .mbw-child {
    font-size: 1.0625rem;     /* 17 px */
  }
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.elementor-heading-title {
  font-family: var(--hma-font-heading);
  color: var(--hma-color-secondary);
  line-height: 1.2;
  margin-top: 0;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 750; }
h3 { font-size: clamp(1.5rem, 2.5vw, 1.75rem); font-weight: 700; }

a {
  color: var(--hma-color-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--hma-color-primary);
}

/* ============================================================
 * 2. Fokus & Skip-Link (BITV-Pflicht)
 * ============================================================ */

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--hma-color-focus);
  outline-offset: 3px;
  border-radius: var(--hma-radius-sm);
}

.hma-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  padding: 0.875rem 1.25rem;
  background: var(--hma-color-secondary);
  color: var(--hma-color-white);
  font-family: var(--hma-font-heading);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 var(--hma-radius-md) 0;
}

.hma-skip-link:focus,
.hma-skip-link:focus-visible {
  position: absolute;
  left: 0;
  width: auto;
  height: auto;
  clip: auto;
  margin: 0;
  overflow: visible;
  white-space: normal;
}

.hma-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
 * 3. Buttons
 * ============================================================ */

.hma-button-primary,
.hma-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--hma-touch-min);
  padding: 0.875rem 1.5rem;
  border-radius: var(--hma-radius-pill);
  font-family: var(--hma-font-heading);
  font-weight: 800;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.hma-button-primary {
  border: 2px solid var(--hma-color-primary);
  background: var(--hma-color-primary);
  color: var(--hma-color-white);
}

.hma-button-primary:hover,
.hma-button-primary:focus-visible {
  background: var(--hma-color-secondary);
  border-color: var(--hma-color-secondary);
  color: var(--hma-color-white);
}

.hma-button-secondary {
  border: 2px solid var(--hma-color-primary);
  background: transparent;
  color: var(--hma-color-secondary);
}

.hma-button-secondary:hover,
.hma-button-secondary:focus-visible {
  background: var(--hma-color-background);
  color: var(--hma-color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================
 * 4. Hero
 * ============================================================ */

.hma-hero {
  position: relative;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 3vw, 2.5rem);
  background: var(--hma-color-background);
  border-radius: var(--hma-radius-lg);
}

.hma-hero__inner {
  max-width: var(--hma-container-max);
  margin: 0 auto;
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  /* Mobil 1 Spalte, ab Tablet 2 Spalten (Text links, Karte rechts). */
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .hma-hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
  }
}

.hma-hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--hma-space-md);
}

/* Eyebrow im Konzept-1-Layout: kleine, gesperrte Textzeile (kein Pill).
 * Variante mit Pill-Look bleibt über Modifier .hma-hero__eyebrow--pill verfügbar. */
.hma-hero__eyebrow {
  display: inline-block;
  margin: 0;
  color: var(--hma-color-primary);
  font-family: var(--hma-font-body);
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hma-hero__eyebrow--pill {
  padding: 0.25rem 0.75rem;
  border-radius: var(--hma-radius-pill);
  background: var(--hma-color-secondary);
  color: var(--hma-color-white);
  letter-spacing: 0.04em;
}

.hma-hero__title {
  margin: 0;
  color: var(--hma-color-secondary);
  font-family: var(--hma-font-heading);
  font-weight: 800;
  font-size: clamp(2.25rem, 5.5vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.hma-hero__lede {
  max-width: 60ch;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  color: var(--hma-color-text);
}

.hma-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hma-space-md);
  margin-top: var(--hma-space-sm);
}

.hma-hero__count {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--hma-space-sm);
  color: var(--hma-color-muted);
  font-size: 0.95rem;
}

.hma-hero__count strong {
  color: var(--hma-color-secondary);
  font-weight: 700;
}

/* Visual-Slot rechts (Karte/Illustration). */
.hma-hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hma-hero__visual img,
.hma-hero__visual svg {
  max-width: 100%;
  height: auto;
}

/* Counter-Pill „100.000 Mütter" über/auf der Karte. */
.hma-counter-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.6rem 1rem;
  border-radius: var(--hma-radius-md);
  background: var(--hma-color-highlight);
  color: var(--hma-color-secondary);
  font-family: var(--hma-font-heading);
  line-height: 1.1;
  box-shadow: var(--hma-shadow-soft);
}

.hma-counter-pill__number {
  font-size: 1.5rem;
  font-weight: 800;
}

.hma-counter-pill__label {
  font-family: var(--hma-font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ============================================================
 * 5. Karten / Aktionskacheln
 * ============================================================ */

.hma-card {
  display: flex;
  flex-direction: column;
  gap: var(--hma-space-sm);
  padding: var(--hma-space-lg);
  border: 1px solid var(--hma-color-border);
  border-radius: var(--hma-radius-lg);
  background: var(--hma-color-white);
  box-shadow: var(--hma-shadow-card);
  color: var(--hma-color-text);
}

.hma-card__title {
  margin: 0;
  font-size: 1.375rem;
  color: var(--hma-color-secondary);
}

.hma-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hma-space-sm);
  font-size: 0.95rem;
  color: var(--hma-color-muted);
}

.hma-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--hma-radius-pill);
  background: color-mix(in srgb, var(--hma-color-care-green) 15%, white);
  color: var(--hma-color-success);
  font-size: 0.8125rem;
  font-weight: 700;
}

.hma-card__badge::before {
  content: "✓";
  font-weight: 800;
}

.hma-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hma-space-sm);
  margin-top: auto;
  padding-top: var(--hma-space-sm);
}

/* ============================================================
 * 6. Vertrauenshinweis / Formularhinweis
 * ============================================================ */

.hma-trust-note {
  border-left: 6px solid var(--hma-color-care-green);
  border-radius: var(--hma-radius-md);
  background: color-mix(in srgb, var(--hma-color-care-green) 10%, white);
  padding: var(--hma-space-lg);
  color: var(--hma-color-text);
}

.hma-trust-note strong {
  color: var(--hma-color-secondary);
}

.hma-form-note {
  border-left: 6px solid var(--hma-color-map-blue);
  background: color-mix(in srgb, var(--hma-color-map-blue) 8%, white);
  border-radius: var(--hma-radius-md);
  padding: var(--hma-space-md) var(--hma-space-lg);
  font-size: 0.95rem;
}

/* ============================================================
 * 7. Formulare (Plugin-Shortcodes)
 * ============================================================ */

.hma-form label,
.hma-form legend {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--hma-color-secondary);
}

.hma-form .hma-required {
  color: var(--hma-color-primary);
  margin-left: 0.15rem;
}

.hma-form input[type="text"],
.hma-form input[type="email"],
.hma-form input[type="url"],
.hma-form input[type="tel"],
.hma-form input[type="date"],
.hma-form input[type="time"],
.hma-form input[type="number"],
.hma-form select,
.hma-form textarea {
  width: 100%;
  min-height: var(--hma-touch-min);
  padding: 0.65rem 0.85rem;
  border: 2px solid var(--hma-color-border);
  border-radius: var(--hma-radius-sm);
  background: var(--hma-color-white);
  color: var(--hma-color-text);
  font-family: var(--hma-font-body);
  font-size: 1rem;
}

.hma-form input:focus-visible,
.hma-form select:focus-visible,
.hma-form textarea:focus-visible {
  border-color: var(--hma-color-focus);
}

.hma-form .hma-error,
.hma-form [aria-invalid="true"] {
  border-color: var(--hma-color-error);
}

.hma-error-message {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  color: var(--hma-color-error);
  font-weight: 700;
}

.hma-error-message::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--hma-radius-pill);
  background: var(--hma-color-error);
  color: var(--hma-color-white);
  font-weight: 800;
  font-size: 0.85rem;
}

/* ============================================================
 * 8. Karte (Leaflet-Container, Listen-Fallback)
 * ============================================================ */

.hma-map {
  width: 100%;
  height: clamp(360px, 60vh, 640px);
  border: 1px solid var(--hma-color-border);
  border-radius: var(--hma-radius-lg);
  overflow: hidden;
  background: var(--hma-color-white);
}

.hma-map-fallback {
  display: grid;
  gap: var(--hma-space-md);
  margin-top: var(--hma-space-lg);
  padding: var(--hma-space-lg);
  border: 1px solid var(--hma-color-border);
  border-radius: var(--hma-radius-lg);
  background: var(--hma-color-white);
}

/* ============================================================
 * 9. Themenkacheln
 * ============================================================ */

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

.hma-topic-tile {
  display: block;
  padding: var(--hma-space-lg);
  border-radius: var(--hma-radius-lg);
  background: var(--hma-color-white);
  border: 1px solid var(--hma-color-border);
  color: var(--hma-color-secondary);
  font-family: var(--hma-font-heading);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--hma-shadow-soft);
}

.hma-topic-tile:hover,
.hma-topic-tile:focus-visible {
  background: var(--hma-color-secondary);
  color: var(--hma-color-white);
}

/* ============================================================
 * 10. Astra-/Elementor-Anpassungen
 * ============================================================ */

.ast-container,
.elementor-section.elementor-section-boxed > .elementor-container {
  max-width: var(--hma-container-max);
}

.site-header {
  background: var(--hma-color-white);
  border-bottom: 1px solid var(--hma-color-border);
  box-shadow: var(--hma-shadow-soft);
}

/* Header-Card-Optik (analog Tablet-Mockup): leicht abgerundet, mit Abstand zum Rand. */
@media (min-width: 1024px) {
  .ast-hfb-header-section {
    padding-block: 0.5rem;
  }
}

/* Optionale Pill-CTA im Header (Astra HFB „Button" oder benutzerdefiniertes Menüpunkt-Markup). */
.site-header .hma-header-cta,
.ast-builder-html-element .hma-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  border-radius: var(--hma-radius-pill);
  background: var(--hma-color-primary);
  color: var(--hma-color-white) !important;
  font-family: var(--hma-font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  line-height: 1.2;
}

.site-header .hma-header-cta:hover,
.site-header .hma-header-cta:focus-visible,
.ast-builder-html-element .hma-header-cta:hover,
.ast-builder-html-element .hma-header-cta:focus-visible {
  background: var(--hma-color-secondary);
  color: var(--hma-color-white) !important;
}

/* Hauptnavigation: Source-Sans, ruhige Abstände, klare Hover-Linie. */
.main-navigation .menu-item > a,
.ast-primary-header-bar .menu-item > a {
  font-family: var(--hma-font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--hma-color-secondary);
}

.main-navigation .menu-item > a:hover,
.main-navigation .menu-item.current-menu-item > a {
  color: var(--hma-color-primary);
}

.site-footer,
.ast-small-footer,
.ast-footer-overlay {
  background: var(--hma-color-secondary);
  color: var(--hma-color-white);
}

.site-footer a {
  color: var(--hma-color-background);
}

/* Elementor-Heading-Farbe an CD anpassen, sofern keine Lokal-Farbe gesetzt. */
.elementor-widget-heading .elementor-heading-title {
  color: var(--hma-color-secondary);
}

/* ============================================================
 * 11. Reduced Motion
 * ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
 * 12. Druck
 * ============================================================ */

@media print {
  .hma-button-primary,
  .hma-button-secondary,
  .hma-skip-link,
  .hma-map {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}

/* ============================================================
 * 13. Feature-Cards (3-Card-Sektion „Aktionen entdecken / eintragen / mitmachen")
 * ============================================================ */

.hma-feature-grid {
  display: grid;
  gap: var(--hma-space-lg);
  grid-template-columns: 1fr;
  margin-top: clamp(2rem, 5vw, 3.5rem);
}

@media (min-width: 720px) {
  .hma-feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hma-feature-card {
  display: flex;
  flex-direction: column;
  gap: var(--hma-space-sm);
  padding: clamp(1.25rem, 2vw, 1.75rem);
  border-radius: var(--hma-radius-lg);
  background: var(--hma-color-white);
  border: 1px solid var(--hma-color-border);
  box-shadow: var(--hma-shadow-soft);
  color: var(--hma-color-text);
}

.hma-feature-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--hma-radius-pill);
  background: color-mix(in srgb, var(--hma-color-coral) 18%, white);
  color: var(--hma-color-secondary);
}

.hma-feature-card--map .hma-feature-card__icon {
  background: color-mix(in srgb, var(--hma-color-map-blue) 18%, white);
  color: var(--hma-color-map-blue);
}

.hma-feature-card--care .hma-feature-card__icon {
  background: color-mix(in srgb, var(--hma-color-care-green) 18%, white);
  color: var(--hma-color-care-green);
}

.hma-feature-card__icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hma-feature-card__title {
  margin: 0;
  font-family: var(--hma-font-heading);
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--hma-color-secondary);
}

.hma-feature-card__text {
  margin: 0;
  color: var(--hma-color-text);
  font-size: 1rem;
}

.hma-feature-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: var(--hma-space-sm);
  color: var(--hma-color-primary);
  font-weight: 700;
  text-decoration: none;
}

.hma-feature-card__link::after {
  content: "→";
  transition: transform 0.15s ease;
}

.hma-feature-card__link:hover::after,
.hma-feature-card__link:focus-visible::after {
  transform: translateX(3px);
}

.hma-feature-card__link:hover,
.hma-feature-card__link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--hma-color-secondary);
}

/* ============================================================
 * 14. Trust-Pillars (vier dunkle Pflaumenrot-Cards: Kontrast, Typografie, …)
 * ============================================================ */

.hma-trust-pillars {
  display: grid;
  gap: var(--hma-space-md);
  grid-template-columns: 1fr;
  margin-top: clamp(2rem, 5vw, 3.5rem);
}

@media (min-width: 600px) {
  .hma-trust-pillars {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .hma-trust-pillars {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hma-trust-pillar {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: clamp(1rem, 1.6vw, 1.4rem);
  border-radius: var(--hma-radius-lg);
  background: var(--hma-color-secondary);
  color: var(--hma-color-white);
  box-shadow: var(--hma-shadow-soft);
}

.hma-trust-pillar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--hma-radius-pill);
  background: color-mix(in srgb, var(--hma-color-white) 12%, transparent);
  color: var(--hma-color-highlight);
}

.hma-trust-pillar__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hma-trust-pillar__title {
  margin: 0;
  font-family: var(--hma-font-heading);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hma-color-white);
}

.hma-trust-pillar__text {
  margin: 0;
  color: color-mix(in srgb, var(--hma-color-white) 85%, transparent);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ============================================================
 * 15. Section-Hülle (warmes Papier mit abgerundeten Ecken)
 *     – als wiederverwendbarer Wrapper für Hero/Feature/Trust-Bereiche.
 * ============================================================ */

.hma-section {
  margin: clamp(1rem, 2vw, 2rem) auto;
  max-width: var(--hma-container-max);
  border-radius: var(--hma-radius-lg);
  background: var(--hma-color-background);
  padding: clamp(1.25rem, 3vw, 2.5rem);
}

.hma-section--paper {
  background: var(--hma-color-background);
}

.hma-section--card {
  background: var(--hma-color-white);
  box-shadow: var(--hma-shadow-soft);
}
