/* ==========================================================
   URBANSS POPUP
========================================================== */

.urban-popup,
.urban-popup * {
    box-sizing: border-box;
}


/* ==========================================================
   OVERLAY
========================================================== */

.urban-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(4, 17, 33, 0.55);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}


.urban-popup.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* Bloqueja scroll de la web mentre està obert */
body.urban-popup-open {
    overflow: hidden;
}


/* ==========================================================
   CAIXA PRINCIPAL
========================================================== */

.urban-popup__box {
    position: relative;

    display: grid;
    grid-template-columns: 50% 50%;
    grid-template-rows: 1fr 100px;

    width: min(1180px, 100%);
    height: 460px;

    background: #ffffff;

    border-radius: 4px;
    overflow: hidden;

    color: #111111;

    font-family: Arial, Helvetica, sans-serif;
}


/* ==========================================================
   IMATGE ESQUERRA
========================================================== */

.urban-popup__image {
    grid-column: 1;
    grid-row: 1 / 3;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 16px 0;

    background: #ffffff;

    border-right: 1px solid #9a9a9a;

    overflow: hidden;
}


.urban-popup__image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: 54% center;
}


/* ==========================================================
   CONTINGUT DRETA
========================================================== */

.urban-popup__content {
    grid-column: 2;
    grid-row: 1;

    display: flex;
    flex-direction: column;

    padding: 26px 42px 40px;
}


/* TÍTOL */

.urban-popup__content h2 {
    margin: 0;
    padding: 0 55px 0 0;

    color: #111111;

    font-size: 20px;
    line-height: 1.18;
    font-weight: 700;

    text-transform: uppercase;
}


/* SUBTÍTOL */

.urban-popup__subtitle {
    margin: 70px 0 0;

    color: #a4a4a4;

    font-size: 16px;
    line-height: 1.25;
    font-weight: 700;

    text-transform: uppercase;
}


/* ==========================================================
   BOTONS
========================================================== */

.urban-popup__buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;

    width: 100%;

    margin-top: auto;
}


.urban-popup__button {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    min-height: 46px;

    padding: 10px 18px;

    border: 0;
    border-radius: 4px;

    color: #000000;

    font-family: inherit;
    font-size: 15px;
    line-height: 1;
    font-weight: 600;

    text-align: center;
    text-decoration: none;
    text-transform: uppercase;

    cursor: pointer;

    transition:
        opacity 0.2s ease,
        transform 0.15s ease;
}


.urban-popup__button:hover {
    opacity: 0.82;
    text-decoration: none;
}


.urban-popup__button:active {
    transform: scale(0.98);
}


/* Botó catàleg */

.urban-popup__button--catalog {
    background: #d4d4d4;
}


/* Botó web */

.urban-popup__button--web {
    background: #30ed63;
}


/* Icona download */

.urban-popup__download-icon {
    display: block;

    width: 16px;
    height: 16px;

    flex: 0 0 16px;
}


/* ==========================================================
   LOGO INFERIOR
========================================================== */

.urban-popup__logo {
    grid-column: 2;
    grid-row: 2;

    display: flex;
    align-items: center;

    padding: 15px 40px;

    background: #ffffff;

    border-top: 1px solid #9a9a9a;
}


.urban-popup__logo img {
    display: block;

    width: auto;
    height: auto;

    max-width: 280px;
    max-height: 65px;
}


/* ==========================================================
   BOTÓ TANCAR
========================================================== */

.urban-popup__close {
    position: absolute;

    top: 14px;
    right: 14px;

    z-index: 10;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    margin: 0;
    padding: 0 0 3px;

    background: transparent;

    border: 1.5px solid #111111;
    border-radius: 50%;

    color: #111111;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 29px;
    line-height: 1;
    font-weight: 300;

    cursor: pointer;

    transition:
        background 0.2s ease,
        opacity 0.2s ease;
}


.urban-popup__close:hover {
    background: #f2f2f2;
}


.urban-popup__close:focus-visible {
    outline: 2px solid #111111;
    outline-offset: 3px;
}


/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 950px) and (min-width: 701px) {

    .urban-popup__box {
        width: min(900px, 100%);
        height: 420px;
    }


    .urban-popup__content {
        padding: 25px 30px 32px;
    }


    .urban-popup__content h2 {
        font-size: 18px;
    }


    .urban-popup__subtitle {
        margin-top: 55px;

        font-size: 14px;
    }


    .urban-popup__button {
        padding: 10px;

        font-size: 13px;
    }


    .urban-popup__logo {
        padding-left: 30px;
    }


    .urban-popup__logo img {
        max-width: 240px;
    }
    .urban-popup__image {
        padding: 16px 22px;
    }
}


/* ==========================================================
   MOBILE / RESPONSIVE VERTICAL
========================================================== */

@media (max-width: 700px) {

    .urban-popup {
        align-items: center;

        padding: 8px;
    }


    .urban-popup__box {
        display: grid;

        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;

        width: 100%;
        max-width: 420px;

        height: auto;
        max-height: calc(100dvh - 16px);

        overflow-x: hidden;
        overflow-y: auto;

        border-radius: 3px;
    }


    /* ======================================================
       CONTINGUT
    ====================================================== */

    .urban-popup__content {
        grid-column: 1;
        grid-row: 1;

        min-height: 260px;

        padding: 18px 28px 25px;
    }


    .urban-popup__content h2 {
        margin: 0;

        padding-right: 45px;

        font-size: 16px;
        line-height: 1.15;
        font-weight: 800;
    }


    .urban-popup__subtitle {
        margin-top: 40px;

        font-size: 13px;
        line-height: 1.25;
        font-weight: 700;
    }


    /* ======================================================
       BOTONS
    ====================================================== */

    .urban-popup__buttons {
        grid-template-columns: 1fr 1fr;

        gap: 10px;

        margin-top: auto;

        padding-top: 36px;
    }


    .urban-popup__button {
        min-height: 42px;

        padding: 10px 10px;

        border-radius: 3px;

        font-size: 12px;
        line-height: 1;
        font-weight: 700;

        white-space: nowrap;
    }


    .urban-popup__download-icon {
        width: 16px;
        height: 16px;

        flex: 0 0 16px;
    }


    /* ======================================================
       IMATGE
    ====================================================== */

    .urban-popup__image {
        grid-column: 1;
        grid-row: 2;

        width: 100%;
        height: 250px;

        padding: 5px 12px 0;

        /*
         * Espai entre la imatge i la línia del logo.
         */
        margin-bottom: 14px;

        border-right: 0;

        background: #ffffff;

        overflow: hidden;
    }


    .urban-popup__image img {
        display: block;

        width: 100%;
        height: 100%;

        object-fit: contain;
        object-position: center;
        margin-bottom: 20px;
        /*
         * Desplaçament visual cap a l'esquerra.
         */
        transform: translateX(-24px);
    }


    /* ======================================================
       LOGO
    ====================================================== */

    .urban-popup__logo {
        grid-column: 1;
        grid-row: 3;

        min-height: 64px;

        padding: 10px 26px;

        border-top: 1px solid #9a9a9a;
    }


    .urban-popup__logo img {
        max-width: 200px;
        max-height: 44px;
    }


    /* ======================================================
       CLOSE MOBILE
    ====================================================== */

    .urban-popup__close {
        top: 8px;
        right: 9px;

        width: 31px;
        height: 31px;

        padding-bottom: 2px;

        border-width: 1px;

        font-size: 22px;
    }
}


/* ==========================================================
   MÒBILS PETITS
========================================================== */

@media (max-width: 380px) {

    .urban-popup {
        padding: 6px;
    }


    .urban-popup__box {
        max-height: calc(100dvh - 12px);
    }


    .urban-popup__content {
        min-height: 245px;

        padding: 16px 22px 22px;
    }


    .urban-popup__content h2 {
        padding-right: 40px;

        font-size: 15px;
        font-weight: 800;
    }


    .urban-popup__subtitle {
        margin-top: 35px;

        font-size: 12px;
        font-weight: 700;
    }


    .urban-popup__buttons {
        gap: 8px;

        padding-top: 30px;
    }


    .urban-popup__button {
        min-height: 40px;

        padding: 9px 6px;

        font-size: 11px;
        font-weight: 700;
    }


    .urban-popup__download-icon {
        width: 15px;
        height: 15px;

        flex: 0 0 15px;
    }


    .urban-popup__image {
        height: 235px;

        padding: 5px 8px 0;

        margin-bottom: 12px;
    }


    .urban-popup__image img {
        transform: translateX(-20px);
        margin-bottom: 15px;
    }


    .urban-popup__logo {
        min-height: 60px;

        padding-left: 22px;
        padding-right: 22px;
    }


    .urban-popup__logo img {
        max-width: 185px;
    }


    .urban-popup__close {
        width: 29px;
        height: 29px;

        font-size: 21px;
    }
}


/* ==========================================================
   PANTALLES AMB POCA ALÇADA
========================================================== */

@media (min-width: 701px) and (max-height: 550px) {

    .urban-popup__box {
        height: calc(100dvh - 30px);
        min-height: 390px;
    }


    .urban-popup__subtitle {
        margin-top: 40px;
    }
}