/* === ОБЩИЕ ПЕРЕМЕННЫЕ И СБРОС === */
:root {
    --primary: #1E3A8A;
    --primary-light: #2563EB;
    --accent: #F97316;
    --accent-light: #FB923C;
    --text: #1E293B;
    --text-light: #64748B;
    --bg: #F8FAFC;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}
body.loaded { opacity: 1; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
a { text-decoration: none; color: inherit; }

/* === ШАПКА === */
.header {
    padding: 24px 0;
    position: sticky; top: 0; z-index: 100;
    box-shadow: var(--shadow);
    transition: background 0.4s;
}
body.inner-page .header { background: var(--primary); }
body:not(.inner-page) .header {
    background: transparent;
    position: fixed;
    width: 100%;
}
body:not(.inner-page) .header.scrolled {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
}

.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 30px; }
.logo { font-size: 28px; font-weight: 800; color: white; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.logo i { color: var(--accent); font-size: 32px; }

/* Цвет элементов в шапке */
body.inner-page .nav-links a,
body.inner-page .header-search input,
body.inner-page .header-search button,
body.inner-page .city-selector select { color: rgba(255,255,255,0.9); }
body:not(.inner-page) .nav-links a,
body:not(.inner-page) .header-search input,
body:not(.inner-page) .header-search button,
body:not(.inner-page) .city-selector select { color: rgba(255,255,255,0.9); }
/* При скролле – тёмный цвет */
body:not(.inner-page) .header.scrolled .nav-links a,
body:not(.inner-page) .header.scrolled .header-search input,
body:not(.inner-page) .header.scrolled .header-search button,
body:not(.inner-page) .header.scrolled .city-selector select { color: var(--text); }
/* Логотип при скролле */
body:not(.inner-page) .header.scrolled .logo { color: var(--primary); }
/* Поиск при скролле */
body:not(.inner-page) .header.scrolled .header-search {
    background: rgba(0,0,0,0.06);
}
body:not(.inner-page) .header.scrolled .header-search input::placeholder {
    color: var(--text-light);
}
.nav-links { display: flex; gap: 28px; font-weight: 500; align-items: center; }
.nav-links a:hover { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 18px; }

/* Поиск в шапке */
.header-search {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.15);
    border-radius: 30px;
    padding: 6px 12px;
    margin-right: 4px;
}
.header-search input {
    background: transparent;
    border: none;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 14px;
    width: 160px;
    outline: none;
    color: inherit;
}
.header-search input::placeholder { color: rgba(255,255,255,0.7); }
.header-search button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
}

/* Выбор города */
.city-selector select {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}
.city-selector select option {
    color: var(--text);
    background: var(--white);
}

.btn {
    background: var(--accent); color: white; padding: 12px 28px; border-radius: 100px;
    font-weight: 600; display: inline-flex; align-items: center; gap: 8px;
    transition: var(--transition); border: none; cursor: pointer; box-shadow: 0 4px 15px rgba(249,115,22,0.4);
    white-space: nowrap;
}
.btn:hover { background: var(--accent-light); transform: translateY(-2px); }
.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
    box-shadow: none;
}

/* Мега-меню */
.dropdown { position: relative; }
.dropdown-trigger { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.dropdown-menu {
    position: absolute; top: 100%; left: 0;
    background: var(--white); border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); padding: 24px;
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: all 0.3s ease; z-index: 300;
    color: var(--text);
}
.dropdown-menu a { color: var(--text); }
.dropdown-menu a:hover { color: var(--accent); }
@media (hover: hover) { .dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); } }
.dropdown.active .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.mega-menu { width: 800px; left: -200px; }
.mega-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.mega-col h4 { font-size: 16px; font-weight: 600; color: var(--primary); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.mega-col a { display: block; padding: 6px 0; font-size: 14px; }

/* Бургер */
.burger { display: none; flex-direction: column; cursor: pointer; gap: 5px; }
.burger span { width: 25px; height: 3px; background: white; transition: var(--transition); }
.mobile-menu {
    position: fixed; top: 0; left: 0; width: 80%; max-width: 320px; height: 100vh;
    background: var(--white); box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 200; padding: 24px;
    transform: translateX(-100%); transition: transform 0.3s ease; visibility: hidden;
    overflow-y: auto;
}
.mobile-menu.active { transform: translateX(0); visibility: visible; }
.mobile-menu a { display: block; padding: 12px 0; border-bottom: 1px solid #E2E8F0; font-weight: 500; color: var(--text); }
.mobile-menu .close-btn { text-align: right; font-size: 24px; cursor: pointer; }

/* === HERO (главная) === */
.hero {
    position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: #0a0f1a; overflow: hidden; color: white; padding: 160px 0 120px;
}
.hero::before {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(37,99,235,0.4) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(249,115,22,0.3) 0%, transparent 40%);
    z-index: 1;
}
.particles { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; }
.particle {
    position: absolute; background: rgba(255,255,255,0.12); border-radius: 50%;
    animation: floatUp linear infinite;
}
@keyframes floatUp {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}
.hero-content { position: relative; z-index: 10; max-width: 800px; text-align: center; padding: 0 20px; }
.hero h1 { font-size: 56px; font-weight: 800; line-height: 1.1; margin-bottom: 24px; letter-spacing: -1px; text-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.hero p { font-size: 20px; opacity: 0.9; margin-bottom: 40px; font-weight: 400; }
.hero-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

/* === СЕКЦИИ (главная и внутренние) === */
.section { padding: 100px 0; position: relative; }
.section:target { animation: highlight 1.5s ease; }
@keyframes highlight {
    0% { background-color: rgba(249,115,22,0.15); }
    100% { background-color: transparent; }
}
.section-title {
    font-size: 40px; font-weight: 700; text-align: center; margin-bottom: 24px; color: var(--primary);
    position: relative; padding-bottom: 20px;
}
.section-title::after {
    content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
    width: 80px; height: 4px; background: linear-gradient(90deg, var(--accent), var(--primary-light));
    border-radius: 2px; width: 0; transition: width 0.8s ease;
}
[data-animate].visible .section-title::after { width: 80px; }
.section-subtitle { text-align: center; color: var(--text-light); font-size: 18px; max-width: 600px; margin: 0 auto 60px; }

/* Категории (главная) */
.category-title {
    font-size: 28px; font-weight: 700; color: var(--primary); margin: 48px 0 24px;
    padding-left: 16px; border-left: 4px solid var(--accent);
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px; margin-bottom: 60px;
    align-items: stretch;
}
.service-card {
    background: var(--white); border-radius: var(--radius); padding: 32px; text-align: center;
    box-shadow: var(--shadow); transition: var(--transition); border: 1px solid transparent;
    position: relative; overflow: hidden; display: flex; flex-direction: column; height: 100%;
}
.service-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--primary-light));
    transform: scaleX(0); transition: transform 0.4s ease;
}
.service-card:hover { border-color: #E2E8F0; transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.service-card:hover::before { transform: scaleX(1); }
.service-icon { font-size: 40px; color: var(--accent); margin-bottom: 20px; transition: transform 0.3s; }
.service-card:hover .service-icon { transform: scale(1.1); }
.service-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.price-list { list-style: none; text-align: left; margin-bottom: 24px; flex-grow: 1; }
.price-list li { padding: 8px 0; border-bottom: 1px dashed #E2E8F0; display: flex; justify-content: space-between; font-size: 14px; }
.price-list span { font-weight: 600; color: var(--primary); }
.service-card .btn { width: 100%; justify-content: center; margin-top: auto; }

/* Urgent CTA */
.urgent-cta {
    background: var(--primary); padding: 80px 24px; text-align: center; color: white;
    border-radius: var(--radius); margin: -40px auto 0; max-width: 1000px; position: relative; z-index: 20; box-shadow: var(--shadow-lg);
}
.urgent-cta h2 { font-size: 36px; margin-bottom: 16px; }
.urgent-cta p { font-size: 18px; margin-bottom: 32px; opacity: 0.9; }
.pulse { display: inline-block; width: 16px; height: 16px; background: #22C55E; border-radius: 50%; margin-right: 12px; animation: pulse 2s infinite; }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.7); }
    70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* Advantages */
.advantages-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
.adv-item { background: var(--white); border-radius: var(--radius); padding: 32px 20px; text-align: center; box-shadow: var(--shadow); transition: var(--transition); }
.adv-item:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.adv-icon { width: 64px; height: 64px; background: linear-gradient(135deg, var(--primary-light), var(--accent)); border-radius: 18px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; color: white; font-size: 28px; }

/* How we work */
.steps { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.step { flex: 1; min-width: 200px; text-align: center; padding: 32px 16px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); transition: var(--transition); position: relative; }
.step:hover { transform: translateY(-6px); }
.step-num { width: 56px; height: 56px; background: var(--accent); color: white; border-radius: 50%; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }

/* === HERO ДЛЯ УСЛУГ === */
.hero-service {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white; padding: 70px 24px; border-radius: var(--radius);
    margin-bottom: 60px; text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-service h1 { font-size: 44px; font-weight: 800; margin-bottom: 20px; position: relative; z-index: 1; }
.hero-service .hero-subtitle { font-size: 20px; opacity: 0.95; max-width: 650px; margin: 0 auto 30px; position: relative; z-index: 1; }
.hero-badges { display: flex; justify-content: center; gap: 24px; margin-bottom: 35px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-badge { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.15); padding: 8px 18px; border-radius: 100px; font-weight: 500; font-size: 15px; position: relative; z-index: 1; }

/* === 3D-АНИМАЦИЯ ЭЛЕКТРИЧЕСТВА === */
.electric-3d-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    perspective: 400px;
    z-index: 0;
}
.lightning-bolt {
    position: absolute;
    width: 4px;
    height: 100%;
    background: linear-gradient(to top, transparent, #FFD700, #FFA500, transparent);
    opacity: 0;
    transform: rotateX(60deg) rotateZ(20deg);
    animation: lightning 3s infinite;
    filter: drop-shadow(0 0 6px #FFD700);
}
.lightning-bolt:nth-child(2) {
    left: 30%;
    animation-delay: 1s;
}
.lightning-bolt:nth-child(3) {
    left: 60%;
    animation-delay: 2s;
}
@keyframes lightning {
    0% {
        top: -20%;
        opacity: 0;
        transform: rotateX(60deg) rotateZ(20deg) scaleY(0);
    }
    10% {
        top: 10%;
        opacity: 1;
    }
    20% {
        top: 30%;
        opacity: 0.8;
    }
    40% {
        top: 50%;
        opacity: 1;
    }
    50% {
        top: 70%;
        opacity: 0.9;
    }
    70% {
        top: 90%;
        opacity: 0.4;
    }
    100% {
        top: 110%;
        opacity: 0;
        transform: rotateX(60deg) rotateZ(25deg) scaleY(0);
    }
}

/* === КАРТОЧКИ ЦЕН (для услуг) === */
.price-table { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.price-card {
    background: var(--white); border-radius: var(--radius); padding: 32px 24px;
    box-shadow: var(--shadow); transition: var(--transition);
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.price-card h3 { font-size: 20px; margin-bottom: 16px; color: var(--primary); }
.price-card ul { list-style: none; }
.price-card li { padding: 8px 0; border-bottom: 1px dashed #E2E8F0; display: flex; justify-content: space-between; font-size: 15px; }
.price-card li span { font-weight: 600; color: var(--primary); }

/* === FAQ === */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
    background: var(--white); border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow); margin-bottom: 16px;
}
.faq-item h3 { font-size: 18px; color: var(--primary); margin-bottom: 8px; }

/* === CTA БЛОК === */
.cta-block {
    background: var(--primary-light);
    color: white; padding: 40px 24px; border-radius: var(--radius);
    text-align: center; margin: 40px 0 60px;
}
.cta-block h3 { font-size: 28px; margin-bottom: 16px; }
.cta-block p { margin-bottom: 24px; font-size: 16px; opacity: 0.9; }

/* === БЛОГ (сетка) === */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.blog-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); }
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.blog-card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.placeholder-img { width: 100%; height: 200px; background: #E2E8F0; display: flex; align-items: center; justify-content: center; color: #94A3B8; font-size: 44px; }
.blog-content { padding: 20px; }
.blog-content h4 { font-size: 18px; margin-bottom: 8px; color: var(--text); }
.blog-content p { font-size: 14px; color: var(--text-light); }

/* === ОТЗЫВЫ === */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.review-card { background: var(--white); padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow); position: relative; }
.review-card::before { content: "\201C"; font-size: 72px; color: var(--accent); opacity: 0.2; position: absolute; top: 8px; left: 16px; line-height: 1; }
.review-author { margin-top: 20px; font-weight: 600; color: var(--primary); }

/* === ФОРМА === */
.contact-form {
    background: var(--primary); padding: 70px 24px; border-radius: var(--radius);
    text-align: center; color: white; box-shadow: var(--shadow-lg);
}
.contact-form h2 { font-size: 34px; margin-bottom: 20px; }
.form-fields { display: flex; flex-direction: column; gap: 16px; max-width: 500px; margin: 0 auto 24px; }
.form-fields input, .form-fields select {
    padding: 14px 18px; border-radius: 12px; border: 2px solid transparent;
    width: 100%; font-family: inherit; background: white; color: var(--text);
}
.form-fields input:focus, .form-fields select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(249,115,22,0.2); }
.form-fields .btn { align-self: center; max-width: 320px; width: 100%; padding: 16px 40px; font-size: 18px; }

/* === БРЕНДЫ (сетка) === */
.brands-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 16px; text-align: center; }
.brand-item { background: var(--white); border-radius: var(--radius); padding: 16px 12px; box-shadow: var(--shadow); font-weight: 500; }

/* === ХЛЕБНЫЕ КРОШКИ === */
.breadcrumbs { padding: 32px 0 16px; font-size: 14px; color: var(--text-light); }
.breadcrumbs a { color: var(--primary); }

/* === ФУТЕР === */
.footer { background: #0F172A; color: #94A3B8; padding: 70px 0 30px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 50px; }
.footer h4 { color: white; margin-bottom: 18px; font-size: 18px; }
.footer a { color: #94A3B8; display: block; margin-bottom: 10px; transition: color 0.3s; }
.footer a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid #1E293B; padding-top: 25px; text-align: center; font-size: 14px; }

/* Фиксированная кнопка звонка */
.call-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 64px;
    height: 64px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 8px 25px rgba(249,115,22,0.5);
    z-index: 999;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: pulse 2s infinite;
}
.call-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(249,115,22,0.7);
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(249,115,22,0.7); }
    70% { box-shadow: 0 0 0 15px rgba(249,115,22,0); }
    100% { box-shadow: 0 0 0 0 rgba(249,115,22,0); }
}

/* === АНИМАЦИИ === */
[data-animate] { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-animate].visible { opacity: 1; transform: translateY(0); }

/* === ГАРАНТИРОВАННАЯ ВИДИМОСТЬ МЕГА-МЕНЮ === */
.dropdown-menu,
.dropdown-menu a,
.dropdown-menu h4,
.mega-col a {
    color: var(--text) !important;
    background: var(--white) !important;
}
.dropdown-menu a:hover {
    color: var(--accent) !important;
}
.mega-col h4 {
    color: var(--primary) !important;
}

/* === МОБИЛЬНАЯ АДАПТАЦИЯ === */
@media (max-width: 768px) {
    .header { padding: 16px 0; }
    .header-inner { gap: 10px; }
    .nav-links,
    .header-search,
    .header-actions .btn,
    .city-selector { display: none; }
    .burger { display: flex; }
    .hero { padding: 120px 0 80px; min-height: 80vh; }
    .hero h1 { font-size: 36px; }
    .hero p { font-size: 16px; }
    .section { padding: 60px 0; }
    .section-title { font-size: 32px; }
    .section-subtitle { font-size: 16px; }
    .category-title { font-size: 24px; }
    .services-grid { grid-template-columns: 1fr; gap: 24px; }
    .advantages-grid { grid-template-columns: 1fr; gap: 20px; }
    .steps { flex-direction: column; }
    .blog-grid { grid-template-columns: 1fr; }
    .reviews-grid { grid-template-columns: 1fr; }
    .form-fields { max-width: 100%; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .particles { display: none; }
    .hero-service h1 { font-size: 32px; }
    .mega-menu { width: calc(100vw - 48px); left: 0; position: fixed; top: 60px; }
    .mega-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .dropdown-menu { width: 100%; }

    body, .container, .header, .mobile-menu, .hero, .section, .footer {
        max-width: 100vw;
        overflow-x: hidden;
    }
    img, video, iframe { max-width: 100%; height: auto; }
}
/* Заглушки картинок услуг */
.service-image-placeholder {
    width: 100%;
    height: 160px;
    background: linear-gradient(145deg, #f0f4ff 0%, #e9eff7 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.service-image-placeholder i {
    font-size: 56px;
    color: var(--primary-light);
    opacity: 0.6;
    transition: transform 0.3s;
}
.service-card:hover .service-image-placeholder i {
    transform: scale(1.1);
}
