.ab-team-cards-widget,
.ab-team-cards-widget * {
    box-sizing: border-box;
}

.ab-team-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
    align-items: start;
}

.ab-team-card-wrap {
    min-width: 0;
}

.ab-team-card {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ab-team-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
}

.ab-team-card-media {
    position: relative;
    overflow: hidden;
    background: #f1f5f9;
    border-radius: 14px 14px 0 0;
}

.ab-team-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.ab-team-card:hover .ab-team-card-media img {
    transform: scale(1.045);
}

.ab-ratio-1-1 { aspect-ratio: 1 / 1; }
.ab-ratio-4-5 { aspect-ratio: 4 / 5; }
.ab-ratio-3-4 { aspect-ratio: 3 / 4; }
.ab-ratio-16-9 { aspect-ratio: 16 / 9; }

.ab-team-card-flag {
    position: absolute;
    left: 12px;
    bottom: 12px;
    width: 28px;
    height: 16px;
    border-radius: 3px;
    background: linear-gradient(to bottom, #0057b7 0 50%, #ffd700 50% 100%);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}

.ab-team-card-toggle {
    width: 100%;
    margin-top: 16px;
    padding: 13px 0 0;
    border: 0;
    border-top: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 0;
    background: transparent;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    box-shadow: none;
    transition: color 0.2s ease;
}

.ab-team-card-toggle:hover,
.ab-team-card.is-open .ab-team-card-toggle {
    color: #1d4ed8;
}

.ab-team-card-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 1;
    transform: translateY(-1px);
    transition: transform 0.25s ease;
}

.ab-team-card.is-open .ab-team-card-toggle-icon {
    transform: translateY(-1px) rotate(180deg);
}

.ab-team-card-body {
    padding: 20px 20px 22px;
}

.ab-team-card-name {
    margin: 0;
    color: #0f172a;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
}

.ab-team-card-position {
    margin-top: 7px;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}

.ab-team-card-panel {
    overflow: hidden;
    height: 0;
    margin-top: 12px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-top: 3px solid #2563eb;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: height 0.32s ease;
}

.ab-team-card-panel[hidden] {
    display: none;
}

.ab-team-card-experience-title {
    padding: 18px 20px 0;
    color: #2563eb;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ab-team-card-description {
    padding: 8px 20px 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.65;
}

.ab-team-card-description:first-child {
    padding-top: 18px;
}

.ab-team-card-description p {
    margin: 0 0 12px;
}

.ab-team-card-description p:last-child {
    margin-bottom: 0;
}

.ab-team-card-description:only-child,
.ab-team-card-experience-title:only-child {
    padding-bottom: 18px;
}

.ab-team-card-quote {
    margin: 14px 20px 18px;
    padding: 12px 14px;
    border-left: 3px solid #2563eb;
    background: rgba(241, 245, 249, 0.75);
    color: #475569;
    font-size: 13px;
    line-height: 1.55;
    font-style: italic;
}

.ab-team-card-description blockquote {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-left: 3px solid currentColor;
    background: rgba(241, 245, 249, 0.75);
    font-style: italic;
}

@media (max-width: 1024px) {
    .ab-team-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .ab-team-cards-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .ab-team-card-body {
        padding: 18px;
    }
}
