/* ==========================================================================
   LIGHTBOX GALERIA - PRADO DESIGN STUDIO
   ========================================================================== */

body.lightbox-open {
    overflow: hidden !important;
}

.prado-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.prado-lightbox.is-active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 5, 5, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.lightbox-container {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px;
    box-sizing: border-box;
}

.lightbox-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 50px;
    padding: 0 10px;
    color: #ffffff;
}

.lightbox-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lightbox-category-badge {
    background-color: #1f1f1f;
    border: 1px solid #3a3a3a;
    color: #ffffff;
    font-family: var(--font-heading, sans-serif);
    font-size: 13px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lightbox-counter {
    font-size: 14px;
    color: #888888;
    font-weight: 600;
    letter-spacing: 1px;
}

.lightbox-btn-close {
    background: #1a1a1a;
    border: 1px solid #333333;
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
}

.lightbox-btn-close:hover {
    transform: scale(1.1);
    background-color: #2c2c2c;
    border-color: #555555;
}

.lightbox-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.lightbox-content {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
    transform: scale(0.96);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.prado-lightbox.is-active .lightbox-image.is-loaded {
    transform: scale(1);
    opacity: 1;
}

.lightbox-video-container {
    width: 100%;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    max-height: calc(100vh - 140px);
    background-color: #000000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transform: scale(0.96);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.prado-lightbox.is-active .lightbox-video-container.is-loaded {
    transform: scale(1);
    opacity: 1;
}

.lightbox-video-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid #333333;
    color: #ffffff;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 25;
    transition: transform 0.2s, background-color 0.2s, border-color 0.2s, opacity 0.2s;
}

.lightbox-btn-prev {
    left: 16px;
}

.lightbox-btn-next {
    right: 16px;
}

.lightbox-nav-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
}

.lightbox-nav-btn:hover {
    transform: translateY(-50%) scale(1.12);
    background-color: #2c2c2c;
    border-color: #666666;
}

.lightbox-nav-btn.is-hidden {
    display: none !important;
}

/* --- OVERLAY NO CARD DO PROJETO NA HOME --- */
.projeto-slide {
    cursor: pointer;
}

.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.slide-info {
    max-width: 70%;
}

.slide-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-family: var(--font-heading, sans-serif);
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.slide-title {
    font-family: var(--font-heading, sans-serif);
    font-size: 28px;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 6px;
}

.slide-description {
    font-size: 14px;
    color: #cccccc;
    line-height: 1.4;
}

.btn-open-gallery {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #ffffff;
    color: #000000;
    font-family: var(--font-heading, sans-serif);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    padding: 14px 24px;
    border: 0;
    outline: none;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: auto;
    white-space: nowrap;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.btn-open-gallery svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
    flex-shrink: 0;
}

.projeto-slide:hover .btn-open-gallery {
    transform: scale(1.06);
    background-color: #f5f5f5;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .lightbox-container {
        padding: 16px 12px 24px;
    }

    .lightbox-topbar {
        height: 44px;
        padding: 0 4px;
        margin-bottom: 8px;
    }

    .lightbox-btn-close {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .lightbox-nav-btn {
        width: 44px;
        height: 44px;
    }

    .lightbox-btn-prev {
        left: 8px;
    }

    .lightbox-btn-next {
        right: 8px;
    }

    .lightbox-image {
        max-width: 100%;
        max-height: 100%;
        border-radius: 8px;
    }

    .slide-overlay {
        padding: 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .slide-info {
        max-width: 100%;
    }

    .slide-title {
        font-size: 22px;
    }

    .slide-description {
        display: none;
    }
}
