/* -------------------------------------------------
   1. Reset + full viewport
   ------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
}

/* -------------------------------------------------
   2. Flex container – centers the img
   ------------------------------------------------- */
.container {
  display: flex;
  justify-content: center;        /* horizontal */
  align-items: center;            /* vertical */
  padding: 1rem;                  /* safe-zone on tiny screens */
  background: #f5f5f5;            /* optional */
}

/* -------------------------------------------------
   3. Image – responsive + never larger than viewport
   ------------------------------------------------- */
.container img {
  /* 1. Fit inside the container */
  max-width: 100%;
  max-height: 100%;

  /* 2. Preserve aspect ratio */
  width: auto;
  height: auto;

  /* 3. Contain the whole picture (no cropping) */
  object-fit: contain;

  /* 4. Optional visual polish */
  /* box-shadow: 0 4px 12px rgba(0,0,0,.15); */
}

/* -------------------------------------------------
   5. Media query for *very* tall images on small screens
   ------------------------------------------------- */
@media (max-height: 500px) and (orientation: landscape) {
  .container {
    padding: 0.5rem;
  }
  .container img {
    max-height: 95vh;   /* leave a tiny margin so the address bar doesn’t hide it */
  }
}

/* -------------------------------------------------
   2. Flex container – centers the img
   ------------------------------------------------- */
.navbar {
  /* 1. Make it a flex container */
  display: flex;
  
  /* 2. Space the logo and the links widely apart */
  justify-content: space-between; 
  
  /* 3. Vertically align items in the center */
  align-items: center; 
  

  padding: 10px 20px;
  border: solid;
  border-width: 1px;
  border-color: red;
}
.nav-links {
  /* 1. Make it a flex container */
  display: flex; 
  
  /* Remove default list styles */
  list-style: none; 
  margin: 0;
  padding: 0;
}

.myclass{
  display: flex;
  flex-direction: row;
  margin-left: 10px;
  justify-content: space-around;
  max-width: 300px;
}
.bg1{
  background-color: lightblue;
}
.bg2{
  background-color: lightpink;
}
header{
  align-items: center;
  display: flex;
  margin-bottom: 25px;
}
nav{
  margin-left: 30px;
  margin-bottom: 10px;
  padding-top: 5px;
}
nav ul{
  display: flex;
  list-style: none;
  align-items: center;
  justify-content: center;
}
nav a{
  color: black;
  font-weight: bold;
  display: block;
  padding: 15px;
  text-decoration: none;
}
footer{
  background-color: black;
}
aside{
  background-color: lightgray;
  float: left;
  width: calc(40%-140px);
}
section{
  background-color: yellowgreen;
}