
/* Event archive cards */
.hec-events-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    margin: 25px 0 45px;
}

.hec-event-card {
    display: block;
    color: inherit;
    text-decoration: none !important;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,.07);
    transition: .2s;
}

.hec-event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 9px 25px rgba(0,0,0,.12);
}

.hec-event-card-image {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f2f2f2;
}

.hec-event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hec-event-card-info {
    padding: 19px 20px 22px;
}



/* HEC Event Gallery Lightbox */

.hec-lightbox-v2 {
    display: none;
    position: fixed !important;
    inset: 0 !important;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.97) !important;
    z-index: 99999999 !important;

    align-items: center;
    justify-content: center;

    overflow: hidden;
    padding: 55px 75px;
    box-sizing: border-box;
}

.hec-lightbox-v2.active {
    display: flex !important;
}

.hec-lb-image {
    display: block;
    max-width: 100% !important;
    max-height: calc(100dvh - 110px) !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    margin: auto !important;
    position: relative;
    z-index: 2;
}

.hec-lightbox-v2 button {
    position: fixed;
    border: none !important;
    outline: none !important;
    cursor: pointer;
    z-index: 999999999 !important;
    color: #fff !important;
    background: rgba(0, 0, 0, 0.8) !important;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    font-size: 28px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hec-lb-close {
    top: 22px;
    right: 25px;
}

.hec-lb-prev {
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
}

.hec-lb-next {
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
}

.hec-lightbox-v2 button:hover {
    background: #ffcc00 !important;
    color: #111 !important;
}

.hec-lb-counter {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    z-index: 999999999;
}

/* Prevent background scrolling only while lightbox is open */
html.hec-lb-locked,
body.hec-lb-locked {
    overflow: hidden !important;
}

/* Mobile */
@media (max-width: 767px) {
    .hec-lightbox-v2 {
        padding: 55px 12px;
    }

    .hec-lb-image {
        max-width: 100% !important;
        max-height: calc(100dvh - 120px) !important;
    }

    .hec-lightbox-v2 button {
        width: 42px;
        height: 42px;
        font-size: 23px;
    }

    .hec-lb-close {
        top: 12px;
        right: 12px;
    }

    .hec-lb-prev {
        left: 8px;
    }

    .hec-lb-next {
        right: 8px;
    }
}

.hec-event-card-info time,
.hec-event-single-date {
    color: #a87900;
    font-size: 14px;
    font-weight: 600;
}

.hec-event-card-info h3 {
    margin: 8px 0 9px;
    font-size: 21px;
    line-height: 1.3;
    color: #17232e;
}

.hec-event-card-info p {
    margin: 0 0 14px;
    color: #666;
    line-height: 1.6;
}

.hec-event-read-more {
    color: #a87900;
    font-weight: 700;
}

/* Single event layout */
body.single-hec_event .hec-event-single-layout {
    width: min(1100px, calc(100vw - 40px));
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin: 24px 0 55px;
    box-sizing: border-box;
}

.hec-event-featured-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 22px;
    overflow: hidden;
    border-radius: 8px;
    background: #f6f6f6;
}

.hec-event-featured-image {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 440px !important;
    object-fit: contain;
    margin: 0 auto;
}

.hec-event-single-date {
    margin: 0 0 18px;
    font-size: 15px;
}

.hec-event-description {
    color: #555;
    line-height: 1.75;
    margin: 0 0 28px;
}

.hec-event-description img {
    max-width: 100%;
    height: auto;
}

.hec-event-gallery-title {
    margin: 28px 0 18px;
    font-size: 26px;
    line-height: 1.25;
    color: #17232e;
}

.hec-event-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0 35px;
}

.hec-gallery-item {
    padding: 0;
    width: 100%;
    height: 230px;
    border: 0;
    background: #eee;
    cursor: zoom-in;
    overflow: hidden;
    border-radius: 7px;
    display: block;
}

.hec-gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .25s;
}

.hec-gallery-item:hover img {
    transform: scale(1.045);
}

/* Lightbox */
.hec-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0,0,0,.94);
    align-items: center;
    justify-content: center;
    padding: 55px 70px 65px;
}

.hec-lightbox.is-open {
    display: flex;
}

.hec-lightbox-image {
    max-width: 100%;
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.hec-lightbox button {
    position: absolute;
    border: 0;
    color: #fff;
    background: rgba(255,255,255,.15);
    cursor: pointer;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 34px;
    line-height: 1;
}

.hec-lightbox-close {
    top: 18px;
    right: 22px;
}

.hec-lightbox-prev {
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.hec-lightbox-next {
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.hec-lightbox-count {
    position: absolute;
    bottom: 18px;
    left: 0;
    right: 0;
    color: #fff;
    text-align: center;
    font-size: 14px;
}

body.hec-lightbox-open {
    overflow: hidden;
}

/* Tablet */
@media(max-width:900px) {
    .hec-events-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hec-event-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hec-gallery-item {
        height: 190px;
    }
}

/* Mobile */
@media(max-width:600px) {
    .hec-events-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .hec-event-card-image {
        aspect-ratio: 16/9;
    }

    body.single-hec_event .hec-event-single-layout {
        width: calc(100vw - 24px);
        margin: 16px 0 35px;
    }

    .hec-event-featured-wrap {
        margin-bottom: 16px;
    }

    .hec-event-featured-image {
        max-height: 300px !important;
    }

    .hec-event-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .hec-gallery-item {
        height: 155px;
    }

    .hec-event-gallery-title {
        font-size: 22px;
    }

    .hec-lightbox {
        padding: 55px 12px;
    }

    .hec-lightbox button {
        width: 40px;
        height: 40px;
        font-size: 28px;
    }

    .hec-lightbox-prev {
        left: 7px;
    }

    .hec-lightbox-next {
        right: 7px;
    }
}
