.team-container {
    max-width: 100%;
    margin: 0 auto;
}

.team-grid {
    display: grid;
    gap: 80px;
    margin-bottom: 40px;
}

.team-grid.columns-1 { grid-template-columns: 1fr; }
.team-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.team-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.team-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }

.team-card {
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    clip-path: polygon(16% 0, 100% 0, 100% 100%, 100% 100%, 0 100%, 0 25%);
    min-height: 500px;
}

/* .card-image {
    position: relative;
    overflow: hidden;
} */

/* button.view-details-btn:before {
content: '';
position: relative;
display: inline-block;
width: 100px;
height: 2px;
overflow: hidden;
margin-left: 10px;
top: -.2em;
}
button.view-details-btn::after {
content: '';
-webkit-animation: infiniteline 2.5s ease-in-out 0s infinite forwards;
animation: infiniteline 2.5s ease-in-out 0s infinite forwards;
content: "";
display: block;
background-color: #dc001c;
position: absolute;
top: 0;
left: 0;
height: 2px;
width: 100%;
transform: translateX(-100%);
transition: transform .25s ease-in-out;
animation-delay: .5s;
left: 0;
} */
@keyframes infiniteline{
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(105%);
    }
}
.person-details {
    margin-bottom: 10px;
}
h3.card-title {
    font-family: "Neometric", Sans-serif !important;
    font-size: 28px;
    font-weight: 500 !important;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 4em;
}

.card-overlay {
    position: absolute;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0px;
    background: linear-gradient(to bottom, #00000078 0%, rgba(0, 0, 0, 0.9) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    transition: 0.5s all ease;
    height: 0%;
}
.card-image img {
    height: 100% !important;
}
button.view-details-btn{
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9em;
}
button.view-details-btn {
    background: transparent;
    padding: 0 !important;
    border: 0 !important;
    background-image: none !important;
    position: relative;
    opacity: 0;
    height: 0;
    text-transform: capitalize !important;
}
.card-content {
    padding: 25px 20px;
    text-align: left;
    position: absolute;
    bottom: 0;
    z-index: 2;
    width: 100%;
    transition: all 0.3s ease;
    transform: translateY(30px);
}
.team-card:hover .card-overlay {
    height: 100%;
    transition: 0.5s all ease;
}
.team-card:hover .card-content {
    transform: translateY(0);
    transition: 0.3s all ease;
}
.team-card:hover button.view-details-btn{
    opacity: 1;
    height:auto;
    transition: 0.3s all ease;
}
.card-title {
    font-size: 1.4em;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #ffffff;
    line-height: 1.3;
    text-transform: capitalize !important;
}

.card-position {
    text-transform: capitalize;
    letter-spacing: 0.5px;
    font-family: "Neometric", Sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: var(--e-global-color-primary);
}

.card-social-preview {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.card-social-preview a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.card-social-preview a:hover {
    transform: scale(1.2) rotate(5deg);
}

.card-social-preview a[href*="facebook"] { background: #1877f2; }
.card-social-preview a[href*="twitter"] { background: #1da1f2; }
.card-social-preview a[href*="linkedin"] { background: #0077b5; }
.card-social-preview a[href*="instagram"] { background: #e4405f; }
html.popup-open {
    height: 100vh;
    overflow: hidden;
}
/* Popup Styles */
.team-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.popup-content {
    position: relative;
    background: #000;
    max-width: 599px;
    width: 90%;
    max-height: 90vh;
    margin: 5vh auto;
    border-radius: 0px;
    padding: 75px ;
    display: flex;
    flex-direction: column;
    overflow: auto;
    height: 90vh;
    /* grid-template-columns: 400px 1fr; */
    animation: popupSlideIn 0.4s ease-out;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

button.popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    border: none;
    width: auto;
    height: auto;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    background-image: none !important;
    color: #ff0000 !important;
    font-size: 80px !important;
    padding: 0 !important;
    border: 0px solid #000 !important;
    font-weight: 300 !important;
    padding: 0 !important;
    line-height: 28px;
}
.popup-content {    
    scrollbar-width: none;   
}
.popup-content::-webkit-scrollbar {
    display: none;  
}
.popup-close:hover {
    transform: scale(1.1);
}

.popup-image {
    height: 100%;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 300px;
    clip-path: polygon(16% 0, 100% 0, 100% 100%, 100% 100%, 0 100%, 0 25%);
    max-width: 423px;
    margin-bottom: 25px;
    min-height: 448px;
}

p#popup-position {
    margin-bottom: 24px !important;
    font-size: 24px;
    text-transform: capitalize;
}

.popup-image img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    clip-path: polygon(16% 0, 100% 0, 100% 100%, 100% 100%, 0 100%, 0 25%);
}

.popup-details {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;

}

.popup-details h2 {
    font-size: 2.1em;
    margin: 0 0 10px 0;
    color: #FFFFFF;
    font-weight: 500 !important;
    font-family: 'Neometric' !important;
}

.popup-position {
    color: #FF0013;
    font-size: 1.1em;
    margin-bottom: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.company-logo img {
    max-width: 200px !important;
    display: inline-block;
}
.company-logo {
    margin-top: 10px;
}
.popup-bio {
    color: #fff;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.social-icons {
    margin-bottom: 30px;
}
.social-icons a:hover {
    background: #ff0000;
}
.popup-contact {
    margin-bottom: 25px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #555;
    font-size: 0.95em;
}

.contact-item i {
    width: 20px;
    color: #007cba;
}

.contact-item a {
    color: #007cba;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.popup-social h4 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
}

.social-icons {
    display: flex;
    gap: 15px;
}
.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 100%;
    display: flex;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ff0000;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1em;
}

.social-icons a:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* .social-icons a[href*="facebook"] { background: linear-gradient(135deg, #1877f2, #0d5cdb); }
.social-icons a[href*="twitter"] { background: linear-gradient(135deg, #1da1f2, #0d8bd9); }
.social-icons a[href*="linkedin"] { background: linear-gradient(135deg, #0077b5, #005582); }
.social-icons a[href*="instagram"] { background: linear-gradient(135deg, #e4405f, #c13584); } */

.social-icons a:not([href]), .social-icons a[href=""] {
    display: none;
}

/* Pagination Styles */
.team-pagination {
    text-align: center;
    margin-top: 50px;
}
.team-pagination .page-numbers {
    padding: 5px 5px;
    margin: 0 5px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    background: transparent;
    line-height: 140%;
    gap: 15px;
}
span.page-numbers.current {
    background: #FF0000;
    border-radius: 0;
    width: 100%;
    color: #fff;
}
.team-pagination {
    margin-bottom: 20px;
}
.card-image {
    height: 100%;
}

.card-image img {
    height: 100%;
}
@media(max-width:1600px){
    .team-card {
        min-height: 420px;
    }
    .team-grid {
        gap: 60px;
        margin-bottom: 40px;
    }
}
@media(max-width:1280px){
    .team-grid {
        gap: 40px;
    }
    .team-card {
        min-height: 380px;
    }
    h3.card-title {
        font-size: 24px;
    }
    .card-position {
        font-size: 18px;
        line-height: 1.2;
    }
}
@media(max-width:1024px){
    .card-position {
        font-size: 16px;
        line-height: 120%;
    }
    .team-grid {
        gap: 30px;
    }
    .team-card {
        min-height: 330px;
    }
    .team-card:hover button.view-details-btn {
        font-size: 15px !important;
    }
    h3.card-title {
        font-size: 24px;
        font-weight: 500 !important;
    }
}
@media(max-width:992px){
    .team-grid.columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .team-card {
        min-height: 330px;
        max-height: 330px;
    }
}
/* Responsive Design */
@media (max-width: 768px) {
    .team-grid.columns-2,
    .team-grid.columns-3,
    .team-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .card-content {
        padding: 20px 12px;
    }
    h3.card-title {
        font-size: 22px;
    }
	.popup-content {
		grid-template-columns: 1fr;
		margin: 40px 100px;
		width: calc(100% - 40px);
		max-height: calc(100vh - 20px);
		padding: 40px;
	}
	.popup-image {
		min-height: 350px;
		max-width: 350px;
		clip-path: polygon(14% 0, 100% 0, 100% 100%, 100% 100%, 0 100%, 0 18%);
	}
    p#popup-position {
        font-size: 22px;
    }
    .popup-details {
        padding: 0px 0px 20px 0;
    }
    
    .popup-details h2 {
        font-size: 1.8em;
    }
}
@media(max-width:580px){
    .team-grid.columns-2, .team-grid.columns-3, .team-grid.columns-4 {
        grid-template-columns: repeat(1, 1fr);
        gap: 20px;
    }
    h3.card-title {
        font-size: 20px;
    }
    .card-position {
        font-size: 18px;
    }
    .popup-content {
        padding: 25px;
        padding-top: 80px;
    }
	p#popup-position {
		font-size: 20px;
		line-height: 1.1;
	}
    button.popup-close {
        font-size: 60px !important;
    }
}

@media (max-width: 480px) {

    .team-grid.columns-2,
    .team-grid.columns-3,
    .team-grid.columns-4 {
        grid-template-columns: 1fr;
    }
    
    .card-content {
        padding: 20px 15px;
    }

    .card-title {
        font-size: 1.2em;
    }
    
    .popup-content {
        margin: 40px 10px;
        width: calc(100% - 20px);
    }
    
    .social-icons {
        justify-content: center;
    }
    .popup-details h2 {
        font-size: 1.5em;
    }
    .popup-position {
        font-size: 1em;
    }
}
@media(max-width:350px){
	.popup-image {
		min-height: 260px;
		max-width: 260px;
		clip-path: polygon(10% 0, 100% 0, 100% 100%, 100% 100%, 0 100%, 0 10%);
		max-height: 260px;
	}
}