/* Colors/fonts copied verbatim from helferdienste-plugin's
   public/css/frontend.css (.gwh-event-card / .gwh-date-badge), which are
   themselves already matched to fv-bauerbach.de's real palette — no new
   colors/fonts invented here, per the loose-coupling design
   (docs/superpowers/specs/2026-08-21-aktuelles-plugin-design.md,
   "Visuelles Design"). This is a standalone copy, not an import — this
   plugin must render correctly even if helferdienste-plugin is inactive. */

.fvb-slider {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 3rem;
}

.fvb-slider__heading {
    font-family: "Poppins", ui-sans-serif, sans-serif;
    font-weight: 700;
    color: #191919;
    text-align: center;
    margin: 0 0 1.5rem;
}

.fvb-slider__stage {
    position: relative;
}

.fvb-slider__viewport {
    overflow: hidden;
}

.fvb-slider__track {
    display: flex;
    transition: transform 0.45s ease;
}

/* --fvb-visible is set inline by frontend.js per breakpoint (3/2/1); this
   is the single source of truth both JS's translateX math and this
   flex-basis agree on, so a slide is always exactly 100% / visible-count
   wide regardless of viewport width. */
.fvb-slider__slide {
    flex: 0 0 calc(100% / var(--fvb-visible, 3));
    box-sizing: border-box;
    padding: 0 0.6rem;
}

.fvb-slider__card {
    height: 100%;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-left: 5px solid #e81717;
    border-radius: 3px;
    padding: 1.4rem 1.5rem;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.fvb-date-badge {
    position: relative;
    align-self: flex-start;
    background: linear-gradient(155deg, #e81717, #b81212);
    color: #fff;
    width: 4.6rem;
    padding: 0.55rem 0.3rem 0.6rem;
    text-align: center;
    border-radius: 4px;
    margin-bottom: 0.9rem;
    clip-path: polygon(0 6px, 6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px));
}

.fvb-date-badge--range {
    width: auto;
    min-width: 6.6rem;
    padding-inline: 0.7rem;
}

.fvb-date-badge__day {
    display: block;
    font-family: "Poppins", ui-sans-serif, sans-serif;
    font-weight: 700;
    font-size: 1.7rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.fvb-date-badge--range .fvb-date-badge__day {
    font-size: 1.45rem;
}

.fvb-date-badge__range-days {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.3rem;
}

.fvb-date-badge__range-dash {
    font-size: 1rem;
    opacity: 0.75;
}

.fvb-date-badge__month {
    display: block;
    font-family: "Poppins", ui-sans-serif, sans-serif;
    font-weight: 600;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    margin-top: 0.2rem;
    opacity: 0.92;
}

.fvb-slider__card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.9rem;
}

.fvb-slider__card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Event flyers are portrait and have no teaser competing for space (unlike
   posts) — cropping them into the posts' 16:9 landscape box lost most of
   the flyer. A taller box with object-fit:contain shows the whole flyer
   uncropped instead, confirmed live against several real flyers with
   different aspect ratios (~0.7:1 to ~0.93:1) — contain handles that
   variance without needing to match one exact ratio. */
.fvb-slider__card--event .fvb-slider__card-thumb {
    aspect-ratio: 3 / 4;
    background: #f4f4f4;
}

.fvb-slider__card--event .fvb-slider__card-thumb img {
    object-fit: contain;
}

.fvb-slider__card-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.fvb-slider__card-title {
    font-family: "Poppins", ui-sans-serif, sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
}

.fvb-slider__card-title a {
    color: #191919;
    text-decoration: none;
}

.fvb-slider__card-title a:hover {
    text-decoration: underline;
    text-decoration-color: #e81717;
    text-decoration-thickness: 2px;
}

.fvb-slider__card-teaser {
    font-family: "Lato", ui-sans-serif, sans-serif;
    color: #6e6e6e;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 0.9rem;
    flex: 1;
}

.fvb-slider__card-cta {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    font-family: "Poppins", ui-sans-serif, sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-decoration: none;
    color: #fff;
    background: #191919;
    padding: 0.5rem 0.9rem;
    border-radius: 3px;
    margin-top: auto;
}

.fvb-slider__card-cta:hover {
    background: #e81717;
    color: #fff;
}

/* !important throughout: fv-bauerbach.de's active theme (Hello Elementor)
   ships its own reset.css with a bare `button` rule that sets background,
   color, border, border-radius, padding, and display — confirmed live on
   production (2026-08-21) to win over this class-scoped rule for those
   specific properties even at boosted specificity (.fvb-slider__arrow.fvb-slider__arrow),
   which a plain button-element reset should never be able to do. Root cause
   wasn't pinned down further (no !important, no cascade layer, no matching
   higher-specificity rule found on the theme side) — !important sidesteps
   it reliably rather than chasing the exact mechanism. Scoped to just this
   one small, self-contained widget, so the collateral-override risk is low. */
.fvb-slider__arrow {
    position: absolute;
    top: 50% !important;
    transform: translateY(-50%);
    width: 2.6rem !important;
    height: 2.6rem !important;
    border-radius: 50% !important;
    border: none !important;
    background: #191919 !important;
    color: #fff !important;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

.fvb-slider__arrow:hover {
    background: #e81717 !important;
}

.fvb-slider__arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

.fvb-slider__arrow[hidden] {
    display: none;
}

/* -3rem, not 0: .fvb-slider__stage (the arrows' positioning ancestor,
   added so the arrows vertically center on the card row instead of
   .fvb-slider's full height including the heading) sits flush with
   .fvb-slider's own padded content edge, 3rem inset from .fvb-slider's
   outer edge. Offsetting by that same 3rem puts the arrows back in
   .fvb-slider's padding gutter instead of overlapping the card row —
   confirmed live on production (2026-08-21) that `left/right: 0` here
   overlapped ~2.6rem of the first/last card. */
.fvb-slider__arrow--prev {
    left: -3rem;
}

.fvb-slider__arrow--next {
    right: -3rem;
}

@media (max-width: 640px) {
    .fvb-slider {
        padding: 0 2.4rem;
    }

    .fvb-slider__arrow--prev {
        left: -2.4rem;
    }

    .fvb-slider__arrow--next {
        right: -2.4rem;
    }
}
