﻿/* ===================================================================
   CARRUSEL DE CONVENIOS (Cover Flow 3D VIP)
   =================================================================== */
/* Contenedor principal más alto para acomodar las tarjetas alargadas */
#conveniosGrid {
    position: relative;
    width: 100%;
    height: 540px; /* Más alto */
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* La tarjeta VIP alargada */
.convenio-card {
    position: absolute;
    left: 50%;
    top: 50%; /* Cambiado para centrar verticalmente perfecto */
    margin-top: -210px; /* Mitad del alto para centrar */
    width: 100%;
    max-width: 320px;
    min-height: 420px; /* Tarjeta más alta/larga verticalmente */
    background: #fff;
    border-radius: 28px;
    padding: 30px 24px;
    text-align: center;
    box-shadow: 0 16px 40px rgba(0,0,0,0.08); /* Sombra un poco más marcada */
    border: 1px solid rgba(0,0,0,0.15); /* BORDE MÁS OSCURO y visible */
    /* Centrado perfecto del contenido interior */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Centra todo verticalmente */

    overflow: hidden;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease, z-index 0s;
}

    /* El Aura (sigue igual, solo lo acomodamos arriba) */
    .convenio-card::before {
        content: '';
        position: absolute;
        top: -60px;
        left: 50%;
        transform: translateX(-50%);
        width: 200px;
        height: 200px;
        background: var(--conv-color);
        filter: blur(65px);
        opacity: 0.15;
        z-index: 0;
        pointer-events: none;
        transition: opacity 0.4s ease;
    }

    .convenio-card:hover::before {
        opacity: 0.25;
    }

/* El contenedor del logo */
.convenio-logo-wrap {
    width: 76px;
    height: 76px; /* Apenitas más grande para destacar */
    background: #fff;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--conv-color);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border: 1px solid rgba(255,255,255,0.8);
    position: relative;
    z-index: 2;
    margin-bottom: 24px;
    transition: transform 0.3s ease;
}

.convenio-card:hover .convenio-logo-wrap {
    transform: scale(1.05);
}

.convenio-logo-wrap svg {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

/* Cuerpo de textos centrado */
.convenio-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center; /* Asegura el centrado */
    width: 100%;
}

    .convenio-body h3 {
        font-size: 20px;
        color: var(--brandDark);
        margin: 0 0 8px 0;
        font-weight: 850;
        letter-spacing: -0.01em;
    }

.convenio-rubro {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
}

/* Botón fantasma */
.btn-convenio {
    /* Quitamos el margin-top: auto para que no se vaya hasta el fondo y quede centrado con el resto */
    background: rgba(47,93,115,.04);
    color: var(--brandDark);
    border: none;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    width: 100%;
    max-width: 200px; /* Para que no sea tan ancho */
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.convenio-card.active .btn-convenio {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.btn-convenio:hover {
    background: var(--conv-color);
    color: #fff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.convenio-card.active {
    cursor: default;
}

    .convenio-card.active::before {
        opacity: 0.3;
    }
/* ===================================================================
   BOTONES DE NAVEGACIÓN (Flechas Izq y Der)
   =================================================================== */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(36,75,92,.1);
    box-shadow: 0 8px 24px rgba(16,24,40,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brandDark);
    cursor: pointer;
    z-index: 30; /* Siempre por encima de todo */
    transition: all 0.2s ease;
}

    .carousel-btn:hover {
        background: var(--brandDark);
        color: #fff;
        transform: translateY(-50%) scale(1.1);
    }

    .carousel-btn svg {
        width: 24px;
        height: 24px;
        stroke-width: 2.5;
    }

    .carousel-btn.prev {
        left: calc(50% - 320px);
    }
    /* Posición en Desktop */
    .carousel-btn.next {
        right: calc(50% - 320px);
    }

/* Responsive */
@media (max-width: 980px) {
    .carousel-btn.prev {
        left: 5%;
    }

    .carousel-btn.next {
        right: 5%;
    }
}

@media (max-width: 600px) {
    .convenio-card {
        max-width: 260px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

        .carousel-btn.prev {
            left: 10px;
        }

        .carousel-btn.next {
            right: 10px;
        }
}
#convenios { /* o el ID/clase que envuelva a toda la sección del carrusel */
    background-color: #F8FAFC; /* Un gris muy muy suave, casi blanco */
    /* border-top: 1px solid rgba(0,0,0,0.03); Opcional para separar de la sección de arriba */
    /* border-bottom: 1px solid rgba(0,0,0,0.03); */
}