/* Barkcloth Center Events
 * Event list enhancements and long-form single-event content.
 */

.bcc-event-card {
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.bcc-event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(74, 52, 37, 0.10);
}

.bcc-event-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bcc-event-status-upcoming {
    color: var(--clay-orange);
    background: rgba(200, 98, 47, 0.10);
}

.bcc-event-status-past {
    color: var(--bark-brown);
    background: var(--natural-beige);
}

.bcc-event-status-upcoming-light,
.bcc-event-status-past-light {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
}

.bcc-event-primary-link,
.bcc-event-secondary-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.bcc-event-primary-link {
    color: var(--clay-orange);
}

.bcc-event-primary-link:hover {
    color: var(--bark-brown);
}

.bcc-event-secondary-link {
    color: var(--bark-brown);
    text-decoration: underline;
    text-underline-offset: 0.25rem;
    text-decoration-thickness: 1px;
}

.bcc-event-secondary-link:hover {
    color: var(--clay-orange);
}

.bcc-event-back-link {
    display: inline-flex;
    align-items: center;
    color: var(--natural-beige);
    font-weight: 600;
    transition: color 150ms ease;
}

.bcc-event-back-link:hover {
    color: #fff;
}

.bcc-event-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.bcc-event-fact {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.bcc-event-fact-label {
    color: #766b64;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.bcc-event-fact strong {
    color: var(--bark-brown);
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.bcc-event-featured-image {
    margin: 0 0 3rem;
    overflow: hidden;
    border-radius: 0.75rem;
    background: var(--natural-beige);
}

.bcc-event-featured-image img {
    display: block;
    max-height: 620px;
}

.bcc-event-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 3.5rem;
    align-items: start;
}

.bcc-event-content {
    min-width: 0;
    color: var(--charcoal);
    font-size: 1.05rem;
    line-height: 1.8;
}

.bcc-event-section-kicker {
    margin: 0 0 0.5rem !important;
    color: var(--clay-orange) !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.16em !important;
    line-height: 1.4 !important;
    text-transform: uppercase;
}

.bcc-event-content > h2:first-of-type {
    margin-top: 0;
}

.bcc-event-content h2 {
    margin: 2.25rem 0 1rem;
    color: var(--bark-brown);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    line-height: 1.2;
    font-weight: 500;
}

.bcc-event-content h3 {
    margin: 1.8rem 0 0.75rem;
    color: var(--bark-brown);
    font-size: 1.45rem;
    line-height: 1.3;
    font-weight: 600;
}

.bcc-event-content h4 {
    margin: 1.5rem 0 0.65rem;
    color: var(--bark-brown);
    font-size: 1.15rem;
    font-weight: 700;
}

.bcc-event-content p,
.bcc-event-content ul,
.bcc-event-content ol,
.bcc-event-content blockquote,
.bcc-event-content figure,
.bcc-event-content .wp-block-embed,
.bcc-event-content .wp-block-gallery {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.bcc-event-content ul,
.bcc-event-content ol {
    padding-left: 1.5rem;
}

.bcc-event-content ul {
    list-style: disc;
}

.bcc-event-content ol {
    list-style: decimal;
}

.bcc-event-content li + li {
    margin-top: 0.4rem;
}

.bcc-event-content a {
    color: var(--clay-orange);
    text-decoration: underline;
    text-underline-offset: 0.2rem;
}

.bcc-event-content a:hover {
    color: var(--bark-brown);
}

.bcc-event-content blockquote {
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--clay-orange);
    background: #faf7f3;
    color: var(--bark-brown);
    font-size: 1.12rem;
}

.bcc-event-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.55rem;
}

.bcc-event-content figcaption {
    margin-top: 0.55rem;
    color: #766b64;
    font-size: 0.86rem;
    line-height: 1.5;
}

.bcc-event-content .wp-block-gallery {
    gap: 0.75rem;
}

.bcc-event-content .wp-block-gallery figure {
    margin-bottom: 0;
}

.bcc-event-content .wp-block-embed__wrapper,
.bcc-event-content .wp-block-video {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0.65rem;
}

.bcc-event-content .wp-block-embed.is-type-video .wp-block-embed__wrapper {
    aspect-ratio: 16 / 9;
}

.bcc-event-content .wp-block-embed.is-type-video iframe,
.bcc-event-content iframe {
    width: 100%;
    max-width: 100%;
}

.bcc-event-content .wp-block-embed.is-type-video iframe {
    height: 100%;
}

.bcc-event-sidebar {
    position: sticky;
    top: 7rem;
}

.bcc-event-action-card {
    padding: 1.6rem;
    border: 2px solid var(--natural-beige);
    border-radius: 0.75rem;
    background: #fff;
}

.bcc-event-action-card h2 {
    margin: 0 0 0.75rem;
    color: var(--bark-brown);
    font-size: 1.5rem;
    line-height: 1.25;
    font-weight: 600;
}

.bcc-event-action-card > p:not(.bcc-event-section-kicker) {
    margin: 0 0 1.25rem;
    color: var(--charcoal);
    line-height: 1.65;
}

.bcc-event-register-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.375rem;
    background: var(--clay-orange);
    color: #fff;
    font-weight: 600;
    transition: background-color 150ms ease;
}

.bcc-event-register-button:hover {
    background: var(--bark-brown);
}

@media (max-width: 900px) {
    .bcc-event-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .bcc-event-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .bcc-event-featured-image {
        margin-bottom: 2rem;
        border-radius: 0.5rem;
    }

    .bcc-event-content {
        font-size: 1rem;
        line-height: 1.75;
    }

    .bcc-event-action-card {
        padding: 1.25rem;
    }
}

/* Event gallery upgrade (1.2.1)
 * Gutenberg galleries become a generous responsive grid. Images open in a
 * theme-owned lightbox, so editors can keep using the native Gallery block.
 */
.bcc-event-content .wp-block-gallery,
.bcc-event-content .wp-block-gallery.has-nested-images {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 1rem !important;
    width: 100%;
    align-items: stretch;
}

.bcc-event-content .wp-block-gallery > *,
.bcc-event-content .wp-block-gallery.has-nested-images > figure.wp-block-image,
.bcc-event-content .wp-block-gallery .blocks-gallery-item {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
}

.bcc-event-content .wp-block-gallery figure.wp-block-image,
.bcc-event-content .wp-block-gallery .blocks-gallery-item figure {
    position: relative;
    overflow: hidden;
    border-radius: 0.65rem;
    background: var(--natural-beige);
}

.bcc-event-content .wp-block-gallery figure.wp-block-image img,
.bcc-event-content .wp-block-gallery .blocks-gallery-item img {
    display: block;
    width: 100% !important;
    max-width: none !important;
    height: clamp(220px, 28vw, 320px) !important;
    object-fit: cover;
    border-radius: 0;
    cursor: zoom-in;
    transition: transform 220ms ease, filter 220ms ease;
}

.bcc-event-content .wp-block-gallery figure.wp-block-image:hover img,
.bcc-event-content .wp-block-gallery .blocks-gallery-item:hover img {
    transform: scale(1.025);
    filter: brightness(0.94);
}

.bcc-event-content .wp-block-gallery figure.wp-block-image a,
.bcc-event-content .wp-block-gallery .blocks-gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.bcc-event-content .wp-block-gallery figure.wp-block-image figcaption,
.bcc-event-content .wp-block-gallery .blocks-gallery-item figcaption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    margin: 0;
    padding: 2rem 0.85rem 0.75rem;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
    font-size: 0.82rem;
    line-height: 1.4;
    pointer-events: none;
}

.bcc-event-gallery-trigger:focus-visible {
    outline: 3px solid var(--clay-orange);
    outline-offset: 4px;
}

body.bcc-event-lightbox-open {
    overflow: hidden;
}

.bcc-event-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(21, 16, 13, 0.96);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 180ms ease;
}

.bcc-event-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.bcc-event-lightbox__stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: min(1200px, 100%);
    height: min(90vh, 900px);
}

.bcc-event-lightbox__image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(90vh - 110px);
    object-fit: contain;
    border-radius: 0.4rem;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.bcc-event-lightbox__caption {
    max-width: 900px;
    margin: 0.85rem auto 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.92rem;
    line-height: 1.5;
    text-align: center;
}

.bcc-event-lightbox__counter {
    position: absolute;
    top: 0.4rem;
    left: 0.5rem;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.78rem;
    font-weight: 600;
}

.bcc-event-lightbox__close,
.bcc-event-lightbox__nav {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.38);
    color: #fff;
    cursor: pointer;
    transition: background-color 150ms ease, transform 150ms ease;
}

.bcc-event-lightbox__close:hover,
.bcc-event-lightbox__nav:hover {
    background: var(--clay-orange);
}

.bcc-event-lightbox__close:focus-visible,
.bcc-event-lightbox__nav:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.bcc-event-lightbox__close {
    top: 1rem;
    right: 1rem;
    font-size: 1.7rem;
    line-height: 1;
}

.bcc-event-lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.9rem;
    line-height: 1;
}

.bcc-event-lightbox__nav:hover {
    transform: translateY(-50%) scale(1.05);
}

.bcc-event-lightbox__prev {
    left: 1rem;
}

.bcc-event-lightbox__next {
    right: 1rem;
}

.bcc-event-lightbox.has-single-image .bcc-event-lightbox__nav {
    display: none;
}

@media (max-width: 640px) {
    .bcc-event-content .wp-block-gallery,
    .bcc-event-content .wp-block-gallery.has-nested-images {
        grid-template-columns: 1fr;
        gap: 0.8rem !important;
    }

    .bcc-event-content .wp-block-gallery figure.wp-block-image img,
    .bcc-event-content .wp-block-gallery .blocks-gallery-item img {
        height: min(72vw, 360px) !important;
    }

    .bcc-event-lightbox {
        padding: 4.5rem 0.75rem 1rem;
    }

    .bcc-event-lightbox__stage {
        height: calc(100vh - 5.5rem);
    }

    .bcc-event-lightbox__image {
        max-height: calc(100vh - 10rem);
    }

    .bcc-event-lightbox__close {
        top: 0.75rem;
        right: 0.75rem;
    }

    .bcc-event-lightbox__prev {
        left: 0.5rem;
    }

    .bcc-event-lightbox__next {
        right: 0.5rem;
    }

    .bcc-event-lightbox__nav {
        width: 42px;
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bcc-event-lightbox,
    .bcc-event-content .wp-block-gallery img,
    .bcc-event-lightbox__close,
    .bcc-event-lightbox__nav {
        transition: none !important;
    }
}

/* Compatibility with older Gallery block markup still stored in some posts. */
.bcc-event-content .wp-block-gallery .blocks-gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 1rem !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

@media (max-width: 640px) {
    .bcc-event-content .wp-block-gallery .blocks-gallery-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem !important;
    }
}

/* Event gallery compatibility fix (1.2.2)
 * WordPress has used several Gallery block structures over time. These
 * fallbacks cover modern nested-image galleries, older blocks-gallery-grid
 * markup, classic galleries, and groups normalized by events.js.
 */
.bcc-event-content .bcc-event-photo-grid,
.bcc-event-content .wp-block-gallery.has-nested-images,
.bcc-event-content .wp-block-gallery > .blocks-gallery-grid,
.bcc-event-content .gallery {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 1.75rem !important;
    padding: 0 !important;
    list-style: none !important;
    align-items: stretch !important;
}

.bcc-event-content .bcc-event-photo-grid > *,
.bcc-event-content .wp-block-gallery.has-nested-images > figure.wp-block-image,
.bcc-event-content .wp-block-gallery > .blocks-gallery-grid > .blocks-gallery-item,
.bcc-event-content .gallery > .gallery-item {
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.bcc-event-content .bcc-event-photo-grid figure,
.bcc-event-content .wp-block-gallery.has-nested-images > figure.wp-block-image,
.bcc-event-content .wp-block-gallery > .blocks-gallery-grid .blocks-gallery-item,
.bcc-event-content .gallery .gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.65rem;
    background: var(--natural-beige);
}

.bcc-event-content .bcc-event-photo-grid img,
.bcc-event-content .wp-block-gallery.has-nested-images > figure.wp-block-image img,
.bcc-event-content .wp-block-gallery > .blocks-gallery-grid .blocks-gallery-item img,
.bcc-event-content .gallery .gallery-item img {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: clamp(230px, 27vw, 330px) !important;
    margin: 0 !important;
    object-fit: cover !important;
    border: 0 !important;
    border-radius: 0 !important;
    cursor: zoom-in;
}

.bcc-event-content .bcc-event-photo-single {
    width: 100% !important;
    max-width: 760px !important;
    margin: 0 0 1.75rem !important;
}

.bcc-event-content .bcc-event-photo-single img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 620px;
    object-fit: contain;
    cursor: zoom-in;
}

@media (max-width: 640px) {
    .bcc-event-content .bcc-event-photo-grid,
    .bcc-event-content .wp-block-gallery.has-nested-images,
    .bcc-event-content .wp-block-gallery > .blocks-gallery-grid,
    .bcc-event-content .gallery {
        grid-template-columns: 1fr !important;
        gap: 0.8rem !important;
    }

    .bcc-event-content .bcc-event-photo-grid img,
    .bcc-event-content .wp-block-gallery.has-nested-images > figure.wp-block-image img,
    .bcc-event-content .wp-block-gallery > .blocks-gallery-grid .blocks-gallery-item img,
    .bcc-event-content .gallery .gallery-item img {
        height: min(72vw, 380px) !important;
    }
}

/* Event gallery carousel (1.2.3)
 * Final public presentation for native WordPress Gallery blocks. The previous
 * compatibility rules remain as fallbacks, while these later selectors turn
 * normalized galleries into horizontal, swipeable carousels.
 */
.bcc-event-content .bcc-event-carousel {
    --bcc-event-carousel-per-view: 3;
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 0 2rem;
    padding: 0 0 2rem;
}

.bcc-event-content .bcc-event-carousel .bcc-event-carousel__track,
.bcc-event-content .bcc-event-carousel .bcc-event-photo-grid {
    display: grid !important;
    grid-template-columns: none !important;
    grid-auto-flow: column !important;
    grid-auto-columns: calc((100% - 2rem) / 3) !important;
    gap: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0.15rem 0 0.35rem !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.bcc-event-content .bcc-event-carousel .bcc-event-carousel__track::-webkit-scrollbar {
    display: none;
}

.bcc-event-content .bcc-event-carousel .bcc-event-carousel__slide,
.bcc-event-content .bcc-event-carousel .bcc-event-photo-grid > * {
    display: block !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.bcc-event-content .bcc-event-carousel .bcc-event-carousel__slide,
.bcc-event-content .bcc-event-carousel .bcc-event-carousel__slide figure,
.bcc-event-content .bcc-event-carousel .gallery-item,
.bcc-event-content .bcc-event-carousel .blocks-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.7rem;
    background: var(--natural-beige);
}

.bcc-event-content .bcc-event-carousel .bcc-event-carousel__slide img,
.bcc-event-content .bcc-event-carousel .bcc-event-photo-grid img {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    aspect-ratio: 4 / 3;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    object-fit: cover !important;
    cursor: zoom-in;
    transition: transform 180ms ease, filter 180ms ease;
}

.bcc-event-content .bcc-event-carousel .bcc-event-carousel__slide:hover img {
    transform: scale(1.02);
    filter: brightness(0.95);
}

.bcc-event-content .bcc-event-carousel figcaption,
.bcc-event-content .bcc-event-carousel .gallery-caption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    margin: 0 !important;
    padding: 2rem 0.8rem 0.7rem !important;
    background: linear-gradient(to top, rgba(20, 14, 10, 0.78), rgba(20, 14, 10, 0));
    color: #fff !important;
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
    pointer-events: none;
}

.bcc-event-carousel__nav {
    position: absolute;
    top: calc(50% - 1rem);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(74, 52, 37, 0.16);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 24px rgba(74, 52, 37, 0.18);
    color: var(--bark-brown);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 150ms ease, color 150ms ease, opacity 150ms ease, transform 150ms ease;
}

.bcc-event-carousel__nav:hover:not(:disabled) {
    background: var(--clay-orange);
    color: #fff;
    transform: translateY(-50%) scale(1.04);
}

.bcc-event-carousel__nav:focus-visible {
    outline: 3px solid var(--clay-orange);
    outline-offset: 3px;
}

.bcc-event-carousel__nav:disabled {
    opacity: 0.28;
    cursor: default;
}

.bcc-event-carousel__nav[hidden] {
    display: none !important;
}

.bcc-event-carousel__prev {
    left: -0.7rem;
}

.bcc-event-carousel__next {
    right: -0.7rem;
}

.bcc-event-carousel__status {
    position: absolute;
    right: 0;
    bottom: 0;
    min-width: 4rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: var(--natural-beige);
    color: var(--bark-brown);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.02em;
    text-align: center;
}

@media (max-width: 900px) {
    .bcc-event-content .bcc-event-carousel {
        --bcc-event-carousel-per-view: 2;
    }

    .bcc-event-content .bcc-event-carousel .bcc-event-carousel__track,
    .bcc-event-content .bcc-event-carousel .bcc-event-photo-grid {
        grid-auto-columns: calc((100% - 1rem) / 2) !important;
    }
}

@media (max-width: 640px) {
    .bcc-event-content .bcc-event-carousel {
        --bcc-event-carousel-per-view: 1;
        padding-bottom: 2.1rem;
    }

    .bcc-event-content .bcc-event-carousel .bcc-event-carousel__track,
    .bcc-event-content .bcc-event-carousel .bcc-event-photo-grid {
        grid-template-columns: none !important;
        grid-auto-columns: 100% !important;
        gap: 0.75rem !important;
    }

    .bcc-event-content .bcc-event-carousel .bcc-event-carousel__slide img,
    .bcc-event-content .bcc-event-carousel .bcc-event-photo-grid img {
        aspect-ratio: 4 / 3;
        height: auto !important;
    }

    .bcc-event-carousel__nav {
        top: calc(50% - 1.05rem);
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.92);
    }

    .bcc-event-carousel__prev {
        left: 0.4rem;
    }

    .bcc-event-carousel__next {
        right: 0.4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bcc-event-content .bcc-event-carousel .bcc-event-carousel__track,
    .bcc-event-content .bcc-event-carousel .bcc-event-photo-grid {
        scroll-behavior: auto;
    }

    .bcc-event-content .bcc-event-carousel img,
    .bcc-event-carousel__nav {
        transition: none !important;
    }
}

/* Event gallery composition fix (1.2.4)
 * Most event photography is landscape. Keep a consistent carousel rhythm
 * without cropping the photograph: each slide becomes a 4:3 viewing frame
 * and the complete source image is fitted inside it. Portrait photographs
 * remain fully visible with neutral space at the sides rather than being cut.
 */
.bcc-event-content .bcc-event-carousel .bcc-event-carousel__slide,
.bcc-event-content .bcc-event-carousel .bcc-event-photo-grid > * {
    aspect-ratio: 4 / 3 !important;
    min-height: 0 !important;
    background: #f4eee7 !important;
}

.bcc-event-content .bcc-event-carousel .bcc-event-carousel__slide > figure,
.bcc-event-content .bcc-event-carousel .bcc-event-carousel__slide > a,
.bcc-event-content .bcc-event-carousel .bcc-event-carousel__slide .gallery-icon,
.bcc-event-content .bcc-event-carousel .blocks-gallery-item > figure,
.bcc-event-content .bcc-event-carousel .gallery-item .gallery-icon {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f4eee7 !important;
}

.bcc-event-content .bcc-event-carousel .bcc-event-carousel__slide img,
.bcc-event-content .bcc-event-carousel .bcc-event-photo-grid img,
.bcc-event-content .bcc-event-carousel .gallery-item img,
.bcc-event-content .bcc-event-carousel .blocks-gallery-item img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #f4eee7 !important;
}

@media (max-width: 640px) {
    .bcc-event-content .bcc-event-carousel .bcc-event-carousel__slide,
    .bcc-event-content .bcc-event-carousel .bcc-event-photo-grid > * {
        /* A slightly taller viewing window makes mixed portrait/landscape
         * galleries comfortable on narrow phones while still avoiding crop. */
        aspect-ratio: 4 / 3 !important;
    }
}
