/* ═══════════════════════════════════════════════════
   FULLSCREEN EVENT POPUP
═══════════════════════════════════════════════════ */

.event-fullscreen-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 99999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 22px;
    padding: 20px;
    animation: ewFadeIn 0.3s ease;
}

@keyframes ewFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Close button */
.event-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    z-index: 10;
}

.event-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Stage row: [prev]  [card]  [next] */
.event-stage {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    justify-content: center;
}

/* Nav buttons (sit on dark overlay) */
.event-nav-btn {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.event-nav-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.55);
    transform: scale(1.08);
}

/* White card */
.event-card {
    flex: 1;
    max-width: 640px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    animation: ewPopIn 0.32s ease;
}

@keyframes ewPopIn {
    from { transform: scale(0.94); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.event-card img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.event-card-body {
    padding: 20px 28px 24px;
    text-align: center;
}

.event-card-body h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
    line-height: 1.4;
}

.event-card-body p {
    font-size: 13px;
    color: #666;
    line-height: 1.65;
    margin: 0;
}

/* Bottom bar */
.event-bottom-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
    padding: 0 68px;
    width: 100%;
    box-sizing: border-box;
}

.event-counter {
    font-size: 12px;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.45);
    font-family: monospace;
    min-width: 36px;
    text-align: center;
}

.event-actions {
    display: flex;
    gap: 10px;
}

.btn-view-event,
.btn-all-events {
    padding: 9px 22px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    border: none;
}

.btn-view-event:hover,
.btn-all-events:hover {
    opacity: 0.82;
    transform: translateY(-1px);
}

.btn-view-event {
    background: #9d1c20;
    color: #fff;
}

.btn-all-events {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
}


/* ═══════════════════════════════════════════════════
   HOMEPAGE EVENT LISTING SECTION
═══════════════════════════════════════════════════ */

/* Equal-height cards in the events listing grid */
#events-cards-container .blog-img-text {
    display: flex !important;
    flex-direction: column;
}

#events-cards-container .blog-img img.card-img-top {
    height: 200px;
    object-fit: cover;
    width: 100%;
    display: block;
}

#events-cards-container .blog-text {
    flex: 1;
}

/* Event type badge on competition-page cards */
.event-type-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 6px;
}

.event-type-competition {
    background: rgba(157, 28, 32, 0.08);
    color: #9d1c20;
    border: 1px solid rgba(157, 28, 32, 0.22);
}

.event-type-event {
    background: rgba(30, 90, 160, 0.07);
    color: #1a5aa0;
    border: 1px solid rgba(30, 90, 160, 0.18);
}

/* Short description inside existing .blog-text */
.event-card-desc {
    font-size: 12px;
    color: #777;
    line-height: 1.6;
    margin: 4px 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* "All Events" button */
.events-all-link {
    display: inline-block;
    padding: 10px 34px;
    border: 1.5px solid #9d1c20;
    color: #9d1c20;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.events-all-link:hover {
    background: #9d1c20;
    color: #fff;
    text-decoration: none;
}

/* Loading / error / empty states */
.events-state-wrap {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.events-state-text {
    font-size: 14px;
    color: #999;
    margin: 0;
}

.events-state-error {
    color: #9d1c20;
}

.events-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #eee;
    border-top-color: #9d1c20;
    border-radius: 50%;
    animation: ewSpin 0.75s linear infinite;
}

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


/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .event-stage { gap: 12px; }

    .event-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }

    .event-card img { max-height: 280px; }

    .event-card-body { padding: 16px 20px 20px; }
    .event-card-body h2 { font-size: 16px; }

    .event-bottom-bar { padding: 0 52px; gap: 12px; }
}

@media (max-width: 480px) {
    .event-fullscreen-overlay {
        gap: 16px;
        padding: 64px 10px 20px;
    }

    .event-stage { gap: 8px; }

    .event-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .event-card img { max-height: 220px; }

    .event-card-body { padding: 14px 16px 18px; }
    .event-card-body h2 { font-size: 15px; }
    .event-card-body p  { font-size: 12px; }

    .event-bottom-bar {
        padding: 0;
        flex-wrap: wrap;
        gap: 10px;
    }

    .event-actions { width: 100%; }

    .btn-view-event,
    .btn-all-events {
        flex: 1;
        text-align: center;
        padding: 9px 12px;
    }
}
