* {
    box-sizing: border-box;
}

.services-section {
    padding: 80px 0 80px;
    background: #F8FAFC;
    width: 100%;
    overflow-x: hidden;
}

.services-container {
    margin: 0 auto;
    padding: 0 80px;
    width: 100%;
}

.services-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.services-header h2 {
    font-size: 24px;
    /*font-weight: bold;*/
    color: #05334F;
    margin: 0;
}

.carousel-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 10px;
}

.carousel-controls {
    display: flex;
    gap: 12px;
}

.carousel-btn {
    width: 48px;
    height: 48px;
    background: #fff;
    border: 2px solid #0369A1;
    color: #0369A1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.carousel-btn:hover:not(:disabled) {
    background: #0369A1;
    border-color: #0369A1;
    color: #fff;
    transform: scale(1.05);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.services-carousel {
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* CRITICAL: Force horizontal layout */
.services-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 30px;
    transition: transform 0.5s ease-in-out;
    align-items: stretch;
}

.service-card {
    flex: 0 0 calc((100% - 90px) / 4);
    width: calc((100% - 90px) / 4);
    min-width: calc((100% - 90px) / 4);
    max-width: calc((100% - 90px) / 4);
    background: #fff;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    align-items: stretch;
    text-align: left;
    border: 2px solid #E2E8F0;
    overflow: hidden;
    min-height: 520px;
    height: auto !important;
}

.services-section .services-carousel .service-card::before,
.services-section .services-carousel .service-card::after {
    content: none !important;
    display: none !important;
    border: 0 !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}


.service-image {
    width: 90px;
    height: 90px;
    margin: 35px auto 0;
    background: transparent;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    position: static !important;
    inset: auto !important;
    filter: none !important;
    transform: none !important;
    background: transparent !important;
}

.services-section .service-image,
.services-section .service-image svg,
.services-section .service-image img {
    background: transparent !important;
}

.services-section .service-image::before,
.services-section .service-image::after {
    content: none !important;
    display: none !important;
    background: transparent !important;
}

.service-title {
    font-size: 22px;
    font-weight: 500;
    color: #05334F;
    margin: 0;
    padding: 20px 24px 8px;
    min-height: auto;
    display: block;
    width: 100%;
    font-family: Georgia, serif;
    border-bottom: 0;
    text-align: center;
}

.service-subtitle {
    margin: 0;
    padding: 4px 24px 10px;
    color: #0369A1;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    font-family: Raleway, sans-serif;
    border-bottom: 1px solid #E2E8F0;
    text-align: center;
}

.service-description {
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
    margin: 0;
    padding: 12px 24px 20px;
    width: 100%;
    display: block;
    min-height: 0;
    overflow-wrap: anywhere;
}

.service-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    margin: 0 24px 24px;
    background: #0369A1;
    color: #ffffff;
    border: 1px solid #0369A1;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow: none;
    flex-shrink: 0;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
    justify-self: center;
}

.service-detail-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%);
    transition: left 0.5s ease;
}

.service-detail-btn:hover {
    background: #055f8f;
    color: #ffffff;
    transform: none;
    border-color: #055f8f;
}

.service-detail-btn:hover::before {
    left: 100%;
}

.service-detail-btn:active {
    transform: none;
    box-shadow: none;
}

.service-detail-btn svg {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-detail-btn:hover svg {
    transform: translateX(4px) scale(1.1);
    animation: arrowBounce 0.6s ease infinite;
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateX(4px) scale(1.1);
    }
    50% {
        transform: translateX(8px) scale(1.1);
    }
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 8px 0;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 0;
    background: #CBD5E1;
    border: none;
    cursor: pointer;
    transition: all 0.35s ease;
    padding: 0;
    position: relative;
}

.carousel-dot:hover {
    background: #94A3B8;
    transform: scale(1.15);
}

.carousel-dot.active {
    background: #0369A1;
    width: 24px;
    height: 8px;
    border-radius: 0;
}

@media (max-width: 1200px) {
    .services-track { gap: 26px; }
    .service-card {
        flex: 0 0 calc((100% - 52px) / 3);
        width: calc((100% - 52px) / 3);
        min-width: calc((100% - 52px) / 3);
        max-width: calc((100% - 52px) / 3);
    }
}

@media (max-width: 1024px) {
    .services-container { padding: 0 60px; }
    .services-track { gap: 24px; }
    .service-card {
        flex: 0 0 calc((100% - 48px) / 3);
        width: calc((100% - 48px) / 3);
        min-width: calc((100% - 48px) / 3);
        max-width: calc((100% - 48px) / 3);
    }
}

@media (max-width: 768px) {
    .services-container { padding: 0 40px; }
    .services-track { gap: 22px; }
    .service-card {
        flex: 0 0 calc((100% - 22px) / 2);
        width: calc((100% - 22px) / 2);
        min-width: calc((100% - 22px) / 2);
        max-width: calc((100% - 22px) / 2);
        min-height: 460px;
        height: auto !important;
    }

    .service-image {
        width: 75px;
        height: 75px;
        margin: 24px auto 0;
    }

    .service-title {
        font-size: 18px;
        padding: 16px 18px 6px;
        border-bottom: 0;
    }

    .service-subtitle {
        font-size: 13px;
        padding: 4px 18px 8px;
    }

    .service-description {
        font-size: 14px;
        padding: 10px 18px 16px;
        line-height: 1.6;
    }

    .service-detail-btn {
        align-self: center;
        padding: 11px 24px;
        font-size: 14px;
        /*min-width: 150px;*/
        margin: 0 18px 18px;
    }
}

@media (max-width: 480px) {
    .services-container { padding: 0 20px; }
    .services-track { gap: 16px; }
    .service-card {
        flex: 0 0 100%;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        min-height: 440px;
        height: auto !important;
    }

    .service-image {
        width: 70px;
        height: 70px;
        margin: 20px auto 0;
    }

    .service-title {
        font-size: 18px;
        padding: 14px 16px 6px;
        border-bottom: 0;
    }

    .service-subtitle {
        padding: 4px 16px 8px;
    }

    .service-description {
        font-size: 14px;
        padding: 10px 16px 14px;
        line-height: 1.6;
    }

    .service-detail-btn {
        align-self: center;
        padding: 12px 24px;
        font-size: 14px;
        /*min-width: 160px;*/
        width: auto;
        margin: 0 16px 16px;
        max-width: calc(100% - 40px);
    }
}
