/* ==========================================================
   URBANX — POP-UP CENTRAT
   ========================================================== */

#sobis-urbanx-popup,
#sobis-urbanx-popup *,
#sobis-urbanx-popup *::before,
#sobis-urbanx-popup *::after {
    box-sizing: border-box;
}

html.urbanx-modal-open,
html.urbanx-modal-open body {
    overflow: hidden;
}

/* Fereastra */

#sobis-urbanx-popup {
    --urbanx-blue: #147ca6;
    --urbanx-dark: #04121e;

    --urbanx-gradient: linear-gradient(
        90deg,
        #12769f 0%,
        #1d4266 100%
    );

    position: fixed;
    inset: 0;

    width: min(1080px, calc(100vw - 40px));
    max-width: none;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);

    margin: auto;
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    background: var(--urbanx-dark);
    color: #fff;

    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 400;
    text-align: left;

    box-shadow: 0 28px 90px rgba(4, 18, 30, 0.55);

    scrollbar-width: thin;
    scrollbar-color: var(--urbanx-blue) var(--urbanx-dark);
}

#sobis-urbanx-popup:not([open]) {
    display: none;
}

#sobis-urbanx-popup[open] {
    animation: urbanxModalEnter 0.35s ease-out both;
}

#sobis-urbanx-popup::backdrop {
    background: rgba(4, 18, 30, 0.70);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Fundal închis cu lumină difuză în dreapta sus */

#sobis-urbanx-popup .urbanx-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 30px 32px 32px;

    background-color: var(--urbanx-dark);
    background-image: radial-gradient(
        ellipse 85% 90% at 100% 0%,
        rgba(18, 119, 160, 0.90) 0%,
        rgba(18, 119, 160, 0.48) 28%,
        rgba(29, 66, 102, 0.30) 52%,
        rgba(4, 18, 30, 0) 78%
    );
}

/* Harta rămâne vizibilă sus și se estompează spre butoane */

#sobis-urbanx-popup .urbanx-background {
    position: absolute;
    inset: 0;
    z-index: -1;

    width: 100%;
    height: 100%;

    fill: none;
    stroke: #fff;
    stroke-width: 1.2;
    stroke-linecap: round;
    stroke-linejoin: round;

    opacity: 0.075;
    pointer-events: none;

    -webkit-mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 25%,
        rgba(0, 0, 0, 0.65) 48%,
        rgba(0, 0, 0, 0.15) 72%,
        transparent 90%
    );

    mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 25%,
        rgba(0, 0, 0, 0.65) 48%,
        rgba(0, 0, 0, 0.15) 72%,
        transparent 90%
    );
}

#sobis-urbanx-popup .urbanx-plan-roads {
    stroke-width: 1.5;
}

#sobis-urbanx-popup .urbanx-plan-streets {
    stroke-width: 1.1;
}

#sobis-urbanx-popup .urbanx-plan-parcels {
    stroke-width: 1;
    opacity: 0.8;
}

#sobis-urbanx-popup .urbanx-plan-buildings {
    stroke-width: 1.1;
}

#sobis-urbanx-popup .urbanx-plan-park {
    stroke-width: 1;
    opacity: 0.8;
}

/* Închidere */

#sobis-urbanx-popup .urbanx-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;

    display: grid;
    place-items: center;

    width: 44px;
    height: 44px;
    min-width: 0;
    margin: 0;
    padding: 12px;

    appearance: none;
    border: 1px solid var(--urbanx-blue);
    border-radius: 50%;
    background: rgba(4, 18, 30, 0.18);
    color: #fff;
    box-shadow: none;
    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

#sobis-urbanx-popup .urbanx-close::before,
#sobis-urbanx-popup .urbanx-close::after {
    content: none !important;
    display: none !important;
}

#sobis-urbanx-popup .urbanx-close:hover {
    border-color: var(--urbanx-blue);
    background: rgba(20, 124, 166, 0.22);
}

#sobis-urbanx-popup .urbanx-close svg {
    display: block;
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
}

#sobis-urbanx-popup .urbanx-close:focus-visible,
#sobis-urbanx-popup .urbanx-button:focus-visible {
    outline: 2px solid var(--urbanx-blue);
    outline-offset: 4px;
}

/* Antet */

#sobis-urbanx-popup .urbanx-header {
    margin-bottom: 32px;
    padding: 0 28px;
    text-align: center;
}

#sobis-urbanx-popup .urbanx-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;

    min-height: 32px;
    padding: 8px 17px;

    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;

    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.16em;
    text-indent: 0.16em;
    text-transform: uppercase;
}

#sobis-urbanx-popup .urbanx-badge::after {
    content: "";
    position: absolute;
    inset: -50% auto -50% -75%;
    width: 45%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.20),
        transparent
    );

    transform: skewX(-20deg);
    animation: urbanxBadgeShine 5s ease-in-out infinite;
    pointer-events: none;
}

/* Titlu UrbanX */

#sobis-urbanx-popup #urbanx-popup-title {
    margin: 15px 0 10px;
    padding: 0;
    color: #fff;

    font-family: "Roboto", sans-serif;
    font-size: clamp(48px, 6vw, 68px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -1.5px;
    text-align: center;
    text-transform: none;
    text-shadow: none;
}

#sobis-urbanx-popup #urbanx-popup-title .urbanx-name {
    font: inherit;
    letter-spacing: inherit;
    color: inherit;
    white-space: nowrap;
}

#sobis-urbanx-popup #urbanx-popup-title .urbanx-title-x {
    font: inherit;
    letter-spacing: inherit;
    color: var(--urbanx-blue);
}

#sobis-urbanx-popup .urbanx-intro {
    max-width: 640px;
    margin: 0 auto;
    padding: 0;

    color: rgba(255, 255, 255, 0.80);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.1px;
}

#sobis-urbanx-popup .urbanx-intro strong {
    color: #fff;
    font-weight: 500;
}

/* Cele trei carduri */

#sobis-urbanx-popup .urbanx-modules {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 16px;
}

#sobis-urbanx-popup .urbanx-module {
    position: relative;
    min-width: 0;
    margin: 0;
    padding: 23px 20px 20px;

    border: 1px solid var(--urbanx-blue);
    border-radius: 12px;
    background: #e3edf2;
    color: var(--urbanx-dark);
    box-shadow: 0 6px 18px rgba(4, 18, 30, 0.08);
}

#sobis-urbanx-popup .urbanx-module-featured {
    border-color: var(--urbanx-blue);
}

/* Eticheta legislativă */

#sobis-urbanx-popup .urbanx-law-badge {
    position: absolute;
    top: 0;
    right: 16px;
    transform: translateY(-50%);

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 25px;
    max-width: calc(100% - 32px);
    padding: 6px 13px;

    border-radius: 50px;
    background: var(--urbanx-gradient);
    color: #fff;

    font-size: 10px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;

    box-shadow: 0 3px 10px rgba(4, 18, 30, 0.16);
}

/* Titluri și pictograme */

#sobis-urbanx-popup .urbanx-module-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

#sobis-urbanx-popup .urbanx-icon {
    display: grid;
    place-items: center;
    flex: 0 0 36px;

    width: 36px;
    height: 36px;

    border-radius: 50%;
    background: var(--urbanx-gradient);
    color: #fff;
}

#sobis-urbanx-popup .urbanx-icon svg {
    display: block;
    width: 22px;
    height: 22px;

    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#sobis-urbanx-popup .urbanx-module h3 {
    margin: 0;
    padding: 0;
    color: var(--urbanx-dark);

    font-family: "Roboto", sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.1px;
    text-transform: none;
}

/* Textele din carduri */

#sobis-urbanx-popup .urbanx-module ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0 0 0 16px;
    list-style: disc outside;
}

#sobis-urbanx-popup .urbanx-module li {
    display: list-item;
    margin: 0;
    padding: 0;

    color: rgba(4, 18, 30, 0.80);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
}

#sobis-urbanx-popup .urbanx-module li::marker {
    color: var(--urbanx-blue);
}

/* Beneficii: un singur rând, fără chenare individuale */

#sobis-urbanx-popup .urbanx-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 26px 0 28px;
}

#sobis-urbanx-popup .urbanx-stat {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-width: 0;
    min-height: 64px;
    padding: 8px 16px;

    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
}

/* Separatoare discrete între beneficii */

#sobis-urbanx-popup .urbanx-stat + .urbanx-stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;

    width: 1px;
    height: 36px;

    background: rgba(255, 255, 255, 0.20);
    transform: translateY(-50%);
}

#sobis-urbanx-popup .urbanx-stat strong {
    display: block;
    color: #fff;

    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.2px;
}

#sobis-urbanx-popup .urbanx-stat span {
    display: block;
    max-width: 190px;
    color: rgba(255, 255, 255, 0.78);

    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
}

/* Butoane */

#sobis-urbanx-popup .urbanx-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

#sobis-urbanx-popup .urbanx-button {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 220px;
    min-height: 52px;
    margin: 0;
    padding: 13px 26px;

    border: 0;
    border-radius: 50px;
    background: none;
    color: #fff;

    font-family: "Roboto", sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    text-transform: none;

    box-shadow: none;

    transition:
        transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        filter 0.3s ease,
        background-color 0.3s ease,
        border-color 0.3s ease;
}

#sobis-urbanx-popup .urbanx-button:visited {
    color: #fff;
}

/* Elimină decorațiile suplimentare ale linkurilor din temă */

#sobis-urbanx-popup .urbanx-button::before,
#sobis-urbanx-popup .urbanx-button::after {
    content: none !important;
    display: none !important;
}

#sobis-urbanx-popup .urbanx-button:hover {
    transform: scale(1.03) translateY(-2px);
    color: #fff;
    text-decoration: none;
}

/* Buton principal */

#sobis-urbanx-popup .urbanx-button-primary,
#sobis-urbanx-popup .urbanx-button-primary:visited {
    border: 0 !important;
    background: var(--urbanx-gradient);
    background-clip: border-box;
    color: #fff;
    box-shadow: none !important;
}

#sobis-urbanx-popup .urbanx-button-primary:hover {
    filter: brightness(1.15);
}

/* Buton secundar outline */

#sobis-urbanx-popup .urbanx-button-outline,
#sobis-urbanx-popup .urbanx-button-outline:visited {
    border: 1px solid rgba(255, 255, 255, 0.85);
    background: transparent;
    color: #fff;
}

#sobis-urbanx-popup .urbanx-button-outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
    filter: none;
}

/* Animații */

@keyframes urbanxModalEnter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes urbanxBadgeShine {
    0%, 72% {
        left: -75%;
        opacity: 0;
    }

    76% {
        opacity: 1;
    }

    94% {
        left: 140%;
        opacity: 1;
    }

    100% {
        left: 140%;
        opacity: 0;
    }
}

/* Tabletă și ecrane mai mici */

@media (max-width: 850px) {
    #sobis-urbanx-popup .urbanx-panel {
        padding: 28px 22px;
    }

    #sobis-urbanx-popup .urbanx-modules {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    #sobis-urbanx-popup .urbanx-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 20px;
    }

    #sobis-urbanx-popup .urbanx-stat:nth-child(3)::before {
        content: none;
    }

    #sobis-urbanx-popup .urbanx-background {
        height: 620px;
    }
}

/* Mobil */

@media (max-width: 480px) {
    #sobis-urbanx-popup {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        border-radius: 12px;
    }

    #sobis-urbanx-popup .urbanx-panel {
        padding: 24px 16px;

        background-image: radial-gradient(
            ellipse 130% 500px at 100% 0%,
            rgba(18, 119, 160, 0.80) 0%,
            rgba(18, 119, 160, 0.36) 35%,
            rgba(4, 18, 30, 0) 80%
        );
    }

    #sobis-urbanx-popup .urbanx-close {
        top: 8px;
        right: 8px;
    }

    #sobis-urbanx-popup .urbanx-header {
        margin-bottom: 28px;
        padding: 28px 0 0;
    }

    #sobis-urbanx-popup #urbanx-popup-title {
        font-size: 48px;
        letter-spacing: -1px;
    }

    #sobis-urbanx-popup .urbanx-intro {
        font-size: 14px;
    }

    #sobis-urbanx-popup .urbanx-module {
        padding: 23px 16px 18px;
    }

    #sobis-urbanx-popup .urbanx-stats {
        row-gap: 16px;
        margin: 22px 0 26px;
    }

    #sobis-urbanx-popup .urbanx-stat {
        min-height: 70px;
        padding: 6px 10px;
    }

    #sobis-urbanx-popup .urbanx-stat strong {
        font-size: 18px;
    }

    #sobis-urbanx-popup .urbanx-stat span {
        font-size: 12px;
    }

    #sobis-urbanx-popup .urbanx-buttons {
        flex-direction: column;
        gap: 12px;
    }

    #sobis-urbanx-popup .urbanx-button {
        width: 100%;
        min-width: 0;
        font-size: 17px;
    }
}

/* Respectă preferința pentru mișcare redusă */

@media (prefers-reduced-motion: reduce) {
    #sobis-urbanx-popup,
    #sobis-urbanx-popup *,
    #sobis-urbanx-popup *::before,
    #sobis-urbanx-popup *::after {
        animation: none !important;
        transition: none !important;
    }

    #sobis-urbanx-popup .urbanx-badge::after {
        display: none;
    }

    #sobis-urbanx-popup .urbanx-button:hover {
        transform: none;
    }
}

/* Beneficiul Integrat + eticheta NOU */

#sobis-urbanx-popup .urbanx-stat-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#sobis-urbanx-popup .urbanx-stat .urbanx-integration-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    max-width: none;
    padding: 4px 7px;

    border: 1px solid #147ca6;
    border-radius: 4px;
    background: #147ca6;
    color: #fff;

    font-family: "Roboto", sans-serif;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}