* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', 'Open Sans', 'Quicksand', Arial, sans-serif;
}

body {
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

.service-row[id] {
    scroll-margin-top: 96px;
}

/* --- HERO SECTION --- */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.hero {
    position: relative;
    width: 100%;
    height: 80vh;
    display: flex;
    align-items: center;
    padding-left: 8%;
    overflow: hidden;

}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle,
            rgba(0, 0, 0, 0.2) 0%,
            /* Darkest in the very center */
            rgba(0, 0, 0, 0.3) 50%,
            /* Fades out towards the edges */
            transparent 100%), url('../assets//service-hero2.jpg');
    background-size: cover;
    background-position: center;
    z-index: 0;
    animation: heroEntry 5s ease-out forwards;
}

@keyframes heroEntry {
    0% {
        transform: scale(1);
        filter: blur(10px) brightness(0.8);
        /* Starts blurry and dark */
    }

    100% {
        transform: scale(1.1);
        filter: blur(0px) brightness(1);
        /* Ends sharp and clear */
    }
}

.hero-content {
    position: relative;
    max-width: 600px;
    color: #fff;
    z-index: 1;
}

.accent-text {
    color: #f4f4f4;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: block;
    opacity: 0;
    /* Handled by JS */
}

.hero-content h1 {
    font-size: 3.28rem;
    margin-bottom: 20px;
    opacity: 0;
    /* Handled by JS */
    line-height: 70px;
}

.hero-p {
    font-size: 1.rem;
    margin-bottom: 30px;
    opacity: 0;
    /* Handled by JS */
}

.hero-btn {
    display: inline-block;
    padding: 15px 35px;
    background: #003366;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 2px solid #003366;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 1.8s;
}

.hero-btn:hover {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

/* --- SERVICES SECTION --- */
.services-wrapper {
    padding: 100px 8%;
}

.service-row {
    display: flex;
    gap: 80px;
    margin-bottom: 150px;
    align-items: center;
}

.service-row:nth-child(even) {
    flex-direction: row-reverse;
}

/* --- PREMIUM IMAGE ANIMATION STYLES --- */
/* --- PREMIUM IMAGE ANIMATION STYLES --- */
.service-visual {
    flex: 1.2;
    position: sticky;
    top: 150px;
    height: 500px;
    aspect-ratio: 16 / 9;
    overflow: hidden !important; /* Forces the zoom to stay inside the box */
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
    border-radius: 20px;
    transition: clip-path 1.4s cubic-bezier(0.77, 0, 0.175, 1);
    clip-path: inset(0 100% 0 0);
    display: block;
    z-index: 1;
}

.service-row:nth-child(even) .service-visual {
    clip-path: inset(0 0 0 100%);
}

.service-row.is-visible .service-visual {
    clip-path: inset(0 0 0 0);
}

/* BASE STATE FOR IMAGE */
.service-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    /* This long transition is for the initial scroll-reveal only */
    transition: transform 2.5s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 1s ease;
    transform: scale(1.5); 
    will-change: transform;
}

/* SETTLED STATE AFTER SCROLL REVEAL */
.service-row.is-visible .service-visual img {
    opacity: 1;
    transform: scale(1.1); 
}

/* EXACT HOVER FIX: Place this OUTSIDE of any media queries */
/* Update: Now triggers ONLY when the mouse is over the image container */
.service-visual:hover img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    transform: scale(1.3) !important; 
    filter: brightness(1.1);
}
/* --- TEXT CONTENT --- */
.service-info {
    flex: 1;
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s ease-out 0.3s;
}

.service-row.is-visible .service-info {
    opacity: 1;
    transform: translateY(0);
}

.service-info h2 {
    font-size: 2.8rem;
    color: #003366;
    margin-bottom: 15px;
}

.service-info h4 {
    font-size: 1.1rem;
    color: #5189c1;
    margin-bottom: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.service-info p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 25px;
}

.service-info ul {
    list-style: none;
}

.service-info ul li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    color: #444;
}

.service-info ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #5189c1;
    font-weight: bold;
}

.char,
.service-visual img {
    /* Magic property for smoothness */
    will-change: transform, opacity;
    /* Prevent flickering during transitions */
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- CHAR ANIMATION --- */
.char {
    display: inline-block;
    opacity: 0;
    transform: translate3d(0, 15px, 0);
    transition: transform 0.5s cubic-bezier(0.2, 0, 0.2, 1), opacity 0.5s ease;
}

.char.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

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

/* --- POP-OUT LIGHTBOX EFFECT --- */


/* Optional: Slight lift on the container itself */
.service-visual img:hover {
    transform: scale(1.25);
    transform: translateY(-8px);
}

/* Mobile */
/* --- COMPREHENSIVE RESPONSIVENESS --- */

/* Tablets and Small Laptops */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3rem;
        line-height: 1.1;
    }

    .service-row {
        gap: 40px;
    }

    .service-info h2 {
        font-size: 2.2rem;
    }
}

/* Tablets and Phones (The main transition) */
@media (max-width: 992px) {
    .hero {
        padding: 0 5%;
        height: 70vh;
        /* Shorter hero for mobile */
        justify-content: center;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 2.3rem;
    }

    .services-wrapper {
        padding: 60px 5%;
    }

    /* Stack Image on Top for every row */
    .service-row,
    .service-row:nth-child(even) {
        flex-direction: column !important;
        margin-bottom: 80px;
        gap: 30px;
    }

    /* Disable Sticky on mobile to avoid layout breaks */
    .service-visual {
        position: relative !important;
        top: 0 !important;
        width: 100%;
        height: 350px;
        flex: none;
    }

    .service-info {
        width: 100%;
        text-align: left;
        /* Keep text left-aligned for readability */
    }

    .service-info h2 {
        font-size: 2rem;
    }
}

/* Small Phones */


/* --- FIX FOR BLURRY TEXT ON SERVICES PAGE --- */

/* 1. Kill the global blur from HeroFinal.css specifically for this page */
.char {
    filter: none !important;
    -webkit-filter: none !important;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    /* Forces a sharp rendering layer */
    will-change: transform, opacity;
}

/* 2. Update the hero-content to be isolated from background animations */
.hero-content {
    isolation: isolate;
    transform: translate3d(0, 0, 0);
    -webkit-font-smoothing: antialiased;
}

/* 3. Ensure characters are perfectly sharp once they are visible */
.char.visible {
    filter: blur(0) !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* 4. Improve Hero Heading specifically */
.hero-content h1 {
    font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* --- Carousel Layout --- */
/* --- High-Performance Testimonial Section --- */
.premium-testimonial-section {
    position: relative;
    padding: 100px 20px;
    background: url('../assets/testimonial.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    /* Parallax effect */
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Forces GPU to pre-render the background */
    will-change: transform;
    overflow: hidden;
}

.testimonial-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.carousel-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* Scroll Container Optimization */
.testimonial-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE */
    padding: 40px 0;
}

.testimonial-carousel::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.testimonial-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    padding: 0 15px;
    box-sizing: border-box;
    /* GPU Acceleration for slides */
    transform: translate3d(0, 0, 0);
}

/* Glass Card with Performance Fixes */
.testimonial-glass-card {
    background: rgba(255, 255, 255, 0.96);
    /* High opacity reduces blur calculation load */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 80px 60px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    max-width: 850px;
    margin: 0 auto;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.5);
    /* Tell browser exactly what will change */
    will-change: opacity, transform;
}

/* Decorative Quotes */
.quote-mark {
    position: absolute;
    font-size: 140px;
    font-family: 'Georgia', serif;
    opacity: 0.1;
    line-height: 1;
    pointer-events: none;
    color: #003366 !important;
}

.testimonial-glass-card .quote-mark.q-top {
    top: 20px;
    left: 40px;
    color: #003366 !important;
    opacity: 0.4 !important;
}

.testimonial-glass-card .quote-mark.q-bottom {
    bottom: -10px;
    right: 40px;
    color: #003366 !important;
    opacity: 0.4 !important
}

/* Typography */
.testimonial-heading {
text-align: center;
    color: #003366;
    font-size:3rem;
    font-weight: 800;
    margin-bottom: 10px; /* Space between title and the cards */
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 10;
    /* Optional: text-shadow to make it pop against the background image */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7), 
             0 0 5px rgba(255, 255, 255, 0.7);
}

.testimonial-text {
    font-size: 1.3rem;
    line-height: 1.8;
    color: #334155;
    margin: 0 auto 40px;
    font-weight: 500;
}

.brand-name {
    font-size: 1.5rem;
    color: #003366;
    font-weight: 700;
    margin-bottom: 5px;
}

.designation {
    font-size: 0.9rem;
    color: #003366;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

/* Smooth Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.carousel-dots .dot {
    height: 12px;
    width: 12px;
    background-color: #bbb;
    /* Inactive color */
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-dots .dot.active {
    background-color: #003366;
    /* Your SAP Dark Blue */
    transform: scale(1.2);
    /* Slight pop effect for "cool" animation */
}



/* Responsive Scaling */
@media (max-width: 768px) {
    .testimonial-glass-card {
        padding: 50px 25px;
    }

    .testimonial-heading {
        font-size: 1.8rem;
    }

    .testimonial-text {
        font-size: 1.1rem;
    }

    .quote-mark {
        font-size: 80px;
    }

    .q-top {
        top: 10px;
        left: 15px;
    }

    .q-bottom {
        bottom: -10px;
        right: 15px;
    }

    .premium-testimonial-section {
        background-attachment: scroll;
    }

    /* Mobile perf fix */
}




@media (max-width: 468px) {

    /* Hero Section */
    .hero {
        padding: 60px 20px;
        text-align: center;
    }

    #hero-title {
        font-size: 1.8rem !important;
        /* Smaller heading for mobile */
        line-height: 1.2;
    }

    .hero-p {
        font-size: 1rem !important;
        margin-bottom: 25px;
    }

    .hero-btn {
        width: 100%;
        /* Full-width button for easier tapping */
        padding: 15px;
    }

    .services-wrapper {
        padding: 20px 15px;
    }

    .service-row {
        flex-direction: column !important;
        /* Force stack */
        margin-bottom: 40px;
    }

.service-visual {
    overflow: hidden !important;
    position: relative;
    /* Ensure the reveal effect doesn't fight the hover scale */
    z-index: 1;
}
    .service-info {
        width: 100% !important;
        padding: 0;
    }

/* --- 1. Fix: Base State (Apply globally) --- */
.service-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    /* This long transition is for the initial scroll-reveal only */
    transition: transform 2.5s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 1s ease;
    transform: scale(1.5); 
    will-change: transform;
}
/* --- 2. Fix: Reveal State --- */
.service-row.is-visible .service-visual img {
    opacity: 1;
    transform: scale(1.1); /* Stays at 1.1 after revealing */
}
.service-row.is-visible:hover .service-visual img {
    /* Snappy transition for hover */
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: scale(1.2) !important; /* Zoom in slightly more than the reveal state */
    filter: brightness(1.1);
}
/* 4. Optional: Subtle lift for the whole row */
.service-row.reveal {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-row:hover {
    transform: translateY(-5px); /* Row lifts slightly */
}
    .service-info h2 {
        font-size: 1.5rem;
    }

    .service-info ul li {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }

    .testimonial-glass-card {
        padding: 30px 20px;
        margin: 0 10px;
    }

    .testimonial-heading {
        font-size: 1.4rem;
    }

    .testimonial-text {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .quote-mark {
        font-size: 2rem;
        /* Reduce size of large quotes */
    }

    .designation {
        font-size: 0.85rem;
    }

    /* Ensure dots are easy to tap */
    .carousel-dots {
        margin-top: 20px;
    }

    .dot {
        width: 14px;
        height: 14px;
        margin: 0 8px;
    }
}
