/* Module Container */
.tb-events-module {
    font-family: 'IBM Plex Sans', sans-serif;
}

/* -------------------------------------------------------------------------- */
/* Featured Event */
/* -------------------------------------------------------------------------- */
.tb-events-featured {
    display: flex;
    background-color: #FFFEFC;
    border: 1px solid #D8D1C1;
    border-radius: 12px;
    overflow: hidden;
    padding: 24px;
    padding-right: 80px;
    gap: 60px;
    align-items: center;
}

/* Left Side - Image */
.tb-events-featured-image {
    flex: 1 0 0;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    align-self: stretch;
}

/* Right Side - Content */
.tb-events-featured-content {
    flex: 1 0 0;
    padding: 36px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 36px;
}

/* Featured Wrapper (contains featured card + bottom border separator) */
.tb-events-featured-wrapper {
    padding: 0;
    border-bottom: 1px solid #F0F0F0;
}

/* Typography & Elements */
.tb-events-date {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.48px;
    color: #07121C;
}

.tb-events-title {
    font-family: 'Mongoose', sans-serif;
    font-weight: 700;
    /* Bold */
    font-size: 80px;
    line-height: 0.8;
    text-transform: uppercase;
    color: #000005;
    /* Black */
    margin: 0;
}

.tb-events-description,
.tb-events-timeframe {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    /* Regular */
    font-size: 19px;
    line-height: 1.45;
    color: #07121C;
}

.tb-events-featured-info {
    display: flex;
    flex-direction: column;
    gap: 36px;
    width: 100%;
}

.tb-events-featured-title-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: black;
}

.tb-events-buttons {
    display: flex;
    gap: 12px;
}

/* Featured & Filter buttons use theme .btn classes */

/* -------------------------------------------------------------------------- */
/* Grid Section Wrapper (beige background) */
/* -------------------------------------------------------------------------- */
.tb-events-grid-section {
    background-color: #F6F3EC;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    margin-top: 80px;
}

/* -------------------------------------------------------------------------- */
/* Filter Bar */
/* -------------------------------------------------------------------------- */
.tb-events-filters {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
}

.tb-events-filter-label {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 19px;
    color: #000005;
    white-space: nowrap;
}

.tb-events-filter-buttons {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    justify-content: center;
}

.tb-events-filter-btn {
    cursor: pointer;
}

/* -------------------------------------------------------------------------- */
/* Grid Layout */
/* -------------------------------------------------------------------------- */
.tb-events-grid {
    display: grid;
    gap: 80px 24px;
    width: 100%;
}

/* Column Variants */
.tb-events-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.tb-events-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.tb-events-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Card Element */
.tb-events-card {
    background-color: #FFFEFC;
    border: 1px solid #D8D1C1;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    height: 432px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.tb-events-card:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: -3px 3px 0 0 var(--color-neutral-900);
}

.tb-events-card:hover .tb-events-card-title,
.tb-events-card:hover .tb-events-date,
.tb-events-card:hover .tb-events-timeframe {
    color: #07121C;
    /* Ensure text stays dark on yellow */
}

/* Inner Button Style on Hover */
.tb-events-card:hover .btn {
    background-color: #000005 !important;
    color: #FFFFFF !important;
    border-color: #000005 !important;
    box-shadow: none !important;
}

.tb-events-card-content {
    padding: 36px 30px;
    display: flex;
    flex-direction: column;
    height: 100%;
    align-items: flex-start;
    /* Align content left */
}

.tb-events-card .tb-events-date {
    margin-bottom: 18px;
}

.tb-events-card-title {
    font-family: 'Mongoose', sans-serif;
    font-weight: 500;
    /* Medium */
    font-size: 50px;
    line-height: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #07121C;
    margin: 0 0 10px 0;
}

.tb-events-card .tb-events-timeframe {
    margin-bottom: 24px;
}

.tb-events-spacer {
    flex-grow: 1;
    min-height: auto;
}

/* Card Button (Targeting the theme classes or fallback) */
.tb-events-card .btn {
    /* Ensure it behaves like a block/inline-block inside flex */
    max-width: 100%;
}

/* Deprecated old .tb-btn-card styles removed as user switched to .btn */

/* -------------------------------------------------------------------------- */
/* Pagination */
/* -------------------------------------------------------------------------- */
.tb-events-pagination-container {
    display: flex;
    justify-content: center;
}

.tb-events-pagination {
    display: flex;
    gap: 6px;
    align-items: center;
}

.tb-events-pagination a,
.tb-events-pagination span {
    font-family: 'PP Neue Montreal', 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    /* Book/Regular */
    font-size: 19px;
    color: #000005;
    opacity: 0.5;
    text-decoration: none;
    padding: 0 4px;
    min-width: 24px;
    text-align: center;
    border-bottom: 1px solid transparent;
}

.tb-events-pagination span.current,
.tb-events-pagination a:hover {
    opacity: 1;
    border-bottom: 1px solid #000005;
}

.tb-events-pagination .dots {
    border: none;
}

/* Loading Indicator */
.tb-events-loader {
    text-align: center;
    padding: 20px;
    color: #07121C;
    font-family: 'IBM Plex Sans', sans-serif;
}

.tb-events-no-results {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 20px;
    padding: 40px;
}

/* -------------------------------------------------------------------------- */
/* Responsive */
/* -------------------------------------------------------------------------- */

/* Tablet & Smaller Desktops */
@media (max-width: 1199px) {

    /* Grid becomes 2 cols */
    .tb-events-grid.tb-events-cols-3,
    .tb-events-grid.tb-events-cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 24px;
    }

    .tb-events-featured {
        padding-right: 24px;
        gap: 30px;
    }
}

/* Tablet Portrait & Mobile */
@media (max-width: 768px) {

    /* Featured Event Stack */
    .tb-events-featured {
        flex-direction: column;
        padding: 16px;
        gap: 24px;
    }

    .tb-events-featured-image {
        width: 100%;
        min-height: 250px;
    }

    .tb-events-featured-content {
        padding: 12px 0;
        gap: 24px;
    }

    .tb-events-title {
        font-size: 50px;
    }

    /* Grid Section */
    .tb-events-grid-section {
        gap: 24px;
        margin-top: 36px;
    }

    /* Filters Stack */
    .tb-events-filters {
        flex-wrap: wrap;
        gap: 12px;
    }

    .tb-events-filter-label {
        width: 100%;
        text-align: center;
    }

    .tb-events-filter-buttons {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    /* Grid 1 Column */
    .tb-events-grid,
    .tb-events-grid.tb-events-cols-2,
    .tb-events-grid.tb-events-cols-3,
    .tb-events-grid.tb-events-cols-4 {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .tb-events-card {
        height: auto;
        min-height: 350px;
    }
}