/* =========================================================
   BASE / RESET SUAVE
   ========================================================= */

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Roboto, Arial, sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    line-height: 1.6;
}

h1, h2, h3, h4, h5 {
    margin-top: 0;
}

/* =========================================================
   TIPOGRAFÍA Y ESTRUCTURA DE SECCIONES
   ========================================================= */

h1 {
    color: #003366;
    font-weight: 700;
}

h2 {
    color: #003366;
    font-weight: 600;
    border-bottom: 2px solid #e5e5e5;
    padding-bottom: .4rem;
    margin-bottom: 1.5rem;
}

section {
    margin-bottom: 3rem;
}

/* =========================================================
   SIDEBAR (VERSIÓN DESKTOP)
   ========================================================= */

aside {
    background-color: #003366;
}

aside h5,
aside small {
    color: #ffffff;
}

aside a.nav-link {
    color: #ffffff;
    padding: 8px 10px;
    margin-bottom: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

aside a.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

/* =========================================================
   EXPERIENCIA PROFESIONAL (CARDS)
   ========================================================= */

.card {
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

.card h5 {
    color: #003366;
    font-weight: 600;
}

.card .text-muted {
    font-size: 0.9rem;
}

.card ul {
    margin-top: 0.5rem;
    padding-left: 1.2rem;
}

.card ul li {
    margin-bottom: 6px;
}

/* =========================================================
   LISTAS (FORMACIÓN Y CURSOS)
   ========================================================= */

ul {
    list-style-type: disc;
    padding-left: 1.5rem;
}

ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
}

ul > li,
ol > li {
    margin-bottom: 10px;
}

ul > li > ul,
ol > li > ul {
    margin-left: 20px;
}

/* =========================================================
   GALERÍA DE CERTIFICACIONES
   ========================================================= */

.gallery {
    background: #ffffff;
}

.contenedor {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 40px 0;
}

.contenedor-galeria {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.img-galeria {
    width: 120px;
    max-width: 30%;
    margin: 10px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.img-galeria:hover {
    transform: scale(1.05);
}

/* =========================================================
   LIGHTBOX (VISUALIZACIÓN DE CERTIFICADOS)
   ========================================================= */

.imagen-light {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.25s ease-in-out;
    z-index: 1050;
}

.imagen-light.show {
    transform: translateX(0);
}

.agregar-imagen {
    width: 35%;
    max-width: 500px;
    border-radius: 8px;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.agregar-imagen.showImage {
    transform: scale(1);
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 35px;
    cursor: pointer;
}

/* =========================================================
   FOOTER
   ========================================================= */

footer {
    font-size: 0.9rem;
    color: #6c757d;
}

/* =========================================================
   HEADER (VERSIÓN MÓVIL)
   ========================================================= */

.mobile-header {
    width: 100vw;
    background-color: #003366;
    color: #ffffff;
    padding: 1rem 0.5rem;
    text-align: center;
}

.mobile-header h5 {
    margin-bottom: 0.2rem;
}

.mobile-header nav {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 0.6rem;
}

.mobile-header nav a {
    color: #ffffff;
    font-size: 0.95rem;
    text-decoration: none;
}

.mobile-header nav a:hover {
    text-decoration: underline;
}

/* =========================================================
   AJUSTES RESPONSIVE (MÓVIL)
   ========================================================= */

@media (max-width: 768px) {

    /* Ocultar sidebar en móvil */
    aside {
        display: none !important;
    }

    /* Contenido a ancho completo */
    main {
        width: 100% !important;
        margin: 0 !important;
        padding: 1.5rem !important;
    }

    /* Ajustes tipográficos */
    h1 {
        font-size: 1.8rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    /* Lightbox */
    .agregar-imagen {
        width: 80%;
    }
}

/* =========================================================
   SELECTOR DE IDIOMA
   ========================================================= */

.language-switch {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.language-switch img {
    width: 22px;
    height: auto;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.language-switch a:hover img {
    opacity: 1;
    transform: scale(1.05);
}

.language-switch a.active img {
    opacity: 1;
    outline: 1px solid rgba(255,255,255,0.5);
    outline-offset: 2px;
    border-radius: 2px;
}
