body {
    text-align: center;
}

.header {
    background: #222;
    color: white;
    padding: 80px 0;
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h1,
h2 {
    margin-bottom: 20px;
}

h2 {
    text-align: left;
}

.events {
    padding: 40px;
}

.event {
    border: 2px solid #b8b8b8;
}

.event:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.events:nth-last-child(2) {
    margin-bottom: 100px;
}

.event-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    gap: 20px;
}

.event {
    background: #f8f8f8;
    border-radius: 10px;
    width: 300px;
    text-align: center;
    padding: 20px;
    padding-bottom: 80px;
    padding-left: 0;
    transition: 0.3s ease-in-out;
}

.event img {
    width: 100%;
    /* Ensures full container width */
    height: 50%;
    /* Maintains aspect ratio */
    object-fit: cover;
    /* Prevents image distortion */
    border-radius: 10px;
    display: block;
    /* Removes unwanted spacing */
    margin: 0 2.8%;
    /* Centers the image */
}

.event:hover {
    transform: translateY(-5px);
}

.view-more {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 15px;
    background: #f8b400;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.view-more:hover {
    background: #e89e00;
}

.eventMsg {
    text-align: left;
}

body.dark-mode .event {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.1), 0 10px 25px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease-in-out;
}

body.dark-mode .event p, body.dark-mode .event h3 {
    color: white;
}

.event h3 {
    color: black;
}

body.dark-mode .event:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow:
        inset 0 0 12px rgba(255, 255, 255, 0.15),
        0 12px 30px rgba(0, 0, 0, 0.6);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 768px) {
    .events>h2 {
        margin-left: -20px;
    }

    .event-container {
        margin-left: -20px;
        display: flex;
        align-items: center;
    }

    .event {
        padding-left: 20px;
    }

    .eventMsg {
        margin-left: -20px;
    }

    .event img {
        margin: 0;
    }
}