/**
 * Abakan Online — event-card specifics inside the shared .ao-home-tabs shell.
 */

.ao-home-events {
    --ao-events-text: #182033;
    --ao-events-muted: #687086;
    --ao-events-line: #e6eaf2;
    --ao-events-blue: #2757d7;
    --ao-events-blue-soft: #eaf0ff;
    --ao-events-orange: #f0784a;
    --ao-events-surface: #ffffff;
}

.ao-home-events__title {
    margin: 0;
    color: var(--ao-events-text);
    font-size: 28px;
    font-weight: 500;
    line-height: 1.2;
}

.ao-home-events > .ao-home-tabs__nav {
    margin-bottom: 18px;
}

.ao-home-events__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ao-home-events__card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--ao-events-line);
    border-radius: 16px;
    background: var(--ao-events-surface);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.ao-home-events__card:hover {
    border-color: #d4dceb;
    box-shadow: 0 8px 22px rgba(31, 48, 86, .07);
    transform: translateY(-1px);
}

.ao-home-events__card-link {
    display: grid;
    min-width: 0;
    min-height: 100px;
    grid-template-columns: 150px 62px minmax(0, 1fr) 24px;
    align-items: stretch;
    color: inherit;
    text-decoration: none;
}

.ao-home-events__card-link:hover,
.ao-home-events__card-link:focus-visible {
    color: inherit;
    text-decoration: none;
}

.ao-home-events__card-link:focus-visible {
    outline: 3px solid rgba(39, 87, 215, .2);
    outline-offset: -3px;
}

.ao-home-events__media {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    align-self: center;
    overflow: hidden;
    background: var(--ao-events-blue-soft);
}

.ao-home-events__image {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    object-position: center;
}

.ao-home-events__placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: var(--ao-events-blue);
    background: linear-gradient(135deg, var(--ao-events-blue-soft), #f6f8ff);
}

.ao-home-events__placeholder svg {
    width: 34px;
    height: 34px;
}

.ao-home-events__date {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    align-self: stretch;
    background: var(--ao-events-blue-soft);
    color: var(--ao-events-blue);
    line-height: 1;
}

.ao-home-events__date strong {
    font-size: 23px;
    font-weight: 700;
}

.ao-home-events__date span {
    margin-top: 5px;
    color: var(--ao-events-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.ao-home-events__body {
    display: flex;
    min-width: 0;
    padding: 12px 10px 12px 16px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.ao-home-events__meta {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    color: var(--ao-events-orange);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.ao-home-events__meta span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.ao-home-events__card-title {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ao-events-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ao-home-events__venue {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 5px;
    color: var(--ao-events-muted);
    font-size: 12.5px;
    line-height: 1.35;
}

.ao-home-events__venue svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
}

.ao-home-events__venue span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ao-home-events__arrow {
    display: grid;
    align-self: stretch;
    place-items: center;
    color: #8a94a8;
}

.ao-home-events__arrow svg {
    width: 18px;
    height: 18px;
}

.ao-home-events__empty {
    margin: 0;
    padding: 20px;
    border: 1px solid var(--ao-events-line);
    border-radius: 14px;
    color: var(--ao-events-muted);
    background: var(--ao-events-surface);
    text-align: center;
}

@media (max-width: 991.98px) {
    .ao-home-events__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .ao-home-events__title {
        font-size: 20px;
        letter-spacing: -.025em;
    }

    .ao-home-events > .ao-home-tabs__nav {
        margin-bottom: 10px;
    }

    .ao-home-events__card {
        border-radius: 14px;
    }

    .ao-home-events__card-link {
        min-height: 88px;
        grid-template-columns: 108px 48px minmax(0, 1fr) 22px;
    }

    .ao-home-events__body {
        padding: 10px 7px 10px 10px;
        gap: 4px;
    }

    .ao-home-events__date strong {
        font-size: 19px;
    }

    .ao-home-events__date span,
    .ao-home-events__meta,
    .ao-home-events__venue {
        font-size: 11px;
    }

    .ao-home-events__card-title {
        font-size: 14px;
    }

    .ao-home-events__venue svg {
        width: 13px;
        height: 13px;
        flex-basis: 13px;
    }

    .ao-home-events__arrow svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 374.98px) {
    .ao-home-events__card-link {
        grid-template-columns: 92px 44px minmax(0, 1fr) 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ao-home-events__card {
        transition: none;
    }
}
