/* --- 0. Global Resets, Variables & Animations --- */
:root {
    /* Modern Palette */
    --primary-color: #0066ff;
    --secondary-color: #00d4ff;
    
    /* Text Colors */
    --text-primary: #1a1a2e; 
    --text-secondary: #4a4e69; 
    
    /* Backgrounds */
    --white-bg: #ffffff;
    --off-white: #f8fafc;
    --light-bg: #f4f6f8;
    
    /* Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Specific Shadows */
    --dynamic-shadow: 0 15px 40px rgba(0, 0, 0, 0.15), 0 6px 15px rgba(0, 0, 0, 0.1);
    --step-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    --hover-shadow: 0 25px 55px rgba(0, 0, 0, 0.25);
    
    /* Transitions */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-speed: 0.5s;
}

/* Page Entrance Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Section Title Entrance Animation */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Background Gradient Animation for Hero */
@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.8;
    color: var(--text-primary);
    background-color: var(--off-white);
    overflow-x: hidden;
    animation: fadeIn 1s var(--ease-smooth);
    margin: 0 !important;
    padding: 0 !important;
}

/* Force remove top spacing */
main { margin-top: 0 !important; padding-top: 0 !important; }

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-center { text-align: center; }

h1, h2, h3, h4 { color: var(--text-primary); font-weight: 800; letter-spacing: -0.03em; }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.1; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
p { color: var(--text-secondary); font-size: 1.05rem; }

/* Utility Classes */
.py-20 { padding-top: 8rem; padding-bottom: 8rem; }
.mb-8 { margin-bottom: 2rem; }

/* --- 1. Hero Section --- */
.hero-section {
    padding-top: 220px;
    padding-bottom: 8rem;
    background: linear-gradient(-45deg, #0f172a, #1e3a8a, #2563eb, #00d4ff);
    background-size: 400% 400%;
    animation: gradientFlow 12s ease infinite;
    position: relative;
    color: white;
    /* REMOVED: clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%); */
}

.hero-section h1 { 
    color: #ffffff; 
    margin-bottom: 1.5rem;
    text-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.hero-section p { 
    color: rgba(255, 255, 255, 0.9); 
    max-width: 650px; 
    margin: 0 auto; 
    font-size: 1.2rem;
}
/* --- 2. Main Services --- */
.main-services-section {
    padding-top: 6rem;
    padding-bottom: 6rem;
    background-color: var(--white-bg);
}

.service-block {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem; 
    align-items: center;
    transition: transform 0.45s ease-in-out, box-shadow 0.45s ease-in-out;
    padding: 3rem; 
    border-radius: 1.5rem;
    margin-bottom: 4rem;
    
    position: relative; 
    z-index: 1; 
    overflow: hidden; 
    background-color: var(--white-bg);
    scroll-margin-top: 120px;
}

/* Base Setup for the Fill Animation */
.service-block::before {
    content: "";
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 0%; 
    z-index: 0; 
    transition: height 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Ensure content sits on top */
.service-block > * { position: relative; z-index: 1; }

/* --- UPDATED: Richer/Darker Hover Colors --- */
/* 1. Mobile App (Blue) - Richer Blue */
.service-block:nth-of-type(1)::before { background: linear-gradient(to top, #cce0ff, #f0f8ff); }

/* 2. Web Dev (Pink) - Richer Pink */
.service-block:nth-of-type(2)::before { background: linear-gradient(to top, #ffcce6, #fff0f5); }

/* 3. AI/ML (Green) - Richer Mint/Green */
.service-block:nth-of-type(3)::before { background: linear-gradient(to top, #bdfceb, #f0fdf4); }

/* 4. Digital Marketing (Orange) - Richer Orange */
.service-block:nth-of-type(4)::before { background: linear-gradient(to top, #ffdec2, #fff7ed); }

/* 5. Training (Indigo) - Richer Indigo/Blue */
.service-block:nth-of-type(5)::before { background: linear-gradient(to top, #c7d2fe, #eef2ff); }


.service-block:hover {
    transform: translateY(-8px);
    box-shadow: var(--dynamic-shadow);
}
.service-block:hover::before { height: 100%; }

@media (min-width: 1024px) {
    .service-block {
        grid-template-columns: repeat(2, 1fr);
        padding: 4rem 2rem;
    }
    .reverse-layout .service-image { grid-column-start: 1; grid-row-start: 1; }
    .reverse-layout .service-content { grid-column-start: 2; }
}

/* Icons */
.icon-shape {
    width: 4.5rem; height: 4.5rem; border-radius: 1rem; 
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.5rem; color: var(--white-bg);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3); 
    transition: transform 0.45s;
}
.service-block:hover .icon-shape {
    transform: rotate(-5deg) scale(1.1); 
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.4);
}
.icon-shape i { font-size: 2.25rem; }

/* Service Gradients for Icons */
.bg-mobile { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.bg-website { background: linear-gradient(135deg, #a855f7, #ec4899); }
.bg-ai { background: linear-gradient(135deg, #22c55e, #10b981); }
.bg-digital { background: linear-gradient(135deg, #f97316, #ef4444); }
.bg-training { background: linear-gradient(135deg, #6366f1, #3b82f6); }

/* Feature List */
.feature-list { list-style: none; margin-bottom: 2rem; padding: 0; }
.feature-list li {
    display: flex; align-items: flex-start; gap: 1rem;
    margin-bottom: 1rem; color: var(--text-secondary);
    transition: color 0.3s;
}
.feature-list li div {
    width: 0.6rem; height: 0.6rem; min-width: 0.6rem;
    border-radius: 50%; box-shadow: 0 0 8px rgba(0, 0, 0, 0.3); margin-top: 0.5em; 
}
.feature-list li:hover { color: var(--text-primary); }

.type-mobile-app .feature-list li div { background: linear-gradient(45deg, #38bdf8, #2563eb); }
.type-website-dev .feature-list li div { background: linear-gradient(45deg, #f472b6, #9333ea); }
.type-ai-ml .feature-list li div { background: linear-gradient(45deg, #34d399, #10b981); }
.type-digital-marketing .feature-list li div { background: linear-gradient(45deg, #fb923c, #dc2626); }
.type-training .feature-list li div { background: linear-gradient(45deg, #818cf8, #4f46e5); }

/* Card Buttons */
.btn-get-started {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 0.75rem; padding: 1rem 2rem; 
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white-bg); text-decoration: none;
    border-radius: 50px; font-weight: 700; position: relative; overflow: hidden; z-index: 1;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1); 
}
.btn-get-started:hover {
    box-shadow: 0 20px 40px -8px rgba(0, 102, 255, 0.7); 
    transform: translateY(-5px) scale(1.02);
}

/* Card Images */
.service-image img {
    width: 100%; height: 400px; object-fit: cover;
    border-radius: 1.5rem; 
    box-shadow: var(--dynamic-shadow);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.service-block:hover .service-image img { 
    transform: scale(1.03) rotate(-1deg); 
    box-shadow: var(--hover-shadow);
}

/* --- 3. Additional Services (Blue Fill) --- */
.additional-services-section {
    padding-top: 6rem; padding-bottom: 6rem;
    background: linear-gradient(to bottom, var(--off-white), var(--white-bg)); 
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.grid-item {
    position: relative; 
    overflow: hidden; /* Clips the corners */
    background: white; /* Default background */
    border-radius: 1.5rem; 
    padding: 2.5rem 2rem;
    text-align: center; 
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s var(--ease-smooth);
    z-index: 1;
}

/* The Blue Fill Layer */
.grid-item::before {
    content: ""; 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: 0%; /* Starts empty */
    background: linear-gradient(to top, var(--primary-color), var(--secondary-color));
    z-index: 0; 
    transition: height 0.4s var(--ease-smooth);
}

/* Ensure Text & Icons are ABOVE the fill */
.grid-item h4, 
.grid-item p, 
.grid-item i {
    position: relative;
    z-index: 2; /* Higher than ::before */
    transition: color 0.3s;
}

/* Hover Actions */
.grid-item:hover { 
    transform: translateY(-10px); 
    border-color: transparent; 
}

/* Trigger Fill to 100% */
.grid-item:hover::before { 
    height: 100%; 
}

/* Change Text Colors to White on Hover */
.grid-item:hover h4 { color: white; }
.grid-item:hover p { color: rgba(255, 255, 255, 0.9); }

/* Change Icon Color on Hover */
.grid-item i {
    font-size: 2.5rem; 
    color: var(--primary-color);
    margin-bottom: 1.5rem; 
    display: inline-block;
}
.grid-item:hover i { 
    color: white; 
    transform: scale(1.2) rotate(10deg); 
}

/* --- 4. Process Section --- */
.process-section {
    padding-top: 6rem; padding-bottom: 6rem;
    background-color: var(--white-bg);
}
.process-steps {
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 3rem; 
    position: relative;
    padding-top: 2rem;
}

@media (max-width: 767px) {
    .process-steps::before {
        content: '';
        position: absolute;
        top: 0; left: 50%;
        width: 3px; height: 100%;
        background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
        transform: translateX(-50%);
        z-index: 0;
    }
}

@media (min-width: 768px) {
    .process-steps { 
        grid-template-columns: repeat(4, 1fr); 
        gap: 2rem;
    }
    .process-steps::before {
        content: '';
        position: absolute;
        top: 50%; left: 0; right: 0;
        height: 4px;
        background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
        transform: translateY(-50%);
        z-index: 0;
        margin: 0 4rem; 
    }
}

.step-card {
    position: relative; 
    padding: 2.5rem 1.5rem; 
    border-radius: 1.25rem;
    border: 1px solid #e5e7eb;
    background: var(--white-bg);
    transition: all 0.4s ease-out;
    box-shadow: var(--step-shadow);
    z-index: 10; 
    text-align: center;
}
.step-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 15px 35px rgba(0, 102, 255, 0.25); 
    transform: translateY(-5px);
    background: var(--light-bg); 
}

.step-number {
    font-size: 4.5rem; 
    font-weight: 800; 
    color: transparent; 
    -webkit-text-stroke: 2px var(--primary-color); 
    text-stroke: 2px var(--primary-color);
    opacity: 0.8; 
    margin-bottom: 1rem; 
    transition: all var(--transition-speed);
    line-height: 1;
}
.step-card:hover .step-number { 
    -webkit-text-stroke: 2px var(--secondary-color);
    text-stroke: 2px var(--secondary-color);
    color: var(--primary-color); 
    opacity: 1; 
}
.step-card h3 {
    margin-top: 0.5rem;
    color: var(--text-primary);
}

.step-card::before {
    content: '';
    position: absolute;
    top: -15px; 
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 4px solid var(--white-bg);
    box-shadow: 0 0 0 4px var(--light-bg);
    z-index: 15;
    transition: all 0.4s;
}

.step-card:hover::before {
    background: var(--secondary-color);
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.2);
}

@media (min-width: 768px) {
    .step-card::before {
        top: 50%;
        left: 0;
        transform: translate(-50%, -50%); 
    }
    .step-card:not(:last-child)::after {
        content: none; 
    }
}

/* --- 5. CTA Section --- */
.cta-section {
    position: relative;
    background: linear-gradient(120deg, var(--primary-color), var(--secondary-color));
    color: white; padding: 6rem 1rem; overflow: hidden;
    text-align: center;
}

.cta-section::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 10%, transparent 10%);
    background-size: 30px 30px; opacity: 0.3;
    animation: gradientFlow 20s linear infinite;
}

.cta-section h2 { color: white; margin-bottom: 1rem; z-index: 1; position: relative; }
.cta-section p { color: rgba(255,255,255,0.95); margin-bottom: 2.5rem; z-index: 1; position: relative; max-width: 600px; margin-left: auto; margin-right: auto; }

.btn-contact-us {
    display: inline-flex;
    background: white; color: var(--primary-color);
    padding: 1.2rem 3.5rem;
    border-radius: 100px; text-decoration: none; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s var(--ease-smooth);
    position: relative; z-index: 10;
}
.btn-contact-us:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* --- 6. SCROLL ANIMATION & STAGGERING --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), 
                transform 0.8s cubic-bezier(0.5, 0, 0, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for items in grid/lists */
.services-grid .grid-item.reveal-on-scroll:nth-child(1),
.process-steps .step-card.reveal-on-scroll:nth-child(1) { transition-delay: 0.1s; }

.services-grid .grid-item.reveal-on-scroll:nth-child(2),
.process-steps .step-card.reveal-on-scroll:nth-child(2) { transition-delay: 0.2s; }

.services-grid .grid-item.reveal-on-scroll:nth-child(3),
.process-steps .step-card.reveal-on-scroll:nth-child(3) { transition-delay: 0.3s; }

.services-grid .grid-item.reveal-on-scroll:nth-child(4),
.process-steps .step-card.reveal-on-scroll:nth-child(4) { transition-delay: 0.4s; }

.services-grid .grid-item.reveal-on-scroll:nth-child(4n+1) { transition-delay: 0.1s; }
.services-grid .grid-item.reveal-on-scroll:nth-child(4n+2) { transition-delay: 0.2s; }
.services-grid .grid-item.reveal-on-scroll:nth-child(4n+3) { transition-delay: 0.3s; }
.services-grid .grid-item.reveal-on-scroll:nth-child(4n+4) { transition-delay: 0.4s; }

/* FIX: Ensure Hover Effects work after Animation */
.service-block.reveal-on-scroll.is-visible:hover,
.grid-item.reveal-on-scroll.is-visible:hover,
.step-card.reveal-on-scroll.is-visible:hover {
    transform: translateY(-10px);
}