/* Entidades Associadas Section Styles */

section.entidades-associadas {
    position: relative;
    text-align: center;
    padding: 100px 20px;
    overflow: hidden;
    background-color: #ffffff;
    z-index: 1;
}

/* Gradient fade overlays on left and right edges */
section.entidades-associadas::before,
section.entidades-associadas::after {
    content: "";
    position: absolute;
    top: 0;
    width: 15%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

section.entidades-associadas::before {
    left: 0;
    background: linear-gradient(to right, #ffffff, transparent);
}

section.entidades-associadas::after {
    right: 0;
    background: linear-gradient(to left, #ffffff, transparent);
}

/* Section title styling */
.entidades-associadas h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

/* Underline effect for title */
.entidades-associadas h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #fcbc74, #f94f1b);
    border-radius: 2px;
    margin: 8px auto 0;
}

/* Carousel container */
.entidades-carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: 20px 0;
}

/* Carousel wrapper */
.entidades-carousel-wrapper {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.2, 1);
    will-change: transform;
}

/* Individual slide */
.entidades-slide {
    flex: 0 0 calc(100% / 3); /* 3 logos per view on desktop */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    min-height: 120px;
}

/* Link wrapper for each logo */
.entidades-slide a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

/* Logo image styling */
.entidades-slide img {
    max-width: 200px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(90%);
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.2, 1);
    opacity: 0.85;
}

/* Hover effects on logos */
.entidades-slide a:hover img {
    filter: brightness(100%);
    transform: scale(1.15);
    opacity: 1;
}

/* Navigation buttons */
.entidades-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(31, 43, 59, 0.8);
    color: #f4f3f0;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.entidades-nav-btn:hover {
    background: var(--pomegranate, #f94f1b);
    transform: translateY(-50%) scale(1.1);
}

.entidades-nav-btn.prev {
    left: 0;
}

.entidades-nav-btn.next {
    right: 0;
}

/* Responsive Design */

/* Tablets: 2 logos per view */
@media (max-width: 1024px) {
    .entidades-slide {
        flex: 0 0 calc(100% / 2);
    }

    .entidades-slide img {
        max-width: 180px;
        max-height: 70px;
    }

    .entidades-associadas h2 {
        font-size: 2rem;
    }

    .entidades-nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Mobile: 1 logo per view */
@media (max-width: 768px) {
    .entidades-slide {
        flex: 0 0 100%;
    }

    .entidades-slide img {
        max-width: 160px;
        max-height: 60px;
    }

    .entidades-associadas h2 {
        font-size: 1.6rem;
        margin-bottom: 40px;
    }

    section.entidades-associadas {
        padding: 60px 15px;
    }

    .entidades-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .entidades-nav-btn.prev {
        left: 15px;
    }

    .entidades-nav-btn.next {
        right: 15px;
    }
}

@media (max-width: 480px) {
    .entidades-slide img {
        max-width: 140px;
        max-height: 50px;
    }

    .entidades-associadas h2 {
        font-size: 1.3rem;
    }
}
