/*
Theme Name: Familiennotruf Theme
Theme URI: https://example.local/
Author: Codex
Description: WordPress-Theme fuer Familien-Notruf Muenchen nach Stitch-Design.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: familiennotruf-theme
*/

:root {
  --color-surface: #f9f9f9;
  --color-surface-lowest: #ffffff;
  --color-surface-low: #f4f3f3;
  --color-surface-container: #eeeeee;
  --color-surface-high: #e8e8e8;
  --color-warm: #fefcca;
  --color-primary: #ac2a32;
  --color-emergency: #d3474b;
  --color-primary-soft: #ffdad8;
  --color-secondary: #61603a;
  --color-tertiary: #545d62;
  --color-tertiary-soft: #dae4ea;
  --color-muted: #594140;
  --color-border: #e0bfbd;
  --color-steel: #7b858a;
  --color-text: #1a1c1c;
  --color-white: #ffffff;
  --shadow-button: 0 8px 20px rgba(172, 42, 50, 0.15);
  --shadow-card: 0 1px 2px rgba(26, 28, 28, 0.04);
  --container: 1200px;
  --gutter: 24px;
  --radius: 12px;
  --font-body: Inter, Arial, sans-serif;
  --font-headline: "Plus Jakarta Sans", Inter, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

.site {
  min-height: 100vh;
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249, 249, 249, 0.95);
  border-bottom: 1px solid rgba(224, 191, 189, 0.35);
  box-shadow: 0 1px 4px rgba(26, 28, 28, 0.04);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

.site-branding {
  display: inline-flex;
  align-items: center;
  color: var(--color-primary);
  font-family: var(--font-headline);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.custom-logo {
  width: auto;
  max-width: 170px;
  max-height: 50px;
  object-fit: contain;
}

.fallback-logo {
  display: grid;
  color: var(--color-tertiary);
  font-family: var(--font-headline);
  font-size: 20px;
  line-height: 0.95;
}

.fallback-logo strong {
  color: var(--color-primary);
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  display: inline-flex;
  padding: 4px 0;
  color: var(--color-muted);
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 20px;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease;
}

.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav a:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 24px;
  color: var(--color-white);
  background: var(--color-primary);
  border: 0;
  border-radius: 999px;
  box-shadow: var(--shadow-button);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 20px;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.button:hover,
.wp-block-button__link:hover {
  background: var(--color-emergency);
  transform: translateY(-1px);
}

.button-small {
  min-height: 36px;
  padding: 8px 24px;
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.section {
  padding: 96px 0;
}

.hero-section {
  position: relative;
  padding: 128px 0 160px;
  overflow: hidden;
}

.hero-section::before,
.hero-section::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.hero-section::before {
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(254, 252, 202, 0.6) 0%, rgba(254, 252, 202, 0) 70%);
}

.hero-section::after {
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(211, 71, 75, 0.05) 0%, rgba(211, 71, 75, 0) 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
  align-items: center;
}

.hero-copy {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 16px;
  color: var(--color-muted);
  background: var(--color-surface-low);
  border: 1px solid rgba(123, 133, 138, 0.2);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 20px;
}

.eyebrow-dot {
  width: 12px;
  height: 12px;
  background: var(--color-emergency);
  border-radius: 50%;
}

.hero-title,
.page-title {
  max-width: 740px;
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-headline);
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 56px;
}

.hero-text,
.page-intro {
  max-width: 560px;
  margin: 0;
  color: var(--color-muted);
  font-size: 18px;
  line-height: 28px;
}

.hero-media {
  grid-column: span 6;
  display: flex;
  justify-content: flex-end;
}

.hero-image-wrap {
  position: relative;
  width: min(500px, 100%);
  aspect-ratio: 1;
}

.hero-image-wrap::before {
  position: absolute;
  z-index: -1;
  top: 16px;
  right: -16px;
  width: 100%;
  height: 100%;
  content: "";
  background: var(--color-primary);
  border-radius: 50%;
}

.hero-image {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--color-surface-container);
  border: 4px solid var(--color-warm);
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(26, 28, 28, 0.14);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-white {
  background: var(--color-surface-lowest);
}

.section-warm {
  position: relative;
  overflow: hidden;
  background: var(--color-warm);
}

.section-warm::before,
.section-warm::after {
  position: absolute;
  content: "";
  background: rgba(255, 255, 255, 0.42);
  border-radius: 50%;
}

.section-warm::before {
  top: 0;
  right: 0;
  width: 600px;
  height: 600px;
  transform: translate(33%, -50%);
}

.section-warm::after {
  bottom: 0;
  left: 0;
  width: 400px;
  height: 400px;
  transform: translate(-25%, 33%);
}

.section-heading {
  max-width: 690px;
  margin: 0 auto 64px;
  text-align: center;
}

.section-heading h2,
.content h2 {
  margin: 0 0 16px;
  color: var(--color-text);
  font-family: var(--font-headline);
  font-size: 32px;
  font-weight: 600;
  line-height: 40px;
}

.section-heading p {
  margin: 0;
  color: var(--color-muted);
  font-size: 18px;
  line-height: 28px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.offer-card,
.event-card,
.cost-card {
  background: var(--color-surface);
  border: 1px solid rgba(123, 133, 138, 0.2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.offer-card {
  padding: 32px;
  transition: border-color 160ms ease, transform 160ms ease;
}

.offer-card:hover {
  border-color: rgba(172, 42, 50, 0.5);
  transform: translateY(-2px);
}

.icon-circle {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
  color: var(--color-primary);
  background: rgba(172, 42, 50, 0.1);
  border-radius: 50%;
}

.icon-circle.secondary {
  color: var(--color-secondary);
  background: var(--color-warm);
}

.icon-circle.tertiary {
  color: var(--color-tertiary);
  background: var(--color-tertiary-soft);
}

.offer-card h3,
.event-card h3 {
  margin: 0 0 12px;
  font-family: var(--font-headline);
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

.offer-card p,
.event-card p,
.info-copy p,
.site-footer p {
  margin: 0;
  color: var(--color-muted);
}

.offer-card p {
  margin-bottom: 24px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 20px;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.info-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 32px;
}

.info-copy {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.info-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 20px;
  text-transform: uppercase;
}

.info-copy h2 {
  margin: 0 0 16px;
  font-family: var(--font-headline);
  font-size: 32px;
  font-weight: 600;
  line-height: 40px;
}

.info-copy > p {
  margin-bottom: 32px;
}

.cost-card {
  padding: 24px;
  background: var(--color-surface-lowest);
}

.cost-card span {
  display: block;
  margin-bottom: 4px;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.cost-card strong {
  color: var(--color-primary);
  font-family: var(--font-headline);
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

.events-grid {
  grid-column: span 8;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.event-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 32px;
  background: var(--color-surface-lowest);
  transition: transform 240ms ease;
}

.event-card:hover {
  transform: translateY(-4px);
}

.event-card-content {
  flex: 1;
}

.badge {
  display: inline-block;
  margin-bottom: 16px;
  padding: 4px 12px;
  color: var(--color-muted);
  background: var(--color-warm);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.event-card ul {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.event-card li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--color-muted);
}

.event-card li::before {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 8px;
  content: "";
  background: var(--color-primary);
  border-radius: 50%;
}

.event-time {
  margin-bottom: 24px;
  color: var(--color-muted);
  font-style: italic;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 250px;
  gap: 24px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  background: var(--color-surface-container);
  border-radius: var(--radius);
}

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item.full {
  grid-column: span 3;
  height: 300px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item.overlay::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(26, 28, 28, 0.6), transparent);
}

.page-hero {
  padding: 96px 0 80px;
}

.content {
  padding: 0 0 96px;
}

.entry-content {
  max-width: 860px;
  color: var(--color-muted);
  font-size: 18px;
  line-height: 1.65;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content h2,
.entry-content h3 {
  color: var(--color-text);
  font-family: var(--font-headline);
}

.entry-content h3 {
  font-size: 24px;
  line-height: 32px;
}

.entry-content .wp-block-group,
.entry-content .wp-block-columns {
  max-width: var(--container);
}

.site-footer {
  background: var(--color-surface-lowest);
  border-top: 1px solid rgba(224, 191, 189, 0.45);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 48px 0;
  text-align: center;
}

.footer-brand {
  max-width: 520px;
}

.footer-brand strong {
  display: block;
  margin-bottom: 16px;
  font-family: var(--font-headline);
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

.footer-badge {
  display: inline-block;
  margin-top: 16px;
  padding: 4px 12px;
  color: var(--color-muted);
  background: var(--color-surface-high);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.footer-links {
  width: 100%;
}

.footer-links ul,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px 32px;
  max-width: 780px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-decoration: underline;
  transition: color 160ms ease;
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-line {
  width: 100%;
  height: 1px;
  background: rgba(224, 191, 189, 0.45);
}

.footer-copy {
  color: var(--color-muted);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    min-height: 72px;
    padding: 12px 0;
  }

  .main-nav {
    order: 3;
    width: 100%;
  }

  .main-nav ul {
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .header-actions {
    margin-left: auto;
  }

  .hero-section {
    padding: 72px 0 96px;
  }

  .hero-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-media,
  .info-copy,
  .events-grid {
    grid-column: auto;
  }

  .hero-media {
    justify-content: center;
    order: -1;
  }

  .hero-image-wrap {
    width: min(360px, 100%);
  }

  .hero-title,
  .page-title {
    font-size: 36px;
    line-height: 44px;
  }

  .cards-grid,
  .events-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item,
  .gallery-item.wide,
  .gallery-item.full {
    grid-column: auto;
    height: 250px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 32px, var(--container));
  }

  .button-small {
    padding: 8px 16px;
  }

  .section {
    padding: 72px 0;
  }

  .hero-section {
    padding: 56px 0 80px;
  }

  .hero-title,
  .page-title {
    font-size: 32px;
    line-height: 40px;
  }

  .hero-text,
  .page-intro,
  .section-heading p {
    font-size: 16px;
    line-height: 24px;
  }

  .section-heading h2,
  .info-copy h2 {
    font-size: 28px;
    line-height: 36px;
  }

  .offer-card,
  .event-card {
    padding: 24px;
  }
}
