:root { 
    --primary: #ffcc00; 
    --dark: #1a1a1a; 
    --accent: #ff4400; 
    --glass: rgba(45, 45, 45, 0.6); 
    --text-muted: #a0a0a0;
}

body { 
    font-family: 'Segoe UI', Roboto, sans-serif; 
    margin: 0; 
    color: #fff; 
    line-height: 1.6; 
    background: radial-gradient(circle at center, #2d2d2d 0%, #111111 100%);
    background-attachment: fixed; 
    background-color: #111111; 
    overflow-x: hidden;
}

body::before {
    content: ""; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-image: linear-gradient(rgba(255, 204, 0, 0.02) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 204, 0, 0.02) 1px, transparent 1px);
    background-size: 60px 60px; 
    z-index: 1; 
    pointer-events: none;
}

header { 
    background: rgba(26, 26, 26, 0.9); 
    backdrop-filter: blur(15px); 
    padding: 15px 5%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    position: fixed; 
    width: 90%; 
    top: 0; 
    z-index: 1000; 
    border-bottom: 1px solid rgba(255,204,0,0.2);
}

.logo { 
    font-size: 26px; 
    font-weight: bold; 
    color: #fff; 
    text-decoration: none; 
}
.logo span { 
    color: var(--primary); 
    text-shadow: 0 0 15px rgba(255, 204, 0, 0.4); 
}

.logo-wrapper {
    display: flex;
    flex-direction: column; /* Текст будет под логотипом */
    line-height: 1;
}

.logo-subtitle {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-top: 5px;
    font-weight: 400;
}

/* Эффект мерцания для заголовка в секции hero */
.hero h1 {
    animation: hero-flicker 5s ease-in-out infinite;
    /* Убедимся, что цвет текста позволяет видеть свечение */
    position: relative;
    z-index: 1;
}

@keyframes hero-flicker {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 10px rgba(255, 204, 0, 0.2);
    }
    45% {
        opacity: 1;
        text-shadow: 0 0 20px rgba(255, 204, 0, 0.5), 0 0 10px rgba(255, 204, 0, 0.3);
    }
    50% {
        opacity: 0.8; /* Момент затухания */
        text-shadow: none;
    }
    55% {
        opacity: 0.95;
        text-shadow: 0 0 15px rgba(255, 204, 0, 0.4);
    }
}

nav a { 
    margin-left: 25px; 
    text-decoration: none; 
    color: #ccc; 
    transition: 0.3s; 
    font-size: 13px; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}

nav a:hover { 
    color: var(--primary); 
}

#nav-menu a {
    display: inline-block; /* Обязательно, чтобы transform работал */
    text-decoration: none;
    color: #ccc;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s, transform 0.3s; /* Добавили трансформацию в переход */
}

#nav-menu a:hover {
    color: var(--primary);
    transform: translateY(-3px); /* Смещаем на 3 пикселя вверх */
}

.main-content { 
    position: relative; 
    z-index: 10; 
    margin-top: 80px; 
}

.hero { 
    height: 85vh; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    text-align: center; 
    padding: 0 5%; 
}

.hero h1 { 
    font-size: clamp(2.5rem, 8vw, 4rem); 
    margin-bottom: 20px; 
    font-weight: 800;
    background: linear-gradient(to right, #fff, var(--primary)); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent;
}

.hero p { 
    font-size: 1.25rem; 
    max-width: 800px; 
    margin-bottom: 40px; 
    color: var(--text-muted); 
}

.btn { 
    background: linear-gradient(90deg, var(--primary), #ffaa00); 
    color: #000; 
    padding: 18px 50px; 
    border-radius: 50px; 
    text-decoration: none; 
    font-weight: bold; 
    transition: 0.4s; 
    box-shadow: 0 10px 25px rgba(255, 204, 0, 0.2); 
    border: none; 
    cursor: pointer;
    position: relative;
    overflow: hidden; /* Чтобы блик не вылетал за границы */
}

.btn:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 15px 35px rgba(255, 204, 0, 0.4); 
    background: linear-gradient(90deg, #fff, var(--primary)); 
}

.btn:disabled { 
    opacity: 0.4; 
    cursor: not-allowed; 
    transform: none !important; 
}

.btn-full { 
    width: 100%; 
    margin-top: 20px; 
}

.btn-small { 
    padding: 10px 20px; 
    font-size: 12px; 
}

/* Создаем сам блик */
.btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%; /* Начальная позиция далеко слева */
    width: 200%;
    height: 200%;
    background: linear-gradient(
        115deg, 
        transparent 0%, 
        transparent 40%, 
        rgba(255, 255, 255, 0.8) 50%, 
        transparent 60%, 
        transparent 100%
    );
    transform: rotate(25deg);
    animation: shine-loop 10s infinite linear;
}

@keyframes shine-loop {
    0% {
        left: -150%;
    }
    10% {
        left: 150%; /* Быстрый пролет за 1 секунду (10% от 10 сек) */
    }
    100% {
        left: 150%; /* Остальные 9 секунд "отдыхает" */
    }
}

.hero .btn {
    margin-top: 40px; 
}

.section { 
    padding: 80px 10%; 
    background: var(--glass); 
    margin: 40px 5%; 
    border-radius: 32px; 
    backdrop-filter: blur(12px); 
    border: 1px solid rgba(255,204,0,0.1); 
}

h2 { 
    text-align: center; 
    font-size: 2rem; 
    margin-bottom: 50px; 
    color: var(--primary); 
}

.services-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; 
}

#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    
    /* Эффект матового стекла */
    background: rgba(255, 255, 255, 0.1); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    /* Цвет стрелки (используем твой primary) */
    color: var(--primary); 
    
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    z-index: 2500;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTop:hover {
    background: var(--primary);
    color: #000; /* Черная стрелка на желтом фоне при наведении */
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 204, 0, 0.4);
    border-color: var(--primary);
}

#backToTop svg {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.card { 
    background: rgba(255, 255, 255, 0.03); 
    padding: 35px; 
    border-radius: 20px; 
    border: 1px solid rgba(255,255,255,0.05); 
    transition: all 0.3s ease;
}

.card:hover { 
    transform: translateY(-10px); 
    border-color: var(--primary); 
    background: rgba(255,204,0,0.05); 
}

.card i { 
    font-size: 40px; 
    color: var(--primary); 
    margin-bottom: 20px; 
    display: block; 
}

.benefit-box { 
    background: rgba(255, 204, 0, 0.03); 
    border: 1px solid rgba(255, 204, 0, 0.2); 
    padding: 50px; 
    border-radius: 32px; 
    text-align: center; 
    margin: 60px 5%; 
    backdrop-filter: blur(10px); 
}

.benefit-box i { 
    font-size: 40px; 
    color: var(--primary); 
    margin-bottom: 20px; 
    display: block; 
}

.benefit-box span { 
    color: var(--primary); 
    border-bottom: 1px dashed var(--primary); 
}

.exp-list { 
    padding-left: 20px; 
    margin: 0; font-size: 14px; 
    color: var(--text-muted); 
    list-style-type: square; 
}

.exp-list li { 
    margin-bottom: 5px; 
}

.testimonial-grid { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 20px; 
    justify-content: center; 
}

.t-card { 
    background: rgba(0,0,0,0.3); 
    padding: 30px; 
    border-radius: 20px; 
    flex: 0 1 calc((100% - 40px) / 3); 
    min-width: 280px; 
    border-left: 4px solid var(--primary); 
    font-style: italic; 
    cursor: pointer; 
    transition: 0.3s;
    box-sizing: border-box;
}

.t-card:hover { 
    background: rgba(255, 204, 0, 0.05); 
    transform: translateY(-5px); 
}

.t-card b { 
    display: block; 
    margin-top: 15px; 
    color: var(--primary); 
    font-style: normal; 
    font-size: 0.85rem; 
    text-transform: uppercase; 
}

.modal-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.9); 
    backdrop-filter: blur(12px); 
    display: none; 
    justify-content: center; 
    align-items: center; 
    z-index: 3000; 
}

.modal-content { 
    background: #1a1a1a; 
    padding: 40px; 
    border-radius: 24px; 
    width: 90%; 
    max-width: 700px; 
    border: 1px solid rgba(255,204,0,0.2); 
    position: relative; 
    max-height: 85vh; 
    overflow-y: auto; 
}

.modal-content h3 { 
    color: var(--primary); 
    margin-top: 0; 
}

#imageModal .modal-content { 
    max-width: 900px; 
    padding: 10px; 
    background: none; 
    border: none; 
}

#imageModal img { 
    width: 100%; 
    border-radius: 12px; 
    border: 2px solid var(--primary); 
}

.close-modal { 
    position: absolute; 
    top: 20px; 
    right: 20px; 
    font-size: 32px; 
    cursor: pointer; 
    color: #666; 
    transition: 0.3s; 
}

.close-modal:hover { 
    color: var(--primary); 
}

.form-group { 
    margin-bottom: 15px; 
    text-align: left; 
}

.form-group label { 
    display: block; 
    margin-bottom: 5px; 
    color: #888; 
    font-size: 13px; 
}

.form-group input, .form-group textarea { 
    width: 100%; 
    padding: 12px; 
    background: rgba(255,255,255,0.05); 
    border: 1px solid rgba(255,255,255,0.1); 
    border-radius: 8px; 
    color: #fff; 
    box-sizing: border-box; 
}

.form-checkbox { 
    display: flex; 
    gap: 10px; 
    margin-top: 15px; 
    align-items: center; 
}

.form-checkbox input { 
    width: 18px; 
    height: 18px; 
    cursor: pointer; 
}

.form-checkbox label { 
    font-size: 11px; 
    color: #777; 
    cursor: pointer; 
}

footer { 
    padding: 60px 5%; 
    text-align: center; 
    background: rgba(10, 10, 10, 0.95); 
    border-top: 1px solid rgba(255,204,0,0.05); 
}

.footer-mail { 
    color:var(--primary); 
    text-decoration:none; 
    font-weight: bold; 
}

.footer-links { 
    margin: 20px 0; 
    font-size: 14px; 
}

.policy-link { 
    color: var(--primary); 
    text-decoration: underline; 
    cursor: pointer; 
}

.copyright { 
    font-size: 13px; 
    color: #555; 
}

.formula { 
    opacity: 0.3; 
    font-size: 11px; 
    margin-top: 30px; 
    color: var(--primary); 
    font-family: 'Courier New', monospace; 
}

html { 
    scroll-behavior: smooth; 
}

#cookieBanner {
    position: fixed; 
    bottom: 20px; 
    left: 20px; 
    right: 20px; 
    background: #222; 
    padding: 20px; 
    border-radius: 16px; 
    border: 1px solid var(--primary);
    display: none; 
    justify-content: space-between; 
    align-items: center; 
    z-index: 4000;
}

/* Стили гамбургера */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1100;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    margin: 4px 0;
    transition: 0.4s;
}

/* Начальное состояние для анимации */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
/* Состояние после появления */
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.tech-stack { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
    margin-top: 10px; 
}

.tag { 
    background: rgba(255, 204, 0, 0.1); 
    border: 1px solid rgba(255, 204, 0, 0.3); 
    color: var(--primary); 
    padding: 4px 12px; 
    border-radius: 12px; 
    font-size: 12px; 
    transition: 0.3s;
}
.tag:hover { 
    background: var(--primary); 
    color: #000; 
}

#canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none; /* Чтобы не мешал кликам */
}

#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    z-index: 2000;
    transition: width 0.1s;
}

.stats-container { 
    display: flex; 
    justify-content: space-around; 
    margin-bottom: 40px; 
    text-align: center; 
}

.stat-item { 
    font-size: 1.2rem; 
    color: var(--text-muted); 
}

.stat-num { 
    display: block; 
    font-size: 2.5rem; 
    color: var(--primary); 
    font-weight: 800; 
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Вертикальная линия */
.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary), transparent);
    opacity: 0.3;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    padding-left: 60px;
}

.timeline-item:last-child { 
    margin-bottom: 0; 
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 42px;
    height: 42px;
    background: var(--dark);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.2);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid rgba(255, 204, 0, 0.1);
    transition: 0.3s;
}

.timeline-item:hover .timeline-content {
    background: rgba(255, 204, 0, 0.05);
    border-color: var(--primary);
}

.timeline-content h3 {
    margin: 0 0 10px 0;
    color: var(--primary);
    font-size: 1.25rem;
}

.timeline-content p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.calc-results { 
    margin-top: 20px; 
    border-top: 1px solid rgba(255,255,255,0.1); 
    padding-top: 15px; 
}

.calc-row { 
    display: flex; 
    justify-content: space-between; 
    padding: 5px 0; 
    font-size: 14px; 
}

.calc-total { 
    font-size: 16px; 
    font-weight: bold; 
    border-top: 1px dashed var(--text-muted); 
    padding-top: 10px; 
    margin-top: 10px; 
}

.res-primary { 
    color: var(--primary); 
}

.res-muted { 
    color: var(--text-muted); 
}

.res-accent { 
    color: var(--accent); 
}

.tax-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 20px; 
    font-size: 14px; 
}

.tax-table th, .tax-table td { 
    padding: 12px 15px; 
    text-align: right; 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
}

.tax-table th { 
    color: var(--text-muted); 
    font-weight: 500; 
}

.tax-table td:first-child { 
    text-align: left; 
    color: #fff; 
    font-weight: bold; 
}

.tax-table thead tr { 
    border-bottom: 1px solid rgba(255,255,255,0.1); 
}

.res-primary { 
    color: var(--primary); 
    font-weight: bold; 
}

.res-accent { 
    color: var(--accent); 
}

h4 {
    color: var(--text-muted);
}

/* --- СТИЛИ ДЛЯ ЮРИДИЧЕСКИХ СТРАНИЦ (Privacy & Cookies) --- */

/* Контейнер текстового блока */
.policy-content { 
    max-width: 900px; 
    margin: 120px auto 60px; 
    padding: 60px; 
    background: var(--glass); 
    border-radius: 32px; 
    border: 1px solid rgba(255, 204, 0, 0.1); 
    backdrop-filter: blur(20px); 
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Заголовки на страницах политик */
.policy-content h1 { 
    color: var(--primary); 
    margin-bottom: 40px; 
    font-size: clamp(1.8rem, 5vw, 2.5rem); 
    line-height: 1.2;
}

.policy-content h2 { 
    text-align: left; 
    font-size: 1.5rem; 
    margin: 40px 0 20px; 
    color: var(--primary);
    border-bottom: 1px solid rgba(255, 204, 0, 0.2); 
    padding-bottom: 10px; 
}

/* Текст и списки */
.policy-content p, 
.policy-content li { 
    color: var(--text-muted); 
    font-size: 1rem; 
    margin-bottom: 18px; 
    line-height: 1.7;
}

.policy-content ul {
    padding-left: 25px;
    margin-bottom: 20px;
}

.policy-content strong {
    color: #fff;
}

/* Ссылка возврата */
.back-link { 
    color: var(--primary); 
    text-decoration: none; 
    display: inline-flex; 
    align-items: center;
    gap: 8px;
    margin-bottom: 30px; 
    font-weight: bold; 
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.back-link:hover { 
    color: #fff;
    transform: translateX(-5px);
}

.grecaptcha-badge { 
    width: 70px !important; 
    right: auto !important; 
    left: 0px !important; 
}

/* Контейнер вместо Alert */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    padding: 16px 24px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateX(0);
}

.toast i {
    color: var(--primary); /* Твой золотой цвет */
}

.grecaptcha-badge { 
    z-index: 9999 !important;
    /* Убедимся, что он слева, как мы настраивали ранее */
    right: auto !important; 
    left: 0px !important;
}

/*Красим капчу, бейджик*/
.grecaptcha-badge {
    /* Инвертируем цвета, чтобы светлое стало темным */
    filter: invert(1) hue-rotate(180deg) brightness(0.6);
    
    /* Добавляем немного прозрачности, чтобы он не выбивался */
    opacity: 0.8;
    transition: opacity 0.3s ease;
    
    /* Скругляем углы посильнее, если нужно */
    border-radius: 5px 0 0 5px !important;
    overflow: hidden;
}

.grecaptcha-badge:hover {
    opacity: 1;
    filter: invert(1) hue-rotate(180deg) brightness(0.9);
}
@media (max-width: 768px) {
    /* 1. Делаем кнопку гамбургера видимой и вешаем ПОВЕРХ всего */
    .menu-toggle { 
        display: flex; 
        z-index: 2000; /* Выше чем canvas и nav */

        .policy-content {
        margin: 100px 20px 40px;
        padding: 30px 20px;
        }
    }

    /* 2. Настраиваем само меню */
    nav {
        display: none; /* Изначально скрыто */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1500;
    }

    /* 3. КЛАСС-ТРИГГЕР (который добавляет твой JS) */
    nav.active {
        display: flex; /* Показываем при клике */
    }
    
    nav a {
        margin: 20px 0;
        font-size: 20px;
    }   
     
    #backToTop {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .hero {
        height: auto; /* На мобилках лучше не ограничивать высоту жестко */
        padding: 80px 20px;
    }

    .hero h1 {
        font-size: 2.2rem; /* Оптимально для смартфонов */
        line-height: 1.2;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .btn {
        width: 100%; /* Кнопка на всю ширину удобнее для тапа пальцем */
        padding: 16px 20px;
        font-size: 0.9rem;
    }

    .hero .btn {
        margin-top: 30px;
    }

    .section {
        padding: 40px 20px;
        margin: 20px 15px;
        border-radius: 24px;
    }
}

@media (max-width: 480px) {
    .logo-subtitle {
        font-size: 8px;
    }

    .hero .btn {
        margin-top: 25px;
    }

    #backToTop {
        bottom: 15px; /* Меньше отступ снизу */
        right: 15px;  /* Меньше отступ справа */
        width: 40px;  /* Компактный размер */
        height: 40px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); /* Уменьшаем тень */
    }

    #backToTop svg {
        width: 18px; /* Уменьшаем саму стрелку */
        height: 18px;
    }


    .timeline::before { left: 15px; }
    .timeline-item { padding-left: 45px; }
    .timeline-dot { width: 32px; height: 32px; font-size: 12px; }
}

/* Принудительная сетка 3х2 для десктопов */
@media (min-width: 1024px) {
    .grid-3x2 { grid-template-columns: repeat(3, 1fr); }
}
