/* Transition Classes for Animation */
.hidden-el {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1); /* Custom easing for smooth pop */
}

.show-el {
    opacity: 1;
    transform: translateY(0);
}

.stagger-delay-1 { transition-delay: 0.1s; }
.stagger-delay-2 { transition-delay: 0.2s; }
.stagger-delay-3 { transition-delay: 0.3s; }
.stagger-delay-4 { transition-delay: 0.4s; }

/* Partners Section */
.partners-section {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.01);
}

.partners-label {
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
    opacity: 0.7;
}

.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.partner-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: default;
}

.partner-item:hover {
    opacity: 1;
    transform: translateY(-2px);
    color: var(--accent-color);
}

.partner-icon {
    width: 35px;
    height: 35px;
    fill: currentColor;
}

@media (max-width: 600px) {
    .partners-grid {
        gap: 30px;
        flex-direction: column;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: transparent;
    overflow: hidden;
    padding-top: var(--nav-height);
    color: #fff;
    z-index: 10;
}

/* Code Background Overlay */
.code-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -5;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.07; /* Very subtle */
    pointer-events: none;
    user-select: none;
}

.code-bg-overlay pre {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.2rem;
    color: var(--primary-color);
    text-align: left;
    white-space: pre-wrap;
    max-width: 800px;
    line-height: 1.5;
    filter: blur(1px); /* Slight blur for depth */
    transform: perspective(500px) rotateX(20deg) scale(1.1); /* Tilt effect */
}

.hero-section::after {
    display: none; /* Removing the pulse glow to focus on code, or keep it subtle? Let's remove for cleaner code look */
}

@keyframes pulseGlow {
    0% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.8); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

.hero-section::before {
    display: none;
}

.hero-content h1 {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -3px;
    opacity: 0; 
    transform: translateY(20px);
    animation: fadeUp 1s ease 0.2s forwards;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hero-content h1 span {
    color: var(--primary-color);
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 3rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease 0.4s forwards;
    line-height: 1.8;
    color: #d1d5db;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease 0.6s forwards;
}

.hero-visual {
    /* ...existing code... */
    display: none; /* Hide the cube to unclutter the background */
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Services Section */
.services-section {
    padding: 100px 0;
    background: transparent; /* Remove solid background */
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    padding: 40px 30px;
    border-radius: 16px;
    text-align: left;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px -10px rgba(0, 123, 255, 0.3);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card .icon {
    width: 60px;
    height: 60px;
    margin-bottom: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.2), rgba(0, 255, 204, 0.05));
    color: var(--accent-color);
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.service-card .icon svg {
    width: 30px;
    height: 30px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.service-card p {
    font-size: 1rem;
    color: #a0aec0;
    line-height: 1.6;
}

/* Portfolio Section */
.portfolio-section {
    padding: 100px 0;
    /* No bg, see through to body gradient */
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.portfolio-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 123, 255, 0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.portfolio-image {
    height: 220px;
    overflow: hidden;
    position: relative;
    background-color: #111;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s ease;
}

.portfolio-item:hover .placeholder-img {
    transform: scale(1.05);
}

.portfolio-content {
    padding: 30px;
}

.portfolio-content .category {
    font-size: 0.8rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}

.portfolio-content h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #fff;
    font-weight: 600;
}

.portfolio-content p {
    font-size: 0.95rem;
    color: #a0aec0;
    line-height: 1.6;
    margin-bottom: 20px;
}

.portfolio-content .btn-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.portfolio-content .btn-link svg {
    transition: transform 0.3s;
}

.portfolio-content .btn-link:hover svg {
    transform: translateX(5px);
}

/* Portfolio Section */
.portfolio-section {
    padding: 100px 0;
    /* No bg, see through to body gradient */
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.portfolio-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 123, 255, 0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.portfolio-image {
    height: 220px;
    overflow: hidden;
    position: relative;
    background-color: #111;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s ease;
}

.portfolio-item:hover .placeholder-img {
    transform: scale(1.05);
}

.portfolio-content {
    padding: 30px;
}

.portfolio-content .category {
    font-size: 0.8rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}

.portfolio-content h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #fff;
}

.portfolio-content .btn-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 15px;
}

.portfolio-content .btn-link svg {
    transition: transform 0.3s;
}

.portfolio-content .btn-link:hover svg {
    transform: translateX(5px);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.about-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 3rem;
}

.features-list {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.features-list li {
    font-size: 1.1rem;
    color: #fff;
    font-weight: 600;
    padding: 10px 20px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    background-color: rgba(255,255,255,0.03);
    display: flex;
    align-items: center;
    gap: 10px;
}

.check-icon {
    color: var(--accent-color);
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
    text-align: center;
    background: transparent;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.cta-section h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    z-index: 10;
    position: relative;
}

.cta-section p {
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto 3rem;
    z-index: 10;
    position: relative;
}


/* Process Section */
.process-section {
    padding: 100px 0;
    position: relative;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 123, 255, 0.03) 100%);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    counter-reset: steps;
}

.step-card {
    position: relative;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border-top: 2px solid transparent;
    transition: all 0.3s ease;
}

.step-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-top-color: var(--accent-color);
    transform: translateY(-5px);
}

.step-number {
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: 10px;
    right: 20px;
    line-height: 1;
    z-index: 0;
}

.step-card h3 {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.step-card p {
    font-size: 0.95rem;
    color: #a0aec0;
    position: relative;
    z-index: 1;
}

/* Testimonials Section */
.testimonials-section {
    padding: 100px 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.testimonial-card {
    background: rgba(20, 25, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 16px;
    position: relative;
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
}

.testimonial-card .quote-icon {
    color: var(--primary-color);
    opacity: 0.5;
    margin-bottom: 20px;
}

.testimonial-card .quote-text {
    font-size: 1.1rem;
    font-style: italic;
    color: #e2e8f0;
    margin-bottom: 30px;
    line-height: 1.6;
}

.testimonial-card .client-info h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: #fff;
}

.testimonial-card .client-info span {
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive specific to home */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .cta-section h2 {
        font-size: 2.5rem;
    }

    /* Mobile 2-column Services Grid */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .service-card {
        padding: 20px 15px; /* Compact padding */
    }

    .service-card .icon {
        width: 40px;
        height: 40px;
        margin-bottom: 15px;
    }

    .service-card h3 {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .service-card p {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .features-list {
        display: grid;
        grid-template-columns: 1fr 1fr; /* 2 in a row */
        gap: 10px;
        padding: 0 10px;
    }

    .features-list li {
        width: 100%;
        display: flex;
        flex-direction: column; /* Stack icon and text vertically for better fit */
        align-items: center;
        gap: 5px;
        font-size: 0.85rem;
        padding: 10px 5px;
        text-align: center;
    }

    /* Mobile 2-column Portfolio Grid - Robust Fix */
    .portfolio-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr)); /* strictly enforce equal columns preventing overflow */
        gap: 8px; /* Minimal gap */
        margin-top: 20px;
        width: 100%;
        padding: 0;
    }

    .portfolio-item {
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.03);
        display: flex;
        flex-direction: column;
        min-width: 0; /* Critical for grid items to shrink */
    }

    .portfolio-image {
        height: 100px; /* Very compact image */
        width: 100%;
    }

    .portfolio-image svg {
        width: 24px;
        height: 24px;
    }

    .portfolio-content {
        padding: 10px; /* Very tight padding */
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .portfolio-content .category {
        font-size: 0.6rem;
        margin-bottom: 2px;
        opacity: 0.7;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .portfolio-content h3 {
        font-size: 0.9rem; /* Small but readable */
        margin-bottom: 4px;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .portfolio-content p {
        display: none; /* Hide description entirely on mobile to save space */
    }

    /* Mobile Testimonials Slider */
    .testimonials-grid {
        display: block; /* Disable grid for relative positioning */
        position: relative;
        height: 350px; /* Fixed height for absolute positioned items */
        overflow: hidden;
    }

    .testimonial-card {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.8s ease-in-out, transform 0.8s ease;
        transform: scale(0.95);
        pointer-events: none;
        background: rgba(20, 25, 40, 0.9); /* More opaque for readability */
    }

    .testimonial-card.active {
        opacity: 1;
        visibility: visible;
        transform: scale(1);
        pointer-events: auto;
        z-index: 2;
    }
}