/* Our Services — full width, 3 equal cards */

.services-showcase {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: clamp(20px, 4vw, 30px) clamp(16px, 3vw, 30px);
    background: #f8f9fc;
    overflow: hidden;
    box-sizing: border-box;
}

.services-showcase__head {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 580px;
    margin: 0 auto clamp(24px, 4vw, 24px);
    padding: 0;
}

.services-showcase__head > * {
    opacity: 1;
    visibility: visible;
}

.services-showcase__title {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 800;
    color: #30438f;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin-bottom: 18px;
}

.services-showcase__title span {
    color: var(--color-accent-light);
}

.services-showcase__desc {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: #6b7280;
}

/* Swiper — mobile slider / desktop 3-up */
.services-showcase__slider {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.services-showcase__slider .swiper-slide {
    height: auto;
    display: flex;
    overflow: hidden;
    border-radius: var(--service-card-radius, 38px);
}

.services-showcase__slider .service-card {
    flex: 1;
}

/* Card — image only by default; title reveals on hover */
.service-card {
    --service-card-radius: 38px;
    position: relative;
    display: block;
    width: 100%;
    min-height: clamp(440px, 50vw, 540px);
    height: 100%;
    border-radius: var(--service-card-radius);
    overflow: hidden;
    isolation: isolate;
    contain: paint;
    text-decoration: none;
    background: var(--color-primary-dark);
    -webkit-user-drag: none;
    user-select: none;
    box-shadow: none;
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: var(--service-card-radius);
    transform: scale(1);
    filter: brightness(0.88) saturate(1.05);
    transition:
        transform 0.75s var(--ease-premium),
        filter 0.65s var(--ease-premium);
}

/* Default — bottom vignette */
.service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: var(--service-card-radius);
    background: linear-gradient(
        180deg,
        rgba(15, 22, 48, 0.12) 0%,
        rgba(15, 22, 48, 0.28) 42%,
        rgba(15, 22, 48, 0.72) 78%,
        rgba(15, 22, 48, 0.9) 100%
    );
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.65s var(--ease-premium);
}

/* Full-card overlay on hover / touch */
.service-card__shine {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: var(--service-card-radius);
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(15, 22, 48, 0.35) 0%,
        rgba(15, 22, 48, 0.55) 38%,
        rgba(15, 22, 48, 0.82) 72%,
        rgba(15, 22, 48, 0.94) 100%
    );
    opacity: 0;
    transition: opacity 0.65s var(--ease-premium);
}

/* Service title — hidden on desktop until hover */
.service-card__pill {
    position: absolute;
    bottom: clamp(28px, 5vw, 40px);
    left: 50%;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: min(92%, 320px);
    max-width: calc(100% - 32px);
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    pointer-events: none;
    transform: translateX(-50%) translateY(32px) scale(0.88);
    opacity: 0;
    transition:
        transform 0.7s var(--ease-premium),
        opacity 0.55s var(--ease-premium);
}

.service-card__pill-text {
    display: block;
    width: 100%;
    padding: 20px 40px;
    font-size: clamp(1rem, 1.35vw, 1.125rem);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
    color: #ffffff;
    white-space: nowrap;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.22) 0%,
        rgba(255, 255, 255, 0.08) 100%
    );
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 100px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        0 0 40px rgba(232, 81, 38, 0),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
    text-shadow: 0 0 0 transparent;
    transition:
        box-shadow 0.7s var(--ease-premium),
        text-shadow 0.7s var(--ease-premium),
        background 0.65s var(--ease-premium),
        border-color 0.65s var(--ease-premium),
        transform 0.7s var(--ease-premium);
    transform: scale(0.95);
}

/* Hover & focus */
@media (hover: hover) {
    .service-card:hover {
        transform: none;
        box-shadow: none;
    }

    .service-card:hover .service-card__img {
        transform: scale(1.08);
        filter: brightness(0.82) saturate(1.08);
    }

    .service-card:hover::after {
        opacity: 0.35;
    }

    .service-card:hover .service-card__shine {
        opacity: 1;
    }

    .service-card:hover .service-card__pill {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }

    .service-card:hover .service-card__pill-text {
        transform: scale(1);
        background: linear-gradient(
            135deg,
            rgba(232, 81, 38, 0.35) 0%,
            rgba(255, 255, 255, 0.18) 100%
        );
        border-color: rgba(255, 255, 255, 0.5);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
        text-shadow:
            0 0 24px rgba(255, 200, 160, 0.9),
            0 0 48px rgba(232, 81, 38, 0.55),
            0 2px 8px rgba(0, 0, 0, 0.35);
    }
}

.service-card:focus-visible {
    outline: 2px solid #e85126;
    outline-offset: 4px;
}

@media (hover: hover) {
    .service-card:focus-visible {
        transform: none;
    }

    .service-card:focus-visible .service-card__img {
        transform: scale(1.1);
        filter: brightness(1) saturate(1.12);
    }

    .service-card:focus-visible .service-card__shine {
        opacity: 1;
    }

    .service-card:focus-visible .service-card__pill {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }

    .service-card:focus-visible .service-card__pill-text {
        transform: scale(1);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
        text-shadow:
            0 0 24px rgba(255, 200, 160, 0.9),
            0 0 48px rgba(232, 81, 38, 0.55);
    }
}

/* Touch / mobile — strong overlay, title readable */
@media (hover: none) {
    .service-card__img {
        filter: brightness(0.78) saturate(1.02);
    }

    .service-card::after {
        background: linear-gradient(
            180deg,
            rgba(15, 22, 48, 0.22) 0%,
            rgba(15, 22, 48, 0.48) 35%,
            rgba(15, 22, 48, 0.82) 68%,
            rgba(15, 22, 48, 0.95) 100%
        );
    }

    .service-card__shine {
        opacity: 1;
        background: linear-gradient(
            180deg,
            rgba(15, 22, 48, 0.18) 0%,
            rgba(15, 22, 48, 0.52) 40%,
            rgba(15, 22, 48, 0.88) 75%,
            rgba(15, 22, 48, 0.96) 100%
        );
    }

    .service-card__pill {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }

    .service-card__pill-text {
        transform: scale(1);
        background: linear-gradient(
            135deg,
            rgba(232, 81, 38, 0.45) 0%,
            rgba(15, 22, 48, 0.55) 100%
        );
        border-color: rgba(255, 255, 255, 0.45);
        box-shadow:
            0 8px 28px rgba(0, 0, 0, 0.35),
            0 0 24px rgba(232, 81, 38, 0.3);
    }
}

.services-showcase__footer {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-top: clamp(24px, 4vw, 48px);
}

/* Pagination — mobile/tablet only */
.services-showcase__pagination {
    position: relative;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.services-showcase__pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    margin: 0 !important;
    background: rgba(48, 67, 143, 0.25);
    opacity: 1;
    transition: width 0.4s ease, background 0.4s ease;
}

.services-showcase__pagination .swiper-pagination-bullet-active {
    width: 28px;
    border-radius: 100px;
    background: var(--color-accent, #e85126);
}

@media (min-width: 992px) {
    .services-showcase__pagination {
        display: none;
    }
}

/* Tablet */
@media (max-width: 991.98px) {
    .services-showcase {
        padding: 20px 16px;
    }

    .services-showcase__head {
        margin-bottom: 20px;
    }

    .services-showcase__title {
        font-size: clamp(1.85rem, 7vw, 2.5rem);
        margin-bottom: 12px;
    }

    .services-showcase__desc {
        font-size: 0.9rem;
        line-height: 1.65;
    }

    .service-card {
        --service-card-radius: 28px;
        min-height: clamp(340px, 52vh, 420px);
        border-radius: var(--service-card-radius);
    }

    .service-card__pill-text {
        padding: 16px 28px;
        font-size: 0.875rem;
    }

    .services-showcase__footer {
        margin-top: 20px;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .services-showcase {
        padding: 18px 14px;
    }

    .service-card {
        --service-card-radius: 24px;
        min-height: clamp(320px, 48vh, 400px);
        border-radius: var(--service-card-radius);
    }

    .service-card__pill-text {
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    .service-card,
    .service-card__img,
    .service-card__pill,
    .service-card__pill-text,
    .service-card__shine,
    .service-card::after {
        transition-duration: 0.01ms;
    }

    @media (hover: hover) {
        .service-card:hover {
            transform: none;
        }

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

    @media (hover: none) {
        .service-card__pill {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }
    }
}
