/*
 * Estilos para Prodeci Hero Cards (v1.7 - Esquinas Redondeadas)
 */

.prodeci-cards-container {
    display: flex;
    width: 100%;
    max-width: 100%;
    gap: 15px;
    height: 400px;
    padding: 0;
    margin: 0 auto; /* Centrar el contenedor si tiene un max-width */
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
}

.prodeci-card {
    flex: 1;
    height: 100%;
    border-radius: 10px; /* <-- AQUÍ EL CAMBIO */
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    background-color: #333;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-decoration: none;
}

/* Efecto de expansión en hover para escritorio */
.prodeci-cards-container:hover .prodeci-card {
    flex: 1;
}

.prodeci-cards-container:hover .prodeci-card:hover {
    flex: 6;
}

.prodeci-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
    padding: 25px;
    box-sizing: border-box;
}

/* Sombra gradiente en la parte inferior */
.prodeci-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0.85) 100%);
    z-index: 1;
    transition: opacity 0.5s ease;
    border-radius: 0 0 10px 10px; /* <-- AQUÍ EL CAMBIO PARA EL GRADIENTE */
}

.prodeci-vertical-title-wrapper {
    position: absolute;
    left: 20px;
    bottom: 25px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, transform 0.4s ease;
    opacity: 1;
}

.prodeci-vertical-title {
    font-weight: 700;
    color: #ffffff;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-align: center;
    line-height: 1.2;
    font-size: 1.2rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.prodeci-hover-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
    max-width: 90%;
}

.prodeci-hover-title {
    font-weight: 700;
    font-size: 2.2rem;
    color: #ffffff;
    margin: 0 0 15px 0;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
}

.prodeci-button {
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s, color 0.3s, border 0.3s;
}

/* Animaciones de visibilidad en hover */
.prodeci-card:hover .prodeci-hover-content {
    opacity: 1;
    transform: translateY(0);
}

.prodeci-card:hover .prodeci-vertical-title-wrapper {
    opacity: 0;
    transform: translateX(-100%);
}

.prodeci-cards-container:hover .prodeci-card:not(:hover) .prodeci-vertical-title-wrapper {
    opacity: 0;
}


/* --- SECCIÓN RESPONSIVE MEJORADA --- */

/* Para tabletas y móviles en horizontal (hasta 991px) */
@media (max-width: 991px) {
    .prodeci-cards-container {
        flex-direction: column; /* Apila las tarjetas verticalmente */
        height: auto;          /* La altura se ajusta al contenido */
        gap: 10px;
    }

    .prodeci-card {
        height: 250px;         /* Altura fija para cada tarjeta apilada */
        flex: 1 1 auto !important; /* Resetea el flex para evitar la animación de expansión */
    }

    /* Ocultamos el título vertical que no tiene sentido en esta vista */
    .prodeci-vertical-title-wrapper {
        display: none;
    }

    /* Hacemos el contenido principal visible por defecto */
    .prodeci-hover-content {
        opacity: 1;
        transform: translateY(0);
        transition: none; /* Quitamos la transición que ya no es necesaria */
        justify-content: flex-end; /* Alinea el contenido hacia abajo */
        padding-bottom: 20px;
        height: 100%;
    }
    
    .prodeci-card:hover .prodeci-hover-content {
       /* Se asegura que no haya transformaciones raras en el hover */
       transform: translateY(0);
    }

    .prodeci-hover-title {
        font-size: 1.8rem;
    }
}

/* Para móviles en vertical (hasta 480px) */
@media (max-width: 480px) {
    .prodeci-card {
        height: 220px; /* Un poco menos de altura para pantallas pequeñas */
    }

    .prodeci-hover-title {
        font-size: 1.5rem; /* Título más pequeño */
        margin-bottom: 10px;
    }

    .prodeci-button {
        padding: 10px 20px; /* Botón ligeramente más pequeño */
        font-size: 0.8rem;
    }
}