:root {
    --bg: #f7f8fa;
    --text-main: #0f172a;
    --text-muted: #6b7280;
    --accent: #2563eb;
}

/* ---------- Базовые настройки ---------- */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Основная область страницы */

.page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

/* ---------- Hero-блок (главная, 404, 500, product header) ---------- */

.hero {
    max-width: 720px;
    width: 100%;
    text-align: center;
}

.hero-logo {
    display: block;
    margin: 0 auto 24px;
    width: 100%;
    max-width: 320px;
    height: auto;
}

.hero-tagline {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 500;
}

.hero-product {
    margin: 0 0 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.hero-text {
    margin: 0 auto 14px;
    max-width: 640px;
    font-size: 15px;
    line-height: 1.6;
}

.hero-links {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
}

.hero-link {
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-main);
    position: relative;
    padding-bottom: 2px;
}

.hero-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background-color: var(--accent);
    transition: width 0.15s ease-out;
}

.hero-link:hover {
    color: var(--accent);
}

.hero-link:hover::after {
    width: 100%;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    white-space: nowrap;
    clip-path: inset(100%);
    clip: rect(0 0 0 0);
    overflow: hidden;
}

/* ---------- Контентные секции (product, about и т.п.) ---------- */

.content {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 0 16px 40px;
}

.section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 18px;
    margin: 0 0 12px;
    font-weight: 600;
}

.section-subtitle {
    font-size: 16px;
    margin: 12px 0 8px;
    font-weight: 600;
}

/* Абзацный текст в секциях */
.section-text {
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 14px;
    text-indent: 1.5em;
    text-align: justify;
}

/* Списки */
.section-list {
    padding-left: 20px;
    margin: 0;
}

.section-list li {
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
}

/* Картинки внутри текстовых секций */
.section-image {
    text-align: center;
    margin: 20px 0;
}

.section-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ---------- Центрированные секции ---------- */

.section--center {
    text-align: center;
}

.section--center .section-text {
    text-align: center !important;
    text-indent: 0;
}

/* ---------- Список преимуществ (галочки) ---------- */

.features-list {
    margin: 20px auto 0;
    padding: 0;
    list-style: none;
    max-width: 480px;
    font-size: 15px;
    line-height: 1.6;
    text-align: left;
}

.features-list li {
    margin: 4px 0;
    position: relative;
    padding-left: 20px;
}

.features-list li::before {
    content: "✔";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 13px;
}

/* ---------- Контактная страница ---------- */

.page-contact {
    align-items: flex-start;
}

.contact {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 16px 32px;
}

.contact-logo-link {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.contact-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

.contact-text {
    margin: 0 auto 4px;
    max-width: 560px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.contact-status {
    margin: 16px auto 0;
    max-width: 560px;
    font-size: 14px;
    text-align: center;
}

.contact-status--success {
    color: #16a34a;
}

.contact-status--error {
    color: #dc2626;
}

.contact-card {
    margin: 24px auto 0;
    max-width: 560px;
    background-color: #ffffff;
    border-radius: 18px;
    padding: 20px 20px 22px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-field label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
}

.contact-field input,
.contact-field textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background-color: #f9fafb;
    font: inherit;
}

.contact-field input:focus,
.contact-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
    background-color: #ffffff;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    border: none;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 13px 30px rgba(37, 99, 235, 0.4);
    transition: transform 0.12s ease-out,
        box-shadow 0.12s ease-out,
        background-color 0.12s ease-out;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.5);
}

/* ---------- Дополнительный текст на контактах ---------- */

.contact-extra {
    margin: 24px auto 0;
    max-width: 560px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
    text-align: center;
}

.contact-extra a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---------- Footer ---------- */

.site-footer {
    margin-top: 20px;
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-copy {
    margin: 0;
}

/* ---------- Ссылки общие ---------- */

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ---------- Адаптив ---------- */

@media (max-width: 600px) {
    .page {
        padding: 32px 16px;
    }

    .hero-logo {
        max-width: 220px;
        margin-bottom: 20px;
    }

    .hero-tagline {
        font-size: 18px;
    }

    .hero-text {
        font-size: 14px;
    }

    .hero-links {
        flex-direction: column;
        gap: 12px;
    }

    .contact {
        padding: 32px 16px 24px;
    }
}

/* Исправление центровки навигации на странице contact.php */
.page-contact .hero-links {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    margin-top: 16px;
    margin-bottom: 16px;
}

.page-contact .hero-links a {
    display: inline-block !important;
}

/* Унификация отступов hero-блока на страницах инструкций */
.page-quick-start .hero {
    margin-top: 32px;
    margin-bottom: 32px;
}

.page-quick-start .hero-links {
    margin-top: 16px;
    margin-bottom: 0;
}

/* Картинки в инструкции быстрого старта:
   масштабируем и оформляем так же, как на странице продукта */
.page-quick-start .section-figure img,
.page-quick-start .section img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 1.75rem;
    border-radius: 0.75rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}
