/* Abakan Online — event cards. Event cards are independent from organization cards. */

[data-event-section-page] .ao-section-company-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

[data-event-section-page] .ao-section-company-grid > .blog-item {
    min-width: 0;
    margin: 0;
}

.ao-event-card {
    height: 100%;
    overflow: hidden;
    border: 1px solid #e2e7f0;
    border-radius: 18px;
    background: #fff;
}

.ao-event-card__link {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    min-height: 142px;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.ao-event-card__link:hover,
.ao-event-card__link:focus-visible {
    color: inherit;
    text-decoration: none;
}

.ao-event-card__link:focus-visible {
    outline: 3px solid rgba(39, 87, 215, .18);
    outline-offset: -3px;
}

.ao-event-card__media {
    min-width: 0;
    overflow: hidden;
    background: #f3f6fb;
}

.ao-event-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 142px;
    object-fit: cover;
}

.ao-event-card__body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 14px 16px;
}

.ao-event-card__category {
    margin-bottom: 3px;
    color: #768197;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.25;
}

.ao-event-card__title {
    margin: 0;
    color: var(--ao-text, #111b2f);
    font-size: 18px;
    font-weight: 750;
    line-height: 1.22;
}

.ao-event-card__date {
    margin-top: 9px;
    color: var(--ao-accent, #2f61ff);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.3;
}

.ao-event-card__place {
    margin-top: 5px;
    overflow: hidden;
    color: #5f6b80;
    font-size: 13px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ao-event-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: auto;
    padding-top: 10px;
}

.ao-event-card__meta span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f1f5ff;
    color: #315ed8;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

@media (max-width: 767.98px) {
    [data-event-section-page] .ao-section-company-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .ao-event-card__link {
        grid-template-columns: 112px minmax(0, 1fr);
        min-height: 118px;
    }

    .ao-event-card__media img {
        min-height: 118px;
    }

    .ao-event-card__body {
        padding: 11px 12px;
    }

    .ao-event-card__title {
        font-size: 16px;
    }

    .ao-event-card__date {
        margin-top: 6px;
        font-size: 13px;
    }
}

.ao-event-card--no-image .ao-event-card__link {
    grid-template-columns: minmax(0, 1fr);
}

.ao-event-card--no-image .ao-event-card__body {
    grid-column: 1 / -1;
}

/* Map interaction: the card surface selects the marker; image/title open the event page. */
[data-event-map-workspace] .ao-event-card {
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

[data-event-map-workspace] .ao-event-card:hover,
[data-event-map-workspace] .ao-event-card:focus-within,
[data-event-map-workspace] .ao-event-card.is-map-active {
    border-color: #cbd8fb;
    box-shadow: 0 10px 24px rgba(39, 87, 215, .09);
}

.ao-event-card__media-link {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.ao-event-card__title-link {
    position: relative;
    z-index: 2;
    color: inherit;
    text-decoration: none;
}

.ao-event-card__title-link:hover,
.ao-event-card__title-link:focus-visible,
.ao-event-card__media-link:hover,
.ao-event-card__media-link:focus-visible {
    color: inherit;
    text-decoration: none;
}

.ao-event-card__title-link:focus-visible,
.ao-event-card__media-link:focus-visible {
    outline: 3px solid rgba(39, 87, 215, .18);
    outline-offset: 2px;
}


/* Shared heart control: the same button/SVG as the organization card. */
.ao-event-card { position: relative; }
.ao-event-card .ao-company-card__favorite,
.ao-event-article .ao-company-card__favorite {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 5px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #78879d;
    cursor: pointer;
}
.ao-event-card .ao-company-card__favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
}
.ao-event-card > .ao-company-card__favorite + .ao-event-card__link .ao-event-card__body {
    padding-right: 52px;
}
.ao-event-article__topline .ao-company-card__favorite {
    position: static;
    flex: 0 0 36px;
    margin-left: auto;
}
.ao-event-card .ao-company-card__favorite svg,
.ao-event-article .ao-company-card__favorite svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}
.ao-event-card .ao-company-card__favorite.is-active,
.ao-event-article .ao-company-card__favorite.is-active { color: #f04444; }
.ao-event-card .ao-company-card__favorite.is-active svg,
.ao-event-article .ao-company-card__favorite.is-active svg { fill: currentColor; }
.ao-event-card .ao-company-card__favorite:focus-visible,
.ao-event-article .ao-company-card__favorite:focus-visible {
    outline: 3px solid rgba(39, 87, 215, .25);
    outline-offset: 2px;
}
