/* ── Brands Section — CSS Marquee Ticker ─────────────────────────────────── */

.block-preview-notice {
    padding: 20px;
    background: #f0f4f8;
    border-left: 4px solid #007cba;
    margin: 10px 0;
    border-radius: 4px;
}

/* Section wrapper */
.brands-section {
    padding: 56px 0;
    background: #f8f9fa;
    border-top: 1px solid #eeeeee;
    border-bottom: 1px solid #eeeeee;
}

.brands-marquee-header {
    text-align: center;
    margin-bottom: 36px;
}

.brands-section .section-title {
    color: #1a1a1a;
}

/* ── Marquee container ── */
.brands-marquee {
    position: relative;
    overflow: hidden;

    /* Fade edges — mismo truco que Apple y Stripe */
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
}

/* ── Track: flex sin wrap, ancho determinado por el contenido ── */
.brands-marquee__track {
    display: flex;
    width: max-content;
    gap: 20px;
    animation: brands-marquee var(--marquee-duration, 30s) linear infinite;
    will-change: transform;
}

/* Pausa al hover sobre el track o cualquier slide */
.brands-marquee:hover .brands-marquee__track {
    animation-play-state: paused;
}

/* ── Keyframes: mueve exactamente el 50% (= una copia completa) ── */
@keyframes brands-marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── Slide individual ── */
.brand-slide {
    flex: 0 0 auto;
}

/* ── Card ── */
.brand-card {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 88px;
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    text-decoration: none;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.brand-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
    border-color: #e53935;
}

/* Logo en escala de grises → color al hover */
.brand-card img {
    max-width: 110px;
    max-height: 52px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.65);
    transition: filter 0.3s ease;
}

.brand-card:hover img {
    filter: grayscale(0%) opacity(1);
}

/* Texto de fallback (cuando no hay logo) */
.brand-card__name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #6c757d;
    text-align: center;
    line-height: 1.2;
    transition: color 0.25s ease;
}

.brand-card:hover .brand-card__name {
    color: #e53935;
}

/* ── Accesibilidad: sin animación si el usuario lo prefiere ── */
@media (prefers-reduced-motion: reduce) {
    .brands-marquee__track {
        animation: none;
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
        gap: 16px;
        padding: 0 24px;
    }

    .brands-marquee {
        -webkit-mask-image: none;
        mask-image: none;
    }
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .brands-section {
        padding: 40px 0;
    }

    .brand-card {
        width: 130px;
        height: 76px;
        padding: 12px 16px;
    }

    .brand-card img {
        max-width: 90px;
        max-height: 44px;
    }
}
