/* Tools Page Specific Styles */

.tools-hero {
    padding: 6rem 0 3rem;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.tools-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tools-hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Search and Filter Controls */
.tools-controls {
    padding: 2rem 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 66px;
    z-index: 100;
}

.tools-controls .container {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

#tool-search {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

#tool-search:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.filter-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-section label {
    color: var(--text-secondary);
    font-weight: 500;
}

#category-filter {
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#category-filter:focus {
    outline: none;
    border-color: var(--accent-red);
}

.tools-count {
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

#tools-count {
    color: var(--accent-red);
    font-weight: 700;
}

/* Tools Grid */
.tools-section {
    padding: 3rem 0;
    min-height: 60vh;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-red);
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.tool-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.tool-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(220, 38, 38, 0.1);
    color: var(--accent-red);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.tool-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.tool-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.tool-source {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.tool-link {
    color: var(--accent-red);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: opacity 0.3s ease;
}

.tool-link:hover {
    opacity: 0.8;
}

.tool-link svg {
    width: 14px;
    height: 14px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results p {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .tools-hero h1 {
        font-size: 2rem;
    }

    .tools-hero .subtitle {
        font-size: 1rem;
    }

    .tools-controls .container {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: 100%;
    }

    .filter-section {
        width: 100%;
        justify-content: space-between;
    }

    #category-filter {
        flex: 1;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .tools-controls {
        top: 58px;
    }
}

@media (max-width: 480px) {
    .tools-controls {
        top: 54px;
    }
}

/* Active nav link */
.nav-links a.active {
    color: var(--accent-red);
}

/* Loading state */
.tools-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Smooth transitions */
.tool-card {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

