/* Page Header */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Category Filter */
.category-filter {
    padding: 2rem 0;
    background: white;
    border-bottom: 2px solid #f0f0f0;
}

.search-section {
    max-width: 600px;
    margin: 0 auto 2rem;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 3.5rem 1rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1rem;
    transition: border-color 0.3s;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 1.2rem;
    pointer-events: none;
}

.search-input::placeholder {
    color: #999;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    color: #333;
}

.filter-btn:hover,
.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Tools Section */
.tools-section {
    padding: 3rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    color: #333;
}

.tools-count {
    color: #666;
    font-size: 1rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    position: relative;
}

.tool-icon .iconfont {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 75px;
    height: 75px;
    border-radius: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 2.2rem;
    position: relative;
    overflow: visible;
}

.tool-icon .iconfont::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border-radius: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.tool-card:hover .tool-icon .iconfont::after {
    opacity: 1;
}

.tool-card:hover .tool-icon .iconfont {
    transform: translateY(-8px) rotate(8deg) scale(1.15);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}

/* Different colors based on category */
.tool-card[data-category="calculation"] .tool-icon .iconfont {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}
.tool-card[data-category="conversion"] .tool-icon .iconfont {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}
.tool-card[data-category="analysis"] .tool-icon .iconfont {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}
.tool-card[data-category="design"] .tool-icon .iconfont {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 6px 20px rgba(67, 233, 123, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}
.tool-card[data-category="maintenance"] .tool-icon .iconfont {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 6px 20px rgba(250, 112, 154, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}
.tool-card[data-category="monitoring"] .tool-icon .iconfont {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    box-shadow: 0 6px 20px rgba(48, 207, 208, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}
.tool-card[data-category="utility"] .tool-icon .iconfont {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}

.tool-card[data-category="calculation"]:hover .tool-icon .iconfont {
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}
.tool-card[data-category="conversion"]:hover .tool-icon .iconfont {
    box-shadow: 0 12px 35px rgba(245, 87, 108, 0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}
.tool-card[data-category="analysis"]:hover .tool-icon .iconfont {
    box-shadow: 0 12px 35px rgba(79, 172, 254, 0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}
.tool-card[data-category="design"]:hover .tool-icon .iconfont {
    box-shadow: 0 12px 35px rgba(67, 233, 123, 0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}
.tool-card[data-category="maintenance"]:hover .tool-icon .iconfont {
    box-shadow: 0 12px 35px rgba(250, 112, 154, 0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}
.tool-card[data-category="monitoring"]:hover .tool-icon .iconfont {
    box-shadow: 0 12px 35px rgba(48, 207, 208, 0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}
.tool-card[data-category="utility"]:hover .tool-icon .iconfont {
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}

.iconfont {
    display: inline-block;
}

.tool-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.tool-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.tool-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f0f0f0;
    color: #667eea;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
}

@media (max-width: 768px) {
    .page-header {
        padding: 2rem 0;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .category-filter {
        padding: 1.5rem 0;
    }
    
    .search-section {
        margin-bottom: 1.5rem;
    }
    
    .search-input {
        padding: 0.875rem 3rem 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .filter-buttons {
        gap: 0.75rem;
    }
    
    .filter-btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .tools-section {
        padding: 2rem 0;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }
    
    .tools-count {
        font-size: 0.95rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .tool-card {
        padding: 1.25rem;
    }
    
    .tool-icon {
        font-size: 2rem;
        margin-bottom: 0.875rem;
    }
    
    .tool-icon .iconfont {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }
    
    .tool-card h3 {
        font-size: 1.1rem;
    }
    
    .tool-card p {
        font-size: 0.85rem;
    }
    
    .tool-category {
        font-size: 0.75rem;
        padding: 0.2rem 0.65rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 1.5rem 0;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .page-header p {
        font-size: 0.9rem;
    }
    
    .category-filter {
        padding: 1.25rem 0;
    }
    
    .search-input {
        padding: 0.75rem 2.75rem 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .tools-section {
        padding: 1.5rem 0;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .tools-count {
        font-size: 0.9rem;
    }
    
    .tool-card {
        padding: 1rem;
    }
    
    .tool-icon {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .tool-icon .iconfont {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }
    
    .tool-card h3 {
        font-size: 1rem;
    }
    
    .tool-card p {
        font-size: 0.8rem;
    }
    
    .no-results {
        padding: 2rem 1rem;
        font-size: 0.9rem;
    }
}

