/*=============================
	Spacing Optimization CSS
===============================*/

/* Reduce general section padding */

/* Testimonials (Some of our work) section optimization */
.testimonials {
    padding: 60px 0 !important;
}

/* Team section optimization */
.team .container .row.title {
    padding: 60px 0px 120px 0px !important;
}

.team .container .team-members {
    padding: 60px 0px !important;
    margin-top: 30px !important;
}

/* Override the row padding-bottom in team-members */
.team .container .team-members .row {
    padding-bottom: 10px !important;
}

/* Schedule a call button spacing optimization */
.team .row.mb-4 {
    margin-bottom: 0.3rem !important;
}

.team .button-container {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Reduce bottom padding of entire team section */
.team {
    padding-bottom: 20px !important;
}

/* Work Environment section optimization - Override work-environment.css */
.work-environment.section {
    padding: 60px 0 !important;
}

.work-environment.work-environment {
    padding: 60px 0 !important;
}

#work-environment.section.work-environment {
    padding: 60px 0 !important;
}

/* Tablet optimizations */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .section {
        padding-bottom: 50px !important;
    }
    
    .testimonials {
        padding: 50px 0 !important;
    }
    
    .team .container .row.title {
        padding: 50px 0px 80px 0px !important;
    }
    
    .team .container .team-members {
        padding: 50px 0px !important;
        margin-top: 50px !important;
    }
    
    .team .container .team-members .row {
        padding-bottom: 8px !important;
    }
    
    .team .row.mb-4 {
        margin-bottom: 0.05rem !important;
        margin-top: 15px !important;
    }
    
    .team {
        padding-bottom: 0px !important;
    }
    
    .work-environment.section {
        padding: 50px 0 !important;
    }
    
    .work-environment.work-environment {
        padding: 50px 0 !important;
    }
    
    #work-environment.section.work-environment {
        padding: 50px 0 !important;
    }
}

/* Mobile optimizations */
@media (max-width: 767px) {
    .section {
        padding-bottom: 40px !important;
    }
    
    .testimonials {
        padding: 40px 0 !important;
    }
    
    .team .container .row.title {
        padding: 40px 0px 60px 0px !important;
    }
    
    .team .container .team-members {
        padding: 40px 0px !important;
    }
    
    .team .container .team-members .row {
        padding-bottom: 5px !important;
    }
    
    .team .row.mb-4 {
        margin-bottom: 0.05rem !important;
    }
    
    .team {
        padding-bottom: 5px !important;
    }
    
    .work-environment.section {
        padding: 40px 0 !important;
    }
    
    .work-environment.work-environment {
        padding: 40px 0 !important;
    }
    
    #work-environment.section.work-environment {
        padding: 40px 0 !important;
    }
}

/* Desktop specific optimizations (only for PC) */
@media only screen and (min-width: 1025px) {
    /* Reduce space between testimonials title and carousel */
    .testimonials .section-title {
        margin-bottom: 40px !important;
    }
    
    .testimonials .gtco-testimonials {
        margin-top: 20px !important;
    }
    
    /* Reduce space between carousel and team section */
    .testimonials {
        padding-bottom: 50px !important;
    }
    
    /* Reduce space between team schedule call and work environment */
    .team .row.mb-4 {
        margin-bottom: 0.3rem !important;
        margin-top: 40px !important;
    }
    
    .team {
        padding-bottom: 20px !important;
    }
    
    /* Add more margin-top to work environment section on PC */
    section#work-environment.section.work-environment {
        margin-top: 40px !important;
        padding: 60px 0 !important;
    }
}

/* Ultra-specific rules to override any conflicting styles */
section#team.section.team {
    padding-bottom: 20px !important;
}

section#team .container .team-members .row {
    padding-bottom: 10px !important;
}

section#team .row.mb-4 {
    margin-bottom: 0.3rem !important;
    margin-top: 20px !important;
}

section#work-environment.section.work-environment {
    padding: 60px 0 !important;
    margin-top: 40px !important;
}

/* Mobile ultra-specific overrides */
@media (max-width: 767px) {
    section#team.section.team {
        padding-bottom: 5px !important;
    }
    
    section#team .container .team-members .row {
        padding-bottom: 5px !important;
    }
    
    section#team .row.mb-4 {
        margin-bottom: 0.05rem !important;
    }
    
    section#work-environment.section.work-environment {
        padding: 40px 0 !important;
    }
}

/* Tablet ultra-specific overrides */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    section#team.section.team {
        padding-bottom: 0px !important;
    }
    
    section#team .container .team-members .row {
        padding-bottom: 8px !important;
    }
    
    section#team .row.mb-4 {
        margin-bottom: 0.05rem !important;
        margin-top: 15px !important;
    }
    
    section#work-environment.section.work-environment {
        padding: 50px 0 !important;
        margin-top: -10px !important;
    }
}

/* Team Cards Text Visibility Improvements */
/* Improve name overlay gradient for better text visibility */
.team-card-name-overlay {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.8)) !important;
    padding: 60px 20px 20px !important;
}

/* Enhance content overlay gradient and remove text clipping */
.team-card-content {
    background: linear-gradient(transparent, rgba(42, 37, 44, 0.7), rgba(42, 37, 44, 0.95)) !important;
    padding: 50px 20px 25px !important;
}

/* Remove text clipping and improve readability */
.team-card-description {
    display: block !important;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
    max-height: none !important;
    text-overflow: unset !important;
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) !important;
}

/* Improve name text shadow for better contrast */
.team-card-name, .team-card-name-overlay .team-card-name {
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8) !important;
    font-weight: 700 !important;
}

/* Improve role text visibility */
.team-card-role {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) !important;
    font-weight: 600 !important;
}

/* Mobile improvements for text visibility */
@media (max-width: 768px) {
    .team-card-name-overlay {
        padding: 50px 15px 18px !important;
    }
    
    .team-card-content {
        padding: 40px 15px 20px !important;
    }
    
    .team-card-description {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 576px) {
    .team-card-name-overlay {
        padding: 45px 12px 15px !important;
    }
    
    .team-card-content {
        padding: 35px 12px 18px !important;
    }
}
