/* Estilos para la sección de marcas - Diseño moderno */
.brands-section {
    padding: 50px 0;
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.brands-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.03"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.brands-section * {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.brands-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 35px 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px;
    position: relative;
    z-index: 1;
}

.brand-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 18px !important;
    margin: 0 !important;
    flex: 0 1 220px;
    position: relative;
    border-radius: 15px;
    min-height: 130px;
}

.brand-item .brand-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.brand-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    opacity: 0;
}

.brand-item img {
    display: block;
    width: auto;
    max-width: 220px;
    max-height: 100px;
    height: auto;
    object-fit: contain;
    padding: 0 !important;
    margin: 0 !important;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease-in-out;
}

.brand-item:hover img {
    transform: scale(1.1);
}

/* Aumentar únicamente el logo de Molinos Ala */
.brand-item img[alt="Molinos Ala"] {
    max-width: 380px;
    max-height: 170px;
}

/* Incrementar el tamaño del logo Valle Blanco */
.brand-item img[alt="Valle Blanco"] {
    max-width: 320px;
    max-height: 140px;
}

@media (max-width: 1024px) {
    .brands-grid {
        gap: 30px 35px;
        padding: 20px 30px;
        max-width: 1000px;
    }

    .brand-item {
        flex: 0 1 200px;
    }

    .brand-item img {
        max-width: 200px;
        max-height: 90px;
    }

    .brand-item img[alt="Molinos Ala"] {
        max-width: 330px;
        max-height: 150px;
    }

    .brand-item img[alt="Valle Blanco"] {
        max-width: 290px;
        max-height: 120px;
    }
}

@media (max-width: 768px) {
    .brands-grid {
        gap: 25px;
        padding: 18px 20px;
    }

    .brand-item {
        padding: 10px !important;
        flex: 0 1 180px;
    }

    .brand-item img {
        max-width: 180px;
        max-height: 80px;
    }

    .brand-item img[alt="Molinos Ala"] {
        max-width: 290px;
        max-height: 130px;
    }

    .brand-item img[alt="Valle Blanco"] {
        max-width: 250px;
        max-height: 110px;
    }
}

@media (max-width: 480px) {
    .brands-grid {
        gap: 20px;
        padding: 15px;
    }

    .brand-item {
        min-height: 110px;
        padding: 12px !important;
        flex: 0 1 150px;
    }

    .brand-item img {
        max-width: 160px;
        max-height: 70px;
    }

    .brand-item img[alt="Molinos Ala"] {
        max-width: 260px;
        max-height: 115px;
    }

    .brand-item img[alt="Valle Blanco"],
    .brand-item img[alt="Crocanitos"] {
        max-width: 220px;
        max-height: 100px;
    }
}

/* Ajuste de tamaño para el logo de Crocanitos */
.brand-item img[alt="Crocanitos"] {
    max-width: 260px;
    max-height: 115px;
}

@media (max-width: 1024px) {
    .brand-item img[alt="Crocanitos"] {
        max-width: 230px;
        max-height: 105px;
    }
}

@media (max-width: 768px) {
    .brand-item img[alt="Crocanitos"] {
        max-width: 210px;
        max-height: 95px;
    }
}

@media (max-width: 480px) {
    .brand-item img[alt="Crocanitos"] {
        max-width: 200px;
        max-height: 90px;
    }
}

/* Ajuste específico para el logo superior de Crocanitos */
.brand-item img[src$="Crocanitos.png"] {
    max-width: 200px;
    max-height: 90px;
}

@media (max-width: 1024px) {
    .brand-item img[src$="Crocanitos.png"] {
        max-width: 180px;
        max-height: 80px;
    }
}

@media (max-width: 768px) {
    .brand-item img[src$="Crocanitos.png"] {
        max-width: 160px;
        max-height: 70px;
    }
}

@media (max-width: 480px) {
    .brand-item img[src$="Crocanitos.png"] {
        max-width: 150px;
        max-height: 65px;
    }
}

/* Incremento leve para el logo de Crock Rio */
.brand-item img[alt="CrockRio"] {
    max-width: 260px;
    max-height: 120px;
}

@media (max-width: 1024px) {
    .brand-item img[alt="CrockRio"] {
        max-width: 240px;
        max-height: 110px;
    }
}

@media (max-width: 768px) {
    .brand-item img[alt="CrockRio"] {
        max-width: 220px;
        max-height: 100px;
    }
}

@media (max-width: 480px) {
    .brand-item img[alt="CrockRio"] {
        max-width: 200px;
        max-height: 90px;
    }
}
