@charset "UTF-8";
/* CSS Document */

/* --- Global Grid Container --- */
.wg-events-grid {
    display: flex;
    column-gap: 20px;
    row-gap: 20px;
    flex-wrap: wrap;
    /* Set the default bottom margin */
    margin: 0 0 40px;
}

/* Rule to remove the bottom margin if no pagination is present */
.wg-events-grid.wg-no-pagination {
    margin-bottom: 0;
}

/* Pagination Margin */
.wg-events-list-wrapper + div.pagination,
.wg-events-list-wrapper + .pagination {
    margin-top: 40px;
}

/* --- Individual Event Listing --- */
.wg-event-listing {
    box-sizing: border-box;
    padding: 0;
    border: 1px solid var(--wg-medium-gray);
    border-radius: 10px;
    background-color: var(--wg-white);
}


/* --- Responsive Flex Basis (Layout) --- */

/* 1. DEFAULT: 1 COLUMN (Mobile/Base - Applies to everything below 768px for ALL grid classes) */
.wg-event-listing {
    flex: 0 0 100%;
}

/* 2. 2 COLUMNS (Tablet/Small Desktop - Starts at min-width: 768px) */
@media (min-width: 768px) {
    /* Base 2-col layout */
    .wg-event-listing {
        flex: 0 0 calc(50% - 10px);
    }

    /* FORCED 2 COLUMNS */
    .wg-events-grid.wg-grid-2-cols .wg-event-listing {
        flex: 0 0 calc(50% - 10px);
    }

    /* 4-COLUMN FALLBACK: Force 2 columns when wg-grid-4-cols is applied on tablet */
    .wg-events-grid.wg-grid-4-cols .wg-event-listing {
        flex: 0 0 calc(50% - 10px);
    }
}

/* 3. 3 COLUMNS (Desktop - Default for min-width: 1024px) */
@media (min-width: 1024px) {
    /* Base 3-col layout */
    .wg-event-listing {
        flex: 0 0 calc((100% - 40px) / 3);
    }

    /* FORCED 2 COLUMNS - overrides 3-col default */
    .wg-events-grid.wg-grid-2-cols .wg-event-listing {
        flex: 0 0 calc(50% - 10px);
    }

    /* 4 COLUMNS */
    .wg-events-grid.wg-grid-4-cols .wg-event-listing {
        flex: 0 0 calc((100% - 60px) / 4);
    }
}


.photo-credit {
    font-size: 60%;
}


/* INNER WRAPPER */

.wg-eventtype-long-description {
    margin-bottom: 40px;
}

.wg-event-content-inner {
    background-color: transparent;
    padding: 20px;
    border-radius: 10px;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 600px) {
    .wg-event-content-inner {
        padding: 20px;
    }
}


/* FEATURED IMAGE STYLING */

.wg-event-image-link {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    /* MODIFIED: Added relative positioning context for the capsules */
    position: relative;
}

/* Image Aspect Ratio Wrapper */
.wg-event-image-wrapper {
    width: 100%;
    padding-top: 100%;
    position: relative;
}

.wg-event-featured-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease-in-out;
    transform: scale(1);
}

.wg-event-image-link:hover .wg-event-featured-image {
    transform: scale(1.03);
}

.wg-event-image-link {
    margin-bottom: 15px;
}

/* DEPRECATED: Old paid promotion text styling */
/*
.wg-paid-promotion-tag {
    display: block;
    font-size: 0.75rem;
    color: var(--wg-gold);
    margin-top: 5px;
}
*/

/* --- NEW CAPSULE CONTAINER OVER FEATURED IMAGE --- */
.wg-image-capsule-wrapper {
    position: absolute;
    bottom: 15px; /* Spacing from the bottom of the image */
    right: 15px; /* Spacing from the right of the image */
    z-index: 10; /* Ensure it's above the image */
    display: flex;
    gap: 5px; /* Gap between "Just Added" and "Paid Promotion" capsules */
}

/* --- Just Added Capsule Styling (Modified) --- */

/* White Capsule Base */
.wg-just-added-capsule {
    background-color: var(--wg-red); /* Assuming --wg-white is defined in your theme */
    padding: 3px 8px;
    border-radius: 15px; /* Creates the capsule shape */
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    display: inline-block;
    /* Ensure no margin is applied from old placement styles */
    margin: 0;
    white-space: nowrap; /* Prevent breaking */
}

/* Red Text */
.wg-just-added-text {
    color: var(--wg-white);
}

/* DEPRECATED: Old placement wrapper for Just Added is no longer needed */
/*
.wg-just-added-bottom-wrapper {
    margin-top: 10px;
    margin-bottom: 0;
}
*/

/* --- NEW Paid Promotion Capsule Styling --- */
.wg-paid-promotion-capsule {
    background-color: var(--wg-gold); /* Use gold background for distinction */
    color: var(--wg-white); /* White text on gold */
    padding: 3px 8px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    display: inline-block;
    margin: 0;
    white-space: nowrap;
}


/* CONTENT STYLING */

.wg-event-content-inner .wg-kicker-date {
    font-weight: bold;
    margin-bottom: 0;
    padding-bottom: 0;
}

.wg-event-content-inner h3 {
    margin-top: 5px;
    margin-bottom: 8px; /* Tightened margin */
    font-size: 1.5em;
}

.wg-event-content-inner .wg-kicker-date + h3 {
    margin-top: 5px;
}

.wg-event-content-inner h3 a {
    text-decoration: none;
    color: inherit;
}

.wg-event-content-inner p {
    margin-bottom: 8px;
}