/* ============================================================
   Top Companies Block – Frontend Styles
   Matches the light-blue card grid design from the screenshot
   ============================================================ */

/* ── Section wrapper ──────────────────────────────────────── */
.tcb-top-companies {
    padding: 36px 0 40px;
    font-family: inherit;
}

.tcb-top-companies.tcb-empty {
    padding: 20px;
    color: #888;
    font-size: 14px;
}

/* ── Section title ────────────────────────────────────────── */
.tcb-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a73c8;
    margin: 0 0 24px;
    padding: 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

/* ── Grid ─────────────────────────────────────────────────── */
.tcb-companies-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, 1fr); /* fallback */
}

.tcb-companies-grid.tcb-col-2 { grid-template-columns: repeat(2, 1fr); }
.tcb-companies-grid.tcb-col-3 { grid-template-columns: repeat(3, 1fr); }
.tcb-companies-grid.tcb-col-4 { grid-template-columns: repeat(4, 1fr); }
.tcb-companies-grid.tcb-col-5 { grid-template-columns: repeat(5, 1fr); }
.tcb-companies-grid.tcb-col-6 { grid-template-columns: repeat(6, 1fr); }

@media ( max-width: 1024px ) {
    .tcb-companies-grid.tcb-col-6,
    .tcb-companies-grid.tcb-col-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media ( max-width: 768px ) {
    .tcb-companies-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px;
    }
}

@media ( max-width: 480px ) {
    .tcb-companies-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ── Card ─────────────────────────────────────────────────── */
.tcb-company-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* ── Logo wrapper – the white rounded card ────────────────── */
.tcb-company-logo-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #ffffff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 16px;
    box-sizing: border-box;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.tcb-company-link:hover .tcb-company-logo-wrap,
.tcb-company-logo-wrap:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* ── Logo image ───────────────────────────────────────────── */
.tcb-company-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ── Placeholder when no logo ─────────────────────────────── */
.tcb-company-logo-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #d0e8f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tcb-company-logo-placeholder span {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a73c8;
    line-height: 1;
    text-transform: uppercase;
}

/* ── Company name ─────────────────────────────────────────── */
.tcb-company-name {
    margin: 10px 0 4px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #5b7fa6;
    line-height: 1.3;
    padding: 0;
}

.tcb-company-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}

.tcb-company-name a:hover {
    color: #1a73c8;
}

/* ── Company description ──────────────────────────────────── */
.tcb-company-description {
    margin: 0;
    font-size: 0.82rem;
    color: #7a94b0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Link wrapper reset ───────────────────────────────────── */
.tcb-company-link {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
}