/* ========================================
   Listado - Estilos específicos
   ======================================== */

.page-header {
    background: linear-gradient(135deg, var(--dark-color), #2c2c44);
    color: var(--white);
    padding: 80px 0 60px;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* ========================================
   Filtros y Búsqueda
   ======================================== */
.filters-section {
    padding: 40px 0;
    background: var(--light-color);
    position: sticky;
    top: 100px;
    z-index: 99;
    box-shadow: var(--shadow);
}

.filters-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.search-box {
    display: flex;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-right: none;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--primary-color);
}

.search-box button {
    padding: 12px 25px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--secondary-color);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--white);
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* ========================================
   Listado de Proyectos
   ======================================== */
.projects-list-section {
    padding: 60px 0;
}

.projects-count {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    font-weight: 600;
}

.projects-count span {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.project-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #999;
}

.project-meta i {
    margin-right: 5px;
    color: var(--primary-color);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    display: inline-block;
    padding: 5px 12px;
    background: var(--light-color);
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--text-color);
}

/* ========================================
   Paginación
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.page-btn {
    padding: 10px 15px;
    background: var(--white);
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    min-width: 45px;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .page-header {
        padding: 60px 0 40px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .filters-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-section {
        position: relative;
        top: 0;
    }
}

@media (max-width: 480px) {
    .project-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .filter-btn {
        flex: 1;
        min-width: 120px;
    }
}

/* ========================================
   Estados de carga
   ======================================== */
.loading {
    text-align: center;
    padding: 60px 0;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 10px;
}

.no-results p {
    color: #999;
}
