/* ============================================================
   POPUP OB ZAPUŠČANJU STRANI (exit intent)

   Ločena datoteka, ki se naloži samo takrat, ko je za trenutno
   podstran objavljen popup - style.css ostane nedotaknjen.

   Barve popupa nastavi skrbnik, zato jih podamo kot spremenljivki
   --sun-offer-accent in --sun-offer-side-bg neposredno na elementu.
   ============================================================ */

.sun-offer {
    --sun-offer-accent: #F5AF2D;
    --sun-offer-side-bg: #202020;

    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Montserrat', sans-serif;
}

.sun-offer.is-open {
    display: flex;
}

.sun-offer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(32, 32, 32, .55);
    /* Vsebina za popupom se ne sme brati ostro - fokus je na ponudbi. */
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: sunOfferFade .25s ease both;
}

.sun-offer__dialog {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 760px;
    /* Na nizkih zaslonih (ležeči telefon) mora modal ostati v oknu. */
    max-height: calc(100vh - 40px);
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(32, 32, 32, .35);
    animation: sunOfferPop .3s cubic-bezier(.2, .8, .3, 1) both;
}

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

@keyframes sunOfferPop {
    from { opacity: 0; transform: translateY(16px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .sun-offer__overlay,
    .sun-offer__dialog {
        animation: none;
    }
}

/* -- GUMB ZA ZAPIRANJE ---------------------------------------
   Vedno v desnem zgornjem kotu modala, s 44x44 px dotikalno
   površino - enako dosegljiv na telefonu kot na namizju. */

.sun-offer__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: #202020;
    box-shadow: 0 2px 10px rgba(32, 32, 32, .18);
    cursor: pointer;
    transition: .2s;
}

.sun-offer__close:hover,
.sun-offer__close:focus-visible {
    background: var(--sun-offer-accent);
    color: #ffffff;
    outline: none;
}

.sun-offer__close svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* -- LEVI (TEMNI) DEL ---------------------------------------- */

.sun-offer__side {
    position: relative;
    flex: 0 0 42%;
    max-width: 42%;
    background: var(--sun-offer-side-bg);
    color: #ffffff;
    overflow: hidden;
}

/* Topel odsev v kotu - isti občutek kot pasica na naslovnici. */
.sun-offer__side:before {
    content: "";
    position: absolute;
    top: -60px;
    right: -80px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: var(--sun-offer-accent);
    opacity: .22;
    filter: blur(40px);
    pointer-events: none;
}

.sun-offer__side-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 30px;
}

.sun-offer__glyph {
    display: block;
    margin-bottom: 26px;
    color: var(--sun-offer-accent);
}

.sun-offer__glyph svg {
    display: block;
    width: 62px;
    height: auto;
}

.sun-offer__side-title {
    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 14px;
    /* Naslov se prelomi med besedami, nikoli sredi besede - v ozkem
       stolpcu (npr. predogled v administraciji) bi sicer nastal "podarim/o." */
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

.sun-offer__side-title p {
    margin: 0;
}

/* Poudarjen del naslova - skrbnik ga v urejevalniku označi krepko. */
.sun-offer__side-title strong,
.sun-offer__side-title b,
.sun-offer__side-title span.accent {
    color: var(--sun-offer-accent);
}

.sun-offer__side-text {
    font-size: 13px;
    line-height: 1.5;
    font-weight: 400;
    opacity: .75;
    margin: 0;
}

.sun-offer__side-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* -- DESNI (BELI) DEL ---------------------------------------- */

.sun-offer__content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 40px 36px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sun-offer__badge {
    display: inline-block;
    margin-bottom: 16px;
    padding: 6px 14px;
    border-radius: 41px;
    background: rgba(245, 175, 45, .16);
    color: #8a5c00;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sun-offer__heading {
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
    color: #202020;
    margin: 0 0 10px;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

.sun-offer__body {
    font-size: 14px;
    line-height: 1.55;
    color: #5c5c5c;
    margin: 0 0 22px;
}

.sun-offer__body p {
    margin: 0 0 8px;
}

.sun-offer__body p:last-child {
    margin-bottom: 0;
}

.sun-offer__list {
    list-style: none;
    margin: 0 0 26px;
    padding: 0;
}

.sun-offer__list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    color: #202020;
    margin-bottom: 12px;
}

.sun-offer__list li:last-child {
    margin-bottom: 0;
}

.sun-offer__check {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(245, 175, 45, .18);
    color: var(--sun-offer-accent);
    font-size: 12px;
    font-weight: 700;
    margin-top: 1px;
}

/* Glavni gumb - iste mere kot ostali gumbi na strani. */
.sun-offer__cta {
    display: block;
    width: 100%;
    height: 52px;
    line-height: 52px;
    padding: 0 24px;
    border: 0;
    border-radius: 6px;
    background: var(--sun-offer-accent);
    color: #202020;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: .3s;
}

.sun-offer__cta:hover,
.sun-offer__cta:focus-visible {
    background: #202020;
    color: #ffffff;
    text-decoration: none;
    outline: none;
}

.sun-offer__decline {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 0;
    border: 0;
    background: none;
    color: #6f6f6f;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    text-decoration: underline;
    cursor: pointer;
}

.sun-offer__decline:hover {
    color: #202020;
}

/* -- TABLICE IN TELEFONI ------------------------------------- */

@media (max-width: 767px) {

    .sun-offer {
        padding: 14px;
    }

    .sun-offer__dialog {
        flex-direction: column;
        max-width: 420px;
        max-height: calc(100vh - 28px);
        max-height: calc(100dvh - 28px);
    }

    /* Levi del postane ozek pas nad vsebino, da ponudba ostane vidna. */
    .sun-offer__side {
        flex: 0 0 auto;
        max-width: 100%;
    }

    .sun-offer__side-inner {
        padding: 26px 24px 22px;
    }

    .sun-offer__glyph {
        margin-bottom: 14px;
    }

    .sun-offer__glyph svg {
        width: 46px;
    }

    .sun-offer__side-title {
        font-size: 21px;
    }

    .sun-offer__side-image {
        height: 150px;
    }

    .sun-offer__content {
        padding: 24px 22px 26px;
    }

    .sun-offer__heading {
        font-size: 20px;
    }

    .sun-offer__close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
}

/* Nizki zasloni (ležeči telefon): levi del skrijemo, da ostane
   dovolj prostora za gumb - ta mora biti vedno dosegljiv. */
@media (max-height: 520px) and (max-width: 767px) {

    .sun-offer__side {
        display: none;
    }

    .sun-offer__content {
        padding-top: 30px;
    }
}

/* -- PREDOGLED V ADMINISTRACIJI ------------------------------- */

.sun-offer.sun-offer-preview {
    position: static;
    display: flex;
    padding: 0;
    z-index: auto;
}

.sun-offer.sun-offer-preview .sun-offer__overlay {
    display: none;
}

.sun-offer.sun-offer-preview .sun-offer__dialog {
    max-height: none;
    animation: none;
}
