/*
Author: Ben Hilarides
Date: 3.8.25
File name: styles.css
*/

/* CSS Reset */
body, header, nav, main, footer, img, aside, figure, figcaption, h1, h2 {
  margin: 0;
  padding: 0;
  border: 0;
  box-sizing: border-box;
}

/* Style rules for body and images */
body {
  background-color: #111180;
  color: black;
}

/* Style rule for Images */
img {
  max-width: 300px;
  height: auto;
  display: block;
  border-radius: 5px 20px 5px 5px;
}

/* Style rules for mobile viewport */

/* Style rules to show mobile class and hide tab-desk class */
.mobile, .mobile-tablet {
  display: block;
}

.tab-desk, .desktop {
  display: none;
}

#hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100vh;
  background-color: #f4f4f4;
  max-width: 500px;
  gap: 10px;
  padding: 20px;
}

#hero h2 {
  display: block;
}

#hero img {
  max-width: 100%;
  height: auto;
  padding: 2%;
}

.aside {
  text-align: center;
  font-weight: bold;
  text-shadow: 4px 4px 10px #c5a687;
}

aside p {
  margin-right: 3%;
}

/* Pseudo-Element not covered in textbook  */
.bio-heading::before {
  content: "🚢 ";
  font-size: 1.2em;
  margin-right: 5px;
}

.figure {
  border: 4px solid #2a1f14;
  box-shadow: 6px 6px 10px #c5a687;
  max-width: 400px;
  margin: 2% auto;
}

.figcaption {
  padding: 2%;
  border-top: 4px solid #2a1f14;
  margin-left: 4%;
}

/* Style rule for header content */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #970000;
  height: 50px;
  padding: 5px 0;
  text-align: center;
}

header h1 {
  padding: 1%;
}

/* Style rules for navigation */
nav  {
  background-color: white;
  padding: 2%;
  margin-bottom: 1%;
  margin-top: 20px;
  text-align: center;
}

nav ul  {
  list-style-type: none;
  text-align: center;
}

nav li  {
  display: block;
  font-size: 1.5em;
  font-family: Geneva, Arial, sans-serif;
  font-weight: bold;
  border-bottom: .5px solid #f6eee4;
}

nav li:first-child  {
  border-top: none;
}

nav li a  {
  display: block;
  color: black;
  text-align: center;
  padding: 10px;
  text-decoration: none;
  text-transform: uppercase;
  border-bottom: 1px solid #ccc;
  font-family: "Francois One", sans-serif;
}

nav li a:hover {
  color: #2a1f14;
  background-color: #f6eee4;
}

/* Style rules for main content */
main {
  display: block;
  background-color: white;
  margin: 2em auto;
}

main p {
  margin: 3% 0;
  padding: 2%;
  font-family: "Roboto Slab", sans-serif;
}

.content-section {
  display: block;
  padding: 20px;
}

.grid {
  display: block;
}

.grid img {
  width: 40%;
  max-width: 300px;
  height: auto;
}

.grid p {
  width: 55%
}

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 20px;
}

figure img {
  width: 100%;
  height: auto;
}

/*.gallery img {
  margin-left: 10%;
  justify-content: center;
}

.gallery figcaption {
margin-left: 4%;
}
Test */
/* Style rules for footer content */
footer  {
  font-size: 0.85em;
  background-color: #2a1f14;
  color: #f6eee4;
  text-align: center;
  padding: 1% 0%;
  bottom: 0;
}

/*Media Query for Tablet Viewport*/
@media screen and (min-width:620px) {

  /* Tablet Viewport: Show tab-desk class and hide mobile class */

  .tab-desk {
    display: block;
  }

  .mobile {
    display: none;
  }

  /* Tablet Viewport: Style rule for header content */
  header {
    position: static;
  }

  body {
    background-color: navy;
  }

  main {
    width: 100%;
    padding: 0 5%;
  }

  /* Tablet Viewport: Style rules for navigation */
  nav li {
    border-top: none;
    display: inline-block;
    border-right: 1px solid black;
  }

  #hero {
    max-width: 600px;
    margin: 0 0 4% 20%;
    justify-content: center;
  }

  .content-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 0 10%;
    max-width: 1200px;
    margin: 0 auto;
  }

  .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }

  .content-section {
    width: 48%;
    margin-bottom: 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    flex: 1 1 45%;
  }

  .content-section img {
    width: 50%;
    max-width: 300px;
    height: auto;
  }

  .content-section p {
    flex: 1;
    line-height: 1.5;
    margin: 0;
  }

  .content-container:nth-child(even) {
    background-color: #f0f0f0;
   }

  .grid {
    display: flex;
    gap: 10px;
  }

  .grid img {
    width: auto;
    max-width: 300px;
    height: auto;
  }

  .grid p {
    width: 100%;
    margin: 0;
    line-height: 1.5;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery img, .gallery figcaption {
    width: 48%;
    margin-bottom: 20px;
  }

}

/*Media Query for Desktop Viewport*/
@media screen and (min-width: 1000px), print {

  /*Desktop Viewport: Show desktop class and hide mobile-tablet class*/

  .mobile-tablet {
    display: none;
  }

  nav li {
    font-size: 1.5em;
  }

  nav li a:hover {
    color: #2a1f14;
    background-color: #f6eee4;
  }

  body {
    background-color: blue;
    color: black;
  }

  .grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 10px;
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }

}

/*Media Query for Large Desktop Viewports*/
@media screen and (min-width: 1921px) {
  header {
    padding-top: 2em;
  }

  html, body {
    height: 100%;
    margin: 0;
  }

  body {
    background: linear-gradient(to right, red, white);
  }

  #hero {
    max-width: 600px;
    margin: 0 0 4% 30%;
    justify-content: center;
  }

}

/*Media query for print*/
@media print {
  body {
    background-color: white;
    color: blue;
  }

  .grid {
    display: grid;
    grid-template-columns: auto auto;
    padding: 10px 0;
  }

  .aside {
    grid-column: 1 / span 4;
    font-size: 3em;
  }
}