/* Montreal SEO - Main Stylesheet
 * Design: Clean, professional with sea-related elements
 * Colors: #f3f3f3, #ffd100, #b4b4b4, #000000
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    /* Colors */
    --color-primary: #ffd100;
    --color-primary-dark: #e6bc00;
    --color-secondary: #000000;
    --color-light: #f3f3f3;
    --color-gray: #b4b4b4;
    --color-gray-dark: #666666;
    --color-white: #ffffff;
    --color-text: #1a1a1a;
    --color-text-light: #555555;

    /* Typography */
    --font-primary: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Roboto Slab', Georgia, serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Layout */
    --container-max: 1200px;
    --container-wide: 1400px;
    --header-height: 80px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* ========================================
   Reset & Base Styles
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-secondary);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-family: var(--font-display);
    font-weight: 700;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-family: var(--font-display);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: var(--space-md);
}

.text-accent {
    color: var(--color-primary);
}

.text-light {
    color: var(--color-text-light);
}

/* ========================================
   Layout
   ======================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-wide {
    max-width: var(--container-wide);
}

.section {
    padding: var(--space-4xl) 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}

.section-header h2 {
    margin-bottom: var(--space-md);
}

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

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--color-secondary);
    color: var(--color-white);
}

.btn-secondary:hover {
    background: #222;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}

.btn-outline:hover {
    background: var(--color-secondary);
    color: var(--color-white);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* ========================================
   Header & Navigation
   ======================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--color-white);
    height: var(--header-height);
    transition: var(--transition-base);
    border-bottom: 1px solid transparent;
}

.site-header.scrolled {
    box-shadow: var(--shadow-sm);
    border-bottom-color: var(--color-light);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-icon {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-secondary);
}

.logo-accent {
    color: var(--color-primary);
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-links > li > a {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-weight: 500;
    color: var(--color-text);
    padding: var(--space-sm) 0;
    position: relative;
}

.nav-links > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition-base);
}

.nav-links > li > a:hover::after,
.nav-links > li > a.active::after {
    width: 100%;
}

.nav-links > li > a.active {
    color: var(--color-secondary);
}

/* Dropdown Arrow */
.dropdown-arrow {
    transition: var(--transition-fast);
}

.has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.has-dropdown {
    position: relative;
}

.has-dropdown > a {
    position: relative;
}

/* Bridge element to prevent gap hover issues */
.has-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--color-white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    min-width: 240px;
    padding: var(--space-sm) 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
    z-index: 1000;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    color: var(--color-text);
    transition: var(--transition-fast);
}

.dropdown-menu li a:hover,
.dropdown-menu li a.active {
    background: var(--color-light);
    color: var(--color-secondary);
}

.dropdown-menu li a.active {
    border-left: 3px solid var(--color-primary);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.875rem;
    font-weight: 500;
}

.lang-switcher a {
    color: var(--color-gray-dark);
    padding: var(--space-xs);
}

.lang-switcher a:hover,
.lang-switcher a.active {
    color: var(--color-secondary);
}

.lang-divider {
    color: var(--color-gray);
}

.header-cta {
    display: none;
}

@media (min-width: 1024px) {
    .header-cta {
        display: inline-flex;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    width: 32px;
    height: 32px;
    position: relative;
    z-index: 100;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-secondary);
    position: relative;
    transition: var(--transition-base);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--color-secondary);
    transition: var(--transition-base);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* Mobile Menu Active State */
.mobile-menu-toggle.active .hamburger {
    background: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.mobile-menu-toggle.active .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-white) 0%, var(--color-light) 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

/* Sea Wave Animation */
.hero-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background-repeat: repeat-x;
    animation: wave-animation 15s linear infinite;
}

.wave-1 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffd100' fill-opacity='0.2' d='M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: 50% 100%;
    opacity: 0.8;
    animation-duration: 20s;
}

.wave-2 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23b4b4b4' fill-opacity='0.2' d='M0,64L48,80C96,96,192,128,288,128C384,128,480,96,576,106.7C672,117,768,171,864,181.3C960,192,1056,160,1152,144C1248,128,1344,128,1392,128L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: 50% 100%;
    opacity: 0.6;
    animation-duration: 25s;
    animation-direction: reverse;
}

.wave-3 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23000000' fill-opacity='0.05' d='M0,256L48,240C96,224,192,192,288,181.3C384,171,480,181,576,186.7C672,192,768,192,864,176C960,160,1056,128,1152,128C1248,128,1344,160,1392,176L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: 50% 100%;
    animation-duration: 30s;
}

@keyframes wave-animation {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Floating Elements */
.floating-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--color-primary);
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--color-secondary);
    bottom: 30%;
    left: 5%;
    animation-delay: -5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: var(--color-gray);
    top: 50%;
    right: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(20px) rotate(-5deg);
    }
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
        order: 1;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-illustration {
        order: 2;
        max-width: 400px;
        margin: 0 auto;
        margin-top: var(--space-xl);
    }
}

.hero h1 {
    margin-bottom: var(--space-lg);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
    max-width: 600px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* ========================================
   Services Section
   ======================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--space-xl);
}

.service-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: var(--transition-base);
    border: 1px solid var(--color-light);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-base);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: var(--color-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    transition: var(--transition-base);
}

.service-card:hover .service-icon {
    background: var(--color-primary);
}

.service-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--color-secondary);
    fill: none;
    stroke-width: 2;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.service-card p {
    color: var(--color-text-light);
    margin-bottom: var(--space-lg);
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-weight: 600;
    color: var(--color-secondary);
}

.service-link svg {
    width: 16px;
    height: 16px;
    transition: var(--transition-fast);
}

.service-card:hover .service-link svg {
    transform: translateX(4px);
}

/* ========================================
   About Preview Section
   ======================================== */
.about-preview {
    background: var(--color-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.about-image-accent {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 200px;
    height: 200px;
    background: var(--color-primary);
    border-radius: var(--radius-lg);
    z-index: -1;
}

.about-text h2 {
    margin-bottom: var(--space-lg);
}

.about-text p {
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-gray);
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-secondary);
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* ========================================
   Process Section
   ======================================== */
.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
    position: relative;
}

.process-steps::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-gray));
}

.process-step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 80px;
    height: 80px;
    background: var(--color-white);
    border: 3px solid var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-secondary);
    position: relative;
    z-index: 1;
    transition: var(--transition-base);
}

.process-step:hover .step-number {
    background: var(--color-primary);
    transform: scale(1.1);
}

.process-step h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
}

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

/* ========================================
   Testimonials Section
   ======================================== */
.testimonials {
    background: var(--color-secondary);
    color: var(--color-white);
}

.testimonials .section-header h2,
.testimonials .section-header p {
    color: var(--color-white);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-base);
}

.testimonial-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
}

.testimonial-stars {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.testimonial-stars svg {
    width: 20px;
    height: 20px;
    fill: var(--color-primary);
}

.testimonial-text {
    font-size: 1.0625rem;
    line-height: 1.7;
    margin-bottom: var(--space-lg);
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.author-avatar {
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--color-secondary);
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.author-role {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
    background: var(--color-primary);
    padding: var(--space-3xl) 0;
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    margin-bottom: var(--space-md);
}

.cta-content p {
    font-size: 1.125rem;
    margin-bottom: var(--space-xl);
    color: var(--color-text);
}

/* ========================================
   Page Hero (Internal Pages)
   ======================================== */
.page-hero {
    padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-3xl);
    background: linear-gradient(135deg, var(--color-light) 0%, var(--color-white) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100'%3E%3Cpath fill='%23ffffff' d='M0,50 C480,100 960,0 1440,50 L1440,100 L0,100 Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
}

.page-hero h1 {
    margin-bottom: var(--space-md);
}

.page-hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--color-text-light);
}

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

.breadcrumb span {
    color: var(--color-gray);
}

/* ========================================
   Team Section
   ======================================== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

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

.team-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto var(--space-lg);
    overflow: hidden;
    border: 4px solid var(--color-light);
    transition: var(--transition-base);
}

.team-member:hover .team-photo {
    border-color: var(--color-primary);
    transform: scale(1.05);
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-member h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.team-member .role {
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.team-member p {
    color: var(--color-text-light);
    font-size: 0.9375rem;
}

/* ========================================
   Values Section
   ======================================== */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.value-card {
    text-align: center;
    padding: var(--space-xl);
    background: var(--color-light);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
}

.value-card:hover {
    background: var(--color-white);
    box-shadow: var(--shadow-lg);
}

.value-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-lg);
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.value-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--color-secondary);
}

.value-card h3 {
    margin-bottom: var(--space-sm);
}

.value-card p {
    color: var(--color-text-light);
    margin-bottom: 0;
}

/* ========================================
   Contact Form
   ======================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
}

.contact-form {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--color-light);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.contact-info {
    padding: var(--space-xl);
}

.contact-info h3 {
    margin-bottom: var(--space-xl);
}

.info-item {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.info-icon {
    width: 48px;
    height: 48px;
    background: var(--color-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-secondary);
}

.info-content h4 {
    margin-bottom: var(--space-xs);
}

.info-content p,
.info-content a {
    color: var(--color-text-light);
}

.info-content a:hover {
    color: var(--color-primary);
}

/* ========================================
   FAQ Section
   ======================================== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--color-light);
}

.faq-question {
    width: 100%;
    padding: var(--space-lg) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    font-weight: 600;
    font-size: 1.0625rem;
    color: var(--color-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.faq-question:hover {
    color: var(--color-primary);
}

.faq-icon {
    width: 24px;
    height: 24px;
    transition: var(--transition-base);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: var(--transition-base);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding-bottom: var(--space-lg);
}

.faq-answer p {
    color: var(--color-text-light);
    margin-bottom: 0;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
    background: var(--color-secondary);
    color: var(--color-white);
    padding-top: var(--space-4xl);
    position: relative;
}

.footer-wave {
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    height: 60px;
    color: var(--color-secondary);
}

.footer-wave svg {
    width: 100%;
    height: 100%;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-3xl);
    padding-bottom: var(--space-3xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
    margin-bottom: var(--space-lg);
}

.footer-brand .logo-text {
    color: var(--color-white);
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-lg);
}

.footer-social {
    display: flex;
    gap: var(--space-md);
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.social-link:hover {
    background: var(--color-primary);
    color: var(--color-secondary);
}

.footer-nav h4,
.footer-services h4,
.footer-contact h4 {
    color: var(--color-white);
    margin-bottom: var(--space-lg);
}

.footer-nav ul li,
.footer-services ul li {
    margin-bottom: var(--space-sm);
}

.footer-nav ul a,
.footer-services ul a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-fast);
}

.footer-nav ul a:hover,
.footer-services ul a:hover {
    color: var(--color-primary);
}

.footer-contact address {
    font-style: normal;
}

.footer-contact p {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    padding: var(--space-lg) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-legal {
    display: flex;
    gap: var(--space-lg);
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.5);
}

.footer-legal a:hover {
    color: var(--color-white);
}

/* ========================================
   Error Page (404)
   ======================================== */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--header-height) var(--space-lg);
}

.error-page h1 {
    font-size: 8rem;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: var(--space-md);
}

.error-page h2 {
    margin-bottom: var(--space-md);
}

.error-page > .container > p {
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
}

.error-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-bottom: var(--space-3xl);
}

.popular-pages h3 {
    margin-bottom: var(--space-lg);
}

.popular-pages ul {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
}

.popular-pages a {
    color: var(--color-text-light);
}

.popular-pages a:hover {
    color: var(--color-primary);
}

/* ========================================
   Service Page Styles
   ======================================== */
.service-hero {
    padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-3xl);
    background: linear-gradient(135deg, var(--color-light) 0%, var(--color-white) 100%);
}

.service-hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.service-hero h1 {
    margin-bottom: var(--space-lg);
}

.service-intro {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
}

.service-process {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.process-item {
    padding: var(--space-xl);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-light);
    transition: var(--transition-base);
}

.process-item:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.process-item-number {
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: var(--space-md);
}

.includes-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
}

.includes-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--color-light);
    border-radius: var(--radius-md);
}

.includes-list svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.case-study-snippet {
    background: var(--color-secondary);
    color: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.case-study-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

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

.case-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    display: block;
}

.case-stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

.related-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .contact-grid {
        grid-template-columns: 1fr;
    }

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

    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-steps::before {
        display: none;
    }
}

/* Body when menu is open */
body.menu-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .site-header .container {
        padding: 0 var(--space-md);
    }

    .main-nav {
        gap: var(--space-md);
    }

    /* Mobile Menu Toggle Button */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1001;
        order: 3;
        width: 44px;
        height: 44px;
        background: transparent;
        border: none;
        cursor: pointer;
    }

    /* Mobile Navigation Container */
    .nav-links {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-white);
        flex-direction: column;
        padding: 0;
        gap: 0;
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    /* Main Navigation Items */
    .nav-links > li {
        width: 100%;
        border-bottom: 1px solid var(--color-light);
    }

    .nav-links > li:last-child {
        border-bottom: none;
    }

    .nav-links > li > a {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        font-weight: 500;
        color: var(--color-text);
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--color-white);
        transition: background 0.2s ease, color 0.2s ease;
    }

    .nav-links > li > a:hover {
        background: var(--color-light);
    }

    .nav-links > li > a.active {
        color: var(--color-secondary);
    }

    .nav-links > li > a::after {
        display: none;
    }

    /* Dropdown Arrow */
    .has-dropdown > a .dropdown-arrow {
        width: 12px;
        height: 12px;
        transition: transform 0.3s ease;
    }

    .has-dropdown.active > a .dropdown-arrow {
        transform: rotate(180deg);
    }

    /* Dropdown Menu */
    .dropdown-menu {
        position: static !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
        box-shadow: none;
        min-width: 0;
        width: 100%;
        padding: 0;
        margin: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        max-height: 0;
        overflow: hidden;
        background: var(--color-light);
        border-radius: 0;
        transition: opacity 0.3s ease, max-height 0.3s ease, visibility 0.3s ease;
    }

    .has-dropdown:hover .dropdown-menu {
        opacity: 0;
        visibility: hidden;
        max-height: 0;
    }

    .has-dropdown.active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        max-height: 600px;
    }

    .dropdown-menu li {
        width: 100%;
    }

    .dropdown-menu li a {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
        font-weight: 400;
        color: var(--color-text);
        display: block;
        width: 100%;
        box-sizing: border-box;
        background: var(--color-light);
        border-left: none;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .dropdown-menu li a:hover {
        background: #e8e8e8;
        color: var(--color-secondary);
    }

    .dropdown-menu li a.active {
        color: var(--color-secondary);
        background: #e8e8e8;
    }

    /* Header Actions (Language Switcher & CTA) */
    .header-actions {
        display: none;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--color-white);
        padding: 1rem 1.5rem;
        border-top: 1px solid var(--color-light);
        justify-content: space-between;
        align-items: center;
        z-index: 1000;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }

    .nav-links.active ~ .header-actions {
        display: flex;
    }

    .header-cta {
        display: inline-flex;
    }

    .lang-switcher {
        font-size: 0.875rem;
    }

    .lang-switcher a {
        padding: 0.25rem 0.5rem;
    }

    .lang-switcher a.active {
        font-weight: 700;
        color: var(--color-secondary);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .process-steps {
        grid-template-columns: 1fr;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .case-study-stats {
        grid-template-columns: 1fr;
    }

    .error-page h1 {
        font-size: 5rem;
    }

    .error-actions {
        flex-direction: column;
    }

    .popular-pages ul {
        flex-direction: column;
        gap: var(--space-md);
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    :root {
        --header-height: 70px;
    }

    .site-header .container {
        padding: 0 var(--space-sm);
    }

    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .mobile-menu-toggle {
        width: 36px;
        height: 36px;
    }

    .hero h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-illustration {
        max-width: 300px;
    }

    .nav-links > li > a {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }

    .dropdown-menu li a {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .header-actions {
        padding: 0.75rem 1rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .page-hero h1 {
        font-size: 1.75rem;
    }

    .cta-content h2 {
        font-size: 1.5rem;
    }

    .header-actions {
        padding: var(--space-sm) var(--space-md);
    }

    .header-cta {
        font-size: 0.75rem;
        padding: var(--space-xs) var(--space-sm);
    }
}

/* ========================================
   Animations & Utilities
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.mt-1 { margin-top: var(--space-md); }
.mt-2 { margin-top: var(--space-lg); }
.mt-3 { margin-top: var(--space-xl); }
.mt-4 { margin-top: var(--space-2xl); }

.mb-1 { margin-bottom: var(--space-md); }
.mb-2 { margin-bottom: var(--space-lg); }
.mb-3 { margin-bottom: var(--space-xl); }
.mb-4 { margin-bottom: var(--space-2xl); }

.pt-1 { padding-top: var(--space-md); }
.pt-2 { padding-top: var(--space-lg); }
.pt-3 { padding-top: var(--space-xl); }
.pt-4 { padding-top: var(--space-2xl); }

.pb-1 { padding-bottom: var(--space-md); }
.pb-2 { padding-bottom: var(--space-lg); }
.pb-3 { padding-bottom: var(--space-xl); }
.pb-4 { padding-bottom: var(--space-2xl); }

/* Loading state for forms */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success/Error messages */
.form-message {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ========================================
   SVG Illustrations & Animations
   ======================================== */
.hero-illustration,
.service-illustration,
.about-illustration,
.process-illustration {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.hero-illustration svg,
.service-illustration svg,
.about-illustration svg,
.process-illustration svg {
    width: 100%;
    height: auto;
}

/* Float Animations */
.float-slow {
    animation: floatSlow 6s ease-in-out infinite;
}

.float-medium {
    animation: floatMedium 4s ease-in-out infinite;
}

.float-keywords {
    animation: floatKeywords 5s ease-in-out infinite;
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes floatMedium {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes floatKeywords {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(1deg); }
}

/* Fade Animations */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.stagger-fade > * {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.stagger-fade > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-fade > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-fade > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-fade > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-fade > *:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Slide Animations */
.slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

.slide-in-right.delay-1 { animation-delay: 0.1s; }
.slide-in-right.delay-2 { animation-delay: 0.2s; }
.slide-in-right.delay-3 { animation-delay: 0.3s; }
.slide-in-right.delay-4 { animation-delay: 0.4s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-up {
    animation: slideUp 1s ease-out forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse Animations */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.pulse-slow {
    animation: pulse 3s ease-in-out infinite;
}

.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

.pulse-glow.delay-2 {
    animation-delay: 0.5s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.4; }
}

/* Draw Line Animation */
.draw-line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawLine 1.5s ease-out forwards;
}

.draw-lines line {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawLine 1s ease-out forwards;
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

/* Typing Animation */
.typing-animation {
    animation: typing 2s steps(20) infinite;
}

@keyframes typing {
    0%, 100% { width: 0; }
    50% { width: 120px; }
}

.typing-lines .line {
    opacity: 0;
    animation: typeLine 0.5s ease-out forwards;
}

.typing-lines .line.delay-1 { animation-delay: 0.2s; }
.typing-lines .line.delay-2 { animation-delay: 0.4s; }
.typing-lines .line.delay-3 { animation-delay: 0.6s; }

@keyframes typeLine {
    from {
        opacity: 0;
        width: 0;
    }
    to {
        opacity: 1;
    }
}

/* Bounce Animations */
.bounce-up {
    animation: bounceUp 2s ease-in-out infinite;
}

.bounce-pin {
    animation: bouncePin 1s ease-in-out infinite;
    transform-origin: center bottom;
}

@keyframes bounceUp {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

/* Pop In Animation */
.pop-in {
    animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    opacity: 0;
}

.pop-in.delay-3 { animation-delay: 0.3s; }
.pop-in.delay-4 { animation-delay: 0.4s; }

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Blink Animation */
.blink {
    animation: blink 1.5s ease-in-out infinite;
}

.blink.delay-1 { animation-delay: 0.5s; }
.blink.delay-2 { animation-delay: 1s; }

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Rotate Animations */
.rotate-gear {
    animation: rotateGear 8s linear infinite;
    transform-origin: center;
}

.rotate-gear-reverse {
    animation: rotateGear 6s linear infinite reverse;
    transform-origin: center;
}

@keyframes rotateGear {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.radar-sweep {
    animation: radarSweep 3s linear infinite;
    transform-origin: 100px 100px;
}

@keyframes radarSweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Gauge Fill Animation */
.gauge-fill {
    animation: gaugeFill 2s ease-out forwards;
    transform: rotate(-90deg);
    transform-origin: center;
}

@keyframes gaugeFill {
    from { stroke-dashoffset: 176; }
    to { stroke-dashoffset: 33; }
}

/* Expand Animations */
.expand-radius {
    animation: expandRadius 3s ease-in-out infinite;
}

.expand-circle {
    animation: expandCircle 2s ease-out forwards;
}

@keyframes expandRadius {
    0%, 100% { r: 60; opacity: 0.3; }
    50% { r: 70; opacity: 0.1; }
}

@keyframes expandCircle {
    from {
        r: 0;
        opacity: 0;
    }
    to {
        r: 70;
        opacity: 1;
    }
}

/* Star Animation */
.star {
    animation: starPop 0.5s ease-out forwards;
    opacity: 0;
    transform: scale(0);
}

.star.delay-1 { animation-delay: 0.1s; }
.star.delay-2 { animation-delay: 0.2s; }
.star.delay-3 { animation-delay: 0.3s; }
.star.delay-4 { animation-delay: 0.4s; }

@keyframes starPop {
    from {
        opacity: 0;
        transform: scale(0) rotate(-20deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Write Animation */
.write-animation {
    animation: writeMotion 2s ease-in-out infinite;
}

@keyframes writeMotion {
    0%, 100% { transform: translate(0, 0) rotate(-45deg); }
    25% { transform: translate(-10px, 10px) rotate(-45deg); }
    50% { transform: translate(-5px, 15px) rotate(-45deg); }
    75% { transform: translate(-15px, 5px) rotate(-45deg); }
}

/* Float Icons */
.float-icons > * {
    animation: floatIcon 4s ease-in-out infinite;
}

.float-icons > *:nth-child(2) {
    animation-delay: 2s;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

/* Float Code */
.float-code {
    animation: floatCode 5s ease-in-out infinite;
}

@keyframes floatCode {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(-15px); opacity: 0.8; }
}

/* Delay Classes */
.delay-1 { animation-delay: 0.1s !important; }
.delay-2 { animation-delay: 0.2s !important; }
.delay-3 { animation-delay: 0.3s !important; }
.delay-4 { animation-delay: 0.4s !important; }

/* ========================================
   What We Do - Keyword Carousel
   ======================================== */
.what-we-do-section {
    padding: var(--space-3xl) 0;
    overflow: hidden;
    background: linear-gradient(180deg, var(--color-white) 0%, var(--color-light) 100%);
}

.keywords-carousel-wrapper {
    margin-top: var(--space-2xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.carousel-row {
    overflow: hidden;
    position: relative;
}

.carousel-track {
    display: flex;
    gap: var(--space-md);
    width: max-content;
    will-change: transform;
}

/* Row 1 - Left direction, 240s */
.carousel-row[data-direction="left"][data-speed="240"] .carousel-track {
    animation: scrollLeft 240s linear infinite;
}

/* Row 2 - Right direction, 220s */
.carousel-row[data-direction="right"][data-speed="220"] .carousel-track {
    animation: scrollRight 220s linear infinite;
}

/* Row 3 - Left direction, 280s */
.carousel-row[data-direction="left"][data-speed="280"] .carousel-track {
    animation: scrollLeft 280s linear infinite;
}

@keyframes scrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scrollRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* Pause animation on hover */
.carousel-row:hover .carousel-track {
    animation-play-state: paused;
}

/* Keyword Chips */
.keyword-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-white);
    border: 2px solid var(--color-light);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
    position: relative;
}

.keyword-chip:hover {
    border-color: var(--color-primary);
    background: var(--color-secondary);
    color: var(--color-white);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.keyword-chip:active {
    transform: translateY(-1px) scale(0.98);
}

.chip-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.keyword-chip:hover .chip-icon {
    opacity: 1;
}

.chip-icon svg {
    width: 100%;
    height: 100%;
}

/* Glowing effect for chips */
.keyword-chip::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    opacity: 0;
    z-index: -1;
    transition: opacity var(--transition-fast);
    filter: blur(8px);
}

.keyword-chip:hover::before {
    opacity: 0.4;
}

/* ========================================
   Keyword Popup Modal
   ======================================== */
.keyword-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.keyword-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.keyword-popup {
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    transform: translateY(30px) scale(0.95);
    transition: all 0.3s ease;
}

.keyword-popup-overlay.active .keyword-popup {
    transform: translateY(0) scale(1);
}

.popup-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-light);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background: var(--color-secondary);
    transform: rotate(90deg);
}

.popup-close svg {
    width: 24px;
    height: 24px;
    color: var(--color-text);
    transition: color 0.2s ease;
}

.popup-close:hover svg {
    color: var(--color-white);
}

.popup-content {
    padding: var(--space-2xl);
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-light) transparent;
}

.popup-content::-webkit-scrollbar {
    width: 8px;
}

.popup-content::-webkit-scrollbar-track {
    background: transparent;
}

.popup-content::-webkit-scrollbar-thumb {
    background: var(--color-light);
    border-radius: 4px;
}

.popup-content::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Content styling inside popup */
.popup-content #aio_content {
    font-family: var(--font-family);
}

.popup-content .article {
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid var(--color-light);
}

.popup-content .article:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popup-content h1 {
    font-size: 1.75rem;
    color: var(--color-text);
    margin-bottom: var(--space-lg);
    line-height: 1.3;
}

.popup-content h2 {
    font-size: 1.375rem;
    color: var(--color-text);
    margin: var(--space-xl) 0 var(--space-md);
}

.popup-content p {
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.popup-content ul,
.popup-content ol {
    margin: var(--space-md) 0;
    padding-left: var(--space-xl);
    color: var(--color-text-light);
}

.popup-content li {
    margin-bottom: var(--space-sm);
    line-height: 1.7;
}

.popup-content a {
    color: var(--color-secondary);
    font-weight: 600;
    transition: color 0.2s ease;
}

.popup-content a:hover {
    color: var(--color-primary);
}

.popup-content figure {
    margin: var(--space-lg) 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-light);
}

.popup-content figure.image {
    padding: var(--space-lg);
    text-align: center;
}

.popup-content figcaption {
    font-size: 0.875rem;
    color: var(--color-text-light);
    font-style: italic;
    margin-top: var(--space-sm);
}

.popup-content b,
.popup-content strong {
    color: var(--color-text);
    font-weight: 700;
}

/* Responsive Carousel */
@media (max-width: 768px) {
    .keywords-carousel-wrapper {
        gap: var(--space-md);
    }

    .keyword-chip {
        padding: var(--space-xs) var(--space-md);
        font-size: 0.75rem;
    }

    .chip-icon {
        width: 14px;
        height: 14px;
    }

    .keyword-popup {
        max-height: 90vh;
        border-radius: var(--radius-lg);
    }

    .popup-content {
        padding: var(--space-lg);
    }

    .popup-close {
        top: var(--space-md);
        right: var(--space-md);
        width: 40px;
        height: 40px;
    }

    .popup-content h1 {
        font-size: 1.375rem;
        padding-right: var(--space-2xl);
    }

    .popup-content h2 {
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {
    .what-we-do-section .container {
        padding: 0 var(--space-md);
    }

    .keyword-popup-overlay {
        padding: var(--space-md);
    }

    .popup-content {
        padding: var(--space-md);
        padding-top: var(--space-2xl);
    }
}
