/* =========================
   EVENTS PAGE BASE
========================= */

.events-page {
    background: #f7f9fc;
    min-height: 100vh;
}

/* =========================
   HERO
========================= */

.events-hero {
    background: linear-gradient(135deg, #0b2a4a, #123c66);
    color: #fff;
    padding: 80px 20px;
    text-align: center;
}

.events-hero h1 {
    font-size: 38px;
    margin-bottom: 10px;
    font-weight: 700;
}

.events-hero p {
    font-size: 16px;
    opacity: 0.9;
}

/* =========================
   CONTAINER ALIGNMENT FIX
   (prevents grid stretching issues)
========================= */

.events-page .g-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* =========================
   TABS
========================= */

.events-tabs {
    display: flex;
    gap: 10px;
    margin: 30px 0 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 16px;
    border: 1px solid #d0d7e2;
    background: #fff;
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: #f0f4fa;
}

.tab-btn.active {
    background: #0b2a4a;
    color: #fff;
    border-color: #0b2a4a;
}

/* =========================
   FILTER CARD
========================= */

.filter-card {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 180px 180px auto;
    gap: 10px;
    align-items: center;
}

/* inputs */
.filter-grid input,
.filter-grid select {
    padding: 10px;
    border: 1px solid #d0d7e2;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.filter-grid input:focus,
.filter-grid select:focus {
    border-color: #0b2a4a;
}

/* button */
.filter-grid button {
    padding: 10px 16px;
    background: #0b2a4a;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s ease;
}

.filter-grid button:hover {
    background: #123c66;
}

/* =========================
   SECTION TITLES
========================= */

.g-section-title {
    font-size: 24px;
    margin: 25px 0 15px;
    color: #0b2a4a;
}

/* =========================
   CARD GRID FIX (IMPORTANT)
   prevents weird stretching in event layout
========================= */

.g-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    align-items: stretch;
}

/* ensure cards behave consistently */
.g-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* fix card text spacing inside events page */
.g-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.g-card p {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

/* =========================
   VIEW SWITCHING HELPERS
========================= */

#upcomingView,
#pastView,
#calendarView {
    margin-bottom: 40px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 992px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .events-hero h1 {
        font-size: 28px;
    }
}

@media (max-width: 600px) {
    .events-tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
        text-align: center;
    }
}