.mp-volunteer-carousel {
    /* Alias sobre el kit de Elementor: cambiar la paleta en Ajustes del sitio
       se refleja aquí. Todas llevan fallback porque los colores personalizados
       (los de nombre hasheado) desaparecen si se borran desde el panel. */
    --mp-vc-primary: var(--e-global-color-primary, #02AC1A);
    --mp-vc-secondary: var(--e-global-color-secondary, #70B92F);
    --mp-vc-accent: var(--e-global-color-accent, #61CE70);
    --mp-vc-ink: var(--e-global-color-afe03d4, #1C1B1A);
    --mp-vc-muted: var(--e-global-color-e5dffa0, #969898);
    --mp-vc-soft: var(--e-global-color-f21e24e, #BFC0C1);
    --mp-vc-white: var(--e-global-color-9163093, #FFFFFF);
    --mp-vc-font-display: var(--e-global-typography-primary-font-family, "Spline Sans"), system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mp-vc-font-body: var(--e-global-typography-text-font-family, "Inter"), system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    position: relative;
    overflow: hidden;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border: 1px solid rgba(191, 192, 193, 0.12);
    border-radius: 5px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.30);
    color: var(--mp-vc-white);
    font-family: var(--mp-vc-font-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.mp-volunteer-carousel,
.mp-volunteer-carousel *,
.mp-volunteer-carousel *::before,
.mp-volunteer-carousel *::after {
    box-sizing: border-box;
}

.mp-volunteer-carousel button,
.mp-volunteer-carousel a {
    font: inherit;
}

/* Nav oculta por ahora. Para reactivarla: display: grid. */
.mp-volunteer-carousel__nav {
    display: none;
    grid-template-columns: repeat(var(--mp-vc-total, 3), minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid rgba(191, 192, 193, 0.10);
    background: rgba(24, 24, 24, 0.74);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.mp-volunteer-carousel .mp-volunteer-carousel__tab {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: center;
    min-width: 0;
    min-height: 58px;
    padding: 12px 16px;
    appearance: none;
    border: 1px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--mp-vc-muted);
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition:
        color 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.mp-volunteer-carousel .mp-volunteer-carousel__tab:hover {
    background: rgba(255, 255, 255, 0.035);
    color: var(--mp-vc-white);
}

.mp-volunteer-carousel .mp-volunteer-carousel__tab[aria-selected="true"] {
    border-color: rgba(97, 206, 112, 0.28);
    background: linear-gradient(135deg, rgba(2, 172, 26, 0.14), rgba(112, 185, 47, 0.06));
    box-shadow:
        inset 0 0 0 1px rgba(97, 206, 112, 0.05),
        inset 0 0 24px rgba(2, 172, 26, 0.045);
    color: var(--mp-vc-white);
}

.mp-volunteer-carousel__tab > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mp-volunteer-carousel__nav-index {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(191, 192, 193, 0.16);
    border-radius: 0;
    color: var(--mp-vc-soft);
    font-size: 11px;
}

.mp-volunteer-carousel__tab[aria-selected="true"] .mp-volunteer-carousel__nav-index {
    border-color: rgba(97, 206, 112, 0.46);
    background: var(--mp-vc-primary);
    color: var(--mp-vc-white);
}

.mp-volunteer-carousel__viewport {
    overflow: hidden;
    /* Deja el scroll vertical al navegador y reserva el gesto horizontal al carrusel. */
    touch-action: pan-y;
}

.mp-volunteer-carousel.is-draggable .mp-volunteer-carousel__viewport {
    cursor: grab;
}

.mp-volunteer-carousel.is-dragging .mp-volunteer-carousel__viewport {
    cursor: grabbing;
}

.mp-volunteer-carousel__track {
    display: flex;
    width: 100%;
    transform: translateX(0%);
    transition: transform 0.68s cubic-bezier(0.2, 0.76, 0.25, 1);
    will-change: transform;
}

.mp-volunteer-carousel.is-dragging .mp-volunteer-carousel__track {
    transition: none;
}

.mp-volunteer-carousel.is-dragging .mp-volunteer-carousel__slide {
    user-select: none;
}

.mp-volunteer-carousel__image,
.mp-volunteer-carousel__icon-image {
    -webkit-user-drag: none;
}

.mp-volunteer-carousel__slide {
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    min-height: 0;
    overflow: hidden;
}

.mp-volunteer-carousel__visual {
    position: relative;
    align-self: stretch;
    overflow: hidden;
    min-height: 420px;
    background: #222222;
}

.mp-volunteer-carousel__visual::after {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(24, 24, 24, 0.06), rgba(24, 24, 24, 0.12)),
        linear-gradient(0deg, rgba(24, 24, 24, 0.74) 0%, transparent 48%);
    content: "";
    pointer-events: none;
}

.mp-volunteer-carousel .mp-volunteer-carousel__image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(0.90) contrast(1.04);
    transform: scale(1.015);
}

.mp-volunteer-carousel__badge {
    position: absolute;
    z-index: 2;
    bottom: 26px;
    left: 28px;
    display: inline-flex;
    gap: 10px;
    align-items: center;
    max-width: calc(100% - 56px);
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0;
    background: rgba(24, 24, 24, 0.60);
    color: var(--mp-vc-white);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.02em;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mp-volunteer-carousel__badge::before {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 0;
    background: var(--mp-vc-accent);
    box-shadow: 0 0 0 6px rgba(97, 206, 112, 0.14);
    content: "";
}

.mp-volunteer-carousel__content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: clamp(38px, 5vw, 70px);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.02), transparent 44%),
        var(--mp-vc-ink);
}

.mp-volunteer-carousel__content::before {
    position: absolute;
    top: 24px;
    right: 34px;
    color: rgba(255, 255, 255, 0.028);
    content: attr(data-number);
    font-family: var(--mp-vc-font-display);
    font-size: clamp(72px, 8vw, 122px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.08em;
    pointer-events: none;
}

/* Número en outline: relleno transparente + contorno.
   Bajo @supports para que los navegadores sin text-stroke conserven el relleno. */
@supports (-webkit-text-stroke: 1px white) {
    .mp-volunteer-carousel__content::before {
        color: transparent;
        -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.12);
    }
}

.mp-volunteer-carousel__icon {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    margin-bottom: 28px;
    border-radius: 0;
    background: var(--mp-vc-primary);
    box-shadow: 0 18px 42px rgba(2, 172, 26, 0.20);
    color: var(--mp-vc-white);
}

.mp-volunteer-carousel__icon .dashicons {
    width: 31px;
    height: 31px;
    color: currentColor;
    font-size: 31px;
    line-height: 31px;
}

.mp-volunteer-carousel__icon-image {
    display: block;
    width: 31px;
    height: 31px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.mp-volunteer-carousel__kicker {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    color: var(--mp-vc-accent);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.mp-volunteer-carousel__slide-title {
    position: relative;
    z-index: 1;
    margin: 0 0 20px;
    color: var(--mp-vc-white);
    font-family: var(--mp-vc-font-display);
    font-size: clamp(27px, 3vw, 42px);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.mp-volunteer-carousel__description {
    position: relative;
    z-index: 1;
    max-width: 540px;
    color: var(--mp-vc-soft);
    font-size: 16px;
    line-height: 1.72;
    overflow-wrap: anywhere;
}

.mp-volunteer-carousel__description > :first-child,
.mp-volunteer-carousel__micro-copy > :first-child {
    margin-top: 0;
}

.mp-volunteer-carousel__description > :last-child,
.mp-volunteer-carousel__micro-copy > :last-child {
    margin-bottom: 0;
}

.mp-volunteer-carousel__description p {
    margin: 0 0 0.9em;
    color: inherit;
    font: inherit;
}

.mp-volunteer-carousel__description a {
    color: var(--mp-vc-accent);
}

.mp-volunteer-carousel__content-footer {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    align-items: center;
    margin-top: 34px;
}

.mp-volunteer-carousel .mp-volunteer-carousel__cta {
    display: inline-flex;
    gap: 11px;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 0;
    background: linear-gradient(135deg, var(--mp-vc-primary), #039918);
    box-shadow: 0 16px 36px rgba(2, 172, 26, 0.18);
    color: var(--mp-vc-white);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        filter 0.22s ease;
}

.mp-volunteer-carousel .mp-volunteer-carousel__cta:hover {
    background: linear-gradient(135deg, var(--mp-vc-primary), #039918);
    box-shadow: 0 20px 44px rgba(2, 172, 26, 0.27);
    color: var(--mp-vc-white);
    filter: brightness(1.04);
    transform: translateY(-2px);
}

.mp-volunteer-carousel__cta svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.mp-volunteer-carousel__micro-copy {
    max-width: 190px;
    color: var(--mp-vc-muted);
    font-size: 12px;
    line-height: 1.5;
}

.mp-volunteer-carousel__micro-copy p {
    margin: 0 0 0.5em;
    color: inherit;
    font: inherit;
}

.mp-volunteer-carousel__bottom-bar {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-top: 1px solid rgba(191, 192, 193, 0.08);
    background: #151514;
}

.mp-volunteer-carousel__progress {
    flex: 1;
    overflow: hidden;
    min-width: 0;
    max-width: 540px;
    height: 3px;
    border-radius: 0;
    background: rgba(191, 192, 193, 0.12);
}

.mp-volunteer-carousel__progress-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--mp-vc-primary), var(--mp-vc-secondary));
    transform-origin: left;
    will-change: width;
}

.mp-volunteer-carousel__controls {
    display: flex;
    gap: 9px;
    align-items: center;
}

.mp-volunteer-carousel__counter {
    margin-right: 6px;
    color: var(--mp-vc-muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.mp-volunteer-carousel__counter strong {
    color: var(--mp-vc-soft);
}

.mp-volunteer-carousel .mp-volunteer-carousel__control {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    appearance: none;
    border: 1px solid rgba(191, 192, 193, 0.14);
    border-radius: 0;
    background: #20201f;
    color: var(--mp-vc-white);
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.mp-volunteer-carousel .mp-volunteer-carousel__control:hover:not(:disabled) {
    border-color: rgba(97, 206, 112, 0.35);
    background: #292a28;
    transform: translateY(-1px);
}

.mp-volunteer-carousel .mp-volunteer-carousel__control:focus,
.mp-volunteer-carousel .mp-volunteer-carousel__control:focus-visible {
    border-color: var(--mp-vc-accent);
    outline: 2px solid var(--mp-vc-accent);
    outline-offset: 3px;
    background: #292a28;
    box-shadow: 0 0 0 3px rgba(97, 206, 112, 0.18);
    color: var(--mp-vc-white);
}

.mp-volunteer-carousel .mp-volunteer-carousel__control:disabled {
    opacity: 0.42;
    cursor: default;
}

.mp-volunteer-carousel__control svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.mp-volunteer-carousel .mp-volunteer-carousel__tab:focus-visible,
.mp-volunteer-carousel .mp-volunteer-carousel__cta:focus-visible,
.mp-volunteer-carousel .mp-volunteer-carousel__control:focus-visible {
    outline: 2px solid var(--mp-vc-accent);
    outline-offset: 3px;
}

@media (max-width: 920px) {
    .mp-volunteer-carousel__slide {
        grid-template-columns: minmax(0, 1fr);
    }

    .mp-volunteer-carousel__visual {
        height: 300px;
        min-height: 0;
    }

    .mp-volunteer-carousel__content {
        min-height: 450px;
    }

    .mp-volunteer-carousel__tab {
        justify-content: center;
        text-align: center;
    }

    .mp-volunteer-carousel__nav-index {
        display: none;
    }
}

@media (max-width: 640px) {
    .mp-volunteer-carousel {
        border-radius: 0;
    }

    .mp-volunteer-carousel__nav {
        display: none;
    }

    .mp-volunteer-carousel__visual {
        height: 220px;
        min-height: 0;
    }

    .mp-volunteer-carousel__badge {
        bottom: 18px;
        left: 18px;
        max-width: calc(100% - 36px);
    }

    .mp-volunteer-carousel__content {
        min-height: 440px;
        padding: 34px 24px 38px;
    }

    .mp-volunteer-carousel__content::before {
        right: 22px;
    }

    .mp-volunteer-carousel__icon {
        width: 52px;
        height: 52px;
        margin-bottom: 22px;
    }

    .mp-volunteer-carousel__icon .dashicons {
        width: 25px;
        height: 25px;
        font-size: 25px;
        line-height: 25px;
    }

    .mp-volunteer-carousel__icon-image {
        width: 25px;
        height: 25px;
    }

    .mp-volunteer-carousel__content-footer {
        align-items: stretch;
    }

    .mp-volunteer-carousel__cta {
        width: 100%;
    }

    .mp-volunteer-carousel__micro-copy {
        max-width: none;
        width: 100%;
    }

    .mp-volunteer-carousel__bottom-bar {
        padding: 14px;
    }

    .mp-volunteer-carousel__progress {
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mp-volunteer-carousel__track,
    .mp-volunteer-carousel__tab,
    .mp-volunteer-carousel__cta,
    .mp-volunteer-carousel__control {
        transition: none !important;
    }
}
