#hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    
   
    padding-top: 100px; 
    
    box-sizing: border-box;
    height: auto;
    min-height: calc(40vh - 100px);
    
    position: relative;
    overflow: hidden;
}

.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    bottom: 100px;
    height: 100%;
    background-size: cover;
    background-position: center center;
    max-height: 100%;;
    z-index: -2;
}

.filter {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    bottom: 50px;
    background-color: rgba(51, 51, 51, 0.8);
    pointer-events: none;
    max-height: 100%;;
    z-index: -1;
}

#hero .container {
    display: flex;
    max-width: 80%;
    width: 100%;
    min-height: calc(80vh - 100px - 100px);
    padding: 0 20px;
    margin: 0 auto;
    justify-content: center;
    align-items: center;
    gap: 5vw;
    z-index: 1;
}

#hero h1 {
    font-size: clamp(1.6rem, 4vw, 4rem);
    color: var(--primary-color);
    line-height: 1.4;
    width: 100%;
    text-align: left;
}

#hero h2 {
    font-size: clamp(1.2rem, 2vw, 2rem);
    color: var(--primary-color);
    line-height: 1.4;
    width: 100%;
    text-align: left;
    text-wrap: balance;
    max-width: 800px;
}

#hero .subtitle {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 500;
    line-height: 1.4;
    width: 100%; 
    max-width: 1140px;
    padding-right: 10px;
    text-align: left; 
}

#hero .mainTitle {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 20px;

}

#hero .aboutPhoto {
    display: flex;
    justify-content: center;
    width: 20vw;
    height: auto;
    max-width: 300px;
    max-height: 90%;
    object-fit: cover;
    padding-top: 2vw;
    padding-bottom: 2vw;
}

#hero .aboutPhotoDiv {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
}

.subtitle {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    #hero .container {
        flex-direction: column;
        text-align: center;
        max-width: 90%;
        padding: 20px;
        justify-content: flex-start;
        align-items: center;
        min-height: auto;
        gap: 0;
    }

    #hero .mainTitle {
        width: 100%;
        margin-bottom: 0;
        margin-top: 0;
        text-align: center;
    }

    #hero h1 {
        text-align: center;
    }
    #hero h2 {
        text-align: center;
        margin-bottom: 1rem;
        padding-right: 0px;
    }

    #hero .aboutPhoto {
        width: 180px;
        height: 180px;
        max-width: none;
        max-height: none;
        margin: 0 auto;
        padding-top: 0;
        padding-bottom: 0;
    }

    #about {
        text-align: center;
        width: 80%;
    }
    .subtitle {
        font-size: 0.95rem;
    }
}

#about {
    display: flex;
    place-self: center;
    justify-content: space-between;
    width: 90%; 
    max-width: 1600px; 
    margin: 0 auto; 
    padding: 4rem 20px;
    padding-bottom: 0px;
    box-sizing: border-box; 
    align-items: center; 
    gap: 40px; 
}

#about .text {
    background-color: var(--primary-color); 
    width: 55%; 
    text-wrap: balance;
    place-self: center;   
    font-size: 1.2vw; 
}

#about #groupPhoto {
    background-color: var(--primary-color); 
    width: 40%; 
    max-width: 100%; 
    height: auto; 
    display: block; 
    object-fit: cover; 
}



@media (max-width: 1024px) {
    #about .text {
        font-size: 1.6vw; 
    }
}

@media (max-width: 768px) {
    #about {
        flex-direction: column; 
        text-align: center; 
        width: 90%; 
        padding: 2rem 15px; 
        gap: 20px; 
    }

    #about .text {
        width: 100%; 
        font-size: 4vw; 
        margin-bottom: 20px; 
    }

    #about #groupPhoto {
        width: 80%; 
        max-width: 350px; 
        margin: 0 auto; 
    }
}

@media (max-width: 480px) {
    #about .text {
        font-size: 4.5vw; 
    }

    #about #groupPhoto {
        width: 95%; 
        max-width: 280px; 
    }
}

#grid-section {
    background-color: var(--primary-color);
    text-align: center;
}

#grid-section .subsection {
    margin-bottom: 5vw;
    margin-top: 5vw;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5rem;
    width: 90%;
    margin: 3rem auto;
}

.grid-item {
    background-color: var(--primary-color);
    border-radius: 10px;
    display: flex;
    place-items: center;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item .logo-section {
    width: 30%;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: start;
}

.grid-item .logo {
    width: 75%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2em;
}

.grid-item .text-content {
    width: 70%;
    text-align: left;
    align-self: start;
}

.grid-item .text-content h3 {
    font-size: 1.2rem;
    color: var(--header-color);
    margin-bottom: 0.5rem;
}

.grid-item .text-content p {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.5;
    margin-bottom: 0;
}

.grid-item .text-content .role {
    font-weight: 700;
}

.grid-item .text-content .org {
    margin-bottom: 20px;
}

.grid-item .text-content .dates {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

#imi {
    width: 40%;
    margin-left: 35%;
}

@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(0%, 100%));
        margin: 3rem auto;
    }
}


@media (max-width: 480px) {
    #hero .aboutPhotoDiv {
        width: 150px;
        height: 150px;
    }
    #hero .aboutPhoto {
        max-width: 150px;
        height: 150px;
        padding-top: 0;
        padding-bottom: 0;
    }

    .grid-item {
        flex-direction: column;
        text-align: center;
    }
    .grid-item .logo-section {
        width: 100%;
        margin-bottom: 20px;
        flex-shrink: unset;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(0%, 50%));
        place-items: center;
        place-content: center;

    }
    .grid-item .logo {
        margin-bottom: 1em;
    }
    .grid-item .text-content {
        width: 100%;
        text-align: center;
    }
    #imi {
        width: 35%;
        margin-left: 0%;
    }
    #item3 {
        grid-column: 1 / span 2; /* Start at column 1 and span 2 columns */
        justify-self: center; /* Center the item horizontally within its grid area */
        width: 50%;
    }
}
