/* Define Custom Color Palette */
:root {
    /* Dark Theme */
    --bg-dark: #0f172a;       /* Slate-900 */
    --bg-light-dark: #1e293b; /* Slate-800 */
    --text-light: #cbd5e1;    /* Slate-300 */
    --border-dark: #334155;  /* Slate-700 */

    /* Light Theme */
    --bg-light: #f8fafc;      /* Slate-50 */
    --text-dark: #334155;    /* Slate-700 */
    --text-darker: #0f172a;  /* Slate-900 */
    --border-light: #e2e8f0; /* Slate-200 */

    /* Accent Colors */
    --accent-primary: #6366f1; /* Indigo-500 */
    --accent-secondary: #14b8a6; /* Teal-500 */
}

/* Base styles */
body {
    font-family: 'Lato', sans-serif;
    scroll-padding-top: 80px;
    overflow-x: hidden; 
    background-color: var(--bg-dark);
    color: var(--text-light);
}
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}
h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
       
@keyframes floatReverse {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(10px); }
}

.float { animation: float 6s ease-in-out infinite; }
.float-reverse { animation: floatReverse 8s ease-in-out infinite; }

/* Icon Animations */
@keyframes pulse-glow {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
}

.icon-hover:hover {
    animation: pulse-glow 1.s infinite;
    transform: scale(1.1) rotate(10deg);
}

/* Advanced Card Effects */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.4s ease;
}

.card-3d:hover {
    transform: rotateY(10deg) rotateX(5deg) scale(1.02);
}

/* Progress Bars */
.progress-bar {
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
    transition: width 2s ease;
}
.progress-bar.animate { width: 100%; }

/* --- Theme-specific styles --- */
.section-dark {
    background-color: var(--bg-dark);
    position: relative;
}
.section-light {
    background-color: var(--bg-light);
    position: relative;
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 {
    color: #e2e8f0; /* Slate-200 */
}
.section-light h1, .section-light h2, .section-light h3, .section-light h4 {
    color: var(--text-darker);
}
.section-dark p, .section-dark cite, .section-dark li {
    color: var(--text-light);
}
.section-light p, .section-light cite, .section-light li {
    color: var(--text-dark);
}

/* Section Dividers */
.section-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}
.section-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}
.section-divider .shape-fill {
    fill: var(--bg-light);
}
.section-divider.from-dark .shape-fill {
    fill: var(--bg-dark);
}

/* Glassmorphism Header */
.header-scrolled {
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-dark);
}

/* Timeline Styling for LIGHT theme */
.timeline-item-light {
    position: relative; padding-bottom: 2.5rem; padding-left: 2.5rem;
    border-left: 2px solid var(--border-light);
}
.timeline-item-light:last-child { border-left-color: transparent; }
.timeline-dot-light {
    position: absolute; left: -0.7rem; top: 0;
    height: 1.25rem; width: 1.25rem;
    background-color: white; border-width: 2px;
    border-color: var(--accent-secondary); border-radius: 9999px;
    transition: all 0.3s ease;
}
.timeline-item-light:hover .timeline-dot-light { 
    transform: scale(1.3); 
    box-shadow: 0 0 20px rgba(20, 184, 166, 0.5);
}
       
/* Enhanced Bento Grid Cards */
.bento-card {
    background: linear-gradient(135deg, var(--bg-light-dark) 0%, #2d3748 100%);
    border-radius: 1rem; padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative; overflow: hidden; 
    border: 1px solid var(--border-dark);
    transform-style: preserve-3d;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.bento-card:hover { 
    transform: translateY(-8px) rotateX(5deg);
    box-shadow: 0 20px 40px -15px rgba(0,0,0,0.4);
}
.bento-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(99, 102, 241, 0.15), transparent 40%);
    opacity: 0; transition: opacity 0.5s; z-index: 1;
}
.bento-card:hover::before { opacity: 1; }
.bento-card > * { position: relative; z-index: 2; }
.bento-card .service-icon {
    transition: all 0.4s ease;
    display: inline-block;
}
.bento-card:hover .service-icon {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
}

/* Enhanced Showcase Cards */
.showcase-card {
    cursor: pointer; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 4px solid transparent; 
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--bg-light-dark) 0%, #2d3748 100%);
    position: relative;
    overflow: hidden;
}
.showcase-card:hover { 
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    border-color: var(--accent-primary); 
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}
.showcase-card.selected { 
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
    border-color: var(--accent-primary); 
    transform: translateX(8px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}
.showcase-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1));
    transition: width 0.4s ease;
}
.showcase-card:hover::after {
    width: 100%;
}

/* Project Stats */
.project-stat {
    background: rgba(99, 102, 241, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin: 0.25rem;
    display: inline-block;
    font-size: 0.875rem;
    color: #e2e8f0;
    transition: all 0.3s ease;
}
.project-stat:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

/* Preloader Enhancement */
#preloader { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1e293b 100%);
    z-index: 9999; display: flex; justify-content: center; align-items: center; 
    transition: opacity 0.5s ease, visibility 0.5s ease; 
}
#preloader.loaded { opacity: 0; visibility: hidden; }
       
.spinner { 
    width: 60px; height: 60px; 
    border: 4px solid var(--border-dark); 
    border-top: 4px solid var(--accent-primary); 
    border-radius: 50%; 
    animation: spin 1s linear infinite, pulse-glow 2s ease-in-out infinite; 
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Parallax Background Elements */
.bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}
.shape {
    position: absolute;
    opacity: 0.1;
    animation: float 20s ease-in-out infinite;
}
.shape:nth-child(1) { top: 10%; left: 10%; width: 100px; height: 100px; background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary)); border-radius: 50%; animation-delay: 0s; }
.shape:nth-child(2) { top: 70%; right: 15%; width: 150px; height: 150px; background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary)); border-radius: 30%; animation-delay: 2s; }
.shape:nth-child(3) { top: 40%; left: 70%; width: 80px; height: 80px; background: linear-gradient(90deg, var(--accent-primary), transparent); border-radius: 20%; animation-delay: 4s; }

/* Enhanced Form Styling */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}
.form-input {
    width: 100%; padding: 1rem 1rem 1rem 3rem; background: rgba(255, 255, 255, 0.8); color: var(--text-darker);
    border-radius: 0.75rem; border: 2px solid var(--border-light); transition: all 0.3s ease; backdrop-filter: blur(5px);
}
.form-input:focus {
    outline: none; border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2); transform: translateY(-2px);
}
.form-icon {
    position: absolute; left: 1rem; top: 50%;
    transform: translateY(-50%); color: var(--accent-primary); z-index: 10;
}
textarea.form-input {
    padding-top: 1rem;
}

/* Counter Animation */
.counter {
    font-size: 2.5rem; font-weight: bold;
    color: var(--accent-primary); font-family: 'Poppins', sans-serif;
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 4px;
    background: rgba(99, 102, 241, 0.2); z-index: 1000;
}
.scroll-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    width: 0%; transition: width 0.1s ease-out;
}

/* Mobile Friendliness & Horizontal Scrolling */
@media (max-width: 1023px) {

  .horizontal-scroll-container {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
  }

  .horizontal-scroll-container::-webkit-scrollbar {
    display: none;
  }
  
  .horizontal-scroll-container > div {
    display: flex;
    gap: 1rem;
  }

  .horizontal-scroll-item {
    flex: 0 0 80%;
    max-width: 350px;
    scroll-snap-align: start;
  }
  
  .services-grid-mobile {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.5rem 1.5rem;
    margin: 0 -1.5rem;
  }
  
  .services-grid-mobile::-webkit-scrollbar {
    display: none;
  }
  
  .services-grid-mobile > .bento-card {
    flex: 0 0 280px;
    width: 280px;
    height: auto;
  }
  
  .services-grid-mobile > .bento-card.lg\:col-span-2 {
     flex: 0 0 320px;
     width: 320px;
  }

  .showcase-card:hover {
    transform: scale(1.02);
  }
}

/* --- Partner Logo Grid Styles --- */
.partner-logo-grid {
    display: none; /* Hidden on mobile by default */
}

.partner-logo-scroller {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 1.5rem;
    margin: 0 -1.5rem;
}

.partner-logo-scroller::-webkit-scrollbar {
    display: none;
}

.partner-logo-row {
    display: flex;
    gap: 1rem;
}

.partner-logo {
    flex: 0 0 120px; /* Fixed width for logos on mobile */
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease-in-out;
    filter: grayscale(100%);
}

.partner-logo:hover {
    filter: grayscale(0%);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.partner-logo img {
    max-width: 80%;
    max-height: 80%;
    height: auto;
    object-fit: contain;
}

.showcase-video {
    width: 100%;
    height: 100%;
    border-radius: 0.75rem; /* Match the container's rounded corners */
}

@media (min-width: 1024px) {
    .partner-logo-scroller {
        display: none; /* Hide scroller on desktop */
    }

    .partner-logo-grid {
        display: grid; /* Show grid on desktop */
        grid-template-columns: repeat(8, 1fr);
        gap: 1.5rem;
        align-items: stretch;
    }

    .partner-logo {
        width: 100%;
        aspect-ratio: 1 / 1;
        flex: auto; /* Reset flex properties */
    }
}