/*
 * Nadchodzące wydarzenia: the nearest event on burgundy with a countdown,
 * then the others as rows grouped by month. Each kind has its colour.
 */

.events-page {
    --kind-wieczor: var(--c-accent);
    --kind-sniadanie: #8F4C1C;
    position: relative;
    isolation: isolate;
    overflow-x: clip;
    padding-bottom: clamp(80px, 9vw, 140px);
    background: var(--c-sand);
}

.events-page__inner {
    position: relative;
    z-index: 2;
    max-width: calc(1180px + 2 * var(--gutter));
    margin: clamp(20px, 4vw, 56px) auto 0;
    padding: 0 var(--gutter);
}

.events-page__title {
    margin: .3em 0 0;
    font-family: var(--font-title);
    font-weight: 400;
    font-size: clamp(1.719rem, 3.45vw, 3.438rem);
    line-height: 1.1;
    color: var(--c-accent);
    text-wrap: balance;
}

.events-page__intro { margin: .7em 0 0; font-size: clamp(1rem, 1.2vw, 1.125rem); color: var(--c-ink-2); }

/* ---------- the nearest event ---------- */

.events-hl {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    margin-top: clamp(30px, 3.4vw, 48px);
    overflow: hidden;
    border-radius: 26px;
    color: var(--c-cream);
    background:
        radial-gradient(ellipse 80% 90% at 10% 0%, #86213A 0, transparent 65%),
        radial-gradient(ellipse 60% 70% at 100% 100%, #4A0B16 0, transparent 70%),
        var(--c-accent);
    box-shadow: 0 40px 70px -40px rgba(60, 10, 20, .75);
}

.events-hl :focus-visible { outline-color: var(--c-cream); }

.events-hl__text { position: relative; z-index: 2; padding: clamp(28px, 3.8vw, 56px); }

.events-hl__kick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--c-gold);
}

.events-hl__kick::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--c-gold);
    animation: events-ping 2s ease-out infinite;
}

@keyframes events-ping {
    from { box-shadow: 0 0 0 0 rgba(217, 184, 143, .6); }
    to { box-shadow: 0 0 0 10px rgba(217, 184, 143, 0); }
}

.events-hl__type { padding: 3px 10px; border-radius: 999px; background: rgba(244, 233, 220, .12); color: var(--c-cream); letter-spacing: .14em; }

.events-hl__title {
    margin: 18px 0 0;
    font-family: var(--font-title);
    font-weight: 400;
    font-size: clamp(1.5rem, 2.5vw, 2.375rem);
    line-height: 1.1;
    text-wrap: balance;
}

.events-hl__meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 1rem; color: var(--c-cream-2); }
.events-hl__meta li { display: flex; align-items: center; gap: 8px; }
.events-hl__meta svg { flex: none; width: 18px; height: 18px; color: var(--c-gold); }

.events-count { display: flex; gap: 10px; margin-top: clamp(22px, 2.6vw, 32px); }

.events-count div {
    min-width: clamp(68px, 6vw, 88px);
    padding: 12px 8px 10px;
    border-radius: 14px;
    text-align: center;
    background: rgba(244, 233, 220, .08);
    box-shadow: inset 0 0 0 1px rgba(244, 233, 220, .18);
}

.events-count b { display: block; font-family: var(--font-title); font-weight: 400; font-size: clamp(1.5rem, 2.1vw, 2rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.events-count span { display: block; margin-top: 4px; font-size: 0.75rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(244, 233, 220, .75); }

.events-hl__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(22px, 2.6vw, 32px); }

.events-hl__photo { position: relative; min-height: 100%; margin: 0; }
.events-hl__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.events-hl__photo::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, var(--c-accent) 0, rgba(110, 20, 35, 0) 38%),
        linear-gradient(0deg, rgba(40, 5, 12, .65) 0, rgba(40, 5, 12, 0) 45%);
}

.events-hl__big {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 2;
    margin: 0;
    padding: 14px 18px 12px;
    border-radius: 18px;
    text-align: center;
    font-family: var(--font-title);
    font-size: clamp(2.25rem, 3.6vw, 3.25rem);
    line-height: 1;
    color: var(--c-cream);
    background: rgba(86, 15, 27, .82);
    box-shadow: 0 14px 30px -12px rgba(30, 0, 8, .6), inset 0 0 0 1px rgba(217, 184, 143, .45);
    backdrop-filter: blur(4px);
}

.events-hl__big small { display: block; margin-top: 8px; font-family: var(--font-sans); font-size: 0.75rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--c-gold); }

/* ---------- the list ---------- */

.events-list { margin: clamp(30px, 3.4vw, 48px) 0 0; padding: 0; list-style: none; }

.events-month {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 30px 0 14px;
    font-family: var(--font-title);
    font-size: clamp(1.125rem, 1.5vw, 1.375rem);
    color: var(--c-accent);
}

.events-month:first-child { margin-top: 0; }
.events-month::after { content: ""; flex: 1; height: 1px; background: rgba(110, 20, 35, .14); align-self: center; }
.events-month small { font-family: var(--font-sans); font-size: 0.8125rem; font-weight: 500; letter-spacing: .18em; color: var(--c-ink-2); }

.events-row {
    --kind: var(--kind-wieczor);
    position: relative;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px clamp(18px, 2.4vw, 34px);
    margin: 0 0 12px;
    padding: 16px clamp(16px, 2vw, 26px) 16px 16px;
    border-radius: 18px;
    background: var(--c-white);
    box-shadow: 0 18px 34px -28px rgba(80, 30, 25, .55), inset 0 0 0 1px rgba(110, 20, 35, .06);
    transition: transform .3s, box-shadow .3s;
}

.events-row:hover { transform: translateY(-2px); box-shadow: 0 26px 40px -26px rgba(80, 30, 25, .55), inset 0 0 0 1px rgba(110, 20, 35, .1); }
.events-row--sniadanie { --kind: var(--kind-sniadanie); }

/* the kind's colour along the left edge */
.events-row::before {
    content: "";
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 0;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--kind);
}

.events-row__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 96px;
    border-radius: 14px;
    background: var(--c-ivory);
    box-shadow: inset 0 0 0 1px rgba(110, 20, 35, .1);
    text-align: center;
}

.events-row__date b { font-family: var(--font-title); font-weight: 400; font-size: 1.875rem; line-height: 1; color: var(--c-accent); }
.events-row__date span { margin-top: 5px; font-size: 0.75rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--c-ink-2); }
.events-row__date small { font-size: 0.8125rem; color: var(--c-ink-2); }

.events-row__info { min-width: 0; }

.events-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }

.events-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--kind);
    background: color-mix(in srgb, var(--kind) 10%, transparent);
}

.events-tag svg { width: 15px; height: 15px; }
.events-tag--soon { color: var(--c-ink-2); background: rgba(75, 63, 64, .08); }
.events-tag--hot { color: #8A5A12; background: #F7E8CF; }

.events-row__title {
    margin: 10px 0 0;
    font-family: var(--font-title);
    font-weight: 400;
    font-size: clamp(1.0625rem, 1.35vw, 1.25rem);
    line-height: 1.25;
    color: var(--c-ink);
    text-wrap: balance;
}

.events-row__title a { text-decoration: none; }
.events-row__title a:hover { color: var(--c-accent); }
/* the whole row opens the event */
.events-row__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

.events-row__meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 6px 0 0; font-size: 0.9375rem; color: var(--c-ink-2); }
.events-row__meta span { display: inline-flex; align-items: center; gap: 6px; }
.events-row__meta svg { flex: none; width: 16px; height: 16px; color: var(--c-accent); }

.events-row__side { position: relative; z-index: 2; display: flex; align-items: center; gap: clamp(14px, 1.8vw, 24px); }

.events-row__price { margin: 0; text-align: right; }
.events-row__price b { display: block; font-family: var(--font-title); font-weight: 400; font-size: clamp(1.0625rem, 1.4vw, 1.3125rem); line-height: 1.1; white-space: nowrap; }
.events-row__price span { display: block; margin-top: 4px; font-size: 0.8125rem; color: var(--c-ink-2); white-space: nowrap; }

.events-row__ics {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--c-accent);
    box-shadow: inset 0 0 0 1.3px rgba(110, 20, 35, .3);
    transition: background .2s, color .2s;
}

.events-row__ics:hover { background: var(--c-accent); color: #fff; }
.events-row__ics svg { width: 19px; height: 19px; }

.events-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: clamp(18px, 2vw, 26px) 0 0; font-size: 0.875rem; color: var(--c-ink-2); }
.events-legend span { display: inline-flex; align-items: center; gap: 8px; }
.events-legend__dot { width: 9px; height: 9px; border-radius: 50%; }
.events-legend__dot--wieczor { background: var(--kind-wieczor); }
.events-legend__dot--sniadanie { background: var(--kind-sniadanie); }

.events-empty { margin-top: clamp(30px, 3.4vw, 48px); padding: clamp(24px, 3vw, 40px); border-radius: 18px; background: var(--c-ivory); text-align: center; color: var(--c-ink-2); }
.events-empty p { max-width: 34em; margin: 0 auto 20px; }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
    .events-hl { grid-template-columns: minmax(0, 1fr); }
    .events-hl__photo { order: -1; min-height: 220px; }
    .events-hl__photo::before { background: linear-gradient(0deg, var(--c-accent) 0, rgba(110, 20, 35, 0) 55%); }
}

@media (max-width: 760px) {
    /* the date tile becomes one line above the details */
    .events-row { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px 16px 16px 18px; }
    .events-row__date { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 8px; width: fit-content; height: auto; padding: 8px 14px; border-radius: 12px; }
    .events-row__date b { font-size: 1.375rem; }
    .events-row__date span { margin: 0; }
    .events-row__side { grid-column: 1 / -1; justify-content: space-between; padding-top: 12px; border-top: 1px dashed rgba(110, 20, 35, .14); }
    .events-row__price { margin-right: auto; text-align: left; }
}

@media (max-width: 420px) {
    .events-count div { flex: 1; min-width: 0; }
    .events-hl__cta .btn { flex: 1 1 100%; justify-content: center; }
    .events-row__side .btn { padding-inline: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .events-hl__kick::before { animation: none; }
    .events-row:hover { transform: none; }
}
