:root {
    --primary: #0071e3;
    --dark: #1d1d1f;
    --light: #f5f5f7;
    --text: #333333;
    --white: #ffffff;
    --accent: #ff4500;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    scroll-behavior: smooth;
}

body {
    color: var(--text);
    background-color: var(--white);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- premium iOS/macOS GLASSMORPHISM HEADER --- */
header {
    background: rgba(29, 29, 31, 0.75) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    color: var(--white);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: background 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--white) !important;
    text-decoration: none !important;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.8;
}

.nav-menu a {
    color: #ccc;
    text-decoration: none;
    margin-right: 20px;
    font-size: 15px;
    transition: 0.2s;
}

.nav-menu a:hover {
    color: var(--white);
}

.btn-lang {
    background: transparent;
    border: 1px solid var(--white);
    color: var(--white);
    padding: 5px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
}

/* --- HERO SECTION С АТМОСФЕРНЫМ КОНТРАСТНЫМ ФОНОМ --- */
.hero {
    background: linear-gradient(135deg, rgba(10, 10, 12, 0.3) 0%, rgba(20, 24, 30, 0.4) 100%), 
                url('https://images.unsplash.com/photo-1516035069371-29a1b244cc32?auto=format&fit=crop&w=1600&q=80') no-repeat center center;
    background-size: cover;
    background-attachment: scroll;
    color: var(--white);
    padding: 160px 0;
    text-align: center;
}

.hero-container h1 { font-size: 48px; margin-bottom: 25px; font-weight: 700; letter-spacing: -0.5px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.hero-container p { font-size: 20px; max-width: 750px; margin: 0 auto 40px auto; opacity: 0.95; line-height: 1.6; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }

.btn-cta {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 14px 35px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: 0.2s;
}
.btn-cta:hover { background: #0077ed; transform: translateY(-1px); }

/* Steps & Generic sections */
.steps, .cases, .legal-block, .faq { padding: 90px 0; }
.steps { background: var(--light); }
h2 { text-align: center; font-size: 34px; margin-bottom: 45px; font-weight: 700; }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.step-card {
    background: var(--white);
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    text-align: center;
}

.step-num {
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    margin: 0 auto 20px auto;
}

/* Cases Section */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}
@media(max-width: 500px) { .cases-grid { grid-template-columns: 1fr; } }

.case-card {
    background: var(--light);
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--primary);
}

.case-tag {
    display: inline-block;
    font-size: 12px;
    background: #e3e3e3;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 15px;
    font-weight: 600;
}

.case-card h3 { margin-bottom: 10px; }
.case-card p { color: #555; margin-bottom: 15px; font-size: 15px; }
.case-meta { font-size: 16px; color: var(--dark); }

/* Legal Block */
.legal-block { background: #1d1d1f; color: white; }
.legal-content { max-width: 800px; margin: 0 auto; }
.legal-content p { font-size: 18px; margin-bottom: 25px; color: #ccc; }
.legal-content ul { list-style-position: inside; }
.legal-content li { margin-bottom: 12px; color: #aaa; }

/* FAQ Section */
.faq { background: var(--light); }
.faq-item {
    background: var(--white);
    max-width: 800px;
    margin: 0 auto 15px auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    user-select: none;
    position: relative;
}
.faq-question::after {
    content: '+';
    position: absolute;
    right: 20px;
    font-size: 18px;
}
.faq-item.active .faq-question::after { content: '−'; }

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out, padding 0.2s ease-out;
    color: #666;
    font-size: 15px;
}
.faq-item.active .faq-answer {
    padding: 0 20px 20px 20px;
    max-height: 200px;
}

/* Footer & Cookie */
footer { background: var(--dark); color: #86868b; padding: 40px 0; font-size: 14px; }
.footer-container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
footer a { color: #86868b; text-decoration: none; }
footer a:hover { text-decoration: underline; }

.cookie-banner { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--dark); color: var(--white); padding: 15px 25px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); z-index: 1000; width: 90%; max-width: 600px; }
.cookie-content { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.cookie-content p { font-size: 13px; }
.btn-cookie { background: var(--primary); color: var(--white); border: none; padding: 8px 20px; border-radius: 4px; cursor: pointer; font-weight: 600; }
.hidden { display: none !important; }

@media(max-width: 768px) {
    .nav-menu { display: none; }
    .hero-container h1 { font-size: 32px; }
    .footer-container { flex-direction: column; text-align: center; }
}

/* Стили для блока статистики */
.stats {
    background: #1d1d1f;
    color: #ffffff;
    padding: 60px 0;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    text-align: center;
}

.stat-item {
    flex: 1;
    min-width: 250px;
}

.stat-number {
    font-size: 56px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
}

.stat-text {
    font-size: 16px;
    color: #86868b;
    font-weight: 500;
}

@media(max-width: 768px) {
    .stat-number { font-size: 42px; }
    .stats-grid { flex-direction: column; }
}

/* --- СТИЛИ ГАЛЕРЕИ MASONRY И КОНТРАСТ ЗАГОЛОВКА --- */
.gallery-section {
    padding: 100px 0;
    background: #000000;
}

.gallery-section h2 {
    color: #ffffff !important;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #1d1d1f;
    border: 1px solid #333;
    color: #86868b;
    padding: 10px 22px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.masonry-grid {
    column-count: 3;
    column-gap: 20px;
    width: 100%;
}

.grid-item {
    break-inside: avoid;
    margin-bottom: 20px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #1d1d1f;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.grid-item img {
    width: 100%;
    display: block;
    height: auto;
    transition: transform 0.5s ease;
}

.grid-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grid-item:hover { transform: scale(1.02); }
.grid-item:hover img { transform: scale(1.05); }
.grid-item:hover .grid-overlay { opacity: 1; }

.grid-overlay h3 { font-size: 18px; color: #fff; margin-bottom: 5px; }
.grid-overlay p { font-size: 12px; color: #a1a1a6; }

/* Коробка вызова Квиза */
.quiz-trigger-box {
    margin-top: 60px;
    background: linear-gradient(135deg, #1d1d1f 0%, #111112 100%);
    border: 1px solid #333;
    padding: 55px 40px;
    border-radius: 20px;
    text-align: center;
}

.quiz-trigger-box h3, 
.quiz-trigger-box p { 
    color: #ffffff !important; 
    opacity: 1 !important;
}

.quiz-trigger-box h3 { 
    font-size: 28px; 
    margin-bottom: 14px; 
    font-weight: 700;
    letter-spacing: -0.3px;
}
.quiz-trigger-box p { 
    font-size: 17px;
    margin-bottom: 35px; 
    max-width: 600px; 
    margin-left: auto; 
    margin-right: auto; 
    font-weight: 400;
}

/* --- ПРЕМИАЛЬНАЯ КНОПКА КВИЗА --- */
.btn-quiz-trigger {
    background: linear-gradient(135deg, #0071e3 0%, #0056b3 100%);
    color: #ffffff !important;
    border: none;
    padding: 18px 42px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.1px;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 113, 227, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-quiz-trigger::after {
    content: '→';
    font-size: 18px;
    transition: transform 0.2s ease;
}

.btn-quiz-trigger:hover {
    background: linear-gradient(135deg, #0077ed 0%, #0062cc 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 113, 227, 0.6);
}

.btn-quiz-trigger:hover::after { transform: translateX(5px); }

.btn-quiz-trigger:active {
    transform: translateY(1px);
    box-shadow: 0 3px 12px rgba(0, 113, 227, 0.4);
}

/* --- МОДАЛЬНОЕ ОКНО КВИЗА --- */
.quiz-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.quiz-modal.active { opacity: 1; pointer-events: auto; }

.quiz-card {
    background: #1c1c1e;
    border: 1px solid #333;
    width: 100%;
    max-width: 540px;
    padding: 40px;
    border-radius: 24px;
    position: relative;
    color: #fff;
}

.close-quiz {
    position: absolute;
    top: 20px; right: 20px;
    background: none; border: none;
    color: #86868b; font-size: 32px;
    cursor: pointer;
}

.quiz-progress-bar { background: #333; height: 6px; border-radius: 3px; margin-bottom: 30px; overflow: hidden; }
.quiz-progress { background: var(--primary); height: 100%; transition: width 0.3s ease; }

.quiz-step { display: none; }
.quiz-step.active { display: block; }

.quiz-question { font-size: 22px; font-weight: 600; margin-bottom: 24px; line-height: 1.3; }

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.quiz-opt {
    background: #2c2c2e;
    padding: 18px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.quiz-opt:hover { background: #3a3a3c; }
.quiz-opt input:checked + span { color: var(--primary); font-weight: 600; }
.quiz-opt:has(input:checked) { border-color: var(--primary); background: rgba(0, 122, 255, 0.05); }

.quiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #2c2c2e;
    padding-top: 25px;
    margin-top: 5px;
    gap: 15px;
}

.quiz-card .btn-primary, .quiz-nav button {
    height: 46px;
    padding: 0 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    user-select: none;
}

#quiz-next-btn { background: var(--primary); color: #ffffff; margin-left: auto; }
#quiz-next-btn:hover { background: #0077ed; transform: translateY(-1px); }
#quiz-next-btn:active { transform: translateY(1px); }

#quiz-prev-btn { background: #2c2c2e; color: #aeaeb2; border: 1px solid #333; }
#quiz-prev-btn:hover:not(:disabled) { background: #3a3a3c; color: #ffffff; }
#quiz-prev-btn:disabled { opacity: 0.15; cursor: not-allowed; }

#quiz-lead-form button[type="submit"] {
    background: var(--primary);
    color: #ffffff;
    width: 100%;
    margin-top: 10px;
}

.quiz-input {
    width: 100%;
    padding: 16px;
    background: #2c2c2e;
    border: 1px solid #333;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    margin-bottom: 15px;
}

/* --- АНИМАЦИЯ ПРИ СКРОЛЛЕ (SCROLL REVEAL) --- */
.reveal-el {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
                transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

.reveal-el.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Адаптив под мобилки */
@media(max-width: 992px) { .masonry-grid { column-count: 2; } }
@media(max-width: 576px) {
    .masonry-grid { column-count: 1; }
    .quiz-card { padding: 25px; margin: 15px; }
}
