/* === Reset básico === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
  color: #333;
  scroll-behavior: auto;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

:root {
  --bg: #f0f0f0;
  --text: #333;
  --hover: #999;
  --header-bg: #333;
  --header-text: #fff;
  --link: #868686;
  --blog-bg: #fff;
  --shadow: rgba(0, 0, 0, 0.1);
  --code-bg: #f4f4f4;
  --code-border: #ddd;
  --footer-bg: #333;
  --footer-text: #fff;
  --visited: #ffffff;
}

/* === Estilo de enlaces en el contenido === */
a {
  color: #6c6c6c; /* gris neutro elegante */
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: #444;
}

a:visited {
  color: #888;
}


/* === Header y navegación === */
header {
  background-color: var(--header-bg);
  color: var(--header-text);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

#logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: bold;
}

#logo img {
  height: 50px;
  margin-right: 10px;
}

nav ul {
  list-style-type: none;
  display: flex;
  gap: 1rem;
}

nav ul li a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s;
}

nav ul li a:hover {
  color: var(--text);
}

nav ul li a:visited {
  color: var(--visited);
}


/* === Submenú === */
.submenu {
  position: relative;
}

.submenu-items {
  display: none;
  position: absolute;
  background-color: #222;
  top: 100%;
  left: 0;
  list-style: none;
  min-width: 160px;
  z-index: 1000;
}

.submenu-items li {
  border-bottom: 1px solid #444;
}

.submenu-items li a {
  display: block;
  padding: 10px;
  color: #fff;
  text-decoration: none;
}

.submenu:hover .submenu-items {
  display: block;
}


/* === Elimina viñetas de listas específicas (no bullets) ==== */
ul.no-bullets {
  list-style: none;
  padding-left: 0;
}


/* === Contenido principal === */
main {
  flex: 1;
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.blog-entry {
  background-color: var(--blog-bg);
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px var(--shadow);
}

.blog-entry h2, .blog-entry h3 {
  color: var(--text);
}

.blog-entry .date {
  color: var(--link);
  font-style: italic;
  margin-bottom: 1rem;
}

.blog-entry p {
  line-height: 1.6;
  text-align: justify;
  margin-bottom: 1rem;
}

.blog-entry ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.blog-entry li {
  margin-bottom: 0.5rem;
}

/* === Código === */
pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: auto;
  max-width: 100%;
}

code {
  display: block;
  padding: 1em;
  background-color: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 4px;
  font-family: monospace;
  font-size: 14px;
  line-height: 1.4;
}

/* === img centrada === */

.blog-entry img {
  display: block;
  margin: 0 auto 1rem auto;
  max-width: 100%;
  height: auto;
}

/* === Footer === */
footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  text-align: center;
  padding: 1rem 2rem;
  width: 100%;
}

/* === Menú móvil === */
.menu-toggle {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  color: white;
}

.nav-links {
  display: flex;
  gap: 1rem;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    flex-direction: column;
    background-color: #333;
    height: 100vh;
    width: 100vw;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 1000;
  }


  .nav-links.showing {
    display: flex;
  }


}