/* ==========================================
   Events Page — events.css
   Colour palette: matches the rest of the site
   Primary: #D14343 / #FA595E  |  BG: #1E1E1E  |  Card: #2e2e2e
   ========================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: #1E1E1E;
    color: #ececec;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---- Back Button ---- */
.back-button {
    position: fixed;
    top: 1.5rem; left: 1.5rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #aaaaaa;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(26,26,26,0.85);
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}
.back-button:hover {
    color: #ececec;
    border-color: #FA595E;
}

/* ---- Page Header ---- */
.page-header {
    text-align: center;
    padding: 6rem 2rem 3rem;
}

.page-header .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ececec;
    background: rgba(255,255,255,0.05);
    padding: 0.4rem 1.2rem;
    border-radius: 99px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.15);
}

.page-header h1 {
    font-family: 'Raleway', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.gradient-text {
    background: linear-gradient(90deg, #D14343, #FA6161);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    font-size: 1rem;
    color: #a1a1a1;
    max-width: 500px;
    margin: 0 auto;
}

/* ---- Wrapper ---- */
.events-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 6rem;
}

/* ==========================================
   FILTER BAR
   ========================================== */
.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: #1f1f1f;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
}

.filter-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #2e2e2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    transition: border-color 0.2s ease;
}
.filter-search:focus-within {
    border-color: #D14343;
}
.filter-search i {
    color: #888;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.filter-search input {
    background: none;
    border: none;
    outline: none;
    color: #ececec;
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
    width: 100%;
}
.filter-search input::placeholder { color: #777; }

.filter-location { display: flex; }

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 1rem;
    border-radius: 99px;
    border: 1px solid rgba(255,255,255,0.12);
    background: transparent;
    color: #aaaaaa;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.chip:hover {
    border-color: #FA595E;
    color: #ececec;
}
.chip.active {
    background-color: #FA595E;
    border-color: #dc4a4a;
    color: #000;
    box-shadow: 0px 0px 10px #FA595E;
}

.results-count {
    font-size: 0.8rem;
    color: #777;
}

/* ==========================================
   EVENTS GRID
   ========================================== */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 6rem 2rem;
    color: #777;
}
.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}
.empty-state h2 {
    font-family: 'Raleway', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
    color: #ececec;
}
.empty-state p { font-size: 1rem; }

/* ==========================================
   EVENT CARD  —  same as .article in placements.css
   ========================================== */
.event-card {
    background-color: #2e2e2e;
    border: solid 5px #FA595E;
    border-radius: 20px;
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    box-shadow: 0px 4px 10px #FA595E;
    transition: 0.3s ease;
    text-decoration: none;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

/* ---- Badges Layout (Strict 2-Row Symmetry) ---- */
.card-header-badges {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.header-row-1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.header-row-2 {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

/* Type badges — same as .articleTag in placements.css */
.type-badge, .mode-badge {
    padding: 0.3rem 0.75rem;
    border-radius: 5px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.type-hackathon   { background-color: #22814A; }
.type-workshop    { background-color: #D14343; }
.type-event       { background-color: #5e5e5e; }
.type-competition { background-color: #eca956; color: #111; }

.mode-online  { background-color: #22814A; }
.mode-offline { background-color: #eca956; color: #111; }

/* Days countdown chip */
.days-badge {
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.3rem 0.7rem;
    border-radius: 5px;
    background: rgba(255,255,255,0.07);
    color: #aaaaaa;
    border: 1px solid rgba(255,255,255,0.12);
    white-space: nowrap;
}
.days-badge.soon {
    background: rgba(250, 89, 94, 0.15);
    color: #FA595E;
    border-color: rgba(250, 89, 94, 0.35);
    animation: pulse-badge 2s ease infinite;
}
@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ---- Event Name ---- */
.event-name {
    font-family: 'Raleway', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
    min-height: 3.6rem;
    display: flex;
    align-items: center;
}


/* ---- Meta Rows ---- */
.event-meta { display: flex; flex-direction: column; gap: 0.4rem; }
.event-meta-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: #cccccc;
}
.event-meta-row i {
    width: 14px;
    flex-shrink: 0;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ---- Registration Close Row ---- */
.close-date-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #FA595E;
    background: rgba(250, 89, 94, 0.08);
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(250, 89, 94, 0.2);
}

/* ==========================================
   REGISTER BUTTON — matches .cta-btn on home page
   ========================================== */
.register-btn {
    display: block;
    text-align: center;
    text-decoration: none;
    color: #000000;
    background-color: #FA6161;
    border: solid 4px #dc4a4a;
    border-radius: 90px;
    box-shadow: 0px 0px 15px #FA6161;
    padding: 0.6rem 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    transition: 0.3s ease;
    margin-top: auto;
}
.register-btn:hover {
    cursor: pointer;
    box-shadow: 0px 0px 30px #FA6161;
    transform: scale(1.01);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .events-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .page-header { padding: 5rem 1.5rem 2rem; }
    .events-wrapper { padding: 0 1rem 4rem; }
    .filter-bar { padding: 1rem; }
}
