/* Estilos Customizados para Galeria de Fotos e Vídeos — SPA Terraplanagem */

/* Botões de Filtro */
.filter-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #e0580c; /* earth-500 */
    transition: width 0.3s ease;
}

.filter-btn.active {
    color: #e0580c; /* earth-500 */
    font-weight: 700;
}

.filter-btn.active::after {
    width: 100%;
}

.filter-btn:hover::after {
    width: 100%;
}

/* Cards da Galeria */
.gallery-item {
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item.hidden-item {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
    pointer-events: none;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    border: none;
}

/* Efeitos de Hover nos Cards */
.media-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: #0f172a; /* base-900 para fundo de imagens */
}

.media-card img, 
.media-card video {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.media-card:hover img {
    transform: scale(1.05);
}

.media-overlay {
    background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.4) 60%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.media-card:hover .media-overlay {
    opacity: 1;
}

/* Modal do Lightbox */
.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background-color: rgba(15, 23, 42, 0.95); /* base-900 opaco */
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.lightbox-content {
    max-width: 90vw;
    max-height: 80vh;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

/* Estilo do Vídeo na Modal */
.lightbox-video {
    width: 100%;
    max-height: 80vh;
    outline: none;
    background-color: #000;
}

/* Botões do Lightbox */
.lightbox-btn {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transition: all 0.2s ease;
}

.lightbox-btn:hover {
    background-color: #e0580c; /* earth-500 */
    border-color: #e0580c;
    color: #ffffff;
    transform: scale(1.05);
}

/* Indicador de Tipo de Mídia (Ícone Flutuante no Card) */
.media-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.5rem;
    border-radius: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.media-card:hover .media-badge {
    background-color: #e0580c; /* earth-500 */
    border-color: #e0580c;
    transform: scale(1.1);
}
