/* ==========================================================================
   BARRA DE FILTROS & BUSCADOR EN TIEMPO REAL
   ========================================================================== */
.utilities-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(30, 30, 30, 0.98) 0%, rgba(20, 20, 20, 0.98) 100%);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.utilities-filters__header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.utilities-filters__label {
    color: #f3f3f3;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.utilities-counter-badge {
    font-size: 11px;
    background: rgba(154, 205, 50, 0.12);
    color: #9acd32;
    border: 1px solid rgba(154, 205, 50, 0.3);
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 700;
}

.utilities-search-box {
    position: relative;
    min-width: 240px;
}

.utilities-search-box input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 999px;
    padding: 8px 16px 8px 36px;
    font-size: 13px;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.utilities-search-box input:focus {
    outline: none;
    border-color: #9acd32;
    box-shadow: 0 0 0 0.2rem rgba(154, 205, 50, 0.15);
}

.utilities-search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 13px;
}

.utilities-filters__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.utilities-filters .filter-btn {
    border-radius: 999px;
    min-height: 38px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #f4f4f4;
    transition: transform .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}

.utilities-filters .filter-btn:hover {
    transform: translateY(-1px);
    background: rgba(154, 205, 50, 0.12);
    border-color: rgba(154, 205, 50, 0.35);
    color: #fff;
}

.utilities-filters .filter-btn.is-active {
    background: linear-gradient(135deg, #9acd32 0%, #84cc16 100%);
    border-color: #9acd32;
    color: #111;
    box-shadow: 0 8px 18px rgba(154, 205, 50, 0.25);
}

/* Tarjetas e Interacción */
.tool-card-link {
    text-decoration: none !important;
    display: block;
    height: 100%;
}

.utilities-grid > [data-category] {
    transition: opacity .22s ease, transform .22s ease;
    will-change: opacity, transform;
}

.utilities-grid > [data-category].is-filtering-out {
    opacity: 0;
    transform: translateY(10px) scale(.985);
}

.utilities-grid > [data-category].is-filter-hidden {
    display: none !important;
}

.tool-card {
    position: relative;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 24px 20px;
    background: #181818;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.tool-card-link:hover .tool-card {
    transform: translateY(-4px);
    border-color: #9acd32;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

/* Estado desactivado / En construcción */
.tool-card.is-disabled {
    opacity: 0.55;
    border-color: rgba(255, 255, 255, 0.05);
    background: #141414;
    cursor: not-allowed;
}

.tool-card.is-disabled .btn-tool {
    color: #666 !important;
}

.tool-card .tool-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.84);
}

.tool-card .tool-badge.badge-dev {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #aaa;
}

.tool-card .icon-container {
    position: relative;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 22px;
    margin-bottom: 18px;
}

.utilities-grid > [data-category="informatica"] .icon-container {
    color: #9acd32;
    border-color: rgba(154, 205, 50, 0.28);
    background: rgba(154, 205, 50, 0.08);
}

.utilities-grid > [data-category="diseno"] .icon-container {
    color: #22d3ee;
    border-color: rgba(34, 211, 238, 0.28);
    background: rgba(34, 211, 238, 0.08);
}

.utilities-grid > [data-category="mecanica"] .icon-container {
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.08);
}

.tool-card h5 {
    font-size: 15px;
    line-height: 1.35;
    color: #fff;
    margin-bottom: 10px;
    font-weight: 700;
}

.tool-card p {
    font-size: 13px;
    line-height: 1.5;
    color: #aaa;
    margin-bottom: 20px;
}

.tool-card .btn-tool {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: #9acd32;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* Panel de Sin Resultados */
.no-results-panel {
    display: none;
    text-align: center;
    padding: 50px 20px;
    background: #181818;
    border: 1px dashed #333;
    border-radius: 12px;
    margin-top: 10px;
}

.no-results-panel i {
    font-size: 2.5rem;
    color: #555;
    margin-bottom: 12px;
}

/* Optimization Mobile */
@media (max-width: 767px) {
    .utilities-filters {
        padding: 14px 16px;
        gap: 12px;
    }

    .utilities-search-box {
        width: 100%;
        min-width: 100%;
    }

    .utilities-filters__actions {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .utilities-filters .filter-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .tool-card .icon-container {
        display: none;
    }

    .tool-card .tool-badge {
        position: static !important;
        display: inline-block;
        margin-bottom: 10px;
    }
}