/**
 * Events Discovery & Detail Pages CSS
 * BookConnect - Events browsing
 */

/* ========================
   EVENT CARDS - Grid page
   ======================== */

.event-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Banner / Image area */
.event-card-banner {
    position: relative;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
}

.event-card-banner .event-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-card-banner .event-card-icon {
    font-size: 3rem;
    opacity: 0.3;
    color: #fff;
}

/* Date badge on card */
.event-date-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #fff;
    border-radius: 8px;
    padding: 4px 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    line-height: 1.1;
}

.event-date-day {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
}

.event-date-month {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Status badge on card */
.event-status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-registered {
    background: #10b981;
    color: #fff;
}

.badge-full {
    background: #ef4444;
    color: #fff;
}

.badge-online {
    background: #3b82f6;
    color: #fff;
}

/* Card body */
.event-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.event-card-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.event-card-category i {
    margin-right: 4px;
}

.event-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.event-card-title a {
    color: #1f2937;
    text-decoration: none;
}

.event-card-title a:hover {
    color: #667eea;
}

.event-card-meta {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 12px;
}

.event-card-meta div {
    margin-bottom: 3px;
}

.event-card-meta i {
    width: 18px;
    text-align: center;
    color: #9ca3af;
    margin-right: 4px;
}

/* Organizer row */
.event-card-organizer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.organizer-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* Footer */
.event-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    flex-wrap: wrap;
}

.event-card-participants {
    font-size: 0.8rem;
    color: #6b7280;
}

.event-card-participants i {
    margin-right: 4px;
}

.event-card-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1f2937;
}

.event-card-price.free {
    color: #10b981;
}

/* ========================
   FILTER BAR
   ======================== */

.events-filter-bar {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.events-filter-bar .card-body {
    padding: 20px;
}

/* ========================
   EVENT DETAIL PAGE
   ======================== */

.event-detail-hero {
    position: relative;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    margin-bottom: 20px;
}

.event-detail-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-detail-hero-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.2);
}

.event-detail-hero-overlay {
    position: relative;
    z-index: 1;
    padding: 24px;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
}

.event-detail-title {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Info bar */
.event-detail-info-bar {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.event-detail-info-bar .card-body {
    padding: 16px 12px;
}

/* Description */
.event-description-content {
    line-height: 1.7;
    color: #374151;
}

/* Participants grid */
.participants-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.participant-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 70px;
    text-align: center;
}

.participant-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    margin-bottom: 4px;
}

.participant-name {
    color: #6b7280;
    font-size: 0.7rem;
    line-height: 1.2;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Action card (sidebar) */
.event-action-card {
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.event-price-tag {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
}

.event-price-tag.free {
    color: #10b981;
}

/* ========================
   PAGINATION
   ======================== */

.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.pagination .page-item.active .page-link {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

.pagination .page-link:hover {
    background: #f3f4f6;
    color: #667eea;
}

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

@media (max-width: 768px) {
    .event-card-banner {
        height: 130px;
    }

    .event-detail-hero {
        height: 200px;
    }

    .event-detail-title {
        font-size: 1.2rem;
    }

    .event-detail-info-bar .row > div {
        margin-bottom: 8px;
        font-size: 0.85rem;
    }

    .participants-grid {
        gap: 8px;
    }

    .participant-item {
        width: 56px;
    }

    .participant-avatar {
        width: 40px;
        height: 40px;
    }

    .events-page-header h1 {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .event-card-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .event-card-footer .btn {
        width: 100%;
    }
}
