/* ============================================================================
   tools.css - the "All Tools" directory page (tools.php) only
   ============================================================================
   Loaded by:  tools.php
   Purpose:    Modern tool-card grid (3 per row), the sticky search + category
               filter toolbar, filter pills, per-category accent colours and
               the category headings.
   NOTE:       tools.php also loads homepage.css; this file is NOT used on
               individual tool pages.
   ============================================================================ */

.tools-directory {
    --brand: #198754;
}

/* ---------------- Toolbar: search + category filter ---------------- */
.tools-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 16px;
    padding: 14px 18px;
    margin: 22px 0 6px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
    position: sticky;
    top: 8px;
    z-index: 20;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa3af;
    pointer-events: none;
}

.search-box input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px 12px 42px;
    border: 1px solid #73be9b;
    border-radius: 12px;
    font-size: 15px;
    color: #1f2d3d;
    background: #f8fafc;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.15);
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-pill {
    border: 1px solid #73be9b;
    background: #fff;
    color: #475467;
    padding: 9px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    transition: all .2s ease;
    white-space: nowrap;
}

.filter-pill:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.filter-pill.active {
    background: var(--brand, #198754);
    border-color: var(--brand, #198754);
    color: #fff;
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.25);
}

/* ---------------- Per-category accent colours ---------------- */
.category-green  { --accent: #198754; }
.category-teal   { --accent: #00a5b2; }
.category-amber  { --accent: #d4880f; }
.category-purple { --accent: #7209d4; }
.category-blue   { --accent: #2832d4; }
.category-orange { --accent: #e67e22; }

.category-red    { --accent: #dc3545; }

.category-pink   { --accent: #d63384; }

.category-indigo { --accent: #6610f2; }
/* ---------------- Category heading ---------------- */
.tool-category-heading {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 24px;
    font-weight: 400;
    color: #198754;
    margin: 32px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eef0f4;
}

.tool-category-heading::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 26px;
    border-radius: 6px;
    background: var(--accent, #198754);
}

/* ---------------- Tool grid (3 per row) ---------------- */
.tool-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 0 0 10px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.tool-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(16, 24, 40, 0.12);
    border-color: var(--accent, #198754);
}

.tool-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent, #198754);
    color: #fff;
    font-size: 20px;
    margin-bottom: 14px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.h5-tool-card {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
}

.h5-tool-card a {
    color: #1f2d3d;
    text-decoration: none;
    transition: color .2s;
    font-size: 19px;
    font-weight: 400;
}

.h5-tool-card a:hover {
    color: var(--accent, #198754);
    text-decoration: underline;
}

p.tool-description {
    margin: 0;
    color: #667085;
    font-size: 15.5px;
    line-height: 1.55;
}

/* ---------------- No results ---------------- */
.no-results {
    display: none;
    text-align: center;
    color: #667085;
    padding: 46px 0;
    font-size: 16px;
}

/* ---------------- Legacy/removed bits kept harmless ---------------- */
.select-container { display: none; }
.form-select { width: 25%; }
#categoryFilter { display: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 991px) {
    .tool-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .tool-list { grid-template-columns: 1fr; }
    .tools-toolbar { position: static; }
    .filter-pills {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
    }
}
