/* ═══════ UNIFORM CARD SYSTEM ═══════ */

/* ─── Client cards: equal height, centered logos ─── */
.clients-grid {
    grid-auto-rows: 1fr;
}

.client-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1.8rem 1.5rem;
}

.client-card-logo {
    width: 100%;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
    flex-shrink: 0;
}

.client-card-logo img {
    max-width: 160px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: saturate(0.9);
    transition: filter 0.3s;
}

.client-card:hover .client-card-logo img {
    filter: saturate(1.1);
}

/* Override old img rules inside client-card */
.client-card > img {
    max-width: 160px;
    height: 80px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1.2rem;
    flex-shrink: 0;
}

.client-card h3,
.client-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
    text-align: center;
}

.client-card p {
    font-size: 0.86rem;
    line-height: 1.6;
    text-align: center;
    color: var(--secondary-text);
    flex-grow: 1;
}

/* ─── Case study cards: uniform grid ─── */
.case-cards {
    grid-auto-rows: 1fr;
}

.case-card {
    display: flex;
    flex-direction: column;
}

.case-card-img {
    height: 170px;
    flex-shrink: 0;
}

.case-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1.4rem 1.5rem 1.5rem;
}

.case-card-body h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.case-card-body p {
    flex-grow: 1;
}

.case-card-link {
    margin-top: auto;
    padding-top: 0.5rem;
}

/* ─── Architecture diagrams in case study detail pages ─── */
.architecture-diagram {
    margin: 0 0 2.5rem;
    border-radius: var(--radius, 14px);
    overflow: hidden;
    border: 1px solid var(--border-color, #e5ddd3);
    box-shadow: var(--shadow-md, 0 8px 25px rgba(30,42,58,0.08));
    background: var(--secondary-bg, #f7f3ee);
}

.architecture-diagram img,
.architecture-diagram svg {
    width: 100%;
    height: auto;
    display: block;
}

.architecture-diagram .diagram-caption {
    text-align: center;
    padding: 0.8rem 1rem;
    font-size: 0.82rem;
    color: var(--muted-text, #7a8da0);
    font-weight: 600;
    border-top: 1px solid var(--border-color, #e5ddd3);
    background: var(--card-bg, #fff);
}

@media (max-width: 768px) {
    .client-card-logo {
        height: 70px;
    }
    .client-card-logo img,
    .client-card > img {
        max-height: 60px;
        max-width: 140px;
    }
}
