/* Custom Tailwind Configuration */
:root {
    --primary-color: #0abab5;
    --bg-light-color: #f8f8f8; /* A very light grey for background */
    --text-dark: #333;
    --text-light: #fff;
}

html {
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light-color);
    color: var(--text-dark);
}

/* Customizing Tailwind colors */
.primary-color {
    color: var(--primary-color);
}
.bg-primary {
    background-color: var(--primary-color);
}
.border-primary {
    border-color: var(--primary-color);
}
.hover\:bg-primary-dark:hover {
    background-color: #08938d; /* A slightly darker shade for hover effect */
}
.bg-light-color {
    background-color: var(--bg-light-color);
}

/* Navigation specifics */
.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Dropdown styles */
.dropdown-menu {
    display: none;
    position: absolute;
    background-color: white;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 100;
    min-width: 200px;
    border-radius: 0.5rem;
    overflow: hidden;
    left: 50%; /* Center dropdown under the nav item */
    transform: translateX(-50%);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    color: var(--text-dark);
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s;
}

.dropdown-menu a:hover {
    background-color: var(--bg-light-color);
}

.dropdown-submenu .dropdown-menu {
    left: 100%;
    top: 0;
    margin-top: 0;
    margin-left: 0.5rem;
}

.dropdown-submenu:hover .dropdown-menu {
    display: block;
}

/* Hero video styling - adjusted for standard section now */
.hero-video-container {
    position: relative;
    width: 100%;
    height: 100vh; /* Remains full viewport height */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-video-container video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    transform: translate(-50%, -50%);
    object-fit: cover; /* Ensure it covers the section */
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.45); /* Adjusted for better text visibility */
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 1rem;
}

/* Scrollbar styles for overall aesthetic */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #08938d;
}

/* Responsive menu button (Corrected to stack vertically) */
@media (max-width: 768px) {
    .mobile-menu-hidden {
        display: none;
    }
    .mobile-menu-visible {
        display: flex; /* Keep as flex to stack main nav links */
        flex-direction: column; /* Ensure main nav links stack vertically */
        width: 100%;
        background-color: white;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        position: absolute;
        top: 64px; /* Adjust based on nav height */
        left: 0;
        padding: 1rem 0;
        border-radius: 0.5rem;
    }

    /* --- IMPORTANT FIXES FOR MOBILE DROPDOWNS --- */

    /* Ensure all dropdown menus within the mobile view are static and block-level */
    .mobile-menu-visible .dropdown-menu {
        position: static;   /* Override absolute positioning */
        display: block;     /* Make it block-level to stack vertically */
        width: 100%;        /* Take full width */
        box-shadow: none;   /* Remove shadows for sub-menus on mobile */
        border-radius: 0;
        margin-top: 0;      /* Reset margin top */
        padding: 0;         /* Reset padding for the menu container itself */
    }

    /* Apply consistent block display and padding to ALL links within the mobile nav and its dropdowns */
    .mobile-menu-visible #nav-links a {
        display: block; /* Ensure all links are block-level to stack vertically */
        padding: 0.75rem 1.25rem; /* Base padding for all mobile links */
    }

    /* Adjust padding for primary navigation links (e.g., "What We Do", "Who We Help") */
    .mobile-menu-visible #nav-links > a, /* for direct links like Who We Help */
    .mobile-menu-visible #nav-links > .dropdown > a { /* for top-level dropdown triggers like What We Do */
        padding-left: 1rem; /* Adjust this value for main item indentation */
    }

    /* Indent the immediate children of the main "What We Do" dropdown (e.g., "Digital Transformation", "E-Commerce") */
    .mobile-menu-visible .dropdown > .dropdown-menu > .dropdown-submenu > a {
        padding-left: 2rem; /* Indent for these parent items of sub-sub-menus */
    }

    /* Indent the items within the nested sub-menus (e.g., "Web Development", "App Development") */
    .mobile-menu-visible .dropdown-submenu .dropdown-menu a {
        padding-left: 3rem; /* Further indent for these deepest nested items */
    }

    /* Ensure the sub-submenu container itself doesn't have unintended margins/positions */
    .mobile-menu-visible .dropdown-submenu .dropdown-menu {
        margin-left: 0; /* Remove horizontal offset for nested sub-menus */
    }
}

/* Custom Animations */

/* Keyframes for the fade-in-up animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Class to apply the fade-in-up animation - DURATION CHANGED TO 2.5s */
.animate-fade-in-up {
    animation: fadeInUp 2.5s ease-out forwards; 
    /* opacity: 0;  REMOVED from here. Handled by 'opacity-0' class in HTML */
}

/* Animation for elements sliding in from the left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Class to apply the slide-in-left animation - DURATION CHANGED TO 2.5s */
.animate-slide-in-left {
    animation: slideInLeft 2.5s ease-out forwards;
    /* opacity: 0; REMOVED from here. Handled by 'opacity-0' class in HTML */
}

/* Animation delays (Tailwind-like classes) - These are added dynamically by JavaScript */
.delay-0 { animation-delay: 0s; }
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }
.delay-900 { animation-delay: 0.9s; }
.delay-1000 { animation-delay: 1s; }


/* Styling for the animated counters */
.counter-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 4rem 1rem;
}

.counter-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: 1rem;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    flex: 1 1 200px; /* Allows items to grow/shrink but maintain min-width */
    max-width: 250px;
}

.counter-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.counter-label {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* Testimonial Card Styling */
.testimonial-card {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    border: 1px solid rgba(0,0,0,0.05); /* Subtle border for definition */
}

.testimonial-card:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); /* More pronounced shadow on hover */
}

/* Ensure the quote icon is correctly positioned and doesn't interfere with text selection */
.testimonial-card .fa-quote-left {
    z-index: 0; /* Behind the text */
}

/* Ensure text is above the quote icon */
.testimonial-card p,
.testimonial-card div {
    position: relative;
    z-index: 1;
}

/* Particle background for Achievements Section */
#particles-js-achievements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent; /* Background color is determined by the section */
    z-index: 0; /* Ensure particles are behind content */
}

/* --- NEW STYLES FOR HORIZONTAL SCROLL SECTION (WHO WE HELP & HOW WE DELIVER) --- */

/* Horizontal sections wrapper for Who We Help & How We Deliver */
#horizontal-sections-wrapper-2 {
    position: sticky;
    top: 0;
    /* Tailwind classes h-screen w-screen flex flex-nowrap overflow-hidden already in HTML */
    /* Removed transition here - JS will handle transform directly for smoother scroll control */
    /* transition: transform 0.1s linear; */ 
}

/* Ensure children (sections) inside the horizontal wrapper fill their viewport space and don't wrap */
#horizontal-sections-wrapper-2 > section {
    min-width: 100vw;
    height: 100vh;
    flex-shrink: 0;
    display: flex; /* Make section content vertically centered */
    flex-direction: column; /* Ensure content stacks if needed */
    align-items: center; /* Center horizontally within section */
    justify-content: center; /* Center vertically within section */
    overflow-y: auto; /* Allow content to scroll if it overflows vertically */
}

/* Adjustments for content within horizontal sections for better presentation */
#who-we-help-section .grid {
    width: 100%; /* Ensure grid takes full width */
    max-width: 1024px; /* Optional: constrain grid width */
    margin: 0 auto;
}

#how-we-deliver-section .max-w-4xl {
    /* Existing padding-top: 2rem; padding-bottom: 2rem; from previous step */
}

/* Ensure text within the fixed height horizontal sections is scrollable if it exceeds screen height on small devices */
#who-we-help-section,
#how-we-deliver-section {
    padding-top: 5rem; /* Adjust padding if needed to prevent content from touching top/bottom on smaller screens */
    padding-bottom: 5rem;
}

/* Special styling for the vertical spacers for visual debugging/clarity */
#vertical-spacer-how-we-deliver {
    height: 100vh; /* Set as 100vh to ensure it pushes the sticky section into view */
    background-color: var(--bg-light-color); /* Matches surrounding sections */
}

#vertical-scroll-trigger-2 {
    height: 200vh; /* This determines how much vertical scroll drives the horizontal effect (2 sections * 100vh) */
    background-color: transparent; /* Invisible, just provides scroll space */
}