/* Grid and Layout */
.eeg-event-grid {
    margin: 2em 0;
}

.eeg-title {
    font-size: 1.8em;
    margin-bottom: 1.2em;
    text-align: center;
}

.eeg-grid {
    display: grid;
    gap: 1.5em;
}

/* each col should naturally collapse from 4 to 1 and show posts vertically instead */

.eeg-cols-2 {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.eeg-cols-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.eeg-cols-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.eeg-grid-item {
    background: #fff;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex;
    flex-direction: column;
}

/* Thumbnail and Image Styling */
.eeg-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.eeg-thumbnail img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: auto;
    display: block;
}

/* Event Content */
.eeg-event-title {
    font-size: 1.1em;
    margin: 0.8em;
}

.eeg-event-title a {
    color: #222;
    text-decoration: none;
}

.eeg-event-dates,
.eeg-event-place {
    font-size: 0.9em;
    color: #666;
    margin: 0 0.8em 0.5em;
    display: flex;
    align-items: center;
    gap: 0.3em;
}

.eeg-excerpt {
    font-size: 0.9em;
    color: #444;
    margin: 0 0.8em 1em;
}

.eeg-read-more {
    display: inline-block;
    margin: 0.8em;
}

/* Swiper Carousel */
.swiper-slide {
    width: auto !important;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
}

.eeg-carousel-image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 200px;
    overflow: visible;
    box-sizing: border-box;
}

.eeg-carousel-image img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    display: block;
    margin: auto;
}

.eeg-image-carousel {
    width: 100%;
    overflow: visible;
}

.swiper-wrapper {
    align-items: center;
    transition-timing-function: linear;
}

.eeg-read-more-icon {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.eeg-read-more-icon i,
.eeg-read-more-icon svg {
  width: 1em;
  height: 1em;
}

/* random block without which carousel is inconsistent for some reason */

.eeg-image-carousel .swiper-slide {
    width: auto !important;
}

.eeg-carousel-image {
    width: 100% !important;
    height: 200px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.eeg-carousel-image img {
    max-height: 100% !important;
}

.swiper-btn-next, .swiper-btn-prev {
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 9999 !important;
}

/*text fix?*/

.eeg-grid-item {
    background: #fff;
    overflow: visible; /* instead of hidden */
    display: flex;
    flex-direction: column;
    height: auto;
}