.events-grid {
    color: var(--heading-color);
    padding: 2rem 0;
    position: relative;
}

.events-grid__title {
    margin-bottom: 1rem;
    color: var(--heading-color);
}

.events-grid__filter {
    margin-bottom: 50px;
}

.events-grid__filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.events-grid__filter-label {
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: 27px; /* 150% */
    color: var(--aktd-color-font);
    align-self: center;
}

.events-grid .events-grid__filter-button {
    background-color: var(--aktd-color-dark-blue-10) !important;
    border: none !important;
    color: var(--aktd-color-font) !important;
    padding: 10px 20px !important;
    cursor: pointer;
    text-transform: none !important;
    font-size: 16px !important;
    line-height: 27px !important;
    font-weight: 500 !important;
    border-radius: 0; /* prevent theme rounded buttons */
    box-shadow: none; /* prevent theme button shadows */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.events-grid .events-grid__filter-button--active,
.events-grid .akt-grid__filter-button--active {
    background-color: var(--aktd-color-font) !important;
    color: #ffffff !important;
}

.events-grid__container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.events-grid__row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: stretch; /* Alle Items gleiche Höhe */
}

.events-grid__item {
    display: flex;
    width: 626px;
    max-width: calc(50% - 10px); /* Maximal 50% der Container-Breite minus halber Gap */
    min-height: 200px; /* Mindesthöhe für konsistente Darstellung */
    padding: 30px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    background: var(--aktd-color-ice, #F2F4F6);
    transition: all 0.3s ease;
    cursor: pointer;
    flex: 0 0 calc(50% - 10px); /* Feste Breite von 50% minus halber Gap */
}

/* Removed hover effect for event grid items */

.events-grid__item.hidden {
    display: none;
}

.events-grid__content {
    display: flex;
    width: 100%;
    height: 100%; /* Volle Höhe des Containers nutzen */
    gap: 30px;
    align-items: flex-start;
}

.events-grid__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%; /* Volle Höhe nutzen */
}

.events-grid__period {
    color: var(--aktd-color-font);
    font-weight: 400;
    font-size: 16px;
    text-transform: uppercase;
}

.events-grid__title-item {
    color: var(--aktd-color-font);
    font-size: 18px;
    font-weight: 700;
    line-height: normal;
    margin-bottom:0!important;
}

.events-grid__textfield {
    color: var(--aktd-color-font);
    font-size:16px;
    line-height:1.5;
    font-weight:300
}

.events-grid__link {
    display: inline-block;
    align-self: flex-start;
}

.events-grid__logo {
    flex: 0 0 auto;
    max-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    height:100%;
}

.events-grid__logo--mobile { display: none; }

.events-grid__logo-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.events-grid__no-events {
    text-align: center;
    padding: 3rem;
    color: var(--text-color);
}

.events-grid__no-events p {
    font-size: 1.1rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1320px) {
    .events-grid__row {
        justify-content: center;
    }
    
    .events-grid__item {
        width: 100%;
        max-width: 626px;
    }
}

@media (max-width: 768px) {
    .events-grid {
        padding: 1rem 0;
    }
    
    .events-grid__row {
        flex-direction: column;
        gap: 15px;
    }
    
    .events-grid__item {
        width: 100%;
        padding: 20px;
        gap: 15px;
        min-height: auto; /* Auf mobile keine feste Mindesthöhe */
    }
    
    .events-grid__content {
        flex-direction: column;
        gap: 20px;
        height: auto; /* Auf mobile automatische Höhe */
    }
    
    .events-grid__info {
        height: auto; /* Auf mobile automatische Höhe */
        justify-content: flex-start; /* Normal alignment auf mobile */
    }
    
    .events-grid__logo { display: none; }
    .events-grid__logo--mobile { display: flex; max-width: 100px; }
    
    /* Use base font-sizes on mobile */
    .events-grid__title-item { }
    
    .events-grid__filter-buttons {
        gap: 20px;
    }
    
    .events-grid__filter-button {
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .events-grid__item {
        padding: 15px;
    }
    
    .events-grid__title-item { }
    
    .events-grid__period { }
    
    .events-grid__location,
    .events-grid__organizer { }
    
    .events-grid__address,
    .events-grid__textfield { }
}
