/* Contenedor Flex que centra los elementos */
.unam-tic-flex-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Esto centra las cards en renglones incompletos */
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Cada card ocupa un tercio menos el gap en pantallas grandes */
.unam-tic-card-wrapper {
    flex: 0 1 calc(33.333% - 20px);
    min-width: 300px; /* Evita que se hagan demasiado flacas */
}

.unam-tic-card {
    display: flex;
    align-items: flex-end;
    height: 450px;
    max-height: 395px;
    background-size: cover;
    /*background-position: center;
    border-radius: 15px;*/
    text-decoration: none !important;
    transition: all 0.3s ease;
    overflow: hidden;
}

.unam-tic-card:hover {
    transform: translateY(-8px);
}

.unam-tic-content {
    padding: 25px;
    width: 100%;
}

.unam-tic-title {
    color: #ffffff !important;
    margin: 0;
    font-size: 1.4rem;
    font-weight: bold;
    line-height: 1.2;
}

/* Ajustes Responsivos */
@media (max-width: 992px) {
    .unam-tic-card-wrapper { flex: 0 1 calc(50% - 20px); } /* 2 por renglón */
}

@media (max-width: 650px) {
    .unam-tic-card-wrapper { flex: 0 1 100%; } /* 1 por renglón */
    .unam-tic-card { height: 400px; } /* Un poco más bajas en móvil */
}