/*!
Theme Name: LVWNRW
Theme URI: https://www.studioorange.de/
Author: Studio Orange Köln
Author URI: https://www.studioorange.de/
Description: Custom Theme für Landesverkehrswacht Nordrhein-Westfalen e.V. (Multisite, 43 Subsites)
Version: 1.2.9
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: lvwnrw
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

LVWNRW basiert auf Underscores (https://underscores.me/), (C) 2012-2020 Automattic, Inc.
Underscores ist unter den Bedingungen der GNU GPL v2 oder später lizenziert.
*/

/* ============================================================
 * Design Tokens (CSS Custom Properties)
 * ============================================================ */
:root {
    /* Brand Colors */
    --color-primary:     #5ca2df;  /* Verkehrswacht-Blau */
    --color-success:     #009933;  /* Verkehrswacht-Grün */
    --color-error:       #d05353;  /* Akzent-Rot */
    --color-text:        #333333;
    --color-text-muted:  #777777;
    --color-bg:          #ffffff;
    --color-bg-alt:      #f6f6f6;
    --color-border:      #dddddd;

    /* Typography */
    --font-base:         'Lato', sans-serif;
    --font-medium:       'latomedium', 'Lato', sans-serif;
    --font-semibold:     'latosemibold', 'Lato', sans-serif;
    --font-size-base:    16px;
    --line-height-base:  1.6;

    /* Spacing Scale */
    --space-xs:  8px;
    --space-sm:  16px;
    --space-md:  24px;
    --space-lg:  48px;
    --space-xl:  72px;

    /* Layout */
    --radius-sm:         4px;
    --radius-md:         8px;
    --shadow-sm:         0 1px 3px rgba(0,0,0,.08);
    --shadow-md:         0 4px 12px rgba(0,0,0,.10);

    /* Transitions */
    --transition-fast:   .15s ease;
    --transition-base:   .25s ease;
}

/* ============================================================
 * Fokus-Verhalten (26.04.2026, erweitert)
 * ----------------------------------------------------------------
 * Globaler Reset: Bei MAUS-Klick keine outline/box-shadow (blauer Ring).
 * Tastatur-Nutzer bekommen über :focus-visible weiterhin einen
 * sichtbaren grünen Fokus-Indikator (WCAG 2.4.7 „Focus Visible").
 * Wir nutzen Brand-Grün, nicht Brand-Blau (User-Wunsch + bessere Kontrastsicht).
 * ============================================================ */
*:focus,
*:active {
    outline: none;
}

/* Bootstrap und manche Plugins setzen einen blauen box-shadow als Fokus-Ring —
   ebenfalls bei Mausklick wegnehmen (auf Tastatur via :focus-visible wieder anschalten). */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
.btn:focus,
img:focus,
[tabindex]:focus {
    outline: none;
    box-shadow: none;
}

/* Tastatur-Fokus: grüner Brand-Indikator */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--color-success);
    outline-offset: 2px;
    border-radius: 2px;
    box-shadow: none;
}

/* Maximale Härtung gegen Bootstrap/Plugin-Frameworks, die einen blauen
   Rahmen oder box-shadow auf Card-Wrappern, Listen-Items, .form-control etc.
   im :focus-Zustand zeichnen. Mit !important, weil Bootstrap-Selektoren oft
   höhere Spezifität haben als unsere generischen Regeln. */
body *:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}
.form-control:focus,
.btn:focus,
.list-group-item:focus,
.card:focus,
.panel:focus {
    outline: none;
    box-shadow: none;
    border-color: inherit;
}

/* ============================================================
 * Leaflet-Popup Reset (26.04.2026)
 * ----------------------------------------------------------------
 * Die Klasse .member-info-window stammt aus dem alten Google-Maps-Setup
 * und hatte "position: absolute; top: 50%; transform: translateY(-50%)" —
 * das bricht das Leaflet-Popup-Layout (Close-Button landet mittig).
 * Hier zurücksetzen, wenn .member-info-window innerhalb eines Leaflet-Popups liegt.
 * ============================================================ */
.leaflet-popup-content .member-info-window {
    position: static;
    top: auto;
    right: auto;
    transform: none;
    width: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
}
.leaflet-popup-content .member-info-window h2 {
    margin-top: 0;
}
.leaflet-popup-content .member-info-window .close {
    display: none; /* Eigener Close-Pseudo-Button raus, Leaflet hat seinen eigenen */
}

/* Brand-grüne Links im Popup (vorher Browser-Blau) */
.leaflet-popup-content .member-info-window a {
    color: var(--color-success);
    text-decoration: underline;
}
.leaflet-popup-content .member-info-window a:hover {
    text-decoration: none;
}

/* Custom-Marker (lvwnrw-marker) — divIcon hat default Hintergrund/Border, weg damit */
.leaflet-div-icon.lvwnrw-marker,
.lvwnrw-marker {
    background: transparent;
    border: none;
}

/* Back-to-Top: war zuvor <div>, ist jetzt <button> (WCAG). Browser-Default-
   Border/Outline wegnehmen, aber das Theme-eigene grüne Background-Styling
   (kommt aus docs.css #back_to_top) NICHT überschreiben. */
button#back_to_top {
    border: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

/* Mobile-Menu-Toggle: war <div>, jetzt <button> — gleicher Reset */
button.m-menu {
    background: transparent;
    border: 0;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

/* <main> Landmark (WCAG): block-display, kein Margin/Padding,
   damit das absolut positionierte .header keinen ungewollten Abstand zur main-section erzeugt. */
main#main-content {
    display: block;
    margin: 0;
    padding: 0;
}
main#main-content:focus,
#main-content:focus {
    outline: none;
}

/* Heading-Tag-Wechsel SEO (26.04.2026):
   Slider-Banner (.banner-caption) hat jetzt <h1> (erster Slide) statt <h2>,
   Topics-Boxen (.topic-info) <h2> statt <h3>. Style-Spiegelung der alten Tags. */
.banner-caption h1,
.page_inner_wrapper .banner-caption h1 {
    font-family: 'latomedium', 'Lato', sans-serif;
    font-size: 32px;
    color: #ffffff;
    margin: 0 0 10px;
    padding: 0;
    line-height: 1.2;
}
.topic-info h2,
.page_inner_wrapper .topic-info h2 {
    font-family: 'latomedium', 'Lato', sans-serif;
    margin: 0;
    color: #009954;
    position: relative;
    padding: 0 0 10px;
    font-size: 26px;
}

/* ============================================================
 * Accessibility — WCAG Quick Wins (26.04.2026)
 * ============================================================ */

/* Visually hidden für Screenreader (Standard-WP-Klasse, hart gehärtet gegen Theme-CSS) */
body .screen-reader-text,
.screen-reader-text {
    border: 0 !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    -webkit-clip-path: inset(50%) !important;
            clip-path: inset(50%) !important;
    height: 1px !important;
    width: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    white-space: nowrap !important;
    word-wrap: normal !important;
}

/* Skip-Link: Inline-Style im HTML hält ihn versteckt (position:absolute, top:-100px).
   Bei :focus überschreibt dieser Block die Inline-Styles via !important und blendet
   ihn als grün gerahmte Pille oben links ein. */
body a.skip-link:focus,
a.skip-link:focus {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    overflow: visible !important;
    z-index: 100000 !important;
    background-color: var(--color-bg) !important;
    color: var(--color-success) !important;
    border: 2px solid var(--color-success) !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    line-height: 1.4 !important;
    padding: 12px 18px !important;
    text-decoration: none !important;
    outline: none !important;
}

/* Reduced Motion: Animationen + Transitions deaktivieren für User mit Präferenz */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Generic
	- Normalize
	- Box sizing
# Base
	- Typography
	- Elements
	- Links
	- Forms
## Layouts
# Components
	- Navigation
	- Posts and pages
	- Comments
	- Widgets
	- Media
	- Captions
	- Galleries
# plugins
	- Jetpack infinite scroll
# Utilities
	- Accessibility
	- Alignments

--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Generic
--------------------------------------------------------------*/

/* Normalize
--------------------------------------------- */

/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

/* Document
	 ========================================================================== */

/**
 * 1. Correct the line height in all browsers.
 * 2. Prevent adjustments of font size after orientation changes in iOS.
 */
.spicewpsearchform{
    display: block;
    width: auto;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 1px;
    z-index: 9999;
    background: #fff;
    padding: 20px;
}
.spicewpsearchform span.screen-reader-text {
    display: none;
}
#spicewpsearchform input[type="text"] {
    width: 78%;
    height: auto;
    border: 1px solid #5ca2df;
    padding: 11px 12px;
    border-radius: 0px !important; 
    }
#spicewpsearchform input[type="submit"] {
    line-height: 1;
    padding: 14px 20px;
    border-radius: 0px;
    height: auto;
    font-size: 15px;
    display: inline-block;
    border: 1px solid #5ca2df;
}
#spicewpsearchform:before {
    border-color: transparent transparent #d05353;
    border-style: solid;
    border-width: 0.5em;
    content: "";
    display: block;
    position: absolute;
    right: 22px;
    top: -20px;
    z-index: 10;
}

/**Css for image search icon**/
.spicewpsearch_icon {
   background-image: url('../../../wp-content/themes/lvwnrw/images/search-icon.png');
   background-repeat: no-repeat;
   padding: 0 0 0 36px;
   background-position: 5px center;
   background-color: transparent;
   background-size: 18px 18px;
       
}
.member-info-window {
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    position: absolute;
    right: 0;
    top: 50%;
    width: 380px;
    transform: translateY(-50%);
    background-color: #fff;
    padding: 20px 35px 20px 20px;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.member-info-window .close {
    display: inline-block;
    position: absolute;
    top: 10px;
    right: 10px;
    transform: rotate(45deg);
    font-size: 30px;
    cursor: pointer;
}

.member-info-window h2 {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 16px;
}

.member-info-window p {
    font-weight: 400;
    font-size: 16px;
}

.member-info-window a,
.member-info-window a:visited {
    color: #009933;
    text-decoration: none;
}
.next-prev-topics {
    float: left;
    width: 100%;
}
.footer {
    float: left;
    width: 100%;
}
/*.page_inner_wrapper {
    float: left;
    width: 100%;
    margin: 50px 0 30px;
}*/

 .page_inner_wrapper hr {
        clear: both !important;
    } 