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

/* Desktop layout (default > 768px): Side-by-side (1 col Parent, 3 cols Child) */
.cza-company-structure-container {
    display: grid;
    gap: 24px;
    align-items: flex-start;
}

.cza-company-structure-container.has-children {
    grid-template-columns: 1fr 3fr;
}

.cza-company-structure-container.no-children {
    grid-template-columns: minmax(0, 280px);
}

.cza-parent-section,
.cza-child-section {
    min-width: 0;
    width: 100%;
}

/* Match parent card width precisely to daughter card width on desktop */
.cza-parent-section .cza-company-card {
    width: calc(100% - 13.333px);
}

/* Child Grid */
.cza-child-grid {
    display: grid;
    grid-template-columns: repeat(3, 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;
}

/* Card Styling */
.cza-company-card {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #f4f6f8;
    /* Light cool grey background */
    border: none;
    border-radius: 4px;
    padding: 24px;
    text-decoration: none;
    color: #1e293b;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    /* Force 1:1 square ratio for the entire card */
    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 {
    background: #eef2f6;
    box-shadow: inset 0 0 0 2px var(--e-global-color-accent, #3b82f6);
}

/* Badges & Titles */
.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%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 5px;
    background: white;
}

.cza-company-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    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);
}

/* Mobile responsive view (<= 768px): Stacked untereinander, 50% width parent card */
@media (max-width: 768px) {
    .cza-company-structure-container.has-children {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .cza-grid-header {
        margin-bottom: 12px;
    }

    .cza-child-header {
        margin-top: 12px;
    }

    .cza-company-card {
        padding: 16px;
    }

    .cza-parent-section .cza-company-card {
        width: calc(50% - 10px) !important;
    }

    .cza-child-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }
}