/*-- Estilos Pop UP------------------*/
  
/*----------Pagina Index---------------------------*/
    .seccion-popup{
        font-size: 24px;
        font-weight: bold;
        text-decoration:underline;
    }

    .titulo-popup{
        font-size: 17px;
        font-weight: 400;
        color:rgb(1, 0, 2);
    }
    
/*----------Pagina Index---------------------------*/


/* --- Estilos para previsualizar usados en create y edit de los popup --- */
    
    .aclaracion {
        font-size: 0.8em;
        color: gray;
    }

    .line-form{
        border: none;
        border-bottom: 2px solid #ccc;
        margin-bottom: 20px;
    }

    .img-previsualizacion {
        display: block;
        border-radius: 8px;
        object-fit: contain;
        transition: all 0.3s ease;
    }

    /* 🔹 Versión horizontal */
    .img-previsualizacion-horizontal {
        
        width: auto;
    }

    /* 🔹 Versión vertical */
    .img-previsualizacion-vertical {
        
        height: auto;
    }

    .popup {
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    .popup.showing {
        opacity: 1;
    }

    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.6);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .modal-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    /* --- POPUP --- */
    .popup {
        border-radius: 15px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
        max-height: 90vh;
        width: auto;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        animation: popupIn 0.5s ease forwards;
        position: relative;
        overflow: hidden;
    }

    .popup-vertical{
        max-width: 30%;
    }

    .popup-horizontal{
        max-width: 50%;
    }

    /* Botón de cierre */
    .popup .close-btn {
        position: absolute;
        top: 10px;
        right: 15px;
        cursor: pointer;
        font-size: 24px;
        color: #333;
        transition: color 0.2s;
        z-index: 20;
    }

    .popup .close-btn:hover {
        color: #000;
    }

    /* Imagen principal */
    .popup img {
        width: 100%;
        height: auto;
        border-radius: 15px;
        object-fit: contain;
        display: block;
    }

    /* --- CONTENEDOR DEL BOTÓN (nuevo) --- */
    .popup .popup-banner__button {
        position: absolute;
        bottom: 20px;       /* distancia desde la parte inferior */
        right: 20px;        /* distancia desde el borde derecho */
        background: #ff4757;
        color: white;
        border: none;
        font-size: clamp(0.5rem, 1.5vw, 1.2rem);
        padding: clamp(0.4em, 1vw, 0.8em) clamp(0.8em, 2vw, 1.5em);
        border-radius: 25px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        z-index: 10;
    }

    /* Hover del botón */
    .popup .popup-banner__button:hover {
        background: #ff6b81;
        transform: scale(1.05);
    }
    
    @media (max-width: 768px) {
        .popup {
            max-width: 95%;
            max-height: 80vh;
        }
        .popup img {
            width: 100%;
            height: auto;
        }
    }

    /* --- ANIMACIONES --- */
    @keyframes popupIn {
        from {
            opacity: 0;
            transform: scale(0.8);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }

    @keyframes popupOut {
        from {
            opacity: 1;
            transform: scale(1);
        }
        to {
            opacity: 0;
            transform: scale(0.8);
        }
    }

    /* Fade in + scale (actual) */
    @keyframes popupInFade {
        from { opacity: 0; transform: scale(0.8); }
        to { opacity: 1; transform: scale(1); }
    }

    /* Slide desde arriba */
    @keyframes popupInSlideTop {
        from { opacity: 0; transform: translateY(-50px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Slide desde abajo */
    @keyframes popupInSlideBottom {
        from { opacity: 0; transform: translateY(50px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Rotación + fade */
    @keyframes popupInRotate {
        from { opacity: 0; transform: rotate(-10deg) scale(0.8); }
        to { opacity: 1; transform: rotate(0deg) scale(1); }
    }