.tsabiable-services {
    padding: 40px 20px;
    text-align: center;
    box-sizing: border-box;
}

/* Services wrapper */
.services-wrapper {
    margin: 0 auto;
    text-align: center;
    padding-left: 20px;
    padding-right: 20px;
}

/* Heading wrapper */
.services-heading-wrapper {
    margin-bottom: 30px;
}

.main-heading {
    margin: 0 0 10px;
    color: #0c5e37 !important;
}

.description {
    margin: 0 auto 40px;
    width: 75%;
}

/* Cards container */
.cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 60px 24px;
    justify-content: center;
    margin: 0 auto;
}

/* Flip card */
.flip-card {
    width: 24%;
    height: 300px;
    perspective: 1000px;
    box-sizing: border-box;
}

@media (max-width: 1515px) {
    .flip-card {
        width: 30%;
    }
}

@media (max-width: 991px) {
    .flip-card {
        width: 48%;
    }
    .description {
        margin: 0 auto 40px;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .flip-card {
        width: 75%;
    }
}

@media (max-width: 600px) {
    .flip-card {
        width: 100%;
    }
}

/* Flip card inner */
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    -moz-transform-style: preserve-3d;
}

/* Flip card hover effect */
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
    -moz-transform: rotateY(180deg);
}

/* Flip card front and back */
.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

/* Flip card front */
.flip-card-front {
    background-size: cover;
    background-position: center;
    background-color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.flip-card-front::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1;
    border-radius: 10px;
    pointer-events: none;
}

.flip-card-front .front-heading {
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1.5em;
    margin: 0;
    z-index: 2;
}

/* Flip card back */
.flip-card-back {
    background-color: #0c5e37;
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
    -moz-transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.flip-card-back .back-heading {
    margin: 0 0 10px;
    color: #fff;
}

.flip-card-back .back-description {
    margin: 0 0 15px;
    color: #fff;
    line-height: 1.4;
}
@media(max-width: 400px){
	.back-description {
		font-size: 13px;
	}
}

.flip-card-back .back-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: transparent;
    color: #fff;
    text-decoration: none;
    border-radius: 14px;
    transition: background-color 0.3s ease;
    border: 1px solid #fff;
}

.flip-card-back .back-button:hover {
    background-color: transparent;
    border-color: #fff;
}

/* Pagination */
.tsabiable-pagination {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

.tsabiable-prev,
.tsabiable-next {
    margin-right: 20px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
}

.tsabiable-prev img,
.tsabiable-next img {
    width: 56px;
    height: 100%;
}

@media (max-width: 991px) {
    .tsabiable-prev img,
    .tsabiable-next img {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 600px) {
    .tsabiable-prev img,
    .tsabiable-next img {
        width: 40px;
        height: 40px;
    }
}

.tsabiable-progress-container {
    margin-left: 1vh;
    background: #e0e0e0;
    height: 6px;
    width: 100%;
    max-width: 800px;
    overflow: hidden;
    position: relative;
    display: block;
}

@media (max-width: 1515px) {
    .tsabiable-progress-container {
        max-width: 400px;
    }
}

@media (max-width: 991px) {
    .tsabiable-progress-container {
        max-width: 300px;
    }
}

@media (max-width: 600px) {
    .tsabiable-progress-container {
        max-width: 200px;
    }
}

.tsabiable-progress-bar {
    background: #005D21;
    height: 100%;
    transition: width 0.3s ease-in-out;
}

.tsabiable-load-more {
    display: none !important;
    margin: 30px auto 0;
    padding: 15px 25px;
    background-color: #0c5e37;
    color: #fff;
    border: none;
    border-radius: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.tsabiable-load-more:hover {
    background-color: #094b2b;
}

@media (max-width: 600px) {
    .tsabiable-pagination {
        display: none;
    }
    .tsabiable-load-more {
        display: block !important;
    }
}

@media (max-width: 767px) {
    .tsabiable-load-more[style*="display: none"] {
        display: none !important;
    }
}

/* Layout 2 styles */
.tsabiable-service-card {
    width: 22%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tsabiable-service-card-image {
    position: relative;
    width: 125px;
    height: 125px;
    background-color: #0c5e37;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: -70px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.tsabiable-service-card-image img {
    width: 50%;
    height: 50%;
    object-fit: contain;
}

.tsabiable-service-card:hover .tsabiable-service-card-image {
    background-color: #93764E;
}

.tsabiable-service-card:hover .tsabiable-service-card-content {
    color: #fff;
    border-color: #fff;
    background-color: #0c5e37;
}

.tsabiable-service-card:hover .tsabiable-service-card-content * {
    color: #fff;
}

.tsabiable-service-card:hover .tsabiable-service-card-button {
    background-color: #93764E;
    border-color: #93764E;
    color: #fff;
}

.tsabiable-service-card:hover .tsabiable-service-card-content .tsabiable-service-card-divider {
    background-color: #fff;
}

.tsabiable-service-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 15px;
    border-top-left-radius: 100px;
    min-height: 486px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    gap: 20px;
    transition: background-color 0.4s ease;
}

.tsabiable-service-card-content h3 {
    color: #333;
    margin: 10px 0;
    font-weight: 600;
}

.tsabiable-service-card-content .tsabiable-service-card-divider {
    height: 7px;
    background: #0c5e37;
    width: 80%;
    margin: 10px auto;
}

.tsabiable-service-card-content p {
    color: #666;
    margin-bottom: 15px;
}

.tsabiable-service-card-content .tsabiable-service-card-button {
    display: inline-block;
    padding: 8px 30px;
    background: #0c5e37;
    color: #fff;
    border-radius: 14px;
    text-decoration: none;
    transition: background 0.3s;
}

@media (max-width: 768px) {
    .tsabiable-service-card-content h3 {
        font-size: 1.1em;
    }

    .tsabiable-service-card-content p {
        font-size: 0.85em;
    }

    .tsabiable-service-card-content .tsabiable-service-card-button {
        font-size: 0.85em;
        padding: 7px 30px;
    }
}

@media (max-width: 1440px) {
    .tsabiable-service-card {
        width: 30%;
    }
}

@media (max-width: 991px) {
    .tsabiable-service-card {
        width: 47%;
    }
}

@media (max-width: 600px) {
    .tsabiable-service-card {
        width: 100%;
    }
}

.tsabiable-services .tsabiable-service-card-image img.layout2-icon {
    max-width: 100px;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Layout 3 Carousel Styles */
.layout3-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 40px auto 0;
    max-width: 1700px;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.layout3-carousel-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.layout3-carousel-track {
    display: flex;
    gap: 24px;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.layout3-card {
    flex: 0 0 calc((100% - 72px) / 4);
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.layout3-card:hover {
    transform: translateY(-3px);
}

.layout3-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.layout3-card-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #222;
    position: relative;
}

.layout3-card-image::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.5));
}

.layout3-card-title {
    padding: 18px 15px;
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    background: #93764e;
    margin: 0;
}

.layout3-nav {
    background: #93764e;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: background-color 0.3s ease, transform 0.2s ease;
    flex-shrink: 0;
    z-index: 10;
}

.layout3-nav:hover {
    background: #7a5f3d;
    transform: scale(1.05);
}

.layout3-nav:active {
    transform: scale(0.95);
}

.layout3-nav svg {
    width: 24px;
    height: 24px;
}

.layout3-prev {
    order: -1;
}

.layout3-next {
    order: 1;
}

/* Responsive adjustments for Layout 3 */
@media (max-width: 1560px) {
    .layout3-carousel-wrapper {
        max-width: 100%;
        padding: 0 40px;
    }
}

@media (max-width: 1400px) {
    .layout3-carousel-wrapper {
        padding: 0 30px;
    }
}

@media (max-width: 1200px) {
    .layout3-card {
        flex: 0 0 calc((100% - 48px) / 3);
    }
    
    .layout3-carousel-track {
        gap: 24px;
    }
    
    .layout3-carousel-wrapper {
        padding: 0 30px;
    }
}

@media (max-width: 991px) {
    .layout3-card {
        flex: 0 0 calc((100% - 24px) / 2);
    }
    
    .layout3-nav {
        width: 45px;
        height: 45px;
    }
    
    .layout3-carousel-track {
        gap: 24px;
    }
    
    .layout3-carousel-wrapper {
        padding: 0 25px;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .layout3-card {
        flex: 0 0 100%;
    }
    
    .layout3-nav {
        width: 40px;
        height: 40px;
    }
    
    .layout3-nav svg {
        width: 20px;
        height: 20px;
    }
    
    .layout3-card-image {
        height: 220px;
    }
    
    .layout3-card-title {
        font-size: 1em;
        padding: 15px 10px;
	}
    
    .layout3-carousel-wrapper {
        padding: 0 20px;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .layout3-carousel-wrapper {
        gap: 10px;
        padding: 0 15px;
    }
    
    .layout3-nav {
        width: 35px;
        height: 35px;
    }
    
    .layout3-card-image {
        height: 200px;
    }
}

/* Layout 4 Grid Styles (Case Studies Style) */
.layout4-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    justify-content: center;
}

@media (max-width: 1440px) {
    .layout4-grid {
        justify-content: center;
    }
}

.ts-layout4-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    padding: 0px 20px 30px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 450px;
    flex: 1 1 calc(25% - 50px);
    max-width: calc(25% - 50px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ts-layout4-card,
.service-image-container,
.service-title,
.service-description,
.service-divider,
.service-button {
    transition: all 0.3s ease;
}

.ts-layout4-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
	background-color: #0c5e30;
}

.ts-layout4-card:hover .service-image-container {
    background-color: #93764e;
}
.ts-layout4-card:hover .service-title{
	color: #fff;
}

.ts-layout4-card:hover .service-description{
	color: #fff;
}

.ts-layout4-card:hover .service-divider {
    background: #fff;
}

.ts-layout4-card:hover .service-button {
    background: #93764e;
    transform: scale(1.05);
}


.service-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    justify-content: left;
}

.service-image-container {
    width: 30%;
    clip-path: polygon(0% 0%, 100% 0, 100% 65%, 50% 100%, 0 65%);
    overflow: hidden;
    background-color: #0c5e37;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 20px 40px 20px;
}

.service-image-container img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.service-title {
    font-size: 1.5em;
    font-weight: 700;
    color: #000;
    margin: 15px 0;
    text-align: center;
}

.service-divider {
    border: 0;
    height: 7px;
    background: #0c5e37;
    margin: 15px 0;
}

.service-description {
    color: #000;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    text-align: center;
}

.service-button-wrapper {
    text-align: center;
    margin-top: auto;
}

.service-button {
    display: inline-block;
    padding: 6px 30px;
    background: #0c5e37;
    color: #fff;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
}

.service-button:hover {
    background: #93764e;
    transform: scale(1.05);
}

/* Responsive adjustments for Layout 4 */
@media (max-width: 1440px) {
    .ts-layout4-card {
        flex: 1 1 calc(33.333% - 40px);
        max-width: calc(33.333% - 40px);
    }
}

@media (max-width: 991px) {
    .ts-layout4-card {
        flex: 1 1 calc(50% - 30px);
        max-width: calc(50% - 30px);
    }
    
    .layout4-grid {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .ts-layout4-card {
        flex: 1 1 47%;
        max-width: 100%;
        min-height: 400px;
    }
    
    .layout4-grid {
        gap: 25px;
    }
    
    .service-title {
        font-size: 1.3em;
    }
    
    .service-image-container {
        width: 50%;
    }
}

@media (max-width: 600px) {
    .ts-layout4-card {
        flex: 1 1 100%;
    }
	.service-image-container{
		width: 30%;
	}
}

@media (max-width: 480px) {
    .service-title {
        font-size: 1.2em;
    }
    
    .service-button {
        padding: 10px 25px;
        font-size: 0.9em;
    }
	
}

/* Layout 5 Simple Cards Styles (Case Studies Style) */
.layout5-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    justify-content: center;
}

.ts-layout5-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 28px;
    padding: 50px;
    display: flex;
    flex-direction: column;
    flex: 1 1 calc(25% - 50px);
    max-width: calc(25% - 50px);
    min-height: 450px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ts-layout5-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: #0c5e37;
	transition: background 0.3s ease, transform 0.2s ease;
    background-image: linear-gradient(135deg, #7A7249 , #38663A);
}

.layout5-title {
    font-size: 1.5em;
    font-weight: 700;
    color: #000;
    margin: 0 0 15px;
    text-align: center;
    transition: color 0.3s ease;
}

.ts-layout5-card:hover .layout5-title {
    color: #fff;
}

.layout5-divider {
    width: 100%;
    height: 5px;
    background: #0c5e37;
    border: none;
    margin: 15px 0 20px;
    transition: background-color 0.3s ease;
}

.ts-layout5-card:hover .layout5-divider {
    background: #fff;
}

.layout5-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    text-align: center;
    transition: color 0.3s ease;
}

.ts-layout5-card:hover .layout5-description {
    color: #fff;
}

.layout5-button-wrapper {
    text-align: left;
    margin-top: auto;
}

.layout5-button {
    display: inline-block;
    padding: 12px 30px;
    background: #0c5e37;
    color: #fff;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
}

.ts-layout5-card:hover .layout5-button {
    background: #fff;
    color: #0c5e37;
}

.layout5-button:hover {
    transform: scale(1.05);
}

/* Responsive adjustments for Layout 5 */
@media (max-width: 1440px) {
    .ts-layout5-card {
        flex: 1 1 calc(33.333% - 40px);
        max-width: calc(33.333% - 40px);
    }
}

@media (max-width: 991px) {
    .ts-layout5-card {
        flex: 1 1 calc(50% - 30px);
        max-width: calc(50% - 30px);
		padding: 25px;
    }
    
    .layout5-grid {
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .ts-layout5-card {
        flex: 1 1 100%;
        max-width: 100%;
		padding: 50px;
    }
    
    .layout5-grid {
        gap: 25px;
    }
    
    .layout5-title {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    .layout5-title {
        font-size: 1.2em;
    }
    
    .layout5-button {
        padding: 10px 25px;
        font-size: 0.9em;
    }
    
    .ts-layout5-card {
        padding: 25px 20px;
        min-height: 200px;
    }
}

/* Layout 6 Border Cards Styles */
.layout6-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    justify-content: center;
}

.ts-layout6-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 28px;
    padding: 50px;
    display: flex;
    flex-direction: column;
    flex: 1 1 calc(25% - 50px);
    max-width: calc(25% - 50px);
    min-height: 450px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-bottom 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

.ts-layout6-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: #93764e;
    border-radius: 0 0 28px 28px;
}

.ts-layout6-card:hover {
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.25);
}

.ts-layout6-card:hover::after {
    height: 30px;
}

.layout6-title {
    font-size: 1.5em;
    font-weight: 700;
    color: #000;
    margin: 0 0 15px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.layout6-divider {
    width: 100%;
    height: 5px;
    background: #0c5e37;
    border: none;
    margin: 15px 0 20px;
    position: relative;
    z-index: 1;
}

.layout6-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.layout6-button-wrapper {
    text-align: left;
    margin-top: auto;
    position: relative;
    z-index: 1;
}

.layout6-button {
    display: inline-block;
    padding: 12px 30px;
    background: #0c5e37;
    color: #fff;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
}

.layout6-button:hover {
    background: #93764e;
    transform: scale(1.05);
}


@media (max-width: 1440px) {
    .ts-layout6-card {
        flex: 1 1 calc(33.333% - 40px);
        max-width: calc(33.333% - 40px);
    }
}

@media (max-width: 991px) {
    .ts-layout6-card {
        flex: 1 1 calc(50% - 30px);
        max-width: calc(50% - 30px);
		padding: 25px;
    }
    
    .layout6-grid {
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .ts-layout6-card {
        flex: 1 1 100%;
        max-width: 100%;
		padding: 50px;
    }
    
    .layout6-grid {
        gap: 25px;
    }
    
    .layout6-title {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    .layout6-title {
        font-size: 1.2em;
    }
    
    .layout6-button {
        padding: 10px 25px;
        font-size: 0.9em;
    }
    
    .ts-layout6-card {
        padding: 25px 20px;
        min-height: 200px;
    }
}