.container-gallery {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 20px;
    height: 400px;
    justify-content: center;
}
.item-gallery {
    position: relative;
    flex: 0 0 15%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover; 
    background-repeat: no-repeat; 
    background-position: center;
}
.item-gallery.formacion{
    flex: 0 0 20%;
}
.item-gallery.idiomas{
    flex: 0 0 30%;
}
.item-gallery.formacion:hover{
    flex: 0 0 40%;
}
.item-gallery.idiomas:hover{
    flex: 0 0 50%;
}
.item-gallery:hover {
    flex: 0 0 30%;
}
.item-gallery .overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 73, 175, 0);
    transition: background-color 0.3s ease-in-out;
    z-index: 1;
}
.item-gallery:hover .overlay {
    background-color: rgba(0, 73, 175, 0.5);
}
.item-gallery .title {
    position: absolute;
    color: #fff;
    font-weight: bold;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    left: 10px;
    bottom: 10px;
    font-size: 1.125rem;
    white-space: nowrap;
    z-index: 2;
}
.item-gallery:hover .title {
    writing-mode: horizontal-tb;
    transform: rotate(0deg);
    left: 20px;
    bottom: 20px;
}
.item-gallery .btn-gallery {
    position: absolute;
    background: #f90;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    text-decoration: none;
    font-size: 14px;
    width: 90px;
    text-align: center;
}
.item-gallery:hover .btn-gallery {
    display: block;
}
/*Admission*/
.container-gallery.admission {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: visible;
    height: auto;
}
.container-gallery.admission .item-gallery {
    flex: 0 1 calc(33.333% - 15px); /* 3 elementos por fila */
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    transition: all 0.3s ease-in-out;
    position: relative;
}
@media (max-width: 768px) {
    .container-gallery {
        height: auto;
        width: 400px;
        justify-content: flex-start;
        margin: 0 auto;
    }
    .item-gallery {
        flex: 0 0 80% !important;
        height: 400px;
        background-size: cover;
        background-position: top center;
        background-repeat: no-repeat;
    }
    .item-gallery:hover {
        flex: 0 0 90% !important;
    }
    .item-gallery .title {
        writing-mode: horizontal-tb;
        transform: rotate(0deg);
        bottom: 10px;
        left: 10px;
    }
}
@media (max-width: 425px) {
    .container-gallery {
        width: 350px;
        margin: 0 auto;
    }
}