/* Current directors */
html, body {
    height: 100%;
    overflow-y: visible;
}

.directors-section {
    background: url("../../assets/painted-beige-background.jpg") no-repeat center center fixed;
    background-size: cover;
    max-width: 100vw;
    padding: 40px 40px 250px;
    height: auto;
}

h1 {
    font-family: "TS Block Bold", serif;
    font-size: 3vw;
    text-align: center;
    padding-bottom: 48px;
    color: #2F5249;
    text-shadow: 0 0 2px #2F5249;
}

.department-header-operations,
.department-header-program,
.department-header-strategy {
    padding-right: 100px;
    white-space: nowrap;

    h3 {
        font-family: "Alegreya Sans SC", serif;
        font-size: 24px;
    }

    ul {
        font-family: "Rubik", serif;
        font-size: 16px;
        font-weight: normal;
        list-style: none;
        margin-top: -16px;
        line-height: 24px;
    }

    li:before {
        content: "+";
        margin-right: 4px;
    }
}

.operations-title,
.program-title,
.strategy-title {
    display: none;
}

.directors {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    row-gap: 50px;
}

/* 2-3-2 layout */
.director-1 {
    grid-column: 3;
    grid-row: 1;
}

.director-2 {
    grid-column: 5;
    grid-row: 1;
}

.director-3 {
    grid-column: 2;
    grid-row: 2;
}

.director-4 {
    grid-column: 4;
    grid-row: 2;
}

.director-5 {
    grid-column: 6;
    grid-row: 2;
}

.director-6 {
    grid-column: 3;
    grid-row: 3;
}

.director-7 {
    grid-column: 5;
    grid-row: 3;
}

/* Department titles */
.department-header-operations {
    grid-column: 1;
    grid-row: 1;
}

.department-header-program {
    grid-column: 1;
    grid-row: 2;
}

.department-header-strategy {
    grid-column: 1;
    grid-row: 3;
}

.director-image {
    height: 12vw;
    width: 12vw;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #2F5249;
}

.director-1,
.director-2,
.director-3,
.director-4,
.director-5,
.director-6,
.director-7 {
    font-family: "Rubik", serif;
    text-align: center;

    .name {
        font-weight: bold;
    }
}

.directors-sm {
    display: none;
}

.department-description {
    display: none;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;

    .tooltip-text {
        visibility: hidden;
        opacity: 0;
        width: 300px;
        background: rgba(255, 255, 255, 0.75);
        border-radius: 16px;
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        border: 1px solid #2F5249;
        color: black;
        text-align: left;
        padding: 12px;
        top: 0;
        left: 50%;
        line-height: 1.5;
        position: absolute;
        z-index: 10;
        transform: translateX(-50%);
        transition: opacity 0.3s ease, visibility 0.3s ease;

        p {
            font-family: "Rubik", serif;
            font-size: 14px;
            text-align: center;
        }
    }

    .ruchi {
        left: 100%;
    }

    .savannah {
        left: 5%;
    }
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Medium screens */
@media (max-width: 1024px) {
    .department-header-operations,
    .department-header-program,
    .department-header-strategy {
        display: none;
    }

    .department-description {
        display: block;
    }

    .directors-section {
        min-height: calc(100vh - 60px);
        padding-bottom: 320px;
    }

    .directors {
        grid-template-columns: repeat(11, 1fr);
        row-gap: 20px;
    }

    h1 {
        font-size: 36px;
        padding-top: 20px;
    }

    h3 {
        font-family: "Alegreya Sans SC", serif;
        font-size: 32px;
        display: block;
        white-space: nowrap;
        text-align: center;
    }

    h5 {
        font-family: "Rubik", serif;
        font-size: 14px;
        text-align: center;
        font-weight: normal;
        margin-top: -16px;
    }

    .operations-title,
    .program-title,
    .strategy-title {
        em {
            font-style: normal;
            font-family: "Rubik", serif;
            font-size: 16px;
            text-align: center;
            font-weight: normal;
            margin-top: -16px;
        }
    }

    /* Directors */
    .director-1 {
        grid-column: 5;
        grid-row: 2;
    }

    .director-2 {
        grid-column: 7;
        grid-row: 2;
    }

    .director-3 {
        grid-column: 4;
        grid-row: 4;
    }

    .director-4 {
        grid-column: 6;
        grid-row: 4;
    }

    .director-5 {
        grid-column: 8;
        grid-row: 4;
    }

    .director-6 {
        grid-column: 5;
        grid-row: 6;
    }

    .director-7 {
        grid-column: 7;
        grid-row: 6;
    }

    /* Department titles */
    .operations-title {
        display: block;
        grid-column: 1 / span 12;
        grid-row: 1;
    }

    .program-title {
        display: block;
        grid-column: 1 / span 12;
        grid-row: 3;
    }

    .strategy-title {
        display: block;
        grid-column: 1 / span 12;
        grid-row: 5;
    }

    .director-image {
        height: 13vw;
        width: 13vw;
    }
}

/* Small screens */
@media (max-width: 767px) {
    .directors-section {
        padding-bottom: 50px;
    }

    .department-description {
        display: block;
    }

    .directors-sm {
        display: block;
    }

    .directors {
        display: none;
    }

    h1 {
        font-size: 24px;
        padding-top: 20px;
        text-shadow: 0 0 1px #2F5249;
    }

    h3 {
        text-align: center;
        font-weight: bold;
        font-family: "Alegreya Sans SC", serif;
        font-size: 20px;
    }

    .director-image {
        height: 100px;
        width: 100px;
    }

    .director-sm {
        font-family: "Rubik", serif;
        text-align: center;
        margin-bottom: 30px;
        position: relative;

        .name {
            font-weight: bold;
        }

        .tooltip-text {
            max-height: 0;
            opacity: 0;
            overflow: hidden;
            transition: opacity 0.3s ease, max-height 0.3s ease;
            padding: 0 12px;
            margin-top: 8px;
            font-size: 0.95rem;
            line-height: 1.4;
            background: rgba(255, 255, 255, 0.75);
            border-radius: 16px;
            box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
            backdrop-filter: blur(5px);
            -webkit-backdrop-filter: blur(5px);
            border: 1px solid #2F5249;
        }
    }

    .director-sm.active .tooltip-text {
        max-height: 600px;
        opacity: 1;
        padding: 12px;
    }
}