.trombinoscope-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 0;
    max-width: 100%;
}

.trombinoscope-item {
    position: relative;
    width: 140px;
    flex: 0 0 140px;
    aspect-ratio: 500 / 700;
    overflow: hidden;
    border-radius: 4px;
    background: transparent;
}

.trombinoscope-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.trombinoscope-decoration svg {
    width: 100%;
    height: 100%;
    display: block;
}

.trombinoscope-photo {
    position: absolute;
    top: 4.2857%;
    left: 6%;
    width: 88%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    z-index: 2;
}

.trombinoscope-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.trombinoscope-overlay {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 28.5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    padding: 0.25rem;
    pointer-events: none;
    z-index: 3;
}

.trombinoscope-name {
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.1;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.trombinoscope-role {
    font-size: 0.65rem;
    font-style: italic;
    opacity: 0.8;
}

@media (max-width: 480px) {
    .trombinoscope-grid {
        gap: 0.75rem;
    }

    .trombinoscope-item {
        width: 130px;
        flex: 0 0 130px;
    }

    .trombinoscope-name {
        font-size: 0.8rem;
    }

    .trombinoscope-role {
        font-size: 0.65rem;
    }
}

.trombinoscope-grid.table-mode {
    padding: 0;
    gap: 0.5rem;
    justify-content: center;
}

.trombinoscope-grid.table-mode .trombinoscope-item {
    width: 120px;
    flex: 0 0 120px;
    aspect-ratio: unset;
    height: auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
}

.trombinoscope-grid.table-mode .trombinoscope-photo {
    position: static;
    width: 60px;
    height: 60px;
    margin-bottom: 0.25rem;
}

.trombinoscope-grid.table-mode .trombinoscope-overlay {
    position: static;
    transform: none;
    width: 100%;
    height: auto;
    color: var(--color-black);
    padding: 0;
}

.trombinoscope-grid.table-mode .trombinoscope-name {
    font-size: 0.95rem;
    text-shadow: none;
    text-align: center;
}

.member-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 180px;
}

.member-photo-inline {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.member-name-inline {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-black);
}

.trombinoscope-grid.agent {
    gap: 1rem;
    padding: 0.5rem 0;
    justify-content: center;
}

.trombinoscope-grid.agent .trombinoscope-item {
    width: 120px;
    flex: 0 0 120px;
    aspect-ratio: unset;
    height: auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
}

.trombinoscope-grid.agent .trombinoscope-photo {
    position: static;
    width: 100%;
    max-width: 120px;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0f2fe;
    margin-bottom: 0.5rem;
}

.trombinoscope-grid.agent .trombinoscope-image-placeholder {
    width: 100%;
    max-width: 120px;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #10b981);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white, #ffffff);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.trombinoscope-grid.agent .trombinoscope-info-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.trombinoscope-grid.agent .trombinoscope-name {
    position: static;
    color: var(--color-black, #1e293b);
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.2;
    text-transform: none;
    text-shadow: none;
    margin: 0 0 0.25rem 0;
}

.trombinoscope-grid.agent .trombinoscope-role {
    display: block;
    font-size: 0.65rem;
    color: #64748b;
    font-style: normal;
    opacity: 1;
    line-height: 1.2;
    word-wrap: break-word;
    max-width: 100%;
}

@media (max-width: 580px) {
    .trombinoscope-grid.agent {
        gap: 0.75rem;
        padding: 0.5rem 0;
    }
    
    .trombinoscope-grid.agent .trombinoscope-item {
        flex: 1 1 125px;
        max-width: 150px;
    }

    .trombinoscope-grid.agent .trombinoscope-photo,
    .trombinoscope-grid.agent .trombinoscope-image-placeholder {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
    
    .trombinoscope-grid.agent .trombinoscope-image-placeholder {
        font-size: 1.1rem;
    }
    
    .trombinoscope-grid.agent .trombinoscope-name {
        font-size: 0.75rem;
    }
    
    .trombinoscope-grid.agent .trombinoscope-role {
        font-size: 0.6rem;
    }
}
