/**
 * Team Section - Compact Mobile Design
 * Ultra-compact layout for mobile devices
 */

/* Mobile Compact Design - Full Width */
@media screen and (max-width: 767px) {
    
    /* Section padding reduction */
    section.team {
        padding: 30px 0 !important;
        background: #f8f9fa !important;
    }
    
    /* Full width container */
    section.team .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Title section */
    section.team .sec-title {
        margin-bottom: 20px !important;
        text-align: center !important;
        padding: 0 15px !important;
    }
    
    section.team .sec-title h2 {
        font-size: 22px !important;
        margin-bottom: 8px !important;
        color: #333 !important;
    }
    
    section.team .sec-title p {
        font-size: 13px !important;
        color: #666 !important;
        margin: 0 !important;
    }
    
    /* Full width columns */
    section.team .col-xl-3,
    section.team .col-lg-4,
    section.team .col-md-6,
    section.team .col-xl-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Remove row margins for full width */
    section.team .row {
        margin: 0 !important;
    }
    
    /* Override team-wrap padding that prevents full width */
    section.team .team-wrap {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Remove mt-30 spacing */
    section.team .mt-30 {
        margin-top: 0 !important;
    }
    
    /* Full width card design with max height */
    section.team .xb-team {
        background: white !important;
        border-radius: 0 !important;
        margin: 0 !important;
        margin-bottom: 1px !important;
        box-shadow: none !important;
        border-bottom: 1px solid #e5e5e5 !important;
        padding: 0 !important;
        text-align: left !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        max-height: 150px !important;
    }
    
    /* Horizontal layout with max height */
    section.team .xb-team .xb-item--inner {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        padding: 10px 15px !important;
        margin: 0 !important;
        transform: none !important;
        gap: 12px !important;
        position: relative !important;
        max-height: 150px !important;
        height: 100px !important;
        width: 100% !important;
        overflow: hidden !important;
    }
    
    /* Small circular image */
    section.team .xb-team .xb-item--img {
        width: 70px !important;
        height: 70px !important;
        min-width: 70px !important;
        max-width: 70px !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 50% !important;
        overflow: hidden !important;
        border: 2px solid #f0f0f0 !important;
        flex-shrink: 0 !important;
        background: #fff !important;
        position: relative !important;
        display: block !important;
    }
    
    section.team .xb-team .xb-item--img img {
        width: 70px !important;
        height: 70px !important;
        min-width: 70px !important;
        max-width: 70px !important;
        object-fit: cover !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Text content */
    section.team .xb-team .xb-item--holder {
        flex: 1 !important;
        padding: 0 !important;
        margin: 0 !important;
        text-align: left !important;
        overflow: hidden !important;
    }
    
    section.team .xb-team .xb-item--name {
        font-size: 16px !important;
        font-weight: 600 !important;
        margin: 0 0 4px 0 !important;
        line-height: 1.3 !important;
        display: block !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    section.team .xb-team .xb-item--name a {
        color: #333 !important;
        text-decoration: none !important;
    }
    
    section.team .xb-team .xb-item--designation {
        font-size: 13px !important;
        color: #007751 !important;
        font-weight: 500 !important;
        margin: 0 0 8px 0 !important;
        display: block !important;
        line-height: 1.3 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* Social icons - inline and small */
    section.team .xb-team .xb-item--social {
        display: flex !important;
        gap: 5px !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
        position: absolute !important;
        right: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }
    
    section.team .xb-team .xb-item--social li {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    section.team .xb-team .xb-item--social a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 28px !important;
        height: 28px !important;
        background: #f8f8f8 !important;
        border-radius: 50% !important;
        color: #666 !important;
        font-size: 11px !important;
        text-decoration: none !important;
        transition: all 0.2s ease !important;
    }
    
    section.team .xb-team .xb-item--social a:active {
        background: #007751 !important;
        color: white !important;
    }
}

/* Extra small devices - even more compact */
@media screen and (max-width: 375px) {
    /* Keep same size for consistency */
    section.team .xb-team .xb-item--img,
    section.team .xb-team .xb-item--img img {
        width: 60px !important;
        height: 60px !important;
        min-width: 60px !important;
        max-width: 60px !important;
    }
    
    /* Smaller text */
    section.team .xb-team .xb-item--name {
        font-size: 14px !important;
    }
    
    section.team .xb-team .xb-item--designation {
        font-size: 11px !important;
    }
    
    /* Even smaller social icons */
    section.team .xb-team .xb-item--social a {
        width: 22px !important;
        height: 22px !important;
        font-size: 9px !important;
    }
    
    /* Tighter padding but maintain max height */
    section.team .xb-team .xb-item--inner {
        padding: 10px 12px !important;
        gap: 10px !important;
        height: 90px !important;
        max-height: 150px !important;
    }
}

/* Override all conflicting styles with maximum specificity */
@media screen and (max-width: 767px) {
    html body section.team .xb-team .xb-item--img,
    html body.home section.team .xb-team .xb-item--img,
    html body .team .xb-team .xb-item--img {
        width: 70px !important;
        height: 70px !important;
        max-width: 70px !important;
        max-height: 70px !important;
    }
    
    html body section.team .xb-team .xb-item--img img,
    html body.home section.team .xb-team .xb-item--img img,
    html body .team .xb-team .xb-item--img img {
        width: 70px !important;
        height: 70px !important;
        max-width: 70px !important;
        max-height: 70px !important;
    }
    
    /* Ensure max height constraint */
    html body section.team .xb-team,
    html body.home section.team .xb-team {
        max-height: 150px !important;
        overflow: hidden !important;
    }
    
    html body section.team .xb-team .xb-item--inner,
    html body.home section.team .xb-team .xb-item--inner {
        max-height: 150px !important;
        overflow: hidden !important;
    }
    
    /* Force override team-wrap padding */
    html body section.team .team-wrap,
    html body.home section.team .team-wrap {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Remove any animations on mobile */
@media screen and (max-width: 767px) {
    section.team .wow,
    section.team [data-parallax] {
        animation: none !important;
        visibility: visible !important;
        transform: none !important;
    }
}

/* Hide text-center class effect on mobile */
@media screen and (max-width: 767px) {
    section.team .xb-team.text-center {
        text-align: left !important;
    }
    
    section.team .xb-team.text-center .xb-item--holder {
        text-align: left !important;
    }
}