/* Upcoming Events page */

.page-events {
    padding-bottom: calc(var(--nav-height) + var(--safe-bottom));
}

.icon-btn {
    text-decoration: none;
    color: var(--text);
}

.events-main {
    padding: 12px 14px 24px;
}

.events-header {
    padding: 10px 6px 22px;
}

.events-header__title {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 8px;
}

.events-header__subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.4;
}

.events-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 40px 16px;
}

/* 3-column grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.event-card {
    min-width: 0;
    display: block;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s;
}

.event-card:active {
    transform: scale(0.98);
}

.event-card__media {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 3 / 4.6;
    background: #1a1a1a;
}

.event-card__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Placeholder gradients when no image uploaded */
.event-card__bg--1 { background: linear-gradient(160deg, #1e3a5f 0%, #0d1b2a 100%); }
.event-card__bg--2 { background: linear-gradient(160deg, #4a3728 0%, #1a1208 100%); }
.event-card__bg--3 { background: linear-gradient(160deg, #2d4a3e 0%, #0f1f18 100%); }
.event-card__bg--4 { background: linear-gradient(160deg, #3d5a80 0%, #1b2838 100%); }
.event-card__bg--5 { background: linear-gradient(160deg, #5c4033 0%, #2a1810 100%); }
.event-card__bg--6 { background: linear-gradient(160deg, #4a2c4a 0%, #1a0f1a 100%); }

.event-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.92) 0%,
        rgba(0, 0, 0, 0.45) 45%,
        rgba(0, 0, 0, 0.1) 100%
    );
    pointer-events: none;
}

.event-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 2;
}

.event-card__badge-month {
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text);
}

.event-card__badge-day {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 1px;
}

.event-card__info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 10px 12px;
    z-index: 2;
}

.event-card__title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-card__meta,
.event-card__location {
    font-size: 0.58rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-card__location {
    margin-top: 1px;
}

.events-footer {
    display: flex;
    justify-content: center;
    padding: 28px 16px 16px;
}

.events-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 340px;
    height: 56px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--accent);
    background: transparent;
    border: 2px solid var(--accent);
    transition: transform 0.12s, background 0.15s;
}

.events-view-all:active {
    transform: scale(0.98);
    background: rgba(75, 179, 230, 0.08);
}

@media (min-width: 400px) {
    .event-card__title {
        font-size: 0.85rem;
    }

    .event-card__meta,
    .event-card__location {
        font-size: 0.63rem;
    }

    .event-card__badge {
        width: 52px;
        height: 52px;
    }
}

/* ── Single event page ── */

.page-event-single {
    padding-bottom: calc(var(--nav-height) + var(--safe-bottom));
}

.event-single__hero {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #1a1a1a;
    overflow: hidden;
}

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

.event-single__hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 50%);
    pointer-events: none;
}

.event-single__badge {
    position: absolute;
    bottom: 16px;
    left: 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 2;
}

.event-single__badge-month {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.event-single__badge-day {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 2px;
}

.event-single__body {
    padding: 24px 20px 32px;
}

.event-single__title {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 20px;
    color: var(--text);
}

.event-single__meta-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.event-single__meta {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.event-single__meta svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    fill: var(--accent);
    margin-top: 2px;
}

.event-single__meta-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 2px;
}

.event-single__meta-value {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.4;
}

.event-single__meta-sub {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 2px;
}

.event-single__description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 28px;
}

.event-single__description--muted {
    color: rgba(255, 255, 255, 0.55);
}

.event-single__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 54px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--button-text);
    background: transparent;
    border: 2px solid var(--accent);
    transition: transform 0.12s, background 0.15s;
}

.event-single__cta:active {
    transform: scale(0.98);
    background: rgba(75, 179, 230, 0.1);
}
