/**
 * Block: Nebula Teams
 * File: template-parts/blocks/nebula-teams/nebula-teams.css
 */

/* ─────────────────────────────────────────────
   SECTION WRAPPER
───────────────────────────────────────────── */
.nebula-teams {
    background-color: var(--scheme-bg, var(--zenith-green));
    color: var(--scheme-text, var(--nebula-blue));
    padding: 80px 0;
    overflow-x: clip;
}

.nebula-teams__wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.nebula-teams__inner {
    display: flex;
    flex-direction: column;
    gap: 56px;
}

/* ─────────────────────────────────────────────
   SECTION HEADER
───────────────────────────────────────────── */
.nebula-teams__header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.nebula-teams__eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--scheme-highlight, #BAD532 );
}

.nebula-teams__title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--scheme-text, #313A4C);
    line-height: 1.2;
    margin: 0;
}

/* ─────────────────────────────────────────────
   TEAM GROUP
───────────────────────────────────────────── */
.nebula-teams__group {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.nebula-teams__group-name {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--scheme-text, #313A4C);
    margin: 0;
}

.nebula-teams__group-name span {
    white-space: nowrap;
}

.nebula-teams__group-name::after {
    content: '';
    display: block;
    height: 3px;
    flex: 1;
    background: var(--scheme-highlight, var(--aurora-green),#BAD532);
    border-radius: 2px;
}

/* ─────────────────────────────────────────────
   TEAM GRID
───────────────────────────────────────────── */
.nebula-teams__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 48px 24px;
    justify-items: center;
    padding-top: 48px;
}

/* ─────────────────────────────────────────────
   TEAM CARD
───────────────────────────────────────────── */
.nebula-team-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 260px;
    position: relative;
    border-radius: 20px;
}

.nebula-team-card--expandable {
    cursor: default;
}

.nebula-team-card--expandable:focus-visible {
    outline: 2px solid var(--scheme-highlight, var(--aurora-green),#BAD532);
    outline-offset: 6px;
    border-radius: 20px;
}

/* ─────────────────────────────────────────────
   PHOTO WRAP
───────────────────────────────────────────── */
.nebula-team-card__photo-wrap {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 60px;
}

/* ─────────────────────────────────────────────
   GRADIENT CIRCLE
───────────────────────────────────────────── */
.nebula-team-card__circle {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    z-index: 0;
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────
   PHOTO
───────────────────────────────────────────── */
.nebula-team-card__photo {
    position: absolute;
    z-index: 2;
    width: 100%;
    aspect-ratio: 1;
    left: 50%;
    bottom: 15%;
    transform: translateX(-50%);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nebula-team-card:hover .nebula-team-card__photo {
    transform: translateX(-50%) translateY(-8px);
}

.nebula-team-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.nebula-team-card__photo--placeholder {
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
}

.nebula-team-card__photo--placeholder svg {
    width: 65%;
    height: 65%;
}

/* ─────────────────────────────────────────────
   PILL — name box
───────────────────────────────────────────── */
.nebula-team-card__pill {
    position: relative;
    z-index: 4;
    background: var(--nebula-blue, #313A4C);
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-top: -60px;
}

.nebula-team-card__pill-main {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
}

.nebula-team-card__pill-text {
    flex: 1;
    min-width: 0;
}

.nebula-team-card__name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 3px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nebula-team-card__role {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--scheme-highlight, #BAD532);
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nebula-team-card__pill-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.nebula-team-card__linkedin-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #313A4C;
    background: #FFFFFF;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
    padding: 2px;
    border-radius: 4px;
}
.nebula-team-card__linkedin-icon:visited {
    color: #313A4C;
    background: #FFFFFF;

}

.nebula-team-card__linkedin-icon:hover {
    background: var(--aurora-green, #BAD532);
    color: var(--nebula-blue, #313A4C);
}

/* Expand/collapse toggle button */
.nebula-team-card__expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    padding: 2px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.nebula-team-card__expand-btn:hover {
    color: #ffffff;
}

.nebula-team-card__expand-icon {
    transition: transform 0.3s ease;
    display: block;
}

/* Rotates arrow when expanded */
.nebula-team-card--expanded .nebula-team-card__expand-icon {
    transform: rotate(180deg);
}

/* ─────────────────────────────────────────────
   DESCRIPTION DRAWER
───────────────────────────────────────────── */
.nebula-team-card__desc-wrap {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 14px;
}

.nebula-team-card--expanded .nebula-team-card__desc-wrap {
    max-height: 600px;
    padding: 0 14px 14px;
}

.nebula-team-card__desc {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.65;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 12px;
}

.nebula-team-card__desc p {
    margin: 0 0 0.75em;
}

.nebula-team-card__desc p:last-child {
    margin-bottom: 0;
}

/* ─────────────────────────────────────────────
   MODAL
───────────────────────────────────────────── */
.nebula-teams__overlay {
    position: fixed;
    inset: 0;
    background: rgba(49, 58, 76, 0.65);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.nebula-teams__overlay--active {
    opacity: 1;
    pointer-events: all;
}

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 768px) {
    .nebula-teams {
        padding: 56px 0;
    }

    .nebula-teams__inner {
        gap: 40px;
    }

    .nebula-teams__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 40px 16px;
        padding-top: 40px;
    }
}

@media (max-width: 480px) {
    .nebula-teams__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 36px 12px;
    }
}