/* Services Section Fixes - Alignment, Height, and Hover Issues */

/* Main container fixes */
.services__3 {
    padding: 80px 0;
    background-color: #f8f9fa;
}

/* Section title improvements */
.section__title .sub-title {
    color: #4361ee;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.section__title .title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0;
}

/* Service item container fixes */
.services__3-item {
    background-color: #fff;
    border-radius: 15px;
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    height: 450px; /* Fixed height for all items */
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.03);
    z-index: 1;
}

/* Service item hover effect */
.services__3-item:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: rgba(67, 97, 238, 0.2);
}

/* Service item background hover effect */
.services__3-item:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 0;
    background: linear-gradient(45deg, rgba(67, 97, 238, 0.03) 0%, rgba(67, 97, 238, 0.08) 100%);
    left: 0;
    bottom: 0;
    transition: all 0.5s ease;
    z-index: -1;
}

.services__3-item:hover:before {
    height: 100%;
}

/* Service count style */
.service-count {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 60px;
    font-weight: 800;
    color: rgba(67, 97, 238, 0.07);
    line-height: 1;
    z-index: -1;
    transition: all 0.3s ease;
}

.services__3-item:hover .service-count {
    color: rgba(67, 97, 238, 0.12);
}

/* Icon container fixes */
.services__3-item-icon {
    width: 70px;
    height: 70px;
    line-height: 70px;
    text-align: center;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.services__3-item-icon i {
    font-size: 30px;
    color: #4361ee;
    transition: all 0.3s ease;
}

.services__3-item-icon img {
    max-width: 35px;
    max-height: 35px;
    transition: all 0.3s ease;
}

.services__3-item:hover .services__3-item-icon {
    background: #4361ee;
}

.services__3-item:hover .services__3-item-icon i,
.services__3-item:hover .services__3-item-icon img {
    color: #fff;
    filter: brightness(0) invert(1);
    transform: scale(1.1);
}

/* Title style fixes */
.services__3-item-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.services__3-item-title a {
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.services__3-item:hover .services__3-item-title a {
    color: #4361ee;
}

/* Text content fixes */
.services__3-item-text {
    font-size: 15px;
    line-height: 1.7;
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1; /* Allow text to take available space */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
}

/* Learn more link fixes */
.service-link {
    font-size: 16px;
    font-weight: 600;
    color: #4361ee;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    margin-top: auto; /* Push to bottom */
}

.service-link i {
    margin-left: 5px;
    transition: all 0.3s ease;
}

.service-link:hover {
    color: #1a46e5;
}

.service-link:hover i {
    transform: translateX(5px);
}

/* Button styling */
.fill-btn {
    background: #4361ee;
    color: #fff;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 25px;
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.fill-btn:hover {
    background: #1a46e5;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.3);
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .services__3-item {
        height: 480px;
    }
    
    .services__3-item-title {
        font-size: 20px;
    }
    
    .section__title .title {
        font-size: 32px;
    }
}

@media (max-width: 767px) {
    .services__3 {
        padding: 60px 0;
    }
    
    .services__3-item {
        height: auto;
        min-height: 420px;
    }
    
    .services__3-item-title {
        font-size: 18px;
    }
    
    .section__title .title {
        font-size: 28px;
    }
    
    .services__3-item-text {
        -webkit-line-clamp: 5;
    }
}

@media (max-width: 575px) {
    .services__3 {
        padding: 50px 0;
    }
    
    .services__3-item {
        padding: 30px 20px;
        min-height: 380px;
    }
    
    .services__3-item-icon {
        width: 60px;
        height: 60px;
        line-height: 60px;
    }
    
    .section__title .title {
        font-size: 24px;
    }
}

/* Service Section UI Improvements */

.services-section {
    padding: 100px 0 30px; /* Reduced bottom padding */
    background-color: #f8f9fa;
    position: relative;
    overflow: visible;
    margin-bottom: 0; /* Removed bottom margin */
}

.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25px 25px, rgba(67, 97, 238, 0.07) 2px, transparent 5px),
        radial-gradient(circle at 75px 75px, rgba(67, 97, 238, 0.05) 4px, transparent 7px),
        radial-gradient(circle at 125px 50px, rgba(67, 97, 238, 0.07) 3px, transparent 6px),
        radial-gradient(circle at 50px 125px, rgba(67, 97, 238, 0.05) 2px, transparent 5px);
    background-size: 150px 150px;
    opacity: 0.5;
    z-index: 0;
}

/* Section Titles */
.subtitle, .section-title, .section-description {
    position: relative;
    z-index: 10; /* Higher z-index to ensure visibility */
}

.subtitle {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #4361ee;
    font-weight: 700;
    margin-bottom: 15px;
    display: inline-block;
    padding-left: 45px;
}

.subtitle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 2px;
    background-color: #4361ee;
}

.section-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 20px;
    color: #222;
    line-height: 1.2;
}

.section-description {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
    max-width: 800px;
    margin: 0 auto 50px; /* Increased bottom margin for better spacing */
}

/* Service Card Design */
.service-card {
    background-color: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    height: auto;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    z-index: 1;
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: rgba(67, 97, 238, 0.2);
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(180deg, rgba(67, 97, 238, 0) 0%, rgba(67, 97, 238, 0.04) 100%);
    z-index: -1;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-card:hover::after {
    height: 100%;
}

/* Service Image Container */
.service-img-container {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.service-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.7s ease;
    transform: scale(1.01);
}

.service-card:hover .service-img {
    transform: scale(1.08);
}

/* Service Icon */
.service-icon {
    position: absolute;
    bottom: -25px;
    left: 30px;
    width: 60px;
    height: 60px;
    background-color: #4361ee;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
    transition: all 0.3s ease;
    z-index: 5;
}

.service-icon i {
    font-size: 24px;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: rotateY(180deg);
    background-color: #fff;
    color: #4361ee;
}

.service-card:hover .service-icon i {
    transform: rotateY(-180deg);
    color: #4361ee;
}

/* Service Content */
.service-content {
    padding: 40px 30px 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
}

.service-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    line-height: 1.3;
    margin-top: 5px;
}

.service-title a {
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.service-card:hover .service-title a {
    color: #4361ee;
}

.service-description {
    font-size: 15px;
    line-height: 1.7;
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Service Link */
.service-link {
    font-size: 15px;
    font-weight: 600;
    color: #4361ee;
    display: inline-flex;
    align-items: center;
    position: relative;
    padding-bottom: 2px;
    text-decoration: none;
    align-self: flex-start;
    transition: all 0.3s ease;
}

.service-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #4361ee;
    transition: all 0.3s ease;
}

.service-link:hover {
    color: #1a46e5;
}

.service-link:hover::after {
    width: 100%;
}

.service-link i {
    margin-left: 8px;
    transition: all 0.3s ease;
}

.service-link:hover i {
    transform: translateX(5px);
}

/* View All Button */
.btn-primary {
    background-color: #4361ee;
    border-color: #4361ee;
    border-radius: 8px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.2);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    z-index: -1;
}

.btn-primary:hover {
    background-color: #2643c8;
    border-color: #2643c8;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover::after {
    left: 100%;
}

/* Responsive Design */
@media (max-width: 1199px) {
    .service-img-container {
        height: 180px;
    }
    
    .service-content {
        padding: 35px 25px 20px;
    }
    
    .section-title {
        font-size: 38px;
    }
}

@media (max-width: 991px) {
    .services-section {
        padding: 70px 0;
    }
    
    .service-img-container {
        height: 170px;
    }
    
    .service-content {
        padding: 35px 20px 20px;
    }
    
    .service-icon {
        width: 55px;
        height: 55px;
        left: 25px;
    }
    
    .service-icon i {
        font-size: 22px;
    }
    
    .section-title {
        font-size: 34px;
    }
}

@media (max-width: 767px) {
    .services-section {
        padding: 80px 0 60px; /* More top padding on mobile */
    }
    
    .service-img-container {
        height: 160px;
    }
    
    .service-content {
        padding: 30px 20px 20px;
    }
    
    .service-title {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .service-description {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .service-link {
        font-size: 14px;
    }
    
    .section-title {
        font-size: 30px;
    }
    
    /* Extra spacing for section description */
    .section-description {
        margin-bottom: 60px;
    }
    
    /* Ensure clearfix is shown on mobile */
    .clearfix.mb-4 {
        display: block;
        margin-bottom: 30px !important;
    }
}

@media (max-width: 575px) {
    .services-section {
        padding: 50px 0;
    }
    
    .service-card {
        margin-bottom: 40px;
    }
    
    .service-img-container {
        height: 180px;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
        left: 20px;
        bottom: -20px;
    }
    
    .service-icon i {
        font-size: 20px;
    }
    
    .section-title {
        font-size: 26px;
    }
    
    .subtitle {
        font-size: 14px;
        padding-left: 30px;
    }
    
    .subtitle::before {
        width: 25px;
    }
}

/* Prevent service cards from being cut off */
.services-section .row {
    margin-bottom: 0;
}

/* Give the section some space to breathe - REDUCED */
.services-section + section {
    margin-top: 10px; /* Reduced from 40px */
}

/* Make sure the container has enough room */
.services-section .container {
    position: relative;
    z-index: 2;
    padding-bottom: 20px;
}

/* Service card spacing */
.services-section .row.mb-5 {
    margin-bottom: 50px !important; /* Force more space below title section */
}

/* Ensure cards don't overlap with section title/description */
.services-section .row:not(.mb-5) {
    position: relative;
    z-index: 1;
    margin-top: 10px;
}

/* Services Slider Styles */
.services-slider-container {
    position: relative;
    padding: 20px 0 10px; /* Reduced bottom padding */
    margin-bottom: 0; /* Removed bottom margin */
}

.services-slider {
    overflow: visible;
    padding-bottom: 40px;
}

.swiper-container.services-slider {
    padding: 20px 10px 40px;
}

.services-slider .swiper-slide {
    height: auto;
    transition: all 0.4s ease;
    opacity: 0.7;
    transform: scale(0.85);
}

.services-slider .swiper-slide-active,
.services-slider .swiper-slide-duplicate-active {
    opacity: 1;
    transform: scale(1);
}

.services-slider .swiper-slide-next,
.services-slider .swiper-slide-prev {
    opacity: 0.9;
    transform: scale(0.93);
}

/* Card styles optimization for slider */
.services-slider .service-card {
    margin: 0 auto;
    max-width: 95%;
    height: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

.services-slider .service-card:hover {
    transform: translateY(-10px);
}

/* Service image container */
.services-slider .service-img-container {
    height: 220px;
}

/* Pagination */
.services-pagination {
    position: absolute;
    bottom: -5px !important; /* Move up slightly */
    left: 0;
    right: 0;
    margin-top: 0;
    text-align: center;
}

.services-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background-color: #ccc;
    opacity: 0.5;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.services-pagination .swiper-pagination-bullet-active {
    width: 30px;
    border-radius: 5px;
    background-color: #4361ee;
    opacity: 1;
}

/* Responsive slider */
@media (max-width: 991px) {
    .services-slider .service-img-container {
        height: 200px;
    }
    
    .services-slider-container {
        padding: 10px 0 30px;
    }
}

@media (max-width: 767px) {
    .services-slider .service-img-container {
        height: 180px;
    }
    
    .services-slider .swiper-slide {
        transform: scale(0.9);
    }
    
    .services-slider .swiper-slide-active,
    .services-slider .swiper-slide-duplicate-active {
        transform: scale(1);
    }
}

@media (max-width: 575px) {
    .services-slider .service-img-container {
        height: 160px;
    }
    
    .services-slider-container {
        padding: 0 0 30px;
    }
    
    .services-slider .swiper-slide {
        transform: scale(0.95);
    }
} 