/*
Theme Name: PG Haunstetten
Theme URI: https://www.pg-haunstetten.de/
Author: Pfarreiengemeinschaft St. Albert - St. Georg, Augsburg-Haunstetten
Author URI: https://www.pg-haunstetten.de/
Description: Barrierearmes Block-Theme (Full Site Editing) fuer die Pfarreiengemeinschaft St. Albert - St. Georg in Augsburg-Haunstetten. Warmes, ruhiges Erscheinungsbild, grosse Schrift, klare Navigation. Gestaltung und Inhalte werden vollstaendig ueber den Block-Editor gepflegt.
Version: 0.2.0
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pg-haunstetten
Tags: full-site-editing, block-patterns, accessibility-ready, two-columns, custom-colors, custom-menu, translation-ready
*/

/* ============================================================
   Ergaenzende Front-End-Stile
   Alles, was theme.json nicht ausdruecken kann (Hover, Fokus,
   das "Zwei-Kirchen"-Signaturelement, kleine Feinheiten).
   Farben kommen als CSS-Variablen aus theme.json (var(--wp--preset--color--SLUG)).
   ============================================================ */

:root {
  --pg-ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* Lesefluss: etwas groessere Grundzeilenhoehe fuer aeltere Leser */
body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* --- Links: ruhiger Unterstrich, der beim Hover "aufgeht" --- */
a {
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color 0.15s var(--pg-ease);
}
.wp-block-post-content a:hover,
.entry-content a:hover {
  color: var(--wp--preset--color--accent-dark);
}

/* --- Sichtbarer Tastatur-Fokus (Barrierefreiheit) --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.wp-block-button__link:focus-visible,
.wp-block-navigation-item__content:focus-visible {
  outline: 3px solid var(--wp--preset--color--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- Buttons: weicher Hover --- */
.wp-block-button__link {
  transition: background-color 0.15s var(--pg-ease), transform 0.15s var(--pg-ease);
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  background-color: var(--wp--preset--color--primary-dark) !important;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: var(--wp--preset--color--primary) !important;
  color: var(--wp--preset--color--base) !important;
}

/* --- Navigation: aktiver/hover-Zustand --- */
.wp-block-navigation a:where(:hover, :focus) {
  color: var(--wp--preset--color--accent-dark);
}
.wp-block-navigation .current-menu-item > a,
.wp-block-navigation [aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--wp--preset--color--accent);
  text-decoration-thickness: 2px;
}

/* ============================================================
   Signaturelement: "Zwei Kirchen" -- feine Messing-Trennlinie
   mit kleiner Raute in der Mitte (St. Albert + St. Georg).
   Einsetzbar ueber den Block-Stil "Trennlinie -> Zwei Kirchen"
   (class is-style-pg-zwei-kirchen) oder ueber .pg-rule.
   ============================================================ */
.wp-block-separator.is-style-pg-zwei-kirchen,
.pg-rule {
  border: 0;
  height: auto;
  max-width: 100%;
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  color: var(--wp--preset--color--accent);
  margin-block: var(--wp--preset--spacing--50, 1.5rem);
}
.wp-block-separator.is-style-pg-zwei-kirchen::before,
.wp-block-separator.is-style-pg-zwei-kirchen::after,
.pg-rule::before,
.pg-rule::after {
  content: "";
  height: 1px;
  flex: 1 1 auto;
  background: linear-gradient(to right, transparent, var(--wp--preset--color--border));
}
.wp-block-separator.is-style-pg-zwei-kirchen::after,
.pg-rule::after {
  background: linear-gradient(to left, transparent, var(--wp--preset--color--border));
}
/* die kleine Raute */
.wp-block-separator.is-style-pg-zwei-kirchen {
  position: relative;
}
.wp-block-separator.is-style-pg-zwei-kirchen::first-letter { font-size: 0; }

/* Eyebrow / Kapitel-Label */
.pg-eyebrow {
  font-family: var(--wp--preset--font-family--sans);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--wp--preset--color--accent-dark);
}

/* Karten (Personen, Sakramente, Gruppen) */
.pg-card,
.wp-block-group.is-style-pg-card {
  background: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 14px;
  transition: box-shadow 0.18s var(--pg-ease), transform 0.18s var(--pg-ease);
}
.pg-card:hover,
.wp-block-group.is-style-pg-card:hover {
  box-shadow: 0 10px 30px -18px rgba(32, 48, 47, 0.45);
  transform: translateY(-2px);
}

/* Seitenleiste (Vorlage „Seite – mit Seitenleiste") */
.pg-sidebar { align-self: flex-start; }
@media (min-width: 782px) {
  .pg-sidebar { position: sticky; top: 1.5rem; }
}
.pg-sidebar .wp-block-page-list { list-style: none; padding-left: 0; }
.pg-sidebar .wp-block-page-list li { border-bottom: 1px solid var(--wp--preset--color--border); }
.pg-sidebar .wp-block-page-list li:last-child { border-bottom: 0; }
.pg-sidebar .wp-block-page-list a { text-decoration: none; display: block; padding: 0.15rem 0; }
.pg-sidebar .wp-block-page-list a:hover { text-decoration: underline; }

/* Skip-Link gut sichtbar machen, wenn fokussiert */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  word-wrap: normal !important;
}
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 999;
  width: auto;
  height: auto;
  clip: auto;
  clip-path: none;
  background: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--base);
  padding: 0.6rem 1rem;
  border-radius: 6px;
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
