/**
 * Team Grid Widget — CSS
 *
 * Enqueue:
 *   wp_enqueue_style( 'team-grid-style',
 *       get_stylesheet_directory_uri() . '/custom-addons/assets/css/team-grid.css',
 *       [], '1.0.0' );
 */

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.tg-wrapper {
    width: 100%;
    font-family: inherit;
}

/* ── Section Title ───────────────────────────────────────────────────────── */
.tg-section-title {
    font-size: 32px;
    font-weight: 800;
    color: #0d1b3e;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.5px;
    margin: 0 0 40px;
}

/* ── Grid ────────────────────────────────────────────────────────────────── */
.tg-grid {
    display: grid;
    gap: 16px;
    width: 100%;
}

/* Column variants */
.tg-cols-2 { grid-template-columns: repeat(2, 1fr); }
.tg-cols-3 { grid-template-columns: repeat(3, 1fr); }
.tg-cols-4 { grid-template-columns: repeat(4, 1fr); }
.tg-cols-5 { grid-template-columns: repeat(5, 1fr); }

/* ── Card ────────────────────────────────────────────────────────────────── */
.tg-card {
    background: #ffffff;
    border: 1px solid #e8ecf2;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.22s ease, transform 0.22s ease;
    box-shadow: 0 1px 6px rgba(13, 27, 62, 0.06);
}

.tg-card:hover {
    box-shadow: 0 6px 24px rgba(13, 27, 62, 0.12);
    transform: translateY(-3px);
}

/* ── Card Image ──────────────────────────────────────────────────────────── */
.tg-card-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
    background-color: #d6e4f7;
    position: relative;
    flex-shrink: 0;
}

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

.tg-card:hover .tg-card-image img {
    transform: scale(1.04);
}

/* ── Card Body ───────────────────────────────────────────────────────────── */
.tg-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    flex: 1;
}

/* ── Card Info ───────────────────────────────────────────────────────────── */
.tg-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tg-member-name {
    font-size: 13px;
    font-weight: 700;
    color: #0d1b3e;
    letter-spacing: 0.2px;
    line-height: 1.3;
    font-family: inherit;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tg-member-role {
    font-size: 12px;
    color: #5a6a80;
    line-height: 1.4;
    font-family: inherit;
    display: block;
}

/* ── LinkedIn Button ─────────────────────────────────────────────────────── */
.tg-linkedin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #e8f0fe;
    color: #2563eb;
    flex-shrink: 0;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tg-linkedin-btn:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.tg-linkedin-btn svg {
    display: block;
}

/* ── Center last row ─────────────────────────────────────────────────────── */
/* JS adds .tg-last-row--wrap around last row items when centering is on */
.tg-last-row-wrap {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: inherit;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media ( max-width: 1024px ) {
    .tg-cols-4,
    .tg-cols-5 { grid-template-columns: repeat(3, 1fr); }
}

@media ( max-width: 768px ) {
    .tg-cols-3,
    .tg-cols-4,
    .tg-cols-5 { grid-template-columns: repeat(2, 1fr); }
    .tg-section-title { font-size: 24px; }
}

@media ( max-width: 480px ) {
    .tg-cols-2,
    .tg-cols-3,
    .tg-cols-4,
    .tg-cols-5 { grid-template-columns: repeat(2, 1fr); }
    .tg-card-image { height: 100px; }
    .tg-member-name { font-size: 11px; }
    .tg-member-role { font-size: 10px; }
}
