*,
*::before,
*::after {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  border: 0;
  outline: 0;
}

html {
  font-size: 14px;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-select: none;
}

body {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  font-family: 'Roboto', sans-serif;
  font-size: 1.6rem;
  line-height: 1.6;
  color: #333;
  background-color: #f4f4f4;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: space-between;
  align-content: center;
  cursor: default;
}

h1,
h2,
h3 {
  all: unset;
}

h1 {
  font-size: normal;
  font-size: 20px;
}

h2 {
  font-size: 18px;
  font-weight: 400;
}

p {
  font-size: 14px;
  font-weight: 300;
}

header {
  position: relative;
  width: 100%;
  background-color: #333;
  color: #fff;
  padding: 20px;
  text-align: center;
}

main {
  position: relative;
  width: 100%;
  padding: 20px;
  text-align: center;
  flex: 1;
}

footer {
  position: relative;
  width: 100%;
  background-color: #333;
  color: #fff;
  padding: 20px;
  text-align: center;
}

/** menu principal */


/* Estilos del encabezado */
#encabezado {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #333;
  padding: 10px 20px;
  position: relative;
  font-size: 16px;
}

/* Estilos del menú */
#menu_principal {
  display: flex;
  gap: 20px;
}

#menu_principal a {
  color: white;
  text-decoration: none;
  padding: 8px 12px;
  transition: background-color 0.3s;
}

#menu_principal a:hover {
  background-color: #555;
  border-radius: 4px;
}

/* Estilos del toggler (hamburguesa) */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  width: 30px;
  height: 25px;
  justify-content: space-between;
}

.hamburger span {
  display: block;
  height: 4px;
  background-color: white;
  border-radius: 2px;
}

/* Ocultar el checkbox */
#toggler {
  display: none;
}

/* Estilos para pantallas menores a 400px */
@media (max-width: 550px) {

  /* Mostrar la hamburguesa */
  .hamburger {
    display: flex;
  }

  /* Ocultar el menú por defecto */
  #menu_principal {
    position: absolute;
    top: 45px;
    /* Ajustar según la altura del encabezado */
    left: 0;
    right: 0;
    background-color: #333;
    flex-direction: column;
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    z-index: 1;
    gap: 0;
  }

  #menu_principal a {
    padding: 15px 20px;
    border-top: 1px solid #444;
  }

  /* Mostrar el menú cuando el toggler está marcado */
  #toggler:checked+.hamburger+#menu_principal {
    display: flex;
    max-height: 700px;
    /* Valor suficientemente grande para mostrar todo el menú */
  }
}