/*!
 * HM Guides — section styling.
 *
 * Section: «Полезные инструкции / Poradniki / Guides»
 * Loaded conditionally on guide single / archive / category pages.
 */

/* ---------- Variables ---------- */
/* Привязываем к токенам основной темы (style.css :root) для единого бренда */
:root {
    --hm-g-brand:      var(--primary,      #c75525);
    --hm-g-brand-dark: var(--primary-dark, #a8461e);
    --hm-g-brand-light: var(--primary-light, #fff0eb);
    --hm-g-accent:     var(--success,      #15803d);
    --hm-g-text:       var(--text,         #1a1a2e);
    --hm-g-muted:      var(--text-muted,   #717171);
    --hm-g-border:     var(--border,       #e5e7eb);
    --hm-g-bg:         var(--bg,           #eef2f7);
    --hm-g-card:       var(--bg-white,     #ffffff);
    --hm-g-radius:     var(--radius-lg,    16px);
    --hm-g-shadow:     var(--shadow-md,    0 4px 20px rgba(0,0,0,.08));
    --hm-g-shadow-lg:  var(--shadow-lg,    0 8px 30px rgba(0,0,0,.12));

    /* Тёплые градиенты под бренд-оранжевый */
    --hm-g-hero-grad:    linear-gradient(135deg, #fff5f0 0%, #ffe6d6 60%, #fed7aa 100%);
    --hm-g-icon-grad:    linear-gradient(135deg, #fff5f0 0%, #fed7aa 100%);
    --hm-g-empty-grad:   linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    --hm-g-save-grad:    linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
}

.hm-guides-no-scroll { overflow: hidden; }

/* ---------- Layout ---------- */
.hm-guides-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 18px 64px;
    color: var(--hm-g-text);
}

.hm-guides-breadcrumbs {
    font-size: 14px;
    color: var(--hm-g-muted);
    margin-bottom: 18px;
}
.hm-guides-breadcrumbs a { color: var(--hm-g-muted); text-decoration: none; }
.hm-guides-breadcrumbs a:hover { color: var(--hm-g-brand); }
.hm-guides-breadcrumbs__sep { margin: 0 6px; opacity: .55; }

/* ---------- Hero blocks ---------- */
.hm-guides-hero,
.hm-guides-cat-hero {
    display: flex; gap: 22px;
    padding: 32px;
    background: var(--hm-g-hero-grad);
    border-radius: 20px;
    margin: 8px 0 28px;
    align-items: flex-start;
    box-shadow: var(--hm-g-shadow);
}
.hm-guides-hero__icon,
.hm-guides-cat-hero__icon {
    flex: 0 0 auto;
    width: 72px; height: 72px;
    background: #fff;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    color: var(--hm-g-brand);
    box-shadow: 0 4px 14px rgba(29,78,216,.18);
}
.hm-guides-hero__body,
.hm-guides-cat-hero__body { flex: 1; min-width: 0; }
.hm-guides-hero__title,
.hm-guides-cat-hero__title {
    font-size: clamp(26px, 3.6vw, 40px);
    line-height: 1.15;
    margin: 0 0 10px;
    color: var(--hm-g-text);
}
.hm-guides-hero__lead,
.hm-guides-cat-hero__desc {
    font-size: 16px;
    color: var(--hm-g-text);
    opacity: .78;
    margin: 0;
    max-width: 720px;
}

/* legacy fallback */
.hm-guides-archive__header,
.hm-guides-taxonomy__header { margin-bottom: 32px; }
.hm-guides-archive__title,
.hm-guides-taxonomy__title { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; margin: 0 0 12px; }
.hm-guides-archive__lead,
.hm-guides-taxonomy__desc { font-size: 17px; color: var(--hm-g-muted); margin: 0 0 18px; max-width: 760px; }

/* ---------- Search ---------- */
.hm-guides-search {
    display: flex; gap: 10px;
    max-width: 640px;
    margin: 0 0 32px;
    background: #fff;
    border: 1px solid var(--hm-g-border);
    border-radius: 14px;
    padding: 6px;
    box-shadow: var(--hm-g-shadow);
    align-items: center;
}
.hm-guides-search__icon {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    color: var(--hm-g-muted);
    flex: 0 0 auto;
}
.hm-guides-search__input {
    flex: 1;
    padding: 10px 4px;
    font-size: 15px;
    border: 0;
    background: transparent;
    outline: none;
    min-width: 0;
}
.hm-guides-search__input:focus { outline: none; }
.hm-guides-search__submit {
    padding: 10px 22px; font-size: 14px; font-weight: 600;
    background: var(--hm-g-brand); color: #fff;
    border: 0; border-radius: 10px; cursor: pointer;
    transition: background .15s ease;
    flex: 0 0 auto;
}
.hm-guides-search__submit:hover { background: var(--hm-g-brand-dark); }

/* ---------- Categories grid ---------- */
.hm-guides-cats { margin: 0 0 40px; }
.hm-guides-cats__grid {
    list-style: none; padding: 0; margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.hm-guides-cats__item { list-style: none; }
.hm-guides-cats__link {
    position: relative;
    display: flex; flex-direction: column; gap: 8px;
    padding: 22px;
    background: var(--hm-g-card);
    border: 1px solid var(--hm-g-border);
    border-radius: var(--hm-g-radius);
    box-shadow: var(--hm-g-shadow);
    color: var(--hm-g-text) !important;
    text-decoration: none !important;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    height: 100%;
    overflow: hidden;
}
.hm-guides-cats__link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(29,78,216,0) 60%, rgba(29,78,216,.04) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease;
}
.hm-guides-cats__link:hover {
    transform: translateY(-3px);
    box-shadow: var(--hm-g-shadow-lg);
    border-color: var(--hm-g-brand);
}
.hm-guides-cats__link:hover::before { opacity: 1; }
.hm-guides-cats__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--hm-g-icon-grad);
    color: var(--hm-g-brand);
    margin-bottom: 6px;
}
.hm-guides-cats__name {
    font-weight: 700; font-size: 17px; line-height: 1.3;
    color: var(--hm-g-text);
}
.hm-guides-cats__count {
    font-size: 12px; color: var(--hm-g-muted);
    margin-top: -2px;
}
.hm-guides-cats__desc {
    font-size: 14px; color: var(--hm-g-muted);
    line-height: 1.5;
    margin: 0;
}
.hm-guides-cats__arrow {
    margin-top: auto;
    align-self: flex-end;
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--hm-g-brand);
    transition: background .2s ease, transform .2s ease;
}
.hm-guides-cats__link:hover .hm-guides-cats__arrow {
    background: var(--hm-g-brand);
    color: #fff;
    transform: translateX(3px);
}

/* ---------- Article cards grid ---------- */
.hm-guides-recent { margin: 32px 0; }
.hm-guides-recent__title,
.hm-guide-related__title,
.hm-guides-related-cats__title {
    font-size: 22px; margin: 0 0 18px;
}
.hm-guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}
.hm-guides-grid--related { gap: 14px; }
.hm-guide-card {
    background: var(--hm-g-card);
    border: 1px solid var(--hm-g-border);
    border-radius: var(--hm-g-radius);
    overflow: hidden;
    box-shadow: var(--hm-g-shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}
.hm-guide-card:hover { transform: translateY(-2px); box-shadow: var(--hm-g-shadow-lg); }
.hm-guide-card__link { display: flex; flex-direction: column; height: 100%; color: var(--hm-g-text); text-decoration: none; }
.hm-guide-card__thumb {
    aspect-ratio: 3 / 2;
    background-size: cover; background-position: center;
    background-color: #eef2ff;
}
.hm-guide-card__thumb--empty {
    display: flex; align-items: center; justify-content: center;
    font-size: 38px; color: var(--hm-g-brand);
    background: var(--hm-g-icon-grad);
}
.hm-guide-card__body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.hm-guide-card__cat {
    font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--hm-g-brand); font-weight: 700;
}
.hm-guide-card__title { font-size: 16px; line-height: 1.35; margin: 0; }
.hm-guide-card__excerpt { font-size: 14px; color: var(--hm-g-muted); margin: 0; line-height: 1.5; }

/* ---------- Article (single) ---------- */
.hm-guide-article { background: var(--hm-g-card); border-radius: var(--hm-g-radius); padding: 28px; box-shadow: var(--hm-g-shadow); margin-bottom: 28px; }
.hm-guide-article__cat { display: inline-block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--hm-g-brand); font-weight: 700; text-decoration: none; margin-bottom: 10px; }
.hm-guide-article__title { font-size: clamp(26px, 3.5vw, 36px); line-height: 1.2; margin: 0 0 12px; }
.hm-guide-article__meta { color: var(--hm-g-muted); font-size: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.hm-guide-article__hero { margin: 22px 0; }
.hm-guide-article__hero img { width: 100%; height: auto; display: block; border-radius: 10px; }
.hm-guide-article__content { font-size: 16px; line-height: 1.7; }
.hm-guide-article__content h2 { font-size: 24px; margin: 32px 0 12px; }
.hm-guide-article__content h3 { font-size: 20px; margin: 24px 0 10px; }
.hm-guide-article__content p { margin: 0 0 14px; }
.hm-guide-article__content ul,
.hm-guide-article__content ol { padding-left: 22px; margin: 0 0 16px; }
.hm-guide-article__content li { margin-bottom: 6px; }
.hm-guide-article__pdf { margin: 24px 0; }

/* ---------- FAQ ---------- */
.hm-guide-article__faq { margin-top: 36px; }
.hm-guide-faq {
    border-top: 1px solid var(--hm-g-border);
    padding: 14px 0;
}
.hm-guide-faq > summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    padding-right: 24px;
    position: relative;
}
.hm-guide-faq > summary::after {
    content: '+'; position: absolute; right: 0; top: 0; font-weight: 400;
}
.hm-guide-faq[open] > summary::after { content: '−'; }
.hm-guide-faq__a { margin-top: 10px; color: var(--hm-g-muted); }

/* ---------- «Сохранить страницу» ---------- */
.hm-guides-save {
    display: flex; gap: 20px;
    background: var(--hm-g-save-grad);
    border-radius: var(--hm-g-radius);
    padding: 24px;
    margin: 32px 0;
    box-shadow: var(--hm-g-shadow);
    align-items: flex-start;
}
.hm-guides-save__icon {
    flex: 0 0 auto;
    width: 56px; height: 56px;
    background: #fff;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: var(--hm-g-brand);
    box-shadow: 0 4px 12px rgba(199,85,37,.22);
}
.hm-guides-save__body { flex: 1; min-width: 0; }
.hm-guides-save__title {
    font-size: 16px; margin: 0 0 14px;
    color: var(--hm-g-text); font-weight: 600;
    line-height: 1.45;
}
.hm-guides-save__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Empty state (категория без статей) ---------- */
.hm-guides-empty-state {
    background: var(--hm-g-card);
    border: 2px dashed var(--hm-g-border);
    border-radius: var(--hm-g-radius);
    padding: 56px 24px;
    text-align: center;
    margin: 0 0 32px;
}
.hm-guides-empty-state__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 88px; height: 88px;
    border-radius: 50%;
    background: var(--hm-g-empty-grad);
    color: #b45309;
    margin: 0 auto 18px;
}
.hm-guides-empty-state__title {
    font-size: 18px; line-height: 1.5;
    max-width: 560px; margin: 0 auto 24px;
    color: var(--hm-g-text);
}
.hm-guides-empty-state .hm-guides-cta {
    justify-content: center;
    margin: 0;
}

/* ---------- Other cats grid (на странице категории) ---------- */
.hm-guides-other-cats { margin: 40px 0 28px; }
.hm-guides-other-cats__title {
    font-size: 22px; margin: 0 0 18px;
}
.hm-guides-other-cats__grid {
    list-style: none; padding: 0; margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.hm-guides-other-cats__grid li { list-style: none; }
.hm-guides-other-cats__link {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    background: var(--hm-g-card);
    border: 1px solid var(--hm-g-border);
    border-radius: 12px;
    color: var(--hm-g-text) !important;
    text-decoration: none !important;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.hm-guides-other-cats__link:hover {
    border-color: var(--hm-g-brand);
    transform: translateY(-1px);
    box-shadow: var(--hm-g-shadow);
}
.hm-guides-other-cats__icon {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--hm-g-icon-grad);
    color: var(--hm-g-brand);
}
.hm-guides-other-cats__name {
    font-size: 14px; font-weight: 600;
    line-height: 1.35;
}

/* Back link */
.hm-guide-back { margin: 28px 0; }

/* ---------- Blog taxonomy (переиспользует hm-guides-* + blog-specific) ---------- */
.hm-blog-tax__count {
    display: inline-block;
    padding: 4px 12px;
    background: #fff;
    border: 1px solid var(--hm-g-border);
    border-radius: 999px;
    font-size: 13px;
    color: var(--hm-g-muted);
    font-weight: 600;
    margin-top: 8px;
}

.hm-blog-posts { margin: 0 0 32px; }
.hm-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin: 0 0 32px;
}
.hm-blog-card {
    background: var(--hm-g-card);
    border: 1px solid var(--hm-g-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--hm-g-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex; flex-direction: column;
    height: 100%;
}
.hm-blog-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--hm-g-shadow-lg);
}
.hm-blog-card__link {
    display: flex; flex-direction: column; height: 100%;
    color: var(--hm-g-text) !important;
    text-decoration: none !important;
}
.hm-blog-card__media {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--hm-g-icon-grad);
    overflow: hidden;
    position: relative;
}
.hm-blog-card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.hm-blog-card:hover .hm-blog-card__media img { transform: scale(1.04); }
.hm-blog-card__media-placeholder {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    color: var(--hm-g-brand);
    opacity: .6;
}
.hm-blog-card__body {
    padding: 20px 22px 22px;
    flex: 1;
    display: flex; flex-direction: column;
    gap: 10px;
}
.hm-blog-card__title {
    font-size: 18px; line-height: 1.35;
    margin: 0;
    color: var(--hm-g-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hm-blog-card__meta {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px;
    color: var(--hm-g-muted);
}
.hm-blog-card__meta-icon { opacity: .65; }
.hm-blog-card__excerpt {
    font-size: 14px; line-height: 1.55;
    color: var(--hm-g-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.hm-blog-card__readmore {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--hm-g-brand);
    font-weight: 600;
    font-size: 14px;
    margin-top: 4px;
    transition: gap .15s ease;
}
.hm-blog-card:hover .hm-blog-card__readmore { gap: 10px; }

/* Count-pill в карточках «других категорий» */
.hm-blog-other-count {
    margin-left: auto;
    padding: 3px 9px;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--hm-g-muted);
}
.hm-guides-other-cats__link:hover .hm-blog-other-count {
    background: var(--hm-g-brand);
    color: #fff;
}

/* ---------- Blog filter chips ---------- */
.hm-blog-filter {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin: 0 0 28px;
}
.hm-blog-filter__chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--hm-g-card);
    border: 1px solid var(--hm-g-border);
    color: var(--hm-g-text) !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.hm-blog-filter__chip:hover {
    border-color: var(--hm-g-brand);
    color: var(--hm-g-brand) !important;
}
.hm-blog-filter__chip.is-active {
    background: var(--hm-g-brand);
    border-color: var(--hm-g-brand);
    color: #fff !important;
}
.hm-blog-filter__count {
    font-size: 12px;
    background: rgba(0,0,0,.06);
    padding: 1px 8px;
    border-radius: 999px;
    font-weight: 700;
}
.hm-blog-filter__chip.is-active .hm-blog-filter__count {
    background: rgba(255,255,255,.22);
}

/* ---------- Blog card cat-pill (на hero-картинке) ---------- */
.hm-blog-card__media { position: relative; }
.hm-blog-card__cat-pill {
    position: absolute;
    top: 12px; left: 12px;
    padding: 4px 10px;
    background: rgba(255,255,255,.95);
    color: var(--hm-g-brand);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

@media (max-width: 640px) {
    .hm-blog-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* ---------- Service category list ---------- */
.hm-svc-tax__hero-cta { margin-top: 18px; }
.hm-svc-list { margin: 0 0 32px; }
.hm-svc-list__grid {
    list-style: none; padding: 0; margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.hm-svc-list__grid li { list-style: none; }
.hm-svc-list__link {
    display: flex; align-items: center; gap: 18px;
    padding: 18px 22px;
    background: var(--hm-g-card);
    border: 1px solid var(--hm-g-border);
    border-radius: 14px;
    color: var(--hm-g-text) !important;
    text-decoration: none !important;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.hm-svc-list__link:hover {
    border-color: var(--hm-g-brand);
    transform: translateY(-1px);
    box-shadow: var(--hm-g-shadow);
}
.hm-svc-list__main { flex: 1; min-width: 0; }
.hm-svc-list__name {
    font-size: 16px; font-weight: 700; line-height: 1.35;
    margin: 0 0 4px;
    color: var(--hm-g-text);
}
.hm-svc-list__desc {
    font-size: 14px; color: var(--hm-g-muted);
    margin: 0;
    line-height: 1.5;
}
.hm-svc-list__aside {
    display: flex; align-items: center; gap: 14px;
    flex: 0 0 auto;
}
.hm-svc-list__price {
    font-size: 15px; font-weight: 700;
    color: var(--hm-g-brand);
    white-space: nowrap;
}
.hm-svc-list__soon {
    padding: 4px 10px;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 12px; font-weight: 700;
    color: var(--hm-g-muted);
    text-transform: uppercase; letter-spacing: .04em;
}
.hm-svc-list__arrow {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--hm-g-brand);
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.hm-svc-list__link:hover .hm-svc-list__arrow {
    background: var(--hm-g-brand);
    color: #fff;
    transform: translateX(3px);
}
@media (max-width: 640px) {
    .hm-svc-list__link { flex-direction: column; align-items: flex-start; gap: 12px; }
    .hm-svc-list__aside { width: 100%; justify-content: space-between; }
}

/* ---------- Buttons ---------- */
.hm-guides-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 18px; font-size: 14px; font-weight: 600;
    border: 1px solid transparent; border-radius: 10px;
    background: var(--hm-g-brand); color: #fff !important;
    text-decoration: none !important;
    cursor: pointer; transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
    line-height: 1;
}
.hm-guides-btn:hover { background: var(--hm-g-brand-dark); transform: translateY(-1px); }
.hm-guides-btn--primary { background: var(--hm-g-brand); }
.hm-guides-btn--ghost { background: #fff; color: var(--hm-g-brand) !important; border-color: var(--hm-g-border); }
.hm-guides-btn--ghost:hover { background: #f3f4f6; color: var(--hm-g-brand-dark) !important; }
.hm-guides-btn--call { background: #16a34a; }
.hm-guides-btn--call:hover { background: #15803d; }
.hm-guides-btn--order { background: var(--hm-g-accent); }
.hm-guides-btn--order:hover { background: #d97706; }
.hm-guides-btn--wa { background: #25d366; color: #fff !important; }
.hm-guides-btn--wa:hover { background: #1ebe5d; }
.hm-guides-btn--tg { background: #0088cc; color: #fff !important; }
.hm-guides-btn--tg:hover { background: #006699; }
.hm-guides-btn.is-copied { background: #16a34a; color: #fff !important; }
.hm-guides-btn__icon { font-size: 16px; }

.hm-guides-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 28px 0; }
.hm-guides-cta .hm-guides-btn { padding: 14px 22px; font-size: 15px; }

/* ---------- Related service banner ---------- */
.hm-guide-related-service {
    background: var(--hm-g-card);
    border: 1px solid var(--hm-g-border);
    border-radius: var(--hm-g-radius);
    padding: 22px 24px;
    margin: 24px 0;
    box-shadow: var(--hm-g-shadow);
    display: flex; flex-direction: column; gap: 14px;
    align-items: flex-start;
}
.hm-guide-related-service__title { font-size: 17px; margin: 0; line-height: 1.45; }

/* ---------- Related cats / guides ---------- */
.hm-guides-related-cats { margin: 36px 0 12px; }
.hm-guides-related-cats__list {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-wrap: wrap; gap: 8px;
}
.hm-guides-related-cats__list a {
    padding: 8px 14px; border-radius: 999px;
    background: #f1f5f9; color: var(--hm-g-text); text-decoration: none;
    font-size: 14px;
}
.hm-guides-related-cats__list a:hover { background: var(--hm-g-brand); color: #fff; }

.hm-guide-related { margin: 36px 0; }

/* ---------- Empty / placeholder ---------- */
.hm-guides-empty {
    background: #fff8eb;
    border: 1px solid #fde68a;
    border-radius: var(--hm-g-radius);
    padding: 24px;
    color: #92400e;
    font-size: 16px;
}

/* ---------- Pagination ---------- */
.hm-guides-pagination { margin-top: 28px; }
.hm-guides-pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.hm-guides-pagination .page-numbers {
    padding: 8px 13px; border-radius: 8px;
    background: #fff; border: 1px solid var(--hm-g-border);
    color: var(--hm-g-text); text-decoration: none; font-weight: 600;
}
.hm-guides-pagination .page-numbers.current { background: var(--hm-g-brand); color: #fff; border-color: var(--hm-g-brand); }
.hm-guides-pagination .page-numbers:hover:not(.current) { border-color: var(--hm-g-brand); }

/* ---------- Modal ---------- */
.hm-guides-modal {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.hm-guides-modal[hidden] { display: none; }
.hm-guides-modal__backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
}
.hm-guides-modal__dialog {
    position: relative;
    background: var(--hm-g-card);
    border-radius: 16px;
    max-width: 560px; width: 100%;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-shadow: var(--hm-g-shadow-lg);
}
.hm-guides-modal__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--hm-g-border);
}
.hm-guides-modal__title { margin: 0; font-size: 19px; }
.hm-guides-modal__close {
    background: transparent; border: 0; font-size: 28px; line-height: 1;
    cursor: pointer; color: var(--hm-g-muted); padding: 0 4px;
}
.hm-guides-modal__close:hover { color: var(--hm-g-text); }

.hm-guides-tabs {
    display: flex; gap: 4px; padding: 12px 16px 0;
    overflow-x: auto;
    border-bottom: 1px solid var(--hm-g-border);
}
.hm-guides-tab {
    background: transparent; border: 0;
    padding: 10px 12px;
    font-size: 13px; font-weight: 600;
    color: var(--hm-g-muted); cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.hm-guides-tab.is-active { color: var(--hm-g-brand); border-color: var(--hm-g-brand); }
.hm-guides-tab:hover { color: var(--hm-g-brand); }

.hm-guides-tabpanels { padding: 22px; }
.hm-guides-tabpanel { font-size: 15px; line-height: 1.6; color: var(--hm-g-text); }
.hm-guides-tabpanel[hidden] { display: none; }

/* ---------- Section shortcode (для главной) ---------- */
.hm-guides-section {
    margin: 56px 0;
    padding: 56px 24px;
    background: var(--hm-g-hero-grad);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}
.hm-guides-section::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(199,85,37,.18) 0%, transparent 70%);
    pointer-events: none;
}
.hm-guides-section::after {
    content: '';
    position: absolute;
    bottom: -100px; left: -100px;
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(245,158,11,.16) 0%, transparent 70%);
    pointer-events: none;
}
.hm-guides-section__inner {
    position: relative; z-index: 1;
    max-width: 1080px; margin: 0 auto;
    text-align: center;
}
.hm-guides-section__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 64px; height: 64px;
    background: #fff;
    border-radius: 16px;
    color: var(--hm-g-brand);
    box-shadow: 0 6px 18px rgba(29,78,216,.18);
    margin: 0 auto 18px;
}
.hm-guides-section__header { margin-bottom: 36px; }
.hm-guides-section__title {
    font-size: clamp(28px, 4vw, 38px);
    margin: 0 0 10px;
    color: var(--hm-g-text);
    font-weight: 800;
    line-height: 1.15;
}
.hm-guides-section__tagline {
    font-size: 17px;
    color: var(--hm-g-text);
    opacity: .76;
    margin: 0 auto;
    max-width: 600px;
}
.hm-guides-section__grid {
    list-style: none; padding: 0;
    margin: 0 0 32px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}
.hm-guides-section__grid li { list-style: none; }
.hm-guides-section__card {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 22px 14px;
    background: #fff;
    border-radius: 14px;
    color: var(--hm-g-text) !important;
    text-decoration: none !important;
    text-align: center;
    transition: transform .2s ease, box-shadow .2s ease;
    height: 100%;
    border: 1px solid rgba(255,255,255,.7);
    box-shadow: 0 4px 14px rgba(15,23,42,.06);
}
.hm-guides-section__card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(29,78,216,.18);
}
.hm-guides-section__card-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--hm-g-icon-grad);
    color: var(--hm-g-brand);
}
.hm-guides-section__card-name {
    font-size: 14px; font-weight: 600;
    line-height: 1.3;
}
.hm-guides-section__cta { display: flex; justify-content: center; }
.hm-guides-btn--lg {
    padding: 16px 30px !important;
    font-size: 16px !important;
}

@media (max-width: 640px) {
    .hm-guides-section { padding: 40px 18px; margin: 36px 0; border-radius: 18px; }
    .hm-guides-section__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .hm-guides-section__card { padding: 16px 10px; }
    .hm-guides-section__title { font-size: 26px; }
}

/* ---------- Banner shortcode style ---------- */
.hm-guides-banner {
    display: flex; align-items: center; gap: 18px;
    padding: 22px 24px;
    border-radius: var(--hm-g-radius);
    background: var(--hm-g-icon-grad);
    margin: 24px 0;
    box-shadow: var(--hm-g-shadow);
}
.hm-guides-banner__icon {
    flex: 0 0 auto;
    width: 56px; height: 56px;
    background: #fff;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: var(--hm-g-brand);
}
.hm-guides-banner__body { flex: 1; min-width: 0; }
.hm-guides-banner__title { font-size: 17px; margin: 0 0 4px; line-height: 1.3; }
.hm-guides-banner__text { font-size: 14px; color: var(--hm-g-muted); margin: 0; }
.hm-guides-banner .hm-guides-btn { flex: 0 0 auto; }
@media (max-width: 640px) {
    .hm-guides-banner { flex-direction: column; align-items: flex-start; text-align: left; }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .hm-guide-article { padding: 20px 18px; }
    .hm-guides-modal__dialog { border-radius: 14px 14px 0 0; align-self: flex-end; max-height: 88vh; }
    .hm-guides-modal { align-items: flex-end; padding: 0; }
    .hm-guides-banner { flex-direction: column; align-items: flex-start; }
    .hm-guides-search { flex-direction: column; }
    .hm-guides-search__submit { width: 100%; }
    .hm-guides-save__actions { flex-direction: column; align-items: stretch; }
    .hm-guides-save__actions .hm-guides-btn { justify-content: center; }
}

/* ---------- Blog single article ---------- */
.hm-blog-article {
    background: var(--hm-g-card);
    border-radius: var(--hm-g-radius);
    padding: 32px;
    box-shadow: var(--hm-g-shadow);
    margin: 24px 0 28px;
}
.hm-blog-article__header { margin-bottom: 24px; }
.hm-blog-article__cat {
    display: inline-block;
    padding: 5px 12px;
    background: var(--hm-g-brand-light);
    color: var(--hm-g-brand) !important;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    text-decoration: none !important;
    margin-bottom: 14px;
}
.hm-blog-article__title {
    font-size: clamp(28px, 3.8vw, 40px);
    line-height: 1.15;
    margin: 0 0 16px;
    color: var(--hm-g-text);
    font-weight: 800;
}
.hm-blog-article__byline {
    display: flex; align-items: center; gap: 12px;
    margin: 0;
}
.hm-blog-article__hero {
    margin: 0 0 28px;
    border-radius: var(--hm-g-radius);
    overflow: hidden;
}
.hm-blog-article__hero img {
    width: 100%; height: auto; display: block;
}
.hm-blog-related { margin: 36px 0; }
.hm-blog-related__title {
    font-size: 22px;
    margin: 0 0 18px;
    color: var(--hm-g-text);
}
.hm-blog-reviews {
    background: var(--hm-g-bg);
    padding: 48px 0;
    margin-top: 48px;
}
.hm-blog-reviews__title {
    font-size: 26px;
    text-align: center;
    margin: 0 0 28px;
    color: var(--hm-g-text);
}
.hm-blog-reviews__widget { max-width: 1000px; margin: 0 auto; }

@media (max-width: 640px) {
    .hm-blog-article { padding: 22px 18px; }
}

/* ---------- Page template ---------- */
.hm-page__article { margin: 0 0 40px; }
.hm-page__byline {
    display: flex; align-items: center; gap: 12px;
    margin-top: 14px;
}
.hm-page__byline-avatar img {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.hm-page__byline-info {
    display: flex; flex-direction: column;
}
.hm-page__byline-name {
    font-weight: 700;
    color: var(--hm-g-text) !important;
    text-decoration: none !important;
    font-size: 14px;
}
.hm-page__byline-meta {
    font-size: 13px;
    color: var(--hm-g-muted);
}
.hm-page__byline-sep { opacity: .55; margin: 0 4px; }
.hm-page__hero-image {
    margin: 24px 0;
    border-radius: var(--hm-g-radius);
    overflow: hidden;
}
.hm-page__hero-image img {
    width: 100%; height: auto; display: block;
}
.hm-page__content-wrap { margin: 0; }
.hm-page__sticky-cta {
    position: sticky;
    bottom: 12px;
    z-index: 100;
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-top: 32px;
    padding: 10px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 -4px 20px rgba(0,0,0,.06), 0 4px 18px rgba(0,0,0,.08);
}
.hm-page__sticky-cta .hm-guides-btn { flex: 1; justify-content: center; min-width: 0; }

/* ---------- 404 page ---------- */
.hm-404 {
    min-height: 70vh;
    display: flex;
    align-items: center;
}
.hm-404__inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    padding: 48px 24px;
}
.hm-404__visual {
    position: relative;
    width: 240px; height: 240px;
    margin: 0 auto 28px;
    display: flex; align-items: center; justify-content: center;
    color: var(--hm-g-brand);
}
.hm-404__icon {
    opacity: .15;
    position: absolute;
    inset: 0;
    margin: auto;
}
.hm-404__code {
    position: relative;
    z-index: 1;
    font-size: clamp(80px, 14vw, 140px);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--hm-g-brand) 0%, var(--hm-g-brand-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
}
.hm-404__title {
    font-size: clamp(26px, 3.6vw, 36px);
    margin: 0 0 14px;
    color: var(--hm-g-text);
    font-weight: 800;
}
.hm-404__lead {
    font-size: 16px;
    color: var(--hm-g-muted);
    line-height: 1.6;
    margin: 0 auto 32px;
    max-width: 540px;
}
.hm-404__actions {
    display: flex; gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- Pre-footer CTA + footer ---------- */
.hm-pre-footer-cta {
    margin: 0;
    padding: 56px 0;
    background: var(--hm-g-hero-grad);
    position: relative;
    overflow: hidden;
}
.hm-pre-footer-cta::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(199,85,37,.22) 0%, transparent 70%);
    pointer-events: none;
}
.hm-pre-footer-cta__inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.hm-pre-footer-cta__text { flex: 1; min-width: 280px; }
.hm-pre-footer-cta__title {
    font-size: clamp(26px, 3.6vw, 38px);
    line-height: 1.15;
    margin: 0 0 10px;
    color: var(--hm-g-text);
    font-weight: 800;
}
.hm-pre-footer-cta__sub {
    font-size: 16px;
    color: var(--hm-g-text);
    opacity: .76;
    margin: 0;
    max-width: 600px;
}
.hm-pre-footer-cta__actions {
    display: flex; gap: 12px;
    flex-wrap: wrap;
}

.hm-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 64px 0 28px;
    margin: 0;
}
.hm-footer a {
    color: #cbd5e1 !important;
    text-decoration: none !important;
    transition: color .15s ease;
}
.hm-footer a:hover { color: var(--hm-g-brand) !important; }
.hm-footer__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 36px;
    margin-bottom: 40px;
}
.hm-footer__col-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #f1f5f9;
    margin: 0 0 18px;
    font-weight: 700;
}
.hm-footer__col-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex; flex-direction: column;
    gap: 10px;
}
.hm-footer__col-list li { list-style: none; }
.hm-footer__col-list--contact { gap: 14px; }
.hm-footer__contact-link {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 700;
    font-size: 15px;
    color: #fff !important;
}
.hm-footer__contact-link:hover { color: var(--hm-g-brand) !important; }
.hm-footer__contact-note {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
}
.hm-footer__contact-note svg {
    flex: 0 0 auto;
    margin-top: 2px;
    opacity: .8;
}

.hm-footer__socials {
    display: flex; gap: 10px;
    margin-top: 18px;
}
.hm-footer__social {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    color: #fff !important;
    transition: background .15s ease, transform .15s ease;
}
.hm-footer__social:hover {
    background: var(--hm-g-brand);
    color: #fff !important;
    transform: translateY(-2px);
}
.hm-footer__social--wa:hover { background: #25d366; }
.hm-footer__social--tg:hover { background: #0088cc; }

.hm-footer__legal {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 24px;
    margin-bottom: 18px;
}
.hm-footer__legal-text {
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.6;
}
.hm-footer__legal-addr {
    color: #94a3b8;
    font-size: 13px;
}

.hm-footer__bottom {
    display: flex; align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #94a3b8;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.hm-footer__bottom-sep { opacity: .5; }
.hm-footer__dev-name { color: var(--hm-g-brand); font-weight: 700; }

@media (max-width: 880px) {
    .hm-footer__grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}
@media (max-width: 540px) {
    .hm-footer__grid { grid-template-columns: 1fr; gap: 24px; }
    .hm-pre-footer-cta { padding: 40px 0; }
    .hm-pre-footer-cta__inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- Screen-reader only ---------- */
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0,0,0,0);
    border: 0; white-space: nowrap;
}
