/* Reset y base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  padding: 0;
  margin: 0;
}

/* Encabezado y menú */
nav {
  background-color: #202225;
  padding: 1rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

nav .section {
  color: white;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  background-color: #2c3e50;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background 0.2s;
}

nav a:hover {
  background-color: #3a3f44;
}

/* Contenido principal */
main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

.highlight {
  color: #e74c3c;
}

h2 {
  font-size: 1.5rem;
  margin: 1.8rem 0 1rem;
  color: #2c3e50;
}

p {
  margin-bottom: 1rem;
}

ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

a {
  color: #3498db;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Bloque de código */
pre {
  background-color: #2d2d2d;
  padding: 1.2rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #f8f8f2;
}

code {
  font-family: 'Fira Code', 'Consolas', monospace;
}

/* Responsive */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
  }

  nav .section,
  nav a {
    width: 100%;
    margin-bottom: 0.3rem;
  }
}
.tagline {
  font-size: 1.3rem;
  color: #555;
  margin-bottom: 2.5rem;
  text-align: center;
}

.hero-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
  margin: 2rem 0;
}

.card {
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #3498db;
}

.card h2 {
  margin-top: 0;
  color: #2c3e50;
}

.card a {
  display: inline-block;
  margin-top: 1rem;
  color: #3498db;
  font-weight: bold;
  text-decoration: none;
}

.card a:hover {
  text-decoration: underline;
}

footer-note {
  text-align: center;
  margin-top: 3rem;
  color: #777;
  font-size: 0.9rem;
}
/* Submenús */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #2d2d2d;
  min-width: 220px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  z-index: 1;
  border-radius: 4px;
}

.dropdown-content a {
  color: white;
  padding: 0.75rem 1rem;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #444;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Responsive: en móviles, el submenú se muestra como bloque */
@media (max-width: 768px) {
  .dropdown {
    width: 100%;
  }
  .dropdown-content {
    position: static;
    box-shadow: none;
    background-color: #333;
  }
}
/* Estilo para el blog */
article {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

article:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

article h2 {
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
}

article h2 a {
  color: var(--color-primary);
  text-decoration: none;
}

article h2 a:hover {
  text-decoration: underline;
}

.meta {
  color: #777;
  font-style: italic;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.8rem;
}

article p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Responsive para blog */
@media (max-width: 768px) {
  article h2 {
    font-size: 1.25rem;
  }

  .meta {
    font-size: 0.85rem;
  }
}
