/* ============================================================
   TIP Team Directory v2.4
   ============================================================ */

:root {
    --tip-blue:       #1a4fa0;
    --tip-blue-light: #2563c7;
    --tip-blue-dark:  #0f2d5e;
    --tip-dark:       #0a0f1e;
    --tip-border:     #e5e7eb;
    --tip-trans:      all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tip-team-wrap {
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 40px 24px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    box-sizing: border-box !important;
}

.tip-team-wrap *,
.tip-team-wrap *::before,
.tip-team-wrap *::after {
    box-sizing: border-box !important;
}

/* ============================================================
   DESKTOP LAYOUT
   ============================================================ */
.tip-team-layout {
    display: flex !important;
    align-items: flex-start !important;
    gap: 48px !important;
}

/* ---- Sidebar nav ---- */
.tip-team-nav {
    flex: 0 0 200px !important;
    width: 200px !important;
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 80px !important;
    align-self: flex-start !important;
    max-height: calc(100vh - 100px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.tip-team-nav ul,
.tip-team-nav ol {
    list-style: none !important;
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.tip-team-nav li {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    background-image: none !important;
}

.tip-team-nav li::before,
.tip-team-nav li::after,
.tip-team-nav li::marker {
    display: none !important;
    content: none !important;
}

.tip-nav-link {
    display: block !important;
    padding: 12px 16px !important;
    color: #4b5563 !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: 2px solid transparent !important;
    background: #f3f4f6 !important;
    line-height: 1.4 !important;
    transition: var(--tip-trans) !important;
    margin: 0 !important;
}

.tip-nav-link:hover {
    background: #e8eef8 !important;
    color: var(--tip-blue) !important;
    border-color: var(--tip-blue) !important;
    text-decoration: none !important;
    transform: none !important;
}

.tip-nav-link.active {
    background: var(--tip-blue) !important;
    color: #fff !important;
    border-color: var(--tip-blue) !important;
    transform: none !important;
}

/* Hide greyscale toggle entirely */
.tip-colour-toggle { display: none !important; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.tip-team-main {
    flex: 1 !important;
    min-width: 0 !important;
}

/* Tabbed sections */
.tip-committee-section {
    display: none !important;
    margin-bottom: 40px !important;
}
.tip-committee-section.tip-active {
    display: block !important;
}

.tip-committee-header {
    margin-bottom: 32px !important;
}

.tip-committee-label { display: none !important; }
.tip-committee-rule  { display: none !important; }

.tip-committee-title {
    font-size: 32px !important;
    font-weight: 800 !important;
    color: var(--tip-dark) !important;
    margin: 0 0 32px !important;
    letter-spacing: -0.02em !important;
    line-height: 1.1 !important;
    padding: 0 !important;
    display: block !important;
    border: none !important;
}

/* ============================================================
   GRID
   ============================================================ */
.tip-members-grid {
    display: grid !important;
    gap: 20px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.tip-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
.tip-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
.tip-cols-4 { grid-template-columns: repeat(4, 1fr) !important; }

/* ============================================================
   MEMBER CARD
   ============================================================ */
.tip-member-card {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 10px !important;
    aspect-ratio: 3 / 4 !important;
    background: #1a1a2e !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.14) !important;
    transition: var(--tip-trans) !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.tip-member-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 20px 48px rgba(0,0,0,0.22) !important;
}

/* Photo — no filter, always full colour */
.tip-member-photo {
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    right: 0 !important; bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
    transition: transform 0.4s ease !important;
    display: block !important;
    filter: none !important;
}

.tip-member-card:hover .tip-member-photo {
    transform: scale(1.04) !important;
}

/* Gradient overlay */
.tip-member-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    background: linear-gradient(to bottom, transparent 30%, rgba(10,15,30,0.55) 60%, rgba(10,15,30,0.93) 100%) !important;
    z-index: 1 !important;
    display: block !important;
    pointer-events: none !important;
}

/* Blue accent bar on hover */
.tip-member-card::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important; left: 0 !important; right: 0 !important;
    height: 3px !important;
    background: var(--tip-blue) !important;
    z-index: 3 !important;
    transform: scaleX(0) !important;
    transform-origin: left !important;
    transition: transform 0.4s ease !important;
    display: block !important;
}
.tip-member-card:hover::after { transform: scaleX(1) !important; }

/* Info overlay */
.tip-member-info {
    position: absolute !important;
    bottom: 0 !important; left: 0 !important; right: 0 !important;
    padding: 20px 18px 22px !important;
    z-index: 2 !important;
    margin: 0 !important;
    background: none !important;
}

.tip-member-name {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: #fff !important;
    margin: 0 0 5px !important;
    padding: 0 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.01em !important;
}

.tip-member-role {
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.07em !important;
    text-transform: uppercase !important;
    color: rgba(255,255,255,0.65) !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    line-height: 1.4 !important;
}

.tip-member-optional {
    font-size: 11px !important;
    color: rgba(255,255,255,0.55) !important;
    margin: 4px 0 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    transform: translateY(4px) !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
    font-style: italic !important;
    display: block !important;
}
.tip-member-card:hover .tip-member-optional {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Placeholder */
.tip-member-photo--placeholder {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, var(--tip-blue-dark), var(--tip-blue-light)) !important;
}
.tip-member-photo--placeholder span {
    font-size: 40px !important;
    font-weight: 800 !important;
    color: rgba(255,255,255,0.2) !important;
}

/* ============================================================
   TABLET  (max 1100px)
   ============================================================ */
@media (max-width: 1100px) {
    .tip-team-layout { gap: 32px !important; }
    .tip-team-nav { flex: 0 0 170px !important; width: 170px !important; }
    .tip-cols-4 { grid-template-columns: repeat(3, 1fr) !important; }
    .tip-committee-title { font-size: 26px !important; }
}

/* ============================================================
   MOBILE / TABLET  (max 768px)
   — nav becomes a sticky pill bar across the top
   — cards go full width 2-col
   ============================================================ */
@media (max-width: 768px) {

    .tip-team-wrap {
        padding: 0 0 40px !important;
        width: 100% !important;
    }

    .tip-team-layout {
        flex-direction: column !important;
        gap: 0 !important;
        width: 100% !important;
    }

    .tip-team-nav {
        flex: none !important;
        width: 100% !important;
        min-width: 0 !important;
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 200 !important;
        background: #fff !important;
        border-bottom: 1px solid var(--tip-border) !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.07) !important;
        padding: 12px 16px !important;
        max-height: none !important;
        overflow: visible !important;
        align-self: auto !important;
    }

    .tip-team-nav ul {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .tip-team-nav li {
        margin: 0 !important;
        flex-shrink: 0 !important;
    }

    .tip-nav-link {
        padding: 8px 14px !important;
        font-size: 12px !important;
        border-radius: 20px !important;
        white-space: nowrap !important;
    }

    .tip-team-main {
        padding: 24px 16px 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        flex: none !important;
    }

    .tip-committee-section {
        width: 100% !important;
    }

    .tip-committee-title { font-size: 22px !important; }

    /* Nuclear grid override — force full-width 2 columns on everything */
    .tip-team-wrap .tip-members-grid,
    .tip-team-wrap .tip-members-grid.tip-cols-2,
    .tip-team-wrap .tip-members-grid.tip-cols-3,
    .tip-team-wrap .tip-members-grid.tip-cols-4 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        width: 100% !important;
        gap: 12px !important;
    }

    /* Fixed height — same for every card on every committee */
    .tip-team-wrap .tip-member-card {
        aspect-ratio: unset !important;
        height: 260px !important;
        min-height: unset !important;
        width: 100% !important;
    }

    .tip-member-name { font-size: 15px !important; }
    .tip-member-role { font-size: 10px !important; }
    .tip-member-info { padding: 12px 12px 16px !important; }
}

@media (max-width: 420px) {
    .tip-team-wrap .tip-member-card { height: 220px !important; }
    .tip-member-name { font-size: 13px !important; }
    .tip-member-role { font-size: 9px !important; }
    .tip-member-info { padding: 10px 10px 12px !important; }
    .tip-team-wrap .tip-members-grid,
    .tip-team-wrap .tip-members-grid.tip-cols-2,
    .tip-team-wrap .tip-members-grid.tip-cols-3,
    .tip-team-wrap .tip-members-grid.tip-cols-4 {
        gap: 8px !important;
    }
}
