.events-container {
    margin-top: 80px;
    background: linear-gradient(135deg, #fff9f2, #ffe6cc);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding-bottom: 40px;
    text-align: center;
}

.events-header {
    width: 100%;
    height: 450px;
    object-fit: cover;
	object-position: top;
    border-radius: 10px 10px 0 0;
    margin-bottom: 20px;
}

.events-container h1 {
    color: #ff9933;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.intro-text {
    font-size: 1.2em;
    color: #333;
    line-height: 1.6;
    margin: 0 20px 40px;
    max-width: 800px;
    display: inline-block;
}

.event-section {
    margin: 40px 20px;
}

.event-section h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
}

.events-grid {
    display: grid;
    gap: 15px;
}

.featured-grid {
    grid-template-columns: repeat(4, 1fr);
}

.upcoming-grid, .past-grid {
    grid-template-columns: repeat(4, 1fr);
}

.event-card {
    position: relative;
    height: 300px;
    padding-bottom: 40px;
    overflow: hidden;
}

.event-card img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.event-card:hover img {
    transform: scale(1.05);
}

.event-card h3 {
    font-size: 1.1em;
    color: #ff9933;
    margin-bottom: 5px;
}

.event-card p {
    font-size: 0.85em;
    color: #555;
    margin: 3px 0;
    padding: 0 8px;
}

.event-card .learn-more {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    font-size: 0.85em;
    padding: 4px 8px;
}

/* Controls (Sort and Search) */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.search-container {
    display: flex;
    align-items: center;
}

.search-container input {
    padding: 6px 12px;
    border: 1px solid #ff9933;
    border-radius: 5px;
    font-size: 0.95em;
    width: 200px;
    outline: none;
}

.search-container input::placeholder {
    color: #999;
}

.sort-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-container label {
    font-size: 1em;
    color: #333;
}

.sort-container select {
    padding: 6px 12px;
    border: 1px solid #ff9933;
    border-radius: 5px;
    font-size: 0.95em;
    color: #333;
    background: white;
    cursor: pointer;
}

/* Pagination */
.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.page-btn {
    background: #ff9933;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.page-btn:hover {
    background: #e68a00;
}

.page-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.page-num {
    font-size: 1em;
    color: #333;
}

@media (max-width: 1024px) {
    .featured-grid, .upcoming-grid, .past-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .event-card img {
        width: 120px;
        height: 120px;
    }
    .event-card {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .events-header {
        height: 200px;
    }
    .events-container h1 {
        font-size: 2em;
    }
    .intro-text {
        font-size: 1em;
    }
    .event-section h2 {
        font-size: 1.5em;
    }
    .featured-grid, .upcoming-grid, .past-grid {
        grid-template-columns: 1fr;
    }
    .event-card img {
        width: 150px;
        height: 150px;
    }
    .event-card {
        height: 300px;
    }
    .controls {
        flex-direction: column;
        gap: 15px;
    }
    .search-container input {
        width: 100%;
        max-width: 300px;
    }
}