:root {
    --primary-color: #0056b3;
    --secondary-color: #6c757d;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --font-family-sans-serif: 'Roboto', sans-serif;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--font-family-sans-serif);
    background-color: var(--light-gray);
    color: #212529;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1 0 auto;
}

.footer {
    flex-shrink: 0;
}

.logo-inicio {
    padding: 1.5rem 1rem;
    background-color: #ffffff;
}

.logo-inicio .display-6 {
    font-weight: 700;
    color: var(--primary-color);
}

.logo-inicio .lead {
    font-weight: 300;
    margin: 0.5rem auto 0;
}

.feature-section {
    padding: 1.5rem 1rem;
}

.feature-card {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.1);
    cursor: pointer;
}

.feature-card .bi {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.feature-card h5 {
    font-weight: 500;
    color: var(--dark-gray);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-weight: 300;
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.footer {
    background-color: var(--dark-gray);
    color: #ffffff;
    padding: 1rem 1rem;
}

.footer h5 {
    font-weight: 500;
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.footer p, .footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.875rem;
}

.footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer .social-icons a {
    font-size: 1rem; /* Tamaño reducido para íconos del footer */
    margin-right: 1rem;
}

.alerta-obligatorios {
    font-size: 12px;
    font-weight: 500;
    color: var(--dark-gray);
}

.politica_privacidad {
    font-size: 13px;
    margin-top: 10px;
}

.label-sm {
    font-size: 12px;
    font-weight: 500;
    color: var(--dark-gray);
    padding-top: 20px;
    padding-bottom: 2px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-overlay.show {
    visibility: visible;
    opacity: 1;
}

.iniciar_sesion:hover {
    cursor: pointer;
    text-decoration: underline;
    color: var(--primary-color);
}

.logo-instituciones-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    padding: 6px 0 0 20px;
    --cols: 4; /* fallback */
}

.logo-instituciones {
    flex: 0 0 calc(100% / var(--cols));
    max-width: calc(100% / var(--cols));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    box-sizing: border-box;
}

.alcaldia-logo, .camaracomercio-logo {
    display: block;
    max-width: 80%;
    width: auto;
    height: auto;
    max-height: 60px;
    object-fit: contain;
}

.reddi-logo, .ocyt-logo {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 100px;
    object-fit: contain;
}

.minciencias-logo {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 100px;
    object-fit: contain;
}

.agrosavia-logo {
    display: block;
    max-width: 80%;
    width: auto;
    height: auto;
    max-height: 80px;
    object-fit: contain;
}

.ruta-n-logo {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 60px;
    object-fit: contain;
}

.encuesta-innovacion-logo, .ocyt-logo {
    display: block;
    max-width: 80%;
    width: auto;
    height: auto;
    max-height: 60px;
    object-fit: contain;
}

.logo-final {
    padding: 0 0 0 20px;
}

/* Breakpoints: 2 por fila en tablets, 1 por fila en móviles */
@media (max-width: 992px) {
    .logo-instituciones {
        flex: 0 0 calc(100% / var(--cols));
        max-width: calc(100% / var(--cols));
    }
    
    .alcaldia-logo, .camaracomercio-logo {
        display: block;
        max-width: 80%;
        width: auto;
        height: auto;
        max-height: 60px;
        object-fit: contain;
    }

    .reddi-logo, .ocyt-logo {
        display: block;
        max-width: 80%;
        width: auto;
        height: auto;
        max-height: 60px;
        object-fit: contain;
    }
    
    .content-wrapper > main {
        padding: 0 20px 0 20px;
    }
}

@media (max-width: 576px) {
    .logo-instituciones {
        flex: 0 0 calc(100% / var(--cols));
        max-width: calc(100% / var(--cols));
    }
    
    .alcaldia-logo, .camaracomercio-logo {
        display: block;
        max-width: 80%;
        width: auto;
        height: auto;
        max-height: 60px;
        object-fit: contain;
    }

    .reddi-logo, .ocyt-logo {
        display: block;
        max-width: 80%;
        width: auto;
        height: auto;
        max-height: 60px;
        object-fit: contain;
    }

     .content-wrapper > main {
        padding: 0 20px 0 20px;
    }
}