/* Container styling */
.cza-company-structure-wrapper {
    width: 100%;
    margin: 20px 0;
}

.cza-company-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Grid Headers */
.cza-grid-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: #002d72; /* Dark corporate blue */
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.cza-parent-header {
    grid-column: span 1;
}

.cza-child-header {
    grid-column: span 3;
}

/* Card Styling */
.cza-company-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #f4f6f8; /* Light cool grey background as shown in the image */
    border: none;
    border-radius: 4px;
    padding: 30px;
    text-decoration: none;
    color: #1e293b;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1; /* Force 1:1 square ratio for the entire card */
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Subtle hover feedback */
.cza-company-card:hover {
    background: #eaedf1;
    transform: translateY(-2px);
}

.cza-company-card.is-current {
    /* Optional visual highlight for current post, but keep it clean */
    background: #eef2f6;
    box-shadow: inset 0 0 0 2px var(--e-global-color-accent, #3b82f6);
}

/* Badges & Titles (hidden by default to match image, but styled if toggled on) */
.cza-company-card-header {
    margin-bottom: 12px;
}

.cza-company-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 9999px;
    background: #e2e8f0;
    color: #475569;
    display: inline-block;
}

.cza-company-name {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 12px 0 0 0;
}

/* Logos & Placeholders */
.cza-company-logo-wrap {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cza-company-logo {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Centers logo without cropping */
    transition: transform 0.3s ease;
}

.cza-company-card:hover .cza-company-logo {
    transform: scale(1.03);
}

/* Letter placeholder */
.cza-company-logo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

/* Desktop Grid Spacer */
@media (min-width: 769px) {
    .cza-grid-spacer {
        display: block;
        grid-column: span 1;
    }
}

/* Mobile responsive view */
@media (max-width: 768px) {
    .cza-company-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    .cza-grid-header {
        margin-bottom: 8px;
        grid-column: unset;
        grid-row: unset;
    }
    
    .cza-child-header {
        margin-top: 12px;
    }
    
    .cza-company-card {
        aspect-ratio: 1 / 1;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .cza-grid-spacer {
        display: none;
    }
}
