/* ========================================
   Services Page Styles
   Premium Industrial Design with Animations
   ======================================== */

/* Page Header */
.services-page-header {
    position: relative;
    background-color: var(--color-woodsmoke);
    padding-top: calc(var(--navbar-height) + var(--space-80));
    padding-bottom: var(--space-80);
    overflow: hidden;
}

.services-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
}

.services-page-header .container {
    position: relative;
    z-index: 2;
}

/* Service Section - Full Width Alternating */
.service-detail-section {
    position: relative;
    padding: var(--space-120) 0;
    overflow: hidden;
}

.service-detail-section:nth-child(odd) {
    background-color: var(--color-alto);
}

.service-detail-section:nth-child(even) {
    background-color: var(--color-woodsmoke);
    color: white;
}

/* Service Content Layout */
.service-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-80);
    align-items: center;
}

.service-detail-section:nth-child(even) .service-content-grid {
    direction: rtl;
}

.service-detail-section:nth-child(even) .service-content-grid>* {
    direction: ltr;
}

/* Text Content */
.service-text-content {
    padding: var(--space-32);
}

.service-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-12);
    margin-bottom: var(--space-24);
    color: var(--color-crimson);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.service-label::before {
    content: '';
    width: 40px;
    height: 3px;
    background: var(--color-crimson);
}

.service-label-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--color-crimson);
    color: white;
    font-size: var(--text-sm);
    font-weight: var(--font-weight-bold);
    border-radius: 50%;
}

.service-heading {
    font-family: var(--font-display);
    font-size: var(--text-5xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-24);
    letter-spacing: -1px;
}

.service-detail-section:nth-child(odd) .service-heading {
    color: var(--color-tuatara);
}

.service-detail-section:nth-child(even) .service-heading {
    color: white;
}

.service-text-content p {
    font-size: var(--text-lg);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-24);
    opacity: 0.85;
}

.service-detail-section:nth-child(odd) .service-text-content p {
    color: #555;
}

.service-detail-section:nth-child(even) .service-text-content p {
    color: var(--color-alto);
}

/* Feature List */
.service-features {
    list-style: none;
    margin-top: var(--space-32);
    padding: 0;
}

.service-feature-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-16);
    padding: var(--space-16) 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.service-detail-section:nth-child(even) .service-feature-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.feature-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: var(--color-crimson);
    border-radius: 50%;
    margin-top: 2px;
}

.feature-check svg {
    width: 14px;
    height: 14px;
    stroke: white;
    stroke-width: 3;
}

.feature-text {
    font-size: var(--text-base);
    font-weight: var(--font-weight-medium);
}

/* Image Container */
.service-image-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.2);
}

.service-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid var(--color-crimson);
    border-radius: 8px;
    z-index: 2;
    pointer-events: none;
    transform: translate(-12px, -12px);
    opacity: 0.6;
}

.service-image-container img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-image-container:hover img {
    transform: scale(1.05);
}

/* Image Overlay Badge */
.service-image-badge {
    position: absolute;
    bottom: var(--space-24);
    left: var(--space-24);
    background: var(--color-crimson);
    color: white;
    padding: var(--space-12) var(--space-24);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 3;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(237, 28, 36, 0.4);
}

/* Connector Between Sections */
.service-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-48) 0;
    background: linear-gradient(to bottom,
            var(--color-alto) 0%,
            var(--color-alto) 50%,
            var(--color-woodsmoke) 50%,
            var(--color-woodsmoke) 100%);
}

.service-connector.reverse {
    background: linear-gradient(to bottom,
            var(--color-woodsmoke) 0%,
            var(--color-woodsmoke) 50%,
            var(--color-alto) 50%,
            var(--color-alto) 100%);
}

.connector-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--color-crimson);
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(237, 28, 36, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

.connector-icon svg {
    width: 40px;
    height: 40px;
    fill: white;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 8px 32px rgba(237, 28, 36, 0.4);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 8px 48px rgba(237, 28, 36, 0.6);
        transform: scale(1.05);
    }
}

/* Applications Grid */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-24);
    margin-top: var(--space-48);
}

.application-card {
    background: white;
    padding: var(--space-24);
    border-radius: 4px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.service-detail-section:nth-child(even) .application-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.application-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

.application-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-16);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-crimson);
    border-radius: 12px;
}

.application-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.application-title {
    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-tuatara);
}

.service-detail-section:nth-child(even) .application-title {
    color: white;
}

/* Process Steps */
.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-24);
    margin-top: var(--space-48);
}

.process-step {
    position: relative;
    text-align: center;
    padding: var(--space-24);
}

.process-step::after {
    content: '';
    position: absolute;
    top: 35px;
    right: -12px;
    width: calc(100% - 70px);
    height: 2px;
    background: var(--color-crimson);
    opacity: 0.3;
}

.process-step:last-child::after {
    display: none;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--color-crimson);
    color: white;
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-bold);
    border-radius: 50%;
    margin-bottom: var(--space-16);
    position: relative;
    z-index: 2;
}

.step-title {
    font-size: var(--text-sm);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .service-content-grid {
        grid-template-columns: 1fr;
        gap: var(--space-48);
    }

    .service-detail-section:nth-child(even) .service-content-grid {
        direction: ltr;
    }

    .service-image-container img {
        height: 400px;
    }

    .applications-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-step::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .services-page-header {
        padding-top: calc(var(--navbar-height) + var(--space-48));
        padding-bottom: var(--space-48);
    }

    .service-detail-section {
        padding: var(--space-64) 0;
    }

    .service-heading {
        font-size: var(--text-4xl);
    }

    .service-text-content {
        padding: var(--space-16);
    }

    .service-image-container img {
        height: 300px;
    }

    .service-image-container::before {
        transform: translate(-8px, -8px);
    }

    .connector-icon {
        width: 60px;
        height: 60px;
    }

    .connector-icon svg {
        width: 28px;
        height: 28px;
    }

    .service-connector {
        padding: var(--space-32) 0;
    }
}

@media (max-width: 480px) {
    .service-detail-section {
        padding: var(--space-48) 0;
    }

    .service-heading {
        font-size: var(--text-3xl);
    }

    .service-text-content {
        padding: 0;
    }

    .service-image-container img {
        height: 250px;
    }

    .service-image-container::before {
        transform: translate(-6px, -6px);
        border-width: 2px;
    }

    .applications-grid {
        grid-template-columns: 1fr;
    }

    .process-steps {
        grid-template-columns: 1fr;
    }

    .service-image-badge {
        bottom: var(--space-16);
        left: var(--space-16);
        padding: var(--space-8) var(--space-16);
        font-size: var(--text-xs);
    }
}