/* community.php — UI UX Pro Max + STRELA industrial brand */

:root {
    --cm-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --cm-max: 1160px;
    --cm-r: 18px;
    --cm-r-sm: 12px;

    --cm-bg: #0b111a;
    --cm-bg2: #111827;
    --cm-card: #151d2c;
    --cm-card-hover: #1a2438;
    --cm-text: #f1f5f9;
    --cm-text2: #94a3b8;
    --cm-text3: #64748b;
    --cm-border: rgba(255, 255, 255, 0.08);
    --cm-accent: #e8a920;
    --cm-accent-hover: #d49618;
    --cm-accent-soft: rgba(232, 169, 32, 0.14);
    --cm-cta: #f97316;
    --cm-cta-hover: #ea580c;
    --cm-slate: #64748b;
    --cm-blue: #38bdf8;
    --cm-shadow: 0 8px 32px rgba(0, 0, 0, 0.38);
}

[data-theme='light'] {
    --cm-bg: #f8fafc;
    --cm-bg2: #ffffff;
    --cm-card: #ffffff;
    --cm-card-hover: #f8fafc;
    --cm-text: #0f172a;
    --cm-text2: #475569;
    --cm-text3: #64748b;
    --cm-border: rgba(15, 23, 42, 0.1);
    --cm-accent: #d97706;
    --cm-accent-hover: #b45309;
    --cm-accent-soft: rgba(217, 119, 6, 0.12);
    --cm-cta: #ea580c;
    --cm-cta-hover: #c2410c;
    --cm-blue: #2563eb;
    --cm-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.community-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--cm-font);
    background: var(--cm-bg);
    color: var(--cm-text);
    -webkit-font-smoothing: antialiased;
    transition: background 0.25s ease, color 0.25s ease;
    touch-action: manipulation;
}

.community-body a,
.community-body summary {
    touch-action: manipulation;
}

.community-body a:focus-visible,
.community-body summary:focus-visible,
.community-body button:focus-visible {
    outline: 2px solid var(--cm-accent);
    outline-offset: 2px;
}

.cm-page {
    max-width: var(--cm-max);
    margin: 0 auto;
    padding: 16px 16px calc(96px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .cm-page {
        padding: 24px 24px 120px;
    }
}

/* ── Hero (Community landing split) ─────────── */
.cm-hero {
    position: relative;
    border-radius: calc(var(--cm-r) + 6px);
    overflow: hidden;
    margin-bottom: 20px;
    background: linear-gradient(145deg, var(--cm-bg2) 0%, var(--cm-card) 52%, #0f172a 100%);
    border: 1px solid var(--cm-border);
    box-shadow: var(--cm-shadow);
}

[data-theme='light'] .cm-hero {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 48%, #e2e8f0 100%);
}

.cm-hero__glow {
    pointer-events: none;
    position: absolute;
    inset: -30% -10% auto -10%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(249, 115, 22, 0.14), transparent 50%),
        radial-gradient(ellipse at 80% 10%, rgba(232, 169, 32, 0.16), transparent 55%);
}

.cm-hero__grid {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 22px;
    padding: 24px 18px 26px;
}

@media (min-width: 900px) {
    .cm-hero__grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
        align-items: stretch;
        gap: 28px;
        padding: 36px 36px 34px;
    }
}

.cm-hero__live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 6px 12px 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.28);
}

.cm-hero__live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    animation: cm-pulse 2s ease infinite;
}

@keyframes cm-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.cm-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cm-slate);
}

.cm-eyebrow__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cm-cta);
}

.cm-hero__title {
    margin: 0 0 14px;
    font-size: clamp(2rem, 6vw, 3.25rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    max-width: 14ch;
}

.cm-hero__lead {
    margin: 0 0 22px;
    max-width: 54ch;
    font-size: 15px;
    line-height: 1.7;
    color: var(--cm-text2);
}

.cm-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.cm-hero__note {
    margin: 0;
    font-size: 12px;
    color: var(--cm-text3);
}

.cm-hero__panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: var(--cm-r);
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--cm-border);
}

[data-theme='light'] .cm-hero__panel {
    background: rgba(255, 255, 255, 0.72);
}

.cm-hero__panel-kicker {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--cm-text2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cm-hero__panel-kicker i {
    color: var(--cm-cta);
}

.cm-stats--bento {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    flex: 1;
}

.cm-stat--tall {
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cm-stat__icon {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
    color: var(--cm-cta);
    opacity: 0.95;
}

/* ── Quick benefits strip ───────────────────── */
.cm-benefits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 28px;
}

@media (min-width: 768px) {
    .cm-benefits {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }
}

.cm-benefit {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 44px;
    padding: 14px 14px 12px;
    border-radius: var(--cm-r-sm);
    border: 1px solid var(--cm-border);
    background: var(--cm-card);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        transform 0.18s ease,
        box-shadow 0.2s ease;
}

.cm-benefit:hover {
    border-color: rgba(249, 115, 22, 0.35);
    transform: translateY(-2px);
    box-shadow: var(--cm-shadow);
}

.cm-benefit__icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--cm-accent-soft);
    color: var(--cm-accent);
    font-size: 15px;
    margin-bottom: 4px;
}

.cm-benefit__title {
    font-size: 14px;
    font-weight: 700;
}

.cm-benefit__desc {
    font-size: 11px;
    color: var(--cm-text3);
    line-height: 1.4;
}

/* ── Sticky mobile join bar ─────────────────── */
.cm-sticky-join {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 9000;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(11, 17, 26, 0.92);
    border: 1px solid var(--cm-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

[data-theme='light'] .cm-sticky-join {
    background: rgba(255, 255, 255, 0.94);
}

@media (min-width: 900px) {
    .cm-sticky-join {
        display: none;
    }
}

.cm-sticky-join__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.15s ease;
}

.cm-sticky-join__btn--wa {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.cm-sticky-join__btn--tg {
    background: linear-gradient(135deg, #2aabee, #229ed9);
}

.cm-sticky-join__btn:active {
    transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
    .cm-hero__live-dot {
        animation: none;
    }

    .cm-benefit:hover,
    .cm-sticky-join__btn:active {
        transform: none;
    }
}

.cm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: var(--cm-r-sm);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition:
        transform 0.15s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        filter 0.2s ease;
    white-space: nowrap;
}

.cm-btn i {
    font-size: 15px;
    opacity: 0.95;
}

.cm-btn--primary {
    background: linear-gradient(135deg, var(--cm-accent), var(--cm-accent-hover));
    color: #0d1520;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 14px rgba(232, 169, 32, 0.28);
}

[data-theme='light'] .cm-btn--primary {
    color: #fff;
}

.cm-btn--primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.cm-btn--ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--cm-text);
    border-color: var(--cm-border);
}

[data-theme='light'] .cm-btn--ghost {
    background: #f8fafc;
}

.cm-btn--ghost:hover {
    background: var(--cm-accent-soft);
    border-color: rgba(232, 169, 32, 0.35);
}

.cm-btn--wide {
    width: 100%;
    max-width: 360px;
}

.cm-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 520px) {
    .cm-stats {
        grid-template-columns: 1fr;
    }
}

.cm-stat {
    padding: 14px 14px 16px;
    border-radius: var(--cm-r-sm);
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid var(--cm-border);
    text-align: center;
}

[data-theme='light'] .cm-stat {
    background: rgba(255, 255, 255, 0.65);
}

.cm-stat--accent {
    border-color: rgba(232, 169, 32, 0.35);
    background: linear-gradient(135deg, rgba(232, 169, 32, 0.12), rgba(56, 189, 248, 0.06));
}

.cm-stat__value {
    display: block;
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--cm-text);
}

.cm-stat__label {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cm-text2);
}

/* ── Sections ──────────────────────────────── */
.cm-section {
    margin-bottom: 28px;
}

.cm-section--last {
    margin-bottom: 8px;
}

.cm-section__head {
    margin-bottom: 18px;
}

.cm-section__title {
    margin: 0 0 6px;
    font-size: clamp(20px, 3.5vw, 26px);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.cm-section__sub {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--cm-text2);
    max-width: 62ch;
}

/* Встроенная карта (map.php ?embed=bare) */
.cm-map-section .cm-section__head {
    margin-bottom: 14px;
}

.cm-map-frame {
    position: relative;
    border-radius: var(--cm-r);
    overflow: hidden;
    border: 1px solid var(--cm-border);
    box-shadow: var(--cm-shadow);
    background: var(--cm-bg2);
    line-height: 0;
}

.cm-map-iframe {
    display: block;
    width: 100%;
    height: min(440px, 58vh);
    min-height: 240px;
    border: 0;
    vertical-align: middle;
}

@media (min-width: 768px) {
    .cm-map-iframe {
        height: min(480px, 52vh);
        min-height: 320px;
    }
}

.cm-map-section__foot {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.cm-section__foot {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.cm-section__foot--split {
    justify-content: space-between;
}

.cm-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--cm-r-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--cm-accent);
    border: 1px solid rgba(232, 169, 32, 0.35);
    background: var(--cm-accent-soft);
    text-decoration: none;
    transition:
        transform 0.15s ease,
        background 0.2s ease;
}

.cm-link-btn:hover {
    transform: translateY(-1px);
    background: rgba(232, 169, 32, 0.22);
}

[data-theme='light'] .cm-link-btn {
    color: var(--cm-accent-hover);
}

.cm-link-btn--secondary {
    color: var(--cm-blue);
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.08);
}

[data-theme='light'] .cm-link-btn--secondary {
    color: #1d4ed8;
}

.cm-empty {
    margin: 12px 0;
    padding: 18px;
    border-radius: var(--cm-r-sm);
    border: 1px dashed var(--cm-border);
    color: var(--cm-text2);
    font-size: 14px;
    text-align: center;
}

.cm-empty--hidden {
    display: none;
}

/* ── Gallery: Pinterest-style masonry (CSS columns) ── */
.cm-gallery-block .cm-gallery {
    width: 100%;
    column-width: 168px;
    column-gap: 12px;
}

@media (min-width: 560px) {
    .cm-gallery-block .cm-gallery {
        column-width: 200px;
        column-gap: 14px;
    }
}

@media (min-width: 900px) {
    .cm-gallery-block .cm-gallery {
        column-width: 232px;
        column-gap: 18px;
    }
}

.cm-gallery__item {
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 14px;
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--cm-border);
    background: var(--cm-card);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    vertical-align: top;
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease;
}

.cm-gallery__item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.38s ease;
}

@media (hover: hover) {
    .cm-gallery__item:hover {
        transform: translateY(-3px);
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
    }

    [data-theme='light'] .cm-gallery__item:hover {
        box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
    }

    .cm-gallery__item:hover img {
        transform: scale(1.045);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cm-gallery__item {
        transition: none;
    }

    .cm-gallery__item img {
        transition: none;
    }

    .cm-gallery__item:hover,
    .cm-gallery__item:hover img {
        transform: none;
    }
}

/* ── Cards grid ───────────────────────────── */
.cm-reviews-grid,
.cm-jobs-grid {
    display: grid;
    gap: 14px;
}

@media (min-width: 640px) {
    .cm-reviews-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 960px) {
    .cm-reviews-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.cm-jobs-grid {
    grid-template-columns: 1fr;
}

@media (min-width: 720px) {
    .cm-jobs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .cm-jobs-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.cm-news-grid {
    display: grid;
    gap: 14px;
}

@media (min-width: 720px) {
    .cm-news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.cm-card {
    border-radius: var(--cm-r);
    padding: 18px 18px 16px;
    background: var(--cm-card);
    border: 1px solid var(--cm-border);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

[data-theme='light'] .cm-card {
    box-shadow: var(--cm-shadow);
}

.cm-card:hover {
    transform: translateY(-2px);
    border-color: rgba(232, 169, 32, 0.22);
}

/* Reviews */
.cm-review__top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.cm-review__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cm-accent-soft);
    flex-shrink: 0;
}

.cm-review__avatar--ph {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: var(--cm-text2);
}

.cm-review__meta {
    flex: 1;
    min-width: 0;
}

.cm-review__name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.cm-review__target {
    font-weight: 500;
    color: var(--cm-text2);
    font-size: 13px;
}

.cm-review__stars {
    display: inline-flex;
    gap: 2px;
    color: var(--cm-accent);
    font-size: 12px;
    margin-bottom: 4px;
}

.cm-review__stars--empty {
    color: var(--cm-text3);
}

.cm-review__date {
    font-size: 12px;
    color: var(--cm-text3);
}

.cm-review__text {
    margin: 14px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--cm-text2);
}

/* Jobs */
.cm-job__head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.cm-job__badge {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.cm-job__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    flex: 1;
}

.cm-job__salary {
    font-size: 18px;
    font-weight: 700;
    color: var(--cm-accent);
    margin-bottom: 10px;
}

.cm-job__facts {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: var(--cm-text2);
    line-height: 1.6;
}

.cm-job__facts li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.cm-job__facts i {
    margin-top: 3px;
    color: var(--cm-blue);
    width: 14px;
}

.cm-job__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cm-blue);
    text-decoration: none;
}

.cm-job__link:hover {
    text-decoration: underline;
}

/* News */
.cm-news__top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.cm-news__emoji {
    font-size: 28px;
    line-height: 1;
}

.cm-news__tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cm-accent-hover);
    margin-bottom: 4px;
}

.cm-news__title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.cm-news__date {
    font-size: 12px;
    color: var(--cm-text3);
}

.cm-news__excerpt {
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--cm-text2);
}

.cm-news__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cm-blue);
    text-decoration: none;
}

.cm-news__more:hover {
    text-decoration: underline;
}

/* Loading placeholders */
.cm-reviews-grid[data-loading='1'],
.cm-jobs-grid[data-loading='1'],
.cm-news-grid[data-loading='1'] {
    min-height: 120px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.09) 50%,
        rgba(255, 255, 255, 0.04) 100%
    );
    background-size: 200% 100%;
    animation: cm-shimmer 1.2s ease-in-out infinite;
    border-radius: var(--cm-r);
}

[data-theme='light'] .cm-reviews-grid[data-loading='1'],
[data-theme='light'] .cm-jobs-grid[data-loading='1'],
[data-theme='light'] .cm-news-grid[data-loading='1'] {
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
    background-size: 200% 100%;
}

@keyframes cm-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Lightbox */
.cm-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(13, 21, 32, 0.92);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
}

.cm-lightbox.cm-lightbox--open {
    opacity: 1;
    visibility: visible;
}

.cm-lightbox img {
    max-width: min(92vw, 1100px);
    max-height: 86vh;
    border-radius: var(--cm-r-sm);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
}

.cm-lightbox__close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
}

/* Fade in sections */
.cm-fade {
    opacity: 0;
    transform: translateY(14px);
    transition:
        opacity 0.55s ease,
        transform 0.55s ease;
}

.cm-fade.cm-fade--in {
    opacity: 1;
    transform: translateY(0);
}

/* Header coexistence: avoid double scroll */
body.community-body .custom-header {
    position: sticky;
}
html.strela-native-app body.community-body .custom-header::before {
    backdrop-filter: saturate(250%) blur(56px) !important;
    -webkit-backdrop-filter: saturate(250%) blur(56px) !important;
}
html.strela-native-app:not([data-theme="light"]) body.community-body .custom-header::before {
    background: rgba(13, 21, 32, 0.62) !important;
}

/* Toasts — ошибки и причины сбоев (лог с меткой времени) */
.cm-toast-stack {
    position: fixed;
    right: 12px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 10100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(420px, calc(100vw - 24px));
    pointer-events: none;
}

.cm-toast {
    pointer-events: auto;
    font-family: var(--cm-font);
    font-size: 13px;
    line-height: 1.35;
    color: var(--cm-text);
    background: var(--cm-card);
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-r-sm);
    box-shadow: var(--cm-shadow);
    padding: 12px 14px;
    opacity: 0;
    transform: translateX(12px);
    transition:
        opacity 0.28s ease,
        transform 0.28s ease;
}

.cm-toast.cm-toast--in {
    opacity: 1;
    transform: translateX(0);
}

.cm-toast.cm-toast--out {
    opacity: 0;
    transform: translateX(8px);
}

.cm-toast__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.cm-toast__time {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--cm-text3);
    font-variant-numeric: tabular-nums;
}

.cm-toast__badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--cm-accent-soft);
    color: var(--cm-accent);
}

.cm-toast--error .cm-toast__badge {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
}

.cm-toast--success .cm-toast__badge {
    background: rgba(34, 197, 94, 0.18);
    color: #4ade80;
}

.cm-toast--info .cm-toast__badge {
    background: rgba(56, 189, 248, 0.16);
    color: var(--cm-blue);
}

.cm-toast__msg {
    font-weight: 600;
}

.cm-toast__detail {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 400;
    color: var(--cm-text2);
    word-break: break-word;
}

.cm-toast--error {
    border-color: rgba(248, 113, 113, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    .cm-toast {
        transition: none;
        transform: none;
    }
    .cm-toast.cm-toast--in,
    .cm-toast.cm-toast--out {
        transform: none;
    }
}

/* ── Messenger platform cards ───────────────── */
.cm-btn--wa {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.28);
}

.cm-btn--wa:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

.cm-btn--tg {
    background: linear-gradient(135deg, #2aabee, #229ed9);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 18px rgba(42, 171, 238, 0.28);
}

.cm-btn--tg:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

.cm-messenger-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

@media (min-width: 720px) {
    .cm-messenger-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.cm-messenger-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100%;
    padding: 22px 20px 18px;
    border-radius: calc(var(--cm-r) + 2px);
    border: 1px solid var(--cm-border);
    background: linear-gradient(160deg, var(--cm-card) 0%, var(--cm-bg2) 100%);
    box-shadow: var(--cm-shadow);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.cm-messenger-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

.cm-messenger-card--wa:hover {
    border-color: rgba(37, 211, 102, 0.4);
}

.cm-messenger-card--tg:hover {
    border-color: rgba(42, 171, 238, 0.4);
}

.cm-messenger-card::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    opacity: 0.95;
}

.cm-messenger-card--wa::before {
    background: linear-gradient(90deg, #25d366, #128c7e);
}

.cm-messenger-card--tg::before {
    background: linear-gradient(90deg, #2aabee, #229ed9);
}

.cm-messenger-card__icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    font-size: 26px;
    color: #fff;
}

.cm-messenger-card--wa .cm-messenger-card__icon {
    background: linear-gradient(135deg, #25d366, #128c7e);
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.28);
}

.cm-messenger-card--tg .cm-messenger-card__icon {
    background: linear-gradient(135deg, #2aabee, #229ed9);
    box-shadow: 0 8px 22px rgba(42, 171, 238, 0.28);
}

.cm-messenger-card__title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.cm-messenger-card__desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--cm-text2);
}

.cm-messenger-card__meta {
    margin: 10px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--cm-text3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cm-messenger-card__cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 16px;
    border-radius: var(--cm-r-sm);
    font-size: 14px;
    font-weight: 700;
}

.cm-messenger-card--wa .cm-messenger-card__cta {
    background: rgba(37, 211, 102, 0.14);
    color: #4ade80;
    border: 1px solid rgba(37, 211, 102, 0.35);
}

.cm-messenger-card--tg .cm-messenger-card__cta {
    background: rgba(42, 171, 238, 0.12);
    color: #7dd3fc;
    border: 1px solid rgba(42, 171, 238, 0.35);
}

[data-theme='light'] .cm-messenger-card--wa .cm-messenger-card__cta {
    color: #15803d;
}

[data-theme='light'] .cm-messenger-card--tg .cm-messenger-card__cta {
    color: #1d4ed8;
}

.cm-messenger-card__cta:hover {
    filter: brightness(1.05);
}

.cm-link-btn {
    min-height: 44px;
    cursor: pointer;
}

.cm-group-card {
    cursor: default;
}

.cm-faq-item__q {
    min-height: 44px;
    cursor: pointer;
}

/* ── WhatsApp groups grid ───────────────────── */
.cm-groups-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .cm-groups-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 960px) {
    .cm-groups-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.cm-group-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 16px 14px;
    border-radius: var(--cm-r-sm);
    border: 1px solid var(--cm-border);
    background: var(--cm-card);
    transition: border-color 0.2s ease, transform 0.18s ease;
}

.cm-group-card:hover {
    border-color: rgba(232, 169, 32, 0.28);
    transform: translateY(-1px);
}

.cm-group-card__icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--cm-accent-soft);
    color: var(--cm-accent);
    font-size: 17px;
}

.cm-group-card__title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
}

.cm-group-card__desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--cm-text2);
}

/* ── SEO intro & tags ───────────────────────── */
.cm-seo-intro__inner {
    padding: 20px 18px 18px;
    border-radius: var(--cm-r);
    border: 1px solid var(--cm-border);
    background: linear-gradient(145deg, rgba(232, 169, 32, 0.06), rgba(56, 189, 248, 0.04));
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12);
}

.cm-seo-intro__title {
    margin: 0 0 12px;
    font-size: clamp(18px, 3.2vw, 22px);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.cm-seo-intro__text {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--cm-text2);
}

.cm-seo-intro__text strong {
    color: var(--cm-text);
    font-weight: 600;
}

.cm-seo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.cm-seo-tags__item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: var(--cm-text2);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--cm-border);
}

[data-theme='light'] .cm-seo-tags__item {
    background: rgba(255, 255, 255, 0.85);
}

.cm-seo-tags__item i {
    font-size: 10px;
    color: var(--cm-accent);
    opacity: 0.9;
}

/* ── FAQ ────────────────────────────────────── */
.cm-faq-list {
    display: grid;
    gap: 10px;
}

.cm-faq-item {
    border-radius: var(--cm-r-sm);
    border: 1px solid var(--cm-border);
    background: var(--cm-card);
    overflow: hidden;
}

.cm-faq-item__q {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.cm-faq-item__q::-webkit-details-marker {
    display: none;
}

.cm-faq-item__q i {
    margin-top: 2px;
    color: var(--cm-accent);
    flex-shrink: 0;
}

.cm-faq-item__a {
    margin: 0;
    padding: 0 16px 14px 42px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--cm-text2);
}

.cm-faq-item[open] {
    border-color: rgba(232, 169, 32, 0.28);
}

/* ── Bottom CTA ─────────────────────────────── */
.cm-cta {
    margin-top: 8px;
    padding: 28px 22px 30px;
    border-radius: calc(var(--cm-r) + 4px);
    text-align: center;
    border: 1px solid rgba(232, 169, 32, 0.28);
    background: linear-gradient(145deg, rgba(232, 169, 32, 0.1), rgba(56, 189, 248, 0.06));
    box-shadow: var(--cm-shadow);
}

.cm-cta__title {
    margin: 0 0 8px;
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 700;
}

.cm-cta__text {
    margin: 0 auto 20px;
    max-width: 46ch;
    font-size: 14px;
    line-height: 1.6;
    color: var(--cm-text2);
}

.cm-cta__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

@media (min-width: 560px) {
    .cm-cta__actions {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .cm-btn--wide {
        width: auto;
        min-width: 220px;
    }
}

/* ══════════════════════════════════════════════
   MOBILE — компактная аккуратная вёрстка ≤767px
   ══════════════════════════════════════════════ */
@media (max-width: 767px) {
    .cm-page {
        padding: 8px 12px calc(68px + env(safe-area-inset-bottom, 0px));
    }

    .cm-hero {
        margin-bottom: 10px;
        border-radius: 14px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
    }

    .cm-hero__glow {
        opacity: 0.55;
    }

    .cm-hero__grid {
        gap: 10px;
        padding: 14px 14px 12px;
    }

    .cm-hero__live {
        margin-bottom: 8px;
        padding: 4px 9px 4px 8px;
        font-size: 9px;
        letter-spacing: 0.06em;
    }

    .cm-hero__live-dot {
        width: 6px;
        height: 6px;
    }

    .cm-eyebrow {
        margin-bottom: 6px;
        font-size: 9px;
    }

    .cm-hero__title {
        margin-bottom: 6px;
        font-size: 1.28rem;
        font-weight: 800;
        line-height: 1.12;
        letter-spacing: -0.03em;
        max-width: none;
    }

    .cm-hero__lead {
        margin-bottom: 0;
        font-size: 13px;
        line-height: 1.45;
        color: var(--cm-text2);
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* На мобиле — только sticky-бар, без дубля кнопок */
    .cm-hero__actions--top,
    .cm-hero__note,
    .cm-hero__panel-kicker,
    .cm-cta--bottom {
        display: none !important;
    }

    .cm-hero__panel {
        padding: 0;
        border: 0;
        background: transparent;
        gap: 0;
    }

    .cm-stats--bento {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .cm-stat--tall {
        grid-row: auto;
    }

    .cm-stat {
        padding: 8px 4px 9px;
        border-radius: 10px;
        text-align: center;
    }

    .cm-stat__icon {
        display: none;
    }

    .cm-stat__value {
        font-size: 17px;
        font-weight: 800;
        line-height: 1.1;
    }

    .cm-stat__label {
        margin-top: 2px;
        font-size: 9px;
        letter-spacing: 0.03em;
        line-height: 1.2;
    }

    /* Быстрые ссылки — горизонтальный скролл */
    .cm-benefits {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        margin-bottom: 14px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }

    .cm-benefits::-webkit-scrollbar {
        display: none;
    }

    .cm-benefit {
        flex: 0 0 auto;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        min-height: 40px;
        padding: 8px 12px;
        border-radius: 10px;
    }

    .cm-benefit:hover {
        transform: none;
        box-shadow: none;
    }

    .cm-benefit__icon {
        width: 28px;
        height: 28px;
        margin-bottom: 0;
        font-size: 12px;
        border-radius: 8px;
        flex-shrink: 0;
    }

    .cm-benefit__title {
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
    }

    .cm-benefit__desc {
        display: none;
    }

    .cm-section {
        margin-bottom: 16px;
    }

    .cm-section__head {
        margin-bottom: 8px;
    }

    .cm-section__title {
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 2px;
    }

    .cm-section__sub {
        font-size: 12px;
        line-height: 1.4;
    }

    .cm-seo-intro__inner {
        padding: 12px 12px 10px;
        border-radius: 12px;
    }

    .cm-seo-intro__title {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .cm-seo-intro__text {
        font-size: 12px;
        line-height: 1.45;
        margin-bottom: 6px;
    }

    .cm-seo-more {
        margin-top: 4px;
    }

    .cm-seo-more > summary {
        font-size: 12px;
        font-weight: 600;
        color: var(--cm-accent);
        cursor: pointer;
        list-style: none;
        padding: 4px 0;
    }

    .cm-seo-more > summary::-webkit-details-marker {
        display: none;
    }

    .cm-seo-tags {
        gap: 5px;
        margin-top: 8px;
    }

    .cm-seo-tags__item {
        padding: 4px 8px;
        font-size: 10px;
    }

    /* Карточки мессенджеров — компактная строка */
    .cm-messenger-grid {
        gap: 8px;
    }

    .cm-messenger-card {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        border-radius: 12px;
        box-shadow: none;
    }

    .cm-messenger-card:hover {
        transform: none;
        box-shadow: none;
    }

    .cm-messenger-card__icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
        border-radius: 10px;
        flex-shrink: 0;
        box-shadow: none;
    }

    .cm-messenger-card__body {
        flex: 1;
        min-width: 0;
    }

    .cm-messenger-card__title {
        margin: 0 0 2px;
        font-size: 13px;
        font-weight: 700;
        line-height: 1.25;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        white-space: normal;
        text-overflow: unset;
    }

    .cm-messenger-card__desc {
        display: none;
    }

    .cm-messenger-card__meta {
        margin: 0;
        font-size: 10px;
        line-height: 1.3;
    }

    .cm-messenger-card__cta {
        margin-top: 0;
        flex-shrink: 0;
        min-height: 36px;
        min-width: 36px;
        padding: 0 10px;
        font-size: 13px;
        border-radius: 10px;
    }

    .cm-messenger-card__cta-label {
        display: none;
    }

    .cm-messenger-card__cta i {
        font-size: 14px;
        margin: 0;
    }

    .cm-messenger-card--wa .cm-messenger-card__cta,
    .cm-messenger-card--tg .cm-messenger-card__cta {
        color: inherit;
    }

    /* Группы — плотный список */
    .cm-groups-grid {
        gap: 6px;
    }

    .cm-group-card {
        gap: 10px;
        padding: 10px 11px;
        border-radius: 10px;
    }

    .cm-group-card:hover {
        transform: none;
    }

    .cm-group-card__icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
        border-radius: 8px;
    }

    .cm-group-card__title {
        font-size: 13px;
        margin-bottom: 2px;
    }

    .cm-group-card__desc {
        font-size: 11px;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .cm-card {
        padding: 12px;
        border-radius: 12px;
    }

    .cm-card:hover {
        transform: none;
    }

    .cm-review__avatar {
        width: 40px;
        height: 40px;
    }

    .cm-review__name {
        font-size: 14px;
    }

    .cm-review__text {
        margin-top: 10px;
        font-size: 13px;
    }

    .cm-job__title {
        font-size: 14px;
    }

    .cm-job__salary {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .cm-news__title {
        font-size: 15px;
    }

    .cm-news__excerpt {
        font-size: 13px;
        margin-top: 8px;
    }

    .cm-gallery-block .cm-gallery {
        column-width: 140px;
        column-gap: 8px;
    }

    .cm-gallery__item {
        margin-bottom: 8px;
        border-radius: 10px;
    }

    .cm-map-iframe {
        height: 200px;
        min-height: 200px;
    }

    .cm-map-section__foot {
        margin-top: 8px;
        gap: 6px;
    }

    .cm-link-btn {
        padding: 8px 12px;
        font-size: 12px;
        min-height: 40px;
        border-radius: 10px;
    }

    .cm-section__foot {
        margin-top: 10px;
    }

    .cm-faq-item__q {
        padding: 10px 12px;
        font-size: 13px;
        min-height: 40px;
    }

    .cm-faq-item__a {
        padding: 0 12px 10px 36px;
        font-size: 12px;
    }

    .cm-empty {
        padding: 12px;
        font-size: 13px;
    }

    /* Sticky — тоньше и ровнее */
    .cm-sticky-join {
        left: 10px;
        right: 10px;
        bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        gap: 6px;
        padding: 6px;
        border-radius: 12px;
    }

    .cm-sticky-join__btn {
        min-height: 42px;
        font-size: 13px;
        border-radius: 10px;
        gap: 6px;
    }

    .cm-fade {
        transform: translateY(8px);
    }

    body.community-body .custom-header + .cm-page,
    body.community-body .cm-page {
        padding-top: 4px;
    }
}

/* На десктопе SEO «подробнее» всегда раскрыто */
@media (min-width: 768px) {
    .cm-seo-more > summary {
        display: none;
    }

    .cm-seo-more .cm-seo-intro__text,
    .cm-seo-more .cm-seo-tags {
        display: block;
    }
}
