:root {
  --color-bg: #e6e6e6;
  --color-pink: #c25a9e;
  --color-pink-dark: #a8478a;
  --color-orange: #f0971f;
  --color-orange-light: #f5b166;
  --color-text-dark: #16161f;
  --color-white: #ffffff;
}

html {
  height: 100%;
}

/* View Transitions: seitlicher Cross-Fade beim Seitenwechsel */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.45s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

::view-transition-old(root) {
  animation-name: page-fade-out;
}

::view-transition-new(root) {
  animation-name: page-fade-in;
}

@keyframes page-fade-out {
  to {
    opacity: 0;
    transform: translateX(-3%);
  }
}

@keyframes page-fade-in {
  from {
    opacity: 0;
    transform: translateX(3%);
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

body {
  background: var(--color-bg);
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--color-text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  width: 100%;
}

.site-footer {
  flex-shrink: 0;
}

a {
  text-decoration: none;
}

main a:not(.btn-freie-plaetze) {
  color: var(--color-pink);
}

main a:not(.btn-freie-plaetze):hover {
  text-decoration: underline;
}

/* Header */
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 0;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-full {
  height: 104px;
  width: auto;
}

.header-tagline {
  color: var(--color-pink);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: right;
}

@media (max-width: 991.98px) {
  .header-tagline {
    flex-basis: 100%;
    text-align: right;
    order: 3;
    padding-right: 140px;
  }
}

/* Quick-Exit-Button */
.quick-exit {
  position: fixed;
  top: 54px;
  right: 10px;
  z-index: 1040;
  display: flex;
}

.quick-exit img {
  display: block;
  height: 44px;
  width: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: box-shadow 0.15s ease;
}

.quick-exit:hover img {
  box-shadow: 0 2px 10px rgba(194, 90, 158, 0.6);
}

@media (min-width: 992px) {
  .header-inner {
    padding-right: 140px;
  }
}

@media (max-width: 991.98px) {
  .quick-exit {
    top: 158.1px;
  }
}

/* Navigation */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--color-bg);
  padding-bottom: 1.5rem;
}

.nav-columns {
  display: flex;
  width: 100%;
  flex-wrap: nowrap;
  gap: 1rem;
}

.nav-col {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
}

.nav-col-header {
  width: 100%;
  background: var(--color-pink);
  color: var(--color-white);
  font-weight: 700;
  font-size: clamp(0.7rem, 1vw, 1rem);
  text-align: center;
  white-space: nowrap;
  padding: clamp(0.5rem, 1vw, 0.85rem) clamp(0.25rem, 0.6vw, 0.5rem);
  cursor: default;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.nav-col:hover .nav-dropdown,
.nav-col:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-item {
  display: block;
  color: var(--color-white);
  font-weight: 600;
  font-size: clamp(0.68rem, 0.95vw, 0.95rem);
  text-align: center;
  padding: clamp(0.5rem, 1vw, 0.85rem) clamp(0.25rem, 0.6vw, 0.5rem);
  transition: filter 0.15s ease;
}

.nav-item.dark {
  background: var(--color-orange);
}

.nav-item.light {
  background: var(--color-orange-light);
}

.nav-item:hover {
  filter: brightness(0.92);
}

.nav-item.active {
  background: var(--color-pink-dark);
  box-shadow: inset 0 0 0 2px var(--color-white);
}

.nav-col:has(.nav-item.active) .nav-col-header {
  background: var(--color-pink-dark);
}

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 40px;
  background: var(--color-pink);
  border: none;
  padding: 9px 8px;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-burger span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--color-white);
  border-radius: 2px;
}

@media (max-width: 991.98px) {
  .nav-burger {
    display: flex;
  }

  #mainNav {
    --bs-offcanvas-width: 100%;
  }

  .nav-columns {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-col {
    min-width: 100%;
  }

  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    transition: none;
  }

  .nav-col-header {
    font-size: 0.85rem;
    padding: 0.5rem 0.5rem;
  }

  .nav-item {
    font-size: 0.8rem;
    padding: 0.5rem 0.5rem;
    white-space: nowrap;
  }
}

.offcanvas-header {
  background: var(--color-bg);
}

.offcanvas-title {
  display: flex;
  align-items: center;
}

.offcanvas-logo {
  height: 44px;
  width: auto;
}

/* Hero */
.hero-section {
  padding: 2.5rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  flex: 1;
}

.hero-frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  width: 50%;
  margin: 0 auto;
  position: relative;
  aspect-ratio: 1200 / 841;
  overflow: hidden;
  order: 2;
}

@media (max-width: 767.98px) {
  .hero-frame {
    width: 100%;
  }
}

.hero-frame > .hero-photo,
.hero-frame > .hero-text {
  grid-row: 1;
  grid-column: 1;
  min-width: 0;
  min-height: 0;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-text {
  position: relative;
  z-index: 2;
  align-self: center;
  margin-left: 53%;
  padding: 0 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  container-type: inline-size;
  container-name: hero-text;
}

.hero-text h1 {
  font-size: clamp(0.7rem, 8.5cqw, 1.55rem);
  font-weight: 700;
  margin-bottom: clamp(0.5rem, 1.5vw, 1rem);
  white-space: nowrap;
}

.hero-divider {
  position: relative;
  border: none;
  height: 4px;
  width: 100%;
  background: #f0971f;
  margin: 0 0 1rem;
  opacity: 1;
}

.hero-divider::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 0;
  width: clamp(20px, 8%, 90px);
  height: 2px;
  background: #f0971f;
}

.hero-phone {
  font-size: clamp(0.65rem, 11cqw, 2.1rem);
  font-weight: 400;
  margin: 0;
  white-space: nowrap;
}

.btn-freie-plaetze {
  display: inline-block;
  background: var(--color-orange);
  color: var(--color-white);
  font-weight: 700;
  padding: 0.9rem 1.75rem;
  align-self: flex-end;
  order: 1;
}

.btn-freie-plaetze:hover {
  background: var(--color-pink-dark);
  color: var(--color-white);
}

/* Generic content page (e.g. Kontakt) */
.page-section {
  padding: 2.5rem 0;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.page-content {
  max-width: 960px;
}

.page-content h1 {
  color: var(--color-pink);
  font-weight: 700;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

.page-content p {
  margin-bottom: 1rem;
}

.paypal-qr-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.paypal-qr-inline {
  height: 3rem;
  width: auto;
  flex-shrink: 0;
}

.page-content ul {
  list-style-type: square;
}

.page-content ul li::marker {
  color: #a8478a;
  font-size: 1.4em;
}

.faq-accordion {
  border: none;
}

.faq-accordion .accordion-item {
  border: none;
  margin-bottom: 0.5rem;
  border-radius: 0;
  overflow: hidden;
  background: var(--color-white);
}

.faq-accordion .accordion-button {
  border-radius: 0 !important;
}

.faq-accordion .accordion-button {
  color: var(--color-white);
  font-weight: 600;
  background: var(--color-orange);
  box-shadow: none;
}

.faq-accordion .accordion-item:nth-child(even) .accordion-button {
  background: var(--color-orange-light);
}

.faq-accordion .accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(240, 151, 31, 0.35);
}

.faq-accordion .accordion-button::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' d='M8 2v12M2 8h12'/%3E%3C/svg%3E");
  transform: none;
}

.faq-accordion .accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' d='M2 8h12'/%3E%3C/svg%3E");
  transform: none;
}

/* Footer */
.site-footer {
  background: var(--color-pink);
  color: var(--color-white);
  padding: 2rem 0;
}

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

@media (max-width: 767.98px) {
  .footer-columns {
    flex-direction: column;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .footer-columns {
    flex-wrap: nowrap;
    gap: clamp(0.75rem, 2vw, 2rem);
  }
}

.footer-spendenkonto h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-spendenkonto p {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.footer-spendenkonto a {
  color: var(--color-white);
  text-decoration: underline;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .footer-spendenkonto {
    flex-shrink: 0;
    font-size: clamp(0.75rem, 1.6vw, 1rem);
  }

  .footer-spendenkonto h2 {
    font-size: clamp(0.8rem, 1.7vw, 1rem);
  }

  .footer-spendenkonto p {
    font-size: clamp(0.7rem, 1.5vw, 0.9rem);
  }
}

.footer-badges {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  flex: 1 1 0;
  justify-content: space-between;
}

.footer-badge {
  max-width: 100%;
  max-height: 96px;
  width: auto;
  height: auto;
  min-width: 0;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .footer-badges {
    flex-wrap: nowrap;
    gap: clamp(0.4rem, 1.2vw, 1rem);
  }
}

@media (max-width: 767.98px) {
  .footer-badges {
    display: grid;
    grid-template-columns: auto auto;
    align-items: start;
    justify-content: start;
  }

  .footer-badge-link-hilfetelefon,
  .footer-badge-link-ministerium {
    grid-column: 1 / -1;
  }
}

.footer-meta {
  display: contents;
}

@media (max-width: 767.98px) {
  .footer-meta {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
  }
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 700;
}

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

.footer-links a:hover {
  text-decoration: underline;
}

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-social img {
  width: 40px;
  height: 40px;
}

.footer-badge-link img,
.footer-social a img {
  transition: box-shadow 0.15s ease;
}

.footer-badge-link:hover img,
.footer-social a:hover img {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .footer-links {
    flex-shrink: 0;
    gap: 0.2rem;
    font-size: clamp(0.7rem, 1.5vw, 1rem);
    white-space: nowrap;
  }

  .footer-social {
    flex-shrink: 0;
  }

  .footer-social img {
    width: clamp(26px, 3.5vw, 40px);
    height: clamp(26px, 3.5vw, 40px);
  }
}

/* Modals (Impressum / Datenschutz) */
.modal-header {
  border-bottom: 3px solid var(--color-orange);
}

.modal-title {
  color: var(--color-pink);
  font-weight: 700;
}

.modal-body p {
  font-size: 0.95rem;
}
