/* Urban City — interactive master plan / enclave maps */

.ucl-maps {
    --um-ink: var(--ucl-ink, #142028);
    --um-deep: var(--ucl-deep, #16343f);
    --um-teal: var(--ucl-teal, #1f6f7a);
    --um-gold: var(--ucl-gold, #c49a45);
    --um-soft: #5b6d75;
    position: relative;
    padding: clamp(3.25rem, 7vw, 5.25rem) 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 50% at 8% 0%, rgba(31, 111, 122, 0.16), transparent 55%),
        radial-gradient(ellipse 60% 45% at 92% 18%, rgba(196, 154, 69, 0.16), transparent 50%),
        linear-gradient(180deg, #f4f8f9 0%, #eef3f6 48%, #f7fafb 100%);
    perspective: 1400px;
}

.ucl-maps-atmosphere {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.ucl-maps-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(42px);
    opacity: 0.5;
    animation: um-float 14s ease-in-out infinite;
}

.ucl-maps-orb--a {
    width: 22rem;
    height: 22rem;
    left: -5rem;
    top: 8%;
    background: rgba(31, 111, 122, 0.28);
}

.ucl-maps-orb--b {
    width: 18rem;
    height: 18rem;
    right: -4rem;
    top: 28%;
    background: rgba(196, 154, 69, 0.22);
    animation-delay: -5s;
}

.ucl-maps-orb--c {
    width: 14rem;
    height: 14rem;
    left: 45%;
    bottom: 6%;
    background: rgba(22, 52, 63, 0.16);
    animation-delay: -8s;
}

@keyframes um-float {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(10px, -16px, 0) scale(1.05); }
}

.ucl-maps .container {
    position: relative;
    z-index: 1;
}

.ucl-maps-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem;
    margin: 0 0 1.75rem;
}

.ucl-maps-stage {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 1.1rem;
    margin-bottom: 1.5rem;
    transform-style: preserve-3d;
}

@media (max-width: 960px) {
    .ucl-maps-stage {
        grid-template-columns: 1fr;
    }
}

.ucl-maps-stage-frame {
    border-radius: 1.5rem;
    padding: 0.7rem;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(238, 243, 246, 0.88));
    border: 1px solid rgba(22, 52, 63, 0.1);
    box-shadow:
        0 28px 60px rgba(16, 38, 46, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: translateZ(18px);
}

.ucl-maps-hero-btn {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 1.15rem;
    overflow: hidden;
    cursor: pointer;
    background: #10262e;
    aspect-ratio: 2 / 1;
    color: #fff;
    text-align: left;
}

.ucl-maps-hero-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s ease;
}

.ucl-maps-hero-btn:hover img,
.ucl-maps-hero-btn:focus-visible img {
    transform: scale(1.05);
}

.ucl-maps-hero-glass {
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.85rem;
    padding: 0.95rem 1.05rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(16, 38, 46, 0.82), rgba(31, 111, 122, 0.72));
    backdrop-filter: blur(10px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
    display: grid;
    gap: 0.25rem;
}

.ucl-maps-live {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f2e2bf;
}

.ucl-maps-live::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
    animation: um-pulse 1.6s ease-out infinite;
}

@keyframes um-pulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
    70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.ucl-maps-hero-glass strong {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    line-height: 1.25;
}

.ucl-maps-hero-glass em {
    font-style: normal;
    font-size: 0.9rem;
    opacity: 0.88;
    line-height: 1.4;
}

.ucl-maps-hero-cta {
    margin-top: 0.25rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--um-gold);
}

.ucl-maps-highlights {
    border-radius: 1.4rem;
    padding: 1.15rem;
    background: linear-gradient(165deg, #16343f 0%, #1f6f7a 70%, #2a5560 120%);
    color: #f5f8fa;
    box-shadow: 0 24px 48px rgba(16, 38, 46, 0.2);
    transform: translateZ(28px) rotateY(-4deg);
}

.ucl-maps-highlights-label {
    margin: 0 0 0.75rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #f2e2bf;
}

.ucl-maps-highlights ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.ucl-maps-highlights li {
    padding: 0.7rem 0.8rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease;
}

.ucl-maps-highlights li:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.14);
}

.ucl-map-rail {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.45rem;
    margin: 0 0 1.25rem;
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(22, 52, 63, 0.1);
    box-shadow: 0 14px 32px rgba(16, 38, 46, 0.08);
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb, #145c4c) var(--scrollbar-track, #e7efeb);
}

.ucl-map-rail-step {
    flex: 0 0 auto;
    display: grid;
    gap: 0.1rem;
    justify-items: start;
    border: 0;
    background: transparent;
    color: var(--um-soft);
    font: inherit;
    padding: 0.55rem 0.85rem;
    border-radius: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ucl-map-rail-step span {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ucl-map-rail-step strong {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--um-ink);
}

.ucl-map-rail-step:hover {
    background: rgba(31, 111, 122, 0.08);
    transform: translateY(-1px);
}

.ucl-map-rail-step.is-active {
    background: linear-gradient(135deg, #16343f, #1f6f7a);
    color: #f2e2bf;
    box-shadow: 0 10px 22px rgba(22, 52, 63, 0.25);
}

.ucl-map-rail-step.is-active strong {
    color: #fff;
}

.ucl-maps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 1100px) {
    .ucl-maps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .ucl-maps-grid { grid-template-columns: 1fr; }
    .ucl-maps-highlights { transform: none; }
}

.ucl-map-card {
    border-radius: 1.25rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(22, 52, 63, 0.08);
    box-shadow: 0 16px 36px rgba(16, 38, 46, 0.1);
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

.ucl-map-card.is-dimmed {
    opacity: 0.28;
    transform: scale(0.98);
    pointer-events: none;
}

.ucl-map-card:hover {
    transform: translateY(-7px) rotateX(3deg) rotateY(-3deg);
    box-shadow: 0 26px 50px rgba(16, 38, 46, 0.16);
}

.ucl-map-card-media {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: #10262e;
    aspect-ratio: 1;
    overflow: hidden;
}

.ucl-map-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s ease;
}

.ucl-map-card:hover .ucl-map-card-media img {
    transform: scale(1.07);
}

.ucl-map-card-zoom {
    position: absolute;
    right: 0.7rem;
    bottom: 0.7rem;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--um-deep);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ucl-map-card-body {
    padding: 0.95rem 1rem 1.1rem;
}

.ucl-map-card-tag {
    margin: 0 0 0.3rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--um-teal);
}

.ucl-map-card-body h3 {
    margin: 0 0 0.35rem;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    font-size: 1.05rem;
    color: var(--um-ink);
}

.ucl-map-card-body p {
    margin: 0 0 0.75rem;
    color: var(--um-soft);
    font-size: 0.9rem;
    line-height: 1.45;
}

.ucl-map-card-link {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--um-deep);
    font: inherit;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.ucl-maps-credit {
    margin: 1.4rem 0 0;
    text-align: center;
    font-size: 0.86rem;
    color: var(--um-soft);
}

.ucl-maps-credit a {
    color: var(--um-teal);
    font-weight: 700;
}

.ucl-map-modal[hidden] {
    display: none !important;
}

.ucl-map-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.ucl-map-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 24, 0.78);
    backdrop-filter: blur(7px);
}

.ucl-map-modal-dialog {
    position: relative;
    width: min(1100px, 100%);
    max-height: min(92vh, 900px);
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: #0f2229;
    border-radius: 1.2rem;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45);
    color: #f5f8fa;
}

.ucl-map-modal-close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 3;
    width: 2.4rem;
    height: 2.4rem;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.ucl-map-modal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 3.2rem 0.75rem 1.1rem;
}

.ucl-map-modal-toolbar strong {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    font-size: 1.05rem;
}

.ucl-map-modal-zoom-controls {
    display: inline-flex;
    gap: 0.35rem;
}

.ucl-map-modal-zoom-controls button {
    min-width: 2.2rem;
    height: 2.2rem;
    border: 0;
    border-radius: 0.6rem;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.ucl-map-modal-viewport {
    position: relative;
    overflow: auto;
    background: #081418;
    cursor: grab;
    min-height: 280px;
}

.ucl-map-modal-viewport.is-dragging {
    cursor: grabbing;
}

.ucl-map-modal-viewport img {
    display: block;
    width: 100%;
    height: auto;
    transform-origin: center center;
    transition: transform 0.12s ease-out;
    user-select: none;
    -webkit-user-drag: none;
}

.ucl-map-modal-blurb {
    margin: 0;
    padding: 0.8rem 1.1rem 1rem;
    font-size: 0.92rem;
    color: rgba(245, 248, 250, 0.84);
}

@media (prefers-reduced-motion: reduce) {
    .ucl-maps-orb,
    .ucl-maps-live::before,
    .ucl-map-card,
    .ucl-maps-hero-btn img {
        animation: none !important;
        transition: none !important;
    }

    .ucl-maps-highlights,
    .ucl-map-card:hover {
        transform: none !important;
    }
}
