/**
 * Events section component
 *
 * @package MBM_Theme
 * @since 1.0.0
 */

.events {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(3.5rem, 6vw, 5.5rem) 0;
}

.events__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.events__bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--events-bg-image);
    background-position: 6% center;
    background-size: auto min(118%, 920px);
    background-repeat: no-repeat;
    opacity: 0.55;
    z-index: 0;
}

.events__bg-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    background: linear-gradient(
        90deg,
        rgba(248, 248, 255, 0) 0%,
        rgba(248, 248, 255, 0.55) 34%,
        rgba(248, 248, 255, 0.88) 58%,
        rgba(248, 248, 255, 0.96) 100%
    );
    pointer-events: none;
}

.events .container {
    position: relative;
    z-index: 1;
}

.events__inner {
    width: 100%;
    max-width: min(920px, 100%);
    margin-left: auto;
    margin-right: clamp(2rem, 14vw, 10rem);
    padding-left: clamp(0.5rem, 3vw, 2.5rem);
}

.events__title {
    margin: 0 0 clamp(1.75rem, 3vw, 2.5rem);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: clamp(1.65rem, 2.4vw, 2rem);
    line-height: 1.1;
    color: var(--la-blue-dark, #080851);
}

.events__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(2.75rem, 5vw, 4.5rem);
}

.events__item {
    display: grid;
    grid-template-columns: minmax(200px, 38%) minmax(0, 1fr) auto;
    gap: clamp(1rem, 2.2vw, 1.75rem);
    align-items: center;
}

.events__thumb {
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(8, 8, 81, 0.06);
    align-self: start;
}

.events__thumb--empty {
    min-height: 120px;
    aspect-ratio: 16 / 9;
}

.events__thumb img,
.events__thumb picture,
.events__thumb picture img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    vertical-align: middle;
}

.events .la-btn__fa-icon {
    position: relative;
    z-index: 1;
    font-size: 1.05rem;
    line-height: 1;
    width: 1.1em;
    text-align: center;
}

.events__body {
    min-width: 0;
}

.events__name {
    margin: 0 0 0.35rem;
    font-size: clamp(1.05rem, 1.35vw, 1.2rem);
    font-weight: 700;
    color: var(--la-blue-dark, #080851);
}

.events__dates {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--la-blue-dark, #080851);
}

.events__location {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--la-blue-dark, #080851);
}

.events__action {
    flex-shrink: 0;
}

.events__footer-cta {
    margin-top: clamp(2rem, 4vw, 2.75rem);
}

/* Template: Events (calendar page) — CTA below widget */
.site-main--events .events-page__schedule-footer {
    margin-top: clamp(2rem, 4vw, 2.75rem);
    padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

@media (max-width: 767.98px) {
    .events__inner {
        max-width: 100%;
        margin-left: 0;
        padding-left: 0;
    }

    .events__bg::before {
        opacity: 0.35;
        background-position: center;
        background-size: cover;
    }

    .events__bg-scrim {
        background: linear-gradient(
            180deg,
            rgba(248, 248, 255, 0.1) 0%,
            rgba(248, 248, 255, 0.92) 45%,
            rgba(248, 248, 255, 0.98) 100%
        );
    }

    .events__item {
        display: flex;
        flex-direction: column;
    }

    .events__thumb {
        grid-row: span 2;
        align-self: start;
    }

    .events__body {
        grid-column: 2;
    }

    .events__action {
        grid-column: 2;
        justify-self: start;
    }

    .events__footer-cta {
        margin: 0 auto;
        margin-top: 4rem;
        width: fit-content;
    }
}
