* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #000714;
  color: darkgray;
  font-family: Arial, sans-serif;
  overflow-x: hidden;
}

/* Imágenes responsivas globales */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ====== HEADER (Flexbox mejorado) ====== */
#encabezado {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  width: min(100px, 25%);
  max-width: 100px;
}

#titulo {
  font-size: clamp(0.9rem, 4vw, 1.2rem);
  color: darkgray;
  margin-right: auto; /* mejor que 30% fijo */
  text-align: center;
}

/* ====== NAV ====== */
.boton_menu {
  display: none;
  cursor: pointer;
}

#active_menu {
  display: none;
}

.navegacion {
  width: 100%;
  list-style: none;
  display: flex;
  gap: 60px;
  font-size: 1rem;
  margin-right: 40px;
}

.enlaces a {
  padding: 10px;
  text-decoration: none;
  color: darkgray;
  transition: 0.3s;
  font-size: 18px;
  border-radius: 5px;
  letter-spacing: 2px;
}

.enlaces a:hover {
  background-color: rgba(36, 123, 255, 0.149);
}

/* ====== MAIN con GRID ====== */
#container_full {
  background-color: #111A29;
  width: 100%;
  padding: 2rem 1rem;
}

/* Grid para la sección de imagen y texto */
.subtema {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  justify-items: center;
  gap: 60px;
  padding: 2rem 1rem;
}

.texto {
  text-align: center;
  max-width: 600px;
  width: 100%;
  font-size: clamp(0.9rem, 4vw, 1rem);
  letter-spacing: 2px;
  line-height: 1.6;
}

.ilustration {
  width: 100%;
  max-width: 600px;
  border-radius: 30px;
  box-shadow: 0 0 5rem 0.5rem rgba(36, 123, 255, 0.149);
}

/* ====== FOOTER con GRID (reemplazando inline-block) ====== */
footer {
  width: 100%;
  background-color: #151b23;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  color: darkgrey;
  gap: 1rem;
}

#logo_footer a img {
  width: 80px;
}

.lista_redes {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 0;
}

.copy {
  font-size: 0.8rem;
  text-align: center;
  width: 100%;
  margin-top: 0; /* ajustado porque el gap del grid ya separa */
}

/* ====== MEDIA QUERIES ====== */
@media (max-width: 768px) {
  /* Menú hamburguesa */
  .boton_menu {
    display: block;
  }

  nav {
    max-height: 0;
    width: 100%;
    transition: max-height 0.3s ease-out;
    overflow: hidden;
  }

  #active_menu:checked ~ nav {
    max-height: 300px;
  }

  .navegacion {
    flex-direction: column;
    background-color: #111A29;
    margin-top: 1rem;
    gap: 1rem;
    text-align: center;
    padding-bottom: 1rem;
  }


  .navegacion li {
    width: 100%;
  }

  .navegacion a{
        display: block;
        padding: 0.5rem;
  }

  /* Ajustes del header */
  #encabezado {
    justify-content: center;
  }
  #titulo {
    margin-right: 0;
    order: 1;
  }
  .logo {
    order: 0;
  }

  /* Grid en una columna */
  .subtema {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .texto {
    max-width: 90%;
    padding: 0 1rem;
  }

  .ilustration {
    max-width: 90%;
  }

  /* Footer */
  footer {
    padding: 1.5rem;
    gap: 0.8rem;
  }
  .lista_redes {
    gap: 15px;
  }
  .copy {
    font-size: 0.7rem;
  }
}

/* Móviles pequeños */
@media (max-width: 480px) {
  .logo {
    width: 70px;
  }
  #titulo {
    font-size: 0.9rem;
  }
  .texto {
    font-size: 0.85rem;
    letter-spacing: 1px;
  }
  #logo_footer a img {
    width: 60px;
  }
  .lista_redes {
    gap: 12px;
  }
}