/*
Theme Name: Directorio Emprendedores SUD
Version: 1.0.6
*/

/* ========================================
   VARIABLES Y RESET
   ======================================== */
:root {
    --primary-blue: #2c5aa0;
    --secondary-blue: #1e4278;
    --gold-accent: #fbbf24;
    --white: #ffffff;
    --light-gray: #f3f4f6;
    --dark-gray: #374151;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background: var(--white);
}

body.mobile-menu-open {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========================================
   STATS GRID - FIX MOBILE
   ======================================== */
.stats-section {
    padding: 3rem 0;
    background: var(--light-gray);
}

.stats-section .container {
    padding: 0 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-item {
    text-align: center;
    background: var(--white);
    padding: 1.5rem 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 140px;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--gold-accent);
    margin-bottom: 0.5rem;
    display: block;
    line-height: 1;
}

.stat-label {
    color: var(--dark-gray);
    font-weight: 500;
    font-size: 0.85rem;
    line-height: 1.3;
    word-wrap: break-word;
    hyphens: auto;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.hidden {
    display: none !important;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary:hover {
    background: var(--secondary-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-secondary:hover {
    background: var(--light-gray);
    transform: translateY(-2px);
}

/* ========================================
   DIRECTORY GRID
   ======================================== */
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    .directory-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    /* Stats Grid Mobile - 1 COLUMNA */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
        max-width: 100%;
        margin: 1rem 0;
    }
    
    .stat-item {
        padding: 1.5rem 1rem;
        width: 100%;
        max-width: 100%;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 0.95rem;
        word-wrap: break-word;
    }
    
    .directory-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ========================================
   RESPONSIVE - VERY SMALL MOBILE
   ======================================== */
@media (max-width: 375px) {
    .stats-grid {
        padding: 0 0.5rem;
    }
    
    .stat-item {
        padding: 1.25rem 0.75rem;
    }
    
    .stat-number {
        font-size: 2.25rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
}

/* ========================================
   LOADING & FEEDBACK
   ======================================== */
.loading {
    display: none;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--light-gray);
    border-radius: 12px;
}

.no-results h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}


/* ========================================
   PAGE DIRECTORIO - FIXES
   ======================================== */

/* Hero Section Directorio */
.archive-hero {
    background: linear-gradient(135deg, #2c5aa0, #1e4278) !important;
    color: white !important;
    padding: 3rem 0 !important;
    margin-bottom: 2rem !important;
}

.archive-hero h1 {
    color: white !important;
    font-size: 2.5rem !important;
    margin-bottom: 1rem !important;
}

.archive-hero .hero-subtitle {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1.1rem !important;
}

/* Search Section */
.search-section {
    background: white !important;
    padding: 3rem 0 !important;
}

.search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.search-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.search-form .form-group {
    display: flex;
    flex-direction: column;
}

.search-form label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.search-form input,
.search-form select {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

.search-form input:focus,
.search-form select:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.search-btn {
    background: #2c5aa0;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn:hover {
    background: #1e4278;
    transform: translateY(-2px);
}

.filter-actions {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

#clear-filters-btn {
    background: #ef4444;
    color: white;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

#clear-filters-btn:hover {
    background: #dc2626;
}

/* Results Section */
.results-section {
    padding: 3rem 0;
    background: white;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.results-header h2 {
    color: #2c5aa0;
    font-size: 2rem;
}

.results-count {
    color: #6b7280;
    font-weight: 500;
}

/* Directory Grid */
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* CTA Section */
.cta-section {
    background: #2c5aa0;
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* Responsive Directorio */
@media (max-width: 768px) {
    .archive-hero h1 {
        font-size: 1.8rem !important;
    }
    
    .archive-hero .hero-subtitle {
        font-size: 1rem !important;
    }
    
    .search-form {
        grid-template-columns: 1fr !important;
        padding: 1rem;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .results-header h2 {
        font-size: 1.5rem;
    }
    
    .directory-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
}