@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,200i,300,300i,400,400i,600,600i,700,700i,900,900i&display=swap');

/* Reseteo Global y Tipografía */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    font-family: 'Source Sans Pro', sans-serif;
}

/* Regla crítica para que las imágenes no se deformen en el sitio */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

body {
    background: #f6f6f6;
    overflow-x: hidden;
}

/* Header y Navegación */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: #fff;
    box-shadow: 0 4px 25px -22px black;
    z-index: 100; /* Aseguramos que esté por encima de todo */
}

.header-content {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 20px;
}

.logo {
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo h1 b {
    color: #46a2fd;
}

.menu {
    height: 80px;
    margin-right: 60px;
}

.menu nav, .menu nav ul {
    height: 100%;
    display: flex;
    list-style: none;
}

.menu nav ul li {
    height: 100%;
    margin: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Indicador de página seleccionada */
.menu-selected:before {
    content: '';
    width: 100%;
    height: 4px;
    background: #46a2fd;
    position: absolute;
    top: 0;
    left: 0;
}

.menu nav ul li a {
    color: #777777;
    font-size: 18px;
    transition: color 300ms;
}

.menu nav ul li a:hover, 
.menu .text-menu-selected {
    color: #46a2fd;
}

.menu nav ul li a i {
    display: none; /* Se activa en responsive */
}

/* Icono menú móvil */
#icon-menu {
    width: 50px;
    height: 50px;
    position: absolute;
    right: 20px;
    top: 15px;
    background: #eee;
    border-radius: 50%;
    color: #787878;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 110;
}

/* Buscador de contenido */
#ctn-icon-search {
    position: absolute;
    right: 20px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#ctn-icon-search i {
    font-size: 18px;
    color: #777777;
    cursor: pointer;
    transition: color 300ms;
}

#ctn-bars-search {
    position: fixed;
    top: -100px; /* Oculto inicialmente */
    left: 0;
    width: 100%;
    background: #fff;
    padding: 20px;
    z-index: 105;
    transition: all 600ms;
    box-shadow: 0 5px 10px rgba(0,0,0,0.05);
}

#ctn-bars-search input {
    display: block;
    width: 100%;
    max-width: 1200px;
    margin: auto;
    padding: 10px;
    font-size: 18px;
    outline: 0;
    border: 1px solid #ddd;
}

#box-search {
    position: fixed;
    top: 130px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    background: #fff;
    z-index: 104;
    overflow: hidden;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

#box-search li a {
    display: block;
    color: #777777;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
}

#box-search li a:hover {
    background: #f3f3f3;
}

#cover-ctn-search {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0,0,0,0.5);
    z-index: 103;
    display: none;
}

/* Footer */
.container-footer {
    width: 100%;
    padding: 40px 0;
    background: #fff;
    margin-top: 40px;
}

.container-footer footer {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.logo-footer {
    text-align: center;
    margin-bottom: 20px;
}

.logo-footer img {
    width: 100px;
    margin: auto;
}

.redes-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.icon-redes-footer {
    font-size: 20px;
    background: #efefef;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    color: #a2a2a2;
    transition: all 300ms;
}

/* Colores de redes sociales */
.fa-facebook-f:hover { background: #41579A; color: #fff; }
.fa-youtube:hover { background: #FF0000; color: #fff; }

.container-footer h4 {
    text-align: center;
    margin-top: 40px;
    color: #8e8e8e;
    font-weight: 500;
}

/* Formatos de Texto y Código */
#formato {
    border: 1px solid #ccc;
    padding: 15px;
    margin: 12px 0;
    font-size: 0.8em; /* Corregido de 0,8em */
    color: #d9534f;
    font-family: Consolas, monospace;
    background-color: #ECFFFD;
    border-radius: 8px;
}

code {
    color: #d9534f;
    font-family: Consolas, "Lucida Console", monospace;
    font-size: 1.1em;
    padding: 2px 4px;
    background: #eee;
    border-radius: 4px;
}

/* Responsive */
@media screen and (max-width: 800px) {
    #icon-menu { display: flex; }
    
    .menu {
        width: 300px;
        height: 100vh;
        position: fixed;
        top: 80px;
        left: -300px; /* Escondido */
        background: #fff;
        transition: all 300ms;
    }

    .menu.show-lateral {
        left: 0;
    }

    .menu nav ul {
        flex-direction: column;
        padding-top: 20px;
    }

    .menu nav ul li {
        height: 60px;
        justify-content: flex-start;
        padding-left: 30px;
    }

    .menu nav ul li a i {
        display: inline-block;
        margin-right: 15px;
        color: #46a2fd;
    }
}