/* Tools Grid Page Layout */
.tools-grid-page {
    width: 100%;
    margin-bottom: auto;
    /* Push footer down, keep content up */
    display: block;
    align-self: flex-start;
    /* Ensure it sticks to top in flex container */
    flex: 0 0 auto;
    /* Don't grow or shrink */
}

/* Header Box — invisible grouping container */
.header-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 48px;
}

/* Tools Grid Page Layout */
h1 {
    margin-top: 40px;
    margin-bottom: 8px;
}

.page-description {
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Search Bar Styling */
.search-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0;
}

#toolSearch {
    width: 100%;
    padding: 16px 20px 16px 52px;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text-color);
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

#toolSearch:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    color: var(--text-muted);
    pointer-events: none;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    grid-column: 1 / -1;
    display: none;
}

.tools-grid {
    transition: opacity 0.2s;
}

/* Dark mode adjustments */
body.dark-mode #toolSearch {
    background: #1f2937;
    border-color: #374151;
}

body.dark-mode #toolSearch:focus {
    border-color: #3b82f6;
}