/* Modern CSS Reset & Variables */
:root {
    --bg-light: #ffffff;
    --surface-light: #f1f5f9;
    --surface-glass: rgba(255, 255, 255, 0.95);
    --primary-color: #4a148c; /* Deep purple */
    --primary-glow: rgba(74, 20, 140, 0.2);
    --secondary-color: #0284c7; /* Blue accent */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: rgba(0, 0, 0, 0.05);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-light);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 6rem 0;
}

/* Typography Enhancements */
.gradient-text {
    background: linear-gradient(135deg, var(--text-primary), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-center { text-align: center; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-medium);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    z-index: -2;
}

.btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: all var(--transition-medium);
    border-radius: 50px;
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline::before {
    background-color: var(--primary-color);
}

.btn-outline:hover {
    color: #fff;
    box-shadow: 0 4px 15px rgba(74, 20, 140, 0.1);
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-medium);
    padding: 1rem 0;
}

header.scrolled {
    background-color: var(--surface-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 45px;
    width: auto;
    mix-blend-mode: multiply;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.logo-text-light {
    font-weight: 400;
    color: var(--text-secondary);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a:not(.btn) {
    font-weight: 500;
    position: relative;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width var(--transition-fast);
}

.nav-links a:not(.btn):hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition-fast);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero-image-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(74, 20, 140, 0.95), rgba(2, 132, 199, 0.85)); /* Brand color overlay */
}

.hero-svg-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.wave-path {
    animation: waveMotion 15s ease-in-out infinite alternate;
    transform-origin: bottom center;
}

.delay-wave {
    animation-duration: 20s;
    animation-delay: -5s;
    opacity: 0.7;
}

.blob-animation {
    animation: blobFloat 25s infinite ease-in-out alternate;
    transform-origin: center;
}

.blob-2 { animation-duration: 30s; animation-delay: -10s; }
.blob-3 { animation-duration: 20s; animation-delay: -15s; }

@keyframes waveMotion {
    0% { transform: scaleY(1) translateY(0); }
    50% { transform: scaleY(1.1) translateY(-5%); }
    100% { transform: scaleY(0.9) translateY(5%); }
}

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

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

.hero-content h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--text-primary), var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* Client Marquee Runner */
.client-runner {
    background-color: var(--surface-light);
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.runner-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.runner-track {
    display: flex;
    gap: 4rem;
    align-items: center;
    width: max-content;
    animation: scroll 30s linear infinite;
}

.runner-track:hover {
    animation-play-state: paused;
}

.client-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all var(--transition-fast);
}

.client-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 2rem)); }
}

/* Glassmorphism Cards */
.glass-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* About Section */
.section-header {
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

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

.icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(108,43,217,0.2), rgba(0,210,255,0.1));
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.about-card p {
    color: var(--text-secondary);
}

/* Services Section */
.dark-surface {
    background-color: var(--surface-light);
}

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

.service-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: all var(--transition-medium);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    z-index: -1;
    transition: opacity var(--transition-medium);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: transparent;
}

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

.service-icon {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

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

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

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

.service-list li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.service-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

/* Products Section */
.projects-carousel {
    display: flex;
    overflow-x: auto;
    gap: 2rem;
    padding: 2rem 1rem;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    align-items: stretch; /* Make all cards equal height */
}

/* Carousel Container and Buttons */
.carousel-container {
    position: relative;
    max-width: 1300px;
    margin: 0 auto;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(74, 20, 140, 0.2);
    color: var(--primary-color);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.left-btn {
    left: -20px;
}

.carousel-btn.right-btn {
    right: -20px;
}

/* Beautiful custom scrollbar for carousel */
.projects-carousel::-webkit-scrollbar {
    height: 8px;
}

.projects-carousel::-webkit-scrollbar-track {
    background: rgba(74, 20, 140, 0.05);
    border-radius: 10px;
}

.projects-carousel::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.projects-carousel::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.carousel-item {
    flex: 0 0 350px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
}

.carousel-item .product-info {
    flex-grow: 1; /* Make the info take remaining space */
}

/* Infrastructure Section */
.infra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.infra-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.infra-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.infra-card p {
    color: var(--text-secondary);
}

.product-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.product-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.product-item p {
    color: var(--text-secondary);
}

/* Footer */
footer {
    background-color: #f1f5f9;
    padding-top: 5rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    height: 40px;
    margin-bottom: 1.5rem;
}

.iso-badge {
    margin-top: 1rem;
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 500;
}

.footer-links h4, .footer-contact h4 {
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
}

.footer-links a {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-contact p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
    color: var(--text-primary);
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
}

.footer-bottom {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Scroll Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* Responsive */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--surface-light);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-out;
    }
    
    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* =========================================
   Mobile Optimization & Media Queries
   ========================================= */
@media screen and (max-width: 992px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .partnership-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }
}

@media screen and (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content .subtitle {
        font-size: 1.1rem;
    }
    
    .section-padding {
        padding: 4rem 0;
    }
    
    .hero-section {
        padding: 120px 0 60px;
    }
    
    .carousel-btn {
        display: none; /* Hide custom arrows on very small screens, let them swipe natively */
    }
    
    .carousel-item {
        flex: 0 0 280px; /* Smaller cards on mobile */
    }
}
