/* ── Events Page ── */

.events-page {
    padding-top: 70px;
}

/* Hero */
.events-hero {
    padding: 1.5rem 0 1rem;
    text-align: center;
}

.events-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.events-hero p {
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto 0.75rem;
    opacity: .8;
}

.text-green { color: #3b82f6; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(16,185,129,.1);
    border: 1px solid rgba(16,185,129,.3);
    border-radius: 999px;
    padding: .3rem .9rem;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    color: #3b82f6;
    margin-bottom: 1rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%,100% { opacity:1; transform:scale(1); }
    50%      { opacity:.5; transform:scale(1.3); }
}

/* Filters */
.events-filters-section {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,.07);
    margin-bottom: 1rem;
}

.filters-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: .45rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.15);
    background: transparent;
    color: rgba(255,255,255,.75);
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
}

.filter-tab:hover,
.filter-tab.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    padding: .5rem 1rem;
    flex: 1;
    min-width: 200px;
    max-width: 320px;
}

.search-bar i { opacity: .5; font-size: .85rem; }

.search-bar input {
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: .9rem;
    width: 100%;
}

.search-bar input::placeholder { opacity: .5; }

/* Grid */
.events-content { padding-bottom: 3rem; }

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
}

/* Event Card */
.event-card {
    background: rgba(255,255,255,.05);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    overflow: hidden;
    transition: transform .3s, box-shadow .3s, border-color .3s;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,.35);
    border-color: rgba(255,255,255,.18);
}

.event-card.is-past {
    opacity: .75;
}

/* Card image */
.card-img-wrap {
    position: relative;
    height: 190px;
    overflow: hidden;
    background: rgba(255,255,255,.04);
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}

.event-card:hover .card-img-wrap img {
    transform: scale(1.05);
}

.card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(16,185,129,.15), rgba(59,130,246,.1));
    font-size: 3rem;
    opacity: .4;
}

.card-status-badge {
    position: absolute;
    top: .85rem;
    left: .85rem;
    padding: .3rem .8rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    display: flex;
    align-items: center;
    gap: .35rem;
}

.badge-upcoming {
    background: rgba(16,185,129,.9);
    color: #fff;
}

.badge-past {
    background: rgba(107,114,128,.85);
    color: #fff;
}

.badge-today {
    background: rgba(245,158,11,.9);
    color: #fff;
    animation: pulse 2s infinite;
}

.card-type-badge {
    position: absolute;
    top: .85rem;
    right: .85rem;
    padding: .3rem .75rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 600;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(8px);
    color: #fff;
    text-transform: capitalize;
}

/* Card body */
.card-body {
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .6rem;
    line-height: 1.35;
    color: #fff;
}

.card-desc {
    font-size: .85rem;
    opacity: .75;
    line-height: 1.55;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-bottom: 1rem;
    font-size: .8rem;
    opacity: .75;
}

.card-meta-row {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.card-meta-row i {
    width: 14px;
    color: #10b981;
    flex-shrink: 0;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: 1rem;
}

.tag {
    font-size: .72rem;
    padding: .2rem .55rem;
    border-radius: 999px;
    background: rgba(16,185,129,.12);
    color: #34d399;
    border: 1px solid rgba(16,185,129,.2);
}

.card-fee {
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.fee-free { color: #10b981; }
.fee-paid { color: #fbbf24; }

.card-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    margin-top: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1.1rem;
    border-radius: 8px;
    border: none;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}

.btn-primary {
    background: #3b82f6;
    color: #fff;
}

.btn-primary:hover { background: #1d4ed8; transform: translateY(-1px); }

.btn-secondary {
    background: rgba(255,255,255,.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,.15);
}

.btn-secondary:hover { background: rgba(255,255,255,.14); }

.btn-ghost {
    background: transparent;
    color: rgba(255,255,255,.7);
    border: 1px solid rgba(255,255,255,.12);
    padding: .45rem .85rem;
}

.btn-ghost:hover { color: #fff; border-color: rgba(255,255,255,.3); }

.btn-disabled {
    background: rgba(255,255,255,.05);
    color: rgba(255,255,255,.35);
    border: 1px solid rgba(255,255,255,.08);
    cursor: not-allowed;
    pointer-events: none;
}

/* States */
.state-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    text-align: center;
    gap: 1rem;
    opacity: .75;
}

.spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(255,255,255,.15);
    border-top-color: #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-icon { font-size: 3rem; opacity: .35; }

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.modal-box {
    background: #1e293b;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    padding: 2rem;
    max-width: 640px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,.08);
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}

.modal-close:hover { background: rgba(239,68,68,.3); }

.modal-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1.25rem;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: .75rem;
}

.modal-meta {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    font-size: .85rem;
    opacity: .75;
    margin-bottom: 1.25rem;
}

.modal-meta-row {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.modal-meta-row i { color: #10b981; width: 16px; }

.modal-desc {
    font-size: .9rem;
    line-height: 1.7;
    opacity: .85;
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .events-page { padding-top: 70px; }
    .events-hero { padding: 1rem 0 0.5rem; }
    .events-hero p { font-size: 0.95rem; }
    .filters-bar { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .filter-tabs { justify-content: flex-start; }
    .search-bar { max-width: 100%; min-width: 0; }
    .events-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .card-actions { flex-direction: column; }
    .card-actions .btn { width: 100%; justify-content: center; }
    .modal-box { padding: 1.25rem; }
    .modal-actions { flex-direction: column; }
    .modal-actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .filter-tab { padding: .4rem .85rem; font-size: .8rem; }
    .card-img-wrap { height: 160px; }
}
