:root {
    --bg: #F5F7FA;          
    --surface: #FFFFFF;     
    --text: #1A1A1A;        
    --text-muted: #8E8E93;  
    --primary: #007AFF;     
    --primary-dark: #0055CC;
    --bubble-user: #007AFF;
    --bubble-lawyer: #E9E9EB;
    --border: #E5E5EA;
    --green: #34C759;
    
    --font-main: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    line-height: 1.5;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
.container { width: min(1200px, 92%); margin: 0 auto; }

/* ШАПКА */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 1rem 0;
    background: rgba(245, 247, 250, 0.85);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
}
.header__inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 800; font-size: 1.4rem; letter-spacing: -0.5px; }
.logo span { color: var(--primary); }
.nav { display: flex; gap: 1.8rem; }
.nav a { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); transition: color 0.2s; }
.nav a:hover { color: var(--primary); }
.header__actions { display: flex; align-items: center; gap: 1.2rem; }
.header__phone { font-weight: 600; font-size: 0.95rem; }
.header__phone:hover { color: var(--primary); }

.btn {
    display: inline-flex; justify-content: center; align-items: center;
    padding: 0.8rem 1.6rem; font-weight: 600; font-size: 0.9rem;
    border-radius: 12px; transition: all 0.2s;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn--large { padding: 1.1rem 2.2rem; font-size: 1rem; border-radius: 14px; }
.btn--sm { padding: 0.6rem 1.4rem; font-size: 0.85rem; }

/* ГЕРОЙ */
.hero { padding: 8rem 0 4rem; }
.hero-badge {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.hero-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 2.5rem;
    letter-spacing: -0.02em;
}
.accent { color: var(--primary); }

.chat-window {
    max-width: 620px; margin: 0 auto;
    background: var(--surface);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid var(--border);
}
.chat-header {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.2rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.chat-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.4rem;
}
.chat-avatar--sm { width: 36px; height: 36px; font-size: 1.1rem; }
.chat-info { flex: 1; }
.chat-name { font-weight: 700; font-size: 1rem; }
.chat-status { font-size: 0.8rem; color: var(--green); display: flex; align-items: center; gap: 0.3rem; }
.online-dot {
    width: 6px; height: 6px; background: var(--green); border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.chat-header-actions { display: flex; gap: 1rem; font-size: 1.2rem; opacity: 0.5; }

.chat-body {
    padding: 1.5rem;
    display: flex; flex-direction: column; gap: 0.8rem;
    min-height: 380px; max-height: 500px;
    overflow-y: auto;
    background: #FAFAFB;
}
.chat-input {
    display: flex; align-items: center; gap: 0.8rem;
    padding: 1rem 1.5rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
}
.chat-input input {
    flex: 1; padding: 0.8rem 1rem;
    border: 1px solid var(--border); border-radius: 20px;
    font-size: 0.95rem; background: #FAFAFB; font-family: inherit;
}
.chat-input input:disabled { opacity: 0.6; }
.chat-input-icon { font-size: 1.2rem; opacity: 0.5; }
.chat-send {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.2rem; opacity: 0.5;
}

.hero-cta { text-align: center; margin-top: 2.5rem; }
.hero-cta-note { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.8rem; }

/* Сообщения */
.message { display: flex; max-width: 80%; animation: messageIn 0.3s ease-out; }
@keyframes messageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.message--lawyer { align-self: flex-start; }
.message--user { align-self: flex-end; }
.message-bubble {
    padding: 0.8rem 1.1rem;
    border-radius: 18px;
    font-size: 0.95rem; line-height: 1.4;
    position: relative;
}
.message--lawyer .message-bubble {
    background: var(--bubble-lawyer); color: var(--text);
    border-bottom-left-radius: 4px;
}
.message--user .message-bubble {
    background: var(--bubble-user); color: #fff;
    border-bottom-right-radius: 4px;
}
.typing-indicator {
    display: flex; gap: 4px; padding: 1rem 1.1rem;
    background: var(--bubble-lawyer); border-radius: 18px;
    border-bottom-left-radius: 4px; width: fit-content;
}
.typing-indicator span {
    width: 6px; height: 6px; background: #8E8E93; border-radius: 50%;
    animation: typing 1.4s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }

/* БЕГУЩАЯ СТРОКА */
.marquee {
    background: var(--text); color: var(--surface);
    padding: 1rem 0; overflow: hidden; white-space: nowrap;
    border-top: 1px solid var(--text); border-bottom: 1px solid var(--text);
}
.marquee-track {
    display: inline-flex; 
    gap: 2rem;
    width: max-content; 
    animation: scroll 20s linear infinite; 
    font-weight: 700; font-size: 0.95rem; letter-spacing: 0.15em;
    align-items: center;
}
.marquee-track .dot { color: var(--primary); margin: 0 1rem; }
@keyframes scroll { 
    from { transform: translateX(0); } 
    to { transform: translateX(-50%); } 
}

/* СЕКЦИИ ОБЩИЕ */
.section { padding: 5rem 0; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-label {
    display: inline-block;
    color: var(--primary); font-weight: 700;
    font-size: 0.8rem; letter-spacing: 0.15em;
    margin-bottom: 1rem;
}
.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800; line-height: 1.15;
    letter-spacing: -0.02em;
}

/* ПРОБЛЕМЫ */
.problems-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem;
}
.problem-card {
    background: var(--surface); border-radius: 20px; padding: 1.8rem;
    border: 1px solid var(--border);
    transition: all 0.25s;
}
.problem-card:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}
.problem-msg {
    background: var(--bubble-lawyer);
    padding: 1rem 1.2rem;
    border-radius: 16px; border-bottom-left-radius: 4px;
    margin-bottom: 1.2rem;
}
.problem-from {
    font-size: 0.75rem; font-weight: 700; color: var(--primary);
    text-transform: uppercase; letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}
.problem-msg p { font-size: 0.95rem; color: var(--text); }
.problem-solution {
    font-size: 0.9rem; color: var(--text-muted); line-height: 1.5;
    padding-left: 0.5rem; border-left: 3px solid var(--primary);
}
.problem-solution strong { color: var(--text); }

/* ЦИФРЫ */
.section--numbers {
    background: var(--text); color: var(--surface);
}
.numbers-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
    text-align: center;
}
.number-value {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800; line-height: 1;
    letter-spacing: -0.03em; margin-bottom: 0.5rem;
    color: var(--primary);
}
.number-label {
    font-size: 0.9rem; color: rgba(255,255,255,0.6);
}

/* ПРОЦЕСС */
.process-chat {
    max-width: 720px; margin: 0 auto;
    background: var(--surface);
    border-radius: 24px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.06);
}
.process-chat-header {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.2rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.process-chat-body {
    padding: 1.5rem;
    display: flex; flex-direction: column; gap: 1rem;
    background: #FAFAFB;
    min-height: 400px;
}
.process-msg {
    opacity: 0; transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.process-msg.visible {
    opacity: 1; transform: translateY(0);
}
.msg-bubble {
    padding: 1rem 1.2rem; border-radius: 18px;
    border-bottom-left-radius: 4px;
    max-width: 90%;
    font-size: 0.95rem; line-height: 1.5;
}
.msg-bubble--lawyer { background: var(--bubble-lawyer); color: var(--text); }
.step-tag {
    display: inline-block; padding: 0.15rem 0.6rem;
    background: var(--primary); color: #fff;
    border-radius: 100px; font-size: 0.7rem; font-weight: 700;
    letter-spacing: 0.05em; margin-bottom: 0.6rem;
}

/* КЕЙСЫ */
.section--cases { background: #EFEFF2; }
.cases-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem;
}
.case-card {
    background: var(--surface);
    border-radius: 20px; padding: 1.8rem;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}
.case-header {
    display: flex; align-items: center; gap: 0.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.case-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: #EFEFF2;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.4rem;
}
.case-name { font-weight: 700; font-size: 1rem; }
.case-tag { font-size: 0.8rem; color: var(--text-muted); }

.case-chat { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 1.2rem; }
.case-msg {
    padding: 0.8rem 1rem; border-radius: 16px;
    font-size: 0.9rem; max-width: 85%; line-height: 1.4;
}
.case-msg--user {
    background: var(--bubble-user); color: #fff;
    align-self: flex-end; border-bottom-right-radius: 4px;
}
.case-msg--lawyer {
    background: var(--bubble-lawyer);
    align-self: flex-start; border-bottom-left-radius: 4px;
}
.msg-time {
    display: block; font-size: 0.7rem; margin-top: 0.3rem; opacity: 0.7; text-align: right;
}
.msg-attachment {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.6rem; margin-top: 0.6rem;
    background: rgba(0,0,0,0.05); border-radius: 10px;
}
.attachment-icon { font-size: 1.4rem; }
.attachment-name { font-size: 0.85rem; font-weight: 600; }
.attachment-size { font-size: 0.7rem; opacity: 0.7; }

.case-result {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 1.2rem; border-top: 1px solid var(--border);
    gap: 1rem; flex-wrap: wrap;
}
.result-label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.result-value { font-weight: 800; color: var(--green); font-size: 1.05rem; }

/* ЭКСПЕРТЫ */
.team-grid { 
    display: flex; 
    justify-content: center; 
    flex-wrap: wrap; 
    gap: 2rem; 
    max-width: 1000px; 
    margin: 0 auto; 
}

.team-card {
    background: var(--surface); 
    border-radius: 20px;
    padding: 2.5rem 2rem; 
    border: 1px solid var(--border);
    transition: all 0.25s;
    
    width: 300px; 
    display: flex;
    flex-direction: column;
    align-items: center; 
    text-align: center; 
}

.team-card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 15px 40px rgba(0,0,0,0.08); 
}

.team-avatar {
    width: 120px; 
    height: 120px; 
    border-radius: 50%;
    background: #E9E9EB; 
    margin: 0 auto 1.5rem;
    overflow: hidden; 
    border: 4px solid rgba(0, 122, 255, 0.15); 
}

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

.team-name { 
    font-weight: 700; 
    font-size: 1.2rem; 
    margin-bottom: 0.4rem; 
    text-align: center;
    width: 100%;
}

.team-role { 
    color: var(--primary); 
    font-size: 0.9rem; 
    font-weight: 600; 
    margin-bottom: 1.2rem; 
    text-align: center;
    width: 100%;
}

.team-desc { 
    color: var(--text-muted); 
    font-size: 0.95rem; 
    line-height: 1.5; 
    text-align: center; 
    width: 100%;
}

/* FAQ */
.section--faq { background: #FAFAFB; }
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.8rem; }
.faq-item {
    background: var(--surface); border-radius: 16px;
    border: 1px solid var(--border); overflow: hidden;
}
.faq-q {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; padding: 1.3rem 1.5rem; text-align: left;
    font-size: 1rem; font-weight: 600; color: var(--text);
    transition: color 0.2s;
}
.faq-q:hover { color: var(--primary); }
.faq-icon { font-size: 1.5rem; color: var(--primary); font-weight: 300; transition: transform 0.3s; }
.faq-item.active .faq-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-a p { padding: 0 1.5rem 1.3rem; color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }

/* КОНТАКТЫ */
.section--contact { background: var(--text); color: var(--surface); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.contact-desc { font-size: 1.05rem; color: rgba(255,255,255,0.6); margin: 1rem 0 2rem; }
.contact-phone {
    display: inline-block; font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800; color: var(--surface);
    letter-spacing: -0.02em; margin-bottom: 0.5rem;
}
.contact-phone:hover { color: var(--primary); }
.contact-note { font-size: 0.85rem; color: rgba(255,255,255,0.5); }

.contact-right { display: flex; flex-direction: column; gap: 1rem; }
.messenger-btn {
    display: flex; align-items: center; gap: 1.2rem;
    padding: 1.2rem 1.5rem; border-radius: 16px;
    font-weight: 600; transition: all 0.2s;
    border: 1px solid transparent;
}
.messenger-btn--max { background: #8B5CF6; color: #fff; }
.messenger-btn--max:hover { background: #7C3AED; transform: translateY(-2px); }
.messenger-btn--tg { background: #0088CC; color: #fff; }
.messenger-btn--tg:hover { background: #006699; transform: translateY(-2px); }

/* ОБНОВЛЕННЫЕ ИКОНКИ МЕССЕНДЖЕРОВ */
.messenger-icon {
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex; justify-content: center; align-items: center;
    flex-shrink: 0; 
}

.messenger-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor; 
}

.messenger-name { font-size: 1.05rem; margin-bottom: 0.2rem; }
.messenger-desc { font-size: 0.8rem; opacity: 0.85; font-weight: 400; }

/* ПОДВАЛ */
.footer { padding: 2rem 0; border-top: 1px solid var(--border); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: 0.85rem; }
.footer__link:hover { color: var(--primary); }

/* STICKY CTA */
.sticky-cta {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    padding: 0.8rem; gap: 0.6rem;
    background: var(--surface); border-top: 1px solid var(--border);
    z-index: 200;
}
.sticky-btn {
    flex: 1; text-align: center;
    padding: 0.9rem; border-radius: 12px;
    font-weight: 700; font-size: 0.9rem;
}
.sticky-btn--call { background: var(--primary); color: #fff; }
.sticky-btn--tg { background: #0088CC; color: #fff; }

/* КУКИ */
.cookie-banner {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    width: min(600px, 90%); background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; padding: 1.3rem 1.5rem; 
    /* ИСПРАВЛЕНО ДЛЯ ПЛАВНОЙ АНИМАЦИИ */
    display: flex;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, bottom 0.3s ease;
    justify-content: space-between; align-items: center; gap: 1.5rem;
    z-index: 9999; box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.cookie-banner.show { 
    opacity: 1; 
    pointer-events: auto; 
}
.cookie-banner p { font-size: 0.85rem; }
.cookie-banner a { color: var(--primary); text-decoration: underline; }

/* АДАПТИВ */
@media (max-width: 900px) {
    .nav { display: none; }
    .header__phone { display: none; }
    .problems-grid, .cases-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    .numbers-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
    .chat-window { border-radius: 20px; }
    .sticky-cta { display: flex; }
    body { padding-bottom: 70px; }
    
    .cookie-banner { 
        bottom: 80px; 
        flex-direction: column; 
        text-align: center; 
        opacity: 0; /* Поднимаем выше плавающих кнопок */
    }
    .cookie-banner.show { 
        opacity: 1; 
    }
    
    .footer__inner { flex-direction: column; gap: 1rem; text-align: center; }
}
@media (max-width: 500px) {
    .hero { padding: 6rem 0 3rem; }
    .hero-title { font-size: 1.6rem; }
    .chat-window { border-radius: 16px; }
    .chat-avatar { width: 38px; height: 38px; font-size: 1.2rem; }
}