/* ============================================================ */
/* LRA Theme Supplement v1.3.0 — Audit-Fixes (GLM-5.2 Design) */
/* Stand: 26.07.2026 08:30                                    */
/* ============================================================ */

/* ----------- 1. Counter-Column: Counter + Label als 1 Karte ----------- */
/* Page 8 hat 4 Counter-Spalten. In jeder Spalte folgt nach dem   */
/* <div class="lra-counter"> ein <p> mit der Beschriftung. Wir     */
/* verbinden beide visuell zu einer Karte.                         */

.wp-block-column:has(> .lra-counter--kachel) {
    display: flex;
    flex-direction: column;
    /* Container-Column: kein Hintergrund, nur die Kachel zeichnet */
}

.wp-block-column:has(> .lra-counter--kachel) > .lra-counter--kachel {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 1px solid rgba(32, 72, 115, 0.06);
    margin-bottom: 0;
    padding-bottom: 1rem;
    flex: 0 0 auto;
}

/* Das <p> mit der Beschriftung — direkt nach dem Counter-Block */
.wp-block-column:has(> .lra-counter--kachel) > p,
.wp-block-column:has(> .lra-counter--kachel) > .wp-block-paragraph {
    margin-top: 0 !important;
    margin-bottom: 0;
    padding: 0.75rem 1.25rem 1rem;
    background: #ffffff;
    border: 1px solid rgba(32, 72, 115, 0.08);
    border-top: none;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-dark, #1a202c);
    line-height: 1.35;
    flex: 0 0 auto;
}

/* ----------- 2. Subtiler Gradient auf Counter-Kachel (Stripe-Look) ----------- */

.lra-counter--kachel {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

/* ----------- 3. Top-Accent-Bar 4px → 5px + erweiterter Gradient ----------- */

.lra-counter--kachel::before {
    height: 5px !important;
    background: linear-gradient(90deg,
        var(--accent, #204873) 0%,
        #5F98BB 60%,
        #E67E22 100%) !important;
}

/* ----------- 4. Mobile-Padding konsistent auf 20px (Apple-Sweet-Spot) ----------- */

@media (max-width: 768px) {
    .page-entry-content,
    .post-entry-content,
    .entry-content {
        padding-left: 20px;
        padding-right: 20px;
        font-size: 16px;
    }
    
    .wp-block-cover__inner-container,
    .wp-block-group__inner-container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .lra-fade-up,
    .wp-block-group.lra-fade-up {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .wp-block-column:has(> .lra-counter--kachel) > p,
    .wp-block-column:has(> .lra-counter--kachel) > .wp-block-paragraph {
        font-size: 14.5px;
        padding: 0.5rem 1rem 0.85rem;
    }
    
    .lra-counter--kachel {
        padding: 1.5rem 1.25rem 1.25rem;
    }
    
    .lra-counter--kachel .lra-counter-value {
        font-size: 2.5rem;
    }
}

/* ----------- 5. Cover-Hero auf Mobile nicht so hoch ----------- */

@media (max-width: 768px) {
    .wp-block-cover,
    .wp-block-cover-image {
        min-height: 380px !important;
        padding-top: 48px !important;
        padding-bottom: 48px !important;
    }
    
    .wp-block-cover[style*="560"],
    .wp-block-cover[style*="600"] {
        min-height: 360px !important;
    }
}

/* ----------- 6. Counter-Value Typografie ----------- */

.lra-counter--kachel .lra-counter-value {
    font-family: var(--font-family, 'Tahoma', sans-serif);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent, #204873);
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
    display: block;
}

.lra-counter--kachel::after {
    /* Subtle baseline */
    content: "";
    display: block;
    width: 32px;
    height: 2px;
    background: rgba(32, 72, 115, 0.15);
    border-radius: 2px;
    margin: 0.5rem auto 0;
}

/* ----------- 7. Scroll-Reveal Klassen-System (DAU-tauglich) ----------- */
/* DAU setzt im Gutenberg-Editor Block-Klasse .lra-fade-up oder .lra-stagger-children. */
/* JS-IntersectionObserver fuegt .lra-in-view hinzu, sobald Element im Viewport. */

.lra-fade-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform;
}

.lra-fade-up.lra-in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger: Kinder erscheinen nacheinander (max 12, danach linear) */
.lra-stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.lra-stagger-children.lra-in-view > *:nth-child(1)  { transition-delay: 0.00s; }
.lra-stagger-children.lra-in-view > *:nth-child(2)  { transition-delay: 0.08s; }
.lra-stagger-children.lra-in-view > *:nth-child(3)  { transition-delay: 0.16s; }
.lra-stagger-children.lra-in-view > *:nth-child(4)  { transition-delay: 0.24s; }
.lra-stagger-children.lra-in-view > *:nth-child(5)  { transition-delay: 0.32s; }
.lra-stagger-children.lra-in-view > *:nth-child(6)  { transition-delay: 0.40s; }
.lra-stagger-children.lra-in-view > *:nth-child(7)  { transition-delay: 0.48s; }
.lra-stagger-children.lra-in-view > *:nth-child(8)  { transition-delay: 0.56s; }
.lra-stagger-children.lra-in-view > *:nth-child(9)  { transition-delay: 0.64s; }
.lra-stagger-children.lra-in-view > *:nth-child(10) { transition-delay: 0.72s; }
.lra-stagger-children.lra-in-view > *:nth-child(11) { transition-delay: 0.80s; }
.lra-stagger-children.lra-in-view > *:nth-child(12) { transition-delay: 0.88s; }
.lra-stagger-children.lra-in-view > * {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced Motion: User-Einstellung respektieren */
@media (prefers-reduced-motion: reduce) {
    .lra-fade-up,
    .lra-stagger-children > * {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
