/* ==========================================================================
   Team Member List — Elementor Widget
   ========================================================================== */

.tml-list {
    display: flex;
    flex-direction: column;
}

/* --- Item --- */
.tml-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.tml-item:last-child {
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .tml-item {
        grid-template-columns: repeat(12, 1fr);
        align-items: stretch;
        gap: 0;
        column-gap: 0;
        margin-bottom: 0;
    }

    .tml-item__text {
        grid-row: 1;
        display: flex;
        flex-direction: column;
        z-index: 1;
    }

    .tml-item__text-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .tml-item__media {
        grid-row: 1;
        width: auto;
        height: auto;
    }

    /* 4-step cascade — text: 3 cols, image: 3 cols */

    /* Row 1: cols 4–10 */
    .tml-item--pos-0 .tml-item__text  { grid-column: 4 / 7; }
    .tml-item--pos-0 .tml-item__media { grid-column: 7 / 10; }

    /* Row 2: cols 6–12 */
    .tml-item--pos-1 .tml-item__text  { grid-column: 6 / 9; }
    .tml-item--pos-1 .tml-item__media { grid-column: 9 / 12; }

    /* Row 3: cols 1–7 */
    .tml-item--pos-2 .tml-item__text  { grid-column: 1 / 4; }
    .tml-item--pos-2 .tml-item__media { grid-column: 4 / 7; }

    /* Row 4: cols 3–9 */
    .tml-item--pos-3 .tml-item__text  { grid-column: 3 / 6; }
    .tml-item--pos-3 .tml-item__media { grid-column: 6 / 9; }
}

/* --- Text block --- */
.tml-item__name {
    font-family: var(--font-display, sans-serif);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 500;
    margin: 0 0 6px;
    color: var(--color-primary, #1a1a1a);
}

.tml-item__position {
    font-family: var(--font-body, sans-serif);
    font-size: 0.9375rem;
    color: var(--color-primary, #1a1a1a);
    margin: 0 0 4px;
}

.tml-item__email {
    font-family: var(--font-body, sans-serif);
    font-size: 0.9375rem;
    color: var(--color-primary, #1a1a1a);
    text-decoration: none;
    display: block;
    margin-bottom: 32px;
}

.tml-item__email:hover {
    text-decoration: underline;
}

.tml-item__divider {
    display: none;
}

@media (min-width: 768px) {
    .tml-item__divider {
        display: block;
        height: 1px;
        background-color: var(--color-primary, #1a1a1a);
        opacity: 0.2;
    }
}

/* --- Image --- */
.tml-item__media {
    overflow: hidden;
    aspect-ratio: 1 / 1;
    width: 100%;
}

@media (min-width: 768px) {
    .tml-item__media {
        width: 100%;
    }
}

.tml-item__media .tml-item__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tml-item__img-placeholder {
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
}

/* --- No results --- */
.tml-no-results {
    font-family: var(--font-body, sans-serif);
    font-size: 1rem;
    color: var(--color-muted, #a0a0a0);
    text-align: center;
    padding: 40px 0;
}
