.team-section {
    background-color: var(--koeleman-gold-light);
    padding-top: 1rem;
    padding-bottom: .1rem;
    overflow-x: hidden; 
}

@media (min-width: 768px) {
    .team-section {
        padding-top: 1rem;
    }
}

.section-header {
    text-align: center;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.25rem;
    color: var(--koeleman-blue);
}

@media (min-width: 768px) {
    .section-header h2 {
        font-size: 2.5rem;
    }
}

.section-header p {
    margin-top: 1rem;
    font-size: 1.125rem;
    color: var(--koeleman-blue);
}

.team-group {
    margin-bottom: 4rem;
}

.group-title {
    font-size: 1.75rem;
    color: var(--koeleman-blue);
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--koeleman-gold);
    display: inline-block;
    left: 50%;
    position: relative;
    transform: translateX(-50%);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    justify-content: center;
}

.team-card {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.team-card:hover {
    transform: scale(1.05);
}

.team-image {
    width: 100%;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
    aspect-ratio: 1 / 1;
    border-radius: 9999px;
    object-fit: cover;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
}

.team-card h3 {
    color: var(--koeleman-blue);
    font-size: 1.25rem;
    margin: 0.5rem 0 0.25rem 0;
}

.team-card p {
    color: var(--koeleman-blue);
    font-size: 0.875rem;
}

/* --- VERNIEUWDE MODAL STIJLEN --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    z-index: 1000;
    /* Standaard onzichtbaar */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Actieve staat om de modal te tonen */
.modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    max-width: 600px;
    width: 100%;
    position: relative;
    text-align: center;
    /* Animatie bij verschijnen */
    transform: scale(0.95);
    transition: transform 0.3s ease;
    max-height: 85vh; /* Max hoogte */
    display: flex; /* Flexbox voor interne layout */
    flex-direction: column;
    overflow: hidden; /* Belangrijk voor scrollen binnen body */
}

.modal-overlay.is-active .modal-content {
    transform: scale(1);
}

.close-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #9ca3af;
    padding: 0; /* Padding verwijderd */
    border-radius: 50%;
    z-index: 10;
    
    /* Maak vierkant voor cirkel */
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}


.modal-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .modal-image {
        width: 200px; /* Groter op desktop */
        height: 200px;
    }
}

.modal-role {
    color: var(--text-secondary);
    margin-top: 0.25rem;
    margin-bottom: 1rem; /* Minder marge */
    font-weight: normal;
    flex-shrink: 0;
}

.modal-bio {
    text-align: left;
    line-height: 1.6;
    margin-bottom: 1.5rem; /* Ruimte voor knop */
    overflow-y: auto; /* Scrollen voor bio */
    flex-grow: 1; /* Laat bio groeien */
}

.contact-button {
    display: inline-block;
    background-color: var(--koeleman-gold);
    color: var(--koeleman-white);
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
    margin-top: auto; /* Duwt knop naar beneden */
    flex-shrink: 0;
}

.contact-button:hover {
    background-color: #8a7651;
    transform: scale(1.02);
}

