/* --- Paleta de Colores Biónica Visions --- */
:root {
    --bionica-light-blue: #00a9e0;
    --bionica-dark-blue: #0b3c64;
    --bionica-glow: rgba(0, 169, 224, 0.5);
    --bionica-background: #f8fafc;
    --bionica-disabled-bg: #dbe1e6;
    --bionica-disabled-text: #9ba8b3;
}

/* --- Estructura General de la Página (Permite Scroll) --- */
body.bionica-portal-page {
    background-color: var(--bionica-background);
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    padding-top: 5vh;
    padding-bottom: 5vh;
    min-height: 100vh;
    box-sizing: border-box;
    margin: 0;
    position: relative;
    overflow-x: hidden;
}

/* --- Sello de fondo (AHORA VISIBLE Y CON ANIMACIÓN LENTA) --- */
body.bionica-portal-page::before {
    content: '';
    position: fixed;
    /* Posicionado en la esquina superior izquierda */
    top: -80px;
    left: -80px;
    width: 350px;
    height: 350px;
    background-image: url('/utilizaciones_beneficiarios/static/src/img/seal_bionica.png');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 0;
    /* Opacidad completa y animación lenta */
    opacity: 1; /* Totalmente visible */
    animation: slowDrift 20s infinite alternate ease-in-out;
}

@keyframes slowDrift {
    0% {
        /* Inicia en una posición y rotación */
        transform: translateY(0px) rotate(-10deg);
        opacity: 0.15; /* Inicia más sutil */
    }
    100% {
        /* Se mueve lentamente a otra posición y rotación */
        transform: translateY(20px) rotate(10deg);
        opacity: 0.1; /* Termina también sutil */
    }
}

/* Contenedor principal que centra todo */
.bionica-portal-wrapper {
    width: 100%;
    max-width: 700px;
    padding: 20px;
    box-sizing: border-box;
    z-index: 1;
    text-align: center;
}

/* Tarjeta principal con el formulario */
.bionica-card {
    background: #ffffff;
    border: none;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 2rem 2.5rem;
}

.bionica-portal-page h1 {
    color: var(--bionica-dark-blue);
    font-weight: 700;
    font-size: 2.2rem;
}

.bionica-portal-page .form-control-lg {
    border-top-left-radius: 50px;
    border-bottom-left-radius: 50px;
    border: 2px solid #e0e0e0;
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
}

.bionica-portal-page .form-control-lg:focus {
    border-color: var(--bionica-light-blue);
    box-shadow: 0 0 0 4px var(--bionica-glow);
}

/* --- Botones --- */
.btn-bionica {
    border-top-right-radius: 50px;
    border-bottom-right-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    padding: 1rem 1.5rem;
    cursor: pointer;
}

.btn-bionica:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.btn-bionica:active:not(:disabled) {
    transform: translateY(0px) scale(0.98);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-bionica:disabled {
    background-color: var(--bionica-disabled-bg);
    border-color: var(--bionica-disabled-bg);
    color: var(--bionica-disabled-text);
    cursor: not-allowed;
}

.btn-bionica.btn-verify:not(:disabled) {
    background-color: var(--bionica-dark-blue);
    border-color: var(--bionica-dark-blue);
    color: white;
}

.btn-bionica.btn-download:not(:disabled) {
    background-color: var(--bionica-light-blue);
    border-color: var(--bionica-light-blue);
    color: white;
}

/* --- BOTON VOLVER AL SITIO WEB --- */
.link-bionica-return {
    display: inline-block;
    background-color: var(--bionica-dark-blue);
    color: white;
    font-weight: bold;
    text-decoration: none;
    margin-top: 30px;
    padding: 12px 25px;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(11, 60, 100, 0.2);
}

/* Animación de salto al pasar el ratón */
.link-bionica-return:hover {
    color: white;
    background-color: #082f4f; 
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(11, 60, 100, 0.3);
}

/* Animación de clic */
.link-bionica-return:active {
    transform: translateY(0px) scale(0.95);
    box-shadow: 0 5px 15px rgba(11, 60, 100, 0.2);
}

.header-logo img {
    max-width: 220px; 
    height: auto;
}

/* --- INDICADOR DE CARGA */
#loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.loading-box {
    text-align: center;
    color: white;
}

.spinner-image {
    width: 120px;
    height: 120px;
    animation: spin 3s linear infinite;
    margin-bottom: 15px; 
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-box p {
    font-weight: bold;
    font-size: 18px;
    margin: 0 0 15px 0; 
}

/* --- Animación de la barra de carga --- */
.wrapper {
    border: 2px solid rgba(255, 255, 255, 0.5); 
    padding: 3px;
    width: 220px;
    height: 20px;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.2);
}

.space {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 6px;
}

.loading {
    position: absolute;
    top: 0;
    height: 100%;
    width: 100%;
    background-color: var(--bionica-light-blue);
    animation: loading-progress 3s linear infinite;
}

@keyframes loading-progress {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* --- BOTÓN VOLVER AL SITIO WEB --- */
.link-bionica-return {
    display: inline-block;
    background-color: var(--bionica-dark-blue);
    color: white;
    font-weight: bold;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(11, 60, 100, 0.2);
}

.link-bionica-return:hover {
    color: white;
    background-color: #082f4f; 
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(11, 60, 100, 0.3);
}

/* --- ANIMACIÓN BOTÓN VOLVER  --- */
.button-animated {
  position: relative;
  padding: 12px 25px;
  border: none;
  background: none;
  cursor: pointer;
  
  font-family: Arial, sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 16px;
  color: white;
  text-decoration: none;
  
  background-color: var(--bionica-dark-blue); 
  box-shadow: rgba(0, 169, 224, 0.5) 0 5px 15px; 
  border-radius: 8px;
  z-index: 0;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
  display: inline-flex; 
  align-items: center;
  justify-content: center;
}

.button-animated:hover {
    color: white; 
    background-color: #082f4f; 
    transform: translateY(-5px); 
    box-shadow: rgba(0, 169, 224, 0.7) 0 12px 25px; 
}

.button-animated:focus {
  outline-color: transparent;
  box-shadow: var(--bionica-dark-blue) 2px 2px 22px;
}


.button-animated .left, 
.button-animated .right {
  display: none; 
}


.button-animated::before {
  content: '';
  pointer-events: none;
  opacity: .6;
  background:
    radial-gradient(circle at 20% 35%,  transparent 0,  transparent 2px, white 3px, white 4px, transparent 4px),
    radial-gradient(circle at 75% 44%, transparent 0,  transparent 2px, white 3px, white 4px, transparent 4px),
    radial-gradient(circle at 46% 52%, transparent 0, transparent 4px, white 5px, white 6px, transparent 6px);

  width: 100%;
  height: 300%;
  top: 0;
  left: 0;
  position: absolute;
  animation: bubbles 5s linear infinite both;
  z-index: -1; 
}

@keyframes bubbles {
  from {
    transform: translate(0, 0); 
  }
  to {
    transform: translate(0, -66.666%);
  }
}

/* --- ESTILOS RESPONSIVE PARA MÓVILES --- */
@media (max-width: 768px) {

    
    .bionica-portal-wrapper {
        padding: 15px;
    }

    .bionica-card {
        padding: 2rem 1.5rem; 
    }
    
    .bionica-portal-page h1 {
        font-size: 1.9rem;
    }
    
    .bionica-portal-page .form-control-lg {
        font-size: 1rem;      
        padding: 0.8rem 1rem;  
    }
   
    .btn-bionica.btn-lg {
        font-size: 0.9rem;   
        padding: 0.8rem 1.2rem; 
    }
    
    .button-animated {
        font-size: 14px;
        padding: 10px 20px;
    }
    
    .bionica-card p.text-muted {
        font-size: 0.9rem;
    }
   
    .list-group-item {
        font-size: 0.9rem;
        padding: 0.8rem 1rem;
    }
    
    .btn-bionica.w-100 {
        font-size: 0.9rem;
        padding: 0.8rem 1.2rem;
    }
}

/* Estilo para el estado ACTIVO Consulta beneficiario */
.bionica-portal-page .alert-success {
    background-color: var(--bionica-light-blue); /* Fondo azul claro */
    color: white; /* Texto en color blanco */
    border-color: var(--bionica-glow); /* Borde en azul  */
    border-width: 2px;
}

.bionica-portal-page .alert-success .alert-heading {
    color: var( --bionica-dark-blue); /* Título "Estado: ACTIVO" en blanco */
}


.bionica-portal-page .alert-danger {
    
    border-width: 2px;
}



