/* GL Service Widget Styles */

/* Services Grid Layout */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
}

.service-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #D0D0D0;
    transition: all 0.3s ease;
}


.service-img-wrap {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.service-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-item:hover .service-img-wrap img {
    transform: scale(1.05);
}

.service-content {
    padding: 32px 24px;
}

.service-content .service-icon-overlay {
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
}

.service-layout-one .service-content {
    display: flex;
    gap: 32px;
    align-items: center;
}

.service-heading {
    transition: all 0.3s ease;
}

.service-layout-one .service-item:hover .service-heading a {
    color: var(--home-experts-pro-primary-color);
}

/* Add overlay on image on hover for layout one */
.service-layout-one .service-item .service-img-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #0000004b;
    opacity: 0;
}

.service-layout-one .service-item:hover .service-img-wrap::after {
    opacity: 1;
}


.service-heading {
    font-size: 24px;
    font-weight: 700;
    color: #333333;
    margin: 0 0 8px 0;
    line-height: 1.6;
}

.service-description {
    font-size: 14px;
    color: #5B5B5B;
    line-height: 1.6;
}

/* Limit service description to 2 lines for layout one */
.service-layout-one .service-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Layout 2 - Card with Overlay Design */
.services-section.layout-2 .layout-2-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.services-section .container {
    padding: 0;
}

.services-section.layout-2 .layout-2-item {
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    border: 1px solid #D0D0D0;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 460px;
}



/* Icon Overlay */
.services-section.layout-2 .service-icon-overlay {
    width: 56px;
    height: 56px;
    background: #ffffff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    margin-bottom: 16px;
}

.services-section.layout-2 .service-icon-overlay img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    /* filter: brightness(0) invert(1); */
    /* Make icon white */
}

/* Content Overlay */
.services-section.layout-2 .layout-2-content {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.99) 100%);
    padding: 48px 40px 40px;
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 150px;
}

.services-section.layout-2 .service-link-wrapper {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.services-section.layout-2 .service-category {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #6F6F6F;
    margin-bottom: 28px;
}

.services-section.layout-2 .layout-2-heading {
    color: #111926;
    font-size: 32px;
    font-weight: 600;
    padding: 0px 0px 40px 0px;
    border-bottom: 1px #8D8D8D solid;
    line-height: 1.3;
}

.services-section.layout-2 .layout-2-description {
    color: #595959;
    font-size: 15px;
    line-height: 1.7;
    margin: 26px 0 0 0;
    max-width: 90%;
}

.services-section.layout-2 .service-divider {
    width: 100%;
    height: 1px;
    background-color: #D0D0D0;
}

.services-section.layout-2 .layout-2-item:hover .layout-2-heading {
    color: var(--home-experts-pro-primary-color, #111926);
}

.gl-service-pagination {
    margin-top: 40px;
}

.services-section .swiper-pagination-bullet {
    cursor: pointer;
    width: 26px;
    border-radius: 50px;
    height: 6px;
}

.services-section .swiper-pagination-bullet-active {
    background-color: #F18817;
    width: 66px;
}

.service-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* Number of lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .services-section.layout-2 .layout-2-item {
        min-height: 480px;
    }

}

@media (max-width: 1024px) {
    .services-section.layout-2 .layout-2-item {
        min-height: 400px;
    }

}

@media (max-width: 768px) {

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .service-content {
        padding: 20px;
    }

    .service-heading {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .service-description {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .service-content .service-icon-overlay {
        width: 32px;
        min-width: 32px;
        height: 32px;
        min-height: 32px;
    }

    .service-layout-one .service-content {
        gap: 24px;
    }

    /* Layout 2 Responsive */
    .services-section.layout-2 .layout-2-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .services-section.layout-2 .layout-2-content {
        padding: 32px 24px 28px;
    }

    .services-section.layout-2 .service-category {
        margin-bottom: 18px;
        font-size: 12px;
    }

    .services-section.layout-2 .layout-2-heading {
        font-size: 26px;
        margin-bottom: 20px;
    }

    .services-section.layout-2 .layout-2-description {
        font-size: 14px;
        margin-top: 20px;
    }

    .services-section.layout-2 .service-icon-overlay {
        width: 45px;
        height: 45px;
        bottom: -22px;
        left: 15px;
    }

    .services-section.layout-2 .service-icon-overlay img {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {

    .services-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .service-content {
        padding: 15px;
    }

    .service-heading {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .service-description {
        font-size: 14px;
        margin-bottom: 15px;
    }

    /* Layout 2 Mobile */
    .services-section.layout-2 .layout-2-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .services-section.layout-2 .layout-2-content {
        padding: 28px 18px 18px;
        min-height: 120px;
    }

    .services-section.layout-2 .service-category {
        margin-bottom: 14px;
    }

    .services-section.layout-2 .layout-2-heading {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .services-section.layout-2 .layout-2-description {
        font-size: 13px;
        margin-top: 18px;
    }

    .services-section.layout-2 .service-icon-overlay {
        width: 40px;
        height: 40px;
        bottom: -20px;
        left: 12px;
    }

    .services-section.layout-2 .service-icon-overlay img {
        width: 18px;
        height: 18px;
    }
}


/* Custom Icon Styles */
.service-custom-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.service-custom-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Loading State */
.services-section.loading {
    opacity: 0.7;
    pointer-events: none;
}

.services-section.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #143AA2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Slider Overrides for Layout 2 */
.services-section.layout-2 .layout-2-grid.gl-service-slider {
    display: block;
    grid-template-columns: unset;
    gap: 0;
    overflow: hidden;
    /* Ensure slider doesn't overflow */
}

.services-section.layout-2 .layout-2-grid.gl-service-slider .swiper-wrapper {
    display: flex;
    box-sizing: border-box;
}

.services-section.layout-2 .layout-2-grid.gl-service-slider .swiper-slide {
    height: auto;
    box-sizing: border-box;
}