/* =========================================
   MAIN SETTINGS
========================================= */

.bft-events {
    --navy: #00152B;
    --blue: #3D577C;
    --light: #F5F8FC;
    --line: #DFE7F0;

    width: 100%;
    background: #FFFFFF;
    font-family: "Lora", serif;
    color: var(--blue);
}

.bft-events *,
.bft-events *::before,
.bft-events *::after {
    box-sizing: border-box;
}

.bft-events .bft-container {
    max-width: 1250px;
    width: 100%;
    margin: 0 auto;
}

.bft-events h1,
.bft-events h2,
.bft-events h3 {
    font-family: "Lora", serif !important;
    color: #00152B !important;
    font-weight: 700 !important;
}

.bft-events p {
    font-family: "Lora", serif !important;
    color: #3D577C !important;
    font-size: 16px !important;
    line-height: 28px !important;
    font-weight: 500 !important;
}

/* =========================================
   PAGE HEADER
========================================= */

.bft-events .bft-events-header {
    background: #F5F8FC;
    padding: 85px 20px 75px;
    text-align: center;
}

.bft-events .bft-eyebrow {
    display: block;
    margin-bottom: 16px;
    font-family: "Lora", serif;
    color: #3D577C;
    font-size: 13px;
    font-weight: 700;
    line-height: 22px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.bft-events .bft-events-header h1 {
    font-size: 47px !important;
    line-height: 60px !important;
    margin: 0 0 15px !important;
}

.bft-events .bft-heading-line {
    width: 60px;
    height: 3px;
    background: #3D577C;
    border-radius: 5px;
    margin: 22px auto 0;
}

/* =========================================
   UPCOMING EVENTS SECTION
========================================= */

.bft-events .bft-upcoming {
    padding: 90px 20px 100px;
}

.bft-events .bft-section-heading {
    text-align: center;
    margin-bottom: 44px;
}

.bft-events .bft-section-heading h2 {
    font-size: 38px !important;
    line-height: 50px !important;
    margin: 0 !important;
}

.bft-events .bft-upcoming-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    align-items: stretch;
}

/* EVENT CARDS */

.bft-events .bft-featured-card {
    display: flex;
    flex-direction: column;
    min-width: 0;

    background: #FFFFFF;
    border: 1px solid #DFE7F0;
    border-radius: 20px;
    overflow: hidden;

    box-shadow: 0 12px 35px rgba(0,21,43,.045);

    transition:
        transform .3s ease,
        box-shadow .3s ease;
}

.bft-events .bft-featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(0,21,43,.10);
}

/* =========================================
   UPDATED EVENT POSTERS
   FULL IMAGE - NO CROPPING
========================================= */

.bft-events .bft-featured-image {
    position: relative;
    width: 100%;
    height: 340px;
    overflow: hidden;
    background: #F5F8FC;
}

.bft-events .bft-featured-image img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 0 !important;
}

/* DATE BADGE */

.bft-events .bft-date-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 2;

    min-width: 80px;
    padding: 12px 15px;

    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,21,43,.1);

    text-align: center;
}

.bft-events .bft-date-badge strong {
    display: block;
    font-family: "Lora", serif;
    font-size: 27px;
    line-height: 32px;
    font-weight: 700;
    color: #00152B;
}

.bft-events .bft-date-badge span {
    display: block;
    font-family: "Lora", serif;
    font-size: 12px;
    line-height: 20px;
    font-weight: 700;
    letter-spacing: .5px;
    color: #3D577C;
}

/* =========================================
   EVENT CONTENT
========================================= */

.bft-events .bft-featured-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    padding: 32px;
}

.bft-events .bft-event-location {
    display: inline-flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 17px;

    font-family: "Lora", serif;
    font-size: 13px;
    line-height: 23px;
    font-weight: 600;
    color: #3D577C;
}

.bft-events .bft-event-location svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-top: 2px;

    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8;
}

.bft-events .bft-featured-body h3 {
    font-size: 28px !important;
    line-height: 40px !important;
    margin: 0 0 22px !important;
}

.bft-events .bft-event-description {
    flex: 1;
}

.bft-events .bft-event-description p {
    margin: 0 0 18px !important;
}

.bft-events .bft-event-description p:last-child {
    margin-bottom: 0 !important;
}

/* =========================================
   REGISTRATION BUTTON
========================================= */

.bft-events .bft-registration-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    align-self: flex-start;

    margin-top: 30px;
    padding: 14px 24px;

    background: #00152B;
    color: #FFFFFF !important;
    border: 1px solid #00152B;
    border-radius: 8px;

    font-family: "Lora", serif;
    font-size: 14px;
    line-height: 24px;
    font-weight: 700;
    text-decoration: none !important;

    transition: background .25s ease;
}

.bft-events .bft-registration-btn:hover {
    background: #3D577C;
    color: #FFFFFF !important;
    border-color: #3D577C;
}

.bft-events .bft-registration-btn svg {
    width: 17px;
    height: 17px;

    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2;
}

/* =========================================
   PAST EVENTS SECTION
========================================= */

.bft-events .bft-past {
    background: #F5F8FC;
    padding: 100px 20px 110px;
}

.bft-events .bft-past-header {
    text-align: center;
    margin-bottom: 60px;
}

.bft-events .bft-past-header h2 {
    font-size: 47px !important;
    line-height: 60px !important;
    margin: 0 0 15px !important;
}

.bft-events .bft-past-header-line {
    width: 55px;
    height: 3px;
    background: #3D577C;
    border-radius: 5px;
    margin: 0 auto;
}

/* =========================================
   TIMELINE LAYOUT
========================================= */

.bft-events .bft-timeline {
    position: relative;
    max-width: 1050px;
    margin: 0 auto;
    padding-left: 32px;
}

.bft-events .bft-timeline::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 15px;
    left: 7px;

    width: 2px;
    background: #B9CADB;
}

.bft-events .bft-timeline-item {
    position: relative;
    margin-bottom: 18px;
}

.bft-events .bft-timeline-item:last-child {
    margin-bottom: 0;
}

/* TIMELINE DOT */

.bft-events .bft-timeline-item::before {
    content: "";
    position: absolute;

    left: -31px;
    top: 27px;

    width: 15px;
    height: 15px;

    background: #00152B;
    border: 4px solid #F5F8FC;
    border-radius: 50%;

    box-shadow: 0 0 0 2px #B9CADB;
    z-index: 2;
}

/* =========================================
   PAST EVENT CARDS
========================================= */

.bft-events .bft-past-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;

    padding: 25px 28px;

    background: #FFFFFF;
    border: 1px solid #DFE7F0;
    border-radius: 12px;

    transition:
        border-color .25s ease,
        box-shadow .25s ease;
}

.bft-events .bft-past-card:hover {
    border-color: #B3C5D8;
    box-shadow: 0 8px 28px rgba(0,21,43,.045);
}

.bft-events .bft-past-title {
    min-width: 0;
    flex: 1;
}

.bft-events .bft-past-title h3 {
    font-size: 18px !important;
    line-height: 30px !important;
    font-weight: 700 !important;
    margin: 0 !important;
}

.bft-events .bft-past-date {
    flex-shrink: 0;
    max-width: 340px;

    padding: 9px 15px;
    border-radius: 6px;

    background: #EDF3F9;
    color: #3D577C;

    font-family: "Lora", serif;
    font-size: 13px;
    line-height: 23px;
    font-weight: 700;
    text-align: center;
}

.bft-events .bft-past-note {
    font-style: italic;
    font-weight: 500;
    color: #3D577C;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 1024px) {

    .bft-events .bft-events-header h1,
    .bft-events .bft-past-header h2 {
        font-size: 40px !important;
        line-height: 53px !important;
    }

    .bft-events .bft-upcoming-grid {
        gap: 20px;
    }

    .bft-events .bft-featured-body {
        padding: 25px;
    }

    .bft-events .bft-featured-body h3 {
        font-size: 24px !important;
        line-height: 36px !important;
    }

    .bft-events .bft-featured-image {
        height: 300px;
    }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 767px) {

    .bft-events .bft-events-header {
        padding: 60px 16px;
    }

    .bft-events .bft-events-header h1 {
        font-size: 34px !important;
        line-height: 45px !important;
    }

    .bft-events .bft-upcoming {
        padding: 60px 16px 75px;
    }

    .bft-events .bft-section-heading h2 {
        font-size: 30px !important;
        line-height: 42px !important;
    }

    .bft-events .bft-upcoming-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .bft-events .bft-featured-image {
        height: 280px;
    }

    .bft-events .bft-featured-body {
        padding: 23px 20px;
    }

    .bft-events .bft-featured-body h3 {
        font-size: 25px !important;
        line-height: 37px !important;
    }

    .bft-events .bft-event-description p {
        font-size: 15px !important;
        line-height: 27px !important;
    }

    .bft-events .bft-registration-btn {
        width: 100%;
        justify-content: center;
    }

    .bft-events .bft-past {
        padding: 65px 16px 75px;
    }

    .bft-events .bft-past-header {
        margin-bottom: 40px;
    }

    .bft-events .bft-past-header h2 {
        font-size: 34px !important;
        line-height: 45px !important;
    }

    .bft-events .bft-timeline {
        padding-left: 23px;
    }

    .bft-events .bft-timeline::before {
        left: 5px;
    }

    .bft-events .bft-timeline-item::before {
        left: -24px;
        width: 13px;
        height: 13px;
    }

    .bft-events .bft-past-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 20px;
    }

    .bft-events .bft-past-title h3 {
        font-size: 16px !important;
        line-height: 27px !important;
    }

    .bft-events .bft-past-date {
        max-width: 100%;
        text-align: left;
        font-size: 12px;
        line-height: 21px;
        padding: 7px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bft-events *,
    .bft-events *::before,
    .bft-events *::after {
        transition: none !important;
    }
}


/* Plugin integration: preserve original BFT design, adapting 3 columns and DOM controls. */
.bft-events .bft-featured-image button.bft-image-open{display:block;width:100%;height:100%;border:0;padding:0;background:none;cursor:zoom-in}
.bft-events .bft-featured-image button.bft-image-open img{display:block!important;width:100%!important;height:100%!important;max-width:none!important;object-fit:contain!important;object-position:center!important;border-radius:0!important}
.bft-events .bft-event-date-list{margin:0 0 19px;font-family:"Lora",serif;font-weight:600;font-size:13px;line-height:23px;color:#3D577C}
.bft-events .bft-date-list-title{font-weight:700;color:#00152B}
.bft-events .bft-featured-body .bft-registration-btn{margin-top:30px}
.bft-events .bft-past-card .bft-registration-btn{margin:0 0 0 5px;white-space:nowrap}
.bft-events .bft-past-title h3{margin:0!important}
.bft-events .bft-registration-btn span{font-size:17px}
/* Expandable upcoming descriptions. Hidden toggle is shown only when content overflows. */
.bft-events .bft-description-wrap{min-width:0}
.bft-events .bft-event-description.bft-desc-collapsed{max-height:146px;overflow:hidden;position:relative}
.bft-events .bft-description-wrap.bft-has-overflow .bft-event-description.bft-desc-collapsed:after{content:"";position:absolute;inset:auto 0 0;height:55px;pointer-events:none;background:linear-gradient(0deg,#fff,rgba(255,255,255,0))}
.bft-events .bft-read-toggle{font:700 14px/24px "Lora",serif!important;color:#00152B!important;display:inline-flex;align-items:center;gap:8px;margin:12px 0 0!important;padding:5px 0!important;background:transparent!important;border:0!important;box-shadow:none!important;cursor:pointer;text-decoration:underline;text-underline-offset:4px}
.bft-events .bft-read-toggle[hidden]{display:none!important}
.bft-events .bft-read-toggle:hover{color:#3D577C!important}
.bft-events .bft-read-toggle:focus-visible,.bft-events .bft-image-open:focus-visible{outline:3px solid #596f8c!important;outline-offset:3px}
/* .bft-events .bft-read-toggle[aria-expanded="true"] span{transform:rotate(180deg)} */
/* The popup is moved to document.body by JS to avoid Elementor stacking/transform clipping. */
.bft-lightbox{position:fixed!important;inset:0!important;z-index:2147483000!important;display:none!important;align-items:center!important;justify-content:center!important;padding:65px 28px 28px!important;box-sizing:border-box!important;background:rgba(0,0,0,.92)!important;overflow:auto!important}
.bft-lightbox.active{display:flex!important}
.bft-lightbox img{display:block!important;max-width:min(95vw,1400px)!important;max-height:calc(100dvh - 110px)!important;width:auto!important;height:auto!important;object-fit:contain!important;border-radius:4px!important;box-shadow:0 8px 40px rgba(0,0,0,.35)!important}
.bft-lightbox .bft-lightbox-close{position:fixed!important;top:15px!important;right:18px!important;z-index:2!important;display:flex!important;align-items:center!important;justify-content:center!important;width:44px!important;height:44px!important;padding:0!important;border:1px solid rgba(255,255,255,.5)!important;border-radius:50%!important;background:rgba(0,0,0,.55)!important;color:#fff!important;font:normal 34px/1 Arial,sans-serif!important;cursor:pointer!important}
.bft-lightbox .bft-lightbox-close:hover{background:#333!important}
.bft-lightbox .bft-lightbox-close:focus-visible{outline:3px solid #fff!important;outline-offset:2px}
.bft-lightbox .bft-lightbox-error{color:#fff;font:16px/1.5 Arial,sans-serif}
body.bft-lightbox-open{overflow:hidden!important}
@media(max-width:1024px){.bft-events .bft-upcoming-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:767px){.bft-events .bft-upcoming-grid{grid-template-columns:1fr}.bft-events .bft-featured-image{height:280px}.bft-events .bft-past-date{max-width:100%}.bft-events .bft-past-card .bft-registration-btn{margin:0}.bft-lightbox{padding:65px 12px 20px!important}.bft-lightbox img{max-width:96vw!important;max-height:calc(100dvh - 95px)!important}}

/* V1.4: Editorial refresh, scoped to the events shortcode only. */
.bft-events{--navy:#17212a;--blue:#52616b;--light:#f8f8f6;--line:#e9e7e2;color:#52616b;background:#fff}
.bft-events .bft-events-header{background:#f7f7f5;padding:72px 20px 67px}
.bft-events .bft-eyebrow{color:#897562;letter-spacing:2px}
.bft-events .bft-heading-line,.bft-events .bft-past-header-line{background:#b49a81;width:53px;height:2px}
.bft-events .bft-upcoming{padding:76px 22px 100px}
.bft-events .bft-upcoming-grid{gap:25px}
.bft-events .bft-featured-card{border:1px solid #eae7e2;border-radius:18px;box-shadow:0 10px 36px rgba(24,30,33,.055);transition:transform .3s ease,box-shadow .3s ease,border-color .3s ease;background:#fff}
.bft-events .bft-featured-card:hover{transform:translateY(-5px);border-color:#d6cec5;box-shadow:0 22px 46px rgba(22,29,33,.105)}
.bft-events .bft-featured-image{height:290px;background:#f4f2ef;overflow:hidden}
.bft-events .bft-featured-image:after{content:"";position:absolute;pointer-events:none;inset:auto 0 0;height:35px;background:linear-gradient(0deg,rgba(27,25,22,.045),transparent)}
.bft-events .bft-featured-image .bft-image-open{transition:transform .35s ease}
.bft-events .bft-featured-image:hover .bft-image-open{transform:scale(1.025)}
.bft-events .bft-date-badge{top:16px;left:16px;min-width:68px;padding:10px 12px;border-radius:9px;box-shadow:0 6px 19px rgba(0,0,0,.10)}
.bft-events .bft-date-badge strong{font-size:25px;line-height:28px;color:#17212a}
.bft-events .bft-date-badge span{font-size:10px;line-height:16px;color:#665b50;letter-spacing:.6px}
.bft-events .bft-featured-body{padding:25px 26px 28px}
.bft-events .bft-event-location{font-family:Arial,sans-serif;font-size:12px;font-weight:600;line-height:20px;color:#847667;margin-bottom:13px}
.bft-events .bft-event-location svg{width:16px;height:16px;flex-basis:16px}
.bft-events .bft-featured-body h3{font-size:23px!important;line-height:1.38!important;margin:0 0 17px!important;letter-spacing:-.35px}
.bft-events .bft-event-description p{font-size:14px!important;line-height:25px!important;color:#59646b!important;font-weight:400!important;margin-bottom:11px!important}
.bft-events .bft-event-date-list{font-size:12px;color:#766e67;margin-bottom:13px;line-height:21px}
.bft-events .bft-date-list-title{color:#2d3338}
.bft-events .bft-event-description.bft-desc-collapsed{max-height:122px}
.bft-events .bft-read-toggle{font-family:Arial,Helvetica,sans-serif!important;font-size:12px!important;font-weight:700!important;letter-spacing:.3px;line-height:20px!important;color:#76604b!important;margin-top:9px!important;text-decoration:none!important;border-bottom:1px solid #cab5a1!important;padding:4px 0 3px!important}
.bft-events .bft-description-wrap.bft-has-overflow .bft-event-description.bft-desc-collapsed:after{background:linear-gradient(0deg,#fff,rgba(255,255,255,0))}
.bft-events .bft-featured-body .bft-registration-btn{margin-top:22px;align-self:stretch}
.bft-events .bft-registration-btn{border-radius:9px;background:#202a30;border-color:#202a30;min-height:46px;gap:9px;font:700 13px/20px Arial,Helvetica,sans-serif;padding:12px 10px;text-align:center;transition:background .2s ease,transform .2s ease,box-shadow .2s ease}
.bft-events .bft-registration-btn:hover{background:#3c474e;border-color:#3c474e;box-shadow:0 6px 15px rgba(27,34,38,.18);transform:translateY(-1px)}
.bft-events .bft-past{background:#f8f8f6;padding:82px 20px 98px}
.bft-events .bft-past-header{margin-bottom:48px}
.bft-events .bft-timeline{max-width:1120px}
.bft-events .bft-timeline::before{background:#d5c7ba}
.bft-events .bft-timeline-item::before{background:#9c826c;box-shadow:0 0 0 2px #d5c7ba;border-color:#f8f8f6}
.bft-events .bft-past-card{border:1px solid #e8e7e3;border-radius:12px;padding:22px 26px;box-shadow:0 3px 15px rgba(20,25,29,.025);gap:18px}
.bft-events .bft-past-card:hover{box-shadow:0 9px 25px rgba(18,25,28,.055);border-color:#d8c8b9}
.bft-events .bft-past-title h3{font-size:17px!important;line-height:26px!important}
.bft-events .bft-past-date{background:#f2efea;color:#675b50;border-radius:8px;font:600 12px/20px Arial,sans-serif;max-width:390px;padding:10px 14px}
.bft-lightbox{background:rgba(12,15,17,.94)!important;padding:64px 24px 40px!important;cursor:zoom-out}
.bft-lightbox img{cursor:default;box-shadow:0 20px 80px rgba(0,0,0,.55)!important;border-radius:6px!important}
.bft-lightbox .bft-lightbox-close{top:16px!important;right:20px!important;width:49px!important;height:49px!important;font-size:30px!important;line-height:1!important;background:rgba(255,255,255,.14)!important;border:1px solid rgba(255,255,255,.38)!important}
.bft-lightbox .bft-lightbox-close:hover{background:rgba(255,255,255,.27)!important}
@media(max-width:1024px){.bft-events .bft-upcoming-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bft-events .bft-featured-image{height:300px}}
@media(max-width:767px){.bft-events .bft-upcoming{padding:55px 16px 70px}.bft-events .bft-upcoming-grid{grid-template-columns:1fr;gap:22px}.bft-events .bft-featured-image{height:275px}.bft-events .bft-featured-body{padding:23px 21px}.bft-events .bft-featured-body h3{font-size:22px!important;line-height:32px!important}.bft-events .bft-past{padding:60px 16px 75px}.bft-events .bft-past-card{padding:19px 18px}.bft-events .bft-past-header{margin-bottom:36px}}

/* v1.5: consistent accessible line icons; scoped to plugin frontend. */
.bft-events .bft-icon,.bft-lightbox .bft-icon{display:inline-block!important;flex:none;width:18px;height:18px;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle;transition:transform .2s ease}
.bft-events .bft-event-location .bft-icon{width:17px;height:17px;flex-basis:17px}
.bft-events .bft-event-date-list{display:flex;gap:9px;align-items:flex-start}
.bft-events .bft-event-date-list .bft-icon{margin-top:3px;color:#88745c}
.bft-events .bft-past-date{display:inline-flex;align-items:center;gap:9px}
.bft-events .bft-past-date .bft-icon{width:15px;height:15px}
.bft-events .bft-registration-btn .bft-icon{width:17px;height:17px;margin-left:2px}
.bft-events .bft-registration-btn:hover .bft-icon{transform:translate(2px,-2px)}
.bft-events .bft-read-toggle .bft-icon{width:16px;height:16px}
.bft-events .bft-read-toggle[aria-expanded="true"] .bft-icon{transform:rotate(180deg)}
.bft-events .bft-read-toggle .bft-read-label{font-size:inherit;font-weight:inherit}
.bft-events .bft-featured-image .bft-image-open{position:relative}
.bft-events .bft-zoom-label{position:absolute;right:14px;bottom:14px;display:inline-flex;align-items:center;gap:7px;padding:9px 12px;background:rgba(21,26,29,.83);color:#fff;font:600 12px/1.2 Arial,sans-serif;letter-spacing:.1px;border-radius:9px;opacity:0;transform:translateY(5px);transition:opacity .2s ease,transform .2s ease;pointer-events:none}
.bft-events .bft-image-open:hover .bft-zoom-label,.bft-events .bft-image-open:focus-visible .bft-zoom-label{opacity:1;transform:translateY(0)}
.bft-events .bft-zoom-label .bft-icon{width:17px;height:17px;color:#fff}
.bft-lightbox .bft-lightbox-close .bft-icon{height:22px;width:22px;stroke:#fff!important;stroke-width:2!important}
@media(hover:none){.bft-events .bft-zoom-label{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.bft-events .bft-icon,.bft-events .bft-zoom-label{transition:none!important}}

/* v1.7: upcoming events only - show existing link and registration link side by side */
.bft-events .bft-featured-body .bft-event-actions{display:flex;align-items:stretch;gap:10px;margin-top:22px;flex-wrap:wrap}
.bft-events .bft-featured-body .bft-event-actions .bft-registration-btn{flex:1 1 130px;align-self:stretch;margin-top:0;min-width:0}
.bft-events .bft-featured-body .bft-event-actions .bft-register-now{background:#76604b;border-color:#76604b}
.bft-events .bft-featured-body .bft-event-actions .bft-register-now:hover{background:#594735;border-color:#594735}
