/* Скрыть второй H1 из шаблона Bitrix, когда на странице есть hub пилота */
body:has(.events-pilot-c) .page__title,
body:has(.events-pilot-c) h1.page__title,
body:has(.events-pilot-c) .content-header h1:not(.events-pilot-c__h1) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.events-pilot-c {
    margin: 0 0 20px;
}

.events-pilot-c__h1 {
    margin: 0 0 10px;
    font-size: clamp(1.25rem, 2.5vw, 1.65rem);
    line-height: 1.25;
}

.events-pilot-c__lead,
.events-pilot-c__text,
.events-pilot-c__filter-note {
    margin: 0 0 12px;
    line-height: 1.45;
}

.events-pilot-c__links {
    margin: 0 0 16px;
    font-size: 0.92rem;
}

.events-pilot-c__search {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    align-items: flex-end;
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f8f9fb;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.events-pilot-c__search-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: min(100%, 200px);
    flex: 1 1 180px;
}

.events-pilot-c__search-label {
    font-size: 0.82rem;
    color: #5a6270;
}

.events-pilot-c__search input[type="search"],
.events-pilot-c__search select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d5dae2;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
}

.events-pilot-c__search-submit {
    flex: 0 0 auto;
    margin-bottom: 1px;
}

.events-pilot-c__sub {
    margin: 18px 0 8px;
    font-size: 1.05rem;
}

.events-pilot-c__upcoming-panel {
    margin: 0 0 20px;
    padding: 14px 14px 12px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff6e8 0%, #e8f4ff 52%, #f3e8ff 100%);
    border: 1px solid rgba(42, 91, 168, 0.22);
    box-shadow: 0 8px 24px rgba(42, 91, 168, 0.12);
}

.events-pilot-c__upcoming-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 10px;
}

.events-pilot-c__sub--upcoming {
    margin: 0;
    font-size: 1.12rem;
    color: #1a3d6b;
}

.events-pilot-c__upcoming-total {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #0d2f5c;
    background: linear-gradient(90deg, #ffe566 0%, #ffd24d 100%);
    box-shadow: 0 2px 8px rgba(255, 210, 77, 0.45);
}

.events-pilot-c__upcoming {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.events-pilot-c__upcoming-item a {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 14px 12px 16px;
    border-radius: 14px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(26, 61, 107, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.events-pilot-c__upcoming-item a:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(26, 61, 107, 0.14);
}

.events-pilot-c__upcoming-item--tone-1 a {
    border-left: 4px solid #2a5ba8;
}

.events-pilot-c__upcoming-item--tone-2 a {
    border-left: 4px solid #e07b4b;
}

.events-pilot-c__upcoming-item--tone-3 a {
    border-left: 4px solid #5bb56a;
}

.events-pilot-c__upcoming-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #2a5ba8;
}

.events-pilot-c__upcoming-title {
    font-weight: 600;
    color: #2d2d2d;
    line-height: 1.35;
}

.events-pilot-c__upcoming-meta {
    font-size: 0.88rem;
    color: #4a5568;
}

.events-pilot-c__upcoming-more {
    margin: 12px 0 0;
    font-size: 0.9rem;
    text-align: center;
}

.events-pilot-c__upcoming-more a {
    font-weight: 600;
    color: #2a5ba8;
}

.events-pilot-c__nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin: 0 0 12px;
}

.events-pilot-c__nav-section {
    padding: 8px 10px 10px;
    border-radius: 10px;
    border: 1px solid rgba(45, 45, 45, 0.1);
    background: rgba(248, 249, 251, 0.85);
}

.events-pilot-c__nav-section--wide {
    grid-column: 1 / -1;
}

.events-pilot-c__nav-title {
    margin: 0 0 6px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
    color: #5a6270;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.events-pilot-c__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.events-pilot-c__chips--dense {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 6px;
    margin: 0;
    align-items: flex-start;
}

.events-pilot-c__chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(45, 45, 45, 0.18);
    text-decoration: none;
    font-size: 0.9rem;
}

.events-pilot-c__chip--dense {
    min-height: 0;
    padding: 5px 9px;
    border-radius: 8px;
    font-size: 0.8125rem;
    line-height: 1.25;
    max-width: 100%;
}

@media (min-width: 600px) {
    .events-pilot-c__nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .events-pilot-c__nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .events-pilot-c__nav-section--wide {
        grid-column: 1 / -1;
    }

    .events-pilot-c__chips--dense {
        gap: 6px 8px;
    }

    .events-pilot-c__chip--dense {
        padding: 4px 10px;
        font-size: 0.8rem;
    }
}

.events-pilot-c__chip--sparse {
    border-style: dashed;
    opacity: 0.92;
}

.events-pilot-c__faq {
    margin: 0 0 8px;
}

.events-pilot-c__faq dt {
    font-weight: 600;
    margin-top: 12px;
}

.events-pilot-c__faq dd {
    margin: 4px 0 0;
}

.event-detail-page__sub {
    font-size: 1.1rem;
    margin: 18px 0 8px;
    font-weight: 600;
}

.event-detail-page__status {
    display: inline-block;
    margin: 0 0 8px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    background: #f4f1ea;
}

.event-detail-page__status--done {
    background: #ececec;
}

.event-card__status {
    display: inline-block;
    margin: 0 0 6px;
    font-size: 0.82rem;
    color: #666;
}

@media (max-width: 430px) {
    .events-pilot-c__chip:not(.events-pilot-c__chip--dense) {
        min-height: 38px;
    }

    .events-pilot-c__nav-section {
        padding: 7px 8px 9px;
    }
}