/*
Theme Name: Astra Child - Red de Emprendedores
Theme URI: https://tudominio.com
Description: Tema child de Astra para Red de Emprendedores y Mentores
Author: Tu Nombre
Author URI: https://tudominio.com
Template: astra
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astra-child
*/

/* ===========================================
   VARIABLES CSS
   =========================================== */
:root {
    --color-primary: #2196F3;
    --color-secondary: #667eea;
    --color-accent: #764ba2;
}

/* ===========================================
   ESTILOS GENERALES
   =========================================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===========================================
   CONTENEDOR PRINCIPAL DE PROYECTOS
   =========================================== */
.proyectos-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===========================================
   FILTROS - LAYOUT EN UNA SOLA FILA
   =========================================== */
.proyectos-filtros {
    background: #f8f9fa;
    padding: 25px 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filtros-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: nowrap;
}

.filtro-item {
    flex-shrink: 0;
}

.filtro-item:nth-child(1) {
    /* Categorías */
    width: 180px;
}

.filtro-item:nth-child(2) {
    /* Regiones */
    width: 160px;
}

.filtro-item:nth-child(3) {
    /* Ordenar */
    width: 150px;
}

.filtro-busqueda-item {
    /* Buscador - toma el espacio restante */
    flex: 1;
    min-width: 200px;
}

.filtro-input,
.filtro-select {
    width: 100%;
    padding: 11px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background: white;
    height: 44px;
}

.filtro-input:focus,
.filtro-select:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.filtro-select.loading {
    opacity: 0.6;
    pointer-events: none;
}

.btn-buscar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-buscar:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.btn-buscar i {
    margin: 0;
}

.btn-limpiar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-limpiar:hover {
    background: #d32f2f;
    text-decoration: none;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.btn-limpiar i {
    margin: 0;
}

/* ===========================================
   INFORMACIÓN DE RESULTADOS
   =========================================== */
.proyectos-resultados {
    margin-bottom: 30px;
}

.resultados-info {
    color: #666;
    font-size: 15px;
    font-weight: 500;
}

.busqueda-activa {
    background: #FFF3E0;
    color: #F57C00;
    padding: 8px 15px;
    border-radius: 6px;
    display: inline-block;
    margin-right: 10px;
    font-weight: 600;
}

.busqueda-activa i {
    color: #FF9800;
}

.busqueda-relevanssi {
    background: #E8F5E9;
    color: #2E7D32;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 8px;
    font-weight: 600;
    text-transform: uppercase;
}

.filtros-activos-info {
    background: #E3F2FD;
    color: #1976D2;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filtros-activos-info i {
    color: #2196F3;
}

/* ===========================================
   GRID DE PROYECTOS - 3 COLUMNAS POR DEFECTO
   =========================================== */
.proyectos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

/* Variantes de columnas configurables */
.proyectos-grid.grid-1-cols {
    grid-template-columns: 1fr;
}

.proyectos-grid.grid-2-cols {
    grid-template-columns: repeat(2, 1fr);
}

.proyectos-grid.grid-3-cols {
    grid-template-columns: repeat(3, 1fr);
}

.proyectos-grid.grid-4-cols {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ===========================================
   CARD DE PROYECTO
   =========================================== */
.proyecto-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.proyecto-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.proyecto-imagen {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.proyecto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.proyecto-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
}

.proyecto-estado {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.estado-idea { color: #9C27B0; }
.estado-desarrollo { color: #FF9800; }
.estado-mvp { color: #2196F3; }
.estado-operativo { color: #4CAF50; }
.estado-escalando { color: #F44336; }

.proyecto-contenido {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.proyecto-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.tag-categoria {
    background: #E3F2FD;
    color: #1976D2;
}

.tag-region {
    background: #FFF3E0;
    color: #F57C00;
}

.proyecto-titulo {
    font-size: 1.3rem;
    margin-bottom: 12px;
    line-height: 1.3;
}

.proyecto-titulo a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.proyecto-titulo a:hover {
    color: #2196F3;
}

.proyecto-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
}

.proyecto-keywords {
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

.proyecto-keywords i {
    margin-right: 5px;
    color: #2196F3;
}

.proyecto-acciones {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.btn-ver-mas,
.btn-unirse {
    flex: 1;
    padding: 10px 20px;
    border-radius: 25px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-ver-mas {
    background: transparent;
    border: 2px solid #2196F3;
    color: #2196F3;
}

.btn-ver-mas:hover {
    background: #2196F3;
    color: white;
    text-decoration: none;
}

.btn-unirse {
    background: #2196F3;
    color: white;
    border: 2px solid #2196F3;
}

.btn-unirse:hover {
    background: #1976D2;
    border-color: #1976D2;
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
}

/* ===========================================
   NO HAY PROYECTOS
   =========================================== */
.no-proyectos {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.no-proyectos i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-proyectos h3 {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 10px;
}

/* ===========================================
   PAGINACIÓN
   =========================================== */
.proyectos-paginacion {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.proyectos-paginacion ul {
    display: flex;
    list-style: none;
    gap: 5px;
    padding: 0;
    margin: 0;
}

.proyectos-paginacion li {
    margin: 0;
}

.proyectos-paginacion a,
.proyectos-paginacion span {
    display: block;
    padding: 10px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.proyectos-paginacion a:hover {
    background: #2196F3;
    color: white;
    border-color: #2196F3;
}

.proyectos-paginacion .current {
    background: #2196F3;
    color: white;
    border-color: #2196F3;
}

/* ===========================================
   EFECTOS DE JAVASCRIPT
   =========================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #2196F3;
    z-index: 9999;
    gap: 15px;
    font-weight: 600;
}

.loading-overlay i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.filtros-activos-badge {
    display: inline-block;
    background: #FF5722;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
    vertical-align: middle;
}

.proyecto-estado[title] {
    cursor: help;
}

/* ===========================================
   PROYECTO INDIVIDUAL (SINGLE)
   =========================================== */
.proyecto-banner {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    margin-bottom: 40px;
}

.proyecto-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.proyecto-estado-banner {
    position: absolute;
    top: 30px;
    right: 30px;
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.proyecto-single-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.proyecto-header {
    margin-bottom: 40px;
}

.proyecto-titulo-single {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #333;
}

.proyecto-meta-info {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    color: #666;
}

.proyecto-meta-info > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-tag {
    background: #E3F2FD;
    color: #1976D2;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
}

.proyecto-keywords-single {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    color: #666;
}

.proyecto-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-bottom: 60px;
}

.proyecto-contenido-main {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.entry-content {
    line-height: 1.8;
    font-size: 16px;
    color: #444;
}

.entry-content p {
    margin-bottom: 20px;
}

.proyecto-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.proyecto-cta-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.proyecto-cta-box h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.btn-unirse-grande {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 15px 35px;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
    margin-bottom: 15px;
}

.btn-unirse-grande:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    text-decoration: none;
    color: #667eea;
}

.cta-description {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.proyecto-info-box {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.proyecto-info-box h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
}

.proyecto-info-box p {
    margin-bottom: 10px;
    color: #666;
}

.proyecto-info-box i {
    margin-right: 8px;
    color: #2196F3;
}

.social-share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    color: white;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
}

.share-btn:hover {
    transform: translateY(-3px);
    text-decoration: none;
    color: white;
}

.share-btn.facebook { background: #3b5998; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.whatsapp { background: #25d366; }

.proyecto-navegacion {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 30px 0;
    border-top: 2px solid #eee;
}

.nav-proyecto {
    padding: 20px;
    background: white;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-proyecto:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-decoration: none;
}

.nav-label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.nav-title {
    display: block;
    font-weight: 600;
    color: #2196F3;
}

.next-proyecto {
    text-align: right;
}

@media (max-width: 992px) {
    .proyecto-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .proyecto-titulo-single {
        font-size: 2rem;
    }
    
    .proyecto-navegacion {
        grid-template-columns: 1fr;
    }
}

/* ===========================================
   MEJORAS BUDDYPRESS
   =========================================== */
#buddypress .activity-list li {
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* ===========================================
   RESPONSIVE
   =========================================== */

/* Tablets grandes (hasta 1200px) */
@media (max-width: 1200px) {
    .filtro-item:nth-child(1) {
        width: 160px;
    }
    
    .filtro-item:nth-child(2) {
        width: 140px;
    }
    
    .filtro-item:nth-child(3) {
        width: 130px;
    }
    
    .filtro-busqueda-item {
        min-width: 180px;
    }
}

/* Tablets (hasta 992px) */
@media (max-width: 992px) {
    .filtros-form {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .filtro-item:nth-child(1),
    .filtro-item:nth-child(2),
    .filtro-item:nth-child(3) {
        width: calc(33.333% - 7px);
    }
    
    .filtro-busqueda-item {
        width: calc(100% - 100px);
        min-width: unset;
    }
    
    .btn-buscar,
    .btn-limpiar {
        width: 44px;
    }
    
    /* Grid de proyectos: 2 columnas */
    .proyectos-grid,
    .proyectos-grid.grid-3-cols,
    .proyectos-grid.grid-4-cols {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .proyectos-grid.grid-1-cols {
        grid-template-columns: 1fr;
    }
}

/* Móviles (hasta 768px) */
@media (max-width: 768px) {
    .proyectos-container {
        padding: 20px 15px;
    }
    
    .proyectos-filtros {
        padding: 20px;
    }
    
    .filtros-form {
        flex-direction: column;
        gap: 12px;
    }
    
    .filtro-item:nth-child(1),
    .filtro-item:nth-child(2),
    .filtro-item:nth-child(3),
    .filtro-busqueda-item {
        width: 100%;
    }
    
    .btn-buscar,
    .btn-limpiar {
        width: 100%;
        height: 44px;
    }
    
    /* Grid de proyectos: 1 columna */
    .proyectos-grid,
    .proyectos-grid.grid-2-cols,
    .proyectos-grid.grid-3-cols,
    .proyectos-grid.grid-4-cols {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .proyecto-imagen {
        height: 200px;
    }
    
    .proyecto-acciones {
        flex-direction: column;
    }
    
    .btn-ver-mas,
    .btn-unirse {
        width: 100%;
    }
}

/* Móviles pequeños (hasta 480px) */
@media (max-width: 480px) {
    .filtro-input,
    .filtro-select {
        font-size: 13px;
        padding: 10px 12px;
        height: 42px;
    }
    
    .btn-buscar,
    .btn-limpiar {
        height: 42px;
    }
}

/* ===========================================
   ANIMACIONES
   =========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.proyecto-card {
    animation: fadeInUp 0.6s ease backwards;
}

.proyecto-card:nth-child(1) { animation-delay: 0.1s; }
.proyecto-card:nth-child(2) { animation-delay: 0.2s; }
.proyecto-card:nth-child(3) { animation-delay: 0.3s; }
.proyecto-card:nth-child(4) { animation-delay: 0.4s; }
.proyecto-card:nth-child(5) { animation-delay: 0.5s; }
.proyecto-card:nth-child(6) { animation-delay: 0.6s; }