/*
Theme Name: VON (Twenty Twenty-Five Child)
Description: Child-Theme für den Verband Oberrheinischer Narrenzünfte e.V. auf Basis von Twenty Twenty-Five. Farben, Schriften und Bausteine über theme.json, Bilderslider über den Core-Galerie-Block.
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: von
*/

/* ==========================================================================
   Grundwerte, die theme.json nicht abbildet
   ========================================================================== */

:root {
  /* Feine Trennlinie auf Off-White (nicht als Palette-Farbe, nur Deko) */
  --von-linie: #e8e2d4;
  --von-radius: 8px;
  --von-schatten:
    0 1px 2px rgba(38, 35, 37, 0.06), 0 8px 24px rgba(38, 35, 37, 0.06);
}

/* Lange deutsche Wörter in Überschriften sauber trennen
   (setzt Deutsch als Website-Sprache voraus, dann lang="de-DE") */
h1,
h2,
h3,
.wp-block-post-title {
  hyphens: auto;
  overflow-wrap: break-word;
}

/* Sichtbarer Tastatur-Fokus in Verbandsfarbe (Barrierefreiheit) */
:where(a, button, .wp-element-button):focus-visible {
  outline: 3px solid var(--wp--preset--color--accent-1);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--wp--preset--color--contrast);
}

/* ==========================================================================
   Header
   ========================================================================== */

.von-topbar p {
  margin: 0;
}

.von-topbar a {
  text-decoration: none;
}

.von-topbar a:hover {
  text-decoration: underline;
}

/* Login-Link als gelbe Pille */
.von-topbar .von-login {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 4px;
  background: var(--wp--preset--color--accent-1);
  color: var(--wp--preset--color--contrast) !important;
  font-weight: 700;
}

.von-header {
  border-bottom: 1px solid var(--von-linie);
}

/* Seitentitel zweizeilig neben dem Logo */
.von-site-title {
  max-width: 15em;
  font-family: var(--wp--preset--font-family--bricolage-grotesque);
  font-size: clamp(0.95rem, 0.8rem + 0.6vw, 1.3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.von-site-title a {
  color: var(--wp--preset--color--contrast);
  text-decoration: none;
}

.von-nav .wp-block-navigation-item__content:hover {
  text-decoration: none;
}
/* Menülinks in Textfarbe statt Linkfarbe (auch im mobilen Overlay) */
.von-nav .wp-block-navigation-item__content {
  color: inherit;
}

/* Aktiver Menüpunkt: gelbe Unterstreichung */
.von-nav .current-menu-item > a,
.von-nav .current-menu-ancestor > a {
  box-shadow: inset 0 -4px 0 var(--wp--preset--color--gruen);
}

/* Mobiles Menü (Overlay): linksbündig, Hauptpunkte groß, Unterpunkte eingerückt */
.von-nav .wp-block-navigation__responsive-container.is-menu-open {
  padding: var(--wp--preset--spacing--40);
}

/* Die Ausrichtung "rechts" des Desktop-Menüs wird per CSS-Variable an alle
   Ebenen vererbt, deshalb im Overlay auf allen Ebenen zurücksetzen */
.von-nav .is-menu-open,
.von-nav .is-menu-open * {
  --navigation-layout-justification-setting: flex-start;
  --navigation-layout-justify: flex-start;
}

.von-nav
  .is-menu-open
  .wp-block-navigation__container
  > .wp-block-navigation-item
  > .wp-block-navigation-item__content {
  font-family: var(--wp--preset--font-family--bricolage-grotesque);
  font-size: var(--wp--preset--font-size--large);
}

.von-nav .is-menu-open .wp-block-navigation__submenu-container {
  padding-left: 1rem !important;
  font-weight: 400;
}

/* Servicezeile auf kleinen Bildschirmen ausblenden,
   Kontakt und Login stehen im Footer bzw. im mobilen Menü */
@media (max-width: 599px) {
  .von-topbar {
    display: none !important;
  }
}

/* ==========================================================================
   Block-Styles (in functions.php registriert, im Editor auswählbar)
   ========================================================================== */

/* Absatz: Kicker über Überschriften */
.is-style-von-kicker {
  margin-bottom: 0.25rem !important;
  color: var(--wp--preset--color--rot-dunkel);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Absatz: Kategorie-Chip */
.is-style-von-chip {
  width: fit-content;
  padding: 0.2rem 0.7rem;
  border-radius: 3px;
  background: var(--wp--preset--color--accent-1);
  color: var(--wp--preset--color--contrast);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Absatz: Datums-Badge. Inhalt: <strong>04</strong> Okt 2026 */
.is-style-von-datum {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 5.5rem;
  min-height: 5.5rem;
  margin: 0;
  border-radius: 6px;
  background: var(--wp--preset--color--accent-1);
  color: var(--wp--preset--color--contrast);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.is-style-von-datum strong {
  font-family: var(--wp--preset--font-family--bricolage-grotesque);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

/* Buttons: Rot (weiße Schrift, Kontrast 4,6:1) und Anthrazit */
.wp-block-button.is-style-von-rot .wp-block-button__link {
  background-color: var(--wp--preset--color--rot-dunkel);
  color: #fff;
}

.wp-block-button.is-style-von-dunkel .wp-block-button__link {
  background-color: var(--wp--preset--color--contrast);
  color: #fff;
}

.wp-block-button.is-style-von-rot .wp-block-button__link:hover,
.wp-block-button.is-style-von-dunkel .wp-block-button__link:hover {
  background-color: var(--wp--preset--color--accent-1);
  color: var(--wp--preset--color--contrast);
}

/* ==========================================================================
   Startseite: Karten und Termine
   ========================================================================== */

.von-card {
  overflow: hidden;
  border-radius: var(--von-radius);
  background: var(--wp--preset--color--accent-5);
  box-shadow: var(--von-schatten);
}

.von-card .wp-block-post-featured-image {
  margin: 0;
}

.von-termin-card {
  overflow: hidden;
  border-radius: var(--von-radius);
}

.von-termin-card .is-style-von-datum strong {
  color: var(--wp--preset--color--accent-1);
}

/* Kategorie des Beitrags als grüner Chip */
.von-chip-terms a {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 3px;
  background: var(--wp--preset--color--gruen);
  color: var(--wp--preset--color--contrast);
  font-weight: 600;
  text-decoration: none;
}

.von-termin-row h3 a {
  color: var(--wp--preset--color--contrast);
  text-decoration: none;
}

.von-termin-row h3 a:hover {
  text-decoration: underline;
}

.von-termin-row {
  padding-block: 1.25rem;
  border-top: 1px solid var(--von-linie);
}

.von-termin-row h3 {
  margin: 0;
}

.von-termin-row p {
  margin: 0;
}

/* Termin-Badges in der Vorschau abwechselnd Gelb / Grün / Blau */
.von-termin-row:nth-of-type(3n + 2) .is-style-von-datum {
  background: var(--wp--preset--color--gruen);
}

.von-termin-row:nth-of-type(3n + 3) .is-style-von-datum {
  background: var(--wp--preset--color--blau);
}

/* Footer direkt an den letzten Abschnitt anschließen (Startseite, Übersichten, Seiten, Einzelansichten) */
body.home .wp-site-blocks > footer,
body.blog .wp-site-blocks > footer,
body.page .wp-site-blocks > footer,
body.single .wp-site-blocks > footer {
  margin-block-start: 0;
}

/* ==========================================================================
   Übersichten "Aktuelles" (templates/home.html) und
   "Pressemitteilungen" (templates/uebersicht-pressemitteilungen.html)
   ========================================================================== */

.von-page-head {
  border-bottom: 1px solid var(--von-linie);
}

.von-page-head h1 {
  margin: 0;
}

/* Karten im Raster gleich hoch, "Weiterlesen" immer unten */
.wp-block-post-template .von-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.von-card__body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.von-card__body .wp-block-post-title {
  margin: 0;
}

.von-card__body .wp-block-post-excerpt__excerpt {
  margin: 0;
}

.von-card__body .wp-block-read-more {
  margin-top: auto;
  padding-top: 0.5rem;
  font-weight: 700;
}

/* Seitennavigation: Zahlen als 44 px große Felder, aktuelle Seite gelb */
.von-pagination {
  margin-top: var(--wp--preset--spacing--60);
  font-weight: 700;
}

.von-pagination a {
  color: var(--wp--preset--color--contrast);
  text-decoration: none;
}

.von-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  border-radius: 4px;
}

.von-pagination a.page-numbers:hover {
  background: var(--wp--preset--color--accent-5);
}

.von-pagination .page-numbers.current {
  background: var(--wp--preset--color--accent-1);
}

.von-pagination .wp-block-query-pagination-previous,
.von-pagination .wp-block-query-pagination-next {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.von-footer a {
  text-decoration: none;
}

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

.von-footer .is-style-von-kicker {
  color: var(--wp--preset--color--accent-1);
}

.von-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   Einzelansicht Beitrag / Pressemitteilung (templates/single*.html)
   ========================================================================== */

.von-page-head .wp-block-post-title {
  margin: 0;
}

.von-single-footer {
  border-top: 1px solid var(--von-linie);
  font-weight: 700;
}

.von-single-footer p {
  margin: 0;
}

.von-single-footer a {
  text-decoration: none;
}

.von-more-posts .is-style-von-kicker {
  margin-bottom: var(--wp--preset--spacing--20) !important;
}

.von-more-row {
  padding-block: var(--wp--preset--spacing--30);
  border-bottom: 1px solid var(--von-linie);
}

.von-more-row .wp-block-post-title,
.von-more-row .wp-block-post-date {
  margin: 0;
}
