/*
 * PTO Theme: Layout.
 * Lesespalte, Breitraster, Seitenabstände. Strukturelle Container,
 * die quer durch alle Templates gelten. Artikelbausteine gehören in
 * components.css, nicht hierher.
 */

.pt-read,
.pt-wide {
  margin-inline: auto;
  padding-inline: var(--pt-pad-m);
}

.pt-read {
  max-width: var(--pt-read);
}

.pt-wide {
  max-width: var(--pt-wide);
}

@media (min-width: 768px) {
  .pt-read,
  .pt-wide {
    padding-inline: var(--pt-pad-d);
  }
}

/* ==========================================================
 * Site-Chrome (header.php/footer.php) — hier und nicht in
 * components.css, weil header.php/footer.php auf jeder Seite
 * erscheinen, auch auf den schlichten Rechtsseiten, auf denen
 * components.css bewusst nicht lädt.
 * ========================================================== */

.pt-topbar {
  border-bottom: 1px solid var(--pt-rule);
  background: var(--pt-panel);
  font-size: 12.5px;
}

.pt-topbar__menu {
  list-style: none;
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin: 0;
  padding: 8px 0;
}

.pt-topbar__menu a {
  color: var(--pt-ink-mute);
}

.pt-masthead {
  border-bottom: 1px solid var(--pt-rule);
}

.pt-masthead__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

/* ---------- Logo/Marke ---------- */

.pt-brand {
  display: flex;
  align-items: center;
}

.pt-brand .custom-logo {
  display: block;
  height: 32px;
  width: auto;
}

.pt-brand-text {
  font-family: var(--pt-serif);
  font-weight: 600;
  font-size: 19px;
  color: var(--pt-ink);
  text-decoration: none;
}

/* ---------- Hauptnavigation, Desktop: Reihe ---------- */

.pt-nav__menu {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
}

.pt-nav__menu a {
  color: var(--pt-ink-soft);
}

.pt-nav__menu .current-menu-item > a,
.pt-nav__menu .current-menu-ancestor > a {
  color: var(--pt-blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Mobile Navigation: Burger und Drawer ---------- */

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

.pt-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  cursor: pointer;
}

.pt-burger__box {
  position: relative;
  display: block;
  width: 22px;
  height: 16px;
}

.pt-burger__box span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--pt-ink);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.pt-burger__box span:nth-child(1) {
  top: 0;
}

.pt-burger__box span:nth-child(2) {
  top: 7px;
}

.pt-burger__box span:nth-child(3) {
  top: 14px;
}

.pt-nav-toggle:focus-visible ~ .pt-masthead .pt-burger {
  outline: 3px solid var(--pt-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.pt-nav-overlay {
  display: none;
}

@media (max-width: 619px) {
  .pt-masthead__row {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    gap: 8px;
  }

  .pt-burger {
    display: flex;
    grid-column: 1;
  }

  .pt-brand {
    grid-column: 2;
    justify-content: center;
  }

  .pt-nav-toggle:checked ~ .pt-masthead .pt-burger__box span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .pt-nav-toggle:checked ~ .pt-masthead .pt-burger__box span:nth-child(2) {
    opacity: 0;
  }

  .pt-nav-toggle:checked ~ .pt-masthead .pt-burger__box span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .pt-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    width: min(80vw, 320px);
    overflow-y: auto;
    background: var(--pt-paper);
    border-left: 1px solid var(--pt-rule);
    padding: 64px 24px 24px;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.2s ease, visibility 0s linear 0.2s;
  }

  .pt-nav-toggle:checked ~ .pt-masthead .pt-nav {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.2s ease;
  }

  .pt-nav__menu {
    flex-direction: column;
    gap: 4px;
  }

  .pt-nav__menu a {
    display: block;
    padding: 12px 8px;
  }

  .pt-nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 150;
    background: var(--pt-ink);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .pt-nav-toggle:checked ~ .pt-nav-overlay {
    opacity: 0.4;
    pointer-events: auto;
  }
}

/* ---------- Footer ---------- */

.pt-site-footer {
  border-top: 1px solid var(--pt-rule);
  background: var(--pt-panel);
  margin-top: 48px;
  padding: 24px 0 48px;
  font-size: 12.5px;
  color: var(--pt-ink-mute);
}

.pt-site-footer__logo {
  margin: 0 0 12px;
}

.pt-site-footer__logo .custom-logo {
  display: block;
  height: 24px;
  width: auto;
}

.pt-site-footer__logo .pt-brand-text {
  font-size: 16px;
}

.pt-site-footer__desc {
  max-width: var(--pt-read);
  margin: 0 0 16px;
}

.pt-footer__disclosure {
  background: var(--pt-paper);
  border: 1px solid var(--pt-rule);
  border-radius: var(--pt-radius);
  padding: 16px;
  margin: 0 0 24px;
  line-height: 1.55;
}

.pt-footer__cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 0 0 24px;
}

@media (min-width: 480px) {
  .pt-footer__cols {
    grid-template-columns: 1fr 1fr;
  }
}

.pt-footer__col-title {
  font-family: var(--pt-sans);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pt-ink-mute);
  margin: 0 0 8px;
}

.pt-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.pt-footer__links a,
.pt-footer__col a {
  color: var(--pt-ink-mute);
}

.pt-footer__meta {
  margin: 0;
}
