/* Advanced Services Page Styles - V2 Refined */

html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* prevent horizontal scroll from aurora blobs */
}

.services-page {
    position: relative;
    background-color: var(--clr-bg);
    padding-top: 7rem;
}


/* Internal Page Hero Style */
.internal-hero {
    text-align: left;
    margin-bottom: 3rem;
    max-width: 900px;
}

.hero-tag {
    font-family: var(--ff-code);
    font-size: 0.9rem;
    color: var(--clr-accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1.25rem;
    display: block;
}

.hero-title {
    font-size: clamp(2.8rem, 6.5vw, 5rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
    color: #fff;
}

.hero-lead {
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    color: var(--clr-text-muted);
    line-height: 1.6;
    max-width: 650px;
}

/* --- Fixed Timeline Journey --- */
.hero-journey {
    position: relative;
    z-index: 10;
    margin-bottom: 8rem;
}

.timeline-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    gap: 1rem;
    max-width: 1000px;
}

/* Connecting line */
.timeline-container::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(241, 141, 79, 0.2), transparent);
    z-index: -1;
}

.timeline-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.4s ease;
    cursor: pointer;
}

.t-icon-box {
    width: 48px;
    height: 48px;
    background: var(--clr-bg);
    border: 2px solid rgba(241, 141, 79, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-step:hover .t-icon-box {
    background: rgba(241, 141, 79, 0.08);
    border-color: var(--clr-accent);
    transform: scale(1.1);
    box-shadow: 0 0 0 1px var(--clr-accent), 0 0 20px rgba(241, 141, 79, 0.25);
}

/* Selected step — set via JS on click */
.timeline-step.is-active .t-icon-box {
    background: rgba(241, 141, 79, 0.12);
    border-color: var(--clr-accent);
    box-shadow: 0 0 0 1px var(--clr-accent), 0 0 28px rgba(241, 141, 79, 0.35);
    transform: scale(1.1);
}

.timeline-step.is-active .t-label {
    color: var(--clr-accent);
}

.t-icon-box img {
    width: 24px;
    height: 24px;
    transition: filter 0.3s ease;
}

/* Explicitly cancel the filter rule inherited from base.css */
.timeline-step:hover .t-icon-box img,
.timeline-step.is-active .t-icon-box img {
    filter: none;
}

.t-label {
    font-family: var(--ff-code);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
    font-weight: 700;
}

.t-desc {
    font-size: 0.8rem;
    color: var(--clr-text-muted);
    max-width: 140px;
    margin-top: 0.4rem;
}

/* Service Sections */
.service-section {
    scroll-margin-top: calc(var(--header-height) + 1.5rem);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 8rem;
    align-items: center;
    margin-bottom: 15rem;
    min-height: 60vh;
}

.service-section:nth-child(even) { direction: rtl; }
.service-section:nth-child(even) .service-content { direction: ltr; }

.service-tag {
    font-family: var(--ff-code);
    font-size: 0.75rem;
    color: var(--clr-accent);
    background: rgba(241, 141, 79, 0.1);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    display: inline-block;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.service-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.service-description {
    font-size: 1.1rem;
    color: var(--clr-text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.service-benefits {
    list-style: none;
    padding: 0;
}

.service-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    font-size: 1rem;
    color: #fff;
    line-height: 1.4;
}

.service-benefits li::before {
    content: '→';
    color: var(--clr-accent);
    font-family: var(--ff-code);
    font-weight: 700;
}

/* Visual Card Restored 3D Effects */
.service-visual {
    perspective: 1200px;
}

.visual-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 3rem;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.8s ease;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.02),
        0 10px 20px rgba(0, 0, 0, 0.04),
        0 20px 40px rgba(0, 0, 0, 0.06);
}

.visual-card:hover {
    transform: rotateX(4deg) rotateY(-4deg) translateZ(20px);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.12),
        0 0 40px rgba(241, 141, 79, 0.05);
}

.visual-icon {
    width: 64px !important;
    height: 64px !important;
    margin-bottom: 2.5rem;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2));
    transform: translateZ(40px); /* Lift element in 3D space */
}

.sc-impact-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    transform: translateZ(30px); /* Lift element in 3D space */
}

.sc-impact-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--clr-accent);
}

.sc-impact-label {
    display: block;
    font-family: var(--ff-code);
    font-size: 0.7rem;
    color: var(--clr-accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.sc-impact-text {
    font-size: 1.1rem;
    color: #fff;
    font-weight: 600;
    line-height: 1.4;
}

/* CTA Box */
.services-cta-box {
    margin-top: 8rem;
    text-align: center;
    padding: 7rem 2rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

/* ─── Next Section Link ─── */
.service-next-link {
    grid-column: 1 / -1;
    direction: ltr; /* reset rtl flip on even sections */
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--ff-code);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--clr-text-muted);
    text-decoration: none;
    margin-top: -8rem; /* pull up into the section's bottom gap */
    transition: color 0.25s ease, gap 0.25s ease;
}

.service-next-link:hover {
    color: var(--clr-accent);
    gap: 0.75rem;
}

/* ─── Sticky Sidebar Navigator ─── */
.services-sticky-nav {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.services-sticky-nav.is-visible {
    opacity: 1;
    pointer-events: all;
}

/* Vertical connecting line behind dots */
.services-sticky-nav::before {
    content: '';
    position: absolute;
    right: 13px; /* center on the 28px dot */
    top: 34px;
    bottom: 66px; /* stop above back-to-top button */
    width: 1px;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.ssn-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    padding: 5px 0;
}

.ssn-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ssn-dot img {
    width: 13px;
    height: 13px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.ssn-label {
    font-family: var(--ff-code);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(6px);
    transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

.ssn-item:hover .ssn-label {
    opacity: 1;
    transform: translateX(0);
    color: rgba(255, 255, 255, 0.6);
}

.ssn-item:hover .ssn-dot {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
}

.ssn-item:hover .ssn-dot img {
    opacity: 0.8;
}

.ssn-item.is-active .ssn-dot {
    background: rgba(241, 141, 79, 0.12);
    border-color: var(--clr-accent);
    box-shadow: 0 0 10px rgba(241, 141, 79, 0.4);
}

.ssn-item.is-active .ssn-dot img {
    opacity: 1;
    filter: none;
}

.ssn-item.is-active .ssn-label {
    opacity: 1;
    transform: translateX(0);
    color: var(--clr-accent);
}

.ssn-top-btn {
    margin-top: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    line-height: 1;
}

.ssn-top-btn:hover {
    border-color: var(--clr-accent);
    color: var(--clr-accent);
    background: rgba(241, 141, 79, 0.08);
}

@media (max-width: 1200px) {
    .services-sticky-nav { display: none; }
}

/* ─── Mobile bottom pill nav ─── */
@media (max-width: 768px) {
    .services-sticky-nav {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.25rem;
        position: fixed;
        right: auto;
        top: auto;
        left: 50%;
        bottom: 1.25rem;
        transform: translateX(-50%);
        background: rgba(18, 18, 18, 0.88);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 100px;
        padding: 0.4rem 0.75rem;
        gap: 0.25rem;
    }

    /* Hide vertical line on mobile */
    .services-sticky-nav::before { display: none; }

    /* Hide labels on mobile — dots only */
    .ssn-label { display: none; }

    .ssn-item { padding: 4px 6px; }

    .ssn-dot {
        width: 34px;
        height: 34px;
    }

    .ssn-dot img {
        width: 15px;
        height: 15px;
    }

    .ssn-top-btn {
        margin-top: 0;
        margin-left: 0.25rem;
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 992px) {
    .service-section { grid-template-columns: 1fr; gap: 4rem; margin-bottom: 8rem; }
    .service-section:nth-child(even) { direction: ltr; }
    .service-next-link { margin-top: -4rem; }
}

@media (max-width: 768px) {
    /* Extra bottom padding so floating pill doesn't cover content */
    .services-page { padding-bottom: 5rem; }
}
