/* AI Services Page Styles */

/* Scope everything within .ai-services-page to avoid conflicts */
.ai-services-page .ai-hero {
    height: 90vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    position: relative;
    background: #fff;
    padding-top: var(--header-height, 80px);
}

.ai-services-page .ai-hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.ai-services-page .ai-hero-visual {
    position: relative;
    height: 600px;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.ai-services-page .ai-hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 2s ease;
}

.ai-services-page .ai-hero:hover .ai-hero-visual img {
    transform: scale(1.05);
}

.ai-services-page .ai-hero-text h1 {
    font-size: clamp(48px, 6vw, 84px);
    line-height: 0.95;
    letter-spacing: -3px;
    margin-bottom: 24px;
    font-weight: 500;
}

.ai-services-page .ai-hero-text p {
    font-size: 20px;
    line-height: 1.5;
    color: var(--text-secondary, #555);
    margin-bottom: 40px;
    max-width: 500px;
}

/* 3-Step Flow */
.ai-services-page .workflow-section {
    background: #fff;
    padding: 120px 0;
    border-top: 1px solid #eee;
}

.ai-services-page .workflow-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    position: relative;
}

.ai-services-page .workflow-grid::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    height: 1px;
    background: #eee;
    z-index: 1;
}

.ai-services-page .workflow-item {
    position: relative;
    z-index: 2;
    background: #fff;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ai-services-page .workflow-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

.ai-services-page .step-icon {
    width: 80px;
    height: 80px;
    background: #f8f9fa;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 600;
    color: var(--accent, #2563EB);
    border: 1px solid #eee;
}

.ai-services-page .workflow-item h3 {
    font-size: 24px;
    margin-bottom: 12px;
    font-weight: 500;
}

.ai-services-page .workflow-item p {
    color: var(--text-secondary, #555);
    line-height: 1.6;
}

/* Benefits Dynamic Layout */
.ai-services-page .benefits-section {
    background: #F9F9FB;
    padding: 120px 0;
    overflow: hidden;
}

.ai-services-page .benefits-organic-grid {
    height: 700px;
    position: relative;
    margin-top: 60px;
}

/* Drift Animation for Benefits */
@keyframes drift {
    0% {
        transform: translate(0, 0) rotate(var(--r, 0deg));
    }

    25% {
        transform: translate(10px, -15px) rotate(calc(var(--r, 0deg) + 1deg));
    }

    50% {
        transform: translate(-5px, -25px) rotate(calc(var(--r, 0deg) - 1deg));
    }

    75% {
        transform: translate(-12px, -10px) rotate(calc(var(--r, 0deg) + 0.5deg));
    }

    100% {
        transform: translate(0, 0) rotate(var(--r, 0deg));
    }
}

.ai-services-page .benefit-card-floating {
    background: #fff;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: absolute;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    animation: drift 12s ease-in-out infinite;
    max-width: 100%;
}

.ai-services-page .benefit-card-floating:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    z-index: 10 !important;
    animation-play-state: paused;
}

.ai-services-page .benefit-card-floating h4 {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 600;
}

.ai-services-page .benefit-card-floating p {
    font-size: 14px;
    color: var(--text-secondary, #555);
    line-height: 1.4;
    margin-bottom: 0;
}

/* Positions and Sizes with unique rotations */
.ai-services-page .b-1 {
    --r: -1deg;
    width: 300px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.ai-services-page .b-2 {
    --r: 1.5deg;
    width: 340px;
    top: 5%;
    right: 10%;
    animation-delay: -2s;
}

.ai-services-page .b-3 {
    --r: 0.5deg;
    width: 280px;
    top: 40%;
    left: 35%;
    animation-delay: -4s;
    z-index: 5;
}

.ai-services-page .b-4 {
    --r: -2deg;
    width: 320px;
    bottom: 15%;
    left: 10%;
    animation-delay: -6s;
}

.ai-services-page .b-5 {
    --r: 1deg;
    width: 300px;
    bottom: 10%;
    right: 15%;
    animation-delay: -8s;
}

.ai-services-page .b-6 {
    --r: -0.5deg;
    width: 260px;
    top: 50%;
    right: 5%;
    animation-delay: -10s;
}

/* Packages Grid */
.ai-services-page .packages-section {
    padding: 120px 0;
}

.ai-services-page .packages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.ai-services-page .package-card {
    background: #fff;
    padding: 0;
    overflow: hidden;
    border-radius: 32px;
    border: 1px solid #eee;
    transition: var(--transition, 0.4s ease);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ai-services-page .package-card:hover {
    border-color: var(--accent, #2563EB);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.ai-services-page .package-visual {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
}

.ai-services-page .visual-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: slow-pan 20s infinite ease-in-out;
    transition: transform 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slow-pan {
    0% {
        transform: scale(1) translate(0, 0);
    }

    50% {
        transform: scale(1.1) translate(-2%, -1%);
    }

    100% {
        transform: scale(1) translate(0, 0);
    }
}

.ai-services-page .package-card:hover .visual-preview {
    transform: scale(1.2);
    animation-play-state: paused;
}

.ai-services-page .package-content-inner {
    padding: 32px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ai-services-page .package-tag {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent, #2563EB);
    font-weight: 600;
    margin-bottom: 16px;
    display: block;
}

.ai-services-page .package-card h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.ai-services-page .package-card p {
    font-size: 15px;
    color: var(--text-secondary, #555);
    margin-bottom: 32px;
    line-height: 1.6;
}

.ai-services-page .package-link {
    font-weight: 600;
    text-decoration: none;
    color: var(--text-primary, #111);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s;
}

.ai-services-page .package-link:hover {
    gap: 12px;
    color: var(--accent, #2563EB);
}

/* Testimonials */
.ai-services-page .testimonials-ai {
    background: #fff;
    padding: 120px 0;
    border-top: 1px solid #eee;
}

.ai-services-page .testimonial-minimal {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.ai-services-page .testimonial-minimal blockquote {
    font-size: 32px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.5px;
    margin-bottom: 30px;
}

.ai-services-page .testimonial-author {
    font-size: 16px;
    color: var(--text-secondary, #555);
}

/* Booking Section */
.ai-services-page .booking-ai {
    padding: 140px 0;
    text-align: center;
    background: var(--text-primary, #111);
    color: #fff;
    border-radius: 40px;
    margin: 40px;
}

.ai-services-page .booking-ai h2 {
    font-size: 56px;
    margin-bottom: 24px;
    letter-spacing: -2px;
    color: #fff;
}

.ai-services-page .booking-ai p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 48px;
}

/* Responsive */
@media (max-width: 1024px) {
    .ai-services-page .ai-hero-content {
        grid-template-columns: 1fr;
    }

    .ai-services-page .ai-hero-visual {
        height: 400px;
    }

    .ai-services-page .packages-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ai-services-page .workflow-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .ai-services-page .workflow-grid::before {
        display: none;
    }

    .ai-services-page .benefits-organic-grid {
        height: auto;
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
    }

    .ai-services-page .benefit-card-floating {
        position: static;
        width: 100% !important;
        animation: none;
    }
}

@media (max-width: 640px) {
    .ai-services-page .packages-grid {
        grid-template-columns: 1fr;
    }

    .ai-services-page .booking-ai h2 {
        font-size: 36px;
    }

    .ai-services-page .booking-ai {
        margin: 20px 0;
        padding: 80px 20px;
    }
}

@media (max-width: 768px) {

    /* Fix Hero overlapping Menu */
    .ai-services-page .ai-hero {
        height: auto;
        /* Allow content to push height naturally */
        min-height: unset;
        /* Remove forced height on mobile */
        padding-top: 140px;
        /* Extra space for header to avoid overlap */
        padding-bottom: 60px;
        /* Space at bottom for the image */
        display: block;
        /* Stack content simply */
    }

    .ai-services-page .ai-hero-content {
        display: flex;
        flex-direction: column;
        gap: 40px;
    }

    /* Fix Hero Image positioning - Ensure it stays within Hero */
    .ai-services-page .ai-hero-visual {
        height: 300px;
        /* Controlled height for mobile */
        width: 100%;
        margin-top: 0;
        border-radius: 20px;
        /* Slightly smaller radius */
    }

    .ai-services-page .ai-hero-text {
        text-align: center;
        /* Center text on mobile for better look */
        padding: 0 15px;
    }

    .ai-services-page .ai-hero-text h1 {
        font-size: 36px;
        /* Readable size on small screens */
    }

    .ai-services-page .ai-hero-text p {
        margin-left: auto;
        margin-right: auto;
    }
}