/* Стили для чекбокса политики */
.privacy-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px 0 16px 0;
}

.privacy-checkbox label {
    font-size: 0.8em;
    font-weight: normal;
    margin: 0;
    line-height: 1.2;
    display: inline;
}

.privacy-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

/* Блок типовых проблем и решений */
.info-block {
    background: var(--secondary-color);
    padding: 60px 0 40px 0;
    border-top: 1px solid var(--border-color);
}

.info-block h2 {
    color: var(--text-color);
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    font-weight: 700;
}

@media (max-width: 768px) {
    .info-block h2 {
        margin-top: 5rem;
    }
}

.problems-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: space-between;
}

.problem-category {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    padding: 24px 20px;
    flex: 1 1 320px;
    min-width: 320px;
    margin-bottom: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.problem-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.problem-category h3 {
    font-size: 1.25rem;
    margin-bottom: 18px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.problem-category h3 i {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.problem-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.problem-item {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.problem-item:hover {
    background: rgba(68, 68, 68, 0.3);
}

.problem-title {
    font-weight: 600;
    font-size: 1.08rem;
    margin-bottom: 6px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.problem-title i {
    color: var(--primary-color);
    font-size: 1rem;
}

.problem-info {
    font-size: 0.98rem;
    margin-bottom: 2px;
    color: #b0b0b0;
}

.problem-info .label {
    font-weight: 500;
    color: var(--primary-color);
    margin-right: 4px;
}

@media (max-width: 1100px) {
    .problems-grid {
        flex-direction: column;
        gap: 24px;
    }

    .problem-category {
        max-width: 100%;
    }
}

/* Общие стили */
:root {
    --primary-color: #00aaff;
    --primary-hover-color: #0088cc;
    --secondary-color: #1e1e1e;
    --text-color: #e0e0e0;
    --background-color: #2a2a2a;
    --footer-bg-color: #1a1a1a;
    --footer-text-color: #e0e0e0;
    --border-color: #444;
}

.problems-toc {
    margin: 0 0 18px 0;
}

.problems-toc ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.problems-toc a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Стили для якорей: pill-стили, hover и активный state */
.problems-toc a {
    display: inline-block;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 999px;
    border: 1px solid transparent;
    transition: transform 0.15s ease, background-color 0.15s ease,
        color 0.15s ease, box-shadow 0.15s ease;
    font-weight: 600;
}

.problems-toc a:hover,
.problems-toc a:focus {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.04);
    outline: none;
}

.problems-toc a.active {
    background: var(--primary-color);
    color: #fff;
    border-color: rgba(0, 170, 255, 0.12);
    box-shadow: 0 6px 18px rgba(0, 170, 255, 0.08);
}

@media (max-width: 600px) {
    .problems-toc ul {
        gap: 8px;
    }

    .problems-toc a {
        padding: 10px 14px;
        font-size: 0.98rem;
    }

    .problems-toc {
        margin-bottom: 14px;
    }
}

/* Кнопка "Вверх" */
.back-to-top {
    position: fixed;
    right: 20px !important;
    bottom: 20px !important;
    top: auto !important;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1200;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 600px) {
    .back-to-top {
        width: 56px;
        height: 56px;
        font-size: 1.35rem;
        right: 16px;
        bottom: 16px;
    }
}

.problems-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}

.problems-main {
    min-width: 0;
}

.problems-aside .aside-box {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 12px;
    color: var(--text-color);
}

.problems-aside.sticky {
    position: sticky;
    top: 90px;
    z-index: 900;
    align-self: start;
    max-height: calc(100vh - 110px);
    overflow: auto;
}

.problem-card {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
    color: var(--text-color);
}

.problem-card h4 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    color: var(--primary-color);
}

.problem-card .short {
    color: var(--text-color);
    margin: 0 0 8px 0;
    opacity: 0.9;
}

/* Подсветка найденных карточек в результате поиска */
.problem-card.match {
    box-shadow: 0 0 0 2px rgba(0, 170, 255, 0.06) inset,
        0 6px 18px rgba(0, 0, 0, 0.35);
    background: rgba(0, 170, 255, 0.02);
}

details {
    background: transparent;
}

details summary {
    cursor: pointer;
    padding: 6px 0;
    color: var(--text-color);
    font-weight: 600;
}

details[open] summary {
    color: var(--primary-hover-color);
}

details dl {
    margin: 0;
    padding: 0 0 8px 0;
}

details dt {
    font-weight: 700;
    margin-top: 6px;
    color: var(--primary-color);
}

details dd {
    margin: 0 0 8px 0;
    color: var(--text-color);
    line-height: 1.45;
}

@media (max-width: 900px) {
    .problems-wrap {
        grid-template-columns: 1fr;
    }

    .problems-aside {
        order: -1;
    }

    .problems-aside.sticky {
        position: static;
        top: auto;
        max-height: none;
        overflow: visible;
    }
}

/* Увеличенные кнопки для мобильных устройств */
@media (max-width: 600px) {
    .btn {
        padding: 14px 18px;
        font-size: 1.05rem;
        border-radius: 8px;
    }

    /* В блоке hero и aside делаем кнопки удобными для тапа — 100% ширины */
    .hero-buttons .btn,
    .problems-aside .btn,
    .hero-phone a,
    header .contact-phone {
        display: block;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        margin-bottom: 10px;
    }

    /* Немного увеличим размеры текста в хедере для удобства */
    header .contact-phone {
        font-size: 1.05rem;
        padding: 8px 0;
    }
}

html {
    scroll-behavior: smooth;
    /* Адаптивный базовый размер шрифта */
    font-size: clamp(16px, 1.5vw, 18px);
}

/* Стили для модального окна */
.modal {
    display: none;
    /* Скрыто по умолчанию */
    position: fixed;
    /* Оставаться на месте */
    z-index: 1001;
    /* Поверх всего */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    /* Включить прокрутку, если нужно */
    background-color: rgba(0, 0, 0, 0.5);
    /* Черный с прозрачностью */
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--background-color);
    color: var(--text-color);
    margin: auto;
    padding: 30px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 500px;
    text-align: center;
    border-radius: 10px;
    position: relative;
    animation: fadeIn 0.4s;
}

/* Анимация появления */
@keyframes fadeIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: var(--text-color);
    text-decoration: none;
    cursor: pointer;
}

.modal.show {
    display: flex;
}

/* Анимация при прокрутке */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
        Arial, sans-serif;
    margin: 0;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

h1,
h2,
h3 {
    color: var(--text-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.btn:hover {
    background: var(--primary-hover-color);
    text-decoration: none;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
    border-color: #5a6268;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Шапка */
header {
    background: rgba(42, 42, 42, 0.8);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 0.3s ease;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
}

header nav ul {
    display: flex;
    flex-direction: row;
    margin: 0;
    padding: 0;
    list-style: none;
}

header nav ul li {
    display: inline-block;
    margin-left: 20px;
}

header nav a {
    position: relative;
    transition: color 0.3s ease;
}

header nav a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

header nav a:hover::after {
    width: 100%;
}

.contact-phone {
    font-weight: bold;
}

/* Секция Hero */
#hero {
    color: #fff;
    padding: 7rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

#hero .container {
    animation: fadeInUp 1s ease-out;
}

#hero h1 {
    color: #fff;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

#hero p {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

/* Sticky footer: держим футер внизу окна на коротких страницах (ошибки) */
html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Когда .container является непосредственным потомком body (как в error-страницах), займёт оставшееся пространство */
body>.container {
    flex: 1 0 auto;
}

footer {
    margin-top: auto;
}

.hero-phone {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-phone a {
    color: #fff;
    font-weight: bold;
    background: var(--primary-color);
    padding: 6px 18px;
    border-radius: 8px;
    font-size: 2rem;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: background 0.3s, color 0.3s;
}

.hero-phone a:hover {
    background: var(--primary-hover-color);
    color: #fff;
}

.fa-phone {
    font-size: 18px;
}

@media (max-width: 420px) {
    .hero-phone a {
        font-size: 1.4rem;
        padding: 4px 12px;
    }
}

#hero .btn {
    font-size: 1.1rem;
    padding: 15px 35px;
    background: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

#hero .btn:hover {
    background: transparent;
    color: var(--primary-color);
    transform: translateY(-3px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Секции */
section {
    padding: 2rem 0;
}

section:nth-child(even) {
    background: var(--secondary-color);
}

h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

/* Услуги */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.service-item {
    background: var(--background-color);
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.service-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Секция с формой */
#contact {
    background: var(--secondary-color);
}

#contact h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

@media (max-width: 768px) {
    #contact h2 {
        margin-top: 5rem;
    }
}

.contact-form {
    max-width: 600px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    box-sizing: border-box;
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    box-sizing: border-box;
    background-color: var(--secondary-color);
    color: var(--text-color);
    resize: vertical;
    /* Разрешить изменение размера только по вертикали */
    min-height: 100px;
    /* Минимальная высота */
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #888;
}

.contact-form button {
    align-self: center;
    min-width: 180px;
    padding: 12px 20px;
    font-size: 16px;
    box-sizing: border-box;
}

.file-upload-label {
    display: inline-block;
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-align: center;
    margin-top: 5px;
    min-width: 180px;
    font-size: 16px;
}

.file-upload-label:hover {
    background-color: var(--primary-hover-color);
}

input[type="file"] {
    display: none;
}

/* Отображение имени прикреплённого файла рядом с кнопкой */
.file-name {
    display: inline-block;
    margin-left: 12px;
    color: #cfcfcf;
    font-size: 0.95rem;
    vertical-align: middle;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-name.has-file {
    color: var(--text-color);
    font-weight: 600;
}

.modal-form {
    margin-top: 20px;
}

/* Подвал */
footer {
    background: var(--footer-bg-color);
    color: var(--footer-text-color);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 2rem;
    text-align: left;
}

.footer-content h3,
.footer-content h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 10px;
}

.footer-nav a {
    color: var(--footer-text-color);
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-contacts p {
    margin-bottom: 10px;
}

.footer-contacts a {
    color: var(--footer-text-color);
    transition: color 0.3s;
}

.footer-contacts a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-contacts i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* Состояние для мобильных устройств (до 768px) */
.social-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    /* Центрируем иконки */
    flex-wrap: wrap;
    gap: 15px;
    /* Современный способ задать отступы между иконками */
}

.social-links a {
    color: var(--footer-text-color);
    font-size: 2rem;
    transition: color 0.3s;
    display: inline-flex;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Состояние для компьютеров и планшетов (от 768px и выше) */
@media (min-width: 768px) {
    .social-links {
        justify-content: flex-start;
        /* Прижимаем к левому краю */
        gap: 20px;
        /* Можно немного увеличить расстояние на десктопе */
    }
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.burger-menu {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .prices-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-content>div {
        margin-bottom: 20px;
    }

    header .container {
        flex-direction: row;
        justify-content: space-between;
    }

    header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(42, 42, 42, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
    }

    header nav.active {
        display: flex;
    }

    header nav ul {
        flex-direction: column;
        gap: 20px;
    }

    header nav ul li {
        margin: 0;
        text-align: center;
    }

    .burger-menu {
        display: flex;
    }

    .burger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .burger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .burger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .contact-phone {
        display: none;
        /* Скрываем телефон в шапке на мобильных */
    }

    #hero h1 {
        font-size: 2.4rem;
        line-height: 1.3;
    }

    .services-grid,
    .problems-grid {
        flex-direction: column;
        gap: 4px;
        padding: 0 2px;
    }

    .problem-category {
        min-width: 0;
        max-width: 100%;
        padding: 2px 4px;
        margin-bottom: 6px;
        box-sizing: border-box;
        box-shadow: none;
        border-radius: 8px;
    }

    .problem-list {
        gap: 4px;
    }

    .problem-item {
        padding: 4px 1px;
        border-radius: 6px;
    }

    .problem-title {
        font-size: 0.85rem;
        gap: 4px;
    }

    .problem-info {
        font-size: 0.85rem;
    }
}

/* Секция FAQ */
/* Секция "Как мы работаем" */
.how-it-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.work-step {
    background: var(--background-color);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.work-step .step-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Секция FAQ */
.faq-item {
    background: var(--background-color);
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.faq-question {
    padding: 15px 20px;
    margin: 0;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    /* Чтобы текст не выделялся при клике */
}

.faq-question::after {
    content: "+";
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    background: var(--secondary-color);
}

.faq-answer p {
    padding: 0 20px 15px;
    margin: 0;
}

.faq-item.active .faq-answer {
    padding-top: 15px;
    max-height: 200px;
    /* Установить достаточно большую высоту */
}

/* Секция Отзывы */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.review-item {
    background: var(--background-color);
    padding: 25px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.review-item p {
    flex-grow: 1;
    font-style: italic;
    margin: 0 0 15px 0;
}

.review-item h4 {
    margin: 0;
    text-align: right;
    color: var(--primary-color);
    font-weight: bold;
}

/* Секция с ценами */
.prices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.price-table {
    background: var(--background-color);
    padding: 25px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.price-table h3 {
    color: var(--primary-color);
    margin-top: 0;
    text-align: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.price-table ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.price-table li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s;
}

.price-table li:last-child {
    border-bottom: none;
}

.price-table li:hover {
    background-color: var(--secondary-color);
}

.price-table li span {
    font-weight: bold;
    color: var(--text-color);
}

@media (max-width: 420px) {
    #hero h1 {
        color: #fff;
        font-size: 1.7rem;
        margin-bottom: 1rem;
        font-weight: 700;
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    }
}

@media (min-width: 768px) {
    .hero-phone {
        display: none;
    }
}

header.sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    /* Чтобы было выше блоков услуг */
    background: rgba(42, 42, 42, 0.95);
    /* Укажите ваш цвет фона */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Гарантия видимости услуг, если JS не сработал мгновенно */
.reveal-on-scroll.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Для открытия меню на мобильных */
header nav.nav-active {
    display: block !important;
    /* Или transform: translateX(0), если используете анимацию */
}

/* Для раскрытия FAQ */
.faq-item .faq-answer {
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

/* Для плавного появления услуг */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

/* Фиксация меню */
header.sticky {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(42, 42, 42, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.faq-answer {
    display: none;
    /* Скрыто по умолчанию */
}

.faq-item.active .faq-answer {
    display: block;
    /* Показывается при наличии класса active */
}

/*"Это добавлено с помощью JavaScript"*/

/* --- FIX ДЛЯ НОВЫХ СКРИПТОВ (ДОБАВИТЬ В КОНЕЦ ФАЙЛА) --- */

/* --- ФИНАЛЬНЫЕ ПРАВКИ ИНТЕРФЕЙСА --- */

/* --- ФИНАЛЬНЫЕ ПРАВКИ ИНТЕРФЕЙСА --- */

/* 1. Блокировка прокрутки (iOS fix) */
body.no-scroll {
    overflow: hidden !important;
    height: 100vh !important;
    width: 100% !important;
    position: fixed !important;
}

/* 2. Кнопка "Вверх" слева внизу */
.back-to-top {
    right: auto !important;
    left: 20px !important;
    bottom: 20px !important;
}

/* 3. Поиск в боковой панели */
.aside-box #problemsSearch {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    box-sizing: border-box;
    outline: none;
    transition: 0.3s;
}

/* 4. Объединенный блок для мобильных (Hero + Меню) */
@media (max-width: 768px) {

    /* ГАРАНТИРОВАННЫЙ ОТСТУП HERO (как вы просили) */
    #hero {
        padding: calc(70px + 5rem) 0 3rem 0 !important;
        min-height: auto !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    #hero h1 {
        margin-bottom: 0.5rem !important;
    }

    #hero p {
        margin-bottom: 1.5rem !important;
    }

    /* МОБИЛЬНОЕ МЕНЮ: Исправление боковых отступов */
    header {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        height: 70px;
        z-index: 1100;
        background: rgba(20, 20, 20, 0.95);
    }

    header nav {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        /* Занимает ровно ширину окна */
        height: 100vh;
        padding: 0 !important;
        /* Убираем лишние боковые отступы контейнера */
        margin: 0 !important;
        background-color: rgba(15, 15, 15, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1050;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        visibility: hidden;
    }

    header nav ul {
        width: 100%;
        /* Список растягивается на всю ширину */
        padding: 0 !important;
        margin: 0 !important;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    header nav ul li {
        width: 100%;
        /* Пункт списка на всю ширину */
        list-style: none;
    }

    header nav a {
        font-size: 1.8rem !important;
        padding: 20px 0;
        /* Растягиваем зону клика по вертикали */
        width: 100%;
        /* Ссылка на всю ширину */
        display: block;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        /* Легкий разделитель */
    }

    header nav.nav-active {
        transform: translateY(0);
        visibility: visible;
    }

    .burger-menu {
        position: relative;
        z-index: 1200;
    }
}

/* 5. Анимация бургера */
.burger-menu.toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px) !important;
}

.burger-menu.toggle span:nth-child(2) {
    opacity: 0 !important;
}

.burger-menu.toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px) !important;
}

#services,
#services * {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
}

/* Специально для поля поиска и всех инпутов на мобильных */
@media screen and (max-width: 768px) {

    #problemsSearch,
    .aside-box input[type="search"],
    .contact-form input,
    .contact-form textarea {
        font-size: 16px !important;
    }
}