/* =============================================
   Featured Events Section
   – Image-left / text-right carousel with year tabs
   – Uses theme color scheme variables
   ============================================= */

.featured-events *,
.featured-events *::before,
.featured-events *::after {
    box-sizing: border-box;
}

/* Section wrapper */
.featured-events {
    position: relative;
    display: block;
    width: 100%;
    background-color: rgb(var(--color-background));
    color: rgb(var(--color-text));
    overflow: hidden;
}

.featured-events__wrapper {
    position: relative;
    width: 100%;
    max-width: var(--fe-max-width, 1400px);
    margin: 0 auto;
    padding: var(--fe-padding-block, 60px) var(--fe-padding-inline, 40px);
}

/* ---- Slides ---- */
.featured-events__slides {
    position: relative;
    width: 100%;
    min-height: 420px;
}

.featured-events__slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    z-index: 0;
}

.featured-events__slide.is-active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

/* ---- Image (left column) ---- */
.featured-events__image-wrapper {
    flex: 0 0 45%;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.featured-events__image-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-events__image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 400px;
    background-color: rgb(var(--color-entry-line));
    opacity: 0.3;
}

/* ---- Content (right column) ---- */
.featured-events__content {
    flex: 1 1 55%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}

/* The bordered box inside the content area */
.featured-events__content-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px 60px;
    border: var(--fe-border-width, 2px) solid rgb(var(--color-text));
    border-radius: var(--fe-border-radius, 4px);
}

/* ---- Subtitle ---- */
.featured-events__subtitle {
    display: block;
    font-family: var(--font-body-family, sans-serif);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgb(var(--color-text));
    margin-bottom: 12px;
}

/* ---- Title ---- */
.featured-events__title {
    font-family: var(--font-heading-family, 'Permanent Marker', cursive);
    font-weight: var(--font-heading-weight, 400);
    font-size: var(--fe-title-size, 52px);
    line-height: var(--fe-title-line-height, 1.1);
    color: rgb(var(--color-text));
    margin: 0 0 24px 0;
    word-break: normal;
    overflow-wrap: break-word;
}

/* ---- Description ---- */
.featured-events__description {
    font-family: var(--font-body-family, sans-serif);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.65;
    color: rgb(var(--color-text));
    margin: 0;
    max-width: 480px;
}

/* ---- Year Tabs ---- */
.featured-events__tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding-top: 36px;
}

.featured-events__tab {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body-family, sans-serif);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.08em;
    color: rgb(var(--color-text));
    padding: 8px 4px;
    opacity: 0.45;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.featured-events__tab:hover {
    opacity: 0.75;
}

.featured-events__tab.is-active {
    opacity: 1;
    transform: scale(1.05);
}

.featured-events__tab.is-active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background-color: rgb(var(--color-text));
    border-radius: 1px;
}

/* =============================================
   Mobile (<= 959px)
   ============================================= */
@media (max-width: 959px) {
    .featured-events__wrapper {
        padding: 32px 16px;
    }

    .featured-events__slides {
        min-height: auto;
    }

    .featured-events__slide {
        flex-direction: column;
    }

    .featured-events__slide.is-active {
        position: relative;
    }

    .featured-events__image-wrapper {
        flex: 0 0 auto;
        width: 100%;
        min-height: 260px;
        max-height: 340px;
    }

    .featured-events__content {
        padding: 16px 0 0 0;
    }

    .featured-events__content-inner {
        padding: 28px 24px;
    }

    .featured-events__title {
        font-size: var(--fe-title-mobile-size, 32px);
    }

    .featured-events__subtitle {
        font-size: 11px;
    }

    .featured-events__description {
        font-size: 14px;
    }

    .featured-events__tabs {
        gap: 20px;
        padding-top: 24px;
    }

    .featured-events__tab {
        font-size: 15px;
    }
}