/* =============================================================================
   HERRAMIENTAS MODERNAS - SISTEMA CSS MCMPEDIATRIA
   ============================================================================= */

.herramientas-container {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(14, 165, 233, 0.02) 100%);
    min-height: 80vh;
    padding: 2rem 0;
}

.herramientas-header {
    text-align: center;
    margin-bottom: 3rem;
}

.herramientas-header h1 {
    color: var(--color-primary);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
}

.herramientas-header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-radius: 2px;
}

.herramientas-subtitle {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Sistema de Búsqueda */
.search-container {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.1);
}

.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 2px solid rgba(14, 165, 233, 0.2);
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    font-size: 1.2rem;
}

/* Filtros de Categoría */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.category-filter {
    padding: 8px 16px;
    border: 2px solid rgba(14, 165, 233, 0.2);
    background: white;
    color: var(--color-text);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
}

.category-filter:hover,
.category-filter.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    text-decoration: none;
    transform: translateY(-2px);
}

/* Grid de Herramientas */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tool-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(14, 165, 233, 0.1);
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(14, 165, 233, 0.2);
    text-decoration: none;
    color: inherit;
}

.tool-card:hover .tool-image img {
    transform: scale(1.05);
}

.tool-image {
    height: 180px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.tool-image img {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.tool-platform {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}

.platform-badge {
    background: rgba(14, 165, 233, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.platform-badge.android {
    background: #34d399;
}

.platform-badge.ios {
    background: #60a5fa;
}

.platform-badge.web {
    background: #f59e0b;
}

.tool-content {
    padding: 1.5rem;
}

.tool-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.tool-description {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(14, 165, 233, 0.1);
    color: var(--color-primary);
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.tool-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(14, 165, 233, 0.1);
}

.tool-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--color-text-secondary);
    font-size: 0.8rem;
}

.rating-stars {
    color: #fbbf24;
    font-size: 0.9rem;
}

.tool-action {
    background: var(--color-primary);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tool-action:hover {
    background: var(--color-secondary);
    text-decoration: none;
    color: white;
    transform: translateX(5px);
}

/* Secciones Específicas */
.section-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    background: white;
    border-radius: 15px;
    padding: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.section-tab {
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--color-text-secondary);
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0 0.25rem;
}

.section-tab.active,
.section-tab:hover {
    background: var(--color-primary);
    color: white;
    text-decoration: none;
}

/* Estado Sin Resultados */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-secondary);
}

.no-results i {
    font-size: 3rem;
    color: rgba(14, 165, 233, 0.3);
    margin-bottom: 1rem;
}

.no-results h3 {
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .herramientas-header h1 {
        font-size: 2rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .category-filter {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .section-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .tool-footer {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .herramientas-container {
        padding: 1rem 0;
    }
    
    .herramientas-header {
        margin-bottom: 2rem;
    }
    
    .tool-card {
        margin-bottom: 1rem;
    }
    
    .tool-image {
        height: 150px;
    }
    
    .tool-image img {
        max-width: 100px;
        max-height: 100px;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card {
    animation: fadeInUp 0.6s ease forwards;
}

.tool-card:nth-child(even) {
    animation-delay: 0.1s;
}

.tool-card:nth-child(3n) {
    animation-delay: 0.2s;
}

/* Estados de carga */
.loading-state {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: var(--color-text-secondary);
}

.loading-spinner {
    border: 3px solid rgba(14, 165, 233, 0.1);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-right: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}