/* --- Basic Reset & Global Styles --- */
:root {
    /* Light Theme Colors */
    --primary-color: #5D3FD3;
    /* Enhanced violet */
    --primary-dark: #4A2BA8;
    /* Darker violet for depth */
    --secondary-color: #00A3A3;
    /* Enhanced teal */
    --secondary-dark: #008080;
    /* Darker teal for depth */
    --accent-color: #8A2BE2;
    /* Brighter Violet / BlueViolet */
    --light-violet: #E6E6FA;
    /* Lavender */
    --bg-light: #f8f9fa;
    --bg-secondary-light: #e0f2f7;
    /* Light Teal */
    --text-color: #2D3748;
    /* Improved text color for better readability */
    --text-light: #fff;
    --text-muted: #718096;
    /* Muted text color for secondary content */
    --border-color: #E2E8F0;
    --glass-bg: rgba(255, 255, 255, 0.25);
    /* Improved glassmorphism */
    --glass-border: rgba(255, 255, 255, 0.35);
    --glass-blur: 12px;
    /* Increased blur for better effect */
    --deep-glass-blur: 20px;
    /* Even deeper blur for parallax effects */
    --section-padding: 80px 0;
    /* Increased padding */
    --animation-duration: 0.6s;
    /* Slightly slower for smoother animations */
    --animation-delay: 0.12s;
    /* Adjusted stagger delay */
    --meditative-duration: 25s;
    /* Slower continuous animations */
    --parallax-duration: 35s;
    /* Duration for parallax animations */
    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.15);
    --transition-bezier: cubic-bezier(0.25, 0.8, 0.25, 1);
    --body-bg: #fff;
    --header-bg: rgba(255, 255, 255, 0.9);
    --header-scrolled-bg: rgba(255, 255, 255, 0.95);
    --footer-bg: #1A202C;
    --footer-text: #A0AEC0;
    --footer-border: #2D3748;
    /* Parallax Effect Variables */
    --parallax-scale: 1.15;
    /* Scale for parallax backgrounds */
    --parallax-depth-1: 0.1;
    /* Depth for closest layer */
    --parallax-depth-2: 0.2;
    /* Depth for middle layer */
    --parallax-depth-3: 0.3;
    /* Depth for farthest layer */
    --error-red: #ff4136; /* Or use --accent-color if it's reddish enough */
}

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

body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Improved font stack */
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--body-bg);
    /* Add a subtle fade-in for the whole body on load */
    animation: fadeInBody var(--animation-duration) ease-out forwards;
    overflow-x: hidden;
    /* Prevent horizontal scrolling */
    transition: background-color 0.3s ease, color 0.3s ease;
}

@keyframes fadeInBody {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    /* Increased padding */
}

h1,
h2,
h3,
h4 {
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Different font for headings */
    margin-bottom: 1.2rem;
    line-height: 1.3;
    font-weight: 700;
    /* Bolder headings */
    letter-spacing: -0.02em;
    /* Tighter letter spacing */
}

h1 {
    font-size: 3rem;
    color: var(--text-color);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    /* Text shadow for better contrast */
}

h2 {
    font-size: 2.4rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
    position: relative;
}

/* Decorative underline for h2 */
h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem;
    color: var(--text-color);
}

h4 {
    font-size: 1.2rem;
    color: var(--text-color);
}

p {
    margin-bottom: 1.2rem;
    color: var(--text-muted);
    /* Slightly softer text */
    font-weight: 300;
    /* Lighter weight for body text */
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
}

a:hover {
    color: var(--accent-color);
    transform: translateY(-1px);
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    /* Larger buttons */
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: var(--text-light);
    border: none;
    border-radius: 30px;
    /* More rounded buttons */
    font-size: 1.05rem;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s var(--transition-bezier), box-shadow 0.3s var(--transition-bezier), background 0.3s var(--transition-bezier);
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(106, 13, 173, 0.3);
    position: relative;
    overflow: hidden;
    /* For shine effect */
}

/* Button shine effect */
.btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(45deg);
    transition: transform 0.7s ease;
}

.btn:hover::after {
    transform: rotate(45deg) translate(100%, 100%);
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(106, 13, 173, 0.5);
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(106, 13, 173, 0.4);
}

/* Contrast Button Style */
.btn-contrast {
    background: var(--text-light);
    color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-contrast:hover {
    background: #f8f8f8;
    color: var(--accent-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

section {
    padding: var(--section-padding);
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp var(--animation-duration) ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Add delays manually for demonstration - JS is better for on-scroll */
#urgency {
    animation-delay: calc(var(--animation-delay) * 1);
}

#solutions {
    animation-delay: calc(var(--animation-delay) * 2);
}

#benefits {
    animation-delay: calc(var(--animation-delay) * 3);
}

#cases {
    animation-delay: calc(var(--animation-delay) * 4);
}

#process {
    animation-delay: calc(var(--animation-delay) * 5);
}

#cta {
    animation-delay: calc(var(--animation-delay) * 6);
}

.section-bg {
    background-color: var(--bg-light);
}

.section-bg-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--bg-secondary-light) 100%);
}

.section-bg-alt {
    background-color: var(--bg-secondary-light);
}

/* --- Glassmorphism Style --- */
.glassmorphism {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    /* Rounder corners */
    box-shadow: 0 10px 30px rgba(31, 38, 135, 0.15);
    padding: 30px;
    transition: transform 0.4s var(--transition-bezier), box-shadow 0.4s var(--transition-bezier), background 0.4s var(--transition-bezier), border-color 0.4s var(--transition-bezier);
    animation: subtlePulse var(--meditative-duration) ease-in-out infinite alternate;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

/* Deep Glassmorphism Style - for more intense effects */
.deep-glassmorphism {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(var(--deep-glass-blur));
    -webkit-backdrop-filter: blur(var(--deep-glass-blur));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(31, 38, 135, 0.2);
    padding: 35px;
    transition: transform 0.5s var(--transition-bezier), box-shadow 0.5s var(--transition-bezier), background 0.5s var(--transition-bezier), border-color 0.5s var(--transition-bezier);
    position: relative;
    z-index: 2;
    overflow: hidden;
}

/* Parallax Background Base */
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

/* Parallax Layer Base */
.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    will-change: transform;
    transform: translateZ(0);
}

@keyframes subtlePulse {
    from {
        box-shadow: 0 10px 30px rgba(31, 38, 135, 0.1);
        border-color: var(--glass-border);
    }

    to {
        box-shadow: 0 15px 40px rgba(31, 38, 135, 0.18);
        border-color: rgba(255, 255, 255, 0.6);
    }
}

.glassmorphism:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(31, 38, 135, 0.2);
    border-color: rgba(255, 255, 255, 0.7);
}

/* --- Header --- */
header {
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 18px 0;
    border-bottom: 1px solid rgba(221, 221, 221, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

header.scrolled {
    padding: 12px 0;
    background-color: var(--header-scrolled-bg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

.logo {
    /* Remove text-specific styles */
    display: inline-block;
    /* Ensure link behaves like a block for image sizing */
    vertical-align: middle;
    /* Align logo vertically */
}

.logo img {
    height: 44px; /* Increased by 25% from 35px */
    width: auto;
    display: block;
    /* Remove extra space below image */
    filter: brightness(1.1); /* Slightly brighten to enhance visibility of white elements */
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    /* More spacing */
    flex-wrap: wrap;
}

nav a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
    border-radius: 1px;
}

nav a:hover {
    color: var(--primary-color);
}

nav a:hover::after {
    width: 100%;
}

/* Add subtle fade-in to nav items */
nav li {
    opacity: 0;
    animation: fadeInNav var(--animation-duration) ease-out forwards;
}

/* Stagger nav items */
nav li:nth-child(1) {
    animation-delay: calc(var(--animation-delay) * 0.5);
}

nav li:nth-child(2) {
    animation-delay: calc(var(--animation-delay) * 1.0);
}

nav li:nth-child(3) {
    animation-delay: calc(var(--animation-delay) * 1.5);
}

nav li:nth-child(4) {
    animation-delay: calc(var(--animation-delay) * 2.0);
}

nav li:nth-child(5) {
    animation-delay: calc(var(--animation-delay) * 2.5);
}

nav li:nth-child(6) {
    animation-delay: calc(var(--animation-delay) * 3.0);
}

@keyframes fadeInNav {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

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

.header-contact {
    font-weight: 500;
}

.header-contact a {
    color: var(--primary-color);
    margin-left: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    background-color: rgba(93, 63, 211, 0.08);
}

.header-contact a:hover {
    color: var(--accent-color);
    background-color: rgba(93, 63, 211, 0.12);
    transform: translateY(-2px);
}

.header-contact i {
    font-size: 1.1rem;
}

/* --- Hero Section --- */
#hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
    color: var(--text-light);
    padding: 100px 0 120px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: -65px;
    padding-top: 120px;
    opacity: 1;
    background-size: 200% 200%;
    animation: gradientShift var(--meditative-duration) ease infinite;
}

/* Triangle pattern removed for cleaner background */

#hero canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Hero Parallax Background */
.hero-parallax-bg {
    position: absolute;
    top: -20%;
    left: -10%;
    width: 120%;
    height: 140%;
    background: radial-gradient(circle at 30% 40%, rgba(138, 43, 226, 0.4) 0%, rgba(0, 0, 0, 0) 50%), radial-gradient(circle at 70% 60%, rgba(0, 163, 163, 0.4) 0%, rgba(0, 0, 0, 0) 50%);
    filter: blur(40px);
    opacity: 0.7;
    z-index: -1;
    transform: translateZ(0);
    animation: heroParallaxFloat var(--parallax-duration) ease-in-out infinite alternate;
}

@keyframes heroParallaxFloat {
    0% {
        transform: translate(-2%, -2%) scale(1.05);
    }

    50% {
        transform: translate(1%, 2%) scale(1.1);
    }

    100% {
        transform: translate(2%, -1%) scale(1.05);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

#hero h1 {
    color: var(--text-light);
    margin-bottom: 3rem; /* Increased from 1.8rem to 3rem for more space */
    font-weight: 800;
    /* Extra bold */
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp var(--animation-duration) ease-out forwards;
    animation-delay: 0.2s;
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-title-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
}

.hero-logo {
    height: 80px;
    filter: brightness(1.1);
}

.hero-company-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

#hero .hero-subtitle {
    color: var(--text-light);
    margin-bottom: 0;
}

.hero-title-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
}

#hero .hero-subtitle {
    color: var(--text-light);
    margin-bottom: 0;
}

#hero p {
    font-size: 1.35rem;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp var(--animation-duration) ease-out forwards;
    animation-delay: 0.4s;
    position: relative;
    z-index: 1;
    font-weight: 300;
    /* Lighter weight for better contrast */
}

#hero .btn {
    background: var(--text-light);
    color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    padding: 16px 38px;
    /* Larger button */
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

#hero .btn:hover {
    background: #f8f8f8;
    color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* Animation for Hero Button */
#hero .btn {
    opacity: 0;
    transform: scale(0.9);
    animation: scaleUp var(--animation-duration) ease-out forwards;
    animation-delay: 0.6s;
    position: relative;
    z-index: 1;
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Urgency Block --- */
#urgency {
    background-color: var(--secondary-color);
    color: var(--text-light);
    text-align: center;
    padding: 50px 0;
    position: relative;
    overflow: hidden;
}

/* Add subtle pattern to urgency section */
#urgency::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCI+CjxyZWN0IHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCIgZmlsbD0iIzAwMDAiPjwvcmVjdD4KPHBhdGggd2lkdGg9IjMwIiBoZWlnaHQ9IjMwIiBkPSJNMzAgMzBMNjAgMEgzMEwwIDBaIiBmaWxsPSIjMDAwMSI+PC9wYXRoPgo8L3N2Zz4=');
    opacity: 0.05;
    z-index: 0;
}

#urgency .container {
    position: relative;
    z-index: 1;
}

/* Urgency Parallax Background */
.urgency-parallax-bg {
    position: absolute;
    top: -50%;
    left: -25%;
    width: 150%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 40%, rgba(0, 163, 163, 0.6) 0%, rgba(0, 128, 128, 0.2) 50%, rgba(0, 0, 0, 0) 70%), radial-gradient(ellipse at 70% 60%, rgba(0, 128, 128, 0.5) 0%, rgba(0, 0, 0, 0) 70%);
    filter: blur(30px);
    opacity: 0.8;
    z-index: -1;
    transform: translateZ(0);
    animation: urgencyParallaxFloat var(--parallax-duration) ease-in-out infinite alternate;
}

@keyframes urgencyParallaxFloat {
    0% {
        transform: translate(-1%, -1%) scale(1.02);
    }

    100% {
        transform: translate(1%, 1%) scale(1.05);
    }
}

#urgency h2 {
    color: var(--text-light);
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#urgency h2::after {
    background: rgba(255, 255, 255, 0.3);
}

#urgency p {
    font-size: 1.2rem;
    max-width: 900px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

/* --- Solutions Section --- */
#solutions {
    background: linear-gradient(135deg, #f8f9fa 0%, var(--bg-secondary-light) 100%);
    position: relative;
    overflow: hidden;
}

/* Add subtle pattern to solutions section */
#solutions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCI+CjxyZWN0IHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCIgZmlsbD0iI2ZmZmYiPjwvcmVjdD4KPHBhdGggd2lkdGg9IjMwIiBoZWlnaHQ9IjMwIiBkPSJNMzAgMzBMNjAgMEgzMEwwIDBaIiBmaWxsPSIjZjlmOWY5Ij48L3BhdGg+Cjwvc3ZnPg==');
    opacity: 0.4;
    z-index: 0;
}

#solutions .container {
    position: relative;
    z-index: 1;
}

/* Solutions Parallax Background */
.solutions-parallax-bg {
    position: absolute;
    top: -20%;
    left: -10%;
    width: 120%;
    height: 140%;
    background: radial-gradient(circle at 20% 30%, rgba(93, 63, 211, 0.1) 0%, rgba(0, 0, 0, 0) 50%), radial-gradient(circle at 80% 20%, rgba(0, 163, 163, 0.1) 0%, rgba(0, 0, 0, 0) 50%), radial-gradient(circle at 50% 80%, rgba(138, 43, 226, 0.1) 0%, rgba(0, 0, 0, 0) 60%);
    filter: blur(60px);
    opacity: 0.7;
    z-index: -1;
    transform: translateZ(0);
    animation: solutionsParallaxFloat var(--parallax-duration) ease-in-out infinite alternate;
}

@keyframes solutionsParallaxFloat {
    0% {
        transform: translate(-2%, -1%) scale(1.05);
    }

    50% {
        transform: translate(1%, 1%) scale(1.08);
    }

    100% {
        transform: translate(2%, -1%) scale(1.05);
    }
}

#solutions .solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
    margin-top: 2.5rem;
}

.solution-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    padding: 35px;
    transition: transform 0.4s var(--transition-bezier), box-shadow 0.4s var(--transition-bezier), background 0.4s var(--transition-bezier), border-color 0.4s var(--transition-bezier);
    color: var(--text-color);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp var(--animation-duration) ease-out forwards;
    position: relative;
    overflow: hidden;
}

/* Add subtle gradient border to solution cards */
.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(93, 63, 211, 0.2), rgba(0, 163, 163, 0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: opacity 0.4s ease;
    opacity: 0.5;
}

.solution-card:hover::before {
    opacity: 1;
}

/* Stagger solution cards */
.solutions-grid .solution-card:nth-child(1) {
    animation-delay: calc(var(--animation-delay) * 2.5);
}

.solutions-grid .solution-card:nth-child(2) {
    animation-delay: calc(var(--animation-delay) * 3.0);
}

.solutions-grid .solution-card:nth-child(3) {
    animation-delay: calc(var(--animation-delay) * 3.5);
}

.solutions-grid .solution-card:nth-child(4) {
    animation-delay: calc(var(--animation-delay) * 4.0);
}

.solutions-grid .solution-card:nth-child(5) {
    animation-delay: calc(var(--animation-delay) * 4.5);
}

.solutions-grid .solution-card:nth-child(6) {
    animation-delay: calc(var(--animation-delay) * 5.0);
}

.solution-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--accent-color);
}

.solution-card h3 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-color);
    font-weight: 600;
}

.solution-card h3 span {
    font-size: 2rem;
    color: var(--secondary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.solution-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* --- Benefits Section --- */
#benefits {
    background-color: #fff;
    position: relative;
}

/* Add subtle pattern to benefits section */
#benefits::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCI+CjxyZWN0IHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCIgZmlsbD0iI2ZmZmYiPjwvcmVjdD4KPHBhdGggd2lkdGg9IjMwIiBoZWlnaHQ9IjMwIiBkPSJNMzAgMzBMNjAgMEgzMEwwIDBaIiBmaWxsPSIjZjlmOWY5Ij48L3BhdGg+Cjwvc3ZnPg==');
    opacity: 0.3;
    z-index: 0;
}

#benefits .container {
    position: relative;
    z-index: 1;
}

/* Benefits Parallax Background */
.benefits-parallax-bg {
    position: absolute;
    top: -10%;
    left: -5%;
    width: 110%;
    height: 120%;
    background: radial-gradient(circle at 70% 30%, rgba(230, 230, 250, 0.7) 0%, rgba(0, 0, 0, 0) 60%), radial-gradient(circle at 30% 70%, rgba(224, 242, 247, 0.7) 0%, rgba(0, 0, 0, 0) 60%);
    filter: blur(50px);
    opacity: 0.5;
    z-index: -1;
    transform: translateZ(0);
    animation: benefitsParallaxFloat var(--parallax-duration) ease-in-out infinite alternate;
}

@keyframes benefitsParallaxFloat {
    0% {
        transform: translate(-1%, -1%) scale(1.03);
    }

    100% {
        transform: translate(1%, 1%) scale(1.06);
    }
}

#benefits h2 {
    color: var(--text-color);
}

#benefits ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 2.5rem;
}

#benefits li {
    background: var(--bg-secondary-light);
    padding: 30px;
    border-radius: 12px;
    border-left: 5px solid var(--secondary-color);
    transition: transform 0.4s var(--transition-bezier), box-shadow 0.4s var(--transition-bezier), border-left-color 0.4s var(--transition-bezier), background-color 0.4s var(--transition-bezier);
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInLeft var(--animation-duration) ease-out forwards;
}

/* Stagger benefit items */
#benefits li:nth-child(1) {
    animation-delay: calc(var(--animation-delay) * 3.5);
}

#benefits li:nth-child(2) {
    animation-delay: calc(var(--animation-delay) * 4.0);
}

#benefits li:nth-child(3) {
    animation-delay: calc(var(--animation-delay) * 4.5);
}

#benefits li:nth-child(4) {
    animation-delay: calc(var(--animation-delay) * 5.0);
}

#benefits li:nth-child(5) {
    animation-delay: calc(var(--animation-delay) * 5.5);
}

#benefits li:nth-child(6) {
    animation-delay: calc(var(--animation-delay) * 6.0);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#benefits li:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 128, 128, 0.15);
    border-left-color: var(--primary-color);
    background-color: #d4eaf7;
}

#benefits strong {
    color: var(--text-color);
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
    font-size: 1.15rem;
}

.benefits-quote {
    text-align: center;
    margin-top: 3.5rem;
    font-style: italic;
    font-size: 1.3rem;
    color: var(--text-muted);
    font-weight: 500;
    padding: 25px;
    background: var(--light-violet);
    border-radius: 12px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    box-shadow: 0 5px 15px rgba(106, 13, 173, 0.1);
}

.benefits-quote::before {
    content: '“';
    font-size: 4rem;
    color: rgba(93, 63, 211, 0.2);
    position: absolute;
    top: -10px;
    left: 10px;
    line-height: 1;
}

/* --- Case Studies Section --- */
#cases {
    background: linear-gradient(180deg, var(--bg-light) 0%, #fff 100%);
    position: relative;
    overflow: hidden;
}

/* Cases Parallax Background */
.cases-parallax-bg {
    position: absolute;
    top: -15%;
    left: -10%;
    width: 120%;
    height: 130%;
    background: radial-gradient(ellipse at 30% 30%, rgba(93, 63, 211, 0.08) 0%, rgba(0, 0, 0, 0) 70%), radial-gradient(ellipse at 70% 70%, rgba(0, 163, 163, 0.08) 0%, rgba(0, 0, 0, 0) 70%), radial-gradient(circle at 50% 50%, rgba(248, 249, 250, 0.8) 0%, rgba(255, 255, 255, 1) 100%);
    filter: blur(40px);
    z-index: -1;
    transform: translateZ(0);
    animation: casesParallaxFloat var(--parallax-duration) ease-in-out infinite alternate;
}

@keyframes casesParallaxFloat {
    0% {
        transform: translate(-1.5%, -1%) scale(1.04);
    }

    100% {
        transform: translate(1.5%, 1%) scale(1.07);
    }
}

#cases h2 {
    color: var(--text-color);
}

#cases .case-study {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: box-shadow 0.4s var(--transition-bezier), border-left-color 0.4s var(--transition-bezier), transform 0.4s var(--transition-bezier);
    border-left: 5px solid transparent;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp var(--animation-duration) ease-out forwards;
}

/* Stagger case studies */
#cases .case-study:nth-of-type(1) {
    animation-delay: calc(var(--animation-delay) * 4.5);
}

#cases .case-study:nth-of-type(2) {
    animation-delay: calc(var(--animation-delay) * 5.0);
}

#cases .case-study:nth-of-type(3) {
    animation-delay: calc(var(--animation-delay) * 5.5);
}

#cases .case-study:hover {
    box-shadow: var(--card-hover-shadow);
    border-left-color: var(--secondary-color);
    transform: translateY(-5px);
}

.case-study h3 {
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 12px;
    margin-bottom: 25px;
    color: var(--text-color);
    font-weight: 600;
}

.case-problem,
.case-solution,
.case-results {
    margin-bottom: 25px;
}

.case-problem strong,
.case-solution strong,
.case-results strong {
    color: var(--text-color);
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.case-results ul {
    list-style: none;
    padding-left: 0;
}

.case-results li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 35px;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.case-results li::before {
    font-family: 'Font Awesome 5 Free';
    content: '\f135';
    /* Rocket icon */
    font-weight: 900;
    color: var(--secondary-color);
    font-size: 1.3rem;
    position: absolute;
    left: 0;
    top: 2px;
}

.case-quote {
    font-style: italic;
    margin-top: 30px;
    padding: 25px;
    background-color: var(--bg-secondary-light);
    border-left: 4px solid var(--secondary-color);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 1.1rem;
    position: relative;
}

.case-quote::before {
    content: '“';
    font-size: 3rem;
    color: rgba(0, 128, 128, 0.2);
    position: absolute;
    top: -5px;
    left: 5px;
    line-height: 1;
}

/* --- Process Section --- */
#process {
    background: linear-gradient(180deg, #fff 0%, var(--bg-secondary-light) 100%);
    position: relative;
    overflow: hidden;
}

/* Process Parallax Background */
.process-parallax-bg {
    position: absolute;
    top: -20%;
    left: -10%;
    width: 120%;
    height: 140%;
    background: radial-gradient(circle at 20% 80%, rgba(0, 163, 163, 0.15) 0%, rgba(0, 0, 0, 0) 60%), radial-gradient(circle at 80% 20%, rgba(93, 63, 211, 0.15) 0%, rgba(0, 0, 0, 0) 60%);
    filter: blur(50px);
    opacity: 0.7;
    z-index: -1;
    transform: translateZ(0);
    animation: processParallaxFloat var(--parallax-duration) ease-in-out infinite alternate;
}

@keyframes processParallaxFloat {
    0% {
        transform: translate(-2%, -1%) scale(1.05);
    }

    100% {
        transform: translate(2%, 1%) scale(1.08);
    }
}

#process h2 {
    color: var(--text-color);
}

#process .process-steps {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 35px;
    margin-top: 2.5rem;
    text-align: center;
}

.process-step {
    flex-basis: calc(33.333% - 45px);
    min-width: 280px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    padding: 35px;
    transition: transform 0.4s var(--transition-bezier), box-shadow 0.4s var(--transition-bezier), border-color 0.4s var(--transition-bezier);
    color: var(--text-color);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp var(--animation-duration) ease-out forwards;
    position: relative;
    overflow: hidden;
}

/* Stagger process steps */
.process-steps .process-step:nth-child(1) {
    animation-delay: calc(var(--animation-delay) * 5.5);
}

.process-steps .process-step:nth-child(2) {
    animation-delay: calc(var(--animation-delay) * 6.0);
}

.process-steps .process-step:nth-child(3) {
    animation-delay: calc(var(--animation-delay) * 6.5);
}

.process-step:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--accent-color);
}

.process-step .step-number {
    display: inline-block;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    color: var(--text-light);
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 1.8rem;
    box-shadow: 0 6px 15px rgba(0, 128, 128, 0.3);
}

.process-step h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 600;
}

.process-step p {
    font-size: 1rem;
    color: var(--text-muted);
}

.process-step span {
    /* Timeline Text */
    display: block;
    font-weight: bold;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* --- CTA Section --- */
#cta {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: var(--text-light);
    text-align: center;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

/* Add subtle pattern to CTA section */
#cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1NiIgaGVpZ2h0PSIxMDAiPgo8cmVjdCB3aWR0aD0iNTYiIGhlaWdodD0iMTAwIiBmaWxsPSIjMDAwMCI+PC9yZWN0Pgo8cGF0aCBkPSJNMjggNjZMMCA1MEwwIDc2TDI4IDEwMEw1NiA3Nkw1NiA1MEwyOCA2NloiIGZpbGw9IiMwMDAxIj48L3BhdGg+CjxwYXRoIGQ9Ik0yOCAwTDAgMTZMMCAyNUwyOCA0MUw1NiAyNUw1NiAxNkwyOCA sportsWiIgZmlsbD0iIzAwMDEiPjwvcGF0aD4KPC9zdmc+');
    opacity: 0.08;
    z-index: 0;
}

#cta .container {
    position: relative;
    z-index: 1;
}

#cta h2 {
    color: var(--text-light);
    font-size: 2.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

#cta h2::after {
    background: rgba(255, 255, 255, 0.3);
}

#cta p {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 300;
}

#cta .btn {
    background: var(--text-light);
    color: var(--primary-color);
    padding: 16px 40px;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
}

#cta .btn:hover {
    background: #f8f8f8;
    color: var(--accent-color);
}

/* --- Contact Form --- */
#contact-form-container {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 40px;
    border-radius: 16px;
    max-width: 650px;
    margin: 3.5rem auto 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#contact-form-container h3 {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

#cta-contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    text-align: left;
}

#cta-contact-form input[type="text"],
#cta-contact-form input[type="email"],
#cta-contact-form textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Roboto', sans-serif;
}

#cta-contact-form input::placeholder,
#cta-contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#cta-contact-form input:focus,
#cta-contact-form textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.15);
}

#cta-contact-form textarea {
    min-height: 130px;
    resize: vertical;
}

#cta-contact-form button {
    width: 100%;
    padding: 16px;
    border-radius: 8px;
}

#form-status {
    margin-top: 1.5rem;
    color: var(--text-light);
    text-align: center;
    min-height: 1.2em;
    font-weight: 500;
}

/* --- Footer --- */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 0 40px 0;
    font-size: 0.95rem;
}

footer .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
    align-items: start;
}

footer h4 {
    color: var(--text-light);
    margin-bottom: 1.2rem;
    font-size: 1.15rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    display: inline-block;
    font-weight: 600;
}

footer ul {
    list-style: none;
}

footer li {
    margin-bottom: 0.8rem;
}

footer a {
    color: #A0AEC0;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--text-light);
    text-decoration: none;
}

footer .footer-logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

footer .footer-about p {
    color: #718096;
    /* Slightly darker muted text */
    line-height: 1.7;
}

footer .footer-contacts li {
    display: flex;
    align-items: center;
    gap: 10px;
}

footer .footer-contacts i {
    color: var(--secondary-color);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

footer .footer-contacts a {
    word-break: break-all;
}

footer .copyright {
    margin-top: 50px;
    text-align: center;
    width: 100%;
    border-top: 1px solid var(--footer-border);
    padding-top: 40px;
    font-size: 0.9rem;
    color: var(--text-muted);
    grid-column: 1 / -1;
    /* Span all columns */
}

/* --- Mobile Menu Toggle Button --- */
#mobile-menu-toggle {
    display: none;
    /* Hidden by default */
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
    /* Ensure it's above other header content */
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    h1 {
        font-size: 2.6rem;
    }

    h2 {
        font-size: 2.1rem;
    }

    h3 {
        font-size: 1.4rem;
    }

    .process-step {
        flex-basis: calc(50% - 40px);
    }

    #hero {
        padding-top: 100px;
        padding-bottom: 100px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.9rem;
    }

    #hero {
        padding-top: 80px;
        padding-bottom: 80px;
    }

    #hero p {
        font-size: 1.2rem;
    }

    header .container {
        display: flex;
        /* Ensure flex display */
        flex-wrap: nowrap;
        /* Prevent wrapping */
        justify-content: space-between;
        /* Space out logo, contact/toggle */
        align-items: center;
        /* Vertically center items */
        position: relative;
        /* Needed for absolute positioning of the nav */
    }

    .logo {
        order: 1;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    /* Logo first */
    #mobile-menu-toggle {
        display: block;
        /* Show toggle button */
        order: 3;
        /* Toggle button last */
        margin-left: 15px;
        /* Add space to the left */
        flex-shrink: 0;
    }

    #main-nav {
        /* Ensure nav is hidden by default and positioned correctly */
        display: none;
        /* Hide nav by default */
        order: 4;
        /* Ensure it doesn't interfere with layout when hidden */
        position: absolute;
        top: 100%;
        /* Position below header */
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        /* Slightly opaque background */
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
        border-top: 1px solid var(--border-color);
        z-index: 999;
        flex-direction: column;
        /* Stack items vertically */
        align-items: center;
        gap: 0;
        /* Remove gap for vertical layout */
    }

    #main-nav.active {
        display: flex;
        /* Show nav when active */
    }

    #main-nav ul {
        flex-direction: column;
        /* Stack list items */
        width: 100%;
        text-align: center;
        gap: 0;
    }

    #main-nav a {
        display: block;
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        color: var(--text-color);
    }

    #main-nav a:hover {
        background-color: var(--bg-secondary-light);
        color: var(--primary-color);
    }

    #main-nav a::after {
        display: none;
        /* Hide underline effect */
    }

    #main-nav li:last-child a {
        border-bottom: none;
    }

    .header-contact {
        order: 2;
        /* Contact second */
        margin-left: auto;
        /* Push contact and toggle to the right */
        margin-top: 0;
        width: auto;
        text-align: right;
        flex-shrink: 0;
        margin-right: 10px;
        /* Space before toggle */
    }

    .header-contact a {
        margin: 0;
        white-space: nowrap;
    }

    .process-steps {
        flex-direction: column;
        align-items: center;
    }

    .process-step {
        flex-basis: 90%;
        max-width: 450px;
    }

    footer .container {
        grid-template-columns: 1fr;
        /* Stack columns */
        text-align: center;
    }

    footer h4 {
        display: inline-block;
        /* Center underline */
    }

    footer .footer-contacts li {
        justify-content: center;
    }

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

    footer .footer-logo {
        display: inline-block;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.7rem;
    }

    #hero p {
        font-size: 1.1rem;
    }

    nav ul {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .btn {
        width: 90%;
        margin: 8px auto;
        display: block;
        padding: 12px 28px;
        font-size: 1rem;
    }

    #hero .btn,
    #cta .btn {
        width: auto;
        display: inline-block;
        padding: 14px 32px;
        font-size: 1.05rem;
    }

    /* Don't force hero/cta btn full width */
    .solution-card,
    .process-step,
    #benefits li,
    .case-study {
        padding: 25px;
    }

    #contact-form-container {
        padding: 30px;
    }

    footer {
        padding: 50px 0 30px;
    }

    footer .container {
        gap: 30px;
    }

    footer .copyright {
        margin-top: 40px;
        padding-top: 30px;
    }
}

/* Styles for the new input group */
.input-group {
    margin-top: 30px; /* Increased from 20px to 30px for more space */
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.input-title {
    display: block;
    margin-bottom: 20px; /* Increased from 10px to 20px for more space */
    font-size: 1.2em;
    color: var(--text-light);
}

.input-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

#ai-implementation-input {
    flex-grow: 1;
    height: 44px; /* Match button height */
    padding: 0 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 22px; /* Half of height for perfect pill shape */
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-size: 1rem;
    outline: none;
    box-sizing: border-box; /* Ensure padding is included in height */
    line-height: normal; /* Reset line height to allow proper text positioning */
}

#ai-implementation-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.button-group {
    display: flex;
    gap: 10px;
}

.icon-button {
    background-color: #fff;
    color: var(--primary-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    width: 44px; /* Match chat window buttons */
    height: 44px; /* Match chat window buttons */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.icon-button:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

.icon-button i {
    line-height: 1;
}

/* Responsive adjustments for the input group */
@media (max-width: 768px) {
    .input-group {
        width: 95%;
    }
    
    .input-controls {
        flex-direction: column;
        border-radius: 25px;
        padding: 10px;
    }
    
    #ai-implementation-input {
        width: 100%;
        height: 44px !important; /* Force exact height */
        min-height: 44px !important; /* Ensure minimum height */
        max-height: 44px !important; /* Ensure maximum height */
        margin-bottom: 10px;
        text-align: center;
        /* Keep all other properties exactly the same as desktop */
        border: 1px solid rgba(255, 255, 255, 0.5);
        border-radius: 22px; /* Half of height for perfect pill shape */
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--text-light);
        font-size: 1rem;
        outline: none;
        padding: 0 20px; /* Keep original horizontal padding */
        box-sizing: border-box;
        line-height: normal;
    }
    
    .button-group {
        width: 100%;
        justify-content: center;
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .input-title {
        font-size: 1.1em;
    }

    #ai-implementation-input {
        /* Force exact height with multiple properties */
        height: 44px !important; /* Force exact height */
        min-height: 44px !important; /* Ensure minimum height */
        max-height: 44px !important; /* Ensure maximum height */
        border: 1px solid rgba(255, 255, 255, 0.5);
        border-radius: 22px; /* Half of height for perfect pill shape */
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--text-light);
        font-size: 1rem;
        outline: none;
        padding: 0 15px; /* Keep original horizontal padding for mobile */
        box-sizing: border-box;
        line-height: normal;
    }

    .icon-button {
        width: 44px; /* Match input height */
        height: 44px; /* Match input height */
        font-size: 1.1em;
    }
}

/* Styles for attachments container */
.attachments-container {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    /* Allow items to wrap to the next line */
    gap: 10px;
    /* Space between attachment items */
    justify-content: flex-start;
    /* Align items to the left */
    max-width: 600px;
    /* Match the max-width of the input controls */
    margin-left: auto;
    margin-right: auto;
}

.attachment-item {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    padding: 8px;
    /* Uniform padding */
    border-radius: 12px;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    /* This will vertically center content within the item */
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: calc(33.333% - 6.67px);
    /* Consistent width with other attachments */
    min-height: 52px;
    /* Ensure all items have the same minimum height */
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

/* Style for the play/pause button itself (which has .icon-button class) */
.attachment-item .icon-button.audio-play-pause {
    width: 32px;
    /* Made button smaller */
    height: 32px;
    /* Made button smaller */
    border-radius: 50%;
    /* Make it circular */
    background-color: #fff;
    /* White background */
    color: var(--primary-color);
    /* Icon color */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Prevent button from shrinking */
    padding: 0;
    /* Remove default button padding */
    border: none;
    /* Remove default button border */
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.attachment-item .icon-button.audio-play-pause:hover {
    background-color: #f0f0f0;
    /* Slight hover effect */
}

/* Style for the icon (i tag) inside the play/pause button */
.attachment-item .icon-button.audio-play-pause i {
    font-size: 14px;
    /* Made icon smaller */
    line-height: 1;
    /* Ensure icon is centered */
}

/* Generic span inside attachment-item (used for non-audio filename and audio time display) */
.attachment-item span {
    flex-grow: 0;
    /* Default to not growing, specific items can override */
    flex-shrink: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    line-height: 1.4;
    /* Adjusted for better vertical centering */
    min-width: 0;
    /* Important for ellipsis in flex containers */
}

/* Specifically for the filename placeholder in audio items */
.attachment-item .audio-histogram-placeholder {
    flex-grow: 1;
    /* Allow filename to take up available space */
    flex-shrink: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    line-height: 1.4;
    /* Match other text */
    min-width: 0;
    /* Important for ellipsis */
    /* No padding-right here, remove button is handled by attachment-item's overall padding or absolute positioning */
}

/* Specifically for the time display in audio items */
.attachment-item .audio-time-display {
    flex-grow: 0;
    /* Time display should not grow */
    flex-shrink: 0;
    /* Time display should not shrink */
    margin-left: 8px;
    /* Add some space between filename and time */
    padding-right: 15px;
    /* Adjusted space for the remove button */
}

/* Ensure the main text span for non-audio items also has padding for the remove button */
.attachment-item>span:not(.audio-time-display) {
    flex-grow: 1;
    /* Allow filename to take space */
    padding-right: 15px;
    /* Adjusted space for the remove button */
}

.attachment-item .remove-attachment {
    position: absolute;
    top: 50%;
    right: -6px;
    /* Positioned to be very close (2px from border with 8px parent padding) */
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 1.1em;
    padding: 2px;
    line-height: 1;
    transition: color 0.3s ease;
    /* flex-shrink: 0; /* No longer needed with absolute positioning */
    /* margin-left: auto; /* No longer needed */
}

.attachment-item .remove-attachment:hover {
    color: var(--text-light);
}

/* Style for the recording button */
@keyframes recordingPulse {
    0% {
        color: #ffffff;
        background-color: rgba(255, 65, 54, 0.9);
    }

    50% {
        color: #ffffff;
        background-color: rgba(255, 65, 54, 0.5);
    }

    100% {
        color: #ffffff;
        background-color: rgba(255, 65, 54, 0.9);
    }
}

#ai-record-button.recording {
    animation: recordingPulse 2s infinite ease-in-out;
    color: #ffffff;
    background-color: #ff4136;
    box-shadow: 0 0 15px rgba(255, 65, 54, 0.7);
}

/* Chat Popup Styles */
/* Ensure these variables are defined if not already in :root, or use direct values */
/* For consistency, I'll assume the :root variables from my previous CSS are available */
/* If not, replace var(--surface-color) etc. with actual hex/rgba values from the site's theme */

.chat-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 90%; /* Use percentage instead of fixed width */
    max-width: 740px; /* Maximum width on larger screens */
    max-height: 85vh; /* Slightly taller */
    background-color: var(--body-bg); /* Use body background for main popup area */
    border: 1px solid var(--border-color);
    border-radius: 12px; /* Consistent with other cards */
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.2); /* Softer, more pronounced shadow */
    display: flex;
    flex-direction: column;
    z-index: 1001; /* Above header */
    overflow: hidden;
    transform: translateY(100%) scale(0.8);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, visibility 0s 0.3s;
    box-sizing: border-box; /* Ensure padding is included in width calculation */
}

/* Mobile adjustments for chat popup */
@media (max-width: 768px) {
    .chat-popup {
        bottom: 0;
        right: 0;
        left: 0; /* Ensure it spans from left to right edge */
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        margin: 0; /* Remove any margin */
        position: fixed; /* Ensure it's fixed to the viewport */
        overflow: hidden; /* Prevent content from overflowing */
    }
    
    .chat-popup-messages {
        max-height: calc(100vh - 120px); /* Adjust based on header and input area heights */
        overflow-y: auto;
    }
    
    .chat-message {
        max-width: 80%; /* Slightly narrower messages on mobile */
    }
}

.chat-popup.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, visibility 0s 0s;
}

.chat-popup-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); /* Match button gradient */
    color: var(--text-light);
    padding: 12px 18px; /* Adjusted padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 11px; /* Match parent */
    border-top-right-radius: 11px;
    /* box-shadow: 0 2px 5px rgba(0,0,0,0.1); */
}

/* Mobile adjustments for chat header */
@media (max-width: 768px) {
    .chat-popup-header {
        border-radius: 0; /* No border radius on full-screen mobile view */
        padding: 15px 20px; /* Slightly larger padding for better touch targets */
    }
    
    .chat-popup-header h3 {
        font-size: 1.25rem; /* Larger title on mobile */
    }
    
    .close-chat-button {
        font-size: 1.8rem; /* Larger close button on mobile */
        padding: 8px; /* Larger touch target */
    }
}

.chat-popup-header h3 {
    font-size: 1.15rem; /* Slightly larger title */
    margin-bottom: 0;
    color: var(--text-light);
    font-weight: 600; /* Bolder title */
}

.close-chat-button {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.6rem; /* Larger close icon */
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
    padding: 5px; /* Easier to click */
}

.close-chat-button:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.chat-popup-messages {
    flex-grow: 1;
    padding: 15px; /* More padding */
    padding-bottom: 15px; /* Ensure equal padding at bottom */
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column; /* Normal column direction */
    gap: 12px; /* Increased gap */
    background-color: var(--bg-light); /* Lighter background for messages */
    box-sizing: border-box; /* Ensure padding is included in width calculation */
    width: 100%; /* Ensure it takes full width of parent */
    justify-content: flex-end; /* Align messages to the bottom */
}

.chat-message {
    padding: 10px 14px; /* Adjusted padding */
    border-radius: 10px;
    max-width: 85%;
    word-wrap: break-word;
    font-size: 0.95rem; /* Slightly larger text */
    line-height: 1.6;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Subtle shadow for messages */
    box-sizing: border-box; /* Ensure padding is included in width calculation */
}

/* Mobile adjustments for chat messages */
@media (max-width: 480px) {
    .chat-message {
        max-width: 85%; /* Slightly narrower to ensure it fits */
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

.chat-message.user {
    background-color: var(--primary-color);
    color: var(--text-light);
    align-self: flex-end;
    border-bottom-right-radius: 3px; /* Bubble tail effect */
}

.chat-message.bot {
    background-color: #fff; /* White background for bot messages */
    color: var(--text-color);
    align-self: flex-start;
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 3px; /* Bubble tail effect */
}

.chat-message p {
    margin-bottom: 0.3rem;
    color: inherit;
}
.chat-message p:last-child {
    margin-bottom: 0;
}

.chat-message a {
    color: var(--secondary-color); /* Use secondary color for links in chat */
    text-decoration: underline;
}
.chat-message a:hover {
    color: var(--primary-dark);
}

/* Markdown specific styles within chat */
.chat-message strong { font-weight: 600; } /* Bolder */
.chat-message em { font-style: italic; }
.chat-message code {
    background-color: var(--bg-secondary-light); /* Light teal bg for code */
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
}
.chat-message pre {
    background-color: var(--bg-secondary-light);
    padding: 0.8em;
    border-radius: 6px;
    overflow-x: auto;
    margin: 0.8em 0;
    border: 1px solid var(--border-color);
}
.chat-message pre code {
    background-color: transparent;
    padding: 0;
    border: none;
}
.chat-message ul, .chat-message ol {
    padding-left: 1.5em; /* More indent */
    margin: 0.8em 0;
}
.chat-message li {
    margin-bottom: 0.3em;
}

.chat-popup-input-area {
    display: flex;
    padding: 12px; /* Equal padding all around */
    border-top: 1px solid var(--border-color);
    background-color: #fff; /* White background for input area */
    gap: 4px; /* Reduced gap between elements */
    flex-wrap: nowrap; /* Prevent wrapping by default */
    align-items: center; /* Center items vertically */
    margin-top: 0; /* Ensure no top margin */
    box-sizing: border-box; /* Ensure padding is included in width calculation */
    width: 100%; /* Ensure it takes full width of parent */
}

#chat-popup-input {
    flex-grow: 1;
    flex-basis: 0; /* Allow the input to shrink properly */
    min-width: 100px; /* Ensure minimum usable width */
    padding: 10px 14px; /* Adjusted padding */
    border: 1px solid var(--border-color);
    border-radius: 20px; /* Pill shape input */
    background-color: var(--bg-light);
    color: var(--text-color);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    margin-right: 6px; /* Add space after input */
}
#chat-popup-input::placeholder {
    color: var(--text-muted);
}
#chat-popup-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(93, 63, 211, 0.15);
}

/* Re-use .icon-button styles for chat popup buttons, but with specific overrides if needed */
#chat-popup-record-button,
#chat-popup-attach-button,
#chat-popup-send-button {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-radius: 50%; /* Circular */
    width: 44px; /* Consistent size */
    height: 44px;
    font-size: 1.2rem; /* Icon size */
    padding: 0; /* Remove padding to center icon */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease, transform 0.2s ease;
    flex-shrink: 0; /* Prevent buttons from shrinking */
    margin: 0 2px; /* Reduce horizontal space between buttons */
}

/* Ensure icons are perfectly centered */
#chat-popup-record-button i,
#chat-popup-attach-button i,
#chat-popup-send-button i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0; /* Remove any default margins */
    padding: 0; /* Remove any default padding */
    line-height: 1; /* Ensure proper vertical alignment */
}

/* Mobile adjustments for chat input area */
@media (max-width: 480px) {
    .chat-popup-input-area {
        padding: 10px; /* Slightly reduced padding */
        gap: 4px;
        justify-content: space-between; /* Space between input and buttons */
        margin-top: 0; /* Ensure no top margin on mobile */
        width: 100%; /* Ensure full width */
        box-sizing: border-box; /* Include padding in width calculation */
    }
    
    #chat-popup-input {
        flex-basis: calc(100% - 130px); /* Give more space to input, accounting for buttons */
        margin-right: 4px;
        box-sizing: border-box; /* Include padding in width calculation */
    }
    
    #chat-popup-record-button,
    #chat-popup-attach-button,
    #chat-popup-send-button {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        border-radius: 50%; /* Ensure buttons remain circular */
        flex-grow: 0; /* Don't allow buttons to grow */
        margin: 0 1px; /* Even smaller gap on mobile */
        padding: 0; /* Remove padding */
        min-width: 38px; /* Ensure minimum width */
    }
    
    #chat-popup-attachments-container {
        padding: 0 10px 0; /* Remove bottom padding and match side padding */
        width: 100%; /* Ensure full width */
        box-sizing: border-box; /* Include padding in width calculation */
    }
}

/* Very small screens */
@media (max-width: 350px) {
    .chat-popup-input-area {
        flex-wrap: wrap;
    }
    
    #chat-popup-input {
        flex-basis: 100%;
        margin-bottom: 8px;
        width: 100%; /* Ensure full width */
        box-sizing: border-box; /* Include padding in width calculation */
    }
    
    #chat-popup-record-button,
    #chat-popup-attach-button,
    #chat-popup-send-button {
        flex-basis: calc(33.333% - 4px);
    }
}

#chat-popup-record-button:hover,
#chat-popup-attach-button:hover,
#chat-popup-send-button:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

#chat-popup-attachments-container {
    padding: 0 12px 12px; /* Add bottom padding */
    background-color: #fff; /* Match input area */
    /* Styles from .attachments-container will apply for flex, gap */
    min-height: 0; /* Ensure it doesn't take up space when empty */
    margin-top: 0; /* Remove top margin */
    display: none; /* Hide by default */
    border-top: none; /* Ensure no top border */
}

/* Only show attachments container when it has content */
#chat-popup-attachments-container:not(:empty) {
    display: flex; /* Show when not empty */
}

/* Hide attachments container when empty */
#chat-popup-attachments-container:empty {
    padding: 0;
    height: 0;
    overflow: hidden;
}
#chat-popup-attachments-container .attachment-item {
    font-size: 0.8rem; /* Smaller attachments in chat */
    background-color: var(--bg-secondary-light);
    color: var(--text-color);
    border-color: var(--border-color);
    padding: 6px 10px;
    width: calc(50% - 5px); /* Two items per row on mobile */
}
#chat-popup-attachments-container .attachment-item .remove-attachment {
    color: var(--accent-color);
}

/* Mobile adjustments for attachments */
@media (max-width: 480px) {
    #chat-popup-attachments-container {
        padding: 0 8px 12px; /* Add bottom padding */
    }
    
    #chat-popup-attachments-container .attachment-item {
        width: 100%; /* Full width on very small screens */
        font-size: 0.75rem;
        padding: 5px 8px;
    }
}


/* Input Notification Styling (re-using from main page, ensure it's defined or copy here) */
.input-notification {
    font-size: 0.9rem; /* Slightly larger */
    color: var(--accent-color); /* Use accent color for errors */
    margin-top: 8px; /* More space */
    padding-left: 5px;
    display: block;
    font-weight: 500;
}

/* Mobile adjustments for input controls */
@media (max-width: 768px) {
    .input-controls {
        flex-wrap: wrap;
    }
    
    #ai-implementation-input {
        flex-basis: 100%;
        margin-bottom: 10px;
    }
    
    .icon-button {
        flex-grow: 0; /* Don't allow buttons to grow */
        border-radius: 50%; /* Keep buttons circular */
        margin: 0 5px; /* Add some horizontal spacing */
    }
}

/* Scrollbar styling for chat messages */
.chat-popup-messages::-webkit-scrollbar {
    width: 6px; /* Thinner scrollbar */
}
.chat-popup-messages::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 10px;
}
.chat-popup-messages::-webkit-scrollbar-thumb {
    background: var(--secondary-color); /* Use secondary color */
    border-radius: 10px;
}
.chat-popup-messages::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color); /* Darken on hover */
}

/* Blinking red shadow for input error */
@keyframes blinkRedShadow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 65, 54, 0.7); /* --error-red or similar */
    }
    50% {
        box-shadow: 0 0 10px 3px rgba(255, 65, 54, 0.7);
    }
}

.input-error-blink {
    animation: blinkRedShadow 1s ease-in-out 2; /* Play animation twice */
    border-color: var(--error-red) !important; /* Ensure border also indicates error */
}

/* Styles for chat audio player to resemble Telegram */
.chat-audio-player {
    display: flex;
    align-items: center;
    padding: 5px 0; /* Add some padding around the player */
    max-width: 100%; /* Ensure it fits within the message bubble */
}

.chat-audio-player .audio-play-pause {
    flex-shrink: 0; /* Prevent button from shrinking */
    /* Styles already applied via JS, but can be overridden or augmented here */
}

.chat-audio-player .waveform-placeholder {
    flex-grow: 1;
    height: 30px; /* Adjust height as needed */
    background-color: rgba(0, 0, 0, 0.1); /* Default placeholder color */
    border-radius: 3px;
    margin-left: 8px;
    margin-right: 8px;
    /* In a real implementation, this would be a canvas or series of divs */
}
.chat-message.user .chat-audio-player .waveform-placeholder {
    background-color: rgba(255, 255, 255, 0.2); /* Lighter for user messages */
}


.chat-audio-player .audio-duration {
    font-size: 0.8em;
    color: inherit; /* Inherit from chat message text color */
    flex-shrink: 0; /* Prevent duration from shrinking */
    margin-left: 8px;
}
