.site-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -20px;
}

.site-col {
    padding: 0 20px 30px;
}

.col-3 {
    width: 25%;
}

.col-4 {
    width: 33.3333%;
}

h2 {
    font-size: 42px;
    line-height: 1.25;
}

h4 {
    font-size: 24px;
}

.section-heading+.section-content-wrapper {
    margin-top: 56px;
}

.wp-block-post-group a {
    text-decoration: none;
}

/** CSS Starts here */

.team-content {
    width: 100%;
}

/* Team Header */
.team-header {
    text-align: center;
    margin-bottom: 60px;
}

.team-subtitle {
    font-family: 'Switzer', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--wp--preset--color--foreground);
    max-width: 800px;
    margin: 0 auto 20px;
}

.team-title {
    font-family: 'Merriweather', serif;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--wp--preset--color--foreground);
    letter-spacing: -0.8px;
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin: 0 auto;
    justify-items: center;
}

/* Team Card */
.team-card {
    background: var(--wp--preset--color--background);
    border-radius: 8px;
    box-shadow: 0 0 80px -15px rgba(142, 132, 133, 0.15);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 100px -10px rgba(142, 132, 133, 0.25);
}

.team-card-image {
    width: 100%;
    height: 360px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
}

.team-card-content {
    padding: 24px 28px 28px;
}

.team-card-name {
    font-family: 'Switzer', sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--wp--preset--color--title);
    margin-bottom: 10px;
    transition: color 0.2s ease;
    text-align: left;
}

.team-card:hover .team-card-name {
    color: var(--wp--preset--color--button-color);
}

.team-card-title {
    font-family: 'Switzer', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    color: #5e5e5e;
    transition: color 0.2s ease;
    text-align: left;
}

.team-card:hover .team-card-title {
    color: var(--wp--preset--color--button-color);
}

/* Modal Styles - Fixed for conflicts with other popups */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    /* Increased from 1000 to avoid conflicts */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(15px);
    background-color: rgba(236, 236, 236, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--wp--preset--color--background);
    border-radius: 10px;
    box-shadow: 0 0 80px 10px rgba(0, 0, 0, 0.12);
    max-width: 1200px;
    max-height: 90vh;
    width: 100%;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 999999;
    /* Ensure container is also at highest level */
}

.modal-overlay.show .modal-container {
    transform: scale(1);
}



.close-button {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--wp--preset--color--light-gray);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.close-button:hover {
    background-color: var(--wp--preset--color--button-color);
}

.close-button:hover .close-icon path {
    stroke: var(--wp--preset--color--background)
}

.close-icon {
    width: 32px;
    height: 32px;
}

.modal-image {
    width: 100%;
    height: 350px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 10px;
    margin-bottom: 35px;
}

.modal-name {
    font-family: 'Merriweather', serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--wp--preset--color--button-color);
    margin-bottom: 8px;
}

.modal-job-title {
    font-family: 'Switzer', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
    color: #5e5e5e;
    margin-bottom: 24px;
}

.modal-description {
    font-family: 'Switzer', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.8;
    color: var(--wp--preset--color--foreground);
    margin-bottom: 40px;
}

.modal-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail-section {
    display: flex;
    flex-direction: column;
}

.detail-title {
    font-family: 'Switzer', sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--wp--preset--color--foreground);
}

.detail-list {
    list-style: disc;
    padding-left: 20px;
}

.detail-list li {
    font-family: 'Switzer', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.8;
    color: var(--wp--preset--color--foreground);
    margin-bottom: 4px;
}

.modal-navigation {
    display: flex;
    width: 100%;
    justify-content: space-between;
    margin-bottom: 15px;
}

#sophia-team-modal-overlay .nav-button {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--wp--preset--color--chocolate-dim);
    transition: all 0.2s ease;
    padding: 12px 0px;
    text-align: left;
    border-radius: 32px;
}

#sophia-team-modal-overlay .nav-button#sophia-team-next-member {
    justify-content: flex-end;
    text-align: right;
}

.nav-button:hover .nav-icon {
    transform: scale(1.1);
}

.nav-icon {
    width: 20px;
    height: 15px;
    transition: transform 0.2s ease;
}

.nav-button span {
    font-family: 'Switzer', sans-serif;
    font-size: 16px;
    font-weight: 500;
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Responsive Design */
.team-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}


#sophia-team-modal-overlay .modal-content {
    max-height: 80vh;
    gap: 40px;
    padding: 25px;
    overflow-y: auto;
    position: relative;
}

#sophia-team-modal-overlay .modal-info {
    padding: 0;
}

@media (min-width: 640px) {
    #sophia-team-modal-overlay .nav-button:hover {
        color: var(--wp--preset--color--link-color);
        background-color: var(--wp--preset--color--icon-bg);
    }

    #sophia-team-modal-overlay .nav-button {
        padding: 10px 20px;
        border-radius: 32px;
        padding: 12px 30px;
    }
}

@media (max-width: 767px) {
    .certifications-section {
        padding: 60px 15px;
    }

    .team-title {
        font-size: 32px;
    }

    .certifications-title {
        font-size: 28px;
    }

    .team-subtitle,
    .certifications-subtitle {
        font-size: 16px;
    }

    .modal-container {
        margin: 10px;
        max-height: 95vh;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-name {
        font-size: 24px;
    }


}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    #sophia-team-modal-overlay .modal-navigation {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .certifications-grid {
        gap: 12px;
    }

    .certification-badge {
        padding: 12px 16px;
    }

    .certification-badge-text {
        font-size: 14px;
    }
}

@media (min-width: 768px) {
    #sophia-team-modal-overlay .modal-content {
        display: flex;
        flex-wrap: wrap;
        padding: 42px 30px;
    }

    #sophia-team-modal-overlay .modal-image {
        height: 450px;
    }

    #sophia-team-modal-overlay .modal-info {
        padding-right: 20px;
        overflow-y: auto;
        width: 55%;
        padding-left: 0;
        padding-right: 0;
    }

    .modal-image {
        width: 40%;
    }


}

@media (min-width: 1200px) {
    #sophia-team-modal-overlay .modal-content {
        padding: 42px;
        /* justify-content: center; */
    }
}

@media (min-width: 1600px) {
    .modal-content {
        display: flex;
        flex-wrap: wrap;
    }

    #sophia-team-modal-overlay .modal-image {
        height: 550px;
    }
}