/* =========================================================
   García Recta Design — rollkit-lightbox.css
   Visor de "Proyectos instalados" + indicador de "ampliar"
   en las miniaturas. Solo rollkit.php.
   Paleta: carmín #9A0C1A / hover #6E0813 / tinta #1A1A1D
   ========================================================= */

/* ---------- Filas clickeables ---------- */

.rk-proyecto-row[data-rk-lightbox-item] {
    cursor: pointer;
}

.rk-proyecto-row[data-rk-lightbox-item]:focus-visible {
    outline: 2px solid #9A0C1A;
    outline-offset: 4px;
}

.rk-proyecto-thumb {
    position: relative;
}

.rk-proyecto-zoom {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(26, 26, 29, 0.72);
    color: #FFFFFF;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.rk-proyecto-zoom svg {
    width: 14px;
    height: 14px;
}

.rk-proyecto-row:hover .rk-proyecto-zoom,
.rk-proyecto-row:focus-visible .rk-proyecto-zoom {
    opacity: 1;
    transform: scale(1);
}

/* En pantallas táctiles no hay hover: el ícono queda siempre visible */
@media (hover: none) {
    .rk-proyecto-zoom {
        opacity: 1;
        transform: scale(1);
    }
}

/* ---------- Visor ---------- */

html.rk-lb-lock,
html.rk-lb-lock body {
    overflow: hidden;
}

.rk-lb {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.rk-lb.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.rk-lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 12, 14, 0.94);
}

.rk-lb-figure {
    position: relative;
    z-index: 1;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: calc(100vw - 180px);
}

.rk-lb-img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 160px);
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    transition: opacity 0.25s ease;
}

.rk-lb.is-loading .rk-lb-img {
    opacity: 0.35;
}

.rk-lb-caption {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(245, 245, 243, 0.85);
    text-align: center;
}

.rk-lb-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    pointer-events: none; /* la franja no tapa el fondo: clic ahí también cierra */
}

.rk-lb-top > * {
    pointer-events: auto;
}

.rk-lb-counter {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: rgba(245, 245, 243, 0.6);
}

.rk-lb-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(26, 26, 29, 0.6);
    color: #FFFFFF;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.rk-lb-btn svg {
    width: 20px;
    height: 20px;
}

.rk-lb-btn:hover {
    background: #9A0C1A;
    border-color: #9A0C1A;
}

.rk-lb-btn:focus-visible {
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
}

.rk-lb-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
}

.rk-lb-prev {
    left: 24px;
}

.rk-lb-next {
    right: 24px;
}

.rk-lb-nav[hidden] {
    display: none;
}

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
    .rk-lb-figure {
        max-width: 100vw;
        padding: 0 12px;
    }

    .rk-lb-img {
        max-height: calc(100vh - 200px);
    }

    .rk-lb-nav {
        top: auto;
        bottom: 24px;
        transform: none;
    }

    .rk-lb-prev {
        left: calc(50% - 60px);
    }

    .rk-lb-next {
        right: calc(50% - 60px);
    }

    .rk-lb-top {
        padding: 14px 16px;
    }
}
