.services {
    position: relative;
    width: 100%;
    padding: 60px 0;
    background-color: #f5f5f5;
}

.services-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Header */
.services-header {
    margin-bottom: 80px;
}

.services-title {
    font-size: 64px;
    font-weight: 700;
    letter-spacing: -1.28px;
    line-height: normal;
    margin: 0 auto;
}

.title-highlight {
    color: #340061;
    font-weight: 600;
}

.title-normal {
    color: transparent;
    -webkit-text-stroke: 1px #340061;
    font-weight: 600;
}

/* Services Content Layout */
.services-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    justify-items: center;
}

/* Tablet Image */
#tablet-image {
    transition: opacity 0.2s ease-in-out;
}

/* Service Cards */
.services-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.service-card {
    background-color: #f9f9fa;
    border: 2px solid #340061;
    padding: 30px;
    display: flex;
    flex-direction: column;
    min-height: 249px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.service-card:hover {
    background: linear-gradient(229deg, rgba(118, 125, 132, 1) 0%, rgba(107, 0, 200, 1) 100%);
    box-shadow: 0px 4px 4px rgba(196, 196, 196, 0.25);
    border: 2px solid #f5f5f5;
}

.service-card:hover .service-icon svg path {
    fill: #fff;
    transition: fill 0.3s ease;
}

.service-card:hover .service-title {
    color: #ffffff;
}

.service-card:hover .service-description {
    color: #ffffff;
}

.service-card:hover .service-btn {
    color: #ffffff;
}

.service-card:hover .service-btn svg path {
    stroke: #ffffff;
}

.service-card:hover .service-btn {
    transform: translateX(5px);
}

/* Mobile Service Images */
.mobile-service-image {
    display: none;
    margin-top: 20px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    border-radius: 8px;
}

.mobile-service-image img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px;
}

.service-btn svg {
    transition: transform 0.3s ease;
}

.service-card:hover .service-btn svg {
    transform: rotate(45deg);
}

/* Service Card Elements */
.service-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.service-title {
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 1.26px;
    color: #292e32;
    margin-bottom: 16px;
    transition: color 0.3s ease;
}

.service-description {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.98px;
    line-height: 24px;
    color: #292e32;
    opacity: 0.8;
    margin-bottom: 24px;
    flex-grow: 1;
    transition: color 0.3s ease;
}

.service-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    background: transparent;
    border: none;
    font-family: 'Lato', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.98px;
    color: #231f20;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

/* Fade-in Animation Initial State */
.fade-init {
    opacity: 0;
    transform: translateY(30px);
}

/* Animations */
.fade-in-up {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.8s ease-in-out forwards;
}

.fade-in-up-delay-1 {
    animation-delay: 0.2s;
}

.fade-in-up-delay-2 {
    animation-delay: 0.5s;
}

.fade-in-up-delay-3 {
    animation-delay: 0.8s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .services-title {
        font-size: 56px;
    }

    .services-content {
        gap: 60px;
    }
}

@media (max-width: 968px) {
    .services-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

@media (max-width: 768px) {
    .services-container {
        padding: 0 16px;
    }

    .services-header {
        margin-bottom: 60px;
    }

    .services-title {
        font-size: 42px;
        letter-spacing: -0.8px;
    }

    .services-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .services-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        padding: 25px 20px;
        min-height: auto;
    }

    /* Hide main tablet image on mobile */
    #tablet-image {
        display: none;
    }

    /* Show mobile service images */
    .mobile-service-image {
        display: block;
    }

    /* Mobile hover effects */
    .service-card:hover .mobile-service-image {
        max-height: 250px;
        opacity: 1;
        margin-top: 20px;
    }

    .service-card:hover {
        padding-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .services-header {
        margin-bottom: 40px;
    }

    .services-title {
        font-size: 36px;
        letter-spacing: -0.5px;
    }

    .service-card {
        padding: 20px 15px;
    }

    .service-title {
        font-size: 16px;
        letter-spacing: 1px;
    }

    .service-description {
        font-size: 13px;
        letter-spacing: 0.5px;
        line-height: 20px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {

    .service-card,
    .service-btn {
        animation: none;
        transition: none;
    }

    .service-card:hover {
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .service-card {
        border-width: 2px;
    }

    .service-description {
        opacity: 1;
    }
}