/* =========================================================================
   Norxe Events – filter tabs, event cards, header banner
   ========================================================================= */

/* ---- Filter tabs (pill style) ---- */

.norxe-events__filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
}

.norxe-events__filter-btn {
    background: transparent;
    color: #333;
    border: 0;
    border-radius: 999px;
    padding: 7px 18px;
    margin: 0;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
    text-transform: none;
    box-shadow: none;
    min-height: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.norxe-events__filter-btn:hover {
    background: #eef0f2;
    color: #111;
    box-shadow: none;
}

.norxe-events__filter-btn.is-active {
    background: #1d3040;
    color: #fff;
}

/* ---- Grid / filtering states ---- */

.norxe-events__grid.row {
    margin-left: 0;
    margin-right: 0;
}

.norxe-event-card.is-filtered-out {
    display: none;
}

.norxe-events__empty {
    text-align: center;
    opacity: 0.7;
    padding: 20px 0;
}

/* ---- Event card ---- */

.norxe-event-card .col-inner {
    height: 100%;
}

.norxe-event-card__box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(16, 36, 50, 0.08);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.norxe-event-card__box:hover {
    box-shadow: 0 10px 28px rgba(16, 36, 50, 0.14);
    transform: translateY(-2px);
}

.norxe-event-card__image {
    overflow: hidden;
}

.norxe-event-card__image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.norxe-event-card__box:hover .norxe-event-card__image img {
    transform: scale(1.04);
}

.norxe-event-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left;
}

.norxe-event-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.norxe-event-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef0f2;
    color: #1d3040;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 0.8em;
    font-weight: 500;
    line-height: 1.3;
}

.norxe-event-pill svg {
    flex-shrink: 0;
}

.norxe-event-card__title {
    margin-bottom: 10px;
}

.norxe-event-card__excerpt {
    font-size: 0.9em;
    opacity: 0.8;
    margin-bottom: 16px;
}

/* Scoped under the card box so this beats Flatsome's `.box a { display: inline-block }`,
   which otherwise overrides the flex display and leaves the arrow sitting above the
   text baseline instead of centred beside it. */
.norxe-event-card__box .norxe-event-card__readmore {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    font-weight: 700;
    font-size: 0.9em;
    line-height: 1.4;
    color: #1d3040;
    margin-top: auto;
}

.norxe-event-card__readmore svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.norxe-event-card__readmore:hover svg {
    transform: translateX(3px);
}

/* ---- Header banner (grey bar) ---- */

.norxe-event-banner {
    background: #ececec;
}

/* In the header: one shade of grey (row matches the banner) and the banner
   stretched to the theme container width so it lines up with the hero/page
   content below. */
.header-bottom:has(.norxe-event-banner) {
    background-color: #ececec;
}

.header-bottom:has(.norxe-event-banner) .flex-center {
    flex: 1 1 auto;
}

.header-bottom .norxe-event-banner {
    width: 100%;
}

.header-bottom .norxe-event-banner__inner {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

.norxe-event-banner__inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Text-style Flatsome countdown ("0 hours 0 min 0 sec").
   The timer is rendered with size="100" so it inherits this wrapper size
   (the shortcode outputs an #id font-size rule that outranks classes). */
.norxe-event-banner__countdown {
    /* Reserved column: wide enough for the worst case ("365 days 23 hours
       59 min 59 sec") so the text to its right never shifts as digits tick. */
    flex: 0 0 450px;
    font-size: 1.5em;
    font-weight: 700;
    color: #1d3040;
    line-height: 1.2;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Clock-style fallback: keep the table timer contained */
.norxe-event-banner__countdown .ux-timer {
    margin: 0;
    width: auto;
    max-width: 100%;
    font-size: 220%;
}

.norxe-event-banner__details {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.norxe-event-banner__text {
    text-align: right;
    min-width: 0;
}

.norxe-event-banner__title {
    display: block;
    font-weight: 700;
    font-size: 1.15em;
    line-height: 1.3;
    color: #1d3040;
}

.norxe-event-banner__meta {
    font-size: 0.9em;
    opacity: 0.8;
}

.norxe-event-banner__sep {
    margin: 0 4px;
}

.norxe-event-banner__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.85em;
    color: #1d3040;
    margin-top: 4px;
}

.norxe-event-banner__image {
    flex-shrink: 0;
}

.norxe-event-banner__image img {
    display: block;
    height: 80px;
    width: auto;
    border-radius: 4px;
}

@media only screen and (max-width: 849px) {
    .norxe-event-banner__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .norxe-event-banner__countdown {
        flex: 0 0 auto;
        max-width: 100%;
        font-size: 1.1em;
        white-space: normal;
    }

    .norxe-event-banner__details {
        width: 100%;
        justify-content: space-between;
    }

    .norxe-event-banner__text {
        text-align: left;
    }

    .norxe-event-banner__image img {
        height: 60px;
    }
}

/* Collapse Flatsome's header-bottom row when the banner has no event to show
   (the shortcode outputs only the --empty marker). */
.header-bottom:has(.norxe-event-banner--empty):not(:has(.norxe-event-banner)) {
    display: none;
}
