/* =====================================================
   MODAL HOME — popup automático
   ===================================================== */

.modal-home {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.modal-home.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* Overlay oscuro */
.modal-home__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    cursor: pointer;
}

/* Caja del modal */
.modal-home__box {
    position: relative;
    width: 100%;
    max-width: 1100px;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    transform: scale(0.93);
    transition: transform 0.35s ease;
}

.modal-home.is-open .modal-home__box {
    transform: scale(1);
}

/* Botón cerrar */
.modal-home__close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 10;
    width: 34px;
    height: 34px;
    background: rgba(0, 0, 0, 0.55);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease;
}

.modal-home__close:hover {
    background: rgba(0, 0, 0, 0.85);
}

/* Media: imagen */
.modal-home__media img {
    display: block;
    width: 100%;
    height: auto;
}

/* Media: video YouTube (ratio 16:9) */
.modal-home__video-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
}

.modal-home__video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* CTA opcional */
.modal-home__cta {
    padding: 18px 24px;
    text-align: center;
    background: #fff;
}

.modal-home__cta:empty {
    display: none;
}

/* Responsive */
@media (max-width: 699px) {
    .modal-home__box {
        max-width: 100%;
    }

    .modal-home__cta {
        padding: 14px 16px;
    }
}
