.gallery {
    position: relative;
    width: min(92vw, 720px);
    aspect-ratio: 720 / 420;
    min-height: 0;
    margin: 0 auto;
    left: auto;
    transform: none;
}

.shadow {
    position: absolute;
    top: 92%;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 6%;
    border-radius: 50%;
    background: radial-gradient(rgba(0, 229, 255, 0.3), rgba(0, 0, 0, 0) 70%);
}

.slider-items .gallery img,
.clipped-border img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.clipped-border {
    -webkit-clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
    clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
    padding: 0.35em;
    background: linear-gradient(135deg, #00e5ff, #0052cc);
    width: 27.8%;
    height: 47.6%;
    max-height: none;
    max-width: none;
    transition: transform 0.2s;
    position: absolute;
    cursor: pointer;
    margin-top: 0;
    overflow: hidden;
}

.clipped-border:before {
    content: '';
    position: absolute;
    opacity: 0.5;
    width: 100%;
    height: 40%;
    background: white;
    top: 0;
    left: 0;
    z-index: 1;
    transform: rotate(45deg);
    transition: transform 0.5s;
    pointer-events: none;
}

.clipped-border:hover:before {
    transform: translate(-100px, 400%) rotate(45deg);
    transition: transform 0.5s;
}

.clipped-border:nth-child(1) {
    top: 0;
    left: 3.45%;
}

.clipped-border:nth-child(2) {
    top: 46.7%;
    left: 19.85%;
}

.clipped-border:nth-child(3) {
    top: 0;
    left: 36.05%;
}

.clipped-border:nth-child(4) {
    top: 46.7%;
    left: 52.45%;
}

.clipped-border:nth-child(5) {
    top: 0;
    left: 68.75%;
}

#clipped {
    -webkit-clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
    clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
}

.clipped-border:hover {
    transform: scale(1.2);
    transition: transform 0.2s;
    z-index: 10;
}

.hex-gallery-center .gallery,
.section-quienes-inicio .gallery {
    left: auto;
    transform: none;
    margin-left: auto;
    margin-right: auto;
}

@media screen and (max-width: 500px) {
    .gallery {
        width: min(88vw, 320px);
        aspect-ratio: 320 / 220;
        margin-left: auto;
        margin-right: auto;
    }

    .clipped-border {
        width: 30%;
        height: 48%;
    }

    .clipped-border:nth-child(1) {
        top: 2%;
        left: 5%;
    }

    .clipped-border:nth-child(2) {
        top: 2%;
        left: 35%;
    }

    .clipped-border:nth-child(3) {
        top: 2%;
        left: 65%;
    }

    .clipped-border:nth-child(4) {
        top: 44%;
        left: 20%;
    }

    .clipped-border:nth-child(5) {
        top: 44%;
        left: 50%;
    }
}
