/* ========== ОСНОВНЫЕ СТИЛИ ========== */
:root {
    --bg-color: #ffffff;
    --bg-color-alpha: rgba(255, 255, 255, 0.85);
    --bg-overlay: rgba(255, 255, 255, 0.75);
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-accent: #eef6ff;
    --bg-price-block: #f8fafc;
    --bg-case: rgba(10, 30, 60, 0.85);
    --bg-case-card: rgba(255, 255, 255, 0.05);
    --text-primary: #0a1e3c;
    --text-secondary: #1e293b;
    --text-muted: #475569;
    --text-subtle: #64748b;
    --text-inverted: #ffffff;
    --border-color: #eef2f6;
    --border-input: #e2e8f0;
    --border-hover: #d0e0ff;
    --brand-primary: #0051a8;
    --brand-secondary: #003752;
    --brand-hover: #1a6dd4;
    --link-color: #2f80ed;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --bg-color-alpha: rgba(15, 23, 42, 0.85);
    --bg-overlay: rgba(15, 23, 42, 0.75);
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --bg-accent: #334155;
    --bg-price-block: #1e293b;
    --bg-case: rgba(15, 23, 42, 0.85);
    --bg-case-card: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    --text-subtle: #94a3b8;
    --text-inverted: #0f172a;
    --border-color: #334155;
    --border-input: #475569;
    --border-hover: #475569;
    --brand-primary: #38bdf8;
    --brand-secondary: #7dd3fc;
    --brand-hover: #0ea5e9;
    --link-color: #38bdf8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-secondary);
    background-color: var(--bg-color);
    line-height: 1.5;
    scroll-behavior: smooth;
    position: relative;
}

/* Контейнер для Vanta-фона */
#vanta-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    /* фон позади всего */
    pointer-events: none;
}

/* Полупрозрачная подложка на всю страницу */
#page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    /* регулируйте прозрачность */
    backdrop-filter: blur(2px);
    /* лёгкое размытие для эстетики */
    z-index: -1;
    /* между фоном и контентом */
    pointer-events: none;
}

/* Остальной контент поверх подложки */
.container,
header,
main,
footer,
section,
.overlay,
.mobile-menu,
.modal {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

header.container {
    position: sticky;
    top: 0;
    background-color: var(--bg-color-alpha);
    backdrop-filter: blur(12px);
    z-index: 98;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

html {
    scroll-padding-top: 80px;
}

.logo {
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    cursor: pointer;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.8;
}

.logo span {
    color: var(--brand-primary);
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 16px;
    transition: color 0.2s;
    position: relative;
}

.nav a:hover {
    color: var(--link-color);
}

.nav a:hover::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--link-color);
    border-radius: 2px;
}

.nav a.active {
    color: var(--link-color);
    font-weight: 600;
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--link-color);
}

.nav-phone {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 16px;
    transition: color 0.2s;
    margin-left: 16px;
}

.nav-phone:hover {
    color: var(--link-color);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-switcher {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 22px;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
    line-height: 1;
}

.theme-switcher:hover {
    background-color: var(--bg-accent);
    color: var(--text-primary);
}

.theme-switcher .icon-moon {
    display: none;
}

.theme-switcher .icon-sun {
    display: block;
}

[data-theme="dark"] .theme-switcher .icon-moon {
    display: block;
}

[data-theme="dark"] .theme-switcher .icon-sun {
    display: none;
}

.header-btn {
    background-color: var(--brand-secondary);
    color: var(--text-inverted);
    border: none;
    padding: 12px 24px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

[data-theme="light"] .header-btn {
    color: white;
}

.header-btn:hover {
    background-color: var(--brand-hover);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2.5px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    max-width: 85%;
    height: 100vh;
    background: var(--bg-color);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.05);
    padding: 80px 24px 30px;
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    border-left: 1px solid var(--border-color);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu .nav-links {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mobile-menu .nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 18px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.mobile-menu .nav-links a:hover {
    color: var(--link-color);
    padding-left: 8px;
    background: rgba(47, 128, 237, 0.05);
    border-radius: 12px;
}

.mobile-menu .nav-links a.active {
    color: var(--link-color);
}

.mobile-menu .header-btn {
    margin-top: 40px;
    width: 100%;
    text-align: center;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.hero {
    padding: 80px 0 60px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-content {
    flex: 1;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.hero h1 span {
    color: var(--brand-primary);
}

.hero p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 550px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    background-color: var(--brand-secondary);
    color: var(--text-inverted);
    border: none;
    padding: 16px 32px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
}

[data-theme="light"] .btn-primary {
    color: white;
}

.btn-primary:hover {
    background-color: var(--brand-hover);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border-input);
    padding: 16px 32px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-outline:hover {
    border-color: var(--brand-secondary);
    color: var(--brand-secondary);
}

.hero-image {
    flex: 1;
    background: transparent;
    border-radius: 32px;
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 320px;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-subtle);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px;
}

.pricing {
    padding: 80px 0;
}

.pricing-grid {
    display: block;
}

.tariff-section {
    margin-bottom: 48px;
}

.tariff-section:last-child {
    margin-bottom: 0;
}

.tariff-section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.pricing-subgrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.pricing-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 32px 24px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -8px rgba(47, 128, 237, 0.1);
    border-color: var(--border-hover);
}

.pricing-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.pricing-desc {
    font-size: 14px;
    color: var(--text-subtle);
    margin-bottom: 20px;
    min-height: 40px;
}

.pricing-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.pricing-price small {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-subtle);
}

.pricing-features {
    list-style: none;
    margin-bottom: 28px;
    flex: 1;
}

.pricing-features li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-features li::before {
    content: "✓";
    color: var(--brand-secondary);
    font-weight: bold;
}

.pricing-btn {
    background: var(--bg-card);
    border: 1.5px solid var(--brand-secondary);
    color: var(--brand-secondary);
    width: 100%;
    padding: 12px;
    border-radius: 100px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: auto;
}

.pricing-btn:hover {
    background: var(--brand-secondary);
    color: var(--text-inverted);
}

.pricing-select {
    width: 100%;
    padding: 12px;
    margin: 16px 0;
    border: 1.5px solid var(--border-input);
    border-radius: 16px;
    font-family: inherit;
    font-size: 15px;
    background-color: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
}

.pricing-select:focus {
    outline: none;
    border-color: var(--brand-secondary);
}

.services {
    padding: 80px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 36px 28px;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.2s;
}

.service-card:hover {
    box-shadow: 0 20px 30px -8px rgba(0, 0, 0, 0.05);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-accent);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--brand-secondary);
    font-size: 28px;
}

.service-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.service-desc {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.service-meta {
    display: flex;
    gap: 20px;
    color: var(--text-subtle);
    font-size: 15px;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.case {
    padding: 80px 0;
    background: var(--bg-case);
    backdrop-filter: blur(8px);
    color: #ffffff;
}

.case-card {
    background: var(--bg-case-card);
    backdrop-filter: blur(8px);
    border-radius: 32px;
    padding: 48px;
    display: flex;
    gap: 40px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.case-content {
    flex: 1;
}

.case-badge {
    background: var(--brand-secondary);
    color: var(--text-inverted);
    padding: 6px 16px;
    border-radius: 100px;
    display: inline-block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 20px;
}

[data-theme="light"] .case-badge {
    color: white;
}

.case-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.case-list {
    list-style: none;
    margin: 24px 0;
}

.case-list li {
    padding: 8px 0;
    display: flex;
    gap: 12px;
}

.case-list li::before {
    content: "→";
    color: var(--brand-secondary);
    font-weight: bold;
}

.case-stats {
    flex: 0 0 200px;
    text-align: center;
}

.benefits {
    padding: 80px 0;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.benefit-item {
    text-align: center;
    padding: 30px 20px;
}

.benefit-icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.benefit-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.contact {
    padding: 80px 0;
}

.contact-wrapper {
    display: flex;
    gap: 60px;
    background: var(--bg-card);
    border-radius: 40px;
    padding: 48px;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-size: 28px;
    margin-bottom: 24px;
}

.contact-detail {
    margin: 24px 0;
}

.contact-detail p {
    margin: 8px 0;
}

.contact-form {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 1.5px solid var(--border-input);
    border-radius: 16px;
    font-family: inherit;
    font-size: 16px;
    transition: border 0.2s;
    background-color: var(--bg-color);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand-secondary);
}

.form-group-checkbox {
    margin: 20px 0;
}

.form-group-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-submit {
    background: var(--brand-secondary);
    color: var(--text-inverted);
    border: none;
    padding: 16px 32px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 18px;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s;
}

[data-theme="light"] .form-submit {
    color: white;
}

.form-submit:hover {
    background: var(--brand-hover);
}

.footer {
    padding: 32px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-subtle);
}

.timeline-steps {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    max-width: 1000px;
    margin: 40px auto;
}

.timeline-step {
    flex: 1;
    text-align: center;
    padding: 0 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-steps.animate .timeline-step {
    opacity: 1;
    transform: translateY(0);
}

.timeline-circle {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    background: var(--bg-card);
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-input);
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.timeline-circle.filled {
    border-color: var(--brand-secondary);
}

.timeline-circle.filled span {
    color: var(--brand-secondary);
}

.timeline-circle.active {
    border-color: var(--brand-secondary);
    box-shadow: 0 0 0 4px rgba(47, 128, 237, 0.3), 0 4px 12px rgba(47, 128, 237, 0.2);
    transform: scale(1.02);
    animation: pulse 1.5s infinite;
}

.timeline-circle.active span {
    color: var(--brand-secondary);
}

.timeline-circle span {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-subtle);
    transition: color 0.3s ease;
}

.timeline-title {
    font-weight: 600;
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.timeline-days {
    font-size: 15px;
    color: var(--text-subtle);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(47, 128, 237, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(47, 128, 237, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(47, 128, 237, 0);
    }
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 0.7fr 1.2fr;
    gap: 24px;
    align-items: start;
}

.calc-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calc-field label {
    font-weight: 600;
    color: var(--text-primary);
}

.calc-field select,
.calc-field input {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid var(--border-input);
    border-radius: 20px;
    font-size: 16px;
    background: var(--bg-color);
    color: var(--text-primary);
    font-family: inherit;
}

.calc-field select:focus,
.calc-field input:focus {
    outline: none;
    border-color: var(--brand-secondary);
}

.price-block {
    background: var(--bg-price-block);
    border-radius: 20px;
    padding: 12px 18px;
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.price-main span:first-child {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.discount-badge {
    background: #e6f7e6;
    color: #0e9f6e;
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
}

.year-total {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-input);
    font-size: 15px;
}

.year-total strong {
    font-size: 18px;
    color: var(--text-primary);
}

.year-savings {
    font-size: 13px;
    color: var(--brand-secondary);
    margin-top: 6px;
}

.limit-message {
    font-size: 13px;
    color: var(--brand-secondary);
    margin-top: 6px;
}

.warning-message {
    margin-top: 16px;
    padding: 12px 18px;
    background: #fff3cd;
    border-radius: 16px;
    color: #856404;
    display: none;
}

.case-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 -12px;
}

.case-carousel-container {
    flex: 1;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    border-radius: 32px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.case-carousel-container::-webkit-scrollbar {
    display: none;
}

.case-carousel {
    display: flex;
    gap: 24px;
}

.case-card {
    flex: 0 0 100%;
    scroll-snap-align: start;
}

.carousel-arrow {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 32px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 5;
}

.carousel-arrow:hover {
    background: #003752;
    transform: scale(1.05);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.dot.active {
    background: white;
    width: 24px;
    border-radius: 5px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    max-width: 500px;
    width: 90%;
    border-radius: 32px;
    padding: 40px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-subtle);
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.modal p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

#modalTariff {
    background: var(--bg-color);
    border-radius: 16px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 15px;
    color: var(--text-primary);
    border-left: 4px solid var(--brand-secondary);
}

/* Новые стили для карточек разработки */
/* Quiz Modal specific styles */
.quiz-question {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.quiz-option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1.5px solid var(--border-input);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    background-color: var(--bg-card);
    /* Use bg-card for options */
}

.quiz-option-label:hover {
    border-color: var(--brand-secondary);
    background-color: var(--bg-accent);
}

.quiz-option-label input[type="radio"],
.quiz-option-label input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-subtle);
    border-radius: 50%;
    /* For radio */
    display: grid;
    place-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.quiz-option-label input[type="checkbox"] {
    border-radius: 4px;
    /* For checkbox */
}

.quiz-option-label input[type="radio"]::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.2s ease-in-out;
    background-color: var(--brand-secondary);
}

.quiz-option-label input[type="checkbox"]::before {
    content: "✓";
    font-size: 14px;
    color: var(--text-inverted);
    transform: scale(0);
    transition: transform 0.2s ease-in-out;
    background-color: var(--brand-secondary);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}

.quiz-option-label input[type="radio"]:checked {
    border-color: var(--brand-secondary);
}

.quiz-option-label input[type="radio"]:checked::before {
    transform: scale(1);
}

.quiz-option-label input[type="checkbox"]:checked {
    border-color: var(--brand-secondary);
    background-color: var(--brand-secondary);
}

.quiz-option-label input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.quiz-option-text {
    font-size: 16px;
    color: var(--text-primary);
    flex-grow: 1;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
}

.quiz-navigation button {
    flex: 1;
}

.quiz-result {
    text-align: center;
    padding: 30px 20px;
    background: var(--bg-accent);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.quiz-result h4 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.quiz-result-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 10px;
}

.quiz-result-desc {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Responsive adjustments for quiz modal */
@media (max-width: 768px) {
    .quiz-navigation {
        flex-direction: column;
    }

    .quiz-navigation button {
        width: 100%;
    }

    .quiz-question {
        font-size: 18px;
    }

    .quiz-option-text {
        font-size: 15px;
    }

    .quiz-result h4 {
        font-size: 20px;
    }

    .quiz-result-name {
        font-size: 24px;
    }
}

.dev-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.dev-service-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 32px 24px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.dev-service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -8px rgba(0, 0, 0, 0.05);
}

.dev-service-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-accent);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--brand-secondary);
    font-size: 28px;
}

.dev-service-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.dev-service-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.dev-service-price small {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-subtle);
}

.dev-service-features {
    list-style: none;
    margin-bottom: 28px;
    flex: 1;
}

.dev-service-features li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dev-service-features li::before {
    content: "✓";
    color: var(--brand-secondary);
    font-weight: bold;
}

.dev-service-btn {
    background: var(--bg-card);
    border: 1.5px solid var(--brand-secondary);
    color: var(--brand-secondary);
    width: 100%;
    padding: 12px;
    border-radius: 100px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: auto;
}

.dev-service-btn:hover {
    background: var(--brand-secondary);
    color: var(--text-inverted);
}

@media (max-width: 1024px) {
    .pricing-subgrid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dev-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 860px) {
    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .header-controls .header-btn {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        flex-direction: column;
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 36px;
    }

    .pricing-subgrid,
    .services-grid,
    .benefits-grid,
    .dev-services-grid {
        grid-template-columns: 1fr;
    }

    .case-card {
        flex-direction: column;
        padding: 32px;
        text-align: center;
    }

    .case-stats {
        margin-top: 20px;
    }

    .carousel-arrow {
        width: 36px;
        height: 36px;
        font-size: 24px;
    }

    .case-carousel {
        gap: 16px;
    }

    .contact-wrapper {
        flex-direction: column;
        padding: 32px;
    }

    .section-title {
        font-size: 30px;
    }

    .timeline-circle {
        width: 48px;
        height: 48px;
    }

    .timeline-circle span {
        font-size: 18px;
    }

    .timeline-title {
        font-size: 14px;
    }

    .timeline-days {
        font-size: 12px;
    }
}

/* Стили для секции партнёров */
.partners {
    padding: 80px 0;
    /*background: #fafcff;*/
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.partner-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 32px 24px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
}

.partner-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -8px rgba(0, 0, 0, 0.08);
    border-color: var(--border-hover);
}

.partner-logo {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

.partner-logo img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    transition: transform 0.2s;
}

.partner-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.partner-card p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 1024px) {
    .pricing-subgrid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dev-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 860px) {
    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .header-controls .header-btn {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        flex-direction: column;
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 36px;
    }

    .pricing-subgrid,
    .services-grid,
    .benefits-grid,
    .dev-services-grid,
    .partners-grid {
        grid-template-columns: 1fr;
    }

    .case-card {
        flex-direction: column;
        padding: 32px;
        text-align: center;
    }

    .case-stats {
        margin-top: 20px;
    }

    .carousel-arrow {
        width: 36px;
        height: 36px;
        font-size: 24px;
    }

    .case-carousel {
        gap: 16px;
    }

    .contact-wrapper {
        flex-direction: column;
        padding: 32px;
    }

    .section-title {
        font-size: 30px;
    }

    .timeline-circle {
        width: 48px;
        height: 48px;
    }

    .timeline-circle span {
        font-size: 18px;
    }

    .timeline-title {
        font-size: 14px;
    }

    .timeline-days {
        font-size: 12px;
    }

    .partner-card {
        padding: 24px 20px;
    }

    .partner-logo {
        height: 80px;
    }
}

/* ========== Анимация при скролле ========== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Задержка для элементов в сетке */
.stagger-animation>.animate-on-scroll:nth-child(1) {
    transition-delay: 0.1s;
}

.stagger-animation>.animate-on-scroll:nth-child(2) {
    transition-delay: 0.2s;
}

.stagger-animation>.animate-on-scroll:nth-child(3) {
    transition-delay: 0.3s;
}

.stagger-animation>.animate-on-scroll:nth-child(4) {
    transition-delay: 0.4s;
}

.stagger-animation>.animate-on-scroll:nth-child(5) {
    transition-delay: 0.5s;
}

.stagger-animation>.animate-on-scroll:nth-child(6) {
    transition-delay: 0.6s;
}

/* ========== Кнопка "Наверх" ========== */
.scroll-to-top {
    position: fixed;
    bottom: 80px;
    right: auto;
    left: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--brand-secondary);
    color: var(--text-inverted);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scroll-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--brand-hover);
}

[data-theme="light"] .scroll-to-top {
    color: white;
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ (до 768px) ===== */
@media (max-width: 768px) {

    /* Общие отступы */
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 30px 0;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .hero-buttons .btn-primary,
    .hero-buttons .btn-outline {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
        font-size: 16px;
    }

    .hero-image {
        min-height: 200px;
        padding: 20px;
    }

    .hero-image img {
        max-height: 200px !important;
    }

    /* Секции */
    .pricing,
    .services,
    .case,
    .benefits,
    .partners,
    .contact {
        padding: 40px 0;
    }

    .section-title {
        font-size: 26px;
    }

    .section-subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }

    /* Сетки — все в 1 колонку */
    .pricing-subgrid,
    .services-grid,
    .dev-services-grid,
    .benefits-grid,
    .partners-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Карточки услуг и разработки */
    .service-card,
    .dev-service-card {
        padding: 24px 20px;
    }

    .service-title,
    .dev-service-title {
        font-size: 20px;
    }

    .dev-service-price {
        font-size: 20px;
    }

    /* Калькулятор */
    .calculator-card {
        padding: 20px !important;
    }

    .calculator-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .calc-field select,
    .calc-field input {
        font-size: 15px;
        padding: 12px 16px;
    }

    .price-block {
        padding: 16px;
    }

    .price-main span:first-child {
        font-size: 28px;
    }

    .year-total strong {
        font-size: 16px;
    }

    .calculator-card .btn-primary {
        width: 100%;
        padding: 14px;
        font-size: 16px;
    }

    /* Кейсы (карусель) */
    .case-card {
        flex-direction: column;
        padding: 24px 20px;
        text-align: left;
    }

    .case-title {
        font-size: 22px;
    }

    .case-stats {
        flex: 0 0 auto;
        margin-top: 20px;
        text-align: left;
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
    }

    .case-stats .number {
        font-size: 24px;
    }

    .carousel-arrow {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .carousel-dots {
        margin-top: 20px;
    }

    /* Партнёры */
    .partner-card {
        padding: 20px;
    }

    .partner-logo {
        height: 70px;
    }

    .partner-logo img {
        max-height: 60px;
    }

    /* Контакты */
    .contact-wrapper {
        flex-direction: column;
        padding: 24px 20px;
        gap: 30px;
    }

    .contact-info h3 {
        font-size: 24px;
    }

    .contact-form input,
    .contact-form textarea {
        font-size: 15px;
        padding: 14px 16px;
    }

    .form-submit {
        font-size: 16px;
        padding: 14px;
    }

    /* Отзывы (если добавили) */
    .reviews-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    /* Таймлайн (шаги) */
    .timeline-steps {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }

    .timeline-step {
        flex: 0 0 calc(50% - 16px);
        max-width: calc(50% - 16px);
        text-align: center;
    }

    .timeline-circle {
        width: 48px;
        height: 48px;
        margin: 0 auto 8px;
    }

    .timeline-title {
        font-size: 14px;
    }

    .timeline-days {
        font-size: 12px;
    }

    /* Футер */
    .footer {
        padding: 24px 0;
        font-size: 14px;
    }

    /* Мобильное меню (уже есть, но проверим) */
    .mobile-menu .nav-links a {
        font-size: 18px;
        padding: 12px 0;
    }

    .mobile-menu .header-btn {
        font-size: 16px;
        padding: 14px;
    }

    /* Кнопка "Наверх" */
    .scroll-to-top {
        width: 44px;
        height: 44px;
        font-size: 22px;
        bottom: 20px;
        right: 20px;
    }
}

/* ===== ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (до 480px) ===== */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 24px;
    }

    .section-title {
        font-size: 22px;
    }

    .pricing-price {
        font-size: 24px;
    }

    .pricing-name {
        font-size: 18px;
    }

    .service-title,
    .dev-service-title {
        font-size: 18px;
    }

    .case-title {
        font-size: 20px;
    }

    .timeline-step {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .header .logo {
        font-size: 20px;
    }

    .header-btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    .theme-switcher {
        font-size: 18px;
    }
}

/* Центрирование hero-блока на мобильных */
@media (max-width: 768px) {
    .hero-content {
        text-align: center;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .scroll-to-top {
        display: none !important;
    }
}

/* Фикс цветов в секции кейсов при светлой теме */
.case,
.case .section-title,
.case .section-subtitle,
.case p,
.case .case-title,
.case .case-list,
.case .case-stats,
.case .case-badge,
.case .number,
.case .case-content * {
    color: #ffffff !important;
}

.case .section-subtitle,
.case p {
    color: rgba(255, 255, 255, 0.8) !important;
}

.case .case-badge {
    background: var(--brand-secondary) !important;
    color: #ffffff !important;
}