/* ==========================================================
   SPERKENWANDERUNG – FRONTEND-CSS
   PixelwebDesign
   Responsive über auto-fill/auto-fit, clamp() und calc()
   (Media Queries nur für Sponsoren-Abstände, Abschnitt 11b,
   und reduzierte Bewegung, Abschnitt 14)
   ========================================================== */


/* ----------------------------------------------------------
   0. GEMEINSAME WERTE
   Hier lassen sich die Größen zentral anpassen.
   Schema: clamp(MIN, fließender Wert, MAX)
   ---------------------------------------------------------- */

.wsp-sw-list,
.wsp-sw-single {
    --wsp-col-min: 320px;                          /* Mindestbreite einer Spalte, darunter wird einspaltig */
    --wsp-gap: clamp(20px, 1.2vw + 14px, 28px);    /* Abstand zwischen Spalten */
    --wsp-space: clamp(24px, 1vw + 16px, 30px);    /* Abstand zwischen Abschnitten */
    --wsp-pad: clamp(16px, 0.8vw + 10px, 22px);    /* Innenabstand von Boxen */
    --wsp-cols: repeat(
        auto-fill,
        minmax(
            min(100%, max(var(--wsp-col-min), calc((100% - var(--wsp-gap)) / 2 - 1px))),
            1fr
        )
    );
}


/* ----------------------------------------------------------
   1. VERANSTALTUNGSÜBERSICHT
   Maximal 2 Spalten, bei wenig Platz automatisch 1 Spalte
   ---------------------------------------------------------- */

.wsp-sw-list {
    display: grid;
    grid-template-columns: var(--wsp-cols);
    gap: var(--wsp-gap);
    margin: 0;
}


/* ----------------------------------------------------------
   2. VERANSTALTUNGSKARTEN
   ---------------------------------------------------------- */

.wsp-sw-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e4e8e3;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(25, 45, 25, 0.06);
}


/* ----------------------------------------------------------
   3. FLYER IN DER ÜBERSICHT
   ---------------------------------------------------------- */

.wsp-sw-card-flyer {
    display: block;
    padding: clamp(12px, 0.5vw + 10px, 16px);
    background: #f7f8f5;
    text-align: center;
}

.wsp-sw-card-flyer img {
    display: block;
    width: 100%;
    max-height: clamp(360px, 18vw + 290px, 440px);
    object-fit: contain;
    margin: 0 auto;
}


/* ----------------------------------------------------------
   4. INHALT DER VERANSTALTUNGSKARTEN
   ---------------------------------------------------------- */

.wsp-sw-card-content {
    padding: clamp(18px, 0.8vw + 12px, 22px) clamp(18px, 1vw + 12px, 24px) clamp(20px, 1vw + 14px, 26px);
}


/* Veranstaltungstitel */

.wsp-sw-card-title {
    margin: 0 0 16px;
    font-size: clamp(20px, 1vw + 12px, 27px)!important;
    line-height: 1.25;
}

.wsp-sw-card-title a {
    color: inherit;
    text-decoration: none;
}

.wsp-sw-card-title a:hover {
    color: #39784c;
}


/* Veranstaltungsdaten */

.wsp-sw-meta {
    margin: 0 0 8px;
    line-height: 1.55;
}


/* Button zur Detailseite */

.wsp-sw-button {
    display: inline-block;
    margin-top: 18px;
    padding: 11px 18px;
    border-radius: 6px;
    background: #39784c;
    color: #fff !important;
    text-decoration: none !important;
    transition:
        background-color 0.25s ease,
        transform 0.25s ease;
}

.wsp-sw-button:hover,
.wsp-sw-button:focus {
    background: #285d39;
    color: #fff !important;
    transform: translateY(-1px);
}


/* ----------------------------------------------------------
   5. EINZELANSICHT – GRUNDLAYOUT
   Flyer + Daten stehen nebeneinander, bei wenig Platz
   automatisch untereinander. Abschnitte laufen über die
   volle Breite.
   ---------------------------------------------------------- */

.elementor-widget-shortcode h1.wsp-sw-title {
    font-family: "Young serif", serif !important;
    font-size: clamp(26px, 2vw + 14px, 40px) !important;
    color: #254b16;
    margin-bottom: clamp(24px, 2vw + 12px, 40px);
    text-align: center;
}
body.single-sperkenwanderung .site-main {
    margin-top: 70px;
    margin-bottom: 90px;
}
article.wsp-sw-single ul li {
    margin-bottom: 8px;
}
.wsp-sw-single {
    display: grid;
    grid-template-columns: var(--wsp-cols);
    column-gap: var(--wsp-gap);
    row-gap: 0;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    align-items: start;
    box-sizing: border-box;
}


/* Alle Elemente innerhalb der Detailseite
   berücksichtigen die verfügbare Breite. */

.wsp-sw-single *,
.wsp-sw-single *::before,
.wsp-sw-single *::after {
    box-sizing: border-box;
}


/* ----------------------------------------------------------
   6. FLYER IN DER DETAILANSICHT
   ---------------------------------------------------------- */

.wsp-sw-single-flyer {
    justify-self: start;
    display: block;
    width: fit-content;
    max-width: 100%;
    min-width: 0;
    margin: clamp(10px, 1vw + 4px, 20px) 0;
    padding: clamp(10px, 0.3vw + 9px, 12px);
    border-radius: 10px;
    background: #f7f8f5;
    text-align: center;
    cursor: zoom-in;
}

.wsp-sw-single-flyer img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: clamp(400px, 14vw + 340px, 540px);
    height: auto;
    object-fit: contain;
    margin: 0;
}


/* ----------------------------------------------------------
   7. VERANSTALTUNGSDATEN NEBEN DEM FLYER
   ---------------------------------------------------------- */

.wsp-sw-details {
    width: 100%;
    min-width: 0;
    height: fit-content;
    margin: var(--wsp-space) 0 0;
    padding: var(--wsp-pad);
    border-radius: 0 8px 8px 0;
	background: #f3f4ec;
	box-shadow: 0 4px 10px #e5e5e5;
	transition: transform 0.5s ease;
}
.wsp-sw-details:hover {
    transform: scale(1.02);
}



.wsp-sw-details .wsp-sw-meta {
    margin: 0 0 10px;
    line-height: 1.7;
    font-size: 1.1em;
}

.wsp-sw-details .wsp-sw-meta:last-child {
    margin-bottom: 0;
}


/* ----------------------------------------------------------
   8. BESCHREIBUNG – VOLLE BREITE
   ---------------------------------------------------------- */

.wsp-sw-description {
    grid-column: 1 / -1;
    width: 100%;
}

.wsp-sw-description p {
    font-size: 1.1em;
    
}

.wsp-sw-description p:last-child {
    margin-bottom: 0;
}

/* Nur Überschriften innerhalb des Beschreibungstextes */
section.wsp-sw-description > div h1,
section.wsp-sw-description > div h2,
section.wsp-sw-description > div h3,
section.wsp-sw-description > div h4 {

	font-weight: 300!important;



}

section.wsp-sw-section.wsp-sw-description {
    padding: clamp(20px, 2.5vw, 36px);
    border-left: 3px solid #254b16;
}
.wsp-sw-single > .wsp-sw-description > h2 {
    display:none;
}
/* ----------------------------------------------------------
   9. ABSCHNITTE UND ZWISCHENÜBERSCHRIFTEN
   ---------------------------------------------------------- */

.wsp-sw-section {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    margin: var(--wsp-space) 0 0;
    background: #f3f4ec;
    padding: clamp(10px, 7.143px + 0.893vw, 20px);
    border-top: 1px solid #e3e8e1;
	box-shadow: 0 4px 10px #e5e5e5;
	transition: transform 0.5s ease;
}
.wsp-sw-section:hover {
    transform: scale(1.01);
}


/* Abschnittsüberschriften */

.wsp-sw-section h2,
.wsp-sw-details h2 {
    margin: 0 0 14px;
    font-size: clamp(20px, 0.8vw + 14px, 28px);
    line-height: 1.3;
    color: #254b16 !important;
    font-family: "Young serif", serif !important;
}


/* Inhalt der Abschnitte */

.wsp-sw-section > div {
    overflow-wrap: anywhere;
	    line-height: 1.6;
}


/* ----------------------------------------------------------
   10. RECHTE SPALTE NEBEN DEM FLYER + STRECKENINFOS/DOKUMENTE
   Datum/Uhrzeit/Treffpunkt und darunter die Startgebühr stehen
   gemeinsam neben dem Flyer. Streckeninformationen und Dokumente
   laufen als Paar nebeneinander und stapeln sich bei wenig Platz
   von selbst.
   ---------------------------------------------------------- */

.wsp-sw-aside {
    min-width: 0;
    align-self: start;
}

.wsp-sw-single > .wsp-sw-route:has(+ .wsp-sw-documents),
.wsp-sw-single > .wsp-sw-route + .wsp-sw-documents {
    grid-column: auto;
    align-self: start;
    margin-top: var(--wsp-space);
}


/* ----------------------------------------------------------
   11. PDF-DOKUMENTE
   ---------------------------------------------------------- */

.wsp-sw-documents {
    grid-column: 1 / -1;
}

.wsp-sw-documents ul {
    margin: 0;
    padding-left: 1.3em;
}

.wsp-sw-documents li {
    margin: 0 0 10px;
}

.wsp-sw-documents a,
.wsp-sw-back a {
    text-underline-offset: 3px;
}

.wsp-sw-documents a:hover,
.wsp-sw-back a:hover {
    color: #285d39;
}


/* Zurück-Link */

.wsp-sw-back {
    grid-column: 1 / -1;
    margin-top: clamp(28px, 1vw + 22px, 36px);
}


/* ----------------------------------------------------------
   11b. SPONSOREN
   Logos als Raster in einheitlicher Größe, Firmenname darunter.
   Auf schmalen Bildschirmen automatisch 2 nebeneinander.
   ---------------------------------------------------------- */

.wsp-sw-sponsors {
    grid-column: 1 / -1;
    background: none;
    border: 0;
    box-shadow: none;
    margin-top: 70px;
    padding: 0;
}

.wsp-sw-sponsors-intro {
    margin: -3px 0 25px;
    color: #4f5d48;
    font-size: 1.3em;
    font-weight: 600;
}

section.wsp-sw-section.wsp-sw-sponsors h2 {
    font-size: 2.3em;
}

.wsp-sw-sponsors:hover {
    transform: none;
}

.wsp-sw-sponsor-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, clamp(120px, 12vw + 60px, 220px)), 1fr));
    gap: 15px;
    margin: 0;
    padding: 0;
    list-style: none;
}

article.wsp-sw-single .wsp-sw-sponsor-list li.wsp-sw-sponsor {
    margin: 0;
}

/* Leichte Vergrößerung beim Drüberfahren */
li.wsp-sw-sponsor {
    transition: transform 0.3s ease;
}

li.wsp-sw-sponsor:hover,
li.wsp-sw-sponsor:focus-within {
    transform: scale(1.04);
}

.wsp-sw-sponsor-link,
.wsp-sw-sponsor-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
    padding: 12px;
    border: 1px solid #e3e8e1;
    border-radius: 10px;
    background: #fff;
    color: #254b16;
    text-align: center;
    text-decoration: none !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    justify-content: space-between;
    text-transform: uppercase;
    box-shadow: -1px 1px 2px 1px #cecece;
}

/* Handy und kleiner (Elementor-Mobil-Breakpoint 767px) */
@media (max-width: 767px) {
    section.wsp-sw-section.wsp-sw-sponsors h2 {
        font-size: 1.9em;
    }

    .wsp-sw-sponsors-intro {
        font-size: 1.2em;
    }

    .wsp-sw-sponsor-list {
        gap: 8px;
    }

    .wsp-sw-sponsor-link,
    .wsp-sw-sponsor-box {
        padding: 8px;
    }
}

.wsp-sw-sponsor-link:hover,
.wsp-sw-sponsor-link:focus-visible {
    border-color: #39784c;
    box-shadow: 0 4px 12px rgba(37, 75, 22, 0.12);
    color: #254b16;
}

.wsp-sw-sponsor-link:focus-visible {
    outline: 2px solid #39784c;
    outline-offset: 2px;
}

.wsp-sw-sponsor-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: clamp(70px, 3vw + 56px, 100px);
}

.wsp-sw-sponsor-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.wsp-sw-sponsor-name {
    line-height: 1.35;
    overflow-wrap: anywhere;
    border-top: 1px solid #666;
    padding: 10px 8px 0 8px;
    border-radius: 3px;
    align-self: stretch;   /* volle Breite, funktioniert in allen Browsern */
    width: stretch;
    color: #254b16;
    font-weight: 700;
}

/* Sponsor ohne Logo: Firmenname groß an der Stelle des Logos */
.wsp-sw-sponsor--text .wsp-sw-sponsor-link,
.wsp-sw-sponsor--text .wsp-sw-sponsor-box {
    justify-content: center;
}

.wsp-sw-sponsor-textlogo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: clamp(70px, 3vw + 56px, 100px);
    color: #254b16;
    font-size: 1.15em;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

/* Hinweis für Screenreader, sichtbar ausgeblendet */
.wsp-sw-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ----------------------------------------------------------
   12. LEERE VERANSTALTUNGSÜBERSICHT
   ---------------------------------------------------------- */

.wsp-sw-empty {
    padding: 18px;

    border: 1px solid #e3e8e1;
    border-radius: 8px;

    background: #f7f8f5;
}


/* ----------------------------------------------------------
   13. FLYER-LIGHTBOX
   ---------------------------------------------------------- */

.wsp-sw-lightbox {
    position: fixed;
    z-index: 999999;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: clamp(12px, 1.5vw + 6px, 24px);
    background: rgba(0, 0, 0, 0.88);

    cursor: zoom-out;
}

.wsp-sw-lightbox img {
    display: block;

    max-width: 96vw;
    max-height: 92vh;

    width: auto;
    height: auto;

    object-fit: contain;

    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}

.wsp-sw-lightbox-close {
    position: absolute;
    top: clamp(10px, 0.2vw + 9px, 12px);
    right: clamp(14px, 0.4vw + 12px, 18px);

    border: 0;
    background: transparent;
    color: #fff;

    font: inherit;
    font-size: clamp(34px, 0.5vw + 31px, 38px);
    line-height: 1;

    cursor: pointer;
}


/* ----------------------------------------------------------
   14. REDUZIERTE BEWEGUNG
   Wer im Betriebssystem "Bewegung reduzieren" eingestellt
   hat, bekommt keine Zoom- und Schiebe-Effekte.
   ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .wsp-sw-details,
    .wsp-sw-section,
    .wsp-sw-button,
    .wsp-sw-sponsor-link,
    li.wsp-sw-sponsor {
        transition: none;
    }

    .wsp-sw-details:hover,
    .wsp-sw-section:hover,
    .wsp-sw-button:hover,
    .wsp-sw-button:focus,
    li.wsp-sw-sponsor:hover,
    li.wsp-sw-sponsor:focus-within {
        transform: none;
    }
}