/* =========================================================
   OUR SERVICES PAGE
   Page-specific styles are scoped to .services-page.
   ========================================================= */

.services-page {
    scroll-padding-top: 88px;
}

.services-page body {
    background: #f8fafc;
}

.services-page .nav-link.active {
    color: #4a94ff;
}

.services-page .nav-dropdown-arrow {
    position: absolute;
    top: 50%;
    right: -17px;
    display: grid;
    width: 24px;
    height: 32px;
    place-items: center;
    color: var(--text-light);
    cursor: pointer;
    transform: translateY(-50%);
    transition: color var(--transition-fast);
}

.services-page .nav-dropdown-arrow:hover {
    color: var(--cyan);
}

.services-page .nav-dropdown-arrow svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
    transition: transform var(--transition-fast);
}

.services-page .services-nav-item.arrow-open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(5px);
}

.services-page .services-nav-item.arrow-open .nav-dropdown-arrow svg {
    transform: rotate(180deg);
}

.services-eyebrow {
    display: inline-block;
    margin-bottom: 13px;
    color: #2584f7;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.7px;
    text-transform: uppercase;
}

/* =========================================================
   HERO
   ========================================================= */
.services-hero {
    position: relative;
    min-height: 700px;
    padding: 140px 0 100px;
    overflow: hidden;
    background: #020713;
}

.services-hero::after,
.technology-stack::after {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 75% 45%, rgba(10, 98, 255, 0.13), transparent 38%);
    content: '';
    pointer-events: none;
}

.services-particles {
    position: absolute;
    inset: 0;
    opacity: .36;
    background-image:
        radial-gradient(circle at 8% 22%, #1684ff 0 1px, transparent 2px),
        radial-gradient(circle at 25% 69%, #06b6d4 0 1px, transparent 2px),
        radial-gradient(circle at 52% 18%, #1684ff 0 1px, transparent 2px),
        radial-gradient(circle at 84% 77%, #60a5fa 0 1px, transparent 2px);
    background-size: 180px 160px, 240px 210px, 270px 230px, 200px 190px;
    animation: servicesParticles 18s linear infinite;
}

.services-hero-glow {
    top: 25%;
    left: 42%;
    width: 460px;
    height: 360px;
}

.services-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 51% 49%;
    align-items: center;
    min-height: 530px;
}

.services-hero-content {
    position: relative;
    top: -14px;
    z-index: 2;
    max-width: 700px;
}

.services-hero-content h1 {
    max-width: 680px;
    margin-bottom: 24px;
    font-size: clamp(42px, 3.6vw, 58px);
    line-height: 1.12;
    letter-spacing: -1.9px;
}

.services-hero-content h1 span,
.technology-stack-content h2 span,
.services-section-heading h2 span {
    color: #1684ff;
}

.services-hero-content > p {
    max-width: 620px;
    margin-bottom: 48px;
    color: #e5eaf3;
    font-size: 16px;
    line-height: 1.75;
}

.hero-feature-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.hero-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.hero-feature div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.hero-feature strong {
    margin-bottom: 5px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.hero-feature small {
    color: #9aa8bc;
    font-size: 10px;
    line-height: 1.55;
}

.services-icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(22, 132, 255, .18);
    border-radius: 9px;
    background: linear-gradient(145deg, rgba(22, 132, 255, .08), rgba(22, 132, 255, .02));
    color: #2584f7;
    box-shadow: 0 8px 26px rgba(22, 132, 255, .08);
}

.services-icon-small {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
}

.services-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.services-hero-visual {
    position: absolute;
    top: 50%;
    right: calc((100vw - 100%) / -2);
    width: 58%;
    transform: translateY(-47%);
}

.services-page.js .services-hero-visual.reveal-fade-left {
    opacity: 0;
    transform: translate(40px, -47%);
}

.services-page.js .services-hero-visual.reveal-active {
    opacity: 1;
    transform: translate(0, -47%) !important;
}

.services-hero-visual img {
    width: 100%;
    filter: drop-shadow(0 20px 50px rgba(0, 91, 255, .18));
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 93%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 93%, transparent 100%);
    animation: servicesFloat 7s ease-in-out infinite;
}

/* =========================================================
   SERVICE SUITE
   ========================================================= */
.services-suite,
.why-choose {
    position: relative;
    background: #fbfcff;
    color: #334155;
}

.services-section-heading {
    max-width: 820px;
    margin: 0 auto 42px;
    text-align: center;
}

.services-section-heading h2 {
    margin-bottom: 13px;
    color: #0a1324;
    font-size: clamp(30px, 2.6vw, 40px);
    letter-spacing: -1px;
}

.services-section-heading > p {
    color: #475569;
    font-size: 13px;
    line-height: 1.7;
}

.services-suite-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.services-suite-card {
    position: relative;
    display: flex;
    min-height: 425px;
    flex-direction: column;
    padding: 28px 30px 26px;
    overflow: hidden;
    border: 1px solid #edf0f5;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(15, 23, 42, .055);
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.services-suite-card::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #0878f9, #06b6d4);
    content: '';
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}

.services-suite-card:hover {
    border-color: rgba(8, 120, 249, .2);
    box-shadow: 0 20px 45px rgba(15, 23, 42, .1);
    transform: translateY(-7px);
}

.services-suite-card:hover::after {
    transform: scaleX(1);
}

.services-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}

.services-card-icon {
    display: flex;
    width: 74px;
    height: 74px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f3f7ff;
}

.services-card-icon img {
    width: 62px;
    height: 62px;
    object-fit: contain;
}

.services-card-number {
    padding: 7px 13px;
    border-radius: 7px;
    background: linear-gradient(135deg, #2584f7, #77aaff);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(37, 132, 247, .2);
}

.services-suite-card h3 {
    margin-bottom: 9px;
    color: #0b1323;
    font-size: 24px;
    letter-spacing: -.5px;
}

.services-suite-card > p {
    margin-bottom: 14px;
    color: #475569;
    font-size: 13px;
    line-height: 1.65;
}

.services-check-list {
    display: grid;
    gap: 7px;
    margin-bottom: 18px;
}

.services-check-list li {
    position: relative;
    padding-left: 24px;
    color: #425066;
    font-size: 13px;
}

.services-check-list li::before {
    position: absolute;
    top: 2px;
    left: 0;
    display: grid;
    width: 15px;
    height: 15px;
    place-items: center;
    border: 1px solid #72adef;
    border-radius: 50%;
    color: #1684ff;
    content: '\2713';
    font-size: 9px;
    font-weight: 800;
}

.services-learn-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    color: #0878f9;
    font-size: 13px;
    font-weight: 600;
}

.services-learn-link:hover span {
    transform: translateX(4px);
}

.services-learn-link span {
    transition: transform .2s ease;
}

/* =========================================================
   TECHNOLOGY STACK
   ========================================================= */
.technology-stack {
    position: relative;
    padding: var(--section-space) 0;
    overflow: hidden;
    background: #020713;
}

.technology-stack-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 50% 50%;
    align-items: center;
}

.technology-stack-content {
    position: relative;
    z-index: 2;
    max-width: 670px;
    padding: 0;
}

.technology-stack-content h2 {
    margin-bottom: 18px;
    font-size: clamp(31px, 2.6vw, 40px);
    line-height: 1.2;
    letter-spacing: -1px;
}

.technology-stack-content > p {
    max-width: 610px;
    margin-bottom: 26px;
    color: #d7dfeb;
    font-size: 13px;
    line-height: 1.7;
}

.technology-list {
    display: flex;
    gap: 14px;
    margin-bottom: 28px;
}

.technology-list li {
    display: flex;
    min-width: 58px;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.technology-list b {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: 8px;
    background: rgba(255, 255, 255, .025);
    color: #27a4ff;
    font-family: var(--font-heading);
    font-size: 14px;
    box-shadow: 0 9px 22px rgba(0, 0, 0, .24);
}

.technology-list b img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.technology-list li:nth-child(6) b img {
    width: 42px;
    filter: brightness(0) invert(1);
}

.technology-list span {
    color: #e7edf6;
    font-size: 11px;
    font-weight: 500;
}

.technology-stack-content .btn-primary {
    padding: 13px 25px;
    font-size: 13px;
}

.technology-stack-visual {
    position: absolute;
    top: 50%;
    right: calc((100vw - 100%) / -2);
    width: 62%;
    transform: translateY(-50%);
}

.services-page.js .technology-stack-visual.reveal-fade-left {
    opacity: 0;
    transform: translate(40px, -50%);
}

.services-page.js .technology-stack-visual.reveal-active {
    opacity: 1;
    transform: translate(0, -50%) !important;
}

.technology-stack-visual img {
    width: 100%;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 92%, transparent 100%);
}

/* =========================================================
   WHY CHOOSE US
   ========================================================= */
.why-choose .services-section-heading {
    margin-bottom: 30px;
}

.services-page .why-choose {
    padding-bottom: 32px;
}

.why-choose-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.why-card {
    min-height: 245px;
    padding: 24px 22px;
    border: 1px solid #edf0f5;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.why-card:hover {
    border-color: rgba(8, 120, 249, .18);
    box-shadow: 0 17px 35px rgba(15, 23, 42, .09);
    transform: translateY(-6px);
}

.why-card .services-icon {
    margin-bottom: 18px;
}

.why-card h3 {
    margin-bottom: 20px;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.35;
}

.why-card p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.65;
}

/* =========================================================
   CTA + FOOTER BRIDGE
   ========================================================= */
.services-cta {
    background: #fbfcff;
}

.services-page .services-cta {
    padding-top: 24px;
}

.services-cta-wrapper {
    display: flex;
    min-height: 150px;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 28px 42px;
    overflow: hidden;
    border-radius: 18px;
    background:
        radial-gradient(circle at 5% 50%, rgba(0, 119, 255, .28), transparent 17%),
        linear-gradient(105deg, #03113a, #061b52 62%, #06133d);
    box-shadow: 0 18px 45px rgba(4, 22, 70, .2);
}

.services-cta-copy {
    display: flex;
    align-items: center;
    gap: 24px;
}

.services-cta-copy .cta-icon-badge {
    width: 72px;
    height: 72px;
    border-color: rgba(70, 145, 255, .28);
    background: rgba(8, 120, 249, .15);
}

.services-cta-copy h2 {
    margin-bottom: 5px;
    font-size: 24px;
}

.services-cta-copy p {
    color: #d9e3f2;
    font-size: 13px;
}

.services-cta-button {
    display: inline-flex;
    min-height: 54px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 14px 28px;
    border-radius: 12px;
    background: #fff;
    color: #0878f9;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .16);
}

.services-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
}

.services-footer-contact {
    margin-bottom: 2rem;
}

@keyframes servicesFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes servicesParticles {
    to { background-position: 180px 160px, -240px 210px, 270px -230px, -200px -190px; }
}

/* =========================================================
   RESPONSIVE PAGE LAYOUT
   ========================================================= */
@media screen and (max-width: 1280px) {
    .services-hero-content h1 { font-size: 46px; }
    .services-hero-visual { right: calc((100vw - 100%) / -2); width: 63%; }
    .technology-list { gap: 8px; }
    .technology-stack-visual { right: calc((100vw - 100%) / -2); width: 67%; }
    .why-card { padding: 22px 18px; }
}

@media screen and (max-width: 1024px) {
    .services-hero { min-height: 640px; }
    .services-hero-content h1 { font-size: 42px; }
    .services-hero-content > p { max-width: 530px; }
    .hero-feature-list { gap: 15px; }
    .technology-list { display: grid; grid-template-columns: repeat(4, 54px); }
    .why-choose-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media screen and (max-width: 991px) {
    .services-page .nav-dropdown-arrow {
        top: 25px;
        right: 0;
    }

    .services-page .services-nav-item.arrow-open .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .services-hero {
        min-height: 0;
        padding: 95px 0 35px;
    }

    .services-hero-grid,
    .technology-stack-grid {
        grid-template-columns: 1fr;
    }

    .services-hero-grid { gap: 24px; }

    .services-hero-content {
        top: 0;
        max-width: 720px;
        text-align: center;
    }

    .services-hero-content h1,
    .services-hero-content > p { margin-right: auto; margin-left: auto; }
    .services-hero-content h1 { font-size: clamp(38px, 6vw, 50px); }

    .services-hero-visual,
    .technology-stack-visual {
        position: relative;
        top: auto;
        right: auto;
        order: -1;
        width: min(100%, 700px);
        margin: 0 auto;
        transform: none;
    }

    .services-page.js .services-hero-visual.reveal-fade-left,
    .services-page.js .technology-stack-visual.reveal-fade-left {
        transform: translateX(40px);
    }

    .services-page.js .services-hero-visual.reveal-active,
    .services-page.js .technology-stack-visual.reveal-active {
        transform: translate(0) !important;
    }

    .services-hero-visual { max-height: 390px; overflow: hidden; }
    .services-hero-visual img { transform: translateY(-10%); animation: none; }

    .technology-stack-grid { padding-top: 0; }
    .technology-stack-visual { max-height: 380px; overflow: hidden; }
    .technology-stack-visual img { transform: translateY(-8%); }
    .technology-stack-content { max-width: 720px; padding: 0; text-align: center; }
    .technology-stack-content > p { margin-right: auto; margin-left: auto; }
    .technology-list { justify-content: center; }
    .technology-stack-content .btn-primary { margin: 0 auto; }

    .services-suite-card { min-height: 410px; }
    .why-choose-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .why-card { min-height: 220px; }

    .services-cta-wrapper { flex-direction: column; text-align: center; }
    .services-cta-copy { flex-direction: column; }
}

@media screen and (max-width: 768px) {
    .hero-feature-list { grid-template-columns: 1fr; max-width: 390px; margin: 0 auto; text-align: left; }
    .hero-feature small { font-size: 11px; }
    .services-suite-grid { grid-template-columns: 1fr; }
    .services-suite-card { min-height: 0; }
}

@media screen and (max-width: 576px) {
    .services-hero { padding: 90px 0 28px; }
    .services-hero-grid { min-height: 0; }
    .services-hero-visual { height: 245px; }
    .services-hero-visual img { width: 125%; max-width: none; margin-left: -13%; transform: translateY(-5%); }
    .services-hero-content h1 { font-size: clamp(31px, 9vw, 40px); letter-spacing: -1px; }
    .services-hero-content > p { margin-bottom: 24px; font-size: 14px; }

    .services-section-heading { margin-bottom: 18px; }
    .services-section-heading h2 { font-size: 28px; }
    .services-suite-card { padding: 24px 20px; }
    .services-suite-card h3 { font-size: 21px; }
    .services-card-icon { width: 64px; height: 64px; }
    .services-card-icon img { width: 54px; height: 54px; }

    .technology-stack-grid { padding-top: 0; }
    .technology-stack-visual { height: 245px; }
    .technology-stack-visual img { width: 125%; max-width: none; margin-left: -13%; transform: translateY(-2%); }
    .technology-stack-content h2 { font-size: 29px; }
    .technology-list { grid-template-columns: repeat(4, minmax(48px, 1fr)); width: 100%; gap: 12px 4px; }
    .technology-list li { min-width: 0; }

    .why-choose-grid { grid-template-columns: 1fr; }
    .why-card { min-height: 0; }
    .why-card h3 { margin-bottom: 10px; }

    .services-cta-wrapper { padding: 30px 20px; }
    .services-cta-copy h2 { font-size: 22px; }
    .services-cta-button { width: 100%; padding: 14px 16px; font-size: 13px; }
}

@media screen and (max-width: 375px) {
    .services-hero-content h1 { font-size: 30px; }
    .services-card-number { padding: 6px 10px; }
    .technology-list b { width: 48px; height: 48px; }
    .technology-list b img { width: 30px; height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    .services-particles,
    .services-hero-visual img { animation: none; }
}
