/* ══════════════════════════════════════════
   TEAM PAGE - ENHANCED COLOR SCHEME & RESPONSIVE
   Background Colors: rgb(255,255,255), rgb(40,40,40), rgb(0,0,40), 
                      rgb(30,115,190), rgb(45,46,50), rgb(29,40,241),
                      rgba(0,0,0,0.45), rgba(255,255,255,0.6), 
                      rgb(35,68,255), rgb(237,243,243), rgba(30,58,138,0.8),
                      rgb(0,0,255), rgb(30,58,138), rgb(0,9,71)
   Text Colors: rgb(0,0,0), rgb(119,119,119), rgb(172,172,172),
                rgb(35,68,255), rgb(255,255,255), rgb(153,153,153),
                rgb(30,115,190), rgb(30,58,138), rgb(177,177,177),
                rgb(194,194,194), rgb(141,141,141), rgb(122,122,122)
   ══════════════════════════════════════════ */

/* Expert Team Section - Premium Styling */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3.5rem;
    margin-top: 4rem;
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .team-grid {
        gap: 1.5rem;
    }
}

.team-grid.single-leader {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 5rem;
    padding: 0 1rem;
}

/* Premium Directorate Card */
.team-grid.single-leader .expert-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    max-width: 900px;
    width: 100%;
    min-height: 240px;
    background: linear-gradient(145deg, rgb(0, 9, 71) 0%, rgb(0, 0, 40) 100%);
    border: 1px solid rgba(30, 115, 190, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-grid.single-leader .expert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(35, 68, 255, 0.1), transparent 50%);
    pointer-events: none;
}

.team-grid.single-leader .expert-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6), 0 0 20px rgba(30, 115, 190, 0.3);
    border-color: rgba(30, 115, 190, 0.6);
}

.team-grid.single-leader .expert-img-wrapper {
    width: 260px;
    flex-shrink: 0;
    border-right: 1px solid rgba(30, 115, 190, 0.2);
    background: rgb(45, 46, 50);
    position: relative;
    overflow: hidden;
}

.team-grid.single-leader .expert-img-placeholder {
    background: transparent;
    color: rgb(255, 255, 255);
    font-size: 3.5rem;
    font-weight: 800;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 2px;
}

.team-grid.single-leader .expert-info {
    padding: 3rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    position: relative;
    z-index: 1;
}

.team-grid.single-leader .expert-status {
    display: inline-block;
    align-self: flex-start;
    padding: 0.4rem 1rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: rgba(30, 115, 190, 0.15);
    color: rgb(30, 115, 190);
    border-radius: 50px;
    margin-bottom: 1rem;
    border: 1px solid rgba(30, 115, 190, 0.3);
}

.team-grid.single-leader .expert-info h3 {
    font-size: 2rem;
    margin: 0 0 0.5rem 0;
    color: rgb(255, 255, 255);
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.team-grid.single-leader .expert-role {
    font-size: 1rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
    color: rgb(194, 194, 194);
    letter-spacing: 0.5px;
}

.team-grid.single-leader .expert-bio {
    display: block;
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0 0 2rem 0;
    color: rgb(172, 172, 172);
    font-weight: 400;
}

.team-grid.single-leader .expert-socials {
    display: flex;
    justify-content: flex-start;
    gap: 1.5rem;
}

.team-grid.single-leader .expert-socials a {
    color: rgb(30, 115, 190);
    background: rgba(30, 115, 190, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(30, 115, 190, 0.2);
}

.team-grid.single-leader .expert-socials a:hover {
    background: rgb(30, 115, 190);
    color: rgb(255, 255, 255);
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 10px 20px rgba(30, 115, 190, 0.3);
}

@media (max-width: 768px) {
    .team-grid.single-leader .expert-card {
        flex-direction: column;
        max-width: 100%;
        min-height: auto;
        text-align: center;
    }

    .team-grid.single-leader .expert-img-wrapper {
        width: 100%;
        height: 250px;
        border-right: none;
        border-bottom: 1px solid rgba(30, 115, 190, 0.2);
    }

    .team-grid.single-leader .expert-info {
        text-align: center;
        align-items: center;
        padding: 2.5rem 1.5rem;
    }

    .team-grid.single-leader .expert-status {
        align-self: center;
    }

    .team-grid.single-leader .expert-info h3 {
        font-size: 1.5rem;
    }

    .team-grid.single-leader .expert-bio {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .team-grid.single-leader .expert-info {
        padding: 2rem 1rem;
    }

    .team-grid.single-leader .expert-info h3 {
        font-size: 1.3rem;
    }

    .team-grid.single-leader .expert-img-wrapper {
        height: 200px;
    }
}

/* ══════════════════════════════════════════
   EXECUTIVE & LEADERSHIP ENHANCEMENTS
   ══════════════════════════════════════════ */

.executive-panel {
    background: linear-gradient(145deg, rgb(0, 9, 71) 0%, rgb(0, 0, 40) 50%, rgb(30, 58, 138) 100%) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

/* Moving Aurora Background Effect */
.executive-panel::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center,
            rgba(35, 68, 255, 0.08) 0%,
            rgba(30, 115, 190, 0.05) 30%,
            transparent 70%);
    animation: aurora-flow 15s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes aurora-flow {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Expertise Badges */
.expertise-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: rgba(30, 115, 190, 0.15);
    border: 1px solid rgba(30, 115, 190, 0.3);
    border-radius: var(--radius-sm);
    color: rgb(30, 115, 190);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.expertise-badge i {
    font-size: 0.8rem;
}

/* ══════════════════════════════════════════
   REFINED EXPERT CARDS
   ══════════════════════════════════════════ */

.expert-card {
    background: rgb(255, 255, 255);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    border: 1px solid rgb(237, 243, 243);
}

.expert-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 60px -12px rgba(30, 58, 138, 0.25);
    border-color: rgb(35, 68, 255);
}

@media (max-width: 768px) {
    .expert-card:hover {
        transform: translateY(-6px) scale(1.01);
    }
}

.expert-img-wrapper {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
    background: rgb(237, 243, 243);
}

/* Make supervisor images smaller - reduced height */
.supervisor-img {
    height: 180px !important;
}

.expert-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.6s ease;
    filter: brightness(1.2) contrast(1.2) saturate(1.1);
}

/* Specific positioning for supervisor images - zoom in to show head to waist */
.supervisor-img img {
    object-position: center 25% !important;
    object-fit: cover !important;
    transform: scale(1.2) !important;
    filter: brightness(1.3) contrast(1.3) saturate(1.15) !important;
}

/* Target supervisor images by alt text as backup */
img[alt*="Mugisha"], img[alt*="Thomas"] {
    object-position: center 25% !important;
    object-fit: cover !important;
    transform: scale(1.2) !important;
    filter: brightness(1.3) contrast(1.3) saturate(1.15) !important;
}

/* Better positioning for other team members */
.expert-img-wrapper img[alt*="Nassali"] {
    object-position: center 20%;
}

.expert-img-wrapper img[alt*="Senkatuka"] {
    object-position: center 25%;
}

.expert-img-wrapper img[alt*="Pastor"] {
    object-position: center 15%;
    filter: brightness(1.4) contrast(1.4) saturate(1.2);
}

.expert-img-wrapper img[alt*="Sebwato"] {
    object-position: center 25%;
}

.expert-img-wrapper img[alt*="Mukakanya"] {
    object-position: center 20%;
}

.expert-img-wrapper img[alt*="David"] {
    object-position: center 25%;
}

.expert-img-wrapper img[alt*="Mutyaba"] {
    object-position: center 30%;
}

.expert-card:hover .expert-img-wrapper img {
    transform: scale(1.05);
    filter: brightness(1.3) contrast(1.3) saturate(1.2);
}

/* Remove dark overlay for better face visibility */
.expert-img-wrapper::after {
    content: none;
}

@media (max-width: 768px) {
    .expert-img-wrapper {
        height: 240px;
    }
}

@media (max-width: 480px) {
    .expert-img-wrapper {
        height: 200px;
    }
}

.expert-info {
    padding: 2rem;
    background: rgb(255, 255, 255);
}

.expert-status {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: rgba(30, 115, 190, 0.1);
    color: rgb(30, 115, 190);
    border-radius: 50px;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(30, 115, 190, 0.2);
}

/* Standardized Typography */
.expert-info h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 0.4rem;
    color: rgb(0, 0, 0);
}

.expert-role {
    font-family: 'Inter', sans-serif;
    letter-spacing: 1.5px;
    font-size: 0.75rem;
    display: block;
    margin-bottom: 1rem;
    color: rgb(119, 119, 119);
    font-weight: 600;
    text-transform: uppercase;
}

.expert-bio {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgb(122, 122, 122);
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .expert-info {
        padding: 1.5rem;
    }

    .expert-info h3 {
        font-size: 1.3rem;
    }

    .expert-bio {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .expert-info {
        padding: 1.25rem;
    }

    .expert-info h3 {
        font-size: 1.2rem;
    }

    .expert-role {
        font-size: 0.7rem;
    }

    .expert-bio {
        font-size: 0.85rem;
        line-height: 1.6;
    }
}

/* Social Icon Redesign */
.expert-socials {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.expert-socials a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(30, 115, 190, 0.1);
    border: 1px solid rgba(30, 115, 190, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(30, 115, 190);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.expert-socials a:hover {
    background: rgb(35, 68, 255);
    color: rgb(255, 255, 255);
    transform: scale(1.2) rotate(5deg);
    border-color: rgb(35, 68, 255);
}

@media (max-width: 480px) {
    .expert-socials a {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

/* Dark Section Content Adjustment */
.team-office .expert-info,
.team-field-experts .expert-info {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(5px);
}

.team-office .expert-card,
.team-field-experts .expert-card {
    background: rgb(45, 46, 50);
    border-color: rgba(255, 255, 255, 0.1);
}

.team-office .expert-info h3,
.team-field-experts .expert-info h3 {
    color: rgb(255, 255, 255);
}

.team-office .expert-bio,
.team-field-experts .expert-bio {
    color: rgb(172, 172, 172);
}

.team-office .expert-status,
.team-field-experts .expert-status {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgb(194, 194, 194);
}

.team-office .expert-role,
.team-field-experts .expert-role {
    color: rgb(177, 177, 177);
}

.team-office .expert-socials a,
.team-field-experts .expert-socials a {
    background: rgba(30, 115, 190, 0.15);
    border-color: rgba(30, 115, 190, 0.3);
    color: rgb(30, 115, 190);
}

.team-office .expert-socials a:hover,
.team-field-experts .expert-socials a:hover {
    background: rgb(35, 68, 255);
    color: rgb(255, 255, 255);
}

.team-office .expertise-badge,
.team-field-experts .expertise-badge {
    background: rgba(30, 115, 190, 0.15);
    border-color: rgba(30, 115, 190, 0.3);
    color: rgb(30, 115, 190);
}

/* ══════════════════════════════════════════
   RESPONSIVE HERO SECTION
   ══════════════════════════════════════════ */

.team-hero {
    padding-top: 12rem !important;
    padding-bottom: 8rem !important;
}

/* Executive Panel Mobile Fix */
@media (max-width: 991px) {
    .team-hero {
        padding-top: 10rem !important;
        padding-bottom: 6rem !important;
    }

    /* Target the inline-styled grid */
    .fade-in-up div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    .fade-in-up div[style*="border-right: 1px solid"] {
        border-right: none !important;
        border-bottom: 1px solid rgba(197, 160, 89, 0.1) !important;
    }
}

@media (max-width: 768px) {
    .team-hero {
        padding-top: 8rem !important;
        padding-bottom: 4rem !important;
    }

    .section-header h1 {
        font-size: 2rem !important;
    }

    .section-header h2 {
        font-size: 1.75rem !important;
    }

    .section-header p {
        font-size: 1rem !important;
    }

    .hero-kicker {
        font-size: 0.75rem !important;
    }

    /* Executive panel mobile adjustments */
    .fade-in-up div[style*="padding: 3.5rem 3rem"] {
        padding: 2.5rem 1.5rem !important;
    }

    .fade-in-up div[style*="width: 200px; height: 200px"] {
        width: 150px !important;
        height: 150px !important;
    }

    .fade-in-up h3[style*="font-size: 1.6rem"] {
        font-size: 1.3rem !important;
    }

    .fade-in-up p[style*="font-size: 0.9rem"] {
        font-size: 0.85rem !important;
    }
}

@media (max-width: 480px) {
    .team-hero {
        padding-top: 7rem !important;
        padding-bottom: 3rem !important;
    }

    .section-header h1 {
        font-size: 1.5rem !important;
    }

    .section-header h2 {
        font-size: 1.4rem !important;
    }

    .section-header p {
        font-size: 0.9rem !important;
    }

    /* Executive panel mobile adjustments */
    .fade-in-up div[style*="padding: 3.5rem 3rem"] {
        padding: 2rem 1rem !important;
    }

    .fade-in-up div[style*="width: 200px; height: 200px"] {
        width: 120px !important;
        height: 120px !important;
    }

    .fade-in-up h3[style*="font-size: 1.6rem"] {
        font-size: 1.2rem !important;
    }
}

/* ══════════════════════════════════════════
   EXECUTIVE PANEL RESPONSIVE
   ══════════════════════════════════════════ */

.executive-panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    z-index: 2;
}

.executive-panel-grid>div {
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

@media (max-width: 991px) {
    .executive-panel-grid>div {
        padding: 3rem 2rem;
    }
}

@media (max-width: 768px) {
    .executive-panel-grid>div {
        padding: 2.5rem 1.5rem;
    }

    .executive-panel-grid>div h3 {
        font-size: 1.5rem !important;
    }

    .executive-panel-grid>div p {
        font-size: 0.9rem !important;
    }

    .executive-panel-grid>div>div:first-child {
        width: 180px !important;
        height: 180px !important;
    }
}

@media (max-width: 480px) {
    .executive-panel-grid>div {
        padding: 2rem 1rem;
    }

    .executive-panel-grid>div h3 {
        font-size: 1.3rem !important;
    }

    .executive-panel-grid>div>div:first-child {
        width: 150px !important;
        height: 150px !important;
    }
}

/* ══════════════════════════════════════════
   SECTION SPACING RESPONSIVE
   ══════════════════════════════════════════ */

.team-office,
.team-field-experts {
    padding: 6rem 0 !important;
}

@media (max-width: 768px) {
    .team-office,
    .team-field-experts {
        padding: 4rem 0 !important;
    }
}

@media (max-width: 480px) {
    .team-office,
    .team-field-experts {
        padding: 3rem 0 !important;
    }
}

/* Container Padding for Mobile */
@media (max-width: 768px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
