/* ============================================================
   Site Popup — src/template/popup/popup.css
   ============================================================ */

#site-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#site-popup.show {
    opacity: 1;
    pointer-events: all;
}

/* Overlay scuro dietro il box */
.site-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

/* Box popup — bianco di default */
.site-popup__box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 800px;
    background-color: #ffffff;
    padding: 3.2rem 4rem 4rem;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

/* Overlay scuro sull'immagine di sfondo (solo quando has-image) */
.site-popup__bg-overlay {
    display: none;
}

.site-popup__box.has-image {
    background-size: cover;
    background-position: center;
    background-color: #1a1a1a;
    padding: 4rem;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-popup__box.has-image .site-popup__bg-overlay {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

/* Pulsante chiudi X */
.site-popup__close {
    position: absolute;
    top: 1.2rem;
    right: 1.4rem;
    z-index: 6;
    background: none;
    border: none;
    color: #1a1a1a;
    line-height: 0;
    cursor: pointer;
    padding: 0;
    opacity: 1;
    transition: all 0.3s ease;
}

.site-popup__close:hover {
    transform: rotate(90deg);
}

.site-popup__box.has-image .site-popup__close {
    color: #ffffff;
}

.site-popup__close:hover {
    opacity: 1;
}

/* Contenuto */
.site-popup__content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

/* Sopratitolo */
.site-popup__sopratitolo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.03em;
    margin: 0 0 0.6rem;
    text-transform: none;
}

/* Titolo */
.site-popup__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.6rem;
    line-height: 1.2;
    text-transform: none;
}

.site-popup__box.has-image .site-popup__title {
    color: #ffffff;
}

/* Testo */
.site-popup__text {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #444444;
    margin: 0 0 1.6rem;
    /* max-width: 800px; */
    margin-left: auto;
    margin-right: auto;
}

.site-popup__box.has-image .site-popup__text {
    color: rgba(255, 255, 255, 0.9);
}

/* Bottone CTA */
.site-popup__content .button-white {
    display: inline-block;
    position: relative;
    overflow: hidden;
    background-color: #C20516;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 6px 20px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    z-index: 1;
}

.site-popup__content .button-white::after {
    content: '';
    -webkit-transition: all ease 0.3s;
    -moz-transition: all ease 0.3s;
    transition: all ease 0.3s;
    position: absolute;
    left: -5%;
    bottom: -100px;
    width: 110%;
    height: 100%;
    background-color: rgba(30, 37, 41, 0.2);
    transform: rotate(-5deg);
    z-index: -1;
}

.site-popup__content .button-white:hover::after {
    bottom: -17px;
}

.site-popup__content .button-white:hover {
    color: #ffffff;
}

/* Social links */
.site-popup__social {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.4rem;
}

.site-popup__social a {
    display: inline-flex;
    color: #1a1a1a;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    line-height: 0;
}

.site-popup__social a:hover {
    opacity: 1;
}

.site-popup__box.has-image .site-popup__social a {
    color: #ffffff;
}
