/* events.css – matches your existing style.css exactly */
/* Updated 21 April 2026 – full mobile modal support + default category images */

.events-hero {
    background: linear-gradient(rgba(10, 61, 98, 0.85), rgba(10, 61, 98, 0.85)), url('/uploads/events/full/hero-placeholder.jpg') center/cover no-repeat;
    color: white;
    padding: 120px 20px 80px;
    text-align: center;
    border-radius: 32px;
    margin-bottom: 48px;
}

.event-card {
    transition: all 0.2s ease;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    background: #f8f9fa;
    padding: 4px;
    border-radius: 16px;
}

.calendar-day {
    background: white;
    min-height: 110px;
    padding: 8px;
    font-size: 0.9rem;
    border-radius: 12px;
}

.calendar-day.other-month {
    opacity: 0.3;
}

.event-list-item {
    border-left: 5px solid #0A3D62;
}

/* ── UNIFORM CARD SIZING FOR A4/A5 FLYERS + DEFAULT IMAGES ── */
.event-card img,
.event-poster {
    height: 260px;
    flex-shrink: 0;
    object-fit: contain;
    background: #f8f9fa;
    width: 100%;
    transition: transform 0.2s ease;
}

.event-card:hover img,
.event-card:hover .event-poster {
    transform: scale(1.03);
}

.featured-events .event-card {
    min-height: 580px;
}

.event-card.next-event {
    border: 3px solid #0A3D62 !important;
    box-shadow: 0 20px 25px -5px rgb(10 61 98 / 0.2);
}

/* ── MOBILE MODAL (fixed) ── */
#eventModal {
    display: none;                    /* hidden by default */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    align-items: flex-end;            /* slide up from bottom on mobile */
    justify-content: center;
    padding: 0;
}

#eventModal:not(.hidden) {
    display: flex;
}

#eventModal .bg-white {
    width: 100%;
    max-width: 640px;
    max-height: 95vh;
    border-radius: 24px 24px 0 0;     /* nice rounded top on mobile */
    overflow: auto;
    margin: 0;
    box-shadow: 0 -10px 25px -5px rgb(0 0 0 / 0.3);
}

@media (min-width: 640px) {
    #eventModal {
        align-items: center;
        padding: 20px;
    }
    #eventModal .bg-white {
        border-radius: 24px;
        margin: 20px;
    }
}

/* Modal image (custom or default category image) */
#modalContent img {
    width: 100%;
    max-height: 55vh;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 16px;
    margin-bottom: 24px;
}

/* Lightbox */
#lightbox-image {
    max-height: 90vh;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.4);
}

/* Keep preview text from making cards taller */
.featured-events .event-summary {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile adjustments */
@media (max-width: 1024px) {
    .event-poster,
    .event-card img {
        height: 240px;
    }
    .featured-events .event-card {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .event-poster,
    .event-card img {
        height: 220px;
    }
    .grid.lg\:grid-cols-4 > div:first-child {
        margin-bottom: 1.5rem;
    }
}

/* Calendar tweaks */
.calendar-day .flex.items-center {
    font-size: 0.75rem;
    line-height: 1.1;
}