/* Importar una fuente moderna */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

/* 🎨 Fondo Degradado Suave */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}

h1 {
    color: #007bff;
    margin-bottom: 20px;
}

h2 {
    color: #6c757d;
    margin-bottom: 20px;
}

.container {
    max-width: 800px;
    margin: auto;
    padding: 20px;
}

.border {
    border: 1px solid #ddd;
    background-color: #fff;
}

.shadow {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: #007bff;
    border: none;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-success {
    background-color: #28a745;
    border: none;
    transition: background-color 0.3s;
}

.btn-success:hover {
    background-color: #218838;
}

.list-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-group-item button {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.list-group-item button:hover {
    color: #a71d2a;
}


/* Estilos para el mensaje de error */
#login-mensaje {
    color: red !important;
    font-weight: bold;
    text-align: center;
    margin-top: 10px;
    display: none;
}

/* Estilos para la caja de login */
#login-box {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#login-box img {
    display: block;
    margin: 0 auto 20px;
    width: 219px;
    height: auto;
}

#login-box h2 {
    color: #050505;
    margin-bottom: 20px;
}

#login-form .form-control {
    border: 1px solid #ced4da;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 15px;
}

#login-form button {
    background-color: #aa0003;
    color: #ffffff;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    padding: 10px;
    transition: background-color 0.3s;
}

#login-form button:hover {
    background-color: #0056b3;
}

#login-form .form-label {
    text-align: left;
    display: block;
    margin-bottom: 5px;
}

#login-section {
    background-image: url('../img.png');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#login-section h1 {
    color: rgb(242, 242, 242);
    margin-bottom: 10px;
    padding-top: 50px;
}

label .text-muted {
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
}

label strong {
    color: #dc3545;
}

input[required], select[required] {
    border-left: 4px solid #dc3545;
}

input:not([required]), select:not([required]) {
    border-left: 4px solid #28a745;
}

input:hover, select:hover {
    background-color: #f8f9fa;
}

#descripcion-tramite {
    background-color: #eef7ff;
    border-left: 5px solid #007bff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 📌 Estilo para el contenedor de confirmación */
.confirmacion-container {
    background-color: #f8f9fa;
    border: 2px solid #0084a5;
    border-radius: 10px;
    padding: 15px;
    margin-top: 10px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;  /* Aumentar el espacio inferior */
}

/* Estilo del checkbox personalizado */
.confirmacion-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.confirmacion-checkbox input[type="checkbox"] {
    display: none; /* Ocultar el checkbox predeterminado */
}

.custom-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #0d6efd;
    border-radius: 4px;
    display: inline-block;
    position: relative;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

/* Efecto cuando está seleccionado */
.confirmacion-checkbox input[type="checkbox"]:checked + label .custom-checkmark {
    background-color: #0d6efd;
    border-color: #0a58ca;
}

/* Icono de check */
.custom-checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Mostrar el icono cuando esté seleccionado */
.confirmacion-checkbox input[type="checkbox"]:checked + label .custom-checkmark::after {
    display: block;
}

/* Estilo del texto */
.confirmacion-checkbox label {
    font-weight: bold;
    color: #0084a5;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

/* Texto explicativo */
.confirmacion-text {
    font-style: italic;
    color: #4e4e4e;
    margin-top: 5px;
    font-size: 0.9rem;
}


/* 📌 Estilo mejorado para mensajes de estado */
.estado-alerta {
    display: none; /* Oculto por defecto */
    padding: 12px 18px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    border: 2px solid transparent;
    max-width: 600px;
    margin: 15px auto;
    text-align: center;
    transition: all 0.4s ease-in-out;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 📌 Estilo para mensajes de éxito */
.estado-alerta.success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
    box-shadow: 0 2px 10px rgba(0, 128, 0, 0.2);
}

/* 📌 Estilo para mensajes de error */
.estado-alerta.error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.2);
}

/* 📌 Animación para que el mensaje aparezca con efecto */
.estado-alerta.show {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

/* 📌 Definición de animación */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Estilo mejorado para la alerta de información */
.alert-destacado {
    background: linear-gradient(135deg, #ffdd57 0%, #ffbb00 100%);
    color: #333;
    border: 2px solid #d39e00;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    padding: 15px 20px;
    text-align: left;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
    display: none; /* Ocultar por defecto */
}


/* Estilo para el ícono */
.alert-destacado i {
    color: #856404;
    font-size: 1.4rem;
    margin-right: 8px;
    vertical-align: middle;
}

/* Efecto de animación cuando aparece */
.alert-destacado.show {
    display: block;
    animation: bounce-in 0.6s ease-in-out;
}

#texto-descripcion {
    font-weight: bold; /* Hace que el texto sea en negrita */
}

/* Definición de la animación de rebote */
@keyframes bounce-in {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    50% {
        transform: translateY(-5px);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 📌 Estilo personalizado para el desplegable */
.form-select {
    appearance: none;  /* ✅ Habilitar el estilo personalizado */
    -webkit-appearance: none;
    -moz-appearance: none;

    display: block;
    width: 100%;
    padding: .375rem 2.25rem .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);

    /* 📌 Agregar el ícono personalizado */
    background-image: url('../icono_deplegable.png'); 
    background-repeat: no-repeat;
    background-position: right 0.75rem center; 
    background-size: 16px 16px;  /* Ajusta el tamaño del ícono */

    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;

    cursor: pointer;  /* Mejora la experiencia del usuario */
}

/* 📌 Opcional: Estilo cuando el select está enfocado */
.form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    outline: none;
}

/* Estilo para el mensaje de error */
.mensaje-error {
    background-color: #fdecea;
    color: #d93025; 
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 10px 15px;
    text-align: center;
    font-weight: bold;
    margin-top: 10px;
    box-shadow: 0 4px 8px rgba(217, 48, 37, 0.3);
    display: none; /* Oculto por defecto */
    animation: slideDown 0.5s ease-in-out;
}

/* Ícono de advertencia */
.mensaje-error i {
    margin-right: 8px;
    font-size: 1.2rem;
    vertical-align: middle;
    color: #d93025;
}

/* Animación para mostrar el mensaje */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilo para el campo de Facultad o Unidad */
#facultad {
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 10px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #f8f9fa;
}

#facultad:focus {
    border-color: #138496;
    box-shadow: 0 0 8px rgba(23, 162, 184, 0.6);
    background-color: #fff;
}

/* Validación visual si el campo está vacío o es muy corto */
#facultad:invalid {
    border-color: #ffc107;
    box-shadow: 0 0 8px rgba(228, 228, 228, 0.6);
}

/* Estilo para el campo válido */
#facultad:valid {
    border-color: #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.6);
}

.input-group-text {
    background-color: #9b3107;
    color: #fff;
    border: none;
    border-radius: 8px 0 0 8px;
    padding: 10px;
    font-size: 1.2rem;
}

.input-group {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.form-text {
    font-style: italic;
    color: #6c757d;
    margin-top: 4px;
}

/* Estilo para el campo de Tipo de Solicitud */
#tipo_tramite {
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 10px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #f8f9fa;
}

#tipo_tramite:focus {
    border-color: #138496;
    box-shadow: 0 0 8px rgba(23, 162, 184, 0.6);
    background-color: #fff;
}

/* Validación visual si el campo está vacío o es muy corto */
#tipo_tramite:invalid {
    border-color: #ffc107;
    box-shadow: 0 0 8px rgba(228, 228, 228, 0.6);
}

/* Estilo para el campo válido */
#tipo_tramite:valid {
    border-color: #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.6);
}

/* Estilo para el campo de Celular */
#celular {
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 10px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #f8f9fa;
    text-align: left;
}

#celular:focus {
    border-color: #138496;
    box-shadow: 0 0 8px rgba(23, 162, 184, 0.6);
    background-color: #ffffff;
}

/* Estilo para la validación de número incorrecto */
#celular:invalid {
    border-color: #dc3545;
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.6);
}


/* Estilo para el campo de Modalidad */
#formacion {
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 10px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #f8f9fa;
    appearance: none; /* Elimina el estilo predeterminado */
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"%3E%3Cpath fill="%23ffc107" d="M2 0L0 2h4zM2 5L0 3h4z"/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 0.65em auto;
    cursor: pointer;
}

#formacion:focus {
    border-color: #138496;
    box-shadow: 0 0 8px rgba(23, 162, 184, 0.6);
    background-color: #ffffff;
}

/* Validación visual si el campo está vacío o es muy corto */
#formacion:invalid {
    border-color: #ffc107;
    box-shadow: 0 0 8px rgba(228, 228, 228, 0.6);
}

/* Estilo para el campo válido */
#formacion:valid {
    border-color: #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.6);
}

/* Resalta la opción seleccionada */
#formacion option:checked {
    background-color: #ffeeba;
    font-weight: bold;
}

/* Estilo para el campo de Carrera */
#carrera {
    border: 2px solid #ffc107; /* Rojo para resaltar que es obligatorio */
    border-radius: 8px;
    padding: 10px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #f8f9fa;
    font-weight: 500;
}

#carrera:focus {
    border-color: #c82333;
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.6);
    background-color: #fff;
}

/* Validación visual si el campo está vacío */
#carrera:invalid {
    border-color: #ffc107;
    box-shadow: 0 0 8px rgba(231, 231, 231, 0.6);
}

/* Estilo para campo válido */
#carrera:valid {
    border-color: #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.6);
}

/* Estilo para el campo de Asunto */
#asunto {
    border: 2px solid #6f42c1; /* Morado para destacar el campo */
    border-radius: 8px;
    padding: 10px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #f8f9fa;
    font-weight: 500;
}

#asunto:focus {
    border-color: #5a32a3;
    box-shadow: 0 0 8px rgba(111, 66, 193, 0.6);
    background-color: #fff;
}

/* Validación visual si el campo está vacío o es muy corto */
#asunto:invalid {
    border-color: #ffc107;
    box-shadow: 0 0 8px rgba(228, 228, 228, 0.6);
}

/* Estilo para el campo válido */
#asunto:valid {
    border-color: #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.6);
}

/* Estilo para el editor de texto enriquecido (versión profesional) */
.quill-editor-pro {
    border: 1px solid #ced4da;
    border-radius: 12px;
    background-color: #ffffff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    min-height: 250px;
    max-height: 350px;
    overflow-y: auto;
    padding: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 15px;
}

/* Enfoque (focus) con efecto profesional */
.quill-editor-pro:focus-within {
    border-color: #0d6efd;
    box-shadow: 0 0 10px rgba(13, 110, 253, 0.4);
}

/* Personalización de la barra de herramientas */
.ql-toolbar {
    background-color: #f8f9fa;
    border-radius: 12px 12px 0 0;
    border: none;
    padding: 8px 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Área de texto con bordes redondeados */
.ql-container {
    border: none;
    border-radius: 0 0 12px 12px;
    background-color: #fcfcfc;
    padding: 12px;
}

/* Feedback de validación */
#descripcion:invalid {
    border: 1px solid #dc3545;
    box-shadow: 0 0 6px rgba(220, 53, 69, 0.6);
}

#descripcion:valid {
    border: 1px solid #198754;
    box-shadow: 0 0 6px rgba(25, 135, 84, 0.6);
}

/* Estilo para la sección de adjuntos */
#adjuntos {
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 10px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #f8f9fa;
}

#adjuntos:focus {
    border-color: #495057;
    box-shadow: 0 0 8px rgba(108, 117, 125, 0.6);
    background-color: #fff;
}

/* Estilo de los archivos adjuntos */
.attachment-item {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.attachment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.attachment-item i {
    font-size: 1.2rem;
    margin-right: 8px;
}

.attachment-item strong {
    font-weight: 600;
}

.btn-outline-danger {
    padding: 4px 8px;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    color: white;
}

/* 🎯 Estilo para el botón Enviar */
.btn-enviar {
    background: linear-gradient(135deg, #28a745, #218838);
    border: none;
    color: white;
    font-weight: bold;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 1.1rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Efecto hover */
.btn-enviar:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Efecto al presionar */
.btn-enviar:active {
    transform: scale(0.98);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

/* Icono del botón */
.btn-enviar i {
    font-size: 1.2rem;
}

/* Botón deshabilitado */
.btn-enviar:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

/* Título Principal */
.titulo-principal {
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    color: #000;
}

/* Colores institucionales */
.texto-rojo {
    color: #8b0000; /* Rojo UPCH */
}

.texto-amarillo {
    color: #ffc107; /* Amarillo UPCH */
    font-weight: bold;
}


/* Parte "OAMRA" resaltada */
.oamra-text {
    color: #ddb500;
    font-weight: bold;
    text-transform: uppercase;
}

/* Subtítulo */
.subtitulo {
    font-size: 1.3rem;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 10px;
}

/* Línea Divisora */
.divider {
    width: 50%;
    height: 3px;
    background-color: #0d6efd;
    margin: 0 auto;
    border: none;
    border-radius: 5px;
    transition: width 0.4s ease;
}

/* Efecto hover en el título */
.form-header:hover .divider {
    width: 80%;
    background-color: #198754;
}

/* Diseño Responsivo */
@media (max-width: 576px) {
    .titulo-principal {
        font-size: 1.5rem;
    }
    .subtitulo {
        font-size: 1rem;
    }
    .divider {
        width: 70%;
    }
}

/* 🎯 Estilo General del Formulario */
.form-container {
    background-color: #f9fbfd;
    padding: 20px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    margin: auto;
    transition: all 0.3s ease;
}

/* 🎯 Estilo del Encabezado */
.form-header {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
}

/* Efecto decorativo */
.form-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50px;
    width: 150%;
    height: 5px;
    background: linear-gradient(90deg, hsl(0, 0%, 55%), #6e6e6e, #949494);
    animation: slide 5s linear infinite;
}

@keyframes slide {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(100%);
    }
}

/* Estilo para el botón de borrado rápido (X) */
.btn-clear {
    background: transparent;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 10px;
    transition: color 0.3s ease;
}

.btn-clear:hover {
    color: #bd2130;
}

.input-group .form-control {
    border-radius: 8px 0 0 8px; 
}
.input-group .btn-clear {
    border-radius: 0 8px 8px 0;
}
