/* Estilos generales */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --gray-color: #95a5a6;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

/* Contenedor principal */
.container {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 850px;
    max-width: 100%;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

/* Header - Versión corregida */
.header {
    display: flex;
    flex-direction: column; /* Cambiamos a columna para apilar verticalmente */
    align-items: center; /* Centra horizontalmente todos los elementos hijos */
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    text-align: center; /* Aseguramos que el texto también se centre */
}

.logo-container {
    margin-right: 0; /* Eliminamos el margen derecho ya que no hay elementos al lado */
    margin-bottom: 15px; /* Añadimos espacio entre logo y texto */
}

.logo {
    display: block;
    width: 100px;
    height: auto;
    margin: 0 auto; /* Centra el logo horizontalmente dentro de su contenedor */
}

.header-text {
    width: 100%; /* Ocupa todo el ancho disponible */
    text-align: center; /* Centra el texto */
}

.logo-container {
    margin: 0 20px 15px 0; /* Margen solo a la derecha */
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
    }
    .logo-container {
        margin-right: 0;
        margin-bottom: 15px;
    }
}
*/

.institucion {
    font-size: 18px;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.titulo-principal {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

/* Sección de búsqueda */
.search-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
}

.ticket-container {
    text-align: center;
}

.ticket-container label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.input-group {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.ticket-container input {
    width: 300px;
    padding: 12px 15px;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 15px;
    transition: var(--transition);
}

.ticket-container input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
    padding: 0 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-primary i {
    margin-right: 8px;
}

.help-text {
    font-size: 13px;
    color: var(--gray-color);
    margin-top: 5px;
}

/* Sección de resultados */
.results-section {
    margin: 30px 0;
}

/* Barra de progreso */
.progress-container {
    position: relative;
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin: 50px 0 60px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--secondary-color);
    border-radius: 3px;
    transition: width 0.4s ease-in-out;
}

/* Pasos del progreso */
.progress-steps {
    display: flex;
    justify-content: space-between;
    position: absolute;
    width: 100%;
    top: -25px;
}

.step {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}



.optional-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}



.step-marker {
    width: 24px;
    height: 24px;
    background: #e0e0e0;
    border-radius: 50%;
    margin-bottom: 8px;
    border: 4px solid white;
    z-index: 2;
    transition: var(--transition);
}

.step-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-color);
    text-align: center;
    position: absolute;
    top: 30px;
    width: 100px;
    left: 50%;
    transform: translateX(-50%);
}

/* Estados de los pasos */
.step.active .step-marker {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.step.active .step-label {
    color: var(--dark-color);
    font-weight: 600;
}

.step.completed .step-marker {
    background: var(--success-color);
}

.step[data-estado="pendiente"] .step-marker {
    background: var(--warning-color);
}

.step[data-estado="derivado"] .step-marker {
    background: var(--secondary-color);
}

.step[data-estado="en revision"] .step-marker {
    background: #9b59b6;
}

.step[data-estado="observado"] .step-marker {
    background: var(--danger-color);
}

.step[data-estado="finalizado"] .step-marker {
    background: var(--success-color);
}

/* Sección de comentarios */
.comentarios-container {
    background: #fff8f8;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-top: 40px;
    border-left: 4px solid var(--danger-color);
    animation: fadeIn 0.5s ease;
}

.comentarios-container.hidden {
    display: none;
}

.comentarios-container.show {
    display: block;
}

.subsanacion-box {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed var(--danger-color);
}

.subsanacion-box input[type="file"] {
    display: block;
    margin-bottom: 8px;
}

#subsanacion-upload {
    margin-top: 20px;
}

.subsanacion-label {
    font-weight: 600;
    color: #c0392b;
    display: block;
    margin-bottom: 8px;
}

.subsanacion-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.subsanacion-group input[type="file"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 14px;
    background: white;
}

.hidden {
    display: none !important;
}

#descarga-final {
    margin-top: 20px;
    text-align: center;
}

#descarga-final .btn-primary {
    background-color: #2ecc71;
    border: none;
    padding: 10px 20px;
    font-weight: bold;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

.comentarios-container.exito {
    border-left: 5px solid #2ecc71;
    background-color: #eafaf1;
}

.comentarios-container.alerta {
    border-left: 5px solid #e74c3c;
    background-color: #fff4f4;
}

.comentarios-container.info {
    border-left: 5px solid #3498db;
    background-color: #eef6fb;
}

.comentarios-header i {
    margin-right: 8px;
}

.comentarios-container.exito .comentarios-header h3 {
    color: #27ae60; /* verde para éxito */
}

.comentarios-container.alerta .comentarios-header h3 {
    color: #c0392b; /* rojo alerta */
}

.comentarios-container.info .comentarios-header h3 {
    color: #2980b9; /* azul informativo */
}



.comentarios-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.comentarios-header i {
    color: var(--danger-color);
    font-size: 24px;
    margin-right: 10px;
}

.comentarios-header h3 {
    color: var(--danger-color);
    font-size: 18px;
    margin: 0;
}

.comentario-content {
    padding-left: 34px;
}

.comentario-content p {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
}

/* Sección de información */
.info-section {
    display: flex;
    justify-content: space-around;
    margin-top: 40px;
    flex-wrap: wrap;
}

.info-card {
    text-align: center;
    padding: 20px;
    background: var(--light-color);
    border-radius: var(--border-radius);
    width: 45%;
    margin-bottom: 15px;
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.info-card i {
    font-size: 30px;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.info-card h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.info-card p {
    font-size: 14px;
    color: #555;
}

/* Footer */
.footer {
    width: 100%;
    background: var(--primary-color);
    color: white;
    padding: 20px 0;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer p {
    font-size: 14px;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsividad */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 20px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-container {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .input-group {
        flex-direction: column;
        align-items: center;
    }
    
    .ticket-container input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
    
    .step-label {
        font-size: 11px;
        top: 35px;
    }
    
    .info-card {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .progress-steps {
        flex-wrap: wrap;
        top: -50px;
    }
    
    .step {
        width: 33%;
        margin-bottom: 30px;
    }
    
    .optional-step {
        width: 33%;
    }
    
    .step:nth-child(4),
    .step:nth-child(5) {
        width: 50%;
    }
}