/* Corrección de Capas y Hover en la Grilla del Portafolio */
.grid figure {
    background: #1e1e1e;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin: 0;
}
.grid figure::before {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    animation: skeletonShimmer 1.8s infinite;
    z-index: 1;
    pointer-events: none;
}
@keyframes skeletonShimmer {
    100% { transform: translateX(100%); }
}

.grid figure img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.grid figure:hover img {
    transform: scale(1.05);
}

/* Overlay del Hover por encima de la Imagen */
.grid figure .hover-content {
    position: absolute;
    inset: 0;
    z-index: 10 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: rgba(16, 16, 16, 0.88);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.grid figure:hover .hover-content {
    opacity: 1;
    visibility: visible;
}

.grid figure .hover-content * {
    position: relative;
    z-index: 11;
}

/* Estilos del Paginador Custom */
.portfolio-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.portfolio-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.portfolio-pagination .page-numbers:hover {
    background: rgba(154, 205, 50, 0.15);
    border-color: rgba(154, 205, 50, 0.4);
    color: #fff;
    transform: translateY(-2px);
}
.portfolio-pagination .page-numbers.current {
    background: linear-gradient(135deg, #9acd32 0%, #84cc16 100%);
    border-color: #9acd32;
    color: #101010;
    box-shadow: 0 8px 20px rgba(154, 205, 50, 0.3);
}
.portfolio-pagination .page-numbers.dots {
    background: transparent;
    border: none;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.4);
}