:root {
    --mv-eventos-primary: #FF5A00;
    --mv-eventos-primary-soft: #e8f4f3;
    --mv-eventos-accent: #f5a623;
    --mv-eventos-text: #1f2933;
    --mv-eventos-muted: #68737d;
    --mv-eventos-border: #e7ecef;
    --mv-eventos-surface: #ffffff;
    --mv-eventos-shadow: 0 18px 45px rgba(0, 60, 68, 0.12);
    --mv-eventos-shadow-soft: 0 10px 28px rgba(0, 60, 68, 0.08);
}

.mv-eventos-lista-wrap {
    width: 100%;
    margin-top: 18px;
}

.mv-eventos-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 18px;
}

.mv-evento-item {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    padding: 22px 24px;
    border: 1px solid var(--mv-eventos-border);
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 58%, #f6fbfa 100%);
    box-shadow: var(--mv-eventos-shadow-soft);
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.mv-evento-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--mv-eventos-primary), var(--mv-eventos-accent));
}

.mv-evento-item:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 90, 95, 0.22);
    box-shadow: var(--mv-eventos-shadow);
}

.mv-evento-date-card {
    display: grid;
    place-items: center;
    min-width: 82px;
    min-height: 82px;
    padding: 10px;
    border-radius: 16px;
    background: var(--mv-eventos-primary-soft);
    color: var(--mv-eventos-primary);
    text-align: center;
    line-height: 1;
}

.mv-evento-date-day {
    display: block;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.mv-evento-date-month {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.mv-evento-date-year {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--mv-eventos-muted);
}

.mv-evento-info {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.mv-evento-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mv-eventos-primary);
}

.mv-evento-kicker::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--mv-eventos-primary);
}

.mv-evento-data {
    display: none;
}

.mv-evento-titulo {
    margin: 0;
    color: var(--mv-eventos-text);
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.25;
    font-weight: 750;
}

.mv-evento-meta {
    color: var(--mv-eventos-muted);
    font-size: 14px;
    line-height: 1.45;
}

.mv-evento-actions {
    display: flex;
    justify-content: flex-end;
}

.mv-open-gallery {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    cursor: pointer;
    background: var(--mv-eventos-primary);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 12px 26px rgba(0, 90, 95, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.mv-open-gallery::after {
    content: "→";
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #FF5A00;
    transition: transform 0.2s ease;
}

.mv-open-gallery:hover,
.mv-open-gallery:focus {
    background: #f5a623;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(0, 90, 95, 0.28);
}

.mv-open-gallery:hover::after,
.mv-open-gallery:focus::after {
    transform: translateX(2px);
}

.mv-open-gallery:focus-visible,
.mv-eventos-modal-close:focus-visible,
.mv-modal-gallery-thumb:focus-visible,
.mv-photo-lightbox-close:focus-visible,
.mv-photo-lightbox-nav:focus-visible {
    outline: 3px solid rgba(245, 166, 35, 0.45);
    outline-offset: 3px;
}

.mv-evento-sem-galeria {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 999px;
    padding: 10px 16px;
    background: #f3f6f7;
    color: var(--mv-eventos-muted);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.mv-eventos-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    inset: 0;
}

.mv-eventos-modal[aria-hidden="false"] {
    display: block;
}

.mv-eventos-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 25, 32, 0.78);
    backdrop-filter: blur(8px);
    animation: mvEventosFadeIn 0.2s ease both;
}

.mv-eventos-modal-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(1180px, calc(100vw - 40px));
    max-height: min(88vh, 920px);
    margin: 6vh auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
    outline: none;
    animation: mvEventosModalIn 0.24s ease both;
}

.mv-eventos-modal-header {
    position: relative;
    padding: 26px 76px 22px 30px;
    border-bottom: 1px solid var(--mv-eventos-border);
    background: linear-gradient(135deg, #ffffff 0%, #f3fbfa 100%);
}

.mv-eventos-modal-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
    color: var(--mv-eventos-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.mv-eventos-modal-label::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--mv-eventos-accent);
}

.mv-eventos-modal-title {
    margin: 0;
    color: var(--mv-eventos-text);
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.mv-eventos-modal-subtitle {
    margin: 10px 0 0;
    color: var(--mv-eventos-muted);
    font-size: 15px;
    line-height: 1.5;
}

.mv-eventos-modal-close {
    position: absolute;
    top: 22px;
    right: 24px;
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(245, 166, 35, 0.35);
    border-radius: 999px;
    background: rgba(245, 166, 35, 0.1);
    color: var(--mv-eventos-accent);
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mv-eventos-modal-close:hover,
.mv-eventos-modal-close:focus {
    border-color: var(--mv-eventos-accent);
    background: var(--mv-eventos-accent);
    color: #fff;
    transform: rotate(90deg) scale(1.02);
    box-shadow: 0 10px 20px rgba(245, 166, 35, 0.22);
}

.mv-eventos-modal-body {
    overflow: auto;
    padding: 0;
    background: #fff;
}

.mv-modal-gallery-layout {
    display: block;
    margin: 0;
    padding: 10px;
    background: transparent;
}

.mv-modal-gallery-hero {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.mv-modal-featured-img {
    display: block;
    width: 100%;
    max-height: 540px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: transparent;
}

.mv-modal-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    column-gap: 0;
    row-gap: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    line-height: 0;
}

.mv-modal-gallery-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 0;
    border: 0 !important;
    border-radius: 5% !important;
    padding: 20px !important;
    margin: 20px !important;
    cursor: pointer;
    object-fit: cover;
    background: #ffffff !important;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    font-size: 0;
    line-height: 0;
    vertical-align: top;
    transition: transform 0.2s ease;
}

.mv-modal-gallery-thumb::after {
    content: none;
}

.mv-modal-gallery-thumb:hover {
    transform: none;
    box-shadow: none;
}

.mv-modal-gallery-thumb.is-active::after {
    border-color: transparent;
}

.mv-modal-gallery-img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
    background: transparent;
    border: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    transition: transform 0.35s ease;
}

.mv-modal-gallery-thumb:hover .mv-modal-gallery-img {
    transform: scale(1.05);
}


.mv-modal-gallery-thumb::before {
    content: "+";
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 1;
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--mv-eventos-accent);
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.mv-modal-gallery-thumb:hover::before,
.mv-modal-gallery-thumb:focus-visible::before {
    opacity: 1;
    transform: translateY(0);
}

.mv-photo-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100001;
}

.mv-photo-lightbox[aria-hidden="false"] {
    display: block;
    animation: mvEventosFadeIn 0.18s ease both;
}

.mv-photo-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 21, 28, 0.86);
    backdrop-filter: blur(10px);
}

.mv-photo-lightbox-frame {
    position: absolute;
    inset: clamp(62px, 7vw, 88px) clamp(18px, 6vw, 86px) clamp(46px, 5vw, 70px);
    display: grid;
    place-items: center;
    pointer-events: none;
}

.mv-photo-lightbox-img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    border-radius: 18px;
    background: #fff;
    object-fit: contain;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
    pointer-events: auto;
    animation: mvEventosPhotoIn 0.2s ease both;
}

.mv-photo-lightbox-close,
.mv-photo-lightbox-nav,
.mv-photo-lightbox-counter {
    pointer-events: auto;
}

.mv-photo-lightbox-close {
    position: absolute;
    top: -44px;
    right: 0;
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(245, 166, 35, 0.45);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--mv-eventos-accent);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.mv-photo-lightbox-close:hover,
.mv-photo-lightbox-close:focus {
    border-color: var(--mv-eventos-accent);
    background: var(--mv-eventos-accent);
    color: #fff;
    transform: rotate(90deg);
}

.mv-photo-lightbox-nav {
    position: absolute;
    top: 50%;
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 40px;
    font-weight: 200;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.mv-photo-lightbox-nav:hover,
.mv-photo-lightbox-nav:focus {
    border-color: rgba(245, 166, 35, 0.75);
    background: rgba(245, 166, 35, 0.95);
    color: #fff;
}

.mv-photo-lightbox-prev {
    left: -64px;
}

.mv-photo-lightbox-next {
    right: -64px;
}

.mv-photo-lightbox-counter {
    position: absolute;
    bottom: -38px;
    left: 50%;
    padding: 7px 13px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    transform: translateX(-50%);
}

body.mv-modal-open {
    overflow: hidden;
}

@keyframes mvEventosFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes mvEventosModalIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes mvEventosPhotoIn {
    from {
        opacity: 0;
        transform: scale(0.985);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* Reset forte para evitar estilos de tema nos botoes/imagens da galeria. */
.mv-eventos-modal .mv-modal-gallery-grid,
.mv-eventos-modal .mv-modal-gallery-grid > .mv-modal-gallery-thumb {
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.mv-eventos-modal .mv-modal-gallery-grid > .mv-modal-gallery-thumb,
.mv-eventos-modal .mv-modal-gallery-grid > .mv-modal-gallery-thumb img {
    border-radius: 0 !important;
    box-shadow: none !important;
}

.mv-eventos-modal .mv-modal-gallery-grid > .mv-modal-gallery-thumb img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

@media (max-width: 900px) {
    .mv-evento-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .mv-evento-actions {
        grid-column: 1 / -1;
        width: 100%;
    }

    .mv-open-gallery,
    .mv-evento-sem-galeria {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .mv-eventos-lista {
        gap: 14px;
    }

    .mv-evento-item {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 20px;
    }

    .mv-evento-item::before {
        width: 100%;
        height: 5px;
    }

    .mv-evento-date-card {
        width: 100%;
        min-height: auto;
        grid-template-columns: auto auto auto;
        justify-content: center;
        gap: 8px;
    }

    .mv-evento-date-day,
    .mv-evento-date-month,
    .mv-evento-date-year {
        margin: 0;
        font-size: 15px;
        letter-spacing: 0;
    }

    .mv-evento-titulo {
        font-size: 19px;
    }

    .mv-eventos-modal-content {
        width: calc(100vw - 24px);
        max-height: 92vh;
        margin: 4vh auto;
        border-radius: 18px;
    }

    .mv-eventos-modal-header {
        padding: 22px 64px 18px 20px;
    }

    .mv-eventos-modal-close {
        top: 18px;
        right: 18px;
        width: 38px;
        height: 38px;
    }

    .mv-eventos-modal-body {
        padding: 0;
    }

    .mv-modal-featured-img {
        max-height: 420px;
        aspect-ratio: 4 / 3;
    }

    .mv-modal-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
    }

    .mv-modal-gallery-thumb {
        aspect-ratio: 3 / 2;
        min-height: 0;
        height: auto;
    }

    .mv-modal-gallery-img {
        min-height: 0;
        height: 100%;
    }
}

@media (max-width: 760px) {
    .mv-photo-lightbox-frame {
        inset: 70px 18px 56px;
    }

    .mv-photo-lightbox-close {
        top: -48px;
        right: 0;
    }

    .mv-photo-lightbox-nav {
        width: 42px;
        height: 42px;
        font-size: 34px;
        background: rgba(9, 21, 28, 0.38);
    }

    .mv-photo-lightbox-prev {
        left: 8px;
    }

    .mv-photo-lightbox-next {
        right: 8px;
    }

    .mv-photo-lightbox-img {
        border-radius: 14px;
    }
}
