:root {
    --primary-color: #2563eb;
    --secondary-color: #3b82f6;
    --accent-color: #00b4d8;
    --dark-color: #1e3a8a;
    --light-color: #f8fafc;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    min-height: 100vh; /* Ensure page is tall enough for footer */
}

.navbar {
    background-color: var(--dark-color);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-highlight {
    color: var(--accent-color);
}

.hero-section {
    background: #FBFBFB;
    color: var(--dark-color);
    padding: 6rem 0 5rem;
    position: relative; /* For background image positioning */
}

.hero-section h1,
.hero-section p {
    color: var(--dark-color);
}

.services-section {
    background: var(--light-color);
}

.process-section {
    background: linear-gradient(135deg, #e6f0fa, var(--light-color));
}

.cases-section {
    background: white;
}

.cases-section .card {
    background: var(--light-color);
}

.cta-section {
    background: var(--primary-color);
}

.contact-section {
    background: var(--light-color);
}

.footer {
    background: var(--dark-color);
    position: relative;
    z-index: 3; /* Ensure footer is above hero-bg and hero-section overlay */
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.5rem 1.5rem;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-light {
    color: var(--dark-color);
    border-color: var(--dark-color);
}

.btn-outline-light:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.service-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s;
    height: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.integration-steps {
    counter-reset: step;
}

.integration-step::before {
    counter-increment: step;
    content: counter(step);
    background: var(--primary-color);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-weight: bold;
}

.free-step::before {
    background: var(--accent-color);
}

.ai-animation {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.25);
}

.invalid-feedback {
    display: none;
}

.was-validated .form-control:invalid ~ .invalid-feedback {
    display: block;
}

.hero-variant {
    display: none;
}

.hero-variant.active {
    display: block;
}

/* Кнопка "Наверх" */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 10000; /* Above footer and other elements */
    cursor: pointer;
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

/* Стили для ссылки на политику */
.policy-link {
    color: var(--primary-color);
    text-decoration: underline;
}

.policy-link:hover {
    color: var(--secondary-color);
}

/* Ensure all sections are above hero-bg and hero-section overlay */
section {
    position: relative;
    z-index: 3;
}

/* Ensure text-center blocks are visible */
.text-center {
    opacity: 1;
    visibility: visible;
}

/* Ensure headings and lead text are visible */
.text-center h2,
.text-center p.lead {
    color: inherit;
    opacity: 1;
}

/* Mobile view adjustments for hero-section image */
@media (max-width: 991px) {
    .hero-section {
        position: relative;
        background: none; /* Remove background from hero-section */
        min-height: 100vh; /* Ensure section covers viewport height */
    }
    .hero-bg {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-image: url('bg_100.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        z-index: -1; /* Place background below all content */
    }
    .hero-section::before {
        content: '';
        position: absolute; /* Tie to hero-section */
        top: 0;
        left: 0;
        width: 100%;
        height: 100%; /* Match hero-section height */
        background: rgba(255, 255, 255, 0.85);
        z-index: 1; /* Above hero-bg, below content */
    }
    .hero-section .container {
        position: relative;
        z-index: 2; /* Ensure content is above background and overlay */
    }
    .ai-animation {
        display: none;
    }
}

/* Hide hero-bg on desktop */
@media (min-width: 992px) {
    .hero-bg {
        display: none;
    }
}