
.events-container {
    padding: 80px 20px; 
}

.events-intro {
    padding: 0;
    text-align: center;
}

.events-intro h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-family: 'IBM Plex Sans', sans-serif;
    color: #282828;
}

.events-intro p {
    max-width: 700px;
    margin: 0 auto 60px auto; 
    font-size: 1rem;
    line-height: 1.6;
    color: #282828;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 500;
}

.events-controls {
    padding: 0;
    text-align: center;
    position: relative;
    margin-bottom: 40px;
}

.search-filter-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    max-width: 400px;
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    padding: 0.5rem 1rem;
    background-color: #f9f9f9;
    transition: border-color 0.3s ease;
    font-family: 'Source Sans Pro', sans-serif;
}

.search-box:focus-within {
    border-color: #0073e6;
    background-color: #fff;
}

.search-icon-img {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
    opacity: 0.6;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    color: #282828;
    font-family: 'Source Sans Pro', sans-serif;
}

.search-input::placeholder {
    color: #999;
}

.filter-button-wrapper {
    position: relative;
}

.filter-btn-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border: 2px solid #e0e0e0;
    background-color: #fff;
    color: #666;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'Source Sans Pro', sans-serif;
}

.filter-btn-main:hover {
    border-color: #0073e6;
    color: #0073e6;
}

.filter-btn-main img {
    width: 16px;
    height: 16px;
}

.filter-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
    min-width: 220px;
}

.filter-dropdown.hidden {
    display: none;
}

.filter-options {
    padding: 0.75rem 0;
}

.filter-group-title {
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0073e6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'IBM Plex Sans', sans-serif;
    margin-top: 0.5rem;
}

.filter-group-title:first-child {
    margin-top: 0;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.95rem;
    color: #282828;
    font-family: 'Source Sans Pro', sans-serif;
}

.filter-option:hover {
    background-color: #f9f9f9;
}

.filter-option input[type="radio"] {
    cursor: pointer;
}

.filter-option span {
    user-select: none;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    justify-content: center;
    justify-items: center;
    max-width: 951px; 
    margin: 0 auto;
}

@media (max-width: 992px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 640px; 
    }
}

@media (max-width: 600px) {
    .events-grid {
        grid-template-columns: 1fr; 
        max-width: 100%;
    }
}

.event-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    width: 305px;
    height: auto;
    flex-shrink: 0;
    text-decoration: none;
    color: #282828;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 2px solid #e0e0e0;
}

.event-card:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.06);
}

.event-image {
    width: 100%;
    height: 320px; 
    overflow: hidden;
    position: relative;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.event-image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.3px;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    padding: 12px;
    font-family: 'IBM Plex Sans', sans-serif;
    z-index: 1;
}

.event-image-overlay span {
    color: inherit;
}

.event-card-linked:hover .event-image-overlay {
    opacity: 1;
    color: #fff;
}

.event-card-linked:hover .event-image img {
    transform: scale(1.05);
    filter: brightness(0.8);
}

.event-card:hover .event-image img {
    transform: scale(1.05);
}

.event-content {
    padding: 14px 14px 18px 14px; 
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-grow: 1;
    font-family: 'Source Sans Pro', 'Source Sans Pro', sans-serif; 
}

.event-content h3 {
    font-size: 18px; 
    margin: 0 0 4px 0;
    text-align: left;
    font-weight: 700;
    line-height: 1.3;
    min-height: 46px;
    font-family: 'IBM Plex Sans', sans-serif;
    color: #282828;
    transition: color 0.3s ease;
}

.event-card:hover .event-content h3 {
    color: #0074E0; 
}

.event-datetime {
    font-size: 0.9rem;
    color: #282828;
    margin: 0 0 6px 0;
    font-weight: 500;
    font-family: 'IBM Plex Sans', sans-serif;
    font-style: italic;
}

.event-type-info {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}

.event-type-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #9D55CE;
    font-family: 'Source Sans Pro', 'Source Sans Pro', sans-serif;
}

.event-type-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.event-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #9D55CE;
    font-family: 'Source Sans Pro', 'Source Sans Pro', sans-serif;
    font-weight: 500;
}

.location-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    opacity: 1;
}

.event-description {
    font-size: 16px; 
    color: #282828;
    text-align: left !important;
    line-height: 1.4;
    letter-spacing: normal;
    word-spacing: normal;
    margin: 0;
    font-family: 'Source Sans Pro', 'Source Sans Pro', sans-serif;
    flex: 1;
}

.event-link {
    color: #0073e6;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-block;
    transition: color 0.3s ease;
    font-family: 'Source Sans Pro', sans-serif;
}

.event-link:hover {
    color: #0073e6;
    text-decoration: underline;
}

.no-events {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
    font-size: 1.1rem;
    font-family: 'Source Sans Pro', sans-serif;
}

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

.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination-btn {
    margin: 0 6px;
    padding: 0;
    width: 45px;
    height: 45px;
    border: 2px solid #e0e0e0;
    background-color: #fff;
    color: #666;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: 'Source Sans Pro', sans-serif;
}

.pagination-btn:hover {
    border-color: #0073e6;
    color: #0073e6;
}

.pagination-btn.active {
    background-color: #0073e6;
    border-color: #0073e6;
    color: #fff;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn:disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: #e0e0e0;
    color: #666;
}

.pagination-section {
    text-align: center;
    padding: 30px 20px;
    display: flex;
    justify-content: center;
}

.pagination-text {
    display: none;
}

@media (max-width: 992px) {
    .events-intro h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .events-container {
        padding: 60px 15px; 
    }

    .events-intro h1 {
        font-size: 1.8rem;
    }

    .search-filter-wrapper {
        flex-direction: column;
        gap: 0.75rem;
    }

    .search-box {
        max-width: 100%;
    }

    .filter-btn-main {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .event-card {
        height: auto;
        min-height: 420px;
    }

    .event-content h3 {
        font-size: 1.2rem;
        min-height: auto;
    }

    .event-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .events-intro h1 {
        font-size: 1.5rem;
    }
}
