.map-page {
    color: white;
    background: #09252d url('../Piramida_Festival_Assets/Images/1.Home/1.Banner/WEBP/Banner-background.webp') center top / cover fixed;
}

.map-page *,
.map-page *::before,
.map-page *::after {
    box-sizing: border-box;
}

.map-page .home-nav {
    max-width: 1240px;
}

.map-shell {
    display: grid;
    grid-template-columns: minmax(0, 8fr) minmax(340px, 4fr);
    gap: 24px;
    max-width: 1240px;
    margin: 190px auto 40px;
    padding: 22px;
    border: 2px solid #ffffff35;
    border-radius: 12px;
    background: #143b4420;
}

.map-stage {
    position: relative;
    display: grid;
    align-content: center;
    min-width: 0;
    min-height: 585px;
}

.floor-map {
    display: block;
    width: 100%;
    height: auto;
}

.floor-map[hidden] {
    display: none;
}

#floor-maps {
    display: grid;
    width: 100%;
    aspect-ratio: 690 / 555;
    isolation: isolate;
}

.map-stage .event-map {
    display: block;
    grid-area: 1 / 1;
    width: 100%;
    height: auto;
    aspect-ratio: 690 / 555;
    border: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px) scale(0.985);
    transition:
        opacity 700ms cubic-bezier(.22, 1, .36, 1),
        transform 700ms cubic-bezier(.22, 1, .36, 1),
        visibility 0s linear 700ms;
}

.map-stage .event-map.is-active {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
}

.map-outline {
    fill: none;
    stroke: #a8f11d;
    stroke-width: 1.8;
}

.map-room {
    fill: #7da4b36b;
    stroke: transparent;
    stroke-width: 2;
    transition: fill 200ms, stroke 200ms;
}

.map-cube {
    cursor: pointer;
    outline: none;
}

.map-cube:hover .map-room,
.map-cube:focus-visible .map-room {
    stroke: white;
}

.map-cube.is-active .map-room {
    fill: #a4f31a;
}

.map-cube text {
    fill: white;
    font-family: 'PP Telegraf', Arial, sans-serif;
    font-size: 10px;
    text-anchor: middle;
    pointer-events: none;
}

.map-cube.is-active text {
    font-weight: 800;
}

.map-selection {
    position: absolute;
    bottom: 0;
    left: 12px;
    margin: 0;
    font-size: 12px;
    color: #d5e4e8;
}

.map-sidebar {
    min-width: 0;
    background: #ffffff13;
    border-radius: 9px;
    overflow: hidden;
}

.floor-switcher {
    display: grid;
    grid-template-columns: 1.35fr repeat(4, 1fr);
    height: 55px;
    border-bottom: 1px solid #ffffff20;
}

.floor-switcher span,
.floor-switcher button {
    display: grid;
    place-items: center;
    border: 0;
    border-right: 1px solid #ffffff16;
    background: transparent;
    color: white;
    font: inherit;
    font-size: 21px;
}

.floor-switcher button {
    cursor: pointer;
    font-weight: 800;
}

.floor-switcher button[aria-pressed='true'] {
    background: #a4f31a;
    color: #09252d;
}

.floor-switcher button:focus-visible,
.map-events .day-item:focus-visible {
    outline: 3px solid white;
    outline-offset: -3px;
}

.map-events {
    display: flex;
    flex-direction: column;
    gap: 11px;
    height: 550px;
    overflow-y: auto;
    padding: 25px 16px 24px 25px;
    scrollbar-color: #ffffffb0 transparent;
    scrollbar-width: thin;
}

/* Compact map cards retain the shared event content classes. */
.map-events .day-item {
    grid-template-columns: 82px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 0 16px;
    align-items: center;
    flex-shrink: 0;
    width: 100%;
    min-height: 96px;
    padding: 7px;
    border-radius: 12px;
    color: #111;
    cursor: pointer;
    transition: background 180ms;
}

.map-events .day-item[hidden] {
    display: none;
}

.map-events .day-item:hover {
    background: #ecf8d5;
}

.map-events .day-item.is-active {
    background: #a4f31a;
    border-color: #a4f31a;
}

.map-events .day-item:focus-visible {
    outline: 3px solid white;
    outline-offset: 2px;
}

.map-events .day-thumb {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 82px;
    height: 82px;
}

.map-events .day-copy {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
}

.map-events .day-copy .event-title {
    font-size: 14px;
    line-height: 1.15;
}

.map-events .day-copy .event-meta {
    margin: 5px 0 0;
    color: #5d5757;
    font-size: 12px;
    line-height: 1.2;
    flex-wrap: wrap;
}

.map-events .day-time {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-self: start;
    align-items: center;
    gap: 5px;
    min-height: 0;
    margin-top: 10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.map-events .day-time img {
    width: 14px;
    height: 14px;
}

.map-events .day-time .event-time-label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #5d5757;
    font-size: 14px;
    line-height: 1.2;
}

.map-events .day-time .event-time-value {
    color: #111;
    font-size: 14px;
}

@media (max-width: 1100px) {
    .map-shell {
        margin-left: 24px;
        margin-right: 24px;
        gap: 12px;
    }



    .map-events {
        padding: 18px 12px;
    }
}

@media (max-width: 760px) {
    .map-shell {
        grid-template-columns: 1fr;
        margin: 125px 16px 28px;
        padding: 12px;
    }

    .map-stage {
        min-height: 0;
        padding-bottom: 30px;
    }

    .map-events {
        height: 330px;
    }

    .map-page .home-nav {
        align-items: center;
    }
}

@media (prefers-reduced-motion: reduce) {

    .map-stage .event-map,
    .map-room,
    .map-events .day-item {
        transition: none;
    }
}

@media (max-width: 1100px) {
    .map-events .day-item {
        grid-template-columns: 70px minmax(0, 1fr);
        gap: 0 10px;
    }

    .map-events .day-thumb {
        width: 70px;
        height: 70px;
    }
}

.map-events .map-event-details {
    display: none;
}

.map-events .day-item.is-active .map-event-details {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 3;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    margin: 7px -7px -7px;
    border-radius: 0 0 11px 11px;
    background: #6b9e17;
    color: white;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
}

.map-events .map-event-details:hover {
    background: #577f13;
}

.map-events .map-event-details:focus-visible {
    outline: 3px solid white;
    outline-offset: -3px;
}
