/* Metsa Events — frontpage kalender promo box (slideshow + heading + text).
 * Sand background, dark forest text. Whole box is one link.
 */

.mev-cal-promo {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--m-sand-80-t, #F2EEE9);
    color: var(--m-forest, #173132);
    font-family: Raleway, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow: hidden;
}

.mev-cal-promo .calendar-box-link {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    text-decoration: none;
    color: inherit;
}

/* Slides ------------------------------------------------------------- */
.mev-cal-promo .calendar-slides {
    position: relative;
    background: var(--m-forest, #173132);
    overflow: hidden;
    flex: none;
    min-height: 0;
    height: var(--hero-img-h, clamp(240px, calc(100vh - 420px), 540px));
    max-height: var(--hero-img-h, clamp(240px, calc(100vh - 420px), 540px));
    width: 100%;
}
.mev-cal-promo .calendar-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 500ms ease, visibility 0ms linear 500ms;
}
.mev-cal-promo .calendar-slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 500ms ease, visibility 0ms linear 0ms;
}
.mev-cal-promo .calendar-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* CTA block ---------------------------------------------------------- */
.mev-cal-promo .calendar-cta-block {
    padding: 33px 0 0 0;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
}
.mev-cal-promo .calendar-cta-heading {
    font-family: inherit;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    text-align: left;
    color: var(--m-forest, #173132);
    margin: 0 0 18px 0;
}
.mev-cal-promo .calendar-cta-heading .heading-underline {
    position: relative;
    display: inline-block;
    padding-bottom: 4px;
}
.mev-cal-promo .calendar-cta-heading .heading-underline::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background-color: var(--m-forest, #173132);
    transition: width 0.3s ease;
}
.mev-cal-promo .calendar-box-link:hover .heading-underline::after,
.mev-cal-promo .calendar-box-link:focus-visible .heading-underline::after {
    width: 100%;
}

.mev-cal-promo .calendar-cta-text {
    font-size: 14px;
    line-height: 1.65;
    letter-spacing: 0.04em;
    color: var(--m-forest-80-t, #455A5B);
    margin: 0;
    max-width: 320px;
}

/* When no images configured, the box collapses to just the CTA block. */
.mev-cal-promo--no-slides .calendar-cta-block {
    padding-top: 32px;
}

@media (prefers-reduced-motion: reduce) {
    .mev-cal-promo .calendar-slide,
    .mev-cal-promo .calendar-slide.is-active {
        transition: none;
    }
}

@media (max-width: 900px) {
    /* Stacked layout: image on top, heading + text below. */
    .mev-cal-promo .calendar-box-link {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
    }
    .mev-cal-promo .calendar-slides {
        flex: 0 0 auto;
        aspect-ratio: 3 / 4;
        width: 100%;
        min-height: 0;
        height: auto;
        max-height: none;
    }
    .mev-cal-promo .calendar-cta-block {
        flex: 0 0 auto;
        padding: 0;
    }
    .mev-cal-promo .calendar-cta-text {
        max-width: none;
    }
}
