/* ========================================
   Carousel Styles - Valores Carousel & WP Carousel
   Unified styling for both carousel implementations
   ======================================== */

/* ===== VALORES CAROUSEL (Lo que nos diferencia) ===== */
.valores-carousel {
    background: #f8f8f8;
    padding: 60px 0;
    position: relative;
    /* Full width sin overflow */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.vc-track-wrapper {
    overflow: hidden;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
    box-sizing: border-box;
}

.vc-track {
    display: flex;
    gap: 24px;
    transition: transform 0.4s ease;
}

.vc-item {
    background: #fff;
    border: 1px solid #eaeaea;
    padding: 32px;
    flex: 0 0 calc(25% - 18px);
    min-width: calc(25% - 18px);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    box-sizing: border-box;
}

.vc-item h3 {
    margin: 0;
    font-size: 24px;
    color: #717171;
}

.vc-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin: 0 auto;
}

.vc-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    z-index: 10;
    display: none; /* Ocultas por defecto, JS las muestra si es necesario */
    transition: opacity 0.3s ease;
}

.vc-arrow.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vc-arrow:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.vc-left {
    left: 10px;
}

.vc-right {
    right: 10px;
}

@media (max-width: 1200px) {
    .vc-item {
        flex: 0 0 calc(33.333% - 16px);
        min-width: calc(33.333% - 16px);
    }
}

@media (max-width: 900px) {
    .vc-item {
        flex: 0 0 calc(50% - 12px);
        min-width: calc(50% - 12px);
    }
}

@media (max-width: 600px) {
    .valores-carousel {
        padding: 40px 0;
    }
    .vc-track-wrapper {
        overflow: visible;
        padding: 0 20px;
    }
    .vc-track {
        flex-direction: column;
        transform: none !important;
        gap: 20px;
    }
    .vc-item {
        flex: 0 0 100%;
        min-width: 100%;
    }
    .vc-arrow {
        display: none !important;
    }
}

/* ===== WP CAROUSEL (Conoce más acerca de nosotros) ===== */
.wp-carousel {
    position: relative;
    width: 75vw;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
}

.wp-carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.wp-slide {
    position: relative;
    width: 75vw;
    min-width: 75vw;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    flex-shrink: 0;
    background: #f0f0f0;
}

.wp-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wp-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wp-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.wp-arrow.left {
    left: 16px;
}

.wp-arrow.right {
    right: 16px;
}

.wp-arrow svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 📱 MÓVIL: STACK Y FULL WIDTH */
@media (max-width: 768px) {
    .wp-carousel {
        width: 100%;
    }

    .wp-carousel-track {
        flex-direction: column;
        transform: none !important;
    }

    .wp-slide {
        width: 100%;
        min-width: 100%;
        padding-top: 56.25%;
    }

    .wp-arrow {
        display: none;
    }
}

/* ===== CB CAROUSEL (Aliados Estratégicos) ===== */
.wp-block-cb-carousel {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 50px;
    box-sizing: border-box;
}

.wp-block-cb-carousel.cb-carousel-initialized {
    overflow: hidden;
}

.cb-carousel-track {
    display: flex;
    transition: transform 0.4s ease;
}

.wp-block-cb-slide {
    padding: 10px;
    box-sizing: border-box;
}

.wp-block-cb-slide figure {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.wp-block-cb-slide img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Flechas del carrusel de aliados */
.cb-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.cb-carousel-arrow:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.cb-carousel-arrow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cb-carousel-arrow svg {
    width: 20px;
    height: 20px;
    stroke: #333;
}

.cb-carousel-prev {
    left: 5px;
}

.cb-carousel-next {
    right: 5px;
}

/* Dots del carrusel de aliados */
.cb-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px 0;
}

.cb-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.cb-carousel-dot:hover {
    background: #bbb;
}

.cb-carousel-dot.active {
    background: #333;
}

/* 📱 MÓVIL: Carrusel de aliados responsive */
@media (max-width: 768px) {
    .wp-block-cb-carousel {
        padding: 0 40px;
    }

    .cb-carousel-arrow {
        width: 32px;
        height: 32px;
    }

    .cb-carousel-arrow svg {
        width: 16px;
        height: 16px;
    }

    .cb-carousel-prev {
        left: 2px;
    }

    .cb-carousel-next {
        right: 2px;
    }
}
