:root {
    --loomi-ink: #211d19;
    --loomi-muted: #746a60;
    --loomi-line: rgba(33, 29, 25, 0.12);
    --loomi-paper: #fffaf4;
    --loomi-accent: #a3784b;
    --loomi-card-radius: 14px;
    --loomi-image-radius: 12px;
    --loomi-grid-columns: 3;
    --loomi-card-image-ratio: 4 / 3;
    --loomi-mobile-gallery-columns: 2;
    --loomi-button-color: #a3784b;
    --loomi-button-text-color: #ffffff;
    --loomi-card-overlay-opacity: 0.58;
}

.loomi-events-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(var(--loomi-grid-columns), minmax(0, 1fr));
}

.loomi-events-grid-wrap.is-loading {
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 160ms ease;
}

.loomi-events-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 0 0 34px;
}

.loomi-events-filters button {
    background: #fff;
    border: 1px solid var(--loomi-line);
    border-radius: 999px;
    color: var(--loomi-ink);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 11px 18px;
    text-transform: uppercase;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.loomi-events-filters button:hover,
.loomi-events-filters button.is-active {
    background: var(--loomi-button-color);
    border-color: var(--loomi-button-color);
    color: var(--loomi-button-text-color);
    transform: translateY(-1px);
}

.loomi-events-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 44px;
}

.loomi-events-pagination button {
    align-items: center;
    background: #fff;
    border: 1px solid var(--loomi-line);
    border-radius: 999px;
    color: var(--loomi-ink);
    cursor: pointer;
    display: inline-flex;
    font-weight: 800;
    height: 42px;
    justify-content: center;
    min-width: 42px;
    padding: 0 14px;
}

.loomi-events-pagination button:hover,
.loomi-events-pagination button.is-active {
    background: var(--loomi-button-color);
    border-color: var(--loomi-button-color);
    color: var(--loomi-button-text-color);
}

.loomi-event-card {
    background: #fff;
    border: 1px solid var(--loomi-line);
    border-radius: var(--loomi-card-radius);
    box-shadow: 0 18px 45px rgba(31, 29, 26, 0.07);
    overflow: hidden;
    padding: 12px;
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.loomi-event-card:hover {
    border-color: rgba(163, 120, 75, 0.36);
    box-shadow: 0 24px 60px rgba(31, 29, 26, 0.13);
    transform: translateY(-4px);
}

.loomi-event-card__image {
    aspect-ratio: var(--loomi-card-image-ratio);
    background: #eee9e2;
    border-radius: var(--loomi-image-radius);
    color: var(--loomi-muted);
    display: grid;
    overflow: hidden;
    place-items: center;
    position: relative;
    text-decoration: none;
}

.loomi-event-card__image img {
    border-radius: inherit;
    display: block;
    height: 100%;
    object-fit: cover;
    transition: transform 360ms ease;
    width: 100%;
}

.loomi-event-card__overlay {
    align-items: center;
    background: rgba(20, 16, 12, var(--loomi-card-overlay-opacity));
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
    inset: 0;
    justify-content: center;
    opacity: 1;
    padding: 24px;
    position: absolute;
    text-align: center;
    transition: background-color 220ms ease;
    z-index: 1;
}

.loomi-event-card:hover .loomi-event-card__overlay {
    background: rgba(20, 16, 12, calc(var(--loomi-card-overlay-opacity) + 0.1));
}

.loomi-event-card__overlay-type {
    color: #f3d8b4;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.loomi-event-card__overlay-title {
    color: #fff;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(24px, 2.5vw, 34px);
    font-weight: 700;
    line-height: 1.12;
}

.loomi-event-card:hover .loomi-event-card__image img {
    transform: scale(1.045);
}

.loomi-event-card__content {
    padding: 22px 10px 10px;
    text-align: center;
}

.loomi-event-card__type {
    color: var(--loomi-accent);
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 9px;
    text-transform: uppercase;
}

.loomi-event-card__meta,
.loomi-event-detail__meta {
    color: var(--loomi-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 9px;
    justify-content: center;
    letter-spacing: 0;
    margin-bottom: 14px;
}

.loomi-event-card__meta span + span::before,
.loomi-event-detail__meta span + span::before {
    color: rgba(116, 106, 96, 0.65);
    content: "/";
    margin-right: 9px;
}

.loomi-event-card h3 {
    font-size: clamp(20px, 2vw, 25px);
    line-height: 1.15;
    margin: 0 0 10px;
}

.loomi-event-card h3 a {
    color: var(--loomi-ink);
    text-decoration: none;
}

.loomi-event-card h3 a:hover {
    color: var(--loomi-accent);
}

.loomi-event-card p {
    color: #5c554e;
    font-size: 15px;
    line-height: 1.6;
    margin: 0 auto 20px;
    max-width: 32em;
}

.loomi-event-card__button {
    align-items: center;
    background: var(--loomi-button-color);
    border: 1px solid var(--loomi-button-color);
    border-radius: 999px;
    color: var(--loomi-button-text-color);
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    gap: 8px;
    letter-spacing: 0.06em;
    margin-top: 4px;
    padding: 12px 18px;
    text-decoration: none;
    text-transform: uppercase;
}

.loomi-event-card__button::after {
    content: "->";
    transition: transform 180ms ease;
}

.loomi-event-card__button:hover {
    background: var(--loomi-ink);
    border-color: var(--loomi-ink);
    color: #fff;
}

.loomi-event-card__button:hover::after {
    transform: translateX(4px);
}

.loomi-event-detail {
    margin: 8px auto 0;
    max-width: 1180px;
}

.loomi-event-detail__meta {
    border-bottom: 1px solid var(--loomi-line);
    margin-bottom: 30px;
    padding-bottom: 16px;
}

.loomi-event-detail__gallery {
    margin-top: 28px;
}

.loomi-event-detail__gallery .foogallery {
    margin-left: auto;
    margin-right: auto;
}

.loomi-event-detail__video {
    margin-top: 42px;
}

.loomi-event-detail__video iframe {
    aspect-ratio: 16 / 9;
    height: auto;
    max-width: 100%;
    width: 100%;
}

.loomi-events-empty {
    color: var(--loomi-muted);
}

.loomi-events-archive {
    background: #f6f9fb;
    color: var(--loomi-ink);
}

.loomi-events-archive__hero {
    background: linear-gradient(180deg, #eef4f7 0%, #f6f9fb 100%);
    padding: 92px 24px 76px;
    text-align: center;
}

.loomi-events-archive__hero-inner {
    margin: 0 auto;
    max-width: 760px;
}

.loomi-events-archive__hero span {
    color: var(--loomi-accent);
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.loomi-events-archive__hero h1 {
    color: var(--loomi-ink);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.08;
    margin: 0;
}

.loomi-events-archive__hero p {
    color: var(--loomi-muted);
    font-size: 18px;
    line-height: 1.7;
    margin: 16px auto 0;
    max-width: 620px;
}

.loomi-events-archive__body {
    margin: 0 auto;
    max-width: 1180px;
    padding: 74px 24px 96px;
}

.loomi-single-event {
    background: var(--loomi-paper);
    color: var(--loomi-ink);
}

.loomi-single-event__hero {
    align-items: center;
    background: #211d19;
    display: grid;
    min-height: min(72vh, 720px);
    padding: 120px 24px;
    position: relative;
    text-align: center;
}

.loomi-single-event__hero.has-image {
    background-image:
        linear-gradient(rgba(20, 16, 12, var(--loomi-card-overlay-opacity)), rgba(20, 16, 12, var(--loomi-card-overlay-opacity))),
        var(--loomi-event-hero);
    background-position: center;
    background-size: cover;
}

.loomi-single-event__hero-inner {
    margin: 0 auto;
    max-width: 980px;
    width: 100%;
}

.loomi-single-event__type {
    color: #f3d8b4;
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.11em;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.loomi-single-event__hero h1 {
    color: #fff;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(42px, 7vw, 86px);
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.02;
    margin: 0 auto;
    max-width: 980px;
}

.loomi-single-event__meta {
    color: #f7efe6;
    display: flex;
    flex-wrap: wrap;
    font-size: 16px;
    gap: 12px;
    justify-content: center;
    margin-top: 22px;
}

.loomi-single-event__meta span + span::before {
    color: rgba(247, 239, 230, 0.62);
    content: "/";
    margin-right: 12px;
}

.loomi-single-event__body {
    margin: 0 auto;
    max-width: 1180px;
    padding: 64px 24px 82px;
}

.loomi-single-event__intro {
    border-bottom: 1px solid var(--loomi-line);
    margin-bottom: 52px;
    padding-bottom: 42px;
}

.loomi-single-event__excerpt {
    color: #453d36;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.25;
    margin: 0;
    max-width: 900px;
}

.loomi-single-event__content {
    color: #5c554e;
    font-size: 18px;
    line-height: 1.75;
    margin-top: 24px;
    max-width: 780px;
}

.loomi-single-event__section-title {
    margin-bottom: 28px;
    text-align: center;
}

.loomi-single-event__section-title span {
    color: var(--loomi-accent);
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.loomi-single-event__section-title h2 {
    color: var(--loomi-ink);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 600;
    line-height: 1.12;
    margin: 0;
}

.loomi-single-event__gallery {
    margin: 0 auto;
}

.loomi-single-event__gallery .foogallery {
    margin-left: auto;
    margin-right: auto;
}

.loomi-single-event__gallery .foogallery .fg-item,
.loomi-single-event__gallery .foogallery .fg-thumb,
.loomi-single-event__gallery .foogallery .fg-image,
.loomi-single-event__gallery .foogallery a,
.loomi-single-event__gallery .foogallery figure,
.loomi-single-event__gallery .foogallery div {
    border-radius: var(--loomi-image-radius) !important;
}

.loomi-single-event__gallery .foogallery .fg-item,
.loomi-single-event__gallery .foogallery .fg-thumb,
.loomi-single-event__gallery .foogallery a,
.loomi-single-event__gallery .foogallery figure {
    overflow: hidden !important;
}

.loomi-single-event__gallery .foogallery img,
.loomi-single-event__gallery .foogallery .fg-image img {
    border-radius: var(--loomi-image-radius) !important;
    display: block;
}

.loomi-single-event__video {
    margin: 56px auto 0;
    max-width: 980px;
}

.loomi-single-event__video iframe {
    aspect-ratio: 16 / 9;
    height: auto;
    width: 100%;
}

.loomi-single-event__back {
    border-top: 1px solid var(--loomi-line);
    margin-top: 64px;
    padding-top: 28px;
    text-align: center;
}

.loomi-single-event__back a {
    background: var(--loomi-button-color);
    border-radius: 999px;
    color: var(--loomi-button-text-color);
    display: inline-flex;
    font-weight: 700;
    padding: 13px 20px;
    text-decoration: none;
}

.loomi-single-event__back a:hover {
    background: var(--loomi-ink);
    color: #fff;
}

@media (max-width: 1024px) {
    .loomi-events-grid {
        gap: 22px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .loomi-events-archive__hero {
        padding: 64px 18px 54px;
    }

    .loomi-events-archive__body {
        padding: 46px 18px 72px;
    }

    .loomi-single-event__hero {
        min-height: 58vh;
        padding: 92px 18px 50px;
    }

    .loomi-single-event__body {
        padding: 42px 18px 64px;
    }

    .loomi-single-event__intro {
        margin-bottom: 40px;
        padding-bottom: 32px;
    }

    .loomi-events-grid {
        grid-template-columns: 1fr;
    }

    .loomi-events-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 6px;
        scrollbar-width: thin;
    }

    .loomi-events-filters button {
        flex: 0 0 auto;
    }

    .loomi-single-event__gallery .foogallery,
    .loomi-single-event__gallery .foogallery.fg-default,
    .loomi-single-event__gallery .foogallery.fg-masonry,
    .loomi-single-event__gallery .foogallery.fg-justified,
    .loomi-single-event__gallery .foogallery.fg-responsive {
        display: grid !important;
        gap: 10px !important;
        grid-template-columns: repeat(var(--loomi-mobile-gallery-columns), minmax(0, 1fr)) !important;
    }

    .loomi-single-event__gallery .foogallery .fg-item,
    .loomi-single-event__gallery .foogallery .fg-thumb,
    .loomi-single-event__gallery .foogallery a,
    .loomi-single-event__gallery .foogallery figure,
    .loomi-single-event__gallery .foogallery img {
        height: auto !important;
        margin: 0 !important;
        max-width: 100% !important;
        position: static !important;
        width: 100% !important;
    }

    .loomi-single-event__gallery .foogallery img {
        aspect-ratio: 1 / 1;
        object-fit: cover;
    }

    .loomi-event-card__image {
        aspect-ratio: var(--loomi-card-image-ratio);
    }

    .loomi-event-card__content {
        padding: 17px;
    }
}
