/* Fuente global */
@import url('https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900');

/* Reset y tipografía */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
  text-decoration: none;
}

/* Fondo general claro */
body {
  background: linear-gradient(235deg, #4d0cff, #000c9d85); /* Gradiente inicial */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  animation: gradientAnimation 15s ease infinite;
  background-size: 300% 300%;
}

/* ----- Hero Section ----- */
.hero-section {
  /* Gradiente en tonos grises/azules */
  background: linear-gradient(235deg, #4d0cff, #000c9d85);
  background-color: #F9F9F9;
  background-size: 300% 300%;
  /* Si deseas animar el gradiente, descomenta:
  animation: gradientAnimation 15s ease infinite; 
  */
  color: #fff;
  padding: 60px 0;
  text-align: center;
  position: relative;
}

/* Si deseas la animación del gradiente, añade: */
@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Logo dentro del hero */
.hero-logo {
    width: 300px;
    display: block;
    margin: auto;
}

/* Título y texto del hero */
.hero-section h1 {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 10px;
}
.hero-section p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}
.hero-section .btn-group {
  margin-top: 30px;
}

/* ----- Info Section ----- */
.info-section {
  padding: 40px 20px;
  background-color: #ffffff;
  border-radius: 10px;
}

/* ----- Features (Tarjetas) ----- */
.feature {
  margin-top: 30px;
}

.card {
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
}
.card:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
}
.card-body i {
  color: #0367A5; /* Ajusta el color de los íconos si lo deseas */
}

/* ----- Responsivo ----- */
@media (max-width: 576px) {
  .hero-section {
    padding: 40px 0;
  }
  .hero-section h1 {
    font-size: 1.8rem;
  }
  .hero-section p {
    font-size: 1rem;
  }
  .btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
}

/* Definición de la Animación del Gradiente */
@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Añadido para la animación del rectángulo */
.animated-rect {
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #ff7e5f, #feb47b);
    animation: rotateAnimation 17s infinite linear, moveX 40s infinite, moveY 41s infinite;
    transform-origin: 50% 50%;
}

/* Animaciones del Rectángulo */
@keyframes rotateAnimation {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes moveX {
    0% { transform: translateX(25%); }
    50% { transform: translateX(0%); }
    100% { transform: translateX(25%); }
}

@keyframes moveY {
    0% { transform: translateY(0%); }
    50% { transform: translateY(25%); }
    100% { transform: translateY(0%); }
}

/* Contenedor Principal */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1s ease-in-out;
}

/* Contenedor del Formulario */
.form-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 25px; /* Ajustar el espacio para hacer el formulario más compacto */
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 400px; /* Ajustar el ancho máximo del contenedor */
    width: 350px; /* Ajusta el ancho a tu gusto */
    text-align: left;
    animation: fadeIn 1s ease-in-out;
    margin: 0 auto; /* Centrar en la página */
}

/* Título del Formulario */
.form-title {
    text-align: center;
    font-size: 1.8em;
    color: #0367A5;
    margin-bottom: 20px;
    font-weight: bold;
}

/* Estilo de los Inputs del Formulario */
.form-group {
    margin-bottom: 10px; 
      }
      select {
        width: 100%; 
      }
      input[type="file"] {
        border: 1px solid #ccc;
        padding: 5px;
        width: 100%;
      }
      
.select2-container {
       width: 100% !important; /* Asegura que el ancho sea 100% */
  }

.form-group label {
    color: #555;
    font-weight: bold;
    display: block;
    margin-bottom: 5px; /* Reducir la separación entre el label y el campo */
    font-size: 0.9em;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    background: rgba(255, 255, 255, 0.9); /* Más claro para mejor visibilidad */
    border: 1px solid #ddd;
    border-radius: 10px;
    width: 100%;
    padding: 8px 10px; /* Reducir un poco el padding para compactar */
    color: #333;
    font-size: 0.95em; /* Reducir levemente el tamaño de la fuente */
    transition: background 0.3s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border: 1px solid #007bff;
}

.form-group input::placeholder,
.form-group select::placeholder,
.form-group textarea::placeholder {
    color: #999;
    font-size: 0.9em;
}
textarea {
    height: 50px; /* Reducir altura del área de comentarios */
    resize: none;
}

/* Botones */
.btn-primary {
    background: #03BFC0;
    border: none;
    border-radius: 5px;
    width: auto; /* Ajustar el ancho automáticamente */
    padding: 8px 15px;
    color: #fff;
    font-size: 0.9em; 
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-right: 5px; /* Espacio entre botones */
}

.btn-primary:hover {
    background: #0367A5;
    transform: scale(1.05);
}

.btn-secondary {
    background: #ffffff;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 8px 15px;
    font-size: 0.9em;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
    margin-top: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: #f1f1f1;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: scale(1.05);
}

/* Login Container (no cambios, si se usa en otro lado) */
.login-container {
    background: #ffffff;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.0);
    max-width: 350px;
    width: 100%;
    text-align: center;
    animation: fadeIn 1s ease-in-out;
    margin: 20px auto;
}

.login-header {
    margin-bottom: 15px;
}

.login-header img {
    width: 100%;
    max-height: 100px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.login-header h3 {
    font-size: 1.8em;
    color: #333;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    background: #fff;           /* Fondo blanco */
    border: 1px solid #ccc;     /* Borde gris claro */
    border-radius: 5px;
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 15px;
    color: #333;
    /* El resto de propiedades que desees conservar */
}

.login-container input::placeholder {
    color: #999;
    font-size: 0.9em;
}

.btn-outline-light {
    color: #fff;
    border-color: #fff;
    transition: all 0.3s;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.remember-me {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #333;
}

.alert {
    color: #fff;
    background-color: #ff6f61;
    border: none;
}


/* Diseño Responsive */
@media (max-width: 576px) {
    .form-container {
        max-width: 300px; /* Hacer el contenedor aún más compacto en pantallas pequeñas */
        padding: 15px 20px;
    }

    .form-title {
        font-size: 1.5em;
        margin-bottom: 15px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-group label {
        margin-bottom: 4px;
        font-size: 0.85em;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.85em;
        padding: 6px 8px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 8px 10px;
        font-size: 0.85em;
        margin-top: 8px;
        margin-right: 0; /* Podrías apilarlos */
        width: 100%;
    }
    /* Apilar los botones uno debajo del otro, si deseas:
    .btn-primary, .btn-secondary {
        display: block;
        margin-bottom: 10px;
    }
    */
}

/* Animación FadeIn */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loader Styles (Actualizados) */
#loaderOverlay {
    display: none; /* Oculto por defecto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

#card-loader {
    position: relative;
    width: 60px;
    height: 60px;
}

#card-loader .loader1 {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: solid 10px transparent;
    border-top-color: #2C3136;  /* Color del loader externo */
    border-left-color: #2C3136;
    border-radius: 50%;
    animation: loader1 1.4s linear infinite;
}

#card-loader .loader2 {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70%;
    height: 70%;
    border: solid 10px transparent;
    border-top-color: #17A2B8; /* Color del loader interno */
    border-left-color: #17A2B8;
    border-radius: 50%;
    animation: loader2 1.2s linear infinite;
}

@keyframes loader1 {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes loader2 {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(-360deg);
    }
}
