/* ==========================================================================
   CARRUSEL DE MARCAS - ServiKN Theme
   ========================================================================== */

.brands-carousel-container {
    margin: 3rem 0;
    padding: 2rem 0;
}

.brands-carousel {
    overflow: hidden;
    position: relative;
    width: 100%;
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
}

.brands-carousel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    border-radius: 20px 20px 0 0;
}

.brands-track {
    display: flex;
    animation: brandsScroll 35s linear infinite;
    gap: 2.5rem;
    align-items: center;
    padding: 1rem 0;
}

.brand-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 80px;
    padding: 1rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f3f4f6;
    position: relative;
    overflow: hidden;
}

.brand-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.brand-item:hover::before {
    opacity: 0.05;
}

.brand-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,102,204,0.1);
    border-color: #dbeafe;
}

.brand-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(60%) opacity(0.8);
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.brand-item:hover img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}

.brand-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f9fafb;
    border-radius: 8px;
    position: relative;
    z-index: 2;
    border: 1px solid #f3f4f6;
}

.brand-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    text-align: center;
    padding: 0.5rem;
    line-height: 1.2;
}

.brand-item:hover .brand-name {
    color: var(--primary);
}

/* Enlaces de marca */
.brand-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.brand-item a:hover {
    text-decoration: none;
}

/* Animación del carrusel */
@keyframes brandsScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Pausar animación en hover */
.brands-carousel:hover .brands-track {
    animation-play-state: paused;
}

/* Efectos de sombra en los bordes */
.brands-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 100%;
    background: linear-gradient(90deg, #ffffff, transparent);
    z-index: 10;
    pointer-events: none;
}

.brands-carousel::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 100%;
    background: linear-gradient(270deg, #ffffff, transparent);
    z-index: 10;
    pointer-events: none;
}

/* Indicador de progreso */
.brands-carousel-container::after {
    content: '';
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    opacity: 0.6;
}

/* Estado vacío */
.brands-carousel-empty {
    text-align: center;
    padding: 3rem;
    background: #f8fafc;
    border-radius: 16px;
    border: 2px dashed #cbd5e1;
    color: var(--text-light);
}

.brands-carousel-empty p {
    margin: 0;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .brands-carousel-container {
        margin: 2rem 0;
        padding: 1rem 0;
    }
    
    .brands-carousel {
        padding: 1.5rem 0.5rem;
        border-radius: 16px;
    }
    
    .brands-track {
        gap: 2rem;
        animation-duration: 25s;
    }
    
    .brand-item {
        width: 100px;
        height: 70px;
        padding: 0.8rem;
        border-radius: 10px;
    }
    
    .brand-name {
        font-size: 0.7rem;
        padding: 0.3rem;
    }
    
    /* Reducir efectos de sombra en móvil */
    .brands-carousel::after {
        width: 40px;
        background: linear-gradient(90deg, #ffffff, transparent);
    }
    
    .brands-carousel::before {
        width: 40px;
        background: linear-gradient(270deg, #ffffff, transparent);
    }
}

@media (max-width: 480px) {
    .brands-carousel {
        padding: 1rem 0.3rem;
    }
    
    .brands-track {
        gap: 1.5rem;
        animation-duration: 20s;
    }
    
    .brand-item {
        width: 90px;
        height: 60px;
        padding: 0.6rem;
    }
    
    .brand-name {
        font-size: 0.65rem;
    }
}

/* Sección de Marcas */
.brands-section {
    padding: 4rem 0;
    background: #fafbfc;
}

.brands-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.brands-section .section-header h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 1rem;
    font-weight: 700;
}

.brands-section .section-header p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* CTA de Marcas */
.brands-cta {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #f3f4f6;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.brands-cta p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.btn-brands-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,102,204,0.2);
}

.btn-brands-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,102,204,0.3);
    color: white;
    text-decoration: none;
}

.btn-brands-cta svg {
    transition: transform 0.3s ease;
}

.btn-brands-cta:hover svg {
    transform: translateX(5px);
}

/* Responsive para sección de marcas */
@media (max-width: 768px) {
    .brands-section {
        padding: 3rem 0;
    }
    
    .brands-section .section-header h2 {
        font-size: 2rem;
    }
    
    .brands-section .section-header p {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .brands-cta {
        margin-top: 2rem;
        padding: 1.5rem;
    }
    
    .brands-cta p {
        font-size: 1.1rem;
    }
    
    .btn-brands-cta {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* Modo oscuro (opcional) */
@media (prefers-color-scheme: dark) {
    .brands-carousel {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        border-color: rgba(59, 130, 246, 0.2);
    }
    
    .brand-item {
        background: #374151;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .brand-item:hover {
        background: #4b5563;
        border-color: var(--primary);
    }
    
    .brand-placeholder {
        background: linear-gradient(135deg, #4b5563, #6b7280);
    }
    
    .brand-name {
        color: #d1d5db;
    }
}
