:root {
    --ble-accent: #d9ff3f;
    --ble-bg: #090909;
    --ble-card: #151515;
    --ble-border: rgba(255, 255, 255, 0.12);
    --ble-text: #ffffff;
    --ble-muted: #a5a5a5;
}

.ble-events-block,
.ble-registration-wrap,
.ble-event-details {
    box-sizing: border-box;
    color: var(--ble-text);
    font-family: inherit;
}

.ble-events-title {
    margin: 0 0 18px;
    color: var(--ble-text);
    font-size: clamp(24px, 3vw, 40px);
    line-height: 1;
    text-transform: uppercase;
}

.ble-events-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(var(--ble-columns, 3), minmax(0, 1fr));
    gap: 16px;
}

.ble-event-card {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(112px, 42%) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--ble-border);
    border-radius: 14px;
    background: var(--ble-card);
    color: var(--ble-text);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    transition: transform .22s ease, border-color .22s ease;
}

.ble-event-card:hover {
    transform: translateY(-5px);
    border-color: color-mix(in srgb, var(--ble-accent) 55%, transparent);
}

.ble-event-card-media {
    position: relative;
    display: block;
    min-height: 178px;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #242424, #070707);
}

.ble-event-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.ble-event-card:hover .ble-event-card-media img {
    transform: scale(1.04);
}

.ble-event-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: rgba(255,255,255,.18);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: .18em;
}

.ble-event-card-body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 14px;
}

.ble-event-date {
    margin-bottom: 6px;
    color: var(--ble-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.ble-event-card-title {
    display: -webkit-box;
    margin: 0 0 7px;
    overflow: hidden;
    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.08;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ble-event-card-title a {
    color: inherit;
    text-decoration: none;
}

.ble-event-location {
    display: -webkit-box;
    min-height: 0;
    margin-bottom: 11px;
    overflow: hidden;
    color: var(--ble-muted);
    font-size: 12px;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ble-button,
.ble-submit-button,
.ble-whatsapp-box a {
    display: inline-flex;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--ble-accent);
    color: #080808 !important;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .055em;
    text-decoration: none !important;
    cursor: pointer;
}

.ble-event-card .ble-button {
    min-height: 34px;
    margin-top: auto;
    padding: 8px 13px;
    font-size: 10px;
    line-height: 1;
}

.ble-event-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 30px;
    margin: 0 0 28px;
    padding: 18px 22px;
    border: 1px solid var(--ble-border);
    border-radius: 14px;
    background: rgba(255,255,255,.035);
}

.ble-registration-wrap {
    margin-top: 44px;
}

.ble-form-card {
    padding: clamp(24px, 5vw, 54px);
    border: 1px solid var(--ble-border);
    border-radius: 24px;
    background: var(--ble-bg);
    box-shadow: 0 24px 80px rgba(0,0,0,.28);
}

.ble-form-heading {
    max-width: 760px;
    margin-bottom: 32px;
}

.ble-form-heading h2 {
    margin: 6px 0 12px;
    color: var(--ble-text);
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1;
    text-transform: uppercase;
}

.ble-form-heading p {
    margin: 0;
    color: var(--ble-muted);
}

.ble-eyebrow {
    color: var(--ble-accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .15em;
}

.ble-guest-row {
    display: grid;
    grid-template-columns: minmax(135px, .38fr) minmax(220px, 1fr) 44px;
    align-items: end;
    gap: 12px;
    margin-bottom: 14px;
}

.ble-guest-form label {
    display: block;
    margin-bottom: 7px;
    color: #e5e5e5;
    font-size: 13px;
}

.ble-guest-form input,
.ble-guest-form select {
    width: 100%;
    height: 52px;
    box-sizing: border-box;
    border: 1px solid var(--ble-border);
    border-radius: 12px;
    outline: 0;
    background: #171717;
    color: #ffffff;
    padding: 0 15px;
    font: inherit;
}

.ble-guest-form input:focus,
.ble-guest-form select:focus {
    border-color: var(--ble-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ble-accent) 20%, transparent);
}

.ble-remove-person {
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
    border: 1px solid rgba(255, 90, 90, .35);
    border-radius: 50%;
    background: rgba(255, 90, 90, .08);
    color: #ff8080;
    font-size: 24px;
    cursor: pointer;
}

.ble-form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 14px;
    margin-top: 24px;
}

.ble-add-person {
    min-height: 48px;
    padding: 10px 0;
    border: 0;
    background: transparent;
    color: var(--ble-accent);
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.ble-submit-button {
    min-width: 220px;
}

.ble-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.ble-notice,
.ble-list-closed {
    margin-bottom: 20px;
    padding: 16px 18px;
    border-radius: 12px;
}

.ble-notice-success {
    border: 1px solid rgba(92, 214, 127, .45);
    background: rgba(92, 214, 127, .12);
}

.ble-notice-error,
.ble-list-closed {
    border: 1px solid rgba(255, 95, 95, .4);
    background: rgba(255, 95, 95, .1);
}

.ble-whatsapp-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 22px;
    padding: 22px 26px;
    border: 1px solid rgba(63, 211, 102, .35);
    border-radius: 18px;
    background: rgba(37, 211, 102, .08);
}

.ble-whatsapp-box strong {
    color: #ffffff;
    font-size: 20px;
}

.ble-whatsapp-box p {
    margin: 5px 0 0;
    color: var(--ble-muted);
}

.ble-whatsapp-box a {
    flex: 0 0 auto;
    background: #25d366;
}

.ble-empty-message {
    padding: 20px;
    border: 1px dashed var(--ble-border);
    border-radius: 14px;
}

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

@media (max-width: 620px) {
    .ble-events-block,
    .ble-events-grid,
    .ble-event-card {
        width: 100%;
        max-width: none;
    }

    .ble-events-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 16px;
    }

    .ble-event-card {
        display: block;
    }

    .ble-event-card-media {
        width: 100%;
        min-height: 0;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .ble-event-card-body {
        padding: 15px 16px 16px;
    }

    .ble-event-card-title {
        font-size: 20px;
    }

    .ble-event-location {
        margin-bottom: 13px;
        font-size: 13px;
    }

    .ble-event-card .ble-button {
        width: 100%;
        min-height: 42px;
        margin-top: 0;
        font-size: 11px;
    }

    .ble-guest-row {
        grid-template-columns: 1fr 44px;
    }

    .ble-type-field,
    .ble-name-field {
        grid-column: 1;
    }

    .ble-name-field {
        grid-row: 2;
    }

    .ble-remove-person {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: center;
    }

    .ble-form-actions,
    .ble-whatsapp-box {
        align-items: stretch;
        flex-direction: column;
    }

    .ble-submit-button,
    .ble-whatsapp-box a {
        width: 100%;
    }
}

/* Página individual do evento sempre em uma coluna, sem sidebar do tema. */
body.single-barauna_evento #secondary,
body.single-barauna_evento #right-sidebar,
body.single-barauna_evento #left-sidebar,
body.single-barauna_evento .sidebar,
body.single-barauna_evento .widget-area,
body.single-barauna_evento aside.site-sidebar,
body.single-barauna_evento .content-sidebar-wrap > aside,
body.single-barauna_evento .ast-right-sidebar #secondary,
body.single-barauna_evento .ast-left-sidebar #secondary {
    display: none !important;
}

body.single-barauna_evento #primary,
body.single-barauna_evento .content-area,
body.single-barauna_evento .site-content > main,
body.single-barauna_evento .content-sidebar-wrap > main,
body.single-barauna_evento .ast-right-sidebar #primary,
body.single-barauna_evento .ast-left-sidebar #primary {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    border-left: 0 !important;
    border-right: 0 !important;
}

body.single-barauna_evento .site-content,
body.single-barauna_evento .content-container,
body.single-barauna_evento .content-sidebar-wrap,
body.single-barauna_evento .ct-container[data-sidebar] {
    grid-template-columns: minmax(0, 1fr) !important;
}

body.single-barauna_evento .site-content > main,
body.single-barauna_evento .content-container > main,
body.single-barauna_evento .content-sidebar-wrap > main,
body.single-barauna_evento .ct-container[data-sidebar] > main {
    grid-column: 1 / -1 !important;
}

/* Página individual: conteúdo rolável à esquerda e flyer fixo à direita. */
body.single-barauna_evento .ble-single-event-layout {
    display: grid;
    width: min(100%, 1440px);
    margin: 0 auto;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
    align-items: start;
    gap: clamp(24px, 4vw, 64px);
}

body.single-barauna_evento .ble-single-event-layout.no-flyer {
    display: block;
    width: min(100%, 960px);
}

body.single-barauna_evento .ble-single-event-content {
    min-width: 0;
    height: var(--ble-flyer-height, auto);
    max-height: var(--ble-flyer-height, none);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 2px clamp(12px, 1.5vw, 22px) 44px 2px;
    scrollbar-width: thin;
    scrollbar-color: var(--ble-accent) rgba(255,255,255,.08);
}

body.single-barauna_evento .ble-single-event-content::-webkit-scrollbar {
    width: 8px;
}

body.single-barauna_evento .ble-single-event-content::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(255,255,255,.06);
}

body.single-barauna_evento .ble-single-event-content::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--ble-accent);
}

body.single-barauna_evento .ble-single-event-flyer {
    position: sticky;
    top: 24px;
    display: block;
    width: 100%;
    height: auto;
    overflow: hidden;
    border: 1px solid var(--ble-border);
    border-radius: 20px;
    background: #070707;
    box-shadow: 0 24px 80px rgba(0,0,0,.32);
}

body.single-barauna_evento .ble-single-event-flyer img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: initial;
    object-position: initial;
}

body.single-barauna_evento .ble-single-event-description {
    margin-bottom: 30px;
}

body.single-barauna_evento .ble-single-event-content .ble-event-details {
    margin-bottom: 24px;
}

body.single-barauna_evento .ble-single-event-content .ble-registration-wrap {
    margin-top: 30px;
}

body.single-barauna_evento .ble-single-event-content .ble-form-card {
    padding: clamp(22px, 3vw, 38px);
}

body.single-barauna_evento .ble-single-event-content .ble-form-heading h2 {
    font-size: clamp(28px, 3.4vw, 44px);
}

/* Evita que o tema repita a imagem destacada fora do layout do plugin. */
body.single-barauna_evento .post-thumbnail,
body.single-barauna_evento .entry-thumbnail,
body.single-barauna_evento .featured-image,
body.single-barauna_evento .wp-post-image,
body.single-barauna_evento .ast-blog-featured-section,
body.single-barauna_evento .ct-featured-image,
body.single-barauna_evento .page-header-bg-image {
    display: none !important;
}

body.single-barauna_evento .ble-single-event-flyer img {
    display: block !important;
}

@media (max-width: 900px) {
    body.single-barauna_evento .ble-single-event-layout,
    body.single-barauna_evento .ble-single-event-layout.has-flyer {
        display: flex;
        width: 100%;
        flex-direction: column;
        gap: 26px;
    }

    body.single-barauna_evento .ble-single-event-content {
        order: 2;
        width: 100%;
        height: auto;
        overflow: visible;
        padding: 0;
    }

    body.single-barauna_evento .ble-single-event-flyer {
        position: relative;
        top: auto;
        order: 1;
        width: 100%;
        height: auto;
        max-height: none;
        aspect-ratio: auto;
        border-radius: 16px;
    }

    body.single-barauna_evento .ble-single-event-flyer img {
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
    }
}
