/* =========================================================
   SEO-блоки посадочных страниц (namespace .seo-*)
   Подключается в header.php после styles14.css
   ========================================================= */

.seo-section {
    margin: 40px 0 0;
    clear: both;
}

.seo-section + .seo-section {
    margin-top: 48px;
}

/* Основной текст посадочных страниц — свободнее, чем в теме (16/24) */
.service-page .entry-content > p {
    line-height: 26px;
}

.seo-section > h2 {
    margin: 0 0 16px;
    font-size: 26px;
    line-height: 36px;
    font-weight: 600;
    color: #000;
}

.seo-section > p {
    margin: 0 0 16px;
    line-height: 26px;
}

.seo-section a {
    color: #000;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.seo-section a:hover {
    text-decoration: none;
}

.seo-lead {
    font-size: 17px;
    line-height: 28px;
}

.seo-note {
    font-size: 15px;
    line-height: 24px;
    color: #595959;
    margin-top: 16px;
}

/* ---------- вводное фото ---------- */
.entry-content figure.wp-caption {
    display: inline-block;
    max-width: 100%;
}

.entry-content figure.wp-caption .wp-caption-text {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 20px;
}

/* ---------- карточки (неисправности, типы) ---------- */
.seo-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 16px 0 0;
}

.seo-card {
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    background: #fff;
    padding: 16px 18px 14px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.seo-card h3 {
    margin: 0 0 6px;
    font-size: 17px;
    line-height: 23px;
    font-weight: 600;
    color: #000;
}

.seo-card p {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 22px;
    color: #333;
}

.seo-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.seo-price {
    display: inline-block;
    font-size: 15px;
    font-weight: 600;
    color: #000;
    white-space: nowrap;
}

.seo-card__foot a {
    font-size: 14px;
    color: #777;
    text-decoration: underline;
}

.seo-card__foot a:hover {
    color: #000;
}

/* ---------- шаги ---------- */
.seo-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 16px 0 0;
    counter-reset: seostep;
}

.seo-step {
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 18px 18px 16px;
    background: #fafafa;
    position: relative;
}

.seo-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
}

.seo-step h3 {
    margin: 0 0 6px;
    font-size: 17px;
    line-height: 23px;
    font-weight: 600;
}

.seo-step p {
    margin: 0;
    font-size: 15px;
    line-height: 21px;
    color: #333;
}

/* ---------- галерея ---------- */
.seo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px 0 0;
}

.seo-gallery img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

/* ---------- FAQ ---------- */
.seo-faq {
    margin: 8px 0 0;
    border-top: 1px solid #e6e6e6;
}

.seo-faq details {
    border-bottom: 1px solid #e6e6e6;
    padding: 14px 0;
}

.seo-faq summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    font-size: 17px;
    line-height: 24px;
    font-weight: 600;
    color: #000;
    list-style: none;
}

.seo-faq summary::-webkit-details-marker {
    display: none;
}

.seo-faq summary::after {
    content: "+";
    flex: 0 0 auto;
    font-size: 22px;
    line-height: 20px;
    font-weight: 400;
    color: #777;
}

.seo-faq details[open] summary::after {
    content: "–";
}

.seo-faq details p {
    margin: 10px 0 0;
    font-size: 15px;
    line-height: 24px;
    color: #333;
}

/* ---------- гео ---------- */
.seo-geo {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 40px;
}

.seo-geo-group {
    margin: 0 0 10px;
}

.seo-geo-group h3 {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 22px;
    font-weight: 600;
}

.seo-section .seo-geo-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px 16px;
    margin: 0;
    padding: 0;
    list-style: none;
    list-style-type: none;
    font-size: 15px;
    line-height: 24px;
}

/* ---------- мастера ---------- */
.seo-masters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 16px 0 0;
}

.seo-master {
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 16px 18px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.seo-master__ava {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
}

.seo-master h3 {
    margin: 0 0 2px;
    font-size: 16px;
    line-height: 22px;
    font-weight: 600;
}

.seo-master p {
    margin: 0;
    font-size: 14px;
    line-height: 20px;
    color: #555;
}

/* ---------- отзывы ---------- */
.seo-reviews {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 16px 0 0;
}

.seo-review {
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 16px 18px;
}

.seo-review .ava {
    float: left;
    width: 44px;
    margin: 0 12px 6px 0;
}

.seo-review .ava img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: block;
}

.seo-review .who {
    margin: 0 0 6px;
    font-weight: 600;
    font-size: 15px;
}

.seo-review blockquote {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 15px;
    line-height: 23px;
    color: #333;
    clear: both;
}

.seo-review .seo-review__date {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #999;
}

/* ---------- CTA ---------- */
.seo-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin: 28px 0 0;
    padding: 20px 24px;
    border: 1px solid #000;
    border-radius: 8px;
    background: #f7f7f7;
}

.seo-cta__text strong {
    display: block;
    font-size: 17px;
    line-height: 24px;
    font-weight: 600;
    color: #000;
}

.seo-cta__text span {
    display: block;
    margin-top: 4px;
    font-size: 15px;
    line-height: 21px;
    color: #333;
}

.seo-cta__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.seo-cta__actions .btn {
    padding: 0 24px;
    line-height: 44px;
    font-size: 16px;
}

/* ---------- перелинковка ---------- */
.seo-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 24px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    list-style-type: none;
    font-size: 16px;
    line-height: 26px;
}

.seo-section .seo-links {
    list-style: none;
}

.seo-links a {
    color: #000;
    text-decoration: underline;
}

.seo-links a:hover {
    text-decoration: none;
}

/* ---------- таблица кодов ошибок ---------- */
.seo-table-wrap {
    overflow-x: auto;
    margin: 16px 0 0;
}

.seo-table-wrap table {
    min-width: 640px;
    margin: 0;
}

.seo-table-wrap td:first-child {
    white-space: nowrap;
    font-weight: 600;
}

/* ---------- «липкий» сайдбар ---------- */
/* Работает только на десктопе: на узких экранах колонка уходит под контент */
@media (min-width: 992px) {
    #secondary.sidebar-sticky {
        position: -webkit-sticky;
        position: sticky;
        top: 96px; /* 82px фиксированного меню + отступ */
        z-index: 6;
        align-self: flex-start;
    }
}

/* ---------- адаптив ---------- */
@media (max-width: 991px) {
    .seo-cards,
    .seo-steps,
    .seo-gallery,
    .seo-masters {
        grid-template-columns: repeat(2, 1fr);
    }

    .seo-geo {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

@media (max-width: 600px) {
    .seo-section > h2 {
        font-size: 22px;
        line-height: 29px;
    }

    .seo-cards,
    .seo-steps,
    .seo-gallery,
    .seo-masters,
    .seo-reviews,
    .seo-links {
        grid-template-columns: 1fr;
    }

    .seo-geo-list,
    .seo-section .seo-geo-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
