/*
Theme Name: FOR 5381
Description: Schlankes Child Theme von Twenty Twenty-Five für die DFG-FWF-Forschungsgruppe 5381. Farben, Schriften und Größen zentral in theme.json bzw. unter Design → Editor → Stile.
Template: twentytwentyfive
Version: 1.3.3
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: for5381
*/

/* ---------- Navigation: active page underlined in accent colour ---------- */
.for-nav { border-top: 1px solid var(--wp--preset--color--accent-6); border-bottom: 1px solid var(--wp--preset--color--accent-6); }
.for-nav .wp-block-navigation-item__content { padding: 13px 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.for-nav .wp-block-navigation-item__content:hover,
.for-nav .current-menu-item > .wp-block-navigation-item__content { color: var(--wp--preset--color--accent-1); text-decoration: none; }
.for-nav .current-menu-item > .wp-block-navigation-item__content { border-bottom-color: var(--wp--preset--color--accent-1); }

/* ---------- Block style "Kicker" (small uppercase accent line) ---------- */
.is-style-for-kicker { font-size: var(--wp--preset--font-size--small); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--accent-1); }

/* ---------- Block style "Infobox" (accent line on the left) ---------- */
.is-style-for-infobox { border-left: 3px solid var(--wp--preset--color--accent-1); padding-left: 18px; }

/* ---------- Block style "Karte" (white card with thin border) ---------- */
.is-style-for-card { background: var(--wp--preset--color--base); border: 1px solid var(--wp--preset--color--accent-6); padding: 18px; }
.is-style-for-card img { display: block; width: 100%; height: auto; }

/* ---------- Block style "Meldung" (news item with top rule) ---------- */
.is-style-for-news-item { border-top: 1px solid var(--wp--preset--color--accent-6); padding-top: 14px; }
.is-style-for-news-item:first-child { border-top: none; padding-top: 0; }

/* ---------- Link with arrow ---------- */
.is-style-for-arrow a { font-weight: 600; }
.is-style-for-arrow a::after { content: " \2192"; }

/* ---------- Small screens ---------- */
@media (max-width: 781px) {
	.for-nav .wp-block-navigation-item__content { padding: 8px 0; }
}

/* ---------- Image band (pattern "Bildband", on the homepage via the template) ----------
   The picture is greyscale; the overlay in the accent colour tints it ("screen" blending):
   dark parts become the accent colour, light parts a pale tint of it.
   Changing the colour set under Styles → Colours therefore recolours the band automatically.
   For a normal colour photo without tint: select the band → set the overlay opacity to 0. */
.for-bildband { isolation: isolate; }
.for-bildband > .wp-block-cover__background { mix-blend-mode: screen; }

/* ---------- Header / footer pieces ---------- */
.for-legal a + a { margin-left: 1.25em; }
.for-lang a { color: inherit; }
.for-lang strong { color: var(--wp--preset--color--contrast); font-weight: 600; }

/* ---------- Events list (patterns "Veranstaltung", "Veranstaltungen") ---------- */
.for-event-year { font-size: var(--wp--preset--font-size--small); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--accent-4); padding-bottom: 10px; border-bottom: 1px solid var(--wp--preset--color--accent-6); margin-top: 36px !important; margin-bottom: 0; }
.for-event-year:first-child { margin-top: 0 !important; }
.for-event { gap: 20px !important; margin: 0 !important; padding: 18px 0; border-bottom: 1px solid var(--wp--preset--color--accent-6); }
.for-event h3 { font-size: 1.125rem; }
.for-event-date p { font-size: .8125rem; line-height: 1.35; color: var(--wp--preset--color--accent-4); }
.for-event-date strong { display: block; font-size: 1.375rem; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; color: var(--wp--preset--color--accent-1); font-variant-numeric: tabular-nums; }
.for-event-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 4px; font-size: .9375rem; }
.for-event-links a { font-weight: 600; }
.for-event-links a::after { content: " \2192"; }

/* ---------- PDF preview (File block, style "PDF-Vorschau") ---------- */
.is-style-for-pdf-preview img { display: block; width: 100%; height: auto; border: 1px solid var(--wp--preset--color--accent-6); }
.is-style-for-pdf-preview a:hover img { border-color: var(--wp--preset--color--accent-1); }

/* ---------- Phones (upright, and turned sideways): no image band ---------- */
@media (max-width: 600px), (pointer: coarse) and (max-height: 500px) {
	.for-bildband { display: none; }
}
@media (max-width: 600px) {
	.for-event { gap: 14px !important; }
	.for-event-date { flex-basis: 80px !important; }
}

/* ---------- Image band: picture shown at 1:1 pixel scale (since 1.3.2) ----------
   The band picture is drawn so that "row in the picture" = "distance from the top of the browser window".
   The curve therefore always sits inside the band – on every screen size and while scrolling.
   (WordPress' default would scale the picture to the window size, which shifts the curve on small screens.) */
.for-bildband .wp-block-cover__image-background.has-parallax {
	background-size: max(1920px, 100vw) auto !important;
	background-position: 50% 0 !important;
	background-repeat: no-repeat;
}
/* Touch devices (tablets) cannot fix the background; show the middle of the picture instead. */
@supports (-webkit-touch-callout: inherit) {
	.for-bildband .wp-block-cover__image-background.has-parallax { background-position: 50% 32% !important; }
}

/* ---------- Image band picture as vector graphic (since 1.3.3) ----------
   SVG stays sharp on every screen (also Retina) – the earlier JPG looked coarse.
   This rule replaces whatever picture is set in the band, so the band always shows the theme picture.
   To switch to another candidate, add under Design → Editor → Stile → Zusätzliches CSS, e.g.:
   :root { --for5381-bildband: url("/wp-content/themes/for5381/assets/images/bildband-w1.svg"); }
   Available: bildband-s3.svg, bildband-s3-code-zart.svg, bildband-s3-code-deutlich.svg,
              bildband-w1.svg, bildband-w1-code-zart.svg, bildband-w1-code-deutlich.svg */
.for-bildband .wp-block-cover__image-background.has-parallax {
	background-image: var(--for5381-bildband, url("assets/images/bildband-s3.svg")) !important;
}
