/* Meet the Team Carousel Styling */
.team-carousel {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    width: 100%; /* Fills the Divi container */
    overflow: hidden; /* Hide items outside of the visible area */
    margin: 0 auto;
    padding: 0 10px; /* Padding to prevent cards from being cut off */
}

.carousel-items {
    display: flex;
    transition: transform 0.5s ease; /* Smooth slide transition */
    gap: 20px; /* Space between cards */
    transform: translateX(0); /* Ensure it starts aligned */
    width: 100%; /* Full width */
}

/* Team Card Styling */
.team-card {
    flex: 0 0 calc(33.33% - 15px); /* Each card takes up one-third of the visible area */
    max-width: calc(33.33% - 15px); /* Ensures three cards per view */
    border: 1px solid #d3d3d3;
    border-radius: 8px;
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow to make it pop */
}

.card-image {
    width: 100%;
    height: 0;
    padding-top: 66.67%; /* 3:2 Aspect Ratio */
    overflow: hidden;
    position: relative;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.team-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px; /* Reduced padding to fit better with three cards per row */
    background-color: #ffffff;
}

.card-title {
    font-size: 1.1em;
    color: #1a4076;
    font-weight: bold;
    margin: 10px 0 5px;
}

.card-job-title {
    color: #666666;
    margin-bottom: 5px;
}

.read-more {
    color: #8ec63f;
    font-weight: bold;
    text-decoration: none;
}

/* Carousel Control Buttons Styling */
.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 15px;
    width: 100%;
    padding-left: 20px;
    gap: 10px;
}

.prev-button, .next-button {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #0a4f91;
}

.prev-button.disabled, .next-button.disabled {
    color: #ccc;
    cursor: not-allowed;
}

.view-all-button a {
    color: #0a4f91;
    text-decoration: none;
    font-weight: normal;
    display: inline-block;
}

.view-all-button a:hover {
    text-decoration: underline;
}

/* Responsive Adjustments for Meet the Team */
@media (max-width: 1024px) {
    .team-card {
        flex: 0 0 calc(50% - 15px); /* Show two cards per row for tablets */
        max-width: calc(50% - 15px);
    }
}

@media (max-width: 768px) {
    .team-card {
        flex: 0 0 100%; /* Full-width cards for mobile */
        max-width: 100%;
    }
}

/*** Services Carousel Styling ***/

/* General Carousel Wrapper Styling */
.services-carousel-wrapper {
    width: 100%;
    overflow: hidden; /* Ensure no overflow */
    margin: 0 auto;
    text-align: left; /* Ensure left alignment for content */
    padding: 0 15px; /* Added padding to avoid card clipping */
}

/* Carousel Items Styling */
.services-carousel {
    display: flex;
    transition: transform 0.5s ease;
    gap: 20px; /* Space between cards */
    justify-content: flex-start; /* Ensure items align to the left */
    width: calc(100% + 30px); /* Prevent peeking of next card by extending a bit more */
    padding: 20px 0; /* Added padding to give more spacing and prevent clipping */
}

/* Service Card Styling with Enhanced Box Shadow */
.service-card {
    flex: 0 0 calc(33.33% - 20px); /* Show three cards at a time */
    max-width: calc(33.33% - 20px);
    border-radius: 8px; /* Removed border */
    padding: 25px;
    background-color: #ffffff;
    text-align: left;
    box-sizing: border-box;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); /* Reduced spread for more seamless effect */
    transition: box-shadow 0.3s ease; /* Smooth transition for hover effect */
}

.service-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15); /* Increase shadow on hover for better emphasis */
}

.card-parent {
    font-size: 0.8em;
    color: #8ec63f;
    font-weight: normal;
    padding-bottom: 0; 
}

.card-sub-title {
    color: #004c8b;
}

/* Responsive Adjustments for Services */
@media (max-width: 1024px) {
    .service-card {
        flex: 0 0 calc(50% - 20px); /* Show two cards per row for tablets */
        max-width: calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .service-card {
        flex: 0 0 100%; /* Full-width cards for mobile */
        max-width: 100%;
    }
}

/*** Taxonomy Carousel Styling ***/
/* General Styling for Taxonomy Carousel */
.taxonomy-carousel {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    width: 100%;
    overflow: hidden;
    margin: 0 auto;
}

/* Carousel Items Styling for Taxonomy Carousel */
.taxonomy-carousel .carousel-items {
    display: flex;
    transition: transform 0.5s ease; /* Smooth slide transition */
    gap: 20px; /* Space between cards */
    transform: translateX(0); /* Ensure it starts aligned */
    width: 100%; /* Full width */
}

/* Taxonomy Card Styling - Always Display One Card */
.taxonomy-card {
    flex: 0 0 100%; /* Full width for all devices */
    max-width: 100%; /* Ensures one card per view */
    scroll-snap-align: start;
    box-sizing: border-box;
    border: 1px solid #d3d3d3;
    border-radius: 8px;
    overflow: hidden;
    text-align: left;
    background-color: #ffffff;
    transition: box-shadow 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow to make it pop */
}

.taxonomy-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Carousel Control Buttons Styling for Taxonomy Carousel */
.taxonomy-carousel .carousel-controls {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 15px;
    width: 100%;
    padding-left: 20px;
    gap: 10px;
}

.taxonomy-carousel .prev-button,
.taxonomy-carousel .next-button {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #0a4f91;
}

.taxonomy-carousel .prev-button.disabled,
.taxonomy-carousel .next-button.disabled {
    color: #ccc;
    cursor: not-allowed;
}

.taxonomy-carousel .view-all-button a {
    color: #0a4f91!important;
    text-decoration: none;
    font-weight: normal;
    display: inline-block;
}

.taxonomy-carousel .view-all-button a:hover {
    text-decoration: underline;
}

/* Taxonomy Carousel Adjustments for Mobile */
@media (max-width: 480px) {
    .taxonomy-card {
        flex: 0 0 100%; /* Full-width cards for mobile */
        max-width: 100%;
    }
}

/* Grid Layout */

.services-grid-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* safest: force the track to be the container width on mobile */
@media (max-width: 768px){
  .services-carousel { width: 100% !important; }
}

