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

html, body {
  height: 100%;
  min-height: 100vh;
}

body {
  font-family: Arial, sans-serif;
  font-size: 16px;
  color: #000;
  line-height: 1.5;
  background-color: #fff;
  padding: 0 20px;

  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  background-color: #2a4e0c;
  padding: 10px 20px;
}

.logo img {
  height: 50px;
  max-width: 100%;
}

#mainMenu {
  list-style: none;
  display: flex;
  gap: 10px;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

#mainMenu li a {
  display: inline-block;
  background-color: #fff;
  color: #000;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 15px;
  border-radius: 0.3em;
  border: 1px solid #ccc;
  transition: background 0.3s;
  font-size: 15px;
  white-space: nowrap;
}

#mainMenu li a:hover {
  background-color: #ddd;
}

main {
  margin-top: 40px;
  margin-bottom: 40px;
  flex: 1; 
}

section h2 {
  font-size: 24px;
  margin-bottom: 20px;
  border-bottom: 2px solid #000;
  padding-bottom: 8px;
  text-align: center;
}

.imagenes {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  max-width: 1300px; 
  margin: 0 auto;    
}

.imagenes img {
  width: 100%;
  max-width: 480px;  
  height: auto;
  object-fit: contain;
  border: 1px solid #ccc;
  border-radius: 8px;
  transition: transform 0.3s;
}

.imagenes img:hover {
  transform: scale(1.02);
}

footer {
  background-color: #2a4e0c;
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 14px;
  margin-top: auto; 
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  #mainMenu {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  #mainMenu li a {
    font-size: 14px;
    padding: 8px 12px;
    white-space: nowrap;
  }

  .imagenes {
    flex-direction: column;
    align-items: center;
    max-width: 100%;
  }

  .imagenes img {
    max-width: 90%;
    width: auto;
  }

  section h2 {
    font-size: 20px;
  }

  footer {
    font-size: 12px;
    line-height: 1.4;
    padding: 15px;
    max-width: 95%;
    margin: 0 auto;
  }
}
