/* Medilogik Team Grid widget styles */

.mlk-team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* ── Card ─────────────────────────────────────────────────────── */

.mlk-team-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    cursor: default;
}

.mlk-team-card:has(.mlk-card-overlay) {
    cursor: pointer;
}

/* ── Photo ────────────────────────────────────────────────────── */

.mlk-card-photo {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.mlk-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.4s ease;
}

.mlk-team-card:hover .mlk-card-photo img {
    transform: scale(1.05);
}

/* Initials fallback */
.mlk-card-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3B5B94 0%, #407DC9 100%);
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    font-family: inherit;
}

/* ── Info strip ───────────────────────────────────────────────── */

.mlk-card-info {
    padding: 1rem;
}

.mlk-card-info .mlk-card-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1F365E;
    line-height: 1.3;
    margin: 0 0 0.2rem;
    font-family: inherit;
}

.mlk-card-info .mlk-card-role {
    font-size: 0.75rem;
    font-weight: 500;
    color: #407DC9;
    margin: 0;
    font-family: inherit;
}

/* ── Hover overlay ────────────────────────────────────────────── */

.mlk-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(31, 54, 94, 0.95);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    pointer-events: none;
}

.mlk-team-card:hover .mlk-card-overlay {
    opacity: 1;
    pointer-events: auto;
}

.mlk-card-overlay .mlk-card-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 0.2rem;
    font-family: inherit;
}

.mlk-card-overlay .mlk-card-role {
    font-size: 0.75rem;
    font-weight: 500;
    color: #75BBFF;
    margin: 0 0 0.5rem;
    font-family: inherit;
}

.mlk-card-bio {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
    font-family: inherit;
}

/* ── Leadership card ──────────────────────────────────────────── */

.mlk-leadership-card {
    border-radius: 8px;
    overflow: hidden;
    background: #f9fafb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #407DC9;
    transition: box-shadow 0.2s ease;
}

.mlk-leadership-card:hover {
    box-shadow: 0 4px 16px rgba(31, 54, 94, 0.14);
}

.mlk-leader-photo {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.mlk-leader-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.4s ease;
}

.mlk-leadership-card:hover .mlk-leader-photo img {
    transform: scale(1.03);
}

.mlk-leader-body {
    padding: 1.5rem;
}

.mlk-leader-body .mlk-card-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1F365E;
    margin: 0 0 0.2rem;
    font-family: inherit;
    line-height: 1.3;
}

.mlk-leader-body .mlk-card-role {
    font-size: 0.875rem;
    font-weight: 500;
    color: #407DC9;
    margin: 0 0 0.2rem;
    font-family: inherit;
}

.mlk-card-dept {
    font-size: 0.72rem;
    font-weight: 600;
    color: #3B5B94;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.875rem;
    font-family: inherit;
}

.mlk-leader-body .mlk-card-bio {
    font-size: 0.875rem;
    color: #666666;
    line-height: 1.65;
    margin: 0;
    font-family: inherit;
}

/* ── Responsive defaults ──────────────────────────────────────── */

@media (max-width: 1024px) {
    .mlk-team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .mlk-team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .mlk-card-photo img { transition: none; }
    .mlk-card-overlay   { transition: none; }
}
