/* ==========================================================================
   WIDGET: MARCAS / ALIADOS
   Carrusel premium con botones laterales
   ========================================================================== */

.fc-widget-marcas {
    position: relative;
    background: #f8fafc;
    padding: clamp(80px, 8vw, 120px) 0;
    overflow: hidden;
    border-top: 1px solid rgba(15, 23, 42, 0.04);
}

.fc-widget-marcas .fc-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ==========================================================================
   Encabezado
   ========================================================================== */

.fc-widget-marcas .fc-widget-heading {
    text-align: center;
    margin-bottom: 60px;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.fc-widget-marcas .fc-marcas-kicker {
    display: inline-block;

    margin-bottom: 14px;
    padding: 5px 14px;
    border-radius: 100px;

    background: rgba(15, 23, 42, 0.04);
    color: var(--fc-primary);

    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fc-widget-marcas .fc-marcas-title {
    margin: 0 0 18px 0;

    color: var(--fc-secondary);
    font-size: clamp(2.2rem, 4vw, 2.8rem);
    line-height: 1.15;
    letter-spacing: -0.045em;
    font-weight: 800;
}

.fc-widget-marcas .fc-marcas-title span {
    color: var(--fc-primary);
}

.fc-widget-marcas .fc-marcas-lead {
    margin: 0;
    max-width: 580px;

    color: #64748b;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* ==========================================================================
   Carrusel
   ========================================================================== */

.fc-widget-marcas .fc-marcas__carousel {
    position: relative;

    /*
       Desktop:
       4 tarjetas de 260px + 3 gaps de 24px = 1112px.
       Esto centra visualmente el carrusel y permite que los botones
       queden simétricos respecto al grupo de tarjetas.
    */
    width: min(100%, 1112px);
    margin: 0 auto;
}

.fc-widget-marcas .fc-marcas__viewport {
    position: relative;
    width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.fc-widget-marcas .fc-marcas__viewport::-webkit-scrollbar {
    display: none;
}

.fc-widget-marcas .fc-marcas__grid {
    display: flex;
    align-items: stretch;
    gap: 24px;

    width: max-content;
    min-width: 100%;
    padding: 6px 0 12px;

    scroll-snap-type: x proximity;
}

/* ==========================================================================
   Tarjetas
   ========================================================================== */

.fc-widget-marcas .fc-marca-card {
    flex: 0 0 260px;

    min-height: 190px;
    padding: 36px 28px 24px 28px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;

    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 24px;

    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.01);

    scroll-snap-align: start;

    transition:
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.fc-widget-marcas .fc-marca-card:hover {
    transform: translateY(-5px);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 25px 35px -12px rgba(15, 23, 42, 0.07);
}

.fc-widget-marcas .fc-marca-card__logo-zone {
    width: 100%;
    height: 60px;

    display: grid;
    place-items: center;

    margin-bottom: 24px;
}

.fc-widget-marcas .fc-marca-card__logo-zone img {
    max-width: 85%;
    max-height: 100%;

    display: block;
    object-fit: contain;

    filter: grayscale(20%) opacity(0.9);

    transition:
        filter 0.4s ease,
        transform 0.4s ease;
}

.fc-widget-marcas .fc-marca-card:hover .fc-marca-card__logo-zone img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.04);
}

.fc-widget-marcas .fc-marca-card__placeholder {
    width: 82px;
    height: 50px;
    border-radius: 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(
        135deg,
        rgba(0, 87, 168, 0.12),
        rgba(15, 23, 42, 0.04)
    );
    color: var(--fc-primary);

    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fc-widget-marcas .fc-marca-card__footer {
    width: 100%;
    padding-top: 14px;

    text-align: center;
    border-top: 1px solid rgba(15, 23, 42, 0.04);
}

.fc-widget-marcas .fc-marca-card__name {
    display: block;

    margin-bottom: 2px;

    color: var(--fc-secondary);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.fc-widget-marcas .fc-marca-card__status {
    display: block;

    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 600;
}

/* ==========================================================================
   Botones del carrusel
   ========================================================================== */

.fc-widget-marcas .fc-marcas__nav {
    position: absolute;
    top: 50%;
    z-index: 8;

    width: 50px;
    height: 50px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;
    color: var(--fc-primary);

    box-shadow:
        0 18px 36px rgba(15, 23, 42, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);

    font-size: 2.15rem;
    line-height: 1;
    font-weight: 500;

    cursor: pointer;
    transform: translateY(-50%);

    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        background 0.22s ease,
        color 0.22s ease,
        opacity 0.22s ease;
}

.fc-widget-marcas .fc-marcas__nav span {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 1em;
    height: 1em;

    line-height: 1;
    transform: translateY(-1px);
}

.fc-widget-marcas .fc-marcas__nav:hover {
    background: var(--fc-primary);
    color: #ffffff;
    box-shadow: 0 22px 42px rgba(0, 87, 168, 0.22);
    transform: translateY(-50%) scale(1.04);
}

.fc-widget-marcas .fc-marcas__nav:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--fc-primary) 32%, transparent);
    outline-offset: 3px;
}

.fc-widget-marcas .fc-marcas__nav--prev {
    left: -25px;
}

.fc-widget-marcas .fc-marcas__nav--next {
    right: -25px;
}

.fc-widget-marcas .fc-marcas__nav.is-disabled {
    opacity: 0.32;
    pointer-events: none;
}

/* ==========================================================================
   Responsive tablet
   ========================================================================== */

@media (max-width: 900px) {
    .fc-widget-marcas .fc-marcas__carousel {
        /*
           Tablet:
           3 tarjetas de 260px + 2 gaps de 24px = 828px.
        */
        width: min(100%, 828px);
    }

    .fc-widget-marcas .fc-marcas__nav--prev {
        left: -18px;
    }

    .fc-widget-marcas .fc-marcas__nav--next {
        right: -18px;
    }
}

/* ==========================================================================
   Responsive mobile
   ========================================================================== */

@media (max-width: 640px) {
    .fc-widget-marcas {
        padding: 60px 0;
    }

    .fc-widget-marcas .fc-container {
        padding: 0 20px;
    }

    .fc-widget-marcas .fc-widget-heading {
        margin-bottom: 36px;
    }

    .fc-widget-marcas .fc-marcas-title {
        font-size: clamp(2rem, 10vw, 2.35rem);
    }

    .fc-widget-marcas .fc-marcas-lead {
        font-size: 0.98rem;
    }

    .fc-widget-marcas .fc-marcas__carousel {
        /*
           Mobile:
           2 tarjetas de 210px + 1 gap de 16px = 436px.
        */
        width: min(100%, 436px);
    }

    .fc-widget-marcas .fc-marcas__grid {
        gap: 16px;
        padding: 4px 0 10px;
    }

    .fc-widget-marcas .fc-marca-card {
        flex-basis: 210px;
        min-height: 160px;
        padding: 24px 16px 16px 16px;
        border-radius: 20px;
    }

    .fc-widget-marcas .fc-marca-card__logo-zone {
        height: 45px;
        margin-bottom: 20px;
    }

    .fc-widget-marcas .fc-marcas__nav {
        width: 42px;
        height: 42px;
        font-size: 1.7rem;
    }

    .fc-widget-marcas .fc-marcas__nav--prev {
        left: -8px;
    }

    .fc-widget-marcas .fc-marcas__nav--next {
        right: -8px;
    }
}

/* ==========================================================================
   Accesibilidad
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .fc-widget-marcas .fc-marcas__viewport {
        scroll-behavior: auto;
    }

    .fc-widget-marcas .fc-marca-card,
    .fc-widget-marcas .fc-marca-card__logo-zone img,
    .fc-widget-marcas .fc-marcas__nav {
        transition: none;
    }
}