/* Mandala Mitra Karya - Team UI alignment, slider, and photo modal */

.team_members .team_members_content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 14px 38px rgba(9, 32, 43, 0.08);
}

.team_members .team_members_content::after {
    left: 50%;
    transform: translateX(-50%);
}

.team_members .upper_portion {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #eef2f7;
}

.team_members .upper_portion figure,
.team_members .team-photo-trigger {
    width: 100%;
    height: 100%;
}

.team_members .upper_portion figure {
    display: block;
    margin: 0;
    transform: none !important;
}

.team-photo-trigger {
    position: relative;
    display: block;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    overflow: hidden;
    cursor: zoom-in;
}

.team-photo-trigger:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: -3px;
}

.team-photo-trigger img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 0 !important;
    transition: transform 0.35s ease;
}

.team-photo-trigger:hover img,
.team-photo-trigger:focus-visible img {
    transform: scale(1.035);
}

.team-photo-overlay {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    background: rgba(3, 21, 57, 0.76);
    box-shadow: 0 8px 20px rgba(3, 21, 57, 0.2);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
}

.team-photo-trigger:hover .team-photo-overlay,
.team-photo-trigger:focus-visible .team-photo-overlay {
    opacity: 1;
    transform: translateY(0);
}

.team-photo-overlay i {
    font-size: 14px;
}

.team_members .lower_portion_wrapper {
    display: flex;
    flex: 1 1 auto;
    padding: 25px 18px 30px;
}

.team_members .lower_portion {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.team_members .team_member_name {
    margin-bottom: 5px;
}

.team_members .team_member_designation {
    min-height: 25px;
    margin-bottom: 15px;
}

.team_members .socialmedia_icons_wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: auto;
}

/* Keep team social icons perfectly circular.
   The original theme uses percentage width + padding on <i>, which becomes oval
   when the team card width changes inside the slider. */
.team_members .socialmedia_icons_wrapper a {
    display: inline-flex;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    text-decoration: none;
}

.team_members .socialmedia_icons_wrapper i {
    display: inline-flex !important;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    width: 38px !important;
    min-width: 38px;
    max-width: 38px;
    height: 38px !important;
    min-height: 38px;
    max-height: 38px;
    padding: 0 !important;
    border-radius: 50% !important;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1 !important;
}

/* Slider on Home and About */
.team-members-slider-section .team-slider-shell {
    padding: 0 48px;
}

.team-slider .owl-stage {
    display: flex;
    align-items: stretch;
}

.team-slider .owl-item {
    display: flex;
    height: auto;
}

.team-slider .team-slider-item {
    display: flex;
    width: 100%;
    padding: 4px 0 18px;
}

.team-slider.owl-theme .owl-nav {
    margin: 0;
}

.team-slider.owl-theme .owl-nav button.owl-prev,
.team-slider.owl-theme .owl-nav button.owl-next {
    position: absolute;
    top: 44%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 0;
    border-radius: 50%;
    color: var(--primary--color);
    background: #fff;
    box-shadow: 0 8px 26px rgba(9, 32, 43, 0.14);
    transform: translateY(-50%);
    transition: color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.team-slider.owl-theme .owl-nav button.owl-prev {
    left: -48px;
}

.team-slider.owl-theme .owl-nav button.owl-next {
    right: -48px;
}

.team-slider.owl-theme .owl-nav button.owl-prev span,
.team-slider.owl-theme .owl-nav button.owl-next span {
    display: block;
    margin-top: -3px;
    font-size: 34px;
    line-height: 1;
}

.team-slider.owl-theme .owl-nav button.owl-prev:hover,
.team-slider.owl-theme .owl-nav button.owl-next:hover {
    color: #fff;
    background: var(--accent-color);
    box-shadow: 0 10px 28px rgba(0, 99, 250, 0.22);
}

.team-slider.owl-theme .owl-dots {
    margin-top: 4px;
}

.team-slider.owl-theme .owl-dots .owl-dot span {
    width: 8px;
    height: 8px;
    margin: 5px 4px;
    background: #d8dee7;
    transition: width 0.25s ease, background-color 0.25s ease;
}

.team-slider.owl-theme .owl-dots .owl-dot.active span {
    width: 22px;
    border-radius: 10px;
    background: var(--accent-color);
}

/* Grid on dedicated team page */
.team-grid-row {
    align-items: stretch;
}

.team-grid-row .team-card-col {
    display: flex;
    margin-bottom: 30px;
}

/* Team photo popup */
.team-image-modal .modal-dialog {
    width: min(92vw, 760px);
    max-width: 760px;
    margin-right: auto;
    margin-left: auto;
}

.team-image-modal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 28px 80px rgba(3, 21, 57, 0.28);
}

.team-image-modal .team-modal-photo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    max-height: 72vh;
    background: #071633;
}

.team-image-modal .team-modal-photo {
    display: block;
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
}

.team-image-modal .team-modal-info {
    padding: 18px 24px 21px;
    text-align: center;
    background: #fff;
}

.team-image-modal .team-modal-name {
    color: var(--primary--color);
    font-family: 'Work Sans', sans-serif;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 600;
}

.team-image-modal .team-modal-role {
    color: var(--text-color);
    font-size: 15px;
    line-height: 1.5;
}

.team-image-modal .team-modal-close {
    z-index: 3;
    top: 14px !important;
    right: 14px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(3, 21, 57, 0.78);
    font-size: 28px;
    line-height: 1;
}

.team-image-modal .team-modal-close span {
    display: block;
    margin-top: -2px;
}

@media (max-width: 1199px) {
    .team-members-slider-section .team-slider-shell {
        padding: 0 44px;
    }

    .team-slider.owl-theme .owl-nav button.owl-prev {
        left: -44px;
    }

    .team-slider.owl-theme .owl-nav button.owl-next {
        right: -44px;
    }
}

@media (max-width: 767px) {
    .team-members-slider-section .team-slider-shell {
        padding: 0 34px;
    }

    .team-slider.owl-theme .owl-nav button.owl-prev,
    .team-slider.owl-theme .owl-nav button.owl-next {
        width: 36px;
        height: 36px;
    }

    .team-slider.owl-theme .owl-nav button.owl-prev {
        left: -34px;
    }

    .team-slider.owl-theme .owl-nav button.owl-next {
        right: -34px;
    }

    .team-slider.owl-theme .owl-nav button.owl-prev span,
    .team-slider.owl-theme .owl-nav button.owl-next span {
        font-size: 29px;
    }

    .team-image-modal .team-modal-photo-wrap {
        min-height: 300px;
    }
}

@media (max-width: 575px) {
    .team-members-slider-section .team-slider-shell {
        padding: 0 28px;
    }

    .team-slider.owl-theme .owl-nav button.owl-prev {
        left: -28px;
    }

    .team-slider.owl-theme .owl-nav button.owl-next {
        right: -28px;
    }

    .team-photo-overlay {
        opacity: 1;
        transform: none;
    }

    .team-image-modal .modal-dialog {
        width: calc(100% - 24px);
        margin: 12px auto;
    }

    .team-image-modal .team-modal-photo-wrap {
        min-height: 240px;
        max-height: 68vh;
    }

    .team-image-modal .team-modal-photo {
        max-height: 68vh;
    }
}
/* Mobile: keep Our Team as a 2-column layout.
   Home/About remain sliders, but always show 2 cards side-by-side.
   Dedicated Our Team page becomes a true 2-column grid below 576px. */
@media (max-width: 575px) {
    .team-members-slider-section .team-slider-shell {
        padding: 0;
    }

    /* On compact screens swipe + dots are cleaner than side arrows. */
    .team-slider.owl-theme .owl-nav {
        display: none;
    }

    .team-slider .team-slider-item {
        padding-bottom: 12px;
    }

    .team_members .lower_portion_wrapper {
        padding: 16px 8px 18px;
    }

    .team_members .team_member_name,
    .team_members .lower_portion .team_member_name {
        min-height: 38px;
        margin-bottom: 3px;
        font-size: 15px;
        line-height: 19px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .team_members .team_member_designation,
    .team_members .lower_portion .team_member_designation {
        min-height: 34px;
        margin-bottom: 10px;
        font-size: 13px;
        line-height: 17px;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        text-align: center;
    }

    .team_members .socialmedia_icons_wrapper {
        gap: 4px;
    }

    .team_members .socialmedia_icons_wrapper a,
    .team_members .socialmedia_icons_wrapper i {
        flex-basis: 28px;
        width: 28px !important;
        min-width: 28px;
        max-width: 28px;
        height: 28px !important;
        min-height: 28px;
        max-height: 28px;
        font-size: 12px;
    }

    .team-grid-row {
        margin-right: -6px;
        margin-left: -6px;
    }

    .team-grid-row .team-card-col {
        flex: 0 0 50%;
        width: 50%;
        max-width: 50%;
        padding-right: 6px;
        padding-left: 6px;
        margin-bottom: 12px;
    }

    .team-grid-row .team_members_content {
        height: 100%;
    }
}

@media (max-width: 359px) {
    .team_members .lower_portion_wrapper {
        padding-right: 5px;
        padding-left: 5px;
    }

    .team_members .team_member_name,
    .team_members .lower_portion .team_member_name {
        font-size: 14px;
        line-height: 18px;
    }

    .team_members .team_member_designation,
    .team_members .lower_portion .team_member_designation {
        font-size: 12px;
        line-height: 16px;
    }

    .team_members .socialmedia_icons_wrapper a,
    .team_members .socialmedia_icons_wrapper i {
        flex-basis: 26px;
        width: 26px !important;
        min-width: 26px;
        max-width: 26px;
        height: 26px !important;
        min-height: 26px;
        max-height: 26px;
        font-size: 11px;
    }
}


/* Dedicated Our Team page: force 2-column mobile grid.
   responsive-fixes.css contains a generic mobile rule that forces all
   Bootstrap col-sm/col-md/col-lg elements to 100% width. This selector is
   intentionally more specific and loaded after responsive-fixes.css. */
@media screen and (max-width: 767px) {
    .team-members-grid-section .container .team-grid-row > .team-card-col {
        flex: 0 0 50% !important;
        width: 50% !important;
        max-width: 50% !important;
        padding-right: 6px;
        padding-left: 6px;
        margin-bottom: 12px;
    }

    .team-members-grid-section .team-grid-row {
        display: flex;
        flex-wrap: wrap;
        margin-right: -6px;
        margin-left: -6px;
    }

    .team-members-grid-section .team-grid-row .team_members_content {
        width: 100%;
        max-width: none;
        height: 100%;
        margin-right: 0;
        margin-left: 0;
    }
}
