/* Material theme color overrides */
:root {
  --md-primary-fg-color: #00008B;
  --md-primary-fg-color--light: #2a507a;
  --md-primary-fg-color--dark: #0f2a4a;
  --md-accent-fg-color: #f34910;
  --md-accent-fg-color--transparent: rgba(243, 91, 16, 0.1);
}

/* Header social icons */
.md-header__social {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0 0.2rem;
}

.md-header__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: #00008B;
  transition: color 180ms ease, filter 180ms ease;
}

.md-header__social-link:hover {
  color: #00008B;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 139, 0.45));
}

.md-header__social-link svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

/* Hero images */
img.hero-image {
  display: block;
  width: 100%;
  max-height: 24rem;
  object-fit: cover;
  margin: 0 0 1.5rem;
  padding: 0;
}

/* Video container & privacy preview */
.video-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 1.35rem 0;
  overflow: hidden;
  background: #0f2a4a;
  box-shadow: 0 12px 28px rgba(15, 42, 74, 0.12);
}

.video-container .video-embed {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.video-container .video-embed--youtube {
  background: #000;
}

.video-preview {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
}

.video-preview__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-preview__button {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  border: 0;
  background: linear-gradient(180deg, rgba(10, 14, 24, 0.08), rgba(10, 14, 24, 0.55));
  color: #fff;
  cursor: pointer;
}

.video-preview__play {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  background: rgba(243, 91, 16, 0.92);
  box-shadow: 0 0.75rem 2rem rgba(10, 14, 24, 0.35);
  position: relative;
}

.video-preview__play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-35%, -50%);
  border-style: solid;
  border-width: 0.78rem 0 0.78rem 1.28rem;
  border-color: transparent transparent transparent #fff;
}

.video-preview__label {
  font: 700 0.98rem/1 sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 0.15rem 0.75rem rgba(0, 0, 0, 0.55);
}

.video-preview__fallback {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  color: #fff !important;
  font: 600 0.9rem/1 sans-serif;
  text-decoration-thickness: 0.12em;
}

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

/* Partner grid */
.partner-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.partner-card {
  display: flex;
  border: 1px solid rgba(23, 54, 90, 0.12);
  min-height: 4rem;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.partner-card:hover {
  box-shadow: 0 4px 16px rgba(23, 54, 90, 0.12);
  transform: translateY(-2px);
}

.partner-card__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  padding: 0.85rem 1rem;
}

.partner-card__logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 2.5rem;
  object-fit: contain;
}

@media (min-width: 42rem) {
  .partner-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Bankverbindung card — override tip admonition with brand colors */
.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-color: #f35b10;
}
.md-typeset .tip > .admonition-title,
.md-typeset .tip > summary {
  background-color: rgba(243, 91, 16, 0.12);
}
.md-typeset .tip > .admonition-title::before,
.md-typeset .tip > summary::before {
  background-color: #f35b10;
  -webkit-mask-image: var(--md-admonition-icon--tip);
  mask-image: var(--md-admonition-icon--tip);
}

/* Contact form */
.contact-panel {
  margin: 1.4rem 0 1rem;
  padding: 1.2rem;
  background: linear-gradient(180deg, rgba(243, 91, 16, 0.08), rgba(23, 54, 90, 0.04));
  border: 1px solid rgba(23, 54, 90, 0.12);
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.contact-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contact-form__field {
  display: grid;
  gap: 0.35rem;
}

.contact-form__field label {
  font-weight: 700;
  color: #0f2a4a;
}

.contact-form__field input,
.contact-form__field textarea {
  width: 100%;
  border: 1px solid rgba(23, 54, 90, 0.24);
  background: rgba(255, 255, 255, 0.98);
  color: #17365a;
  padding: 0.78rem 0.85rem;
  font: inherit;
}

.contact-form__field textarea {
  resize: vertical;
  min-height: 10rem;
}

.contact-form__field input::placeholder,
.contact-form__field textarea::placeholder {
  color: rgba(23, 54, 90, 0.58);
}

.contact-form__field input:user-invalid,
.contact-form__field textarea:user-invalid {
  border-color: #c94706;
  box-shadow: inset 0 0 0 1px rgba(201, 71, 6, 0.2);
}

.contact-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.contact-form__submit {
  border: 0;
  background: #f35b10;
  color: #fff;
  font: 700 0.98rem/1 sans-serif;
  letter-spacing: 0.02em;
  padding: 0.9rem 1.2rem;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
}

.contact-form__submit:hover {
  background: #c94706;
  transform: translateY(-1px);
}

.contact-form__submit:disabled {
  cursor: wait;
  background: rgba(23, 54, 90, 0.55);
  transform: none;
}

.contact-form__privacy {
  flex: 1 1 18rem;
  margin: 0;
  font-size: 0.96rem;
  color: #2a507a;
}

.contact-form__status {
  min-height: 1.55rem;
  margin: 0;
  font-weight: 700;
  color: #0f2a4a;
}

.contact-form__status.is-error {
  color: #c94706;
}

.contact-form__status.is-success {
  color: #1b6b3a;
}

.contact-form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-fallback {
  margin: 0 0 1rem;
}

/* Admonitions – fit main content width */
.md-typeset .admonition,
.md-typeset details {
  margin-left: 0;
  margin-right: 0;
}

/* Milestones table */
.md-typeset table:not([class]) {
  font-size: .8rem;
}

.md-content table td,
.md-content table th {
  font-size: inherit;
}

.md-content table td p {
  margin: 0 0 0.4rem;
}

.md-content table td p:last-child {
  margin-bottom: 0;
}

@media (max-width: 42rem) {
  .contact-form__grid {
    grid-template-columns: 1fr;
  }

  .contact-form__actions {
    align-items: stretch;
  }

  .contact-form__submit {
    width: 100%;
  }
}

/* ================================================
   Layout: white header, full-width desktop content
   ================================================ */

/* White header matching body background */
.md-header {
  background-color: var(--md-default-bg-color);
  color: var(--md-primary-fg-color);
  box-shadow: 0 0 0.2rem rgba(0, 0, 0, 0.1), 0 0.2rem 0.4rem rgba(0, 0, 0, 0.075);
}

.md-header__button,
.md-header__title {
  color: var(--md-primary-fg-color);
}

/* Navigation tabs on white background */
.md-tabs {
  background-color: var(--md-default-bg-color);
  color: var(--md-primary-fg-color);
}

.md-tabs__link {
  color: rgba(23, 54, 90, 0.6);
  opacity: 1;
  font-weight: 700;
  font-size: 0.85rem;
}

.md-tabs__link--active,
.md-tabs__link:hover {
  color: var(--md-primary-fg-color);
}

/* Mobile nav drawer: white title + white logo on primary background */
.md-nav--primary .md-nav__title[for="__drawer"] {
  color: #fff;
}

.md-nav--primary .md-nav__title[for="__drawer"] .md-logo img {
  content: url("../assets/images/ZW_Logo_white_outline.png");
}

/* Logo size */
.md-header__button.md-logo img {
  height: 2rem;
}

/* Hide right TOC pane */
.md-sidebar--secondary {
  display: none;
}

/* Hide TOC toggle icon and TOC section in mobile drawer */
.md-nav--primary .md-nav__link[for="__toc"] .md-icon {
  display: none;
}
.md-nav--primary .md-nav__link[for="__toc"] {
  pointer-events: none;
}
.md-nav--primary .md-nav--secondary {
  display: none;
}

/* Main container + header: 10% left/right margins (desktop only) */
@media screen and (min-width: 60em) {
  .md-main__inner,
  .md-header__inner,
  .md-tabs__list {
    padding-left: 10%;
    padding-right: 10%;
  }
}

/* Large desktop: hide left nav sidebar (navigation is in tabs) */
@media screen and (min-width: 76.25em) {
  .md-sidebar--primary {
    display: none;
  }

  .md-grid {
    max-width: 90rem;
  }

  /* Wider content column while keeping readable line length */
  .md-content__inner {
    max-width: 72ch;
  }

  /* Home page: remove line-length cap for spotlight layout */
  article.home-page.md-content__inner,
  article.forderungen-page.md-content__inner,
  article.ueber-uns-page.md-content__inner,
  article.engagement-page.md-content__inner {
    max-width: none;
  }
}

/* Bold headings */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
  font-weight: 700;
  color: #00008B;
}

/* Orange accent on content link hover */
.md-typeset a:hover {
  color: #f35b10;
}

/* Orange bottom border on h2 for visual rhythm */
.md-typeset h2 {
  border-bottom: 2px solid rgb(243, 92, 16);
  padding-bottom: 0.3em;
}

/* Branded admonition: navy background, orange left border, white text */
.md-typeset .admonition.important,
.md-typeset details.important {
  background-color: #17365a;
  border-color: #f35b10;
  color: #fff;
}

.md-typeset .important > .admonition-title,
.md-typeset .important > summary {
  background-color: rgba(243, 91, 16, 0.15);
  color: #fff;
}

.md-typeset .important > .admonition-title::before,
.md-typeset .important > summary::before {
  background-color: #f35b10;
}

.md-typeset .important a {
  color: #f59f72;
}

.md-typeset .important a:hover {
  color: #f35b10;
}

/* ================================================
   Spotlight: two-column image + text layout
   ================================================ */

.spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
  margin-bottom: 3rem;
}

.spotlight__content > h1:first-child,
.spotlight__content > h2:first-child,
.spotlight__content > h3:first-child {
  margin-top: 0;
}

.spotlight__media {
  overflow: hidden;
  display: flex;
}

.spotlight__media p {
  margin: 0;
  flex: 1;
  display: flex;
}

.spotlight__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Video inside spotlight: let aspect-ratio drive height */
.spotlight__media .video-container {
  width: 100%;
  align-self: center;
}

.spotlight--reverse .spotlight__media {
  order: 2;
}

/* Forderungen: prominent ordered list */
.forderungen-page .md-typeset ol,
.forderungen-page ol {
  list-style: none;
  counter-reset: forderung;
  padding: 0;
  margin: 1.5rem 0 1.75rem;
}

.forderungen-page .md-typeset ol li,
.forderungen-page ol li {
  counter-increment: forderung;
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 0 1rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(23, 54, 90, 0.12);
  font-size: 1rem;
  line-height: 1.6;
}

.forderungen-page .md-typeset ol li:first-child,
.forderungen-page ol li:first-child {
  border-top: 1px solid rgba(23, 54, 90, 0.12);
}

.forderungen-page .md-typeset ol li::before,
.forderungen-page ol li::before {
  content: counter(forderung);
  font-size: 1.9rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #f35b10;
  align-self: center;
}

/* Light-orange admonition without title */
.md-typeset .admonition.orange,
.md-typeset details.orange {
  background-color: rgba(243, 91, 16, 0.1);
  border-color: #f35b10;
  padding-top: 0.75rem;
  text-align: center;
  font-size: 1rem;
}

.md-typeset .orange > .admonition-title,
.md-typeset .orange > summary {
  display: none;
}

.md-typeset .admonition.orange h3 {
  margin-top: 0;
}

/* Footer */
.md-footer {
  background-color: #00008B;
}

@media screen and (min-width: 60em) {
  .md-footer-meta__inner,
  .md-footer-nav__inner {
    padding-left: 10%;
    padding-right: 10%;
  }
}

@media (max-width: 959px) {
  .spotlight {
    grid-template-columns: 1fr;
  }

  .spotlight--reverse .spotlight__media {
    order: unset;
  }

  .spotlight__media {
    height: 18rem;
  }
}

/* ================================================
   Engagement: action grid + CTA button
   ================================================ */

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2.5rem 0 1rem;
}

.action-tile {
  padding: 1.75rem 1.5rem;
  border: 1px solid rgba(23, 54, 90, 0.14);
  display: flex;
  flex-direction: column;
}

.action-tile h3 {
  margin-top: 0;
}

.md-typeset a.btn-cta {
  display: flex;
  align-items: center;
  gap: 0.6em;
  width: 100%;
  box-sizing: border-box;
  background: #00008B;
  color: #fff !important;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.15rem;
  text-decoration: none !important;
  transition: background-color 180ms ease, transform 180ms ease;
}

.md-typeset a.btn-cta:hover {
  background: #00008B;
  transform: translateY(-1px);
}

.md-typeset a.btn-cta.btn-cta--disabled {
  background: rgba(23, 54, 90, 0.28);
  color: #00008B !important;
  cursor: not-allowed;
  pointer-events: none;
}

.md-typeset a.btn-cta.btn-cta--disabled:hover {
  transform: none;
}

.md-typeset a.btn-cta .twemoji svg {
  width: 1.5em;
  height: 1.5em;
  flex-shrink: 0;
  fill: currentColor;
}

@media (max-width: 42rem) {
  .action-grid {
    grid-template-columns: 1fr;
  }
}

.table-highlight {
  color: #f35b10;
  font-weight: bold;
}

.table-highlight a {
  font-weight: normal;
}

/* Newsletter popup modal */
.newsletter-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.newsletter-overlay.is-visible {
  display: flex;
}

.newsletter-modal {
  position: relative;
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.newsletter-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: #17365a;
  z-index: 1;
  padding: 0 0.25rem;
}

.newsletter-modal__close:hover {
  color: #f34910;
}

.newsletter-modal__iframe {
  width: 100%;
  height: 80vh;
  max-height: 750px;
  border: none;
  outline: none;
  display: block;
}
