/* Base Styles with Smooth Scroll */
:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --accent: #f72585;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --gradient: linear-gradient(135deg, #4361ee, #3a0ca3);
    --gradient-alt: linear-gradient(135deg, #f72585, #7209b7);
    --glow-primary: 0 0 15px rgba(67, 97, 238, 0.6), 0 0 30px rgba(67, 97, 238, 0.4);
    --glow-accent: 0 0 15px rgba(247, 37, 133, 0.6), 0 0 30px rgba(247, 37, 133, 0.4);

    /* Light Theme Variables */
    --bg-color-light: #f8f9fa;
    --text-color-light: #1a1a2e;
    --card-bg-light: #ffffff;
    --navbar-bg-light: rgba(255, 255, 255, 0.85);
    --navbar-scrolled-bg-light: rgba(26, 26, 46, 0.95); /* Still dark on scroll */
    --border-color-light: rgba(0, 0, 0, 0.05);
    --shadow-light: rgba(0, 0, 0, 0.15);
    /* Testimonial Carousel Animation Speed Variables */
    --animation-duration: 60s; /* Default desktop speed */
    --animation-duration-mobile: 90s; /* Slower speed for mobile */
}

/* Dark Theme Variables */
html[data-theme='dark'] {
    --bg-color-light: #1a1a2e;
    --text-color-light: #f8f9fa;
    --card-bg-light: #2a2a4a;
    --navbar-bg-light: rgba(26, 26, 46, 0.9);
    --navbar-scrolled-bg-light: rgba(26, 26, 46, 0.98);
    --border-color-light: rgba(255, 255, 255, 0.1);
    --shadow-light: rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color-light);
    color: var(--text-color-light);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
    /* Custom Eye-Catching Cursor */
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="%234361ee" stroke="%234361ee" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right-circle"><circle cx="12" cy="12" r="10"></circle><polyline points="12 16 16 12 12 8"></polyline><line x1="8" y1="12" x2="16" y2="12"></line></svg>') 14 14, auto; /* Blue Arrow Circle */
}

a, button, .feature-card, .stat-item, .testimonial-item, .modal-close {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="%23f72585" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus-circle"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>') 16 16, pointer; /* Red Plus Circle */
}

/* Disable scroll on body when modal is open */
body.no-scroll {
    overflow: hidden;
}

::selection {
    background: var(--accent);
    color: white;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.loader {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite; /* More bouncy spin */
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color-light);
    transition: background 0.4s ease;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
    border: 3px solid var(--bg-color-light);
    transition: background 0.4s ease, border-color 0.4s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Floating Particles Background - Enhanced */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: var(--primary); /* Primary color for particles */
    border-radius: 50%;
    pointer-events: none;
    animation: float 8s ease-in-out infinite alternate, fadeOut 10s forwards, pulseParticle 3s infinite alternate; /* More complex animation */
    animation-fill-mode: both;
    opacity: 0.5; /* Initial opacity */
    box-shadow: 0 0 8px rgba(67, 97, 238, 0.7); /* Subtle glow */
    /* Performance: Hint to browser that these will animate */
    will-change: transform, opacity; 
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); }
    25% { transform: translateY(-30px) translateX(15px) scale(1.1); }
    50% { transform: translateY(30px) translateX(-15px) scale(0.9); }
    75% { transform: translateY(-15px) translateX(8px) scale(1.05); }
}

@keyframes fadeOut {
    0% { opacity: 0.5; }
    100% { opacity: 0; }
}

@keyframes pulseParticle {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 0.5; }
}

/* Navbar with Glass Morphism */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.5s ease;
    backdrop-filter: blur(15px); /* Stronger blur */
    -webkit-backdrop-filter: blur(15px);
    background: var(--navbar-bg-light); /* Dynamic background */
    box-shadow: 0 5px 30px var(--shadow-light); /* Stronger shadow */
    border-bottom: 1px solid var(--border-color-light); /* Subtle border */
    /* Performance: Hint to browser */
    will-change: padding, background, box-shadow;
}

nav.scrolled {
    padding: 5px 0;
    background: var(--navbar-scrolled-bg-light); /* Darker, more opaque when scrolled */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

nav.scrolled .logo,
nav.scrolled .nav-links a {
    color: white;
}

nav.scrolled .btn-outline {
    border-color: white;
    color: white;
}

nav.scrolled .btn-outline:hover {
    background: white;
    color: var(--dark);
}

.nav-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.9rem;
    font-weight: 900; /* Bolder logo */
    color: var(--primary);
      font-family: 'Black Ops One', cursive;
    text-decoration: none;
    
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(67, 97, 238, 0.3); /* Subtle text shadow */
}
.logo img {
    width: 180px; /* Adjusted size */
    height: auto; /* Adjusted size */
    transition: transform 0.3s ease, filter 0.3s ease; /* Smooth hover effect, added filter transition */
    filter: drop-shadow(4px 7px 14px black);
}

/* Apply invert filter to logo image in light mode when not scrolled */
html:not([data-theme='dark']) .logo img {
    filter: invert(1);
}

/* Remove invert filter when scrolled in light mode */
html:not([data-theme='dark']) nav.scrolled .logo img {
    filter: none;
}

.logo span {
    color: var(--accent);
      font-family: 'Black Ops One', cursive;
}

.logo i {
    margin-right: 10px;
    font-size: 1.6rem;
    animation: rotateIcon 4s linear infinite; /* Rotating icon */
    /* Performance: Hint to browser */
    will-change: transform;
}
@keyframes rotateIcon {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color-light); /* Dynamic text color */
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0; /* Add padding for a larger hit area */
}

/* Enhanced Active Link Indicator */
.nav-links a.active::after,
.nav-links a:hover::after {
    content: '';
    position: absolute;
    bottom: -8px; /* Slightly lower */
    left: 50%;
    width: 0;
    height: 3px; /* Thicker */
    background: var(--accent);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
    /* Performance: Hint to browser */
    will-change: width, transform;
}
.nav-links a.active::after {
    width: 100%; /* Always full width when active */
}
.nav-links a:hover::after {
    width: 100%;
}

.btn-outline {
    display: inline-block;
    padding: 12px 28px; /* Slightly larger padding */
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700; /* Bolder text */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    z-index: 1;
    /* Performance: Hint to browser */
    will-change: background, color, transform, box-shadow;
}
.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    transition: 0.5s ease-in-out;
    z-index: -1;
    /* Performance: Hint to browser */
    will-change: left;
}
.btn-outline:hover::before {
    left: 0;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.4); /* Stronger shadow */
    border-color: var(--primary); /* Keep border color */
}

.hamburger {
    font-size: 1.8rem; /* Larger hamburger */
    cursor: pointer;
    display: none;
    color: var(--text-color-light); /* Dynamic color */
    transition: all 0.3s ease;
    z-index: 1001; /* Ensure it's above the mobile nav */
}
.hamburger.active {
    color: white; /* Color when active (for dark mobile nav) */
}

/* Dark/Light Mode Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    margin-left: 20px; /* Space from Get Started button */
}

.theme-toggle input[type="checkbox"] {
    display: none;
}

.theme-toggle label {
    width: 55px;
    height: 28px;
    background-color: var(--primary);
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
    /* Performance: Hint to browser */
    will-change: background-color;
}

.theme-toggle label::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    /* Performance: Hint to browser */
    will-change: transform, background-color;
}

.theme-toggle input[type="checkbox"]:checked + label {
    background-color: var(--accent); /* Accent for dark mode toggle */
}

.theme-toggle input[type="checkbox"]:checked + label::before {
    transform: translateX(27px); /* Move to the right */
    background-color: #ffe082; /* Yellow for moon */
}

.theme-toggle .icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    transition: opacity 0.3s ease;
    /* Performance: Hint to browser */
    will-change: opacity;
}

.theme-toggle .sun-icon {
    left: 8px;
    color: white;
    opacity: 1;
}

.theme-toggle .moon-icon {
    right: 8px;
    color: var(--dark); /* Dark moon icon */
    opacity: 0;
}

.theme-toggle input[type="checkbox"]:checked ~ .sun-icon {
    opacity: 0;
}

.theme-toggle input[type="checkbox"]:checked ~ .moon-icon {
    opacity: 1;
}


/* Hero Section with Enhanced Animations */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px; /* Adjust for fixed nav */
}

.hero::before, .hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(120px); /* More blur */
    opacity: 0.25; /* Slightly more opaque */
    z-index: -1;
    animation: float 8s ease-in-out infinite alternate;
    /* Performance: Hint to browser */
    will-change: transform, opacity;
}

.hero::before {
    bottom: -100px; /* Larger */
    left: -100px;
    width: 400px;
    height: 400px;
    background: var(--accent);
    animation-delay: 0s;
}

.hero::after {
    top: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: var(--primary);
    animation-delay: 2s; /* Staggered animation */
    animation-direction: alternate-reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

.hero-content {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.hero-text {
    flex: 1;
    padding-right: 50px;
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 1s ease forwards 0.5s; /* Specific animation name */
    min-width: 300px; /* Ensure text takes enough space */
    /* Performance: Hint to browser */
    will-change: transform, opacity;
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.hero-image {
    flex: 1;
    position: relative;
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 1s ease forwards 0.5s; /* Specific animation name */
    min-width: 300px; /* Ensure image takes enough space */
    display: flex;
    justify-content: center; /* Center image horizontally */
    /* Performance: Hint to browser */
    will-change: transform, opacity;
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 3.8rem); /* Responsive font size */
    font-weight: 900;
    margin-bottom: 25px; /* More space */
    line-height: 1.2;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    /* Make sure text has a color fallback, or isn't completely transparent without stroke */
    color: var(--primary); /* Fallback color, will be overridden by gradient if clipping works */
    -webkit-text-stroke: 1px var(--primary); /* Always visible stroke */
    display: inline-block; /* Required for transform on children */
    transition: all 0.3s ease; /* Smooth transition for hover effects */
    /* Performance: Hint to browser */
    will-change: text-stroke-width, color;
}
/* For dark mode, make text stroke white/light */
html[data-theme='dark'] .hero-text h1 {
    -webkit-text-stroke: 1px var(--light);
}
.hero-text h1:hover {
    /* Adjust for thicker stroke on hover */
    -webkit-text-stroke: 2px var(--primary); 
}
html[data-theme='dark'] .hero-text h1:hover {
    -webkit-text-stroke: 2px var(--light);
}
/* New animation for individual words/spans in h1 */
.hero-text h1 span {
    display: inline-block; /* Essential for transform to work on individual words */
    opacity: 0;
    transform: translateY(20px);
    animation: textWaveIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    animation-delay: var(--delay); /* Use custom property for staggered delay */
}
@keyframes textWaveIn {
    0% { opacity: 0.2; transform: translateY(20px); } /* Start slightly visible and offset */
    100% { opacity: 1; transform: translateY(0); }
}


.hero-text p {
    font-size: clamp(1rem, 2vw, 1.25rem); /* Responsive font size */
    margin-bottom: 40px; /* More space */
    color: var(--text-color-light); /* Dynamic color */
    opacity: 0;
    animation: fadeIn 1s ease forwards 1s; /* Delayed fade in */
    /* Performance: Hint to browser */
    will-change: opacity;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.btn-group {
    display: flex;
    gap: 25px; /* More space */
    opacity: 0;
    animation: fadeIn 1s ease forwards 1.2s; /* Delayed fade in */
    /* Performance: Hint to browser */
    will-change: opacity;
}

.btn-primary {
    display: inline-block;
    padding: 16px 38px; /* Larger buttons */
    background: var(--gradient);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 12px 25px rgba(67, 97, 238, 0.4); /* Stronger shadow */
    position: relative;
    overflow: hidden;
    z-index: 1;
    /* Performance: Hint to browser */
    will-change: transform, box-shadow, filter;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%; /* Start further left */
    width: 50%; /* Wider shimmer */
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); /* Stronger shimmer */
    transition: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smoother shimmer */
    transform: skewX(-20deg); /* Slanted shimmer */
    z-index: -1;
    /* Performance: Hint to browser */
    will-change: left, transform;
}

.btn-primary:hover::before {
    left: 120%; /* End further right */
}

.btn-primary:hover {
    transform: translateY(-8px); /* Deeper lift */
    box-shadow: 0 20px 40px rgba(67, 97, 238, 0.5); /* Even stronger shadow */
    filter: brightness(1.1); /* Subtle glow */
}

.btn-secondary {
    display: inline-block;
    padding: 16px 38px;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    /* Performance: Hint to browser */
    will-change: color, transform, box-shadow;
}
.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease-out;
    z-index: -1;
    /* Performance: Hint to browser */
    will-change: transform;
}
.btn-secondary:hover::before {
    transform: scaleX(1);
}

.btn-secondary:hover {
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
}

.hero-image img {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 20px;
    filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.15)); /* Stronger shadow */
    transform-style: preserve-3d;
    /* Initial 3D transform */
    transform: perspective(1200px) rotateY(-18deg) rotateX(12deg); 
    /* Soft floating animation */
    animation: softFloat 4s ease-in-out infinite alternate;
    /* Performance: Hint to browser */
    will-change: transform;
}

/* Removed hover effect from hero-image img */
/* .hero-image:hover img {
    transform: perspective(1200px) rotateY(0deg) rotateX(0deg) scale(1.03); 
} */

/* New keyframes for soft floating animation */
@keyframes softFloat {
    0% {
        transform: perspective(1200px) rotateY(-18deg) rotateX(12deg) translateY(0px);
    }
    50% {
        transform: perspective(1200px) rotateY(-18deg) rotateX(12deg) translateY(-10px);
    }
    100% {
        transform: perspective(1200px) rotateY(-18deg) rotateX(12deg) translateY(0px);
    }
}

.hero-image::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 250px;
    height: 250px;
    background: var(--gradient);
    border-radius: 50%;
    z-index: -1;
    animation: pulse 4s ease infinite alternate; /* Alternate direction */
    filter: blur(80px); /* Added blur */
    /* Performance: Hint to browser */
    will-change: transform, opacity, filter;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 0.4; }
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary); /* Primary color */
    font-size: 1.8rem; /* Larger icon */
    animation: bounce 2s infinite cubic-bezier(0.28, 0.84, 0.42, 1); /* More exaggerated bounce */
    cursor: pointer;
    z-index: 10;
    text-shadow: 0 0 10px rgba(67, 97, 238, 0.3); /* Subtle glow */
    /* Performance: Hint to browser */
    will-change: transform;
}

/* Features Section with Animated Cards & Asymmetrical Layout */
.features {
    padding: 120px 0; /* More padding */
    background: var(--bg-color-light); /* Dynamic background */
    position: relative;
    transition: background-color 0.4s ease;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px; /* Taller gradient */
    background: linear-gradient(to bottom, var(--bg-color-light) 0%, rgba(248, 249, 250, 0) 100%); /* Dynamic background for fading */
    z-index: 1;
    transition: background 0.4s ease;
    /* Performance: Hint to browser */
    will-change: background;
}

.section-title {
    text-align: center;
    margin-bottom: 80px; /* More space */
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Performance: Hint to browser */
    will-change: transform, opacity;
}
.section-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title h2 {
    font-size: clamp(2rem, 4vw, 3rem); /* Responsive font size */
    font-weight: 900;
    margin-bottom: 25px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

.section-title p {
    font-size: clamp(1rem, 1.8vw, 1.2rem); /* Responsive font size */
    color: var(--text-color-light); /* Dynamic color */
    max-width: 800px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px; /* More space */
    position: relative;
    z-index: 2;
    /* Removed asymmetrical margins to make cards same size */
}

.feature-card {
    background: var(--card-bg-light); /* Dynamic background */
    border-radius: 25px; /* More rounded */
    padding: 45px 35px; /* More padding */
    box-shadow: 0 20px 40px var(--shadow-light); /* Stronger shadow */
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.5s ease, background-color 0.4s ease; /* More specific transition */
    position: relative;
    overflow: hidden;
    z-index: 1;
    opacity: 0;
    transform: translateY(50px);
    /* Performance: Hint to browser */
    will-change: transform, opacity, box-shadow, background-color; 
    display: flex; /* Use flex to align content, especially for variable text length */
    flex-direction: column;
    justify-content: space-between; /* Push Learn more to bottom */
    border: 1px solid var(--border-color-light);
}
.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 8px; /* Thicker border */
    height: 0;
    background: var(--gradient);
    transition: height 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: -1;
    /* Performance: Hint to browser */
    will-change: height;
}

.feature-card:hover::before {
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-15px) scale(1.02); /* Deeper lift and slight scale */
    box-shadow: 0 30px 60px var(--shadow-light); /* Even stronger shadow */
}

.feature-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.15), rgba(67, 97, 238, 0.25)); /* Stronger gradient */
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 35px;
    font-size: 2.2rem; /* Larger icon */
    color: var(--primary);
    transition: transform 0.5s ease, background 0.5s ease, color 0.5s ease, box-shadow 0.5s ease; /* More specific transition */
    box-shadow: inset 0 0 15px rgba(67, 97, 238, 0.2); /* Inner shadow */
    /* Performance: Hint to browser */
    will-change: background, color, transform, box-shadow;
}

.feature-card:hover .feature-icon {
    background: var(--primary); /* Solid primary on hover */
    color: white; /* White icon */
    transform: rotateY(360deg); /* Full spin */
    box-shadow: var(--glow-primary); /* Glow effect */
}

.feature-card h3 {
    font-size: 1.6rem; /* Larger font */
    margin-bottom: 18px;
    font-weight: 800; /* Bolder */
    color: var(--text-color-light); /* Dynamic color */
}

.feature-card p {
    color: var(--text-color-light); /* Dynamic color */
    opacity: 0.8;
    margin-bottom: 25px;
    flex-grow: 1; /* Allow paragraph to take up available space */
}

.feature-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease; /* More specific transition */
}

.feature-link i {
    margin-left: 8px;
    transition: transform 0.3s ease;
    /* Performance: Hint to browser */
    will-change: transform;
}

.feature-link:hover {
    color: var(--secondary);
    text-shadow: 0 0 5px rgba(67, 97, 238, 0.2); /* Subtle glow */
}

.feature-link:hover i {
    transform: translateX(8px);
}

/* Statistics Section with Count Animation */
.statistics {
    padding: 120px 0;
    background: var(--bg-color-light); /* Dynamic background */
    position: relative;
    text-align: center;
    transition: background-color 0.4s ease;
}

.statistics::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to top, var(--bg-color-light) 0%, rgba(255, 255, 255, 0) 100%); /* Dynamic background for fading */
    z-index: 1;
    transition: background 0.4s ease;
    /* Performance: Hint to browser */
    will-change: background;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Slightly larger min */
    gap: 40px;
    margin-top: 60px;
}

.stat-item {
    background: var(--card-bg-light); /* Dynamic background */
    border-radius: 25px;
    padding: 45px;
    box-shadow: 0 20px 40px var(--shadow-light);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease; /* More specific transition */
    transform: translateY(50px);
    opacity: 0;
    /* Performance: Hint to browser */
    will-change: transform, opacity, box-shadow, background-color;
    border: 1px solid var(--border-color-light);
}
.stat-item.animated {
    transform: translateY(0);
    opacity: 1;
}
.stat-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px var(--shadow-light);
}

.stat-icon {
    font-size: 3.5rem; /* Larger icon */
    color: var(--accent);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 8px rgba(247, 37, 133, 0.4)); /* Glow effect */
}

.stat-number {
    font-size: 4rem; /* Larger number */
    font-weight: 900;
    background: var(--gradient-alt);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    margin-bottom: 15px;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

.stat-title {
    font-size: 1.3rem; /* Slightly larger title */
    font-weight: 700;
    color: var(--text-color-light); /* Dynamic color */
    opacity: 0.9;
}

/* Testimonials Section with Enhanced 3D Carousel */
.testimonials {
    padding: 120px 0;
    background: var(--bg-color-light); /* Dynamic background */
    position: relative;
    overflow: hidden; /* Important for horizontal scrolling sections */
    transition: background-color 0.4s ease;
}

.testimonials::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to bottom, var(--bg-color-light) 0%, rgba(255, 255, 255, 0) 100%); /* Dynamic background for fading */
    z-index: 1;
    transition: background 0.4s ease;
    /* Performance: Hint to browser */
    will-change: background;
}

.testimonial-carousel-wrapper {
    position: relative;
    width: 100%; /* Changed to 100% to fill container */
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden; /* Essential to clip carousel items outside wrapper */
    padding: 30px 0; /* More padding */
    perspective: 1500px; /* For 3D effect */
}

.testimonial-carousel {
    display: flex;
    width: fit-content; /* THIS IS KEY: Allows the flex container to be as wide as its content */
    animation: scrollTestimonials var(--animation-duration) linear infinite;
    padding-bottom: 20px;
    transform-style: preserve-3d;
    /* Performance: Hint to browser */
    will-change: transform;
}

.testimonial-carousel:hover {
    animation-play-state: paused;
}

.testimonial-item {
    flex: 0 0 auto;
    /* CHANGED FOR RESPONSIVENESS */
    width: clamp(280px, 80vw, 380px); /* Responsive width: min 280px, 80% viewport, max 380px */
    margin-right: 30px; /* Slightly reduced margin */
    background: var(--card-bg-light); /* Dynamic background */
    border-radius: 25px;
    padding: 45px;
    box-shadow: 0 25px 50px var(--shadow-light); /* Stronger shadow */
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, background-color 0.4s ease;
    transform: rotateY(0deg) scale(1); /* Initial 3D state */
    border: 1px solid var(--border-color-light);
    /* Performance: Hint to browser */
    will-change: transform, box-shadow, background-color;
}

.testimonial-item:hover {
    transform: translateY(-15px) scale(1.03) rotateY(5deg); /* Lift, scale, and subtle 3D rotate */
    box-shadow: 0 35px 70px var(--shadow-light);
}

.testimonial-content::before {
    content: '\201C';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 6rem; /* Larger quote marks */
    color: rgba(67, 97, 238, 0.1);
    font-family: 'Georgia', serif;
    line-height: 1;
    z-index: 0;
}

.testimonial-content::after {
    content: '\201D';
    position: absolute;
    bottom: -15px;
    right: 15px;
    font-size: 6rem;
    color: rgba(67, 97, 238, 0.1);
    font-family: 'Georgia', serif;
    line-height: 1;
    z-index: 0;
}

/* New CSS for Initials Avatar */
.testimonial-icon-avatar {
    width: 90px; /* Larger avatar */
    height: 90px;
    border-radius: 50%;
    background-color: var(--primary); /* Use primary color for background */
    color: white; /* White text for icon */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 3.5rem; /* Larger icon size */
    border: 6px solid var(--accent); /* Accent border */
    box-shadow: 0 0 15px rgba(247, 37, 133, 0.3); /* Subtle glow */
}
/* End New CSS for Initials Avatar */

.testimonial-text {
    font-size: 1.15rem; /* Slightly larger text */
    font-style: italic;
    color: var(--text-color-light); /* Dynamic color */
    opacity: 0.9;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

.testimonial-author {
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-color-light); /* Dynamic color */
    font-size: 1.3rem;
}

.testimonial-role {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 25px;
}

.testimonial-rating {
    color: #f59e0b;
    font-size: 1.3rem;
    filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.4)); /* Star glow */
}

/* Keyframe for continuous scrolling */
@keyframes scrollTestimonials {
    0% { transform: translateX(0); }
    100% { transform: translateX(var(--total-cloned-width)); } /* JS will pass negative value here */
}

/* CTA Section with Animated Background */
.cta {
    padding: 180px 0; /* More padding */
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(58, 12, 163, 0.5)), url('https://images.unsplash.com/photo-1523240795612-9a054b0db644?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80') no-repeat center center/cover;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-attachment: fixed; /* Parallax background */
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    z-index: 1;
    animation: pulseBackground 15s infinite alternate;
    filter: blur(2px); /* Subtle blur for background */
    /* Performance: Hint to browser */
    will-change: transform, filter;
}

@keyframes pulseBackground {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 900px; /* Wider content area */
    margin: 0 auto;
    opacity: 0;
    transform: translateY(50px);
    transition: transform 0.8s ease-out, opacity 0.8s ease-out; /* More specific transition */
    /* Performance: Hint to browser */
    will-change: transform, opacity;
}
.cta-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.cta h2 {
    font-size: clamp(2rem, 4vw, 3.2rem); /* Responsive font size */
    font-weight: 900;
    margin-bottom: 25px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.cta p {
    font-size: clamp(1rem, 2vw, 1.3rem); /* Responsive font size */
    margin-bottom: 50px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 30px; /* More space */
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-block;
    padding: 18px 40px; /* Larger buttons */
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    z-index: 1;
    /* Performance: Hint to browser */
    will-change: transform, box-shadow, background, color;
}

.cta-btn-primary {
    background: white;
    color: var(--primary);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.cta-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(67,97,238,0.1), transparent);
    transition: 0.5s ease-in-out;
    z-index: -1;
    /* Performance: Hint to browser */
    will-change: left;
}
.cta-btn-primary:hover::before {
    left: 100%;
}

.cta-btn-primary:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.cta-btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}
.cta-btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease-out;
    z-index: -1;
    /* Performance: Hint to browser */
    will-change: transform;
}
.cta-btn-secondary:hover::before {
    transform: scaleX(1);
}

.cta-btn-secondary:hover {
    color: var(--primary);
    transform: translateY(-5px);
}

/* Footer with Improved Wave Effect */
.footer {
    background: var(--dark);
    color: white;
    position: relative;
    padding-top: 120px; /* More padding */
}

/* Improved wave effect using clip-path */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px; /* Adjust height as needed */
    background: var(--bg-color-light); /* Matches body background for a seamless transition */
    clip-path: ellipse(150% 100% at 50% 0%); /* Creates a smooth wave from top */
    transform: translateY(-50%); /* Adjust to position the wave correctly */
    z-index: 1;
    transition: background 0.4s ease;
}


.footer-content {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Slightly larger min */
    gap: 50px; /* More space */
    position: relative;
    z-index: 2;
}

.footer-col h3 {
    font-size: 1.6rem; /* Larger font */
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    text-shadow: 0 0 5px rgba(255,255,255,0.1);
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: -12px; /* Slightly lower */
    left: 0;
    width: 60px; /* Wider underline */
    height: 4px; /* Thicker */
    background: var(--accent);
    border-radius: 2px;
}

.footer-col p {
    margin-bottom: 25px;
    opacity: 0.85;
    line-height: 1.8; /* More readable line-height */
}

.social-links {
    display: flex;
    gap: 20px; /* More space */
    margin-top: 25px;
}

.social-link {
    width: 45px; /* Larger icons */
    height: 45px;
    background: rgba(255, 255, 255, 0.15); /* More visible background */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem; /* Larger icon */
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease; /* More specific transition */
    box-shadow: 0 0 8px rgba(255,255,255,0.1);
    /* Performance: Hint to browser */
    will-change: transform, background, box-shadow;
}

.social-link:hover {
    background: var(--accent);
    transform: translateY(-7px) scale(1.1); /* Deeper lift and scale */
    box-shadow: var(--glow-accent); /* Glow effect */
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 18px; /* More space */
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9); /* More visible text */
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease; /* More specific transition */
    display: flex;
    align-items: center;
    font-weight: 500;
    /* Performance: Hint to browser */
    will-change: color, transform;
}

.footer-links a:hover {
    color: white;
    transform: translateX(8px); /* Deeper slide */
}

.footer-links i {
    margin-right: 12px;
    color: var(--accent);
    font-size: 0.9rem; /* Slightly smaller icon to match text */
}

.contact-info {
    list-style: none;
}

.contact-info li {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    line-height: 1.6;
}

.contact-info i {
    margin-right: 18px;
    color: var(--accent);
    margin-top: 3px;
    font-size: 1.1rem;
}

.copyright {
    text-align: center;
    padding: 35px 0; /* More padding */
    margin-top: 70px; /* More space */
    border-top: 1px solid rgba(255, 255, 255, 0.15); /* More visible border */
    opacity: 0.8;
    font-size: 1rem;
    position: relative;
    z-index: 2;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 40px; /* Lower */
    right: 40px;
    width: 55px; /* Larger */
    height: 55px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem; /* Larger icon */
    box-shadow: 0 12px 25px rgba(67, 97, 238, 0.4);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, visibility 0.3s ease, box-shadow 0.3s ease; /* More specific transition */
    z-index: 999;
    /* Performance: Hint to browser */
    will-change: transform, opacity, box-shadow;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(-5px); /* Subtle lift */
}

.back-to-top:hover {
    transform: translateY(-10px) scale(1.1); /* Deeper lift and scale */
    box-shadow: 0 20px 40px rgba(67, 97, 238, 0.5);
    filter: brightness(1.2);
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    backdrop-filter: blur(8px); /* Blur effect */
    -webkit-backdrop-filter: blur(8px);
    display: flex; /* Use flex for centering */
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--card-bg-light); /* Dynamic background */
    margin: auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 10px 30px var(--shadow-light);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.4s ease;
    border: 1px solid var(--border-color-light);
    /* Performance: Hint to browser */
    will-change: transform, background-color;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color-light);
    padding-bottom: 15px;
}

.modal-header h3 {
    font-size: 2rem;
    color: var(--primary);
    margin: 0;
}

.modal-body p {
    font-size: 1.1rem;
    color: var(--text-color-light); /* Dynamic color */
    opacity: 0.9;
    line-height: 1.8;
}

.modal-close {
    color: var(--text-color-light); /* Dynamic color */
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--accent);
}


/* About Section */
.about-section {
    padding: 120px 0;
    background: var(--bg-color-light);
    transition: background-color 0.4s ease;
}

.about-container {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 60px;
}

.about-image {
    flex: 1;
    min-width: 300px; /* Ensure image doesn't get too small */
    text-align: center;
}

.about-image img {
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.about-image img:hover {
    transform: translateY(-10px) scale(1.02);
}

.about-content {
    flex: 2;
    min-width: 300px;
}

.about-content h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-color-light);
}

.about-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color-light-secondary);
    margin-bottom: 20px;
}

.about-features {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.about-features li {
    font-size: 1.1rem;
    color: var(--text-color-light);
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.about-features li i {
    color: var(--primary);
    margin-right: 15px;
    font-size: 1.4rem;
    transform: translateY(2px);
}



/* Approved By & Partners Sections */
.logo-section {
    padding: 80px 0;
    background: var(--bg-color-light);
    position: relative;
    overflow: hidden;
    transition: background-color 0.4s ease;
}

.logo-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to bottom, var(--bg-color-light) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
    transition: background 0.4s ease;
}

.logo-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 1320px;
    margin: 40px auto 0;
    overflow: hidden;
    /* Changed to flex for static display */
    display: flex; 
    justify-content: center; /* Center the logos */
    align-items: center;
    flex-wrap: wrap; /* Allow logos to wrap on smaller screens */
}

.logo-carousel {
    display: flex;
    width: fit-content;
    /* Removed animation property */
    padding: 20px 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

/* Removed .logo-carousel:hover animation-play-state */

.logo-item {
    flex: 0 0 auto;
    margin: 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.logo-item img {
    max-width: 180px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.logo-item:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* Removed @keyframes scrollLogos */

@media (max-width: 768px) {
    .logo-item {
        margin: 0 20px;
    }
    
    .logo-item img {
        max-width: 120px;
    }
    
    /* Removed .logo-carousel animation for mobile */
}


/* Responsive Design */
@media (max-width: 992px) {
    .nav-container {
        padding: 0 20px; /* Add horizontal padding for smaller screens */
    }
    .logo img {
        max-width: 120px; /* Smaller logo on tablets */
        height: auto; /* Maintain aspect ratio */
    }
    .hero {
        height: auto; /* Allow hero section to adjust height */
        padding-top: 100px; /* More padding for mobile */
        padding-bottom: 60px; /* Add bottom padding */
    }
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text {
        padding-right: 0;
        margin-bottom: 60px;
    }
    
    .btn-group {
        justify-content: center;
    }
    
    .hero-image {
        margin-top: 60px;
    }
    
    /* Testimonial carousel speed on tablets */
    .testimonial-carousel {
        animation: scrollTestimonials var(--animation-duration-mobile) linear infinite;
    }
    
    .testimonial-carousel-wrapper {
        max-width: 90%;
    }

    .section-title h2 {
        font-size: clamp(2rem, 4vw, 2.5rem);
    }
    .hero-text h1 {
        font-size: clamp(2.5rem, 5vw, 3rem);
    }
    .cta h2 {
        font-size: clamp(2rem, 4vw, 2.5rem);
    }
    .footer::before {
         clip-path: ellipse(180% 100% at 50% 0%); /* Adjust wave for smaller screens */
    }
    .theme-toggle {
        margin-left: 15px; /* Adjust spacing */
    }
}

@media (max-width: 768px) {
    body {
        cursor: auto; /* Revert cursor on smaller screens for better usability */
    }

    .nav-links {
        position: fixed;
        top: 0; /* Full height from top */
        left: -100%;
        width: 100%;
        height: 100vh; /* Full viewport height */
        background: var(--dark); /* Dark overlay */
        flex-direction: column;
        justify-content: center; /* Center items vertically */
        align-items: center;
        padding-top: 0; /* Remove top padding */
        transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); /* Bouncy transition */
        box-shadow: inset 0 10px 20px rgba(0,0,0,0.3); /* Inner shadow for menu */
        z-index: 999; /* Ensure it's below hamburger but above other content */
        /* Performance: Hint to browser */
        will-change: left;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 25px 0; /* More space */
    }
    
    .nav-links a {
        color: white;
        font-size: 1.5rem; /* Much larger menu links */
        font-weight: 700;
    }

    .nav-links a::after {
        background: var(--accent); /* Ensure active indicator is visible on dark menu */
    }
    
    .hamburger {
        display: block;
        position: relative; /* Keep it in flow */
        z-index: 1001; /* Above mobile nav */
    }
    
    .btn-outline, .theme-toggle {
        display: none; /* Hide these on mobile navbar, could add to mobile menu if desired */
    }

    /* For mobile menu, display the theme toggle inside if desired */
    .nav-links.active + .btn-outline {
        display: none; /* Make sure it's hidden */
    }
    .nav-links.active .theme-toggle-mobile {
        display: flex; /* Show a mobile-specific toggle if needed */
        margin-top: 30px;
    }

    .hero-text h1 {
        font-size: clamp(2.2rem, 6vw, 2.8rem);
    }
    
    .section-title h2 {
        font-size: clamp(1.8rem, 5vw, 2.2rem);
    }
    
    .cta h2 {
        font-size: clamp(1.8rem, 5vw, 2.2rem);
    }

    /* REMOVED THIS: Now handled by --animation-duration-mobile in root, and JS switching it */
    /* .testimonial-carousel {
        animation: scrollTestimonials 60s linear infinite; 
    } */
}

.dashboard-link {
    display: none; /* Hide dashboard link by default */
}
@media (max-width: 768px) {
    .dashboard-link {
        display: block; /* Show dashboard link on mobile */
    }
}

@media (max-width: 576px) {
    
    .about-image img {display: none};
    .hero-text h1 {
        font-size: clamp(1.8rem, 7vw, 2.3rem);
    }
    
    .btn-group {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary {
        width: 90%; /* Wider buttons */
        max-width: 300px;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .cta-btn {
        width: 90%;
        max-width: 300px;
        text-align: center;
    }

    .testimonial-item {
        /* Already handled by clamp, but you can be more specific if needed */
        width: clamp(250px, 90vw, 380px); /* Even tighter on very small screens */
        margin-right: 20px; /* Reduced margin for smaller screens */
    }
    .testimonial-carousel {
        padding: 0 15px; /* Add some padding to see left/right cards slightly */
    }

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

    .modal-content {
        padding: 25px;
    }

    .modal-header h3 {
        font-size: 1.5rem;
    }

    .modal-close {
        font-size: 2rem;
    }
}
