html {
    overflow-x: visible !important;
}

body {
    overflow-x: clip !important;
}

.team-img {
  width: 100%;
  height: auto;
  max-height: 500px; /* Slightly increased for 1440p */
  object-fit: cover;
  object-position: top center; /* Ensures faces are not cut off from the top */
  display: block;
  border-radius: 0.5rem;
  transition: transform 0.5s cubic-bezier(.4,0,.2,1);
}

.team-img:hover {
    transform: translateY(-5px); /* Subtle lift instead of scale to maintain composition */
}

/* Lawyer Card Typography */
.team-name {
    font-family: var(--primary-font) !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    margin-bottom: 2px !important;
    letter-spacing: -0.5px;
    color: var(--dark-gray) !important;
}

.team-designation {
    font-family: var(--primary-font) !important;
    font-size: 16px !important;
    color: var(--dark-gray) !important;
    letter-spacing: 1px;
    font-weight: 400;
    margin-bottom: 0 !important;
}

/* Core Expertise List Fix */
#lawyer-expertise li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    line-height: 26px;
}

#lawyer-expertise li i {
    margin-top: 4px;
    flex-shrink: 0;
}

#lawyer-expertise li div {
    flex-grow: 1;
}

#lawyer-expertise li strong {
    color: var(--dark-gray);
    font-weight: 700;
}

#lawyer-expertise li,
#lawyer-education li,
#lawyer-membership li {
    font-size: 18px;
}

/* Mobile Responsiveness */
@media (max-width: 991px) {
    aside {
        position: relative !important;
        top: 0 !important;
    }

    .team-img {
        max-height: 380px;
    }

    #lawyer-expertise li,
    #lawyer-education li,
    #lawyer-membership li {
        font-size: 17px;
    }
}

@media (max-width: 767px) {
    .container-fluid.px-5 {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
}

@media (max-width: 480px) {
    .container-fluid.px-5 {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}
