/*
Theme Name: ALS Grundschule
Theme URI: https://www.als-delmenhorst.de
Author: Frank Juchim
Description: Block-Theme für die Astrid-Lindgren-Schule Delmenhorst. Farben Sand, Rauchblau und Mint, lokal eingebundene Schriften (Fredoka, Nunito) – ohne externe Dienste, DSGVO-freundlich.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: als-grundschule
*/

/* ---------- Grundlagen ---------- */
html { scroll-behavior: smooth; }
img { height: auto; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
.skip-link:focus { background: #fff; padding: 8px 16px; z-index: 1000; }

/* ---------- Kopf ---------- */
.als-topbar a { color: inherit; text-decoration: none; }
.als-topbar a:hover { text-decoration: underline; }
.als-header .wp-block-navigation .wp-block-navigation-item__content { padding: 10px 14px; border-radius: 999px; text-decoration: none; }
.als-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.als-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content { background: var(--wp--preset--color--rauchblau-hell); }
.als-header .wp-block-navigation .wp-block-navigation__submenu-container { border-radius: 20px; border: 1px solid var(--wp--preset--color--sand-dunkel) !important; padding: 8px; box-shadow: 0 10px 30px rgba(59,82,102,0.14); min-width: 240px !important; }
.als-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content { border-radius: 12px; }
.als-header .wp-block-navigation .als-nav-kontakt > .wp-block-navigation-item__content { background: var(--wp--preset--color--mint); color: #1F3A2F; padding-inline: 22px; }
.als-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--creme) !important; padding: 24px; }
.als-hinweis a { color: inherit; }

/* ---------- Karten & Kacheln ---------- */
.is-style-karte { background: var(--wp--preset--color--creme); border: 1px solid var(--wp--preset--color--sand-dunkel); border-radius: 28px; }
.als-kachel { transition: transform .2s ease, box-shadow .2s ease; }
.als-kachel:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(59,82,102,0.14); }
.als-kachel a { text-decoration: none; color: inherit; }
.als-kachel a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.als-kachel { position: relative; }
.als-icon { display: inline-flex; width: 52px; height: 52px; border-radius: 16px; align-items: center; justify-content: center; }
.als-icon svg { width: 26px; height: 26px; }

/* ---------- Beiträge / Aktuelles ---------- */
.als-news .wp-block-post { background: var(--wp--preset--color--creme); border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; }
.als-news .wp-block-post-featured-image { margin: 0; overflow: hidden; border-radius: 0 !important; }
.als-news .wp-block-post-featured-image img { border-radius: 0 !important; transition: transform .35s ease; aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.als-news .wp-block-post:hover .wp-block-post-featured-image img { transform: scale(1.04); }
.als-news .wp-block-post-title a { text-decoration: none; color: inherit; }
.als-news .wp-block-post-title a:hover { text-decoration: underline; }
.als-bild-platzhalter { aspect-ratio: 16/10; background: var(--wp--preset--color--mint); }

.wp-block-post-terms a { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--wp--preset--color--rauchblau-hell); color: #2F4A5E; text-decoration: none; }

/* ---------- Bilder in Sonderformen ---------- */
.is-style-blob img { border-radius: 40px 40px 40px 140px !important; }
.is-style-bogen img, .is-style-bogen { border-radius: 50% 50% 40px 40px !important; }
.is-style-kreis img { border-radius: 50% !important; aspect-ratio: 1; object-fit: cover; }

/* ---------- Sprechblasen ---------- */
.wp-block-quote p { margin: 0; }
.wp-block-quote cite { display: block; margin-top: 14px; font-family: var(--wp--preset--font-family--nunito); font-size: 15px; font-weight: 800; font-style: normal; color: var(--wp--preset--color--mint-dunkel); }

/* ---------- Tabellen ---------- */
.wp-block-table table { border-collapse: separate; border-spacing: 0 6px; }
.wp-block-table td, .wp-block-table th { border: none; padding: 12px 18px; }
.wp-block-table thead { border-bottom: none; }
.wp-block-table th { text-align: left; color: var(--wp--preset--color--rauchblau); }
.wp-block-table tbody tr { background: var(--wp--preset--color--creme); }
.wp-block-table tbody td:first-child { border-radius: 14px 0 0 14px; font-weight: 800; color: var(--wp--preset--color--rauchblau); }
.wp-block-table tbody td:last-child { border-radius: 0 14px 14px 0; }
.wp-block-table .is-pause, .als-pause td { background: var(--wp--preset--color--mint); }

/* ---------- Details (Aufklapper) ---------- */
.wp-block-details summary { font-weight: 800; cursor: pointer; }
.wp-block-details + .wp-block-details { margin-top: 10px; }

/* ---------- Datei-Downloads ---------- */
.wp-block-file { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 20px; border-radius: 18px; background: var(--wp--preset--color--creme); }
.wp-block-file .wp-block-file__button { border-radius: 999px; background: var(--wp--preset--color--rauchblau); }

/* ---------- Fuß ---------- */
.als-footer a { color: #fff; }
.als-footer p { margin: 0; }

/* ---------- Mobil ---------- */
@media (max-width: 781px) {
	.als-topbar .als-iserv { margin-left: 0; }
	.als-hide-mobile { display: none !important; }
	.als-header .wp-block-site-logo img, .als-header .als-logo img { max-height: 52px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Ergänzungen ---------- */
.wp-block-media-text__media img { border-radius: 20px; aspect-ratio: 4/3; object-fit: cover; }
.als-kreis { aspect-ratio: 1; }
.wp-block-post-content > .wp-block-image img { max-height: 72vh; width: auto; max-width: 100%; }
.wp-block-post-content > .wp-block-image { text-align: center; }
.wp-block-post-content > h2.wp-block-heading { margin-top: 56px; }
.wp-block-post-content > h3.wp-block-heading { margin-top: 36px; }

/* ---------- Termine (Schulkalender) ---------- */
.als-termine { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.als-termin { display: flex; gap: 16px; align-items: center; padding: 12px 14px; border-radius: 20px; background: var(--wp--preset--color--creme); }
.als-termin__datum { flex-shrink: 0; width: 60px; height: 60px; border-radius: 16px; background: var(--wp--preset--color--rauchblau); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.als-termin__tag { font-family: var(--wp--preset--font-family--fredoka); font-size: 24px; font-weight: 600; }
.als-termin__monat { font-size: 12px; font-weight: 800; text-transform: uppercase; margin-top: 3px; }
.als-termin__text { display: flex; flex-direction: column; gap: 2px; font-size: 16px; line-height: 1.35; }
.als-termin__meta { font-size: 14px; color: var(--wp--preset--color--schiefer); }
.als-termine__monat h2 { margin: 28px 0 4px; font-size: var(--wp--preset--font-size--x-large); }
.als-termine--liste .als-termin { border: 1px solid var(--wp--preset--color--sand-dunkel); }
.als-termine-abo { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.als-termine-abo .wp-element-button { display: inline-block; text-decoration: none; padding: 12px 22px; border-radius: 999px; background: var(--wp--preset--color--rauchblau); color: #fff; font-weight: 800; }
.als-termine-abo span { font-size: 15px; color: var(--wp--preset--color--schiefer); }
.als-termine-leer { font-size: 16px; color: var(--wp--preset--color--schiefer); }
.als-topbar .als-iserv { display: inline-block; padding: 2px 12px; margin-left: 14px; border-radius: 999px; border: 1px solid rgba(247,241,231,0.55); }
/* Zeitleiste (Schulgeschichte) */
.als-zeit > p:first-child { flex: 0 0 118px; text-align: center; white-space: nowrap; margin: 0; }
.als-zeit > p:last-child { margin: 0; padding-top: 4px; }
@media (max-width: 600px) { .als-zeit { flex-direction: column; gap: 6px !important; } .als-zeit > p:first-child { flex-basis: auto; align-self: flex-start; } }

/* Hinweise für die Redaktion: nur für angemeldete Nutzerinnen und Nutzer sichtbar */
body:not(.logged-in) .als-redaktion { display: none !important; }
.logged-in .als-redaktion { outline: 2px dashed currentColor; outline-offset: -8px; }
