/* Popup de Contáctanos */
.contact-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeInPopup 0.3s ease-out;
}

.contact-popup.show {
    display: flex;
}

.popup-content {
background: linear-gradient(135deg, #0039A6 0%, #8a8282 50%, #D52B1E 100%);    border-radius: 20px;
    text-align: center;
    color: white;
    position: relative;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.7);
    animation: popupScale 0.3s ease-out forwards;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.popup-close:hover {
    opacity: 1;
}

.popup-icon {
    background: rgba(255, 255, 255, 0.2);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: bounceIcon 2s infinite;
}

.popup-icon i {
    font-size: 2.5rem;
    color: white;
}

.popup-content h4 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.popup-content p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.popup-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-whatsapp, .btn-email {
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 130px;
    justify-content: center;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.btn-email {
    background: #EA4335;
    color: white;
}

.btn-email:hover {
    background: #D23430;
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.popup-extra {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.phone-link {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.phone-link:hover {
    opacity: 1;
    color: white;
    text-decoration: none;
}

/* Animaciones */
@keyframes fadeInPopup {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popupScale {
    from { transform: scale(0.7); }
    to { transform: scale(1); }
}

@keyframes bounceIcon {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Responsive */
@media (max-width: 768px) {
    .popup-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .popup-buttons {
        flex-direction: column;
    }
    
    .btn-whatsapp, .btn-email {
        flex: none;
        width: 100%;
    }
}
/* Estilos adicionales para el popup con formulario */
.popup-with-form {
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    padding: 1.5rem;
}

.popup-header {
    text-align: center;
    margin-bottom: 1rem;
}

.popup-header .popup-icon {
    margin-bottom: 1rem;
}

.popup-header h4 {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.popup-header p {
    margin-bottom: 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Pestañas */
.popup-tabs {
    display: flex;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1.5rem;
    gap: 0;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.8rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    position: relative;
}

.tab-btn.active {
    color: white;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: white;
}

.tab-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Contenido de pestañas */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Contenedor del iframe */
.iframe-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-height: 500px;
}

.iframe-container iframe {
    border: none;
    width: 100%;
    height: 500px;
    border-radius: 10px;
}

/* Ajustes para botones en pestaña de contacto */
#contact-tab .popup-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

#contact-tab .popup-extra {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive para el popup con formulario */
@media (max-width: 768px) {
    .popup-with-form {
        max-width: 95%;
        max-height: 95vh;
        padding: 1rem;
        margin: 1rem;
    }
    
    .iframe-container iframe {
        height: 400px;
    }
    
    .popup-tabs {
        margin-bottom: 1rem;
    }
    
    .tab-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .popup-header h4 {
        font-size: 1.2rem;
    }
    
    #contact-tab .popup-buttons {
        flex-direction: column;
    }
}

/* Loading state para el iframe */
.iframe-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 20%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.iframe-container iframe {
    position: relative;
    z-index: 2;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
/* Botón flotante de contacto */
#customContactBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
}

.contact-floating-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 35px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    animation: floatAnimation 3s ease-in-out infinite;
    font-family: inherit;
}

.contact-floating-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
}

.contact-floating-btn:active {
    transform: translateY(-2px);
}

.contact-floating-btn i {
    font-size: 16px;
    animation: phoneRing 2s ease-in-out infinite;
}

.contact-floating-btn span {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Animaciones */
@keyframes floatAnimation {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes phoneRing {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20% { transform: rotate(10deg); }
}

/* POPUP PANTALLA COMPLETA */
.popup-with-form {
    max-width: 95vw !important;
    max-height: 95vh !important;
    width: 95vw !important;
    height: 95vh !important;
    overflow: hidden;
    padding: 1.5rem;
    margin: 0 !important;
}

/* Contenedor del iframe pantalla completa */
.iframe-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
    height: calc(95vh - 150px) !important;
    max-height: none !important;
}

.iframe-container iframe {
    border: none;
    width: 100% !important;
    height: 100% !important;
    border-radius: 15px;
    min-height: calc(95vh - 150px) !important;
}

/* Header más compacto para aprovechar espacio */
.popup-header {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.popup-header .popup-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 0.8rem;
}

.popup-header .popup-icon i {
    font-size: 2rem;
}

.popup-header h4 {
    margin-bottom: 0.3rem;
    font-size: 1.3rem;
}

.popup-header p {
    margin-bottom: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Botón cerrar más visible */
.popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    opacity: 0.9;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.popup-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .popup-with-form {
        max-width: 98vw !important;
        max-height: 98vh !important;
        width: 98vw !important;
        height: 98vh !important;
        padding: 1rem;
    }
    
    .iframe-container {
        height: calc(98vh - 120px) !important;
        border-radius: 10px;
    }
    
    .iframe-container iframe {
        min-height: calc(98vh - 120px) !important;
        border-radius: 10px;
    }
    
    .popup-header .popup-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 0.5rem;
    }
    
    .popup-header .popup-icon i {
        font-size: 1.5rem;
    }
    
    .popup-header h4 {
        font-size: 1.1rem;
        margin-bottom: 0.2rem;
    }
    
    .popup-header p {
        font-size: 0.8rem;
    }
    
    .popup-close {
        top: 8px;
        right: 12px;
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }
}

/* Para pantallas muy grandes */
@media (min-width: 1400px) {
    .popup-with-form {
        max-width: 90vw !important;
        max-height: 90vh !important;
        width: 90vw !important;
        height: 90vh !important;
    }
    
    .iframe-container {
        height: calc(90vh - 150px) !important;
    }
    
    .iframe-container iframe {
        min-height: calc(90vh - 150px) !important;
    }
}

/* Optimizar para landscape en móvil */
@media (max-width: 768px) and (orientation: landscape) {
    .popup-header {
        margin-bottom: 0.5rem;
        padding-bottom: 0.3rem;
    }
    
    .popup-header .popup-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 0.3rem;
    }
    
    .popup-header .popup-icon i {
        font-size: 1.2rem;
    }
    
    .popup-header h4 {
        font-size: 1rem;
        margin-bottom: 0.1rem;
    }
    
    .popup-header p {
        font-size: 0.75rem;
    }
    
    .iframe-container {
        height: calc(98vh - 80px) !important;
    }
    
    .iframe-container iframe {
        min-height: calc(98vh - 80px) !important;
    }
}

/* Opciones de contacto */
.contact-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.option-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
    text-align: left;
    width: 100%;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.option-icon {
    background: rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.option-icon i {
    font-size: 1.5rem;
    color: white;
}

.option-text {
    flex: 1;
}

.option-text h5 {
    margin: 0 0 0.3rem 0;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
}

.option-text p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
    color: white;
}

/* Estilos específicos para WhatsApp */
.whatsapp-btn:hover .option-icon {
    background: #25D366;
}

.whatsapp-btn:hover {
    border-color: #25D366;
}

/* Estilos específicos para Registro */
.register-btn:hover .option-icon {
    background: #007bff;
}

.register-btn:hover {
    border-color: #007bff;
}

/* Responsive para opciones */
@media (max-width: 768px) {
    .contact-options {
        gap: 0.8rem;
    }
    
    .option-btn {
        padding: 1rem;
    }
    
    .option-icon {
        width: 45px;
        height: 45px;
    }
    
    .option-icon i {
        font-size: 1.3rem;
    }
    
    .option-text h5 {
        font-size: 1rem;
    }
    
    .option-text p {
        font-size: 0.8rem;
    }
}