/* Todij Team Grid Styles - Based on RS Team Grid Style 3 */
.todij-team-grid,
.team-grid-style3 {
    width: 100%;
}

.todij-team-grid .team-item,
.team-grid-style3 .team-item {
    margin-bottom: 50px;
    position: relative;
    overflow: visible;
    transition: 0.3s all ease;
}

.todij-team-grid .team-item .image-wrap,
.team-grid-style3 .team-item .image-wrap {
    overflow: hidden;
    position: relative;
}

.team-grid-style3 .team-item .image-wrap {
  position: relative;
  overflow: hidden;
}

.team-grid-style3 .team-item .image-wrap .hobby-image {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
  z-index: 2;
  overflow: hidden;
}

.team-grid-style3 .team-item .image-wrap .hobby-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.team-grid-style3 .team-item:hover .image-wrap .hobby-image {
  opacity: 1;
  visibility: visible;
}

.todij-team-grid .team-item .image-wrap img,
.team-grid-style3 .team-item .image-wrap img {
    transform: scale(1);
    transition: 0.3s ease-in-out;
    width: 100%;
    height: auto;
    display: block;
}



.todij-team-grid .team-item:hover .image-wrap img,
.team-grid-style3 .team-item:hover .image-wrap img {
    transform: scale(1.05);
}

.todij-team-grid .team-item .team-content,
.team-grid-style3 .team-item .team-content {
    background: #fff;
    padding: 20px;
    text-align: center;
    z-index: 99!important;
    position: absolute;
    opacity: 1;
    width: unset;
    height: unset;
    display: inline-block;
    border-radius: 2px;
    top: unset;
    bottom: -80px;
    padding: 20px 20px 25px;
    left: 50%;
    max-width: 300px;
    transform: translateX(-50%);
    width: 100%;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
    transition: all 0.5s ease;
    cursor: pointer;
}

.todij-team-grid .team-item .team-content .team-name,
.team-grid-style3 .team-item .team-content .team-name {
    display: block;
    font-size: 18px;
    line-height: 28px;
    margin-bottom: 5px;
    text-transform: capitalize;
    font-weight: 600;
}

.todij-team-grid .team-item .team-content .team-name a,
.team-grid-style3 .team-item .team-content .team-name a {
    color: #10171e;
    text-decoration: none;
    transition: color 0.3s ease;
}

.todij-team-grid .team-item .team-content .team-name a:hover,
.team-grid-style3 .team-item .team-content .team-name a:hover {
    color: #EA5501;
}

.todij-team-grid .team-item .team-content .team-title,
.team-grid-style3 .team-item .team-content .team-title {
    font-size: 14px;
    font-weight: 400;
    display: block;
    color: #666666;
    margin-bottom: 10px;
}

.todij-team-grid .team-item .team-content .team-desc,
.team-grid-style3 .team-item .team-content .team-desc {
    font-size: 13px;
    margin-bottom: 15px;
    color: #666666;
    line-height: 1.6;
}

.todij-team-grid .team-item .social-icons,
.team-grid-style3 .team-item .social-icons {
    display: none;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.todij-team-grid .team-item .social-icons.social-enable,
.team-grid-style3 .team-item .social-icons.social-enable {
    display: flex;
}

.todij-team-grid .team-item .social-icons .social-icon,
.team-grid-style3 .team-item .social-icons .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: #EA5501;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    cursor: pointer;
    margin: 0;
    transition: all 0.3s ease;
    font-size: 14px;
}

.todij-team-grid .team-item .social-icons .social-icon:hover,
.team-grid-style3 .team-item .social-icons .social-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(234, 85, 1, 0.4);
}

.todij-team-grid .team-item .social-icons .social-icon svg,
.team-grid-style3 .team-item .social-icons .social-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.todij-team-grid .team-item .social-icons .social-icon i,
.team-grid-style3 .team-item .social-icons .social-icon i {
    font-size: 14px;
}

/* Hover Effects */
.todij-team-grid .team-item:hover .image-wrap img,
.team-grid-style3 .team-item:hover .image-wrap img {
    transform: scale(1.1);
}

.todij-team-grid .team-item:hover .team-content,
.team-grid-style3 .team-item:hover .team-content {
    transform: translate(-50%, -35px);
    opacity: 1;
    visibility: visible;
}

/* Team content hover effect */
.todij-team-grid .team-item .team-content:hover,
.team-grid-style3 .team-item .team-content:hover {
    transform: translate(-50%, -40px) scale(1.02);
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
}

.todij-team-grid .team-item .team-content:active,
.team-grid-style3 .team-item .team-content:active {
    transform: translate(-50%, -35px) scale(0.98);
}

/* Glass Effect Enhancement */
.todij-team-grid .team-item .team-content::before,
.team-grid-style3 .team-item .team-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: -1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .todij-team-grid .team-item .team-content,
    .team-grid-style3 .team-item .team-content {
        position: relative;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: -30px;
        background: rgba(255, 255, 255, 0.98);
    }
    
    .todij-team-grid .team-item:hover .team-content,
    .team-grid-style3 .team-item:hover .team-content {
        transform: none;
    }
}

@media (max-width: 576px) {
    .todij-team-grid .team-item,
    .team-grid-style3 .team-item {
        margin-bottom: 30px;
    }
    
    .todij-team-grid .team-item .team-content,
    .team-grid-style3 .team-item .team-content {
        padding: 15px;
        width: calc(100% - 30px);
    }
    
    .todij-team-grid .team-item .team-content .team-name,
    .team-grid-style3 .team-item .team-content .team-name {
        font-size: 16px;
        line-height: 24px;
    }
}

/* Animation keyframes for enhanced effects */
@keyframes teamContentSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -35px);
    }
}

.todij-team-grid .team-item:hover .team-content,
.team-grid-style3 .team-item:hover .team-content {
    animation: teamContentSlideUp 0.5s ease-out forwards;
}



/* Popup Styles */
.rspopup_style1 {
    background: #fff;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding: 40px;
    border-radius: 8px;
}

/* Hide sticky headers when popup is open */
.mfp-ready header,
.mfp-ready .header,
.mfp-ready .site-header,
.mfp-ready .main-header,
.mfp-ready .sticky-header,
.mfp-ready .header-sticky,
.mfp-ready .elementor-sticky,
.mfp-ready .rs-header-absolute,
.mfp-ready .sticky,
.mfp-ready .fixed-header,
.mfp-ready .elementor-location-header,
.mfp-ready .wp-site-blocks header,
.mfp-ready #masthead,
.mfp-ready #header,
.mfp-ready .navbar-fixed-top,
.mfp-ready .navbar-sticky,
.mfp-ready #site-header,
.mfp-ready .site-branding,
body.todij-popup-open header,
body.todij-popup-open .header,
body.todij-popup-open .site-header,
body.todij-popup-open .main-header,
body.todij-popup-open .sticky-header,
body.todij-popup-open .header-sticky,
body.todij-popup-open .elementor-sticky,
body.todij-popup-open .rs-header-absolute,
body.todij-popup-open .sticky,
body.todij-popup-open .fixed-header,
body.todij-popup-open .elementor-location-header,
body.todij-popup-open .wp-site-blocks header,
body.todij-popup-open #masthead,
body.todij-popup-open #header,
body.todij-popup-open .navbar-fixed-top,
body.todij-popup-open .navbar-sticky,
body.todij-popup-open #site-header,
body.todij-popup-open .site-branding {
    display: none !important;
    visibility: hidden !important;
    z-index: -9999 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: static !important;
}

/* Hide all fixed/sticky elements with high z-index when popup is open */
body.todij-popup-open [style*="position: fixed"],
body.todij-popup-open [style*="position: sticky"] {
    display: none !important;
    visibility: hidden !important;
    z-index: -9999 !important;
}

/* Prevent body scroll when popup is open */
.mfp-ready body,
body.todij-popup-open {
    overflow: hidden !important;
}

/* Ensure popup has highest z-index */
.mfp-wrap {
    z-index: 999999 !important;
}

.mfp-container {
    z-index: 999999 !important;
}

.mfp-content {
    z-index: 999999 !important;
}

/* Popup Close Button */
body .rspopup_style1 .mfp-close {
    color: #fff!important;
    right: 10px;
    top: 10px;
    border-radius: 50%;
    background: #BB2649!important;
    transition: 0.3s;
    width: 44px;
    height: 44px;
    line-height: 44px;
    position: absolute;
    text-decoration: none;
    text-align: center;
    padding: 0;
    font-style: normal;
    font-size: 28px;
    font-family: Arial, Baskerville, monospace;
    cursor: pointer;
    border: none;
    z-index: 9999;
}

body .rspopup_style1 .mfp-close:hover,
body .rspopup_style1 .mfp-close:focus {
    opacity: 1;
    background: #EA5501;
    color: #fff;
}

body .rspopup_style1 .mfp-close:active {
    top: 11px;
}

.rspopup_style1 .rsteam_img img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.rspopup_style1 .rsteam_content {
    padding: 0 0 0 30px;
}

.rspopup_style1 .team-heading {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.rspopup_style1 .team-heading .team-name {
    font-size: 28px;
    margin-bottom: 5px;
    font-weight: 700;
}

.rspopup_style1 .team-heading .team-title {
    font-size: 16px;
    color: #666;
    font-weight: 400;
}

.rspopup_style1 .team-des {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 20px;
}

.rspopup_style1 .contact-info ul {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.rspopup_style1 .contact-info ul li {
    font-size: 15px;
    margin-bottom: 8px;
    color: #555;
}

.rspopup_style1 .contact-info ul li span {
    font-weight: 600;
    display: inline-block;
    width: 60px;
}

.rspopup_style1 .rs-social-icons .social-icons1 {
    display: flex;
    gap: 10px;
}

.rspopup_style1 .social-icons1 a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    color: #333;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.rspopup_style1 .social-icons1 a:hover {
    background: #EA5501;
    color: #fff;
    transform: translateY(-2px);
}

/* Responsive popup */
@media (max-width: 768px) {
    .rspopup_style1 {
        padding: 20px;
    }
    
    .rspopup_style1 .rsteam_content {
        padding: 20px 0 0 0;
    }
    
    .rspopup_style1 .team-heading .team-name {
        font-size: 24px;
    }
}

/* Bootstrap Grid Support */
.todij-team-grid .row,
.team-grid-style3 .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.todij-team-grid .row [class*="col-"],
.team-grid-style3 .row [class*="col-"] {
    padding: 0 15px;
    flex: 0 0 auto;
}

.todij-team-grid .col-lg-4,
.team-grid-style3 .col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.todij-team-grid .col-lg-3,
.team-grid-style3 .col-lg-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.todij-team-grid .col-lg-6,
.team-grid-style3 .col-lg-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.todij-team-grid .col-md-6,
.team-grid-style3 .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

@media (max-width: 768px) {
    .todij-team-grid .col-md-6,
    .team-grid-style3 .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .todij-team-grid .col-lg-4,
    .team-grid-style3 .col-lg-4,
    .todij-team-grid .col-lg-3,
    .team-grid-style3 .col-lg-3,
    .todij-team-grid .col-lg-6,
    .team-grid-style3 .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}
