/* BASE */
:root { --max: 740px; }
html, body { height: 100%; margin: 0; }
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; line-height: 1.5; background:#fff; color:#111; }
a { text-decoration: none; color: inherit; }
img { max-width: 600px; width: 100%; height: auto; border-radius: 16px; display: block; margin: 0 auto 1rem; }
h1 { font-size: clamp(1.75rem, 2.5vw + 1rem, 2.5rem); margin: 0.25rem 0 0.5rem; }
p { margin: 0.25rem 0 1rem; color: #333; }

.wrap { min-height: 100%; display: grid; place-items: center; padding: 4rem 1.25rem; }
.card { max-width: var(--max); text-align: center; }

/* Botones */
.btn {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 600px;
  border: 1px solid #ccc;
  color: #8B4513;
}
.btn:hover { background-color: #f5f5f5; }

/* Pie de página */
footer {
  width: 100%; 
  text-align: center;
  font-size: 0.8rem;
  color: #666;
  margin-top: 3rem;
  padding: 1rem 0;
  border-top: 1px solid #ddd;
}
footer p {
  margin: 0;               
  text-align: inherit;      
}

/* para H1 oculto y texto solo-lectores */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  border: 0; white-space: nowrap;
}

/* saludo grande sin ser encabezado */
.big-greeting { font-size: 3rem; font-weight: 700; margin: 1.5rem 0 1rem; }

/* ===== Navegación superior ===== */
.topnav { position: sticky; top: 0; background: #fff; border-bottom: 1px solid #ddd; z-index: 1000; }
.topnav__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 1rem;
}
.brand { font-weight: 600; color: #333; }
.nav-toggle {
  display: none;
  background: none; border: 1px solid #ccc; border-radius: 6px;
  padding: .3rem .5rem; cursor: pointer;
}
.menu { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; align-items: center; }
.menu > li > a, .submenu-toggle {
  text-decoration: none; color: #333;
  padding: 0.3rem 0.5rem; border-radius: 4px;
}
.menu > li > a:hover, .submenu-toggle:hover, .submenu a:hover { background: #f5f5f5; }

.has-submenu { position: relative; }
.submenu-toggle { background: none; border: none; cursor: pointer; font: inherit; }
.submenu {
  position: absolute; left: 0; top: 100%;
  min-width: 200px; background: #fff; border: 1px solid #ddd;
  list-style: none; margin: .3rem 0 0; padding: 0.4rem 0; display: none;
}
.submenu li a { display: block; padding: .4rem .6rem; color: #333; text-decoration: none; }

@media (hover:hover){ .has-submenu:hover .submenu { display: block; } }

/* Móvil */
@media (max-width: 800px){
  .nav-toggle { display: inline-block; }
  .menu {
    position: absolute; top: 50px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid #ddd;
    flex-direction: column; gap: 0; display: none;
  }
  .menu.show { display: flex; }
  .menu > li { width: 100%; }
  .menu > li > a, .submenu-toggle { width: 100%; text-align: left; padding: 1rem; }
  .submenu { position: static; border: none; margin: 0; padding: 0; display: none; }
  .submenu.show { display: block; }
}


/* ===== Layout de entradas ===== */
.entrada {
  max-width: var(--max);
  margin: 2rem auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 0 1rem;
  align-items: start;
}

.entrada__media img {
  width: 100%;
  border-radius: 12px;
  display: block;
}

.entrada__texto h1 {
  margin-top: 0;
  font-size: clamp(1.8rem, 2vw + 1rem, 2.5rem);
}

.entrada__texto p {
  margin: 0 0 1rem;
  color: #333;
  line-height: 1.6;
  text-align: justify;
}

/* Versión móvil */
@media (max-width: 800px) {
  .entrada {
    grid-template-columns: 1fr;
  }
  .entrada__media {
    margin-bottom: 1rem;
  }
}
