/* Events Page Specific Styles */

/* ===================================
   PAGE WRAPPER
   =================================== */

/* padding-top accounts for fixed navbar */
.events-main {
    padding-top: 100px;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
}

/* ===================================
   HEADER
   =================================== */

.events-header {
    text-align: center;
    padding: 2rem 1rem 3rem;
    max-width: 800px;
    margin: 0 auto;
}

/* gradient text clip trick */
.events-header h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.events-header p {
    font-size: 1.3rem;
    color: #64748b;
    font-weight: 500;
}

/* ===================================
   FILTERS
   =================================== */

/* aligns with the event card grid below */
.filter-section {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 2rem;
}

.filter-buttons-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* inactive state */
.filter-btn {
    padding: 0.75rem 1.5rem;
    background: #f1f5f9;
    border: 2px solid transparent; /* reserves space so layout doesn't shift when active border appears */
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
}

.filter-btn:hover {
    background: #e0e7ff;
    color: #2563eb;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    border-color: #2563eb;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

/* ===================================
   EVENTS GRID
   =================================== */

/* auto-fill + minmax handles responsiveness without media queries */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

/* ===================================
   EVENT CARD
   =================================== */

.event-card {
    background: white;
    border-radius: 15px;
    overflow: hidden; /* clips child elements to the rounded corners */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: scale(1);
}

.event-card.hidden {
    display: none;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.2);
}

/* ===================================
   CARD HEADER
   =================================== */

.event-header {
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

/* semi-transparent overlay so gradient doesn't overpower text */
.event-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    opacity: 0.9;
}

/* keeps text above the ::before overlay */
.event-header > * {
    position: relative;
    z-index: 1;
}

.event-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px); /* frosted glass effect */
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
}

.event-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.event-date {
    font-size: 0.9rem;
    opacity: 0.95;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===================================
   CARD BODY
   =================================== */

/* flex-grow: 1 makes all cards the same height in the grid */
.event-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.event-time,
.event-location {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: #64748b;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.event-time strong,
.event-location strong {
    color: #334155;
    font-weight: 600;
}

/* flex-grow pushes description to fill leftover card height */
.event-description {
    color: #64748b;
    line-height: 1.6;
    margin-top: 0.5rem;
    flex-grow: 1;
}

/* ===================================
   CATEGORY COLORS
   =================================== */

.event-header.political {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.event-header.youth {
    background: linear-gradient(135deg, #fb923c, #f59e0b);
}

.event-header.innovation {
    background: linear-gradient(135deg, #ec4899, #db2777) !important;
}

.event-header.environmental {
    background: linear-gradient(135deg, #34d399, #10b981);
}

.event-header.education {
    background: linear-gradient(135deg, #ba3eeb, #b325eb);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .events-main {
        padding-top: 80px;
    }

    .events-header h1 {
        font-size: 2rem;
    }

    .events-header p {
        font-size: 1.1rem;
    }

    /* single column on mobile */
    .events-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem 3rem;
    }

    .filter-buttons-horizontal {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}