/* ============================================
   AI Voice Agent Services Section
   Zencia.AI Theme - Updated to match brand colors
   ============================================ */

.ai-services-section {
    padding: 120px 0 200px;
    background: #082928;
    position: relative;
    overflow: visible;
    
    /* Background image layer */
    background-image: url('../images/ai-services-background.svg'); /* Add your image path here */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Optional: creates parallax effect */
}

/* Dark overlay to ensure text readability */
.ai-services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1); /* Dark overlay - adjust opacity as needed */
    z-index: 1;
    pointer-events: none;
}

/* Optional: Gradient overlay for better blending */
.ai-services-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.8) 0%, 
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
    pointer-events: none;
}

.ai-services-section .container {
    position: relative;
    z-index: 2;
}

/* ===== GRID LAYOUT ===== */
.ai-services-grid {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 100px;
    align-items: flex-start;
}

/* ===== LEFT SIDE (STICKY) ===== */
.ai-services-left {
    position: sticky;
    top: 140px;
    align-self: start;
}

.ai-services-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 2rem;
    letter-spacing: -1.5px;
}

.ai-services-description {
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    max-width: 500px;
}

/* Updated button to match the primary teal brand colors */
.btn-explore-work {
    display: inline-block;
    padding: 18px 48px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: var(--font-primary);
    box-shadow: 0 10px 30px rgba(0, 217, 213, 0.3);
    border: none;
    cursor: pointer;
}

.btn-explore-work:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 217, 213, 0.4);
    background: linear-gradient(135deg, #00b8b5 0%, #006b6b 100%);
}

/* ===== RIGHT SIDE (STACKING CARDS) ===== */
.ai-services-right {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Service Card - Solid background to prevent transparency stacking issues */
.service-card {
    position: sticky;
    background: #1a1a1a; /* Solid dark background instead of transparent */
    backdrop-filter: blur(10px);
    border-radius: 32px;
    padding: 50px 45px;
    border: 2px solid rgba(0, 217, 213, 0.4);
    min-height: 220px;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, box-shadow;
    /* No shadow/glow effects */
}

/* CRITICAL: Different sticky top positions create the stacking */
/* Lower cards have HIGHER z-index so they appear ON TOP */
.service-card:nth-child(1) {
    top: 120px;
    z-index: 10;
}

.service-card:nth-child(2) {
    top: 150px;
    z-index: 20;
}

.service-card:nth-child(3) {
    top: 180px;
    z-index: 30;
}

.service-card:nth-child(4) {
    top: 210px;
    z-index: 40;
}

.service-card:nth-child(5) {
    top: 240px;
    z-index: 50;
}

.service-card:hover {
    /* No shadow/glow effects on hover */
    transform: translateY(-2px);
    border-color: rgba(0, 217, 213, 0.6);
    background: #222222; /* Slightly lighter solid background on hover */
}

/* Card title and description - Updated for dark theme */
.service-card-title {
    font-size: clamp(1.5rem, 2.5vw, 1.9rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.25rem;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.service-card-description {
    font-size: 1.05rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Active state - when card is in focus - solid background */
.service-card.in-view {
    border-color: var(--primary-teal);
    border-width: 2px;
    /* No shadow/glow effects in active state */
    background: #1f2626; /* Solid dark background with slight teal tint */
}

/* Optional: Gradient overlay removed for flat design */
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent; /* No gradient overlay */
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: 32px;
}

.service-card:hover::before {
    opacity: 0; /* No gradient effect on hover */
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .ai-services-grid {
        grid-template-columns: 42% 58%;
        gap: 80px;
    }

    .service-card {
        padding: 45px 40px;
    }
}

@media (max-width: 1024px) {
    .ai-services-section {
        padding: 100px 0 150px;
    }

    .ai-services-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .ai-services-left {
        position: relative;
        top: 0;
        text-align: center;
        max-width: 700px;
        margin: 0 auto;
    }

    .ai-services-description {
        max-width: 100%;
    }

    /* Keep sticky stacking on tablets */
    .service-card {
        padding: 40px 35px;
    }

    .ai-services-right {
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .ai-services-section {
        padding: 80px 0 120px;
    }

    .ai-services-grid {
        gap: 50px;
    }

    .ai-services-title {
        margin-bottom: 1.5rem;
    }

    .ai-services-description {
        margin-bottom: 2.5rem;
    }

    .btn-explore-work {
        padding: 16px 40px;
        font-size: 1rem;
        width: 100%;
        max-width: 320px;
    }

    /* Keep sticky stacking on tablets */
    .service-card {
        padding: 35px 30px;
        border-radius: 28px;
        border-width: 2px;
    }

    /* Adjust sticky positions for smaller screens */
    .service-card:nth-child(1) {
        top: 100px;
    }

    .service-card:nth-child(2) {
        top: 125px;
    }

    .service-card:nth-child(3) {
        top: 150px;
    }

    .service-card:nth-child(4) {
        top: 175px;
    }

    .service-card:nth-child(5) {
        top: 200px;
    }

    .service-card-title {
        margin-bottom: 1rem;
    }

    .service-card-description {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .ai-services-section {
        padding: 60px 0 100px;
    }

    /* Enable sticky on mobile with tighter spacing */
    .service-card {
        padding: 30px 24px;
        border-radius: 24px;
    }

    /* Tighter sticky positions for mobile */
    .service-card:nth-child(1) {
        top: 80px;
    }

    .service-card:nth-child(2) {
        top: 100px;
    }

    .service-card:nth-child(3) {
        top: 120px;
    }

    .service-card:nth-child(4) {
        top: 140px;
    }

    .service-card:nth-child(5) {
        top: 160px;
    }

    .btn-explore-work {
        width: 100%;
        max-width: none;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .service-card {
        transition: none;
    }
}

/* Focus states */
.btn-explore-work:focus,
.service-card:focus {
    outline: 3px solid var(--primary-teal);
    outline-offset: 4px;
}

/* ===== SCROLL ANIMATIONS ===== */
.ai-services-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-services-right {
    opacity: 0;
    transform: translateX(60px) scale(0.9);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-services-left.animate-in {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.2s;
}

.ai-services-right.animate-in {
    opacity: 1;
    transform: translateX(0) scale(1);
    transition-delay: 0.4s;
}

