/* Companies index — banner, filters, equal-height cards */

.companies-page-banner.section-box {
    margin-top: 0;
    padding-top: 75px;
}

.companies-page-banner .breacrumb-cover {
    width: 100%;
    min-height: 200px;
    padding: 64px 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center top;
    position: relative;
    overflow: hidden;
}

.companies-page-banner .breacrumb-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        transparent 55%,
        rgba(15, 23, 42, 0.35) 78%,
        rgba(15, 23, 42, 0.72) 100%
    );
}

.companies-page-banner .breacrumb-cover .container {
    position: relative;
    z-index: 1;
    max-width: 1320px;
}

.companies-page-banner .breacrumb-cover h2 {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    margin-bottom: 12px;
    color: #fff;
}

.companies-page-content.section-box {
    margin-top: 0 !important;
    padding: 40px 0 56px;
}

.companies-page-content .container {
    max-width: 1320px;
}

/* Company cards grid */

.company-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 0;
}

@media (min-width: 576px) {
    .company-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .company-cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.company-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 280px;
    padding: 28px 22px 22px;
    background: #fff;
    border: 1px solid #e8eef8;
    border-radius: 14px;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.company-card:hover {
    border-color: #c7e9d9;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.company-card--inactive {
    opacity: 0.72;
    background: #f8fafc;
}

.company-card--inactive:hover {
    opacity: 0.9;
}

.company-card__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 1px solid rgba(28, 167, 116, 0.35);
    overflow: hidden;
    background: #fff;
    flex-shrink: 0;
}

.company-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.company-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

.company-card__name {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    min-height: 2.7em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #05264e;
}

.company-card__name a {
    color: inherit;
    text-decoration: none;
}

.company-card__name a:hover {
    color: #1ca774;
}

.company-card__location {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 auto 16px;
    min-height: 24px;
    font-size: 13px;
    color: #8b97a8;
    padding-left: 18px;
    background: url(../imgs/template/icons/location.svg) no-repeat 0 4px;
    background-size: 12px;
}

.company-card__footer {
    margin-top: auto;
    padding-top: 8px;
}

.company-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.company-card__cta--active {
    color: #fff;
    background: #1ca774;
}

.company-card__cta--active:hover {
    color: #fff;
    background: #159a63;
    text-decoration: none;
}

.company-card__cta--empty {
    color: #64748b;
    background: #e2e8f0;
    cursor: default;
    pointer-events: none;
}

.company-card__cta-count {
    font-variant-numeric: tabular-nums;
}

.companies-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 16px;
}

.companies-empty h5 {
    margin-bottom: 8px;
    color: #05264e;
}

.companies-empty p {
    color: #8b97a8;
    margin-bottom: 0;
}

/* Sidebar filters */

.companies-filters .filter-block.head-border h5 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 16px;
}

.companies-filters .link-reset {
    font-size: 13px;
    font-weight: 600;
    color: #1ca774;
    text-decoration: none;
}

.companies-filters .form-control,
.companies-filters .select2-container .select2-selection--single {
    height: 42px !important;
    min-height: 42px;
    border-radius: 8px;
    border-color: #e0e6f7;
    font-size: 14px;
}

.companies-filters .select2-container {
    width: 100% !important;
}

/* Đã chọn: chỉ highlight chữ — không đổi viền / nền ô */
.companies-filters .companies-filter-field.has-value > .form-control:not(.select2-hidden-accessible),
.companies-filters .companies-filter-field.has-value .select2-container .select2-selection--single .select2-selection__rendered,
.companies-filters .select2-container.select2-has-value .select2-selection--single .select2-selection__rendered {
    color: #1ca774 !important;
    font-weight: 700 !important;
}

/*
 * Select2 dropdown is appended to <body>, so hover styles must be global.
 * companies-page.css only loads on /companies — safe to scope here.
 */
.select2-container--open .select2-dropdown {
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12) !important;
}

.select2-container--default .select2-results__option {
    padding: 10px 14px !important;
    font-size: 14px;
    color: #334155;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[aria-selected=true],
.select2-container--default .select2-results__option--highlighted[aria-selected=false],
.select2-container--default .select2-results__option:hover {
    background-color: #1ca774 !important;
    color: #fff !important;
    font-weight: 600;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #f0fdf4 !important;
    color: #1ca774 !important;
    font-weight: 700;
}

.select2-container--default .select2-results__option[aria-selected=true].select2-results__option--highlighted,
.select2-container--default .select2-results__option[aria-selected=true]:hover {
    background-color: #159a63 !important;
    color: #fff !important;
}
