Новые правки

This commit is contained in:
Web-serfer 2026-04-05 16:13:21 +05:00
parent 761996fd52
commit 12cb596e5e
6 changed files with 910 additions and 433 deletions

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="115" height="48"><path fill="#17191E" d="M7.77 36.35C6.4 35.11 6 32.51 6.57 30.62c.99 1.2 2.35 1.57 3.75 1.78 2.18.33 4.31.2 6.33-.78.23-.12.44-.27.7-.42.18.55.23 1.1.17 1.67a4.56 4.56 0 0 1-1.94 3.23c-.43.32-.9.61-1.34.91-1.38.94-1.76 2.03-1.24 3.62l.05.17a3.63 3.63 0 0 1-1.6-1.38 3.87 3.87 0 0 1-.63-2.1c0-.37 0-.74-.05-1.1-.13-.9-.55-1.3-1.33-1.32a1.56 1.56 0 0 0-1.63 1.26c0 .06-.03.12-.05.2Z"/><path fill="url(#a)" d="M7.77 36.35C6.4 35.11 6 32.51 6.57 30.62c.99 1.2 2.35 1.57 3.75 1.78 2.18.33 4.31.2 6.33-.78.23-.12.44-.27.7-.42.18.55.23 1.1.17 1.67a4.56 4.56 0 0 1-1.94 3.23c-.43.32-.9.61-1.34.91-1.38.94-1.76 2.03-1.24 3.62l.05.17a3.63 3.63 0 0 1-1.6-1.38 3.87 3.87 0 0 1-.63-2.1c0-.37 0-.74-.05-1.1-.13-.9-.55-1.3-1.33-1.32a1.56 1.56 0 0 0-1.63 1.26c0 .06-.03.12-.05.2Z"/><path fill="#17191E" d="M.02 30.31s4.02-1.95 8.05-1.95l3.04-9.4c.11-.45.44-.76.82-.76.37 0 .7.31.82.76l3.04 9.4c4.77 0 8.05 1.95 8.05 1.95L17 11.71c-.2-.56-.53-.91-.98-.91H7.83c-.44 0-.76.35-.97.9L.02 30.31Zm42.37-5.97c0 1.64-2.05 2.62-4.88 2.62-1.85 0-2.5-.45-2.5-1.41 0-1 .8-1.49 2.65-1.49 1.67 0 3.09.03 4.73.23v.05Zm.03-2.04a21.37 21.37 0 0 0-4.37-.36c-5.32 0-7.82 1.25-7.82 4.18 0 3.04 1.71 4.2 5.68 4.2 3.35 0 5.63-.84 6.46-2.92h.14c-.03.5-.05 1-.05 1.4 0 1.07.18 1.16 1.06 1.16h4.15a16.9 16.9 0 0 1-.36-4c0-1.67.06-2.93.06-4.62 0-3.45-2.07-5.64-8.56-5.64-2.8 0-5.9.48-8.26 1.19.22.93.54 2.83.7 4.06 2.04-.96 4.95-1.37 7.2-1.37 3.11 0 3.97.71 3.97 2.15v.57Zm11.37 3c-.56.07-1.33.07-2.12.07-.83 0-1.6-.03-2.12-.1l-.02.58c0 2.85 1.87 4.52 8.45 4.52 6.2 0 8.2-1.64 8.2-4.55 0-2.74-1.33-4.09-7.2-4.39-4.58-.2-4.99-.7-4.99-1.28 0-.66.59-1 3.65-1 3.18 0 4.03.43 4.03 1.35v.2a46.13 46.13 0 0 1 4.24.03l.02-.55c0-3.36-2.8-4.46-8.2-4.46-6.08 0-8.13 1.49-8.13 4.39 0 2.6 1.64 4.23 7.48 4.48 4.3.14 4.77.62 4.77 1.28 0 .7-.7 1.03-3.71 1.03-3.47 0-4.35-.48-4.35-1.47v-.13Zm19.82-12.05a17.5 17.5 0 0 1-6.24 3.48c.03.84.03 2.4.03 3.24l1.5.02c-.02 1.63-.04 3.6-.04 4.9 0 3.04 1.6 5.32 6.58 5.32 2.1 0 3.5-.23 5.23-.6a43.77 43.77 0 0 1-.46-4.13c-1.03.34-2.34.53-3.78.53-2 0-2.82-.55-2.82-2.13 0-1.37 0-2.65.03-3.84 2.57.02 5.13.07 6.64.11-.02-1.18.03-2.9.1-4.04-2.2.04-4.65.07-6.68.07l.07-2.93h-.16Zm13.46 6.04a767.33 767.33 0 0 1 .07-3.18H82.6c.07 1.96.07 3.98.07 6.92 0 2.95-.03 4.99-.07 6.93h5.18c-.09-1.37-.11-3.68-.11-5.65 0-3.1 1.26-4 4.12-4 1.33 0 2.28.16 3.1.46.03-1.16.26-3.43.4-4.43-.86-.25-1.81-.41-2.96-.41-2.46-.03-4.26.98-5.1 3.38l-.17-.02Zm22.55 3.65c0 2.5-1.8 3.66-4.64 3.66-2.81 0-4.61-1.1-4.61-3.66s1.82-3.52 4.61-3.52c2.82 0 4.64 1.03 4.64 3.52Zm4.71-.11c0-4.96-3.87-7.18-9.35-7.18-5.5 0-9.23 2.22-9.23 7.18 0 4.94 3.49 7.59 9.21 7.59 5.77 0 9.37-2.65 9.37-7.6Z"/><defs><linearGradient id="a" x1="6.33" x2="19.43" y1="40.8" y2="34.6" gradientUnits="userSpaceOnUse"><stop stop-color="#D83333"/><stop offset="1" stop-color="#F041FF"/></linearGradient></defs></svg>

Before

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1440" height="1024" fill="none"><path fill="url(#a)" fill-rule="evenodd" d="M-217.58 475.75c91.82-72.02 225.52-29.38 341.2-44.74C240 415.56 372.33 315.14 466.77 384.9c102.9 76.02 44.74 246.76 90.31 366.31 29.83 78.24 90.48 136.14 129.48 210.23 57.92 109.99 169.67 208.23 155.9 331.77-13.52 121.26-103.42 264.33-224.23 281.37-141.96 20.03-232.72-220.96-374.06-196.99-151.7 25.73-172.68 330.24-325.85 315.72-128.6-12.2-110.9-230.73-128.15-358.76-12.16-90.14 65.87-176.25 44.1-264.57-26.42-107.2-167.12-163.46-176.72-273.45-10.15-116.29 33.01-248.75 124.87-320.79Z" clip-rule="evenodd" style="opacity:.154"/><path fill="url(#b)" fill-rule="evenodd" d="M1103.43 115.43c146.42-19.45 275.33-155.84 413.5-103.59 188.09 71.13 409 212.64 407.06 413.88-1.94 201.25-259.28 278.6-414.96 405.96-130 106.35-240.24 294.39-405.6 265.3-163.7-28.8-161.93-274.12-284.34-386.66-134.95-124.06-436-101.46-445.82-284.6-9.68-180.38 247.41-246.3 413.54-316.9 101.01-42.93 207.83 21.06 316.62 6.61Z" clip-rule="evenodd" style="opacity:.154"/><defs><linearGradient id="b" x1="373" x2="1995.44" y1="1100" y2="118.03" gradientUnits="userSpaceOnUse"><stop stop-color="#D83333"/><stop offset="1" stop-color="#F041FF"/></linearGradient><linearGradient id="a" x1="107.37" x2="1130.66" y1="1993.35" y2="1026.31" gradientUnits="userSpaceOnUse"><stop stop-color="#3245FF"/><stop offset="1" stop-color="#BC52EE"/></linearGradient></defs></svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,447 @@
---
interface FaqItem {
question: string;
answer: string;
}
const {
sectionSubtitle = "ОТВЕТЫ НА ВОПРОСЫ",
sectionTitle = "Часто задаваемые вопросы",
faqItems = [
{
question: "Сколько стоит первичная консультация?",
answer: "Первичная консультация проводится бесплатно. Мы оценим вашу ситуацию, расскажем о перспективах дела и предложим оптимальную стратегию защиты. Это ни к чему вас не обязывает."
},
{
question: "Какие документы нужны для начала работы?",
answer: "Для анализа ситуации потребуются: протокол об административном правонарушении, постановление по делу, материалы ДТП (если есть), страховой полис ОСАГО/КАСКО, а также любые другие документы, относящиеся к вашему делу."
},
{
question: "Каковы шансы на успех моего дела?",
answer: "После изучения документов мы честно расскажем о реальных перспективах. По статистике, около 98% дел завершаются успешно. Если видим, что шансов нет — так и скажем, чтобы вы не тратили время и деньги."
},
{
question: "Сколько времени занимает рассмотрение дела?",
answer: "Сроки зависят от сложности: простые консультации и составление жалоб — 1-3 дня, представление интересов в суде — от 2 недель до 2 месяцев. Точные сроки назовем после анализа вашей ситуации."
},
{
question: "Работаете ли вы с делами, где уже вынесено решение?",
answer: "Да, мы помогаем обжаловать постановления и решения судов. Срок на обжалование обычно составляет 10 дней с момента вынесения постановления, но есть возможности восстановления срока и в более поздний период."
},
{
question: "Можно ли решить вопрос без суда?",
answer: "Во многих случаях — да. Мы ведём переговоры со страховыми компаниями, ГИБДД, автосалонами и другими участниками. Досудебное урегулирование часто быстрее и выгоднее для клиента."
}
] as FaqItem[]
} = Astro.props;
---
<section class="faq-section" id="faq">
<div class="site-container">
<!-- Заголовок секции -->
<div class="section-header">
<div class="subtitle-wrapper animate-on-scroll" data-animation="fade-up">
<div class="subtitle-line"></div>
<span class="subtitle">{sectionSubtitle}</span>
<div class="subtitle-line"></div>
</div>
<h2 class="title animate-on-scroll" data-animation="fade-up" data-delay="100">{sectionTitle}</h2>
<p class="section-description animate-on-scroll" data-animation="fade-up" data-delay="150">
Собрали ответы на самые частые вопросы наших клиентов. Не нашли ответ? Позвоните — проконсультируем бесплатно
</p>
</div>
<!-- Аккордеон FAQ -->
<div class="faq-container">
{faqItems.map((item: FaqItem, index: number) => (
<div class="faq-item animate-on-scroll" data-animation="fade-up" data-delay={index * 80 + 200}>
<button class="faq-question" aria-expanded="false" data-faq-toggle>
<span class="question-text">{item.question}</span>
<span class="faq-icon">
<svg class="icon-plus" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 5V19M5 12H19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</span>
</button>
<div class="faq-answer" data-faq-content>
<div class="answer-inner">
<p class="answer-text">{item.answer}</p>
</div>
</div>
</div>
))}
</div>
</div>
</section>
<style>
:root {
--color-primary: #0a2540;
--color-primary-light: #1e3050;
--color-accent: #eac26e;
--color-accent-dark: #ce9f40;
--color-accent-glow: rgba(234, 194, 110, 0.3);
--color-light: #ffffff;
--color-gray: #94a3b8;
--color-gray-dark: #64748b;
--gradient-bg: linear-gradient(135deg, #0a2540 0%, #1e3050 100%);
--gradient-accent: linear-gradient(135deg, #eac26e 0%, #ce9f40 100%);
--shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
--shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
--shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
--shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
--shadow-glow: 0 0 40px rgba(234, 194, 110, 0.2);
}
.faq-section {
padding: 6rem 1.5rem;
background: var(--gradient-bg);
position: relative;
overflow: hidden;
font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.faq-section::before {
content: '';
position: absolute;
top: -50%;
right: -20%;
width: 80%;
height: 150%;
background: radial-gradient(circle, rgba(234, 194, 110, 0.03) 0%, transparent 70%);
pointer-events: none;
border-radius: 50%;
}
.faq-section::after {
content: '';
position: absolute;
bottom: -30%;
left: -10%;
width: 60%;
height: 100%;
background: radial-gradient(circle, rgba(234, 194, 110, 0.02) 0%, transparent 70%);
pointer-events: none;
}
.site-container {
max-width: var(--site-max-width, 1400px);
margin: 0 auto;
position: relative;
z-index: 2;
}
/* Заголовок секции */
.section-header {
margin-bottom: 4rem;
text-align: center;
}
.subtitle-wrapper {
display: flex;
align-items: center;
justify-content: center;
gap: 1rem;
margin-bottom: 1rem;
}
.subtitle-line {
width: 40px;
height: 1px;
background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}
.subtitle {
color: var(--color-accent);
font-size: 0.75rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 4px;
}
.title {
color: var(--color-light);
font-size: clamp(2rem, 4vw, 3.5rem);
font-weight: 800;
margin: 0 0 1rem 0;
line-height: 1.2;
letter-spacing: -0.02em;
background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.section-description {
color: var(--color-gray);
font-size: 1.1rem;
max-width: 700px;
margin: 0 auto;
line-height: 1.6;
}
/* Анимации при скроллинге */
.animate-on-scroll {
opacity: 0;
will-change: opacity, transform;
}
[data-animation="fade-up"] {
transform: translateY(40px);
transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.animate-on-scroll.is-visible {
opacity: 1;
transform: translateY(0);
}
/* Контейнер FAQ */
.faq-container {
max-width: 900px;
margin: 0 auto 4rem;
display: flex;
flex-direction: column;
gap: 1rem;
}
/* Элемент FAQ */
.faq-item {
background: rgba(255, 255, 255, 0.03);
backdrop-filter: blur(10px);
border-radius: 16px;
border: 1px solid rgba(255, 255, 255, 0.05);
overflow: hidden;
transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-item:hover {
background: rgba(255, 255, 255, 0.05);
border-color: rgba(234, 194, 110, 0.2);
}
.faq-item.active {
border-color: rgba(234, 194, 110, 0.3);
box-shadow: var(--shadow-glow);
}
/* Вопрос */
.faq-question {
width: 100%;
padding: 1.5rem 2rem;
background: transparent;
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: space-between;
gap: 1.5rem;
transition: background 0.3s ease;
}
.faq-question:hover {
background: rgba(234, 194, 110, 0.05);
}
.question-text {
color: var(--color-light);
font-size: 1.125rem;
font-weight: 600;
text-align: left;
line-height: 1.4;
flex: 1;
}
.faq-icon {
flex-shrink: 0;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
color: var(--color-accent);
transition: transform 0.3s ease, color 0.3s ease;
}
.faq-item.active .faq-icon {
transform: rotate(45deg);
color: var(--color-light);
}
.icon-plus {
width: 100%;
height: 100%;
}
/*
КЛЮЧЕВОЕ ИЗМЕНЕНИЕ: ИСПОЛЬЗУЕМ GRID ВМЕСТО MAX-HEIGHT
Это полностью устраняет дерганье и делает анимацию плавной
*/
.faq-answer {
display: grid;
grid-template-rows: 0fr;
transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-answer.open {
grid-template-rows: 1fr;
}
/* Внутренний контейнер для предотвращения сжатия содержимого */
.answer-inner {
overflow: hidden;
}
.answer-text {
padding: 0 2rem 1.5rem;
color: var(--color-gray);
font-size: 1rem;
line-height: 1.7;
margin: 0;
}
/* Адаптивность */
@media (max-width: 1024px) {
.faq-container {
gap: 1rem;
}
.faq-question {
padding: 1.25rem 1.5rem;
}
.answer-text {
padding: 0 1.5rem 1.25rem;
}
}
@media (max-width: 768px) {
.faq-section {
padding: 4rem 1rem;
}
.section-header {
margin-bottom: 2rem;
}
.subtitle-wrapper {
gap: 0.5rem;
}
.subtitle-line {
width: 30px;
}
.section-description {
font-size: 1rem;
}
.question-text {
font-size: 1rem;
}
.faq-question {
padding: 1rem 1.25rem;
gap: 1rem;
}
.faq-icon {
width: 28px;
height: 28px;
}
.answer-text {
padding: 0 1.25rem 1rem;
font-size: 0.95rem;
}
}
/* Уважаем prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
.animate-on-scroll {
opacity: 1;
transform: none;
transition: none;
}
.faq-item,
.faq-question,
.faq-answer,
.faq-icon {
transition: none;
}
.faq-answer {
transition: none;
grid-template-rows: none;
}
.faq-answer.open {
grid-template-rows: none;
}
}
</style>
<script>
// Intersection Observer для анимаций при скроллинге
const observerOptions = {
root: null,
rootMargin: '0px',
threshold: 0.15
};
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
const el = entry.target;
const delay = parseInt(el.dataset.delay || '0');
setTimeout(() => {
el.classList.add('is-visible');
}, delay);
observer.unobserve(el);
}
});
}, observerOptions);
document.querySelectorAll('.animate-on-scroll').forEach((el) => {
observer.observe(el);
});
// Аккордеон FAQ - улучшенная версия
document.querySelectorAll('[data-faq-toggle]').forEach((button) => {
button.addEventListener('click', () => {
const faqItem = button.closest('.faq-item');
const answer = faqItem?.querySelector('[data-faq-content]');
const isExpanded = button.getAttribute('aria-expanded') === 'true';
// Если этот элемент уже открыт, просто закрываем его
if (isExpanded) {
faqItem?.classList.remove('active');
button.setAttribute('aria-expanded', 'false');
answer?.classList.remove('open');
return;
}
// Закрываем все другие открытые элементы
document.querySelectorAll('.faq-item.active').forEach((item) => {
if (item !== faqItem) {
item.classList.remove('active');
const otherButton = item.querySelector('[data-faq-toggle]');
const otherAnswer = item.querySelector('[data-faq-content]');
if (otherButton) otherButton.setAttribute('aria-expanded', 'false');
if (otherAnswer) otherAnswer.classList.remove('open');
}
});
// Открываем текущий
faqItem?.classList.add('active');
button.setAttribute('aria-expanded', 'true');
answer?.classList.add('open');
});
});
</script>

View file

@ -59,6 +59,14 @@ const {
<div class="steps-container">
{steps.map((step: Step, index: number) => (
<div class="step-card-wrapper animate-on-scroll" data-animation="fade-up" data-delay={index * 100 + 200}>
<!-- Вертикальный соединитель (только для мобильной версии, кроме первого элемента) -->
{index > 0 && (
<div class="mobile-connector mobile-only">
<div class="mobile-connector-line"></div>
<div class="mobile-connector-dot"></div>
</div>
)}
<div class="step-card">
<!-- Декоративный фон -->
<div class="step-bg"></div>
@ -79,14 +87,6 @@ const {
<h3 class="step-title">{step.title}</h3>
<p class="step-description">{step.description}</p>
</div>
<!-- Соединительная линия -->
{index < steps.length - 1 && (
<div class="step-connector">
<div class="connector-line"></div>
<div class="connector-dot"></div>
</div>
)}
</div>
</div>
))}
@ -255,6 +255,37 @@ const {
.step-card-wrapper {
flex: 1;
min-width: 0;
position: relative;
}
/* Вертикальный соединитель для мобильной версии (скрыт по умолчанию) */
.mobile-connector {
display: none;
position: absolute;
top: -24px;
left: 50%;
transform: translateX(-50%);
height: 24px;
width: 2px;
z-index: 3;
}
.mobile-connector-line {
width: 100%;
height: 100%;
background: linear-gradient(to bottom, rgba(234, 194, 110, 0.2) 0%, var(--color-accent) 100%);
}
.mobile-connector-dot {
position: absolute;
bottom: -4px;
left: 50%;
transform: translateX(-50%);
width: 8px;
height: 8px;
background: var(--color-accent);
border-radius: 50%;
box-shadow: 0 0 10px var(--color-accent);
}
/* Карточка шага */
@ -272,17 +303,7 @@ const {
flex-direction: column;
}
.step-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 2px;
background: var(--gradient-accent);
transform: scaleX(0);
transition: transform 0.4s ease;
}
/* Убрана верхняя полоса внутри карточки */
.step-card:hover {
transform: translateY(-8px);
@ -291,10 +312,6 @@ const {
box-shadow: var(--shadow-glow);
}
.step-card:hover::before {
transform: scaleX(1);
}
.step-bg {
position: absolute;
top: -50%;
@ -405,37 +422,6 @@ const {
margin: 0;
}
/* Соединительная линия */
.step-connector {
position: absolute;
right: -1.25rem;
top: 50%;
transform: translateY(-50%);
width: calc(100% + 1rem);
display: flex;
align-items: center;
justify-content: center;
z-index: 3;
pointer-events: none;
}
.connector-line {
width: 100%;
height: 2px;
background: linear-gradient(90deg, var(--color-accent) 0%, rgba(234, 194, 110, 0.2) 100%);
position: relative;
}
.connector-dot {
position: absolute;
right: 0;
width: 8px;
height: 8px;
background: var(--color-accent);
border-radius: 50%;
box-shadow: 0 0 10px var(--color-accent);
}
/* Статистика */
.stats-bar {
display: flex;
@ -533,15 +519,21 @@ const {
@media (max-width: 1024px) {
.steps-container {
flex-direction: column;
gap: 1.5rem;
gap: 0;
}
.step-card-wrapper {
width: 100%;
margin-bottom: 1.5rem;
}
.step-connector {
display: none;
.step-card-wrapper:last-child {
margin-bottom: 0;
}
/* Показываем вертикальные соединители */
.mobile-connector {
display: block;
}
.stats-bar {

View file

@ -2,434 +2,472 @@
// src/components/WhyUs.astro
const sectionData = {
subtitle: "Почему мы?",
title: "Локальная экспертиза в Сургуте",
floatingText: "Знаем специфику судов Сургута и регламенты местной полиции изнутри.",
imageUrl: "https://images.unsplash.com/photo-1589829085413-56de8ae18c73?q=80&w=1000&auto=format&fit=crop"
subtitle: "Почему мы?",
title: "Локальная экспертиза в Сургуте",
floatingText:
"Знаем специфику судов Сургута и регламенты местной полиции изнутри.",
imageUrl:
"https://images.unsplash.com/photo-1589829085413-56de8ae18c73?q=80&w=1000&auto=format&fit=crop",
};
const features = [
{
title: "Местный опыт",
desc: "Мы работаем только в Сургуте и ХМАО. Это позволяет нам знать практику каждого судьи и особенности работы местных отделов ГИБДД.",
icon: `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>`
},
{
title: "92% Успешных дел",
desc: "Высокий процент выигранных дел по возврату прав и страховым спорам. Работаем на результат, а не на процесс.",
icon: `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path><path d="m9 12 2 2 4-4"></path></svg>`
},
{
title: "Срочный выезд",
desc: "Оперативно выезжаем на место ДТП или задержания в любой район города для фиксации нарушений.",
icon: `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"></path><path d="M3 3v5h5"></path><path d="M12 7v5l4 2"></path></svg>`
}
{
title: "Местный опыт",
desc: "Мы работаем только в Сургуте и ХМАО. Это позволяет нам знать практику каждого судьи и особенности работы местных отделов ГИБДД.",
icon: `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>`,
},
{
title: "92% Успешных дел",
desc: "Высокий процент выигранных дел по возврату прав и страховым спорам. Работаем на результат, а не на процесс.",
icon: `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path><path d="m9 12 2 2 4-4"></path></svg>`,
},
{
title: "Срочный выезд",
desc: "Оперативно выезжаем на место ДТП или задержания в любой район города для фиксации нарушений.",
icon: `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"></path><path d="M3 3v5h5"></path><path d="M12 7v5l4 2"></path></svg>`,
},
];
---
<section class="why-us-section" id="why-us">
<div class="site-container">
<!-- Левая колонка: Изображение -->
<div class="image-column">
<div class="image-wrapper animate-on-scroll" data-animation="scale-in">
<img src={sectionData.imageUrl} alt="Юридическая практика" class="main-image" loading="lazy" />
<div class="site-container">
<!-- Левая колонка: Изображение -->
<div class="image-column">
<div class="image-wrapper animate-on-scroll" data-animation="scale-in">
<img
src={sectionData.imageUrl}
alt="Юридическая практика"
class="main-image"
loading="lazy"
/>
<!-- Плавающая бежевая плашка -->
<div class="floating-card animate-on-scroll" data-animation="slide-up" data-delay="300">
<p>{sectionData.floatingText}</p>
</div>
</div>
</div>
<!-- Правая колонка: Текст и особенности -->
<div class="content-column">
<div class="section-header">
<span class="subtitle animate-on-scroll" data-animation="fade-up">{sectionData.subtitle}</span>
<h2 class="title animate-on-scroll" data-animation="slide-right" data-delay="100">{sectionData.title}</h2>
</div>
<div class="features-list">
{features.map((feature, index) => (
<div class="feature-item animate-on-scroll" data-animation="stagger-item" data-delay={index * 150 + 200}>
<div class="icon-box" set:html={feature.icon} />
<div class="feature-text">
<h3 class="feature-title">{feature.title}</h3>
<p class="feature-desc">{feature.desc}</p>
</div>
</div>
))}
</div>
<!-- Плавающая бежевая плашка -->
<div
class="floating-card animate-on-scroll"
data-animation="slide-up"
data-delay="300"
>
<p>{sectionData.floatingText}</p>
</div>
</div>
</div>
<!-- Правая колонка: Текст и особенности -->
<div class="content-column">
<div class="section-header">
<span class="subtitle animate-on-scroll" data-animation="fade-up"
>{sectionData.subtitle}</span
>
<h2
class="title animate-on-scroll"
data-animation="slide-right"
data-delay="100"
>
{sectionData.title}
</h2>
</div>
<div class="features-list">
{
features.map((feature, index) => (
<div
class="feature-item animate-on-scroll"
data-animation="stagger-item"
data-delay={index * 150 + 200}
>
<div class="icon-box" set:html={feature.icon} />
<div class="feature-text">
<h3 class="feature-title">{feature.title}</h3>
<p class="feature-desc">{feature.desc}</p>
</div>
</div>
))
}
</div>
</div>
</div>
</section>
<script>
// Intersection Observer для анимаций при скроллинге
const observerOptions = {
root: null,
rootMargin: '0px',
threshold: 0.15
};
// Intersection Observer для анимаций при скроллинге
const observerOptions = {
root: null,
rootMargin: "0px",
threshold: 0.15,
};
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
const delay = (entry.target as HTMLElement).dataset.delay || '0';
const observer = new IntersectionObserver((entries) => {
entries.forEach((entry) => {
if (entry.isIntersecting) {
const delay = (entry.target as HTMLElement).dataset.delay || "0";
setTimeout(() => {
entry.target.classList.add('is-visible');
}, parseInt(delay as string));
setTimeout(
() => {
entry.target.classList.add("is-visible");
},
parseInt(delay as string),
);
// Отключаем наблюдение после появления
observer.unobserve(entry.target);
}
});
}, observerOptions);
// Наблюдаем за всеми анимируемыми элементами
document.querySelectorAll('.animate-on-scroll').forEach((el) => {
observer.observe(el);
// Отключаем наблюдение после появления
observer.unobserve(entry.target);
}
});
}, observerOptions);
// Наблюдаем за всеми анимируемыми элементами
document.querySelectorAll(".animate-on-scroll").forEach((el) => {
observer.observe(el);
});
</script>
<style>
/* Общие стили секции */
/* Общие стили секции */
.why-us-section {
padding: 6rem 2rem;
background-color: #f4f6f9;
font-family:
system-ui,
-apple-system,
sans-serif;
overflow: hidden; /* Предотвращаем горизонтальный скролл от анимаций */
}
.site-container {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 6rem;
align-items: center;
max-width: 1200px;
margin: 0 auto;
}
/* --- Базовые стили анимаций --- */
.animate-on-scroll {
opacity: 0;
will-change: opacity, transform;
}
/* Fade In */
[data-animation="fade-in"] {
transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Fade Up */
[data-animation="fade-up"] {
transform: translateY(30px);
transition:
opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Slide Up (снизу вверх) */
[data-animation="slide-up"] {
transform: translateY(40px);
transition:
opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Slide Right (справа налево) */
[data-animation="slide-right"] {
transform: translateX(-40px);
transition:
opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Scale In (с увеличением) */
[data-animation="scale-in"] {
transform: scale(0.95);
transition:
opacity 1s cubic-bezier(0.4, 0, 0.2, 1),
transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Stagger Item (для списка) */
[data-animation="stagger-item"] {
transform: translateX(-30px);
transition:
opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Активное состояние анимаций */
.animate-on-scroll.is-visible {
opacity: 1;
transform: translate(0) scale(1);
}
/* --- Левая колонка (Изображение) --- */
.image-column {
position: relative;
padding-bottom: 2rem;
padding-right: 2rem;
}
.image-wrapper {
position: relative;
border-radius: 12px;
overflow: visible;
}
.main-image {
width: 100%;
height: auto;
aspect-ratio: 4/4.5;
object-fit: cover;
border-radius: 12px;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
/* Бежевая плавающая плашка с дополнительной анимацией тени */
.floating-card {
position: absolute;
bottom: -30px;
right: -30px;
background-color: #fce1a8;
padding: 1.8rem;
border-radius: 6px;
max-width: 320px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
z-index: 2;
transition: box-shadow 0.5s ease 0.5s;
}
.floating-card.is-visible {
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}
.floating-card p {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 0.95rem;
font-weight: 700;
line-height: 1.5;
color: #1e3050;
margin: 0;
}
/* --- Правая колонка (Контент) --- */
.section-header {
margin-bottom: 3rem;
}
.subtitle {
display: inline-block;
color: #d4af37;
font-size: 0.75rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 3px;
margin-bottom: 1rem;
padding: 0.5rem 1rem;
background: rgba(212, 175, 55, 0.1);
border-radius: 6px;
}
.title {
color: #1e3050;
font-size: clamp(2rem, 4vw, 3rem);
font-weight: 800;
margin: 0;
line-height: 1.2;
letter-spacing: -0.02em;
}
/* Список особенностей (Features) */
.features-list {
display: flex;
flex-direction: column;
gap: 2.5rem;
}
.feature-item {
display: flex;
gap: 1.5rem;
align-items: flex-start;
}
/* Иконки с hover-эффектом */
.icon-box {
flex-shrink: 0;
width: 46px;
height: 46px;
background-color: #122138;
color: #ffffff;
border-radius: 6px;
display: flex;
align-items: center;
justify-content: center;
padding: 10px;
box-shadow: 0 4px 10px rgba(18, 33, 56, 0.2);
transition:
transform 0.3s ease,
box-shadow 0.3s ease;
}
.feature-item:hover .icon-box {
transform: translateY(-2px);
box-shadow: 0 6px 15px rgba(18, 33, 56, 0.3);
}
/* Типографика текстов особенностей */
.feature-text {
flex-grow: 1;
padding-top: 0.2rem;
}
.feature-title {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 1.2rem;
font-weight: 700;
color: #1e3050;
margin: 0 0 0.5rem 0;
transition: color 0.3s ease;
}
.feature-item:hover .feature-title {
color: #122138;
}
.feature-desc {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 0.95rem;
line-height: 1.6;
color: #6c7a8c;
margin: 0;
}
/* --- Адаптивность --- */
@media (max-width: 1024px) {
.site-container {
gap: 3rem;
}
.floating-card {
right: -10px;
max-width: 280px;
}
}
@media (max-width: 768px) {
.why-us-section {
padding: 6rem 2rem;
background-color: #f4f6f9;
font-family: system-ui, -apple-system, sans-serif;
overflow: hidden; /* Предотвращаем горизонтальный скролл от анимаций */
padding: 4rem 1.5rem;
}
.site-container {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 6rem;
align-items: center;
max-width: 1200px;
margin: 0 auto;
grid-template-columns: 1fr;
gap: 3rem;
}
/* --- Базовые стили анимаций --- */
.animate-on-scroll {
opacity: 0;
will-change: opacity, transform;
}
/* Fade In */
[data-animation="fade-in"] {
transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Fade Up */
[data-animation="fade-up"] {
transform: translateY(30px);
transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Slide Up (снизу вверх) */
[data-animation="slide-up"] {
transform: translateY(40px);
transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Slide Right (справа налево) */
[data-animation="slide-right"] {
transform: translateX(-40px);
transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Scale In (с увеличением) */
[data-animation="scale-in"] {
transform: scale(0.95);
transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1),
transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Stagger Item (для списка) */
[data-animation="stagger-item"] {
transform: translateX(-30px);
transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Активное состояние анимаций */
.animate-on-scroll.is-visible {
opacity: 1;
transform: translate(0) scale(1);
}
/* --- Левая колонка (Изображение) --- */
.image-column {
position: relative;
padding-bottom: 2rem;
padding-right: 2rem;
}
.image-wrapper {
position: relative;
border-radius: 12px;
overflow: visible;
}
.main-image {
width: 100%;
height: auto;
aspect-ratio: 4/4.5;
object-fit: cover;
border-radius: 12px;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
/* Бежевая плавающая плашка с дополнительной анимацией тени */
.floating-card {
position: absolute;
bottom: -30px;
right: -30px;
background-color: #fce1a8;
padding: 1.8rem;
border-radius: 6px;
max-width: 320px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
z-index: 2;
transition: box-shadow 0.5s ease 0.5s;
}
.floating-card.is-visible {
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}
.floating-card p {
font-family: Georgia, 'Times New Roman', Times, serif;
font-size: 0.95rem;
font-weight: 700;
line-height: 1.5;
color: #1e3050;
margin: 0;
}
/* --- Правая колонка (Контент) --- */
/* Центрирование заголовка на мобильных */
.section-header {
margin-bottom: 3rem;
text-align: center;
margin-bottom: 2.5rem;
}
.subtitle {
display: inline-block;
color: #d4af37;
font-size: 0.75rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 3px;
margin-bottom: 1rem;
padding: 0.5rem 1rem;
background: rgba(212, 175, 55, 0.1);
border-radius: 6px;
font-size: 0.7rem;
padding: 0.4rem 0.8rem;
}
.title {
color: #1e3050;
font-size: clamp(2rem, 4vw, 3rem);
font-weight: 800;
margin: 0;
line-height: 1.2;
letter-spacing: -0.02em;
font-size: clamp(1.5rem, 5vw, 2rem);
}
/* Список особенностей (Features) */
.features-list {
display: flex;
flex-direction: column;
gap: 2.5rem;
/* Мобильные анимации - упрощаем направления */
[data-animation="slide-right"] {
transform: translateY(30px);
}
[data-animation="stagger-item"] {
transform: translateY(20px);
}
.image-column {
padding-right: 0;
padding-bottom: 0;
}
.feature-item {
display: flex;
gap: 1.5rem;
align-items: flex-start;
gap: 1rem;
justify-content: center;
text-align: center;
}
/* Иконки с hover-эффектом */
.icon-box {
flex-shrink: 0;
width: 46px;
height: 46px;
background-color: #122138;
color: #ffffff;
border-radius: 6px;
display: flex;
align-items: center;
justify-content: center;
padding: 10px;
box-shadow: 0 4px 10px rgba(18, 33, 56, 0.2);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-item:hover .icon-box {
transform: translateY(-2px);
box-shadow: 0 6px 15px rgba(18, 33, 56, 0.3);
}
/* Типографика текстов особенностей */
.feature-text {
flex-grow: 1;
padding-top: 0.2rem;
text-align: center;
}
.feature-title {
font-family: Georgia, 'Times New Roman', Times, serif;
font-size: 1.2rem;
font-weight: 700;
color: #1e3050;
margin: 0 0 0.5rem 0;
transition: color 0.3s ease;
}
.feature-item:hover .feature-title {
color: #122138;
font-size: 1.1rem;
}
.feature-desc {
font-family: Georgia, 'Times New Roman', Times, serif;
font-size: 0.95rem;
line-height: 1.6;
color: #6c7a8c;
margin: 0;
font-size: 0.85rem;
}
/* --- Адаптивность --- */
@media (max-width: 1024px) {
.site-container {
gap: 3rem;
}
.floating-card {
right: -10px;
max-width: 280px;
}
.floating-card {
bottom: -20px;
right: 20px;
left: 20px;
max-width: none;
}
@media (max-width: 768px) {
.why-us-section {
padding: 4rem 1.5rem;
}
.icon-box {
width: 40px;
height: 40px;
}
}
.site-container {
grid-template-columns: 1fr;
gap: 3rem;
}
/* Центрирование заголовка на мобильных */
.section-header {
text-align: center;
margin-bottom: 2.5rem;
}
.subtitle {
font-size: 0.7rem;
padding: 0.4rem 0.8rem;
}
.title {
font-size: clamp(1.5rem, 5vw, 2rem);
}
/* Мобильные анимации - упрощаем направления */
[data-animation="slide-right"] {
transform: translateY(30px);
}
[data-animation="stagger-item"] {
transform: translateY(20px);
}
.image-column {
padding-right: 0;
padding-bottom: 0;
}
.feature-item {
gap: 1rem;
justify-content: center;
text-align: center;
}
.feature-text {
text-align: center;
}
.feature-title {
font-size: 1.1rem;
}
.feature-desc {
font-size: 0.85rem;
}
.floating-card {
bottom: -20px;
right: 20px;
left: 20px;
max-width: none;
}
.icon-box {
width: 40px;
height: 40px;
}
@media (max-width: 480px) {
.why-us-section {
padding: 3rem 1rem;
}
@media (max-width: 480px) {
.why-us-section {
padding: 3rem 1rem;
}
.subtitle {
font-size: 0.65rem;
letter-spacing: 2px;
padding: 0.35rem 0.7rem;
}
.title {
font-size: 1.4rem;
}
.feature-item {
gap: 0.75rem;
}
.icon-box {
width: 36px;
height: 36px;
padding: 7px;
}
.feature-title {
font-size: 1rem;
}
.feature-desc {
font-size: 0.8rem;
line-height: 1.5;
}
.floating-card {
padding: 1.2rem;
}
.floating-card p {
font-size: 0.85rem;
}
.subtitle {
font-size: 0.65rem;
letter-spacing: 2px;
padding: 0.35rem 0.7rem;
}
/* Уважаем prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
.animate-on-scroll {
opacity: 1;
transform: none;
transition: none;
}
.title {
font-size: 1.4rem;
}
</style>
.feature-item {
gap: 0.75rem;
}
.icon-box {
width: 36px;
height: 36px;
padding: 7px;
}
.feature-title {
font-size: 1rem;
}
.feature-desc {
font-size: 0.8rem;
line-height: 1.5;
}
.floating-card {
padding: 1.2rem;
}
.floating-card p {
font-size: 0.85rem;
}
}
/* Уважаем prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
.animate-on-scroll {
opacity: 1;
transform: none;
transition: none;
}
}
</style>

View file

@ -5,6 +5,7 @@ import Services from "@components/home/Services.astro";
import Steps from "@components/home/Steps.astro";
import WhyUs from "@components/home/WhyUs.astro";
import Reviews from "@components/home/Reviews.astro";
import Faq from "@components/home/Faq.astro";
import { SITE_URL } from '@constants';
---
@ -18,4 +19,5 @@ import { SITE_URL } from '@constants';
<Steps />
<WhyUs />
<Reviews />
<Faq />
</Layout>