/* Estilos específicos para la galería */

.gallery-header {
    padding-top: 6rem;
    background-color: var(--color-primary);
    text-align: center;
    padding-bottom: 2rem;
}

.gallery-header h1 {
    margin-bottom: 1rem;
}

.gallery-header p {
    font-size: 1.2rem;
    color: var(--color-dark);
    max-width: 700px;
    margin: 0 auto;
}

/* Categorías de navegación */
.category-nav {
    background-color: white;
    padding: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.category-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.category-button {
    background-color: transparent;
    border: 2px solid var(--color-secondary);
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    color: var(--color-secondary);
    font-weight: 500;
    font-family: var(--font-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-button:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-dark);
}

.category-button.active {
    background-color: var(--color-secondary);
    color: white;
}

/* Galería */
.gallery {
    padding: 4rem 0;
    background-color: var(--color-light);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: white;
    transition: transform 0.3s ease;
    cursor: pointer;
    height: 350px;
}

.gallery-item:hover {
    transform: translateY(-10px);
}

.gallery-image {
    height: 100%;
    width: 100%;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

/* Overlay para información */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-info h3 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.gallery-info p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Estilos para videos */
.video-item .gallery-video {
    height: 100%;
    position: relative;
}

.video-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.video-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
    transition: transform 0.5s ease;
}

.video-item:hover .video-placeholder img {
    transform: scale(1.1);
}

.video-placeholder i {
    position: absolute;
    font-size: 4rem;
    color: white;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.7);
}

.video-placeholder video {
    display: none; /* Oculta el video, solo se usa para obtener la fuente */
}

.video-item:hover .video-placeholder i {
    opacity: 1;
    transform: scale(1.1);
}

/* Estilos para el modal de video */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
}

.video-modal-content video {
    width: 100%;
    border-radius: 5px;
}

.video-modal-close {
    position: absolute;
    top: -30px;
    right: 0;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* Formulario de subida */
.admin-upload {
    background-color: white;
    padding: 4rem 0;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.admin-note {
    color: var(--color-accent);
    font-style: italic;
    margin-bottom: 1.5rem;
    text-align: center;
}

.upload-form {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--color-light);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    font-family: var(--font-secondary);
    font-size: 1rem;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Responsive */
@media (max-width: 768px) {
    .category-button {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .gallery-item {
        height: 300px;
    }
    
    .gallery-info h3 {
        font-size: 1.1rem;
    }
    
    .gallery-info p {
        font-size: 0.8rem;
    }
    
    .video-placeholder i {
        font-size: 3rem;
    }
    
    .video-modal-content {
        width: 95%;
    }
}

@media (max-width: 576px) {
    .gallery-header h1 {
        font-size: 1.8rem;
    }
    
    .gallery-header p {
        font-size: 1rem;
    }
    
    .category-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }
    
    .category-button {
        width: 80%;
        text-align: center;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item {
        height: 280px;
    }
    
    .upload-form {
        padding: 1.5rem 1rem;
    }
}