/*
 * Realink — content unification layer.
 *
 * Elementor-built pages carry their own polished layout. Everything else —
 * plain/AI-authored articles (post_content), blog/case archive intros and the
 * category listings — used to render as full-bleed, unstyled markup that broke
 * out of the container and clashed with the Elementor look. This file gives all
 * of that non-Elementor content ONE consistent shell: the theme container
 * width, the theme's dark palette, TildaSans headings and the amber accent.
 *
 * Everything here is scoped under `.rl-doc`, which the Blade views wrap around
 * non-Elementor content only, so the Elementor pages are never touched.
 */

:root {
    --rl-container: var(--ui-container-size, 1240px);
    --rl-accent: var(--accent, #E3C083);
    --rl-heading: var(--uicore-headline-color, #fff);
    --rl-text: #d6dce4;                 /* body text — brighter for contrast */
    --rl-muted: rgba(190, 201, 214, .85);   /* secondary text, still dimmer than body */
    --rl-border: var(--ui-border-color, #282b2e);
    --rl-surface: #1c1f24;              /* cards / code / table stripes */

    /* Retint the theme's orange primary to the warm gold. This cascades to
       every theme element that references it (links, accents, buttons). */
    --uicore-primary-color: #E3C083;
}

/* Elementor keeps its own copy of the primary colour on the kit wrapper;
   retint it too so Elementor buttons and widgets follow the new accent. */
.elementor-kit-11 { --e-global-color-uicore_primary: #E3C083; }

/* ---- One content width across the whole site ------------------------------
 * Elementor mixes two container systems: modern flexbox containers honour the
 * theme width (1240px), but legacy sections fall back to Elementor's old 1140px
 * default, so boxed content jumped between the two. Pin every *top-level* boxed
 * container — legacy and flexbox — to the single theme width. Full-width
 * (stretched) sections and nested inner sections are left alone. */
.elementor-section.elementor-section-boxed:not(.elementor-inner-section) > .elementor-container,
.elementor > .e-con.e-con-boxed > .e-con-inner {
    max-width: var(--ui-container-size, 1240px);
}

/* ---- Container: one width everywhere -------------------------------------- */
.rl-doc {
    max-width: var(--rl-container);
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}
.rl-doc--narrow { max-width: 860px; }   /* long-form reading measure */

/* ---- Page title (restores the heading non-Elementor pages had lost) ------- */
.rl-page-head {
    max-width: var(--rl-container);
    margin: 0 auto;
    padding: 56px 20px 8px;
    box-sizing: border-box;
}
.rl-page-head__eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--rl-accent);
    margin-bottom: 14px;
}
.rl-page-head__title {
    margin: 0;
    font-family: var(--uicore-primary-font-family, "TildaSans-"), sans-serif;
    font-weight: 700;
    line-height: 1.1;
    color: var(--rl-heading);
    font-size: clamp(28px, 4vw, 46px);
}
.rl-page-head__title span { color: var(--rl-accent); }
.rl-page-head__lead {
    margin: 14px 0 0;
    max-width: 780px;
    color: var(--rl-muted);
    font-size: 17px;
    line-height: 1.6;
}

/* ---- Long-form article typography ---------------------------------------- */
.rl-doc .entry-content {
    color: var(--rl-text);
    font-size: 17px;
    line-height: 1.75;
    padding-bottom: 8px;
}
.rl-doc .entry-content > :first-child { margin-top: 0; }

.rl-doc .entry-content h1,
.rl-doc .entry-content h2,
.rl-doc .entry-content h3,
.rl-doc .entry-content h4 {
    color: var(--rl-heading);
    font-family: var(--uicore-primary-font-family, "TildaSans-"), sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin: 1.6em 0 .5em;
}
.rl-doc .entry-content h1 { font-size: clamp(26px, 3.4vw, 38px); }
.rl-doc .entry-content h2 { font-size: clamp(23px, 2.8vw, 30px); }
.rl-doc .entry-content h3 { font-size: 22px; }
.rl-doc .entry-content h4 { font-size: 19px; }

.rl-doc .entry-content p { margin: 0 0 1.15em; }
.rl-doc .entry-content a { color: var(--rl-accent); text-decoration: none; }
.rl-doc .entry-content a:hover { text-decoration: underline; }

.rl-doc .entry-content ul,
.rl-doc .entry-content ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.rl-doc .entry-content li { margin: .35em 0; }
.rl-doc .entry-content ul { list-style: none; padding-left: 1.6em; }
.rl-doc .entry-content ul > li { position: relative; }
.rl-doc .entry-content ul > li::before {
    content: '';
    position: absolute;
    left: -1.15em; top: .7em;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--rl-accent);
}

.rl-doc .entry-content img,
.rl-doc .entry-content video,
.rl-doc .entry-content iframe {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: .5em 0 1.2em;
}

.rl-doc .entry-content blockquote {
    margin: 1.4em 0;
    padding: 4px 0 4px 20px;
    border-left: 3px solid var(--rl-accent);
    color: var(--rl-heading);
    font-size: 19px;
}

.rl-doc .entry-content hr {
    border: 0;
    border-top: 1px solid var(--rl-border);
    margin: 2em 0;
}

.rl-doc .entry-content code {
    background: var(--rl-surface);
    border: 1px solid var(--rl-border);
    border-radius: 6px;
    padding: .12em .4em;
    font-size: .88em;
}
.rl-doc .entry-content pre {
    background: var(--rl-surface);
    border: 1px solid var(--rl-border);
    border-radius: 12px;
    padding: 18px 20px;
    overflow-x: auto;
    margin: 0 0 1.2em;
}
.rl-doc .entry-content pre code { background: none; border: 0; padding: 0; }

.rl-doc .entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.4em;
    font-size: 15px;
    display: block;
    overflow-x: auto;
}
.rl-doc .entry-content th,
.rl-doc .entry-content td {
    border: 1px solid var(--rl-border);
    padding: 10px 14px;
    text-align: left;
}
.rl-doc .entry-content th { background: var(--rl-surface); color: var(--rl-heading); }
.rl-doc .entry-content tbody tr:nth-child(even) { background: rgba(255, 255, 255, .02); }

/* ---- Cost calculators (server-computed) ---------------------------------- */
.rl-calc {
    /* Some pages put the widget in a narrow text column; break the block out
       to the site container width. The parent columns are viewport-centered,
       so centering on the parent keeps it centered on the page — and no
       transform is involved, which would break the sticky result panel. */
    --calc-w: min(calc(var(--ui-container-size, 1240px) - 40px), calc(100vw - 56px));
    width: var(--calc-w);
    max-width: none;
    margin: 24px 0 24px calc((100% - var(--calc-w)) / 2);
    background: var(--rl-surface);
    border: 1px solid var(--rl-border);
    border-radius: 16px;
    padding: 22px 24px;
    color: var(--rl-text);
}
.rl-calc__title { font-size: 18px; font-weight: 700; color: var(--rl-heading); margin-bottom: 16px; }
.rl-calc__body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .rl-calc__body { grid-template-columns: 1fr; } }

/* Fields flow into as many ~290px columns as the width allows, so a wide
   monitor shows two or three columns instead of one long scroll. */
.rl-calc__fields { columns: 290px; column-gap: 24px; }
.rl-calc__field {
    break-inside: avoid;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--rl-border);
}
.rl-calc__field.is-hidden { display: none; }
.rl-calc__flabel { font-weight: 600; color: var(--rl-heading); margin-bottom: 9px; font-size: 14px; line-height: 1.35; }
.rl-calc__desc { display: block; font-weight: 400; color: var(--rl-muted); font-size: 12px; margin-top: 3px; }

/* range slider */
.rl-calc__range { display: flex; align-items: center; gap: 14px; }
.rl-calc__range input[type=range] {
    flex: 1; -webkit-appearance: none; appearance: none;
    height: 6px; border-radius: 6px; background: #2a2e34; outline: none;
}
.rl-calc__range input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--rl-accent); cursor: pointer; border: 3px solid #14171a;
}
.rl-calc__range input[type=range]::-moz-range-thumb {
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--rl-accent); cursor: pointer; border: 3px solid #14171a;
}
.rl-calc__rangeval {
    min-width: 46px; text-align: center; font-weight: 700; font-size: 14px; color: var(--rl-heading);
    background: #14171a; border: 1px solid var(--rl-border); border-radius: 8px; padding: 5px 7px;
}

/* radio / checkbox / toggle options as selectable chips */
.rl-calc__options { display: flex; flex-wrap: wrap; gap: 7px; }
.rl-calc__opt {
    position: relative; display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 12px; border: 1px solid var(--rl-border); border-radius: 9px;
    cursor: pointer; font-size: 13px; line-height: 1.3; color: var(--rl-text);
    transition: border-color .15s, background .15s;
}
.rl-calc__opt input { position: absolute; opacity: 0; pointer-events: none; }
.rl-calc__opt:hover { border-color: var(--rl-muted); }
.rl-calc__opt:has(input:checked) {
    border-color: var(--rl-accent);
    background: var(--accent-soft, rgba(227, 192, 131, .12));
    color: var(--rl-heading);
}
.rl-calc__opt--check::before {
    content: ''; width: 15px; height: 15px; border-radius: 5px;
    border: 1.5px solid var(--rl-muted); flex: none;
}
.rl-calc__opt--check:has(input:checked)::before {
    background: var(--rl-accent); border-color: var(--rl-accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%2314171a' d='M6.5 11.2 3.3 8l-1 1 4.2 4.2L14 5.7l-1-1z'/%3E%3C/svg%3E");
    background-size: cover;
}

/* result panel: itemized breakdown + total + lead form */
.rl-calc__result {
    position: sticky; top: 20px;
    background: #14171a; border: 1px solid var(--rl-border); border-radius: 14px; padding: 20px;
}
.rl-calc__result-head {
    font-size: 15px; font-weight: 700; color: var(--rl-heading);
    padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--rl-border);
}
/* No inner scrolling: the breakdown shows in full and the panel grows. */
.rl-calc__summary { margin: 0 0 4px; }
.rl-calc__sum-row {
    display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 12px;
    font-size: 12.5px; line-height: 1.45; padding: 6px 0; border-bottom: 1px dashed rgba(162,174,191,.14);
}
.rl-calc__sum-label { color: var(--rl-muted); flex: 1 1 auto; }
/* Long values (checkbox lists) wrap onto their own full-width line. */
.rl-calc__sum-val { color: var(--rl-text); text-align: right; flex: 0 1 auto; margin-left: auto; max-width: 100%; }
.rl-calc__total-row {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rl-border);
    font-size: 13px; color: var(--rl-muted);
}
.rl-calc__total { font-size: 26px; font-weight: 800; color: var(--rl-accent); line-height: 1.05; transition: opacity .15s; }
.rl-calc__total.is-updating { opacity: .45; }
.rl-calc__note { font-size: 11.5px; color: var(--rl-muted); margin: 10px 0 0; line-height: 1.5; text-align: center; }

/* lead form inside the result panel */
.rl-calc__lead { margin-top: 16px; }
.rl-calc__input {
    width: 100%; margin-bottom: 9px; padding: 11px 13px; font-size: 14px;
    color: var(--rl-heading); background: var(--rl-surface);
    border: 1px solid var(--rl-border); border-radius: 9px; outline: none;
}
.rl-calc__input::placeholder { color: var(--rl-muted); }
.rl-calc__input:focus { border-color: var(--rl-accent); }
/* High specificity: the theme kit styles every [type="submit"] with
   padding:20px 50px / font-size:16px (and loads after this file), which
   squeezed the label onto two lines. */
.rl-calc .rl-calc__lead .rl-calc__cta,
.rl-calc__cta {
    display: block; width: 100%; padding: 12px 16px; margin-top: 4px;
    background: var(--accent-gradient); color: #14171a; font-weight: 700;
    font-size: 14px; line-height: 1.2; white-space: nowrap;
    border: 0; border-radius: 10px; text-decoration: none; text-align: center; cursor: pointer;
}
.rl-calc__cta:hover { filter: brightness(1.07); }
.rl-calc__cta:disabled { opacity: .6; cursor: default; }

/* shared consent checkbox (152-ФЗ) — used by every site form */
.rl-consent {
    display: flex; align-items: flex-start; gap: 8px; margin: 10px 0;
    font-size: 12px; line-height: 1.45; color: var(--rl-muted); cursor: pointer;
}
.rl-consent input { flex: none; width: 16px; height: 16px; margin-top: 1px; accent-color: var(--rl-accent); }
.rl-consent a { color: var(--rl-text); text-decoration: underline; }

/* shared inline form error */
.rl-form-error {
    display: none; margin: 8px 0 0; font-size: 12.5px; color: #ff6b6b; line-height: 1.4;
}
.rl-form-error.visible, .rl-form-error:not(:empty) { display: block; }

/* legal (152-ФЗ) service pages */
.rl-legal h2 { font-size: 20px; margin: 28px 0 10px; }
.rl-legal ul { margin: 10px 0 16px; padding-left: 22px; }
.rl-legal li { margin-bottom: 6px; }
.rl-legal-links { margin-top: 8px; font-size: 12px; opacity: .8; }
.rl-legal-links a { color: inherit; text-decoration: underline; }

/* cookie / personal-data notice bar */
.rl-cookie {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 9999;
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    max-width: 900px; margin: 0 auto; padding: 14px 18px;
    background: #14171a; border: 1px solid var(--rl-border); border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,.45);
}
.rl-cookie__text { flex: 1 1 320px; margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--rl-text); }
.rl-cookie__text a { color: var(--rl-accent); text-decoration: underline; }
.rl-cookie__ok {
    flex: none; padding: 10px 22px; font-size: 14px; font-weight: 700; cursor: pointer;
    background: var(--accent-gradient); color: #14171a; border: 0; border-radius: 9px;
}
.rl-cookie__ok:hover { filter: brightness(1.07); }
@media (max-width: 520px) {
    .rl-cookie { flex-direction: column; align-items: stretch; text-align: center; max-height: 80vh; overflow-y: auto; }
    /* flex-basis follows the main axis — the 320px "don't shrink below this"
       width hint from the row layout becomes a 320px MIN-HEIGHT once the
       container switches to a column, ballooning the banner to ~half the
       screen on phones. Reset it so the text sizes to its own content. */
    .rl-cookie__text { flex: 1 1 auto; }
}

/* Inline SVG icons inside hand-authored content (carried from site.css). */
.rl-doc .entry-content svg:not([class]):not([width]) {
    width: 1.4em; height: 1.4em;
    vertical-align: middle;
    fill: currentColor;
}

/* ---- Archive card grid (category listings) ------------------------------- */
.rl-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 22px;
    padding: 24px 0 8px;
}
.rl-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 26px 26px 22px;
    background: var(--rl-surface);
    border: 1px solid var(--rl-border);
    border-radius: 16px;
    transition: border-color .2s ease, transform .2s ease;
}
.rl-card:hover { border-color: var(--rl-accent); transform: translateY(-3px); }
.rl-card__link { position: absolute; inset: 0; z-index: 1; }
.rl-card__cat {
    align-self: flex-start;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .03em;
    color: var(--rl-accent);
    margin-bottom: 12px;
}
.rl-card__title {
    margin: 0 0 12px;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--rl-heading);
}
.rl-card__excerpt {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--rl-muted);
}
.rl-card__meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--rl-muted);
}
.rl-card__more { color: var(--rl-accent); font-weight: 600; }
.rl-empty { color: var(--rl-muted); padding: 24px 0; }

/* Media cards (article/case grids that replace the dynamic post galleries). */
.rl-cards--media { grid-template-columns: repeat(auto-fill, minmax(304px, 1fr)); }
.rl-card--media { padding: 0; overflow: hidden; }
.rl-card__thumb { aspect-ratio: 16 / 10; overflow: hidden; background: #14171a; }
.rl-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.rl-card--media:hover .rl-card__thumb img { transform: scale(1.04); }

/* Branded cover for cards without an image, so the grid stays even. */
.rl-card__thumb--ph {
    display: flex; align-items: center; justify-content: center; position: relative;
    background: linear-gradient(135deg, #1b2025 0%, #23272d 55%, rgba(227, 192, 131, .10) 100%);
    border-bottom: 1px solid var(--rl-border);
}
.rl-card__thumb--ph::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(227, 192, 131, .18), transparent 55%);
}
.rl-card__ph {
    position: relative; z-index: 1; padding: 0 22px; text-align: center;
    font-family: var(--uicore-primary-font-family, "TildaSans-"), sans-serif;
    font-size: 21px; font-weight: 800; line-height: 1.2; color: var(--rl-heading); opacity: .95;
}

.rl-card--media .rl-card__body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 18px; }
.rl-card--media .rl-card__cat { margin-bottom: 10px; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }
.rl-card--media .rl-card__title {
    font-size: 17px; margin-bottom: 10px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rl-card--media .rl-card__excerpt {
    margin-bottom: 16px; font-size: 14px; line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.rl-card--media .rl-card__more { margin-top: auto; }

/* ---- Password gate ------------------------------------------------------- */
.rl-lock {
    max-width: 520px;
    margin: 24px 0 40px;
    padding: 32px;
    background: var(--rl-surface);
    border: 1px solid var(--rl-border);
    border-radius: 16px;
}
.rl-lock__intro { margin: 0 0 20px; color: var(--rl-muted); font-size: 15px; line-height: 1.6; }
.rl-lock__error { margin: 0 0 14px; color: #ff6b6b; font-size: 14px; }
.rl-lock__form { display: flex; gap: 12px; flex-wrap: wrap; }
.rl-lock__input {
    flex: 1 1 220px;
    height: 50px; padding: 0 16px;
    background: #14171a;
    border: 1px solid var(--rl-border); border-radius: 10px;
    color: var(--rl-heading); font-size: 15px;
}
.rl-lock__input:focus { outline: none; border-color: var(--rl-accent); }
.rl-lock__btn {
    height: 50px; padding: 0 26px;
    background: var(--accent-gradient); color: #14171a;
    border: 0; border-radius: 10px;
    font-weight: 700; font-size: 15px; cursor: pointer;
    transition: filter .2s ease;
}
.rl-lock__btn:hover { filter: brightness(1.08); }

/* ---- Pagination ---------------------------------------------------------- */
.rl-pagination { margin: 36px 0 8px; }
.rl-pagination .pagination,
.rl-pagination .nav-links {
    display: flex; flex-wrap: wrap; gap: 8px;
    justify-content: center; list-style: none; padding: 0; margin: 0;
}
.rl-pagination a,
.rl-pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 42px; height: 42px; padding: 0 14px;
    border: 1px solid var(--rl-border); border-radius: 10px;
    color: var(--rl-text); text-decoration: none; line-height: 1;
}
.rl-pagination a:hover { border-color: var(--rl-accent); }
.rl-pagination .active span,
.rl-pagination .current {
    background: var(--rl-accent); border-color: var(--rl-accent); color: #14171A;
}

/* ---- Unified button style ------------------------------------------------ */
/* Any button on a brand (gold) background gets DARK, BOLD text and an icon in
   the SAME colour as the text. The theme paints its primary buttons gold but
   with white text/icon and normal weight (color:#FFFFFF, fill:#fff,
   font-weight:normal — higher specificity, loaded later), so these need
   !important to win. The gold gradient is layered on top of the theme's
   solid fill. Secondary / ghost / brand (Telegram, VK) buttons use different
   classes, keep their own brand colours, and are deliberately left untouched. */
.rl-btn,
.rl-submit, .rl-calc__cta, .rl-cookie__ok, .rl-lock__btn,
.pp-button,
.elementor-kit-11 input[type="button"],
.elementor-kit-11 input[type="submit"],
.elementor-kit-11 [type="submit"],
.elementor-kit-11 .wp-block-button__link,
.uicore-mobile-menu-wrapper .uicore-cta-wrapper a,
.uicore-left-menu .uicore-cta-wrapper a,
.wc-block-components-button:not(.is-link),
.elementor-button.elementor-button,
.elementor-kit-11 .elementor-button:not(.bdt-offcanvas-button),
.elementor-kit-11 .bdt-button-primary,
.elementor-kit-11 .bdt-ep-button,
button.metform-btn,
.elementor-kit-11 .bdt-callout a.bdt-callout-button,
.elementor-kit-11 .tutor-button,
.uicore-navbar a.uicore-btn,
a.uicore-btn.uicore-cta,
.elementor-kit-11 .bdt-contact-form .elementor-button {
    background-image: var(--accent-gradient);
    color: #14171a !important;
    font-weight: 700 !important;
    border-style: none;
    transition: filter .2s ease, transform .2s ease, box-shadow .2s ease;
}
/* One shared, on-brand hover for every button above: brighten, lift a touch,
   soft gold glow. Keeps dark bold text/icon (theme flips to white-on-grey). */
.rl-btn:hover,
.pp-button:hover,
.elementor-kit-11 input[type="submit"]:hover,
.elementor-kit-11 [type="submit"]:hover,
.elementor-button.elementor-button:hover,
.elementor-button.elementor-button:focus,
.elementor-kit-11 .elementor-button:not(.bdt-offcanvas-button):hover,
.elementor-kit-11 .elementor-button:not(.bdt-offcanvas-button):focus,
.elementor-kit-11 .bdt-button-primary:hover,
.elementor-kit-11 .bdt-ep-button:hover,
.uicore-navbar a.uicore-btn:hover,
button.metform-btn:hover {
    color: #14171a !important;
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(227, 192, 131, .3);
}

/* The Element Pack "Advanced Button" widget (.bdt-ep-button) carries a legacy
   colour-swipe hover animation with a hardcoded leftover colour (grey, or in
   one case literal Telegram blue) that flashes over the gold background on
   hover. Turn the swipe off entirely — the shared hover treatment above
   already gives it a consistent, on-brand feel. */
.elementor-kit-11 .bdt-ep-button:after,
.elementor-kit-11 .bdt-ep-button:before,
.elementor-kit-11 .bdt-ep-button .bdt-ep-button-content-wrapper:after,
.elementor-kit-11 .bdt-ep-button .bdt-ep-button-content-wrapper:before {
    content: none !important;
}

/* Icon = same colour as the text. `fill` doesn't reliably inherit down to it:
   several per-widget stylesheets paint the <svg> (or an icon-wrapper's own
   `color`, which currentColor would pick up instead of the button's) — both
   beat plain inheritance regardless of the button's own !important. Set the
   icon's fill explicitly, hardcoded to the same dark used above, everywhere
   on the site. */
.pp-button svg, .pp-button svg *,
.elementor-button.elementor-button svg, .elementor-button.elementor-button svg *,
.elementor-kit-11 .elementor-button:not(.bdt-offcanvas-button) svg,
.elementor-kit-11 .elementor-button:not(.bdt-offcanvas-button) svg *,
.elementor-kit-11 .bdt-ep-button svg, .elementor-kit-11 .bdt-ep-button svg *,
.elementor-kit-11 .bdt-ep-button .bdt-ep-button-icon {
    fill: #14171a !important;
    color: #14171a !important;
}

/* ---- Selling case list (/cases/кейсы-*) ----------------------------------- */
.rl-caselist { padding-bottom: 16px; }
.rl-caselist__lead {
    max-width: 780px; margin: 6px 0 18px;
    font-size: 17px; line-height: 1.6; color: var(--rl-muted);
}
.rl-caselist__meta {
    display: flex; align-items: baseline; gap: 10px;
    margin: 0 0 22px; font-size: 14px; color: var(--rl-muted);
}
.rl-caselist__count {
    font-size: 30px; font-weight: 800; line-height: 1; color: var(--rl-accent);
}

.rl-case {
    position: relative;
    display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 28px;
    padding: 26px 28px;
    margin-bottom: 16px;
    background: var(--rl-surface);
    border: 1px solid var(--rl-border);
    border-radius: 16px;
    transition: border-color .2s ease, transform .2s ease;
}
.rl-case:hover { border-color: var(--rl-accent); transform: translateY(-2px); }
@media (max-width: 760px) { .rl-case { grid-template-columns: 1fr; gap: 16px; } }

.rl-case__client {
    margin: 0 0 4px;
    font-family: var(--uicore-primary-font-family, "TildaSans-"), sans-serif;
    font-size: 22px; font-weight: 800; line-height: 1.2; color: var(--rl-heading);
}
.rl-case__tagline { font-size: 14px; font-weight: 600; color: var(--rl-accent); margin-bottom: 14px; }
.rl-case__intro { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: var(--rl-text); max-width: 640px; }

/* "What we did" — two columns of checked facts on wide screens. */
.rl-case__done {
    list-style: none; margin: 12px 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 24px;
}
.rl-case__done li {
    position: relative; padding-left: 24px;
    font-size: 14px; line-height: 1.5; color: var(--rl-text);
}
.rl-case__done li::before {
    content: ''; position: absolute; left: 0; top: 3px;
    width: 15px; height: 15px; border-radius: 5px;
    background: var(--accent-soft, rgba(227, 192, 131, .12));
    border: 1px solid var(--rl-accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23E3C083' d='M6.5 11.2 3.3 8l-1 1 4.2 4.2L14 5.7l-1-1z'/%3E%3C/svg%3E");
    background-size: 11px; background-position: center; background-repeat: no-repeat;
}

/* Right rail: the numbers that sell, then the link. */
.rl-case__side {
    display: flex; flex-direction: column; gap: 12px; justify-content: flex-start;
    padding-left: 26px; border-left: 1px solid var(--rl-border);
}
@media (max-width: 760px) {
    .rl-case__side { padding-left: 0; border-left: 0; border-top: 1px solid var(--rl-border); padding-top: 14px; }
}
.rl-case__stat { display: flex; flex-direction: column; }
.rl-case__stat-num { font-size: 22px; font-weight: 800; line-height: 1.15; color: var(--rl-accent); }
.rl-case__stat-label { font-size: 12.5px; line-height: 1.4; color: var(--rl-muted); }
.rl-case__more { margin-top: auto; padding-top: 10px; font-size: 14px; font-weight: 600; color: var(--rl-accent); }

/* ---- /cases hub: grouped selling catalog ---------------------------------- */
.rl-hub { padding-bottom: 24px; }
.rl-hub__section { margin-top: 34px; }
.rl-hub__head {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
    padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--rl-border);
}
.rl-hub__title {
    margin: 0 0 6px;
    font-family: var(--uicore-primary-font-family, "TildaSans-"), sans-serif;
    font-size: 24px; font-weight: 800; color: var(--rl-heading);
}
.rl-hub__n {
    display: inline-block; vertical-align: 4px; margin-left: 8px;
    padding: 2px 9px; border-radius: 99px;
    font-size: 12px; font-weight: 700; color: var(--rl-accent);
    background: var(--accent-soft, rgba(227, 192, 131, .12));
}
.rl-hub__desc { margin: 0; max-width: 720px; font-size: 14.5px; line-height: 1.55; color: var(--rl-muted); }
.rl-hub__all { flex: none; font-size: 14px; font-weight: 600; color: var(--rl-accent); text-decoration: none; white-space: nowrap; }
.rl-hub__all:hover { text-decoration: underline; }

.rl-hub__grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 14px;
}
.rl-mini {
    position: relative; display: flex; flex-direction: column;
    padding: 18px 20px 16px;
    background: var(--rl-surface);
    border: 1px solid var(--rl-border); border-radius: 14px;
    transition: border-color .2s ease, transform .2s ease;
}
.rl-mini:hover { border-color: var(--rl-accent); transform: translateY(-2px); }
.rl-mini__client { margin: 0 0 2px; font-size: 16.5px; font-weight: 700; line-height: 1.25; color: var(--rl-heading); }
.rl-mini__tagline {
    font-size: 12.5px; font-weight: 600; color: var(--rl-accent); margin-bottom: 10px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rl-mini__stat { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 12px; }
.rl-mini__num { font-size: 20px; font-weight: 800; color: var(--rl-accent); white-space: nowrap; }
.rl-mini__lbl {
    font-size: 12.5px; line-height: 1.4; color: var(--rl-muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rl-mini__fact {
    margin: 2px 0 12px; font-size: 13px; line-height: 1.5; color: var(--rl-text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rl-mini__more { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--rl-accent); }
@media (max-width: 560px) {
    .rl-hub__head { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---- Themed group headings inside a case list ------------------------------ */
.rl-caselist__group {
    margin: 34px 0 14px;
    font-family: var(--uicore-primary-font-family, "TildaSans-"), sans-serif;
    font-size: 22px; font-weight: 800; color: var(--rl-heading);
}
.rl-caselist__group:first-of-type { margin-top: 22px; }

/* ---- Website portfolio (visual showcase cards) ----------------------------- */
.rl-sites {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 18px;
    margin-bottom: 10px;
}
.rl-site {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    background: var(--rl-surface);
    border: 1px solid var(--rl-border); border-radius: 14px;
    transition: border-color .2s ease, transform .2s ease;
}
.rl-site:hover { border-color: var(--rl-accent); transform: translateY(-3px); }
.rl-site__shot { aspect-ratio: 16 / 10; overflow: hidden; background: #14171a; }
.rl-site__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; transition: transform .4s ease; }
.rl-site:hover .rl-site__shot img { transform: scale(1.03); }
.rl-site__bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 18px;
}
.rl-site__info { display: flex; flex-direction: column; min-width: 0; }
.rl-site__client { font-size: 15.5px; font-weight: 700; color: var(--rl-heading); }
.rl-site__tagline {
    font-size: 12.5px; color: var(--rl-muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rl-site__tag {
    flex: none; padding: 4px 10px; border-radius: 99px;
    font-size: 11.5px; font-weight: 700; color: var(--rl-accent);
    background: var(--accent-soft, rgba(227, 192, 131, .12));
    border: 1px solid rgba(227, 192, 131, .3);
}

/* ---- /knowledge: knowledge-base article index ------------------------------ */
.rl-kb { padding-bottom: 24px; }
.rl-kb__list { display: flex; flex-direction: column; gap: 16px; } /* matches .rl-case's 16px card spacing */
.rl-kb__row {
    position: relative;
    display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 22px;
    padding: 18px 22px;
    background: var(--rl-surface);
    border: 1px solid var(--rl-border); border-radius: 14px;
    transition: border-color .2s ease, transform .2s ease;
}
.rl-kb__row:hover { border-color: var(--rl-accent); transform: translateY(-1px); }
@media (max-width: 760px) { .rl-kb__row { grid-template-columns: 1fr; gap: 16px; } } /* same breakpoint + gap as .rl-case */

.rl-kb__title { margin: 0 0 6px; font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--rl-heading); }
.rl-kb__summary { margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: var(--rl-text); }
.rl-kb__toc { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; }
.rl-kb__toc-label { font-size: 12px; font-weight: 600; color: var(--rl-accent); }
.rl-kb__toc-item {
    padding: 2px 9px; border-radius: 99px;
    font-size: 12px; line-height: 1.5; color: var(--rl-muted);
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--rl-border);
}

.rl-kb__side {
    display: flex; flex-direction: column; gap: 4px; justify-content: flex-start;
    padding-left: 22px; border-left: 1px solid var(--rl-border);
    font-size: 12.5px; color: var(--rl-muted);
}
@media (max-width: 760px) {
    .rl-kb__side { padding-left: 0; border-left: 0; flex-direction: row; gap: 14px; align-items: center; }
}
.rl-kb__read { color: var(--rl-accent); font-weight: 600; }
.rl-kb__more { margin-top: auto; padding-top: 8px; font-size: 13px; font-weight: 600; color: var(--rl-accent); }
@media (max-width: 760px) { .rl-kb__more { margin: 0; padding: 0; } }

/* ---- Mobile fixes for the hand-authored rl-* landing pages ("Обучение
   Битрикс24", "Хостинг", "Бокс/Облако", fckn-1c-update) -------------------
   These pages' own styling lives in uicore-global.css (recovered verbatim
   from the theme), which already contains mobile rules for both components
   below — but a hard-coded inline style="grid-template-columns:..." on the
   element itself always wins over an external stylesheet rule, silently
   defeating the theme's own responsive collapse. Restoring it here rather
   than editing every affected page's markup. */
@media (max-width: 640px) {
    .rl-plans[style*="grid-template-columns"],
    .rl-hero-grid[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

/* .rl-tasks-table (/development/bitrix "Сколько стоит конкретная задача")
   already hides its 2nd column on mobile (uicore-global.css), but the
   remaining task-name / hours / price columns still use the browser's
   default table auto-layout, which lets the table grow past 100% width
   instead of wrapping — clipping the price column off-screen. Fixed
   layout forces it to respect the container width. */
@media (max-width: 640px) {
    .rl-tasks-table { table-layout: fixed; }
    .rl-tasks-table th:nth-child(1), .rl-tasks-table td:nth-child(1) { width: 46%; }
    .rl-tasks-table th:nth-child(3), .rl-tasks-table td:nth-child(3) { width: 20%; }
    .rl-tasks-table th:nth-child(4), .rl-tasks-table td:nth-child(4) { width: 34%; }
    /* the price range ("23 920–47 840 ₽") is nowrap by default — fine at
       full width, but longer amounts no longer fit a 34%-wide column. */
    .rl-tasks-table .rl-task-hours,
    .rl-tasks-table .rl-task-price { white-space: normal; }
}
