astro_avtourist/frontend/src/components/home/Hero.astro

177 lines
6.6 KiB
Text
Raw Normal View History

2026-03-31 22:53:39 +05:00
---
import Button from '@components/base/Button.astro';
const badgeText = "ЗАЩИТА ПРАВ ВОДИТЕЛЕЙ В СУРГУТЕ";
const titleWhite = "Защитите свои права";
const titleGold = "и водительское удостоверение";
const description = "Профессиональная юридическая помощь при ДТП, спорах с ГИБДД и страховыми компаниями. Работаем на результат в судах ХМАО-Югры.";
const btnPrimary = "Бесплатная консультация";
const btnSecondary = "Наши услуги";
const bgImageUrl = "/images/home/bg_hero.png";
const lawyerImageUrl = "/images/home/heroImg.jpg";
---
<section class="hero-section">
<div class="hero-overlay"></div>
<div class="site-container hero-grid">
2026-03-31 22:53:39 +05:00
<div class="hero-content">
<div class="badge">
<span class="status-dot"></span>
2026-03-31 22:53:39 +05:00
{badgeText}
</div>
<h1 class="hero-title">
<span class="text-white">{titleWhite}</span>
<br />
<span class="text-gold">{titleGold}</span>
</h1>
<p class="hero-description">{description}</p>
<div class="hero-actions">
<Button variant="gold" size="lg" id="consultation-btn" data-modal-target="consultation-modal">
{btnPrimary}
</Button>
<a href="/services" class="btn btn-secondary">{btnSecondary}</a>
</div>
</div>
<div class="hero-image-wrapper">
<div class="image-composition">
<img src={lawyerImageUrl} alt="Юрист" class="main-image" />
<div class="experience-badge">
<span class="exp-number">20+</span>
<span class="exp-text">ЛЕТ ОПЫТА В ХМАО</span>
</div>
</div>
</div>
</div>
</section>
<style define:vars={{ bgImageUrl: `url("${bgImageUrl}")` }}>
.hero-section {
position: relative;
width: 100%;
min-height: 100vh;
2026-03-31 22:53:39 +05:00
display: flex;
align-items: center;
background-image: var(--bgImageUrl);
background-size: cover;
background-position: center;
/* ГЛАВНОЕ ИСПРАВЛЕНИЕ GAP */
margin: 0 !important;
padding-top: 80px; /* Соответствует высоте Header на десктопе */
box-sizing: border-box;
overflow: hidden;
2026-03-31 22:53:39 +05:00
}
.hero-overlay {
position: absolute;
top: 0; left: 0; width: 100%; height: 100%;
background: linear-gradient(90deg, #0a2540 0%, rgba(10, 37, 64, 0.9) 50%, rgba(10, 37, 64, 0.7) 100%);
2026-03-31 22:53:39 +05:00
z-index: 1;
}
.hero-grid {
2026-03-31 22:53:39 +05:00
position: relative;
z-index: 2;
2026-03-31 22:53:39 +05:00
display: flex;
justify-content: space-between;
align-items: center;
gap: 3rem;
padding-bottom: 4rem;
width: 100%;
2026-03-31 22:53:39 +05:00
}
.hero-content { flex: 1.2; max-width: 700px; }
2026-03-31 22:53:39 +05:00
.badge {
display: inline-flex; align-items: center; gap: 0.6rem;
background-color: rgba(234, 194, 110, 0.15);
border: 1px solid rgba(234, 194, 110, 0.3);
color: #eac26e; padding: 0.5rem 1rem; border-radius: 6px;
font-size: 0.8rem; font-weight: 700; letter-spacing: 1.5px; margin-bottom: 2.5rem;
}
/* Мерцающая точка "На связи" */
.status-dot {
width: 10px;
height: 10px;
background: #22c55e;
border-radius: 50%;
animation: pulse 2s ease-in-out infinite;
box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
flex-shrink: 0;
}
@keyframes pulse {
0% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
}
70% {
transform: scale(1);
box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
}
100% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
}
2026-03-31 22:53:39 +05:00
}
.hero-title { font-size: clamp(2rem, 5vw, 3.8rem); line-height: 1.15; margin: 0 0 2rem 0; font-weight: 800; }
.text-white { color: #ffffff; }
.text-gold { color: #eac26e; }
2026-03-31 22:53:39 +05:00
.hero-description { color: rgba(255, 255, 255, 0.85); font-size: 1.15rem; line-height: 1.6; margin-bottom: 3.5rem; max-width: 580px; }
2026-03-31 22:53:39 +05:00
.hero-actions { display: flex; gap: 1.5rem; align-items: center; }
2026-03-31 22:53:39 +05:00
.btn-secondary {
display: inline-flex; padding: 1rem 2rem; background-color: rgba(255, 255, 255, 0.05);
backdrop-filter: blur(10px); color: #ffffff; border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 6px; font-weight: 600; text-decoration: none; transition: 0.3s;
2026-03-31 22:53:39 +05:00
}
.btn-secondary:hover { background-color: rgba(255, 255, 255, 0.15); transform: translateY(-2px); }
2026-03-31 22:53:39 +05:00
.hero-image-wrapper { flex: 1; display: flex; justify-content: flex-end; position: relative; }
.image-composition { position: relative; width: 100%; max-width: 480px; }
2026-03-31 22:53:39 +05:00
.image-composition::before {
content: ''; position: absolute; top: -10px; left: 20px; right: -20px; bottom: 10px;
background-color: #ffffff; border-radius: 12px; transform: rotate(3deg); z-index: -1;
2026-03-31 22:53:39 +05:00
}
.main-image { width: 100%; border-radius: 12px; border: 8px solid #ffffff; filter: grayscale(100%); box-shadow: 0 30px 60px rgba(0,0,0,0.4); }
2026-03-31 22:53:39 +05:00
.experience-badge {
position: absolute; bottom: 30px; left: -30px; background: #ffffff; padding: 1.5rem;
border-radius: 8px; box-shadow: 0 15px 35px rgba(0,0,0,0.2); min-width: 180px;
2026-03-31 22:53:39 +05:00
}
.exp-number { font-size: 2.2rem; font-weight: 900; color: #1e3050; line-height: 1; display: block; }
.exp-text { font-size: 0.7rem; font-weight: 800; color: #535e6c; text-transform: uppercase; }
2026-03-31 22:53:39 +05:00
/* АДАПТИВНОСТЬ ПОД ВЫСОТУ ШАПКИ */
@media (max-width: 992px) {
.hero-section { padding-top: 70px; min-height: auto; }
.hero-grid { flex-direction: column; text-align: center; padding: 1.5rem 1.5rem 4rem; }
.hero-content { align-items: center; }
.hero-actions { justify-content: center; }
.hero-image-wrapper { margin-top: 3rem; justify-content: center; }
.experience-badge { left: 0; bottom: -20px; }
2026-03-31 22:53:39 +05:00
}
@media (max-width: 767px) {
.hero-section { padding-top: 64px; }
.hero-title { font-size: 1.8rem; }
.hero-actions { flex-direction: column; width: 100%; }
.hero-actions > * { width: 100%; }
.image-composition::before { display: none; }
2026-03-31 22:53:39 +05:00
}
</style>