
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: sans-serif;
}

html, body{
    width: 100%;
    height: 100%;
    background: black;
}

.container{
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.card{
    margin-top: 20px;
    margin-bottom: 20px;
    width: 20rem;
    height: 24rem;
    position: relative;
    cursor: pointer;
    border-radius: 20px;
    background: black;
}

.top {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 12rem;
    background: #5f7adb;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: 1s;
    z-index: 1;
    overflow: hidden; /* Evita que la imagen sobresalga */
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ajusta la imagen manteniendo la proporción */
    object-position: top; /* Centra la imagen */
    border-radius: 20px;
}

.card:hover .top {
    transform: translateY(-100%);
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.card:hover .top{
    transform: translateY(-100%);
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.bottom{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 12rem;
    padding: 1rem;
    text-align: left;
    background: white;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: start;
    flex-direction: column;
    transition: 1s;
}

.bottom h1{
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    width: 100%;
    text-align: start;
}

.card:hover .bottom{
    transform: translateY(0);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.especializacion {
    font-size: small ;
}

.acerca {
    margin-top: 30px;
    color: white;
}

.historia {
    color:burlywood;
    padding: 20px;
}

.contenedor {
    background-color: rgb(46, 45, 45);
    border-radius: 20px;
}

.highlight {
    background-color: yellow;
    color: red;
}

@media (max-width: 650px) {
    .container {
        margin-top: 85px;
        width: 100%;
        gap: 60px;
        display: flex;
        flex-direction: column; 
        align-items: center;
        margin-bottom: 85px;
    }

    .historia {
        color:burlywood !important;
        padding: 20px !important;
        }

    .contenedor {
        background-color: rgb(46, 45, 45);
        border-radius: 20px;
    }
    
}

@media (min-width: 651px) and (max-width: 850px) {
    .container {
        margin-top: 295px;
        flex-direction: column; 
        align-items: center;
        gap: 60px;
        width: 100vw; /* Asegura que ocupe todo el ancho de la pantalla */
        min-width: 100%; /* Evita restricciones de ancho mínimo */
        margin-bottom: 295px;
    }
}