/* =========================================
   MODAL POPUP DE INICIO - REINAUGURACIÓN
   ========================================= */

/* Overlay del modal */
#popup-inicio-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    display: none;
    transition: opacity 0.2s ease-out;
}

#popup-inicio-overlay.active {
    display: block;
}

#popup-inicio-overlay.closing {
    opacity: 0;
    pointer-events: none;
}

/* Contenedor del modal */
#popup-inicio-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    max-width: 90vw;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none;
    overflow: hidden;
}

#popup-inicio-modal.active {
    display: block;
}

/* Botón de cerrar */
.popup-inicio-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e74c3c;
    border-radius: 50%;
    color: #e74c3c;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: all 0.3s ease;
    line-height: 1;
}

.popup-inicio-close:hover {
    background: #e74c3c;
    color: #ffffff;
    transform: rotate(90deg) scale(1.1);
}

/* Contenido del modal */
.popup-inicio-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    text-align: center;
}

/* Imagen */
.popup-inicio-image {
    width: 100%;
    max-width: 350px;
    height: auto;
    margin-bottom: 20px;
    border-radius: 10px;
}

/* Título */
.popup-inicio-title {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.3;
}

/* Texto */
.popup-inicio-text {
    font-size: 16px;
    color: #34495e;
    line-height: 1.6;
    margin-bottom: 15px;
    max-width: 400px;
}

.popup-inicio-text strong {
    color: #e74c3c;
    font-weight: bold;
}

/* =========================================
   ANIMACIONES DE APERTURA Y CIERRE
   ========================================= */

/* Animación de apertura: circle-in-hesitate */
@keyframes circle-in-hesitate {
    0% {
        clip-path: circle(0%);
    }
    40% {
        clip-path: circle(40%);
    }
    100% {
        clip-path: circle(125%);
    }
}

[transition-style="in:circle:hesitate"] {
    animation: 2.5s cubic-bezier(.25, 1, .30, 1) circle-in-hesitate both;
}

/* Animación de cierre: circle-out-top-right */
@keyframes circle-out-top-right {
    0% {
        clip-path: circle(125%);
        width: 800px;
        height: 800px;
    }
    1% {
        width: 100vw;
        height: 100vh;
        top: 0;
        left: 0;
        transform: translate(0, 0);
        border-radius: 0;
    }
    100% {
        clip-path: circle(0% at 100% 0%);
        width: 100vw;
        height: 100vh;
        top: 0;
        left: 0;
        transform: translate(0, 0);
        border-radius: 0;
    }
}

[transition-style="out:circle:top-right"] {
    animation: 1s cubic-bezier(.25, 1, .30, 1) circle-out-top-right both;
}

/* =========================================
   RESPONSIVE - TABLET Y MÓVILES
   ========================================= */

@media (max-width: 768px) {
    #popup-inicio-modal {
        width: 450px;
        height: 590px;
    }

    .popup-inicio-image {
        max-width: 300px;
    }

    .popup-inicio-title {
        font-size: 24px;
    }

    .popup-inicio-text {
        font-size: 15px;
    }

    /* Animación de cierre responsive */
    @keyframes circle-out-top-right {
        0% {
            clip-path: circle(125%);
            width: 450px;
            height: 590px;
        }
        1% {
            width: 100vw;
            height: 100vh;
            top: 0;
            left: 0;
            transform: translate(0, 0);
            border-radius: 0;
        }
        100% {
            clip-path: circle(0% at 100% 0%);
            width: 100vw;
            height: 100vh;
            top: 0;
            left: 0;
            transform: translate(0, 0);
            border-radius: 0;
        }
    }
}

@media (max-width: 480px) {
    #popup-inicio-modal {
        width: 380px;
        height: 490px;
    }

    .popup-inicio-close {
        width: 30px;
        height: 30px;
        font-size: 18px;
        top: 10px;
        right: 10px;
    }

    .popup-inicio-content {
        padding: 20px 15px;
    }

    .popup-inicio-image {
        max-width: 250px;
        margin-bottom: 15px;
    }

    .popup-inicio-title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .popup-inicio-text {
        font-size: 14px;
        margin-bottom: 10px;
    }

    /* Animación de cierre responsive */
    @keyframes circle-out-top-right {
        0% {
            clip-path: circle(125%);
            width: 380px;
            height: 490px;
        }
        1% {
            width: 100vw;
            height: 100vh;
            top: 0;
            left: 0;
            transform: translate(0, 0);
            border-radius: 0;
        }
        100% {
            clip-path: circle(0% at 100% 0%);
            width: 100vw;
            height: 100vh;
            top: 0;
            left: 0;
            transform: translate(0, 0);
            border-radius: 0;
        }
    }
}

@media (max-width: 360px) {
    #popup-inicio-modal {
        width: 320px;
        height: 490px;
    }

    .popup-inicio-image {
        max-width: 200px;
    }

    .popup-inicio-title {
        font-size: 18px;
    }

    .popup-inicio-text {
        font-size: 13px;
    }

    /* Animación de cierre responsive */
    @keyframes circle-out-top-right {
        0% {
            clip-path: circle(125%);
            width: 320px;
            height: 490px;
        }
        1% {
            width: 100vw;
            height: 100vh;
            top: 0;
            left: 0;
            transform: translate(0, 0);
            border-radius: 0;
        }
        100% {
            clip-path: circle(0% at 100% 0%);
            width: 100vw;
            height: 100vh;
            top: 0;
            left: 0;
            transform: translate(0, 0);
            border-radius: 0;
        }
    }
}

