:root {
    --uniandes-yellow: #FDDA24;
    --uniandes-yellow-dark: #e5c312;
    --text-dark: #222222;
    --text-muted: #555555;
    --bg-body: #f4f5f7;
    --bg-card: #ffffff;
    --border-color: #e0e0e0;
    
    /* Escala de gris institucional para la tarjeta del formulario */
    --form-header-bg: #2d3136; 
    --form-header-text: #ffffff;
    
    --nav-height: 70px;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: var(--nav-height);
}

.site-content {
    flex: 1 0 auto;
    padding: 20px 15px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* ==========================================================================
   HEADER INSTITUCIONAL
   ========================================================================== */
.navbar.fixed-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: var(--uniandes-yellow) !important;
    border-bottom: 3px solid #000000 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    padding: 0 25px;
    z-index: 1030;
}

.navbar-brand img {
    max-height: 48px;
    width: auto;
    display: block;
}

#tituloheader {
    margin: 0 0 0 15px;
    font-size: 0.95rem !important;
    font-weight: 700;
    color: #000000;
    border-left: 2px solid #000000;
    padding-left: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   ESTÁNDAR DE ALERTAS (VERDE / ROJO / AMARILLO)
   ========================================================================== */
.alert {
    padding: 12px 16px !important;
    border-radius: 4px !important;
    margin-bottom: 18px !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    display: block;
}

/* Éxito: Fondo Verde */
.alert-success, div.alert-success { 
    background-color: #d4edda !important; 
    color: #155724 !important; 
    border: 1px solid #c3e6cb !important; 
}

/* Error: Fondo Rojo */
.alert-error, .alert-danger, div.alert-error { 
    background-color: #f8d7da !important; 
    color: #721c24 !important; 
    border: 1px solid #f5c6cb !important; 
}

/* Advertencia: Fondo Amarillo tenue */
.alert-warning, div.alert-warning { 
    background-color: #fff3cd !important; 
    color: #856404 !important; 
    border: 1px solid #ffeeba !important; 
}

/* ==========================================================================
   FORMULARIO Y TARJETA (GRIS OSCURO SOBRIO)
   ========================================================================== */
.certificados-container {
    width: 100%;
    max-width: 580px;
    margin: 10px auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.certificados-header {
    background-color: var(--form-header-bg) !important; 
    padding: 14px 20px;
    border-bottom: 3px solid #1a1a1a !important; 
}

.certificados-header h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--form-header-text) !important; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.certificados-body {
    padding: 22px;
}

.certificados-intro, .info-estudiante {
    margin-bottom: 18px;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    background-color: #f8f9fa;
    padding: 12px 14px;
    border-left: 4px solid var(--form-header-bg) !important;
    border-radius: 0 4px 4px 0;
}

.form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: var(--text-dark);
}

.form-group label span.required {
    color: #d9534f;
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    font-size: 0.9rem;
    border: 1px solid #cccccc;
    border-radius: 4px;
    background-color: #ffffff;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: var(--form-header-bg);
    outline: 0;
    box-shadow: 0 0 0 2px rgba(45, 49, 54, 0.15);
}

.habeas-box {
    background: #f9f9f9;
    border: 1px solid #dddddd;
    padding: 10px;
    font-size: 0.8rem;
    color: #555555;
    max-height: 90px;
    overflow-y: auto;
    margin-bottom: 10px;
    border-radius: 4px;
}

.radio-group {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.88rem;
}

.recaptcha-container {
    margin: 15px 0;
    display: flex;
    justify-content: center;
}

.form-actions {
    text-align: center;
    margin-top: 20px;
}

.btn-submit, .btn-pago {
    display: inline-block;
    background-color: var(--uniandes-yellow);
    color: #000000;
    border: 1px solid var(--uniandes-yellow-dark);
    padding: 11px 32px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 25px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.btn-submit:hover, .btn-pago:hover {
    background-color: #000000;
    color: #ffffff;
    border-color: #000000;
}

/* Tabla de Resumen */
.resumen-tabla {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.resumen-tabla tr {
    border-bottom: 1px solid var(--border-color);
}

.resumen-tabla td {
    padding: 10px 6px;
    font-size: 0.88rem;
}

.resumen-tabla td.label {
    font-weight: 700;
    color: var(--text-dark);
    width: 42%;
}

.resumen-tabla td.destacado {
    font-size: 1.05rem;
    font-weight: 700;
    color: #000000;
}

/* Footer Institucional */
.site-footer {
    flex-shrink: 0;
    background-color: #1a1a1a;
    color: #cccccc;
    text-align: center;
    padding: 18px 15px;
    font-size: 0.82rem;
    line-height: 1.6;
    border-top: 4px solid var(--uniandes-yellow);
    margin-top: auto;
}

.site-footer p {
    margin: 0;
}

@media (max-width: 768px) {
    #tituloheader {
        font-size: 0.82rem !important;
        margin-left: 10px;
        padding-left: 10px;
    }
    .certificados-container {
        max-width: 95%;
    }
    .btn-submit, .btn-pago {
        width: 100%;
        padding: 12px;
    }
}


/* Alineación en Flexbox para título + botón de inicio */
.certificados-header {
    background-color: var(--form-header-bg) !important; 
    padding: 12px 20px;
    border-bottom: 3px solid #1a1a1a !important; 
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.certificados-header h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--form-header-text) !important; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Estilo del botón de Inicio en el encabezado */
.btn-home-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-home-link:hover {
    background-color: var(--uniandes-yellow);
    color: #000000;
    border-color: var(--uniandes-yellow);
}

.btn-home-link svg {
    display: block;
}

@media (max-width: 576px) {
    .btn-home-link span {
        display: none; /* En teléfonos móviles solo muestra el icono para ahorrar espacio */
    }
    .btn-home-link {
        padding: 6px;
    }
}

/* ==========================================================================
   ESTILOS PARA ELEMENTOS DESHABILITADOS (NO EDITABLES)
   ========================================================================== */

/* Entradas de texto, selects y textareas deshabilitados */
.form-control:disabled,
.form-control[disabled] {
    background-color: #e9ecef !important;
    color: #6c757d !important;
    border-color: #ced4da !important;
    cursor: not-allowed !important;
    opacity: 0.8;
}

/* Reducir opacidad e indicar cursor no permitido para checkboxes deshabilitados */
input[type="checkbox"]:disabled,
input[type="checkbox"]:disabled + label,
label:has(input[type="checkbox"]:disabled) {
    cursor: not-allowed !important;
    color: #888888 !important;
}

/* Estilo para el contenedor de opciones adicionales cuando está inactivo */
.opciones-adicionales-container {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    transition: all 0.25s ease;
}

.opciones-adicionales-container.disabled {
    background-color: #e9ecef !important;
    border-color: #ced4da !important;
    opacity: 0.75;
}