.title-container {
    padding: 1rem 0;
    text-align: center;
    margin-bottom: 1.5rem;
}

.main-title {
    padding-top: 50px;
    color: black;
    font-size: 2rem;
    margin: 0;
}

.programas-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2rem;
    height: 450px;
}

.programa-card {
    position: relative;
    height: 100%;
    perspective: 1000px;
    cursor: pointer;
    margin: 0.3rem;
}

.programa-content {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.programa-title {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a23e0;
    color: white;
    margin: 0;
    transform: translateY(0);
    transition: transform 0.6s;
    z-index: 2;
    font-size: 2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
}

.programa-card:hover .programa-title {
    transform: translateY(-100%);
}

.programa-description {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.6s;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1.4;
    text-align: justify;
    word-wrap: break-word;
    overflow-y: auto;
    box-sizing: border-box;
}

.programa-card:hover .programa-description {
    opacity: 1;
    transform: translateY(0);
}

.programa-description p {
    margin: 0;
    max-height: 100%;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
    padding: 0 0.5rem;
    text-align: justify;
}

.instruccion-texto {
    text-align: center;
    margin: 2rem auto;
    padding: 1rem;
    max-width: 600px;
}

.instruccion-texto p {
    color: #666;
    font-size: 1.1rem;
    font-style: italic;
    margin: 0;
}

@media (max-width: 768px) {
    .programas-container {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        height: auto;
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .programa-card {
        height: 180px;
        margin: 0.3rem 0;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .programa-title {
        font-size: 1rem;
        padding: 0 0.8rem;
    }
    
    .programa-description {
        font-size: 0.85rem;
        padding: 1rem;
    }
    
    .programa-description p {
        padding: 0 0.3rem;
    }
    
    .instruccion-texto {
        margin: 1.5rem auto;
        padding: 0.8rem;
    }
    
    .instruccion-texto p {
        font-size: 1rem;
    }
} 