/* ============================================================
   Astkonsalt — основные стили (v4, лендинг)
   ============================================================ */

/* --- Переменные --- */
:root {
    --accent: #1a5b9e;
    --accent-hover: #134575;
    --accent-soft: rgba(26, 91, 158, 0.08);

    --text: #1a202c;
    --text-soft: #4a5568;
    --muted: #718096;

    --bg: #ffffff;
    --bg-soft: #f4f5f7;
    --border: #e2e8f0;

    --radius: 8px;
    --radius-sm: 4px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);

    --container: 1140px;
    --transition: 0.25s ease;
}

/* --- Сброс и база --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    /* Используем системный шрифт, чтобы не грузить внешние файлы */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:hover {
    color: var(--accent-hover);
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin: 0 0 0.6em;
    font-weight: 700;
    color: var(--text);
}

p {
    margin: 0 0 1em;
}

/* --- Контейнер --- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 700px;
}

/* Утилиты */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-white { color: #fff !important; }
.bg-blue { background-color: var(--accent); color: #fff; }
.bg-gray { background-color: var(--bg-soft); }

/* --- Доступность --- */
.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    position: fixed !important;
    top: 12px;
    left: 12px;
    width: auto;
    height: auto;
    padding: 12px 18px;
    background: #fff;
    color: var(--accent);
    border: 2px solid var(--accent);
    z-index: 9999;
    clip: auto;
    box-shadow: var(--shadow-md);
}

/* --- Шапка --- */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    flex-wrap: wrap;
}

.site-branding {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 400;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.site-title:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.site-description {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.custom-logo {
    max-height: 52px;
    width: auto;
}

/* --- Меню --- */
.site-nav .menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 0;
    padding: 0;
}

.site-nav .menu > li > a {
    display: inline-block;
    color: #fff;
    font-weight: 400;
    font-size: 1rem;
    transition: opacity var(--transition);
}

.site-nav .menu > li > a:hover,
.site-nav .menu > li > a.is-active {
    opacity: 0.8;
    text-decoration: none;
}

/* --- 1. HERO --- */
.hero {
    position: relative;
    background-color: #0f172a; /* Фолбэк если нет картинки */
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 200px 0 160px;
    text-align: left;
}

.hero-inner {
    max-width: 650px;
    margin: 0;
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 30px;
    color: #fff;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 550px;
}

/* --- Кнопки --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 36px;
    border: none;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-accent {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 15px rgba(26, 91, 158, 0.3);
}

.btn-accent:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 91, 158, 0.4);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    padding: 14px 34px;
}

.btn-outline:hover {
    background: #fff;
    color: var(--accent);
    text-decoration: none;
}

/* --- Общие заголовки секций --- */
.section-title {
    font-size: 2.2rem;
    margin-bottom: 16px;
    color: var(--text);
}

.section-subtitle {
    color: var(--muted);
    margin-bottom: 60px;
    font-size: 1.1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* --- 2. КАК МЫ РАБОТАЕМ --- */
.section-features { padding: 120px 24px; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}
.feature-icon { font-size: 4rem; margin-bottom: 20px; }
.feature-item h3 { font-size: 1.3rem; color: var(--text); font-weight: 600; }

/* --- 3. ПОЛОСА С ПРИЗЫВОМ --- */
.section-cta-strip { padding: 80px 0; }
.cta-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}
.cta-flex h2 { margin: 0; font-size: 2.2rem; color: #fff; font-weight: 700; }
.cta-flex p { margin: 0; font-size: 1.1rem; opacity: 0.9; flex: 1; text-align: center; color: #fff;}

/* --- 4. ОТЗЫВЫ --- */
.section-testimonials { padding: 120px 24px; }
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

/* Стили для серого места под фото */
.testimonial-avatar-placeholder {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background-color: #cbd5e0; /* Серый цвет */
    margin: 0 auto 24px;
}

.testimonial-card h3 { font-size: 1.2rem; margin-bottom: 16px; font-weight: 700; }
.quote-icon { color: var(--accent); font-size: 4rem; line-height: 0.5; margin-bottom: 20px; font-weight: 900; }
.testimonial-card p { color: var(--muted); font-size: 1.05rem; }

/* --- 5. УСЛУГИ --- */
.section-services { padding: 120px 0; }
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
}
.service-card {
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius);
    overflow: hidden;
}
.service-header {
    padding: 40px 20px;
    text-align: center;
    background: #f8fafc;
}
.service-card.is-featured {
    transform: scale(1.03);
    z-index: 2;
    box-shadow: var(--shadow-lg);
}
.service-card.is-featured .service-header {
    background: var(--accent);
    color: #fff;
}
.service-card.is-featured .service-header h3 { color: #fff; }
.service-header h3 { font-size: 1.1rem; margin-bottom: 12px; font-weight: 600; }
.service-price { font-size: 2.8rem; font-weight: 800; color: var(--text); }
.service-card.is-featured .service-price { color: #fff; }
.service-body {
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: center;
}
.service-body ul { list-style: none; padding: 0; margin: 0 0 40px; color: var(--muted); flex: 1; font-size: 1.05rem;}
.service-body li { margin-bottom: 16px; }
.service-body .btn { align-self: center; width: 100%; border-radius: 40px; padding: 14px 20px; }

/* --- 6. ФОРМА --- */
.section-form { padding: 120px 24px; }
.custom-form { display: flex; flex-direction: column; gap: 20px; margin-top: 40px; }
.custom-form input, .custom-form textarea {
    width: 100%;
    padding: 20px 30px;
    border-radius: 40px;
    border: none;
    font-size: 1rem;
    font-family: inherit;
}
.custom-form textarea { border-radius: 20px; resize: vertical; }
.custom-form button { border-radius: 40px; padding: 16px 40px; margin: 10px auto 0; min-width: 280px; cursor: pointer; font-size: 1rem; }
.form-note { text-align: center; font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-top: 20px; }

/* --- 7. КОНТАКТЫ --- */
.section-contacts { padding: 120px 24px; }
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
    margin-top: 60px;
}
.contact-icon { font-size: 3.5rem; margin-bottom: 20px; line-height: 1; }
.contact-item h3 { font-size: 1.2rem; margin-bottom: 12px; font-weight: 700; }
.contact-item p { color: var(--muted); font-size: 1.1rem; }

/* --- 8. КАРТА --- */
.section-map iframe { width: 100%; height: 500px; display: block; border: none; }

/* --- Страницы (page.php) --- */
.site-main { min-height: 40vh; }
.page-content { padding: 80px 0; max-width: 820px; }
.entry-title { font-size: 2.4rem; margin-bottom: 30px; color: var(--text); }
.entry-content > * + * { margin-top: 1.3em; }

/* --- Подвал --- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
    background: var(--bg);
}
.site-footer p { margin: 0; }

/* --- Пагинация / прочее --- */
.pagination { margin: 48px 0 0; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-soft); background: #fff; text-decoration: none; font-weight: 500; transition: all var(--transition); }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* --- Адаптив --- */
@media (max-width: 992px) {
    .hero-title { font-size: 3rem; }
    .services-grid { grid-template-columns: 1fr; }
    .service-card.is-featured { transform: none; }
}

@media (max-width: 768px) {
    .header-inner { flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 16px; }
    .site-nav .menu { flex-wrap: wrap; justify-content: center; gap: 16px; }
    .site-header { background: rgba(15, 23, 42, 0.95); position: relative; }

    .hero { padding: 100px 0 80px; text-align: center; }
    .hero-inner { margin: 0 auto; }
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { margin: 0 auto 30px; font-size: 1.1rem; }

    .features-grid, .testimonials-grid, .contacts-grid { grid-template-columns: 1fr; gap: 50px; }

    .cta-flex { flex-direction: column; text-align: center; }

    .section-title { font-size: 1.8rem; }
    .section-subtitle { margin-bottom: 40px; }

    .service-price { font-size: 2.2rem; }
}

/* --- Отступы для якорных ссылок (чтобы секция не пряталась под шапкой) --- */
section[id] {
    scroll-margin-top: 80px; /* Регулируйте высоту под вашу шапку */
}

/* Мобильная адаптация (шапка выше) */
@media (max-width: 768px) {
    section[id] {
        scroll-margin-top: 60px;
    }
}
