/* ==============================> PLANTILLA DE PROYECTO */

/* -> Variables globales reutilizables (consistencia visual) */
:root {
    --aas-radius: 8px;
    --aas-radius-sm: 6px;
}

/* -> Encabezado */
.proy-encabezado {
    width: 100%;
    margin-bottom: 28px;
}

/* -> Breadcrumb */
.proy-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
    opacity: 0;
    -webkit-transform: translateY(-6px);
    transform: translateY(-6px);
    -webkit-animation: proy-entrada-arriba 0.45s ease forwards;
    animation: proy-entrada-arriba 0.45s ease forwards;
    -webkit-animation-delay: 0.05s;
    animation-delay: 0.05s;
}

.proy-bc-enlace {
    color: var(--e-global-color-primary);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
    transition: opacity 0.2s ease;
    opacity: 0.75;
}

.proy-bc-enlace:hover {
    opacity: 1;
}

.proy-bc-sep {
    color: currentColor;
    font-size: 11px;
    opacity: 0.35;
}

.proy-bc-actual {
    color: currentColor;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.45;
}

/* -> Título */
.proy-titulo {
    margin: 0;
    padding: 0;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    opacity: 0;
    -webkit-transform: translateY(-8px);
    transform: translateY(-8px);
    -webkit-animation: proy-entrada-arriba 0.5s ease forwards;
    animation: proy-entrada-arriba 0.5s ease forwards;
    -webkit-animation-delay: 0.12s;
    animation-delay: 0.12s;
}

/* -> Animación de entrada */
@-webkit-keyframes proy-entrada-arriba {
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}
@keyframes proy-entrada-arriba {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -> Posts Hijos */
.proy-hijos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    width: 100%;
    margin-bottom: 4px;
}

/* -> Box hijo */
.proy-hijo-box {
    position: relative;
    display: block;
    overflow: hidden;
    text-decoration: none;
    aspect-ratio: 1 / 1;
    background-color: #111;
    border-radius: var(--aas-radius);
}

/* -> Imagen hijo */
.proy-hijo-box .proy-hijo-imagen {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-transform: scale(1);
    transform: scale(1);
    transition: -webkit-transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    border-radius: var(--aas-radius);
}

.proy-hijo-box:hover .proy-hijo-imagen {
    -webkit-transform: scale(1.06);
    transform: scale(1.06);
}

/* -> Sin imagen hijo */
.proy-hijo-imagen.proy-hijo-sin-imagen {
    background-color: #1a1a1a;
}

/* -> Overlay hijo */
.proy-hijo-box .proy-hijo-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 18px 16px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.68) 0%,
        rgba(0, 0, 0, 0.08) 50%,
        transparent 100%
    );
    border-radius: var(--aas-radius);
}

/* -> Nombre hijo */
.proy-hijo-nombre {
    display: block;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.3;
}

/* -> Galería Grid */
.proy-galeria {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    width: 100%;
}

/* -> Item galería */
.proy-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    background-color: #111;
    border-radius: var(--aas-radius);
}

/* -> Imagen del item */
.proy-item .proy-item-imagen {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-transform: scale(1);
    transform: scale(1);
    transition: -webkit-transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    border-radius: var(--aas-radius);
}

.proy-item:hover .proy-item-imagen {
    -webkit-transform: scale(1.07);
    transform: scale(1.07);
}

/* -> Hover overlay galería */
.proy-item .proy-item-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0);
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    border-radius: var(--aas-radius);
}

.proy-item:hover .proy-item-hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.38);
}

/* -> Ícono zoom */
.proy-icono-zoom {
    display: block;
    width: 28px;
    height: 28px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    position: relative;
    -webkit-transform: scale(0.7);
    transform: scale(0.7);
    transition: -webkit-transform 0.3s ease;
    transition: transform 0.3s ease;
}

.proy-icono-zoom::before,
.proy-icono-zoom::after {
    content: '';
    position: absolute;
    background-color: #ffffff;
}

.proy-icono-zoom::before {
    width: 10px;
    height: 2px;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

.proy-icono-zoom::after {
    width: 2px;
    height: 10px;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

.proy-item:hover .proy-icono-zoom {
    -webkit-transform: scale(1);
    transform: scale(1);
}

/* -> Lightbox */
.proy-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, background-color 0.35s ease;
    -webkit-overflow-scrolling: touch;
}

.proy-lightbox.activo {
    opacity: 1;
    pointer-events: all;
    background-color: rgba(0, 0, 0, 0.92);
}

/* -> Contenido lightbox */
.proy-lb-contenido {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 85vh;
    -webkit-transform: scale(0.94);
    transform: scale(0.94);
    transition: -webkit-transform 0.35s ease;
    transition: transform 0.35s ease;
}

.proy-lightbox.activo .proy-lb-contenido {
    -webkit-transform: scale(1);
    transform: scale(1);
}

/* -> Imagen lightbox */
.proy-lb-imagen {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--aas-radius);
    -webkit-user-select: none;
    user-select: none;
}

/* -> Botones lightbox */
.proy-lb-cerrar,
.proy-lb-anterior,
.proy-lb-siguiente {
    position: fixed;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease, opacity 0.2s ease;
    opacity: 0.7;
    -webkit-tap-highlight-color: transparent;
}

.proy-lb-cerrar:hover,
.proy-lb-anterior:hover,
.proy-lb-siguiente:hover {
    opacity: 1;
    color: var(--e-global-color-primary, #ffffff);
}

.proy-lb-cerrar {
    top: 20px;
    right: 24px;
    font-size: 36px;
    z-index: 100001;
}

.proy-lb-anterior {
    left: 20px;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    font-size: 52px;
    z-index: 100001;
}

.proy-lb-siguiente {
    right: 20px;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    font-size: 52px;
    z-index: 100001;
}

/* -> Contador lightbox */
.proy-lb-contador {
    position: fixed;
    bottom: 22px;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    letter-spacing: 0.06em;
    z-index: 100001;
}

/* -> Responsive 768px */
@media (max-width: 768px) {
    .proy-encabezado {
        margin-bottom: 20px;
    }

    .proy-titulo {
        font-size: 24px;
    }

    .proy-hijos {
        grid-template-columns: repeat(2, 1fr);
        gap: 3px;
    }

    .proy-hijo-overlay {
        padding: 12px 10px;
    }

    .proy-hijo-nombre {
        font-size: 12px;
    }

    .proy-galeria {
        grid-template-columns: repeat(3, 1fr);
        gap: 3px;
    }

    .proy-item .proy-item-hover {
        opacity: 1;
        background-color: rgba(0, 0, 0, 0.25);
    }

    .proy-icono-zoom {
        -webkit-transform: scale(1);
        transform: scale(1);
        width: 22px;
        height: 22px;
    }

    .proy-lb-cerrar {
        font-size: 28px;
        top: 14px;
        right: 16px;
    }

    .proy-lb-anterior {
        left: 10px;
        font-size: 38px;
    }

    .proy-lb-siguiente {
        right: 10px;
        font-size: 38px;
    }

    .proy-lb-contenido {
        max-width: 96vw;
    }

    .proy-lb-imagen {
        max-height: 78vh;
    }
}
