/* =========================================================
   catalog.css — company directory (companies.html)
   Shared parts (header, footer, buttons, cards…) are in main.css
   ========================================================= */

/* ---------- HERO + SEARCH ---------- */
.catalog-hero {
    padding-top: 55px;
}

.catalog-search {
    margin-top: 25px;
}

.catalog-search .search-input .field {
    box-shadow: 0 8px 24px rgba(19, 73, 128, .07);
}

.filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}


/* ---------- ACTIVE FILTERS + TOOLBAR ---------- */
.catalog-results {
    padding-top: 26px;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 13px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    background: var(--tint);
    color: var(--blue-bright);
    font-size: var(--fs-sm);
    font-weight: 650;
    transition: background-color var(--transition);
}

.filter-chip:hover {
    background: #dcebfc;
}

.clear-filters {
    margin-left: 4px;
    color: var(--blue-bright);
    font-size: var(--fs-sm);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.results-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.results-count {
    color: var(--muted);
}

.sort {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: var(--fs-sm);
}

.sort .field {
    width: 150px;
    height: 40px;
    font-size: 13px;
}


/* ---------- COMPANY CARDS ---------- */
.company-list {
    display: grid;
    gap: 14px;
}

.company-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) 180px 140px;
    align-items: center;
    gap: 18px;
    padding: 20px;
}

/* Text logo placeholder (later: <img> of the real logo) */
.company-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    font-weight: 900;
    line-height: .85;
    letter-spacing: -.04em;
}

.company-logo span {
    font-size: 23px;
}

.company-logo small {
    margin-top: 5px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
}

.logo-abc { color: #143765; }
.logo-tech { color: #1261c8; }
.logo-natura { color: #4d9b43; }
.logo-polbuild { color: #4e4e4e; }
.logo-polbuild span { color: #d72727; }
.logo-itcore { color: #155dcc; }

.company-main {
    min-width: 0;
}

.company-main h2 {
    font-size: var(--fs-lg);
}

.company-main h2 a:hover {
    color: var(--blue-bright);
}

.company-meta {
    display: flex;
    flex-wrap: wrap;
    margin-top: 4px;
    color: #607695;
    font-size: 13px;
}

.company-meta span + span::before {
    content: "•";
    margin: 0 8px;
    color: #9aa9bc;
}

.company-location {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    color: #526a89;
    font-size: 13px;
}

.company-location .icon {
    width: 14px;
    height: 14px;
}

.company-description {
    display: -webkit-box;
    max-width: 620px;
    margin: 8px 0 10px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.company-markets {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 18px;
    border-left: 1px solid var(--line);
}

.company-markets span {
    color: var(--muted-light);
    font-size: var(--fs-sm);
}

.company-markets p {
    margin-top: 5px;
    color: #294669;
    font-size: 13px;
    line-height: 1.55;
}

.company-markets strong {
    color: var(--blue-bright);
}

.company-action {
    display: flex;
    justify-content: flex-end;
}


/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .company-card {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .company-markets {
        grid-column: 1 / -1;
        padding: 14px 0 0;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .company-action {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 680px) {
    .filters {
        grid-template-columns: 1fr;
    }

    .results-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

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

    .company-card {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 16px;
    }

    .company-logo {
        width: 76px;
        height: 76px;
    }

    .company-action .btn {
        width: 100%;
    }
}


/* ---------- SORT LINKS (PHP version) ---------- */
.sort a {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--navy);
    font-size: var(--fs-sm);
    font-weight: 600;
}

.sort a.is-active {
    border-color: var(--navy);
    background: var(--navy);
    color: var(--white);
}

.company-logo .logo-initials {
    font-size: 24px;
}
