.tools-gallery {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
}

.gallery-header {
    text-align: center !important;
    margin-bottom: 60px;
    position: relative;
    width: 100%;
    display: block;
    clear: both;
}

.gallery-header::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: #2c2c2c;
    border-radius: 2px;
}

.gallery-header h1 {
    font-size: 3.2rem;
    color: #2c2c2c;
    margin: 0 auto 20px auto;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-align: center !important;
    display: block;
    width: 100%;
}

.gallery-subtitle {
    color: #666;
    font-size: 1.3rem;
    margin: 0 auto 15px auto;
    line-height: 1.6;
    font-weight: 400;
    text-align: center !important;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.gallery-description {
    color: #888;
    font-size: 1rem;
    margin: 0 auto;
    line-height: 1.5;
    text-align: center !important;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
    padding: 0 20px;
}

.category-filters > * {
    margin: 7px;
}

.filter-btn {
    padding: 15px 30px;
    border: 2px solid #e8e9ea;
    background: rgba(255, 255, 255, 0.9);
    color: #2c2c2c;
    border-radius: 60px;
    cursor: pointer;
    transition: all 0.4s ease;
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: inline-block;
    text-decoration: none;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.3);
    transition: left 0.6s;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover {
    border-color: #2c2c2c;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(44, 44, 44, 0.15);
}

.filter-btn.active {
    background: #2c2c2c;
    color: white;
    border-color: #2c2c2c;
    box-shadow: 0 8px 25px rgba(44, 44, 44, 0.3);
}

.search-container {
    max-width: 500px;
    margin: 0 auto 40px;
    position: relative;
    padding: 0 20px;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e8e9ea;
    border-radius: 50px;
    font-size: 1rem;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    box-sizing: border-box;
    outline: none;
}

.search-input:focus {
    border-color: #2c2c2c;
    box-shadow: 0 4px 20px rgba(44, 44, 44, 0.1);
}

.search-input::placeholder {
    color: #999;
}

.search-icon {
    position: absolute;
    right: 35px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.2rem;
    pointer-events: none;
}

.tools-count {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
}

.tools-grid {
    display: flex;
    flex-wrap: wrap;
    margin: -15px;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #2c2c2c;
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.tool-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(44, 44, 44, 0.03) 0%, transparent 70%);
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.tool-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(44, 44, 44, 0.15);
    border-color: rgba(44, 44, 44, 0.2);
    background: rgba(255, 255, 255, 1);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card:hover::after {
    width: 200px;
    height: 200px;
}

.tool-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.tool-icon {
    font-size: 2.2rem;
    margin-right: 15px;
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 16px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.tool-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.6);
    transition: left 0.6s;
}

.tool-card:hover .tool-icon {
    background: #2c2c2c;
    color: white;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(44, 44, 44, 0.3);
}

.tool-card:hover .tool-icon::before {
    left: 100%;
}

.tool-card {
    width: calc(33.333% - 30px);
    margin: 15px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(229, 229, 229, 0.5);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    min-width: 320px;
    box-sizing: border-box;
}

.tool-card:hover .tool-title {
    color: #1a1a1a;
}

.tool-description {
    color: #666;
    line-height: 1.7;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.tool-card:hover .tool-description {
    color: #555;
}

.tool-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c2c2c;
    margin: 0;
    flex: 1;
    line-height: 1.4;
    transition: color 0.3s ease;
    word-wrap: break-word;
    hyphens: auto;
    overflow-wrap: break-word;
}

.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.no-results {
    text-align: center;
    padding: 80px 20px;
    color: #666;
    display: none;
}

.no-results.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

.no-results-icon {
    font-size: 5rem;
    margin-bottom: 25px;
    opacity: 0.2;
    filter: grayscale(100%);
}

.no-results h3 {
    font-size: 1.5rem;
    color: #2c2c2c;
    margin-bottom: 10px;
    font-weight: 600;
}

.no-results p {
    font-size: 1.1rem;
    color: #888;
}

.loading-state {
    display: none;
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2c2c2c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tool-card:active {
    transform: translateY(-6px) scale(1.01);
    transition: all 0.1s ease;
}

/* Responsive usando float y porcentajes */
@media (max-width: 1200px) {
    .tool-card {
        width: calc(50% - 30px);
    }
}

@media (max-width: 1024px) {
    .tools-grid {
        margin: -12px;
    }
    
    .tool-card {
        margin: 12px;
        width: calc(50% - 24px);
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .tools-gallery {
        padding: 20px 15px;
    }
    
    .gallery-header h1 {
        font-size: 2.5rem;
    }
    
    .gallery-subtitle {
        font-size: 1.1rem;
        max-width: 90%;
        padding: 0 10px;
    }
    
    .gallery-description {
        max-width: 90%;
        padding: 0 10px;
    }
    
    .search-container {
        padding: 0 15px;
    }
    
    .tools-grid {
        margin: -10px;
    }
    
    .tool-card {
        width: calc(100% - 20px);
        margin: 10px;
        min-width: auto;
    }
    
    .category-filters {
        margin-bottom: 30px;
    }
    
    .category-filters > * {
        margin: 5px;
    }
    
    .filter-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .tool-card {
        padding: 25px;
    }
    
    .tool-icon {
        width: 55px;
        height: 55px;
        font-size: 1.8rem;
    }
    
    .tool-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .gallery-header h1 {
        font-size: 2rem;
    }
    
    .gallery-subtitle {
        max-width: 95%;
        padding: 0 5px;
        font-size: 1rem;
    }
    
    .gallery-description {
        max-width: 95%;
        padding: 0 5px;
        font-size: 0.9rem;
    }
    
    .tool-card {
        padding: 20px;
    }
    
    .category-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    .tool-header {
        flex-direction: column;
        text-align: center;
    }
    
    .tool-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
}