/* ============================================
   MAIN LAYOUT & SECTION STYLING
   ============================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: var(--font-primary);
    color: var(--text-primary);
    background-color: transparent;
    /* Changed from var(--bg-body) to reveal .bg-scene */
    line-height: var(--leading-normal);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: var(--font-bold);
    margin-top: 0;
    color: var(--text-primary);
}

:root {
    /* Colors - Primary */
    --color-primary: #15EDC9;
    --color-primary-light: #4DF4DA;
    --color-primary-dark: #0BC9A8;
    --color-primary-glow: rgba(21, 237, 201, 0.4);

    /* Colors - Secondary */
    --color-secondary-teal: #10B8A0;
    --color-secondary-dark: #0A8A75;

    /* Colors - Background */
    --bg-body: #080C16;
    --bg-level1: #0F1419;
    --bg-level2: #1A1F2E;
    --bg-level3: #252B3A;

    /* Colors - Text */
    --text-primary: #FFFFFF;
    --text-secondary: #B0B8C8;
    --text-muted: #6B7280;

    /* Colors - Border */
    --border-default: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(21, 237, 201, 0.3);

    /* Colors - Status */
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;

    /* Typography - Font Family */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;

    /* Typography - Font Size */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;

    /* Typography - Font Weight */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Typography - Line Height */
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.75;

    /* 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;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow-primary: 0 0 20px rgba(21, 237, 201, 0.5), 0 0 40px rgba(21, 237, 201, 0.3);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #15EDC9 0%, #0BC9A8 100%);
    --gradient-intense: linear-gradient(135deg, #4DF4DA 0%, #15EDC9 100%);
    --gradient-text: linear-gradient(135deg, #4DF4DA 0%, #0BC9A8 100%);
    --gradient-text-silver: linear-gradient(135deg, #ffffff 0%, #B0B8C8 100%);
    --gradient-subtle: linear-gradient(135deg, #15EDC9 0%, #10B8A0 100%);
    --gradient-background_blob: radial-gradient(circle, rgba(21, 237, 201, 0.15) 0%, transparent 70%);

    /* Layers */
    --z-negative: -1;
    --z-normal: 1;
    --z-tooltip: 10;
    --z-fixed: 100;
    --z-modal: 1000;
}

.section-padding {
    padding: var(--space-4xl) 0;
    /* Зменшено в 2 рази з 160px -> used space-4xl (96px) for consistency */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}

/* Specific overlay for About section */
#about {
    position: relative;
    /* Transparent to show global bg-scene */
    background: transparent;

    /* Override section-padding defaults */
    min-height: auto;
    padding: 50px 0;
}

@media (min-width: 992px) {
    #about {
        padding: 70px 0;
    }
}

#about .container {
    position: relative;
    z-index: 2;
    /* Ensure text is above overlay */
}

/* Градієнтна підкладка для кожної секції */
section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-background_blob);
    pointer-events: none;
    z-index: var(--z-negative);
}

.container {
    max-width: 1200px;
    /* Keep standard max-width, or move to var if needed */
    margin: 0 auto;
    padding: 0 var(--space-lg);
    width: 100%;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 88vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: transparent;
}

.hero-slider {
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    background-color: var(--bg-body);
    /* Ensure solid background behind image to hide global grid */
    overflow: hidden;
}

.hero-slide.active {
    opacity: 1;
    z-index: var(--z-normal);
}

/* Parallax Background Image */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.7;
    /* Increased opacity for better visibility */
    transform: scale(1.1);
    transition: transform 10s ease, opacity 1s ease, filter 0.5s ease;
    filter: blur(0);
    z-index: 0;
}

.hero-bg.low-res {
    filter: blur(10px);
}

/* Gradient Overlay for Text Readability */
.hero-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 100%);
    z-index: var(--z-normal);
    pointer-events: none;
}

.hero-slide.active .hero-bg {
    transform: scale(1);
    opacity: 0.8;
    /* Slightly brighter on active */
}

.hero-content {
    position: relative;
    z-index: 2;
    /* Ensure content is above overlay */
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Align to bottom */
    padding-bottom: 120px;
    /* Space for pagination */
    max-width: 800px;
}

/* Ensure content is above bg */
.container {
    position: relative;
    z-index: 2;
}

/* Fix for Hero Content Alignment */
.hero-slide .container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-content {
    max-width: 800px;
    text-align: left;
    transform: scale(0.9);
    transform-origin: bottom left;
}

.hero-subtitle {
    font-size: var(--text-base);
    /* Reduced by 25% from 20px -> ~16px (text-base) */
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    line-height: var(--leading-normal);
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-md);
    align-items: flex-start;
}

.hero-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--bg-body);
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow-primary);
}

.hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21, 237, 201, 0.6);
    /* Custom glow expansion */
    background: var(--text-primary);
    color: var(--bg-body);
}

.hero-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    background: var(--border-default);
    border: 1px solid var(--border-default);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.3s ease;
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: var(--text-primary);
}

.hero-nav {
    position: absolute;
    bottom: 50px;
    left: 0;
    width: 100%;
    z-index: 100;
}

.hero-dots-wrapper {
    display: flex;
    gap: 15px;
}

.hero-dot {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.3;
    /* Less bright */
    position: relative;
    overflow: hidden;
}

.hero-dot.active {
    width: 32px;
    /* 4x radius (assuming radius 4px -> 8px width? User said 4x radius of normal dot. Normal dot is 8px. Radius 4px. Width 32px sounds right for a pill) */
    background: var(--border-default);
    opacity: 1;
}

.hero-dot.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--color-primary);
    border-radius: 4px;
    animation: progressFill 6s linear forwards;
    /* Matches JS interval */
}

@keyframes progressFill {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

h2.animate-header,
.hero-content h1 {
    font-size: clamp(28px, 4vw, 54px);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.1;
    line-height: 1.1;
    background: var(--gradient-text-silver);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    max-width: 100%;
    /* Allow full width of container */
    width: 100%;
    /* Ensure it takes full width */
    text-align: left !important;
    /* Force left alignment */
    display: block;
    /* Ensure block behavior */
}

/* Fix for split characters messing up layout */
.split-word {
    display: inline-block;
    white-space: normal;
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-top: var(--space-md);
    /* Fixed negative margin */
    margin-bottom: var(--space-2xl);
    max-width: 800px;
    /* Limit width for readability */
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    line-height: 1.6;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* Slightly wider min-width */
    gap: var(--space-xl);
}

/* ... mobile media query handles overrides ... */

.stat-item {
    background: var(--bg-level2);
    padding: var(--space-2xl);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-default);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
}

.stat-number {
    font-size: var(--text-5xl);
    font-weight: var(--font-bold);
    color: var(--color-secondary-teal-bright);
    margin-bottom: var(--space-sm);
    line-height: 1;
    /* Requested fix for desktop */
}

.stat-label {
    font-size: var(--text-lg);
    /* 18px */
    font-weight: var(--font-semibold);
}

.stat-sublabel {
    font-size: var(--text-sm);
    color: var(--text-muted);
    /* Standardizing */
    margin-top: var(--space-xs);
}

/* How It Works Section */
#services {
    margin-top: 50px;
    padding-bottom: 50px;
}

@media (min-width: 992px) {
    #services {
        margin-top: 70px;
        padding-bottom: 70px;
    }
}

/* Timeline Steps (How it works) */
.steps-timeline-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    padding: var(--space-md) 0;
}

.timeline-step {
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
    position: relative;
    text-align: left;
    flex: 1;
}

.timeline-icon-wrap {
    position: relative;
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
}

.timeline-icon {
    width: 64px;
    height: 64px;
    background: rgba(21, 237, 201, 0.05);
    border: 1px solid rgba(21, 237, 201, 0.3);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--color-primary);
    position: relative;
    z-index: 2;
    box-shadow: 0 0 15px rgba(21, 237, 201, 0.1);
    transition: all 0.3s ease;
}

.timeline-step:hover .timeline-icon {
    background: rgba(21, 237, 201, 0.1);
    border-color: var(--color-primary);
    box-shadow: 0 0 25px rgba(21, 237, 201, 0.3);
    transform: translateY(-5px);
}

/* Connector Logic */
.timeline-connector {
    position: absolute;
    top: 75px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: calc(100% - 10px);
    /* Extend to next step */
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.connector-line {
    flex-grow: 1;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-primary) 0%, rgba(21, 237, 201, 0.1) 100%);
    opacity: 0.5;
}

.connector-arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--color-primary);
    opacity: 0.5;
    margin-top: -2px;
}


.step-badge {
    position: absolute;
    top: -8px;
    right: 0;
    transform: translateX(20%);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary-teal-bright));
    color: #000;
    font-weight: 800;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    z-index: 3;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.timeline-content h3 {
    font-size: var(--text-lg);
    color: var(--color-primary-light);
    margin-bottom: var(--space-sm);
    font-weight: 600;
}


/* Portfolio / Projects Carousel */
#portfolio {
    padding-top: 20px;
    padding-bottom: 20px;
    /* Reduced bottom padding further */
    position: relative;
    /* Removed min-height if it was there implicitly or explicitly */
    min-height: auto !important;
}

@media (min-width: 992px) {
    #portfolio {
        padding-top: 30px;
        padding-bottom: 30px;
    }
}

.portfolio-slider-container {
    margin-top: var(--space-lg);
    padding: 0;
    /* Remove side padding to allow full-width bleeding */
    padding-bottom: 60px;
    /* Increased space for lower pagination */
    /* Fade out edges using mask */
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.project-card {
    background: var(--bg-level2);
    border-radius: 32px;
    /* iPhone style rounding */
    overflow: hidden;
    border: 1px solid var(--border-default);
    transition: all 0.5s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: left;
    position: relative;
    /* For button positioning */
    /* Inactive slide styles (will be overridden by .swiper-slide-active) */
    opacity: 0.4;
    transform: scale(0.9);
}

/* Active Slide Styles - Make active + next visible (since we show 2) */
.swiper-slide-active .project-card,
.swiper-slide-next .project-card {
    opacity: 1;
    transform: scale(1);
    border-color: var(--color-primary);
}

.swiper-slide-active .project-card {
    box-shadow: 0 10px 30px -10px rgba(21, 237, 201, 0.2);
}

/* Hover effect only on active slide */
.swiper-slide-active .project-card:hover,
.swiper-slide-next .project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    position: relative;
    height: 240px;
    width: 100%;
    overflow: hidden;
    border-radius: 32px 32px 0 0;
    /* Match card radius */
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.active-hover-state .project-image img {
    transform: scale(1.05);
    /* Applied via js or parent hover */
}

/* simpler hover targeting */
.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8, 12, 22, 0.9), transparent);
}

/* Badges */
.project-badges {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    z-index: 2;
}

.badge-tech,
.badge-term,
.badge-qty {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(5px);
    letter-spacing: 0.5px;
}

.badge-tech {
    background: var(--color-primary);
    color: #000;
}

.badge-term {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-qty {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.project-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    justify-content: space-between;
}

.project-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.3;
}

.project-specs {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--color-secondary-teal-bright);
    font-weight: 500;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Flex Footer for Description + Button */
.project-card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
}

.project-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.5;
    opacity: 0.8;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-project-calc {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    /* Squircle */
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
    flex-shrink: 0;
    opacity: 0;
    /* Hidden on inactive */
    transform: scale(0.8);
}

/* Show button on active and next slides */
.swiper-slide-active .btn-project-calc,
.swiper-slide-next .btn-project-calc {
    opacity: 1;
    transform: scale(1);
}

.btn-project-calc:hover {
    background: var(--color-primary);
    color: #000;
    transform: translateY(-2px);
}

/* Swiper Nav Overrides - HIDDEN */
.portfolio-slider-container .swiper-button-next,
.portfolio-slider-container .swiper-button-prev {
    display: none !important;
}

/* Progress Bar Pagination - Hero Style Match */
.portfolio-slider-container .swiper-pagination {
    bottom: 0 !important;
    position: relative !important;
    margin-top: var(--space-xl);
    left: 0 !important;
    width: 100% !important;
    text-align: left !important;
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    z-index: 10;
}

.portfolio-slider-container .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    opacity: 0.3;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin: 0 !important;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.portfolio-slider-container .swiper-pagination-bullet-active {
    width: 32px;
    background: var(--border-default);
    opacity: 1;
    box-shadow: 0 0 10px rgba(21, 237, 201, 0.4);
}

.portfolio-slider-container .swiper-pagination-bullet-active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--color-primary);
    border-radius: 4px;
    animation: progressFill 6s linear forwards;
}

.timeline-content p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Desktop Horizontal Layout */
@media (min-width: 992px) {
    .steps-timeline-wrapper {
        flex-direction: row;
        gap: var(--space-lg);
    }

    .timeline-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .timeline-icon-wrap {
        width: 100%;
        height: auto;
        margin-bottom: var(--space-md);
        align-items: center;
    }

    /* Horizontal Connector */
    .timeline-connector {
        top: 32px;
        /* Center with icon (64px / 2) */
        left: 50%;
        transform: none;
        /* Reset X transform */
        width: 100%;
        /* Spans to next element */
        height: 20px;
        /* Container height for arrow positioning */
        flex-direction: row;
        /* Horizontal line */
        align-items: center;
        /* Shift right to start after current icon */
        padding-left: 40px;
        /* Half icon width + buffer */
        pointer-events: none;
    }

    .connector-line {
        height: 2px;
        width: 100%;
        background: linear-gradient(to right, var(--color-primary) 0%, rgba(21, 237, 201, 0.1) 100%);
    }

    .connector-arrow {
        border-top: 5px solid transparent;
        border-bottom: 5px solid transparent;
        border-left: 5px solid var(--color-primary);
        /* Right pointing arrow */
        margin-top: 0;
        margin-left: -2px;
    }

    .step-badge {
        right: 50%;
        transform: translateX(200%);
        /* Position slightly right of center top */
        top: -5px;
    }
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

.portfolio-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    /* 20px -> ~1.25rem. using xl (1rem) or 2xl (1.5rem) */
    overflow: hidden;
    border: 1px solid var(--border-default);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    border-color: var(--color-primary);
    box-shadow: 0 20px 40px rgba(21, 237, 201, 0.1);
}

.portfolio-img {
    width: 100%;
    height: 250px;
    /* Layout constraint, keeping px or moving to var if strictly needed. Keeping px for layout stability often okay but var preferred. */
    object-fit: cover;
}

.portfolio-info {
    padding: var(--space-xl);
    /* 25px -> 1.5rem (24px) */
    text-align: left;
}

.portfolio-info h3 {
    font-size: var(--text-xl);
    /* 20px */
    margin-bottom: var(--space-md);
}

.portfolio-meta {
    display: flex;
    gap: var(--space-md);
    font-size: var(--text-sm);
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

/* Pricing Table */
.pricing-container {
    overflow-x: visible;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-xl);
    padding: var(--space-md);
    border: 1px solid var(--border-default);
    position: relative;
    z-index: 5;
}

table.pricing-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    position: relative;
}

.pricing-table th,
.pricing-table td {
    padding: var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.pricing-table th {
    color: var(--color-primary);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.price-tag {
    font-weight: var(--font-bold);
    color: var(--text-primary);
}

.discount-range-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    /* Center the badges */
}

/* Center aligned columns */
.pricing-table th:nth-child(3),
.pricing-table td:nth-child(3) {
    text-align: center;
}

.discount-badge {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--bg-body);
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 900;
    box-shadow: 0 0 10px var(--color-primary-glow);
    text-align: center;
    white-space: nowrap;
    width: fit-content;
}

.discount-global-note {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-top: 15px;
    text-align: right;
    font-style: italic;
    width: 100%;
}

@media (max-width: 768px) {
    .discount-global-note {
        text-align: center;
        margin-top: 10px;
        padding: 0 10px;
    }
}

.material-name-cell {
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

/* Info Icon & Tooltip */
.info-icon-wrapper {
    position: relative;
    display: none;
    /* Hidden on desktop */
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-primary);
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    font-family: serif;
    border: 1px solid var(--border-default);
}

.info-tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: var(--bg-level2);
    border: 1px solid var(--color-primary);
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: #fff;
    width: 220px;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    white-space: normal;
}

/* Toggle Class */
.info-icon.active+.info-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Pricing CTA Button Override */
.pricing-cta .hero-btn-primary {
    font-size: 14px;
    padding: 12px 24px;
    cursor: pointer;
}

/* ============================================
   MOBILE RESPONSIVENESS (PRICING SPECIFIC)
   ============================================ */
@media (max-width: 768px) {

    /* Hide Usage Column */
    .pricing-table th.usage-col,
    .pricing-table td.usage-col {
        display: none !important;
    }

    /* Reduce Padding & Adjust Font */
    .pricing-table th,
    .pricing-table td {
        padding: 12px 6px;
        font-size: 13px;
    }

    .pricing-table th {
        font-size: 11px;
        white-space: nowrap;
    }

    /* Force Column Widths */
    .pricing-table th:first-child,
    .pricing-table td:first-child {
        width: 35%;
    }

    .pricing-table th:nth-child(2),
    .pricing-table td:nth-child(2) {
        width: 25%;
    }

    .pricing-table th:nth-child(3),
    .pricing-table td:nth-child(3) {
        width: 40%;
        text-align: center;
    }

    /* Show Info Icon on Mobile */
    .info-icon-wrapper {
        display: inline-flex;
    }

    .info-tooltip {
        left: -80px;
        width: 200px;
        background: #1A1F2E;
    }

    .pricing-container {
        padding: 8px 0px;
        margin-left: -12px;
        margin-right: -12px;
    }

    .discount-badge {
        padding: 2px 6px;
        font-size: 11px;
    }

    .discount-note {
        font-size: 9px;
    }
}


/* Payment Section Redesign */
#payment {
    background: radial-gradient(circle at 80% 20%, rgba(21, 237, 201, 0.05) 0%, transparent 50%);
    min-height: auto;
}

.payment-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 80px;
    align-items: center;
    text-align: left;
}

.payment-left {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.payment-left h2 {
    margin-bottom: 10px;
    line-height: 1.1;
}

.payment-features-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pay-feature-row {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
}

.pay-feature-row i {
    color: var(--color-primary);
    font-size: 20px;
}

/* Right Side: The Interactive Card */
.payment-card-container {
    position: relative;
    z-index: 5;
}

.payment-card {
    background: #0D1117;
    /* Solid Dark Background for contrast */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.payment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* This centers children vertically */
    margin-bottom: 30px;
    gap: 20px;
    line-height: 1;
    /* Normalize line height for the whole container */
}

.payment-card-header h4 {
    margin: 0;
    padding: 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    height: 40px;
    /* Matching the tabs height for perfect axis */
}

.payment-tabs.compact {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 100px;
    gap: 4px;
    height: 40px;
    /* Fixed height for consistent axis */
    box-sizing: border-box;
    margin-bottom: 0;
}

.pay-tab {
    height: 32px;
    /* Inner height */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
    line-height: 1;
}

.pay-tab.active {
    background: var(--color-primary);
    color: #000;
}

/* List Styling */
.check-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    transition: transform 0.2s ease;
}

.check-list li:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.05);
}

.check-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 14px;
}

/* Official Bottom Blocks */
.payment-bottom-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.info-block {
    background: rgba(21, 237, 201, 0.04);
    border: 1px solid rgba(21, 237, 201, 0.1);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-block i {
    font-size: 28px;
    color: var(--color-primary);
    opacity: 0.7;
}

.info-text strong {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.info-text span {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Floating BG Icon */
.payment-bg-icon {
    position: absolute;
    right: -10%;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 1;
    filter: blur(20px);
}

/* Mobile */
@media (max-width: 992px) {
    .payment-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .payment-left {
        align-items: center;
    }

    .payment-features-list {
        text-align: left;
    }

    .payment-card-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
    }

    .payment-card-header h4 {
        font-size: 12px;
    }

    .payment-tabs.compact .pay-tab {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* FAQ Accordion */
#faq {
    min-height: auto;
}

.faq-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: start;
}

@media (max-width: 768px) {
    .faq-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .faq-question {
        padding: 15px 20px !important;
        font-size: 15px !important;
    }

    .faq-icon {
        font-size: 14px !important;
    }
}

.faq-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    overflow: hidden;
    border: 1px solid var(--border-default);
}

.faq-question {
    padding: var(--space-lg);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: var(--font-semibold);
    font-size: var(--text-lg);
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-primary);
}

.faq-icon {
    font-size: var(--text-xl);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: var(--color-primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 var(--space-lg);
}

.faq-answer p {
    padding-bottom: var(--space-lg);
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    padding: 20px 25px;
    max-height: 800px;
}

.faq-item.active .faq-question {
    color: var(--accent-teal);
    background: rgba(21, 237, 201, 0.05);
}

/* Payment Switcher */
.payment-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.pay-tab {
    padding: 15px 40px;
    background: var(--bg-level2);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    border: 1px solid var(--border-default);
    transition: all 0.3s ease;
}

.pay-tab.active {
    background: var(--color-primary);
    color: var(--bg-body);
    border-color: var(--color-primary);
}

.pricing-cta {
    text-align: center;
    margin-top: 50px;
}

.pricing-cta .btn-primary {
    padding: 18px 45px;
    font-size: 18px;
    letter-spacing: 0.02em;
    box-shadow: var(--shadow-glow_primary);
}

/* ============================================
   CALCULATOR (QUIZ) MODAL
   ============================================ */

.calculator-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.calculator-modal {
    background: var(--bg-level1);
    border: 1px solid var(--border-default);
    width: 95%;
    max-width: 400px;
    /* Round 2 Compactness */
    border-radius: var(--radius-xl);
    padding: var(--space-md);
    /* Round 2 Compactness */
    position: relative;
    transform: scale(0.9) translateY(30px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    max-height: 80vh;
    /* Round 2 Compactness */
    overflow-y: auto;
    font-size: 13px;
    /* Round 2 Compactness */
}

.calculator-overlay.active .calculator-modal {
    transform: scale(1) translateY(0);
}

.calc-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: var(--bg-level3);
    border: none;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calc-close:hover {
    background: var(--bg-level4);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.calc-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    /* Компактнее */
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-level3);
    border: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
}

.step-dot.active {
    background: var(--gradient-primary);
    color: var(--bg-body);
    border-color: transparent;
    box-shadow: var(--shadow-glow_primary);
}

.step-line {
    width: 40px;
    height: 2px;
    background: var(--border-default);
}

.calc-title {
    font-family: var(--font-display);
    font-size: 18px;
    /* Round 2 Compactness */
    margin-bottom: var(--space-sm);
    text-align: center;
    background: var(--gradient-text_primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.calc-step {
    display: none;
}

.calc-step.active {
    display: block;
    animation: calcFadeIn 0.5s ease;
}

@keyframes calcFadeIn {
    from {
        opacity: 0;
        transform: translateX(15px);
    }

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

.form-group {
    margin-bottom: 12px;
    /* Round 2 Compactness */
}

/* Branded Slider */
.form-group.full-width input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--bg-level3);
    border-radius: 4px;
    outline: none;
    padding: 0;
    margin-top: 8px;
    cursor: pointer;
}

.form-group.full-width input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    box-shadow: 0 0 10px var(--color-primary-glow);
    transition: all 0.2s ease;
    border: 2px solid var(--bg-level2);
}

.form-group.full-width input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px var(--color-primary-glow);
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.calc-select,
.calculator-modal input[type="number"],
.calculator-modal input[type="text"],
.calculator-modal input[type="tel"],
.calculator-modal input[type="email"],
.calculator-modal textarea {
    width: 100%;
    background: var(--bg-level2);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 8px 12px;
    /* Round 2 Compactness */
    color: var(--text-primary);
    font-size: 14px;
    /* Round 2 Compactness */
    transition: all 0.3s ease;
}

.calc-select:focus,
.calculator-modal input:focus,
.calculator-modal textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--bg-level3);
    box-shadow: 0 0 15px var(--color-primary-glow);
}

.form-row {
    display: flex;
    gap: var(--space-md);
}

.col {
    flex: 1;
}

.calc-warning {
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-muted);
    background: rgba(21, 237, 201, 0.05);
    padding: 10px 14px;
    border-left: 2px solid var(--color-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: var(--space-md);
}

.calc-summary {
    background: var(--bg-level2);
    padding: var(--space-md);
    /* Уменьшено с space-xl */
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-primary-glow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.calc-summary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0.03;
}

.summary-line {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    z-index: 1;
}

#calc-total-price {
    font-size: 32px;
    /* Уменьшено с 42px */
    font-weight: 900;
    color: var(--color-primary);
    letter-spacing: -0.02em;
    filter: drop-shadow(0 0 10px var(--color-primary-glow));
}

.discount-badge {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--bg-body);
    font-size: 10px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-top: 10px;
    text-transform: uppercase;
}

/* Step 2 Specials */
.file-upload {
    border: 2px dashed var(--border-default);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: var(--bg-level2);
}

.file-upload:hover {
    border-color: var(--color-primary);
    background: var(--bg-level3);
}

.file-upload input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.messenger-selector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.messenger-option {
    cursor: pointer;
}

.messenger-option input {
    display: none;
}

.messenger-icon {
    height: 54px;
    background: var(--bg-level2);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.messenger-icon img {
    width: 24px;
    height: 24px;
    opacity: 0.7;
    filter: brightness(0) invert(1);
    /* Сделать белыми */
    transition: all 0.4s ease;
}

.messenger-option input:checked+.messenger-icon {
    border-color: var(--color-primary);
    background: var(--bg-level3);
    box-shadow: 0 0 20px var(--color-primary-glow);
    transform: translateY(-4px);
}

.messenger-option input:checked+.messenger-icon img {
    opacity: 1;
    /* Turquoise Filter for #13ecc8 from White */
    filter: invert(82%) sepia(28%) saturate(996%) hue-rotate(107deg) brightness(95%) contrast(92%);
    transform: scale(1.2);
}

.calc-btns {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
    /* Уменьшено (Round 2) */
}

.calc-btns .btn-primary {
    max-width: fit-content;
    padding-left: 30px;
    padding-right: 30px;
    background: var(--color-primary);
    color: var(--bg-level1);
    box-shadow: 0 0 20px var(--color-primary-glow);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    height: 44px;
    /* Round 2 Compactness */
    display: flex;
    align-items: center;
    justify-content: center;
}

.calc-btns .btn-primary:hover {
    box-shadow: 0 0 30px var(--color-primary-glow);
    transform: translateY(-2px);
    background: var(--color-secondary-teal-bright);
    /* Assuming defined or fallback needed */
    color: var(--text-primary);
    /* FORCE WHITE TEXT ON HOVER */
    filter: brightness(1.1);
}

.btn-secondary {
    border: 1px solid var(--border-default);
    background: transparent;
    color: var(--text-primary);
    padding: 14px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--bg-level2);
    border-color: var(--text-muted);
}

.form-group.full-width {
    width: 100% !important;
    grid-column: 1 / -1 !important;
    flex: 0 0 100% !important;
}

/* ============================================
   SERVICES SECTION (SPLIT TILES)
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    /* 6 columns for flexible spanning */
    gap: var(--space-md);
    max-width: 1200px;
    margin: 0 auto;
}

.service-tile {
    position: relative;
    height: 380px;
    /* Increased height for better content fit */
    background: var(--bg-level2);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    grid-column: span 2;
    /* Default: 3 items in a row (6/2=3) */
}

/* Row 2: Center the 2 items */
.service-tile:nth-child(4) {
    grid-column: 2 / span 2;
    /* Start at col 2 */
}

.service-tile:nth-child(5) {
    grid-column: 4 / span 2;
    /* Start at col 4 */
}

.service-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary-dark);
}

/* Problem Side (Left) */
.service-problem {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.service-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    color: var(--text-secondary);
    transition: color 0.3s ease;
    position: relative;
    z-index: 10;
    line-height: 1.2;
    /* Ensure title wraps and doesn't overflow into the solution side */
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 45%;
    /* Keep within the left 50% area */
    margin: 0;
    padding: 0;
}

.service-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* Solution Side (Right/Overlay) */
.service-solution {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-level3) 0%, var(--bg-level2) 100%);
    border-left: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Centered initially */
    z-index: 20;
    /* Above problem side */
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease;
    overflow: hidden;
}

.solution-content {
    padding: var(--space-lg);
    text-align: center;
    width: 100%;
    /* Ensure content takes full width */
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

/* Icon Animation Keyframes */
@keyframes iconFloat {
    0% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-5px) scale(1.05);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

.service-icon {
    font-size: 3.5rem;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
    transition: transform 0.3s ease;
    /* Apply idle animation */
    animation: iconFloat 4s ease-in-out infinite;
}

/* Stagger animations for chaos effect */
.service-tile:nth-child(2) .service-icon {
    animation-delay: 1s;
}

.service-tile:nth-child(3) .service-icon {
    animation-delay: 2.5s;
}

.service-tile:nth-child(4) .service-icon {
    animation-delay: 0.5s;
}

.service-tile:nth-child(5) .service-icon {
    animation-delay: 3s;
}

.solution-desc {
    font-size: var(--text-base);
    color: var(--text-primary);
    line-height: 1.6;
    opacity: 0;
    /* Hidden initially */
    transform: translateY(20px);
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
    display: none;
    /* Removed from flow initially */
    /* Readability fix */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Updated CTA Styling */
.service-cta {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease 0.2s, transform 0.4s ease 0.2s, background-color 0.2s;
    display: none;
    padding: 10px 24px;
    background: var(--color-primary);
    color: var(--bg-body);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-decoration: none;
    margin-top: var(--space-md);
    box-shadow: 0 4px 15px rgba(0, 255, 157, 0.2);
}

.service-cta:hover {
    background: #00d685;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 157, 0.4);
}

/* Hover State */
.service-tile:hover .service-problem {
    opacity: 0;
    /* Fully hide problem side on hover */
}

.service-tile:hover .service-solution {
    width: 100%;
    /* Darker gradient for better text contrast */
    background: linear-gradient(135deg, rgba(8, 12, 22, 0.99) 0%, rgba(5, 7, 10, 1) 100%);
    border-left: none;
}

.service-tile:hover .solution-content {
    opacity: 1;
    align-items: center;
    /* Center everything on hover too for better balance with CTA */
    text-align: center;
    padding: var(--space-xl);
}

.service-tile:hover .service-icon {
    color: var(--color-primary);
    /* Keep accent color */
    transform: scale(0.9);
    /* Slightly smaller on hover to make room */
    margin-bottom: var(--space-xs);
    animation: none;
    /* Stop floating on hover for stability */
}

.service-tile:hover .solution-title {
    color: var(--text-primary);
    /* White text */
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-sm);
    display: block;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.service-tile:hover .solution-desc {
    display: block;
    opacity: 1;
    transform: translateY(0);
    color: var(--text-secondary);
    /* Light grey text */
    font-weight: 400;
}

.service-tile:hover .service-cta {
    display: inline-block;
    opacity: 1;
    transform: translateY(0);
}

/* Initial state adjustments for smooth transition */
.solution-title {
    display: none;
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on tablet */
    }

    .service-tile {
        grid-column: span 1;
    }

    /* Reset specific positioning for tablet */
    .service-tile:nth-child(4),
    .service-tile:nth-child(5) {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile: Always slightly expanded or vertical stack */
    .service-tile {
        height: auto;
        min-height: 250px;
        display: flex;
        flex-direction: column;
        grid-column: span 1 !important;
    }

    .service-problem {
        position: relative;
        height: auto;
        padding: var(--space-md);
        display: none;
    }

    .service-solution {
        position: relative;
        width: 100%;
        height: auto;
        border-left: none;
        background: var(--bg-level2);
        padding: var(--space-lg) 0;
        z-index: 1;
    }

    .solution-content {
        opacity: 1;
        transform: translateY(0);
    }

    .solution-desc {
        display: block;
        opacity: 1;
        transform: translateY(0);
        color: var(--text-secondary);
        text-shadow: none;
    }

    .solution-title {
        display: block;
        color: var(--text-primary);
        font-size: var(--text-xl);
        font-weight: 700;
        margin-bottom: var(--space-sm);
    }

    .service-cta {
        display: inline-block;
        opacity: 1;
        transform: translateY(0);
        margin-top: var(--space-md);
    }

    .service-tile:hover .service-solution {
        background: var(--bg-level2);
    }

    .service-tile:hover .solution-title,
    .service-tile:hover .solution-desc,
    .service-tile:hover .service-icon {
        color: inherit;
        /* Reset colors */
    }

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

/* ============================================
   MAIN FOOTER
   ============================================ */
.site-footer {
    background: #05070a;
    /* Slightly darker than body #080C16 */
    padding: 30px 0;
    border-top: 1px solid var(--border-default);
    margin-top: 80px;
    position: relative;
    z-index: 10;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

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

.footer-logo-text {
    font-weight: 700;
    font-family: var(--font-display);
    letter-spacing: 0.1em;
    font-size: 16px;
}

.footer-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-info-item i {
    color: var(--color-primary);
    font-size: 14px;
}

.footer-nav {
    display: flex;
    gap: 25px;
    align-items: center;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

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

.footer-policy {
    opacity: 0.6;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 13px;
}

@media (max-width: 1024px) {
    .footer-inner {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 20px;
    }

    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px 25px;
    }
}

/* ============================================
   MOBILE RESPONSIVENESS (MOVED TO END FOR CASCADE)
   ============================================ */
@media (max-width: 768px) {
    .section-padding {
        padding: var(--space-xl) 0;
        min-height: auto;
    }

    .container {
        padding: 0 var(--space-md);
    }

    .section-subtitle {
        font-size: var(--text-base);
        text-align: left;
        margin-bottom: var(--space-lg);
        margin-top: 0;
    }

    .stats-grid {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-sm);
        /* Negative margin removed to avoid overflow issues, gap handles spacing */
    }

    .stat-item {
        /* EXPLICIT PADDING OVERRIDE: 12px */
        padding: 12px !important;
        flex: 1 1 calc(50% - var(--space-sm));
        box-sizing: border-box;
    }

    /* First item takes full width (top block) */
    .stat-item:nth-child(1) {
        flex: 1 1 100%;
        width: 100%;
    }

    /* 2nd and 3rd share the row (50% each) */
    .stat-item:nth-child(2),
    .stat-item:nth-child(3) {
        max-width: calc(50% - var(--space-sm));
    }

    .stat-number {
        font-size: calc(var(--text-2xl) * 1.1);
        /* +10% from base 2xl */
        margin-bottom: 10px;
        /* Requested 10px vertical gap */
        line-height: 1;
        /* Requested 1em */
    }

    .stat-label {
        font-size: var(--text-xs);
        line-height: 1.2;
    }

    .stat-sublabel {
        font-size: 10px;
        margin-top: 10px;
        /* Requested 10px vertical gap */
    }

    /* Force smaller headers on mobile */
    h1,
    .hero-content h1 {
        font-size: var(--text-4xl) !important;
    }

    h2,
    h2.animate-header {
        font-size: var(--text-3xl) !important;
        margin-bottom: var(--space-md);
    }
}