*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

:root {
    --bg: hsl(220, 15%, 97%);
    --fg: hsl(220, 25%, 10%);
    --card: hsl(0, 0%, 100%);
    --muted: hsl(220, 15%, 93%);
    --muted-fg: hsl(220, 10%, 42%);
    --border: hsl(220, 15%, 88%);
    --red: hsl(355, 78%, 50%);
    --blue: hsl(205, 85%, 50%);
    --orange: hsl(25, 90%, 55%);
    --pink: hsl(330, 80%, 55%);
    --gold: hsl(40, 70%, 50%);
    --font-display: 'Playfair Display', serif;
    --font-body: 'DM Sans', sans-serif;
}

html {
    scroll-behavior: smooth
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    overflow-x: hidden
}

h1,
h2,
h3 {
    font-family: var(--font-display)
}

a {
    text-decoration: none;
    color: inherit
}

img {
    max-width: 100%;
    display: block
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem
}

.text-gradient {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-style: italic;
    background: linear-gradient(90deg, var(--red), var(--orange), var(--pink), var(--blue), var(--red));
    background-size: 400% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 6s ease infinite;
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }
}

/* NAV */
.nav {
    background: hsla(220, 15%, 97%, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 0
}

.nav-logo {
    height: 56px
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--muted-fg);
    transition: color .3s
}

.back-link:hover {
    color: var(--red)
}

.back-link svg {
    width: 16px;
    height: 16px
}

/* HERO */
.hero {
    position: relative;
    padding: 5rem 0;
    text-align: center;
    overflow: hidden
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .06;
    background: linear-gradient(135deg, var(--red), var(--orange), var(--pink), var(--blue))
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem
}

.hero h1 span {
    color: var(--red)
}

.hero p {
    font-size: 1.1rem;
    color: var(--muted-fg);
    max-width: 600px;
    margin: 0 auto
}

/* FILTERS */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    margin: -1rem 0 2.5rem
}

.filter-btn {
    padding: .5rem 1.25rem;
    border-radius: 999px;
    font-size: .875rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--muted-fg);
    cursor: pointer;
    transition: all .3s
}

.filter-btn:hover {
    border-color: hsla(355, 78%, 50%, 0.3);
    color: var(--fg)
}

.filter-btn.active {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
    box-shadow: 0 4px 16px -4px hsla(355, 78%, 50%, 0.4)
}

/* GRID */
.events-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    padding-bottom: 5rem
}

/* CARD */
.event-card {
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all .3s;
    cursor: pointer
}

.event-card:hover {
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px)
}

.event-card .img-wrap {
    position: relative;
    height: 200px;
    overflow: hidden
}

.event-card .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s
}

.event-card:hover .img-wrap img {
    transform: scale(1.08)
}

.cat-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    color: #fff
}

.cat-koncert {
    background: var(--blue)
}

.cat-gala {
    background: var(--pink)
}

.cat-festiwal {
    background: var(--orange)
}

.cat-korporacyjny {
    background: var(--gold)
}

.cat-teatr {
    background: var(--red)
}

.date-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: hsla(220, 15%, 97%, 0.95);
    backdrop-filter: blur(6px);
    border-radius: 8px;
    padding: 6px 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1)
}

.date-badge .month {
    display: block;
    font-size: .7rem;
    font-weight: 700;
    color: var(--red);
    line-height: 1
}

.date-badge .day {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-display);
    line-height: 1;
    margin-top: 2px
}

.event-card .content {
    padding: 1.25rem
}

.event-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: .5rem;
    line-height: 1.3
}

.meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: .75rem
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    color: var(--muted-fg)
}

.meta-item svg {
    width: 14px;
    height: 14px;
    color: var(--red);
    flex-shrink: 0
}

.event-card .desc {
    font-size: .875rem;
    color: var(--muted-fg);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.tickets-section {
    border-top: 1px solid var(--border);
    padding-top: 1rem
}

.tickets-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .75rem;
    color: var(--muted-fg);
    font-weight: 600;
    margin-bottom: .5rem
}

.tickets-label svg {
    width: 13px;
    height: 13px
}

.ticket-links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem
}

.ticket-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 999px;
    background: hsla(355, 78%, 50%, 0.1);
    color: var(--red);
    font-size: .75rem;
    font-weight: 600;
    transition: all .3s
}

.ticket-link:hover {
    background: var(--red);
    color: #fff
}

.ticket-link svg {
    width: 10px;
    height: 10px
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity .3s
}

.modal-overlay.open {
    display: flex;
    opacity: 1
}

.modal {
    background: var(--card);
    border-radius: 16px;
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modal-in .3s ease
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: hsla(0, 0%, 100%, 0.85);
    backdrop-filter: blur(4px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background .2s
}

.modal-close:hover {
    background: var(--border)
}

.modal-close svg {
    width: 18px;
    height: 18px
}

.modal .modal-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 16px 16px 0 0
}

.modal .modal-body {
    padding: 1.5rem 2rem 2rem
}

.modal .modal-cat {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: .75rem
}

.modal h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3
}

.modal .modal-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 1.25rem
}

.modal .modal-meta .meta-item {
    font-size: .9rem
}

.modal .modal-desc {
    font-size: .95rem;
    color: var(--muted-fg);
    line-height: 1.8;
    margin-bottom: 1.5rem
}

.modal .modal-tickets {
    border-top: 1px solid var(--border);
    padding-top: 1.25rem
}

.modal .modal-tickets .tickets-label {
    font-size: .85rem;
    margin-bottom: .75rem
}

.modal .modal-tickets .ticket-link {
    padding: 6px 16px;
    font-size: .8rem
}

/* FOOTER */
.footer {
    background: var(--fg);
    color: hsla(0, 0%, 100%, 0.6);
    padding: 2rem 0;
    text-align: center
}

.footer img {
    height: 48px;
    margin: 0 auto 1rem;
    filter: brightness(0) invert(1)
}

.footer p {
    font-size: .85rem
}

/* REVEAL */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all .6s ease
}

.reveal.visible {
    opacity: 1;
    transform: none
}

@media(max-width:600px) {
    .events-grid {
        grid-template-columns: 1fr
    }

    .modal .modal-body {
        padding: 1.25rem
    }
}

.modal-desc p {
    margin-bottom: 1em;
    line-height: 1.6;
}

.modal-desc {
    font-size: 0.95rem;
    color: #ccc;
}