/* ===================================
   GALERÍA DE EQUIPOS - ESTILOS
   =================================== */

:root {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --secondary-color: #3b82f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   SECCIÓN PRINCIPAL
   =================================== */

/* ===================================
   BOTÓN REGRESAR
   =================================== */

.back-button-container {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 1000;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-white);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: var(--shadow-md);
}

.btn-back:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-back i {
    font-size: 1rem;
    transition: var(--transition);
}

.btn-back:hover i {
    transform: translateX(-4px);
}

.gallery-section {
    padding: 6rem 0 4rem;
    background: linear-gradient(to bottom, var(--bg-light) 0%, var(--bg-white) 100%);
    min-height: 100vh;
}

/* ===================================
   ENCABEZADO DE SECCIÓN
   =================================== */

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
    padding: 0 1rem;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
}

/* ===================================
   FILTROS DE GALERÍA
   =================================== */

.gallery-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 0 1rem;
    flex-wrap: wrap;
}

.filter-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.filter-btn i {
    font-size: 1rem;
}

.gallery-count {
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    background: var(--bg-light);
    border-radius: 50px;
    white-space: nowrap;
}

.gallery-count span {
    color: var(--primary-color);
    font-size: 1.125rem;
}

/* ===================================
   GRID DE GALERÍA
   =================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

/* ===================================
   TARJETAS DE GALERÍA
   =================================== */

.gallery-card {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: scale(1);
}

.gallery-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
}

.gallery-card.hidden {
    display: none;
}

/* Wrapper de Imagen */
.gallery-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* Aspect ratio 4:3 */
    overflow: hidden;
    background: var(--bg-light);
}

.gallery-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-card:hover .gallery-img {
    transform: scale(1.05);
}

/* Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(16, 185, 129, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.view-btn {
    background: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.view-btn:hover {
    transform: scale(1.1);
}

.view-btn i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Contenido de Tarjeta */
.gallery-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gallery-category {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 50px;
    width: fit-content;
}

.gallery-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0;
}

.gallery-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ===================================
   MENSAJE SIN RESULTADOS
   =================================== */

.no-results {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 1.5rem;
}

.no-results h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.no-results p {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ===================================
   LIGHTBOX MODAL
   =================================== */

.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: lightboxZoom 0.3s ease;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

#lightboxImg {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
}

.lightbox-info {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 12px;
    max-width: 600px;
}

.lightbox-category {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.lightbox-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.lightbox-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Controles del Lightbox */
.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10000;
}

.lightbox-close:hover {
    background: var(--primary-color);
    transform: rotate(90deg);
}

.lightbox-close i {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.lightbox-close:hover i {
    color: white;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10000;
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-nav:hover {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav i {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.lightbox-nav:hover i {
    color: white;
}

.lightbox-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .gallery-section {
        padding: 4rem 0 3rem;
    }

    .section-header {
        margin-bottom: 3rem;
    }

    .gallery-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .filter-buttons {
        justify-content: center;
    }

    .filter-btn {
        flex: 1;
        min-width: 140px;
        justify-content: center;
    }

    .gallery-count {
        text-align: center;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .lightbox-content {
        padding: 1rem;
    }

    .lightbox-info {
        padding: 1.5rem;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-prev {
        left: 1rem;
    }

    .lightbox-next {
        right: 1rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .filter-btn span {
        display: none;
    }

    .filter-btn {
        min-width: auto;
        padding: 0.75rem 1rem;
    }
}