/* ---------- Layout helpers ---------- */
/* Give space under your fixed Vue header.
If your header component exposes a CSS variable, use that; otherwise a sane default. */
.ei-header-offset {
    height: var(--ei-header-height, 88px);
}

/* Hero section with subtle overlay for contrast on dark backgrounds */
.easti-hero {
    position: relative;
    padding: 32px 0 20px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0));
    backdrop-filter: saturate(110%) blur(2px);
}

.easti-hero__title {
    margin: 0;
    font-size: clamp(1.5rem, 2.5vw, 2.25rem);
    line-height: 1.15;
    color: var(--easti-hero-title, #fff);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

.easti-hero__desc {
    margin-top: 8px;
    max-width: 70ch;
    color: rgba(255, 255, 255, .9);
}

/* Grid tuned for horizontal cards: give each item more width */
.easti-event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(560px, 1fr));
    gap: 28px;
    align-items: stretch;
}

/* If your EventBlock has its own internal card paddings, keep wrapper minimal */
.event-block-container {
    display: block;
    height: 100%;
    width: 100%;
}

/* Pagination + empty state */
.easti-pagination {
    margin: 28px 0 48px;
}

.easti-empty {
    opacity: .85;
    padding: 24px 0 48px;
}

/* ---------- Dark-background readability ----------
If the page background is dark, these ensure contrast without fighting theme colors */
.easti-events-archive {
    --easti-hero-title: #fff;
}

.easti-events-archive .pagination .page-numbers {
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .15);
    padding: 6px 10px;
}

.easti-events-archive .pagination .current {
    background: rgba(255, 255, 255, .12);
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 1024px) {
    .easti-event-grid {
        grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 720px) {
    .ei-header-offset {
        height: var(--ei-header-height-mobile, 72px);
    }

    .easti-hero {
        padding: 24px 0 14px;
    }

    .easti-event-grid {
        grid-template-columns: 1fr;
    }
}

/* Disable the hero blur on small screens (keeps contrast via gradient) */
@media (max-width: 720px) {
    .easti-hero {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* If EventBlock is inside the archive, remove its backdrop blur on mobile */
@media (max-width: 720px) {
    .easti-events-archive .event-block-container article {
        /* Tailwind's `backdrop-blur` sets `backdrop-filter: blur(...)`.
           Neutralize it here to avoid softening the card. */
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        /* also avoid transforms on mobile to prevent raster scaling */
        transform: none !important;
    }
}

@media (hover: none) and (pointer: coarse) {
    .easti-events-archive .event-block-container article {
        transform: none !important;
    }
}
