*,
*:before,
*:after {
  box-sizing: border-box;
}

html {
  font-family: sans-serif;
  min-height: 100dvh;
}

body {
  margin: 0;
  min-height: 100vh;
  background-image: url(images/rainbow-trout.webp),
    url(images/spinner-black.webp),
    linear-gradient(to bottom, #5e8b73, #7daa92, #a2c0ac, #cadddb, #e2f1f0);
  background-position: center center, left bottom, 0 0;
  background-repeat: no-repeat, repeat-x, no-repeat;
  background-attachment: fixed, scroll, fixed;
  background-size: contain, auto, cover;
  padding-top: 2px;
  padding-bottom: 2px;
}

.wrapper {
  display: grid;
  max-width: 768px;
  border-radius: 20px;
  background: #384d63;
  margin-top: 20px;
  margin-bottom: 20px;
}

header {
  display: flex;
  border-radius: 10px;
  /* border: 2px solid rgb(49, 85, 61); */
  margin: 20px;
  background: url(images/fly-fishing.webp) no-repeat center / cover;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

header h1 {
  flex: 1 1 auto;
  margin: 0;
  color: #fff;
  line-height: 2;
  text-align: center;
  letter-spacing: 4px;
  background: linear-gradient(to bottom, #7db9e8 0%, #1a3c40 100%);
  border-radius: 10px;
}

header h1 sup {
  font-size: 0.6em;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.content-wrapper img {
  width: 100%;
  display: block;
  margin-bottom: 20px
}

.image-wrapper .img2 {
  display: none;
}

.image-wrapper img {
  max-width: 100%;
  display: block;
  margin-bottom: 25px;
  padding: 0 10px 0 10px;
  border-radius: 20px;
}

section {
  margin: 20px;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.8);
  background: linear-gradient(to bottom, #7db9e8 0%, #1a3c40 100%); 
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

h2 {
  margin: 15px 0 10px;
  text-align: center;
  color: #fff;
}

p {
  margin: 10px 0;
  line-height: 1.8;
  max-width: 80ch;
  color:#fff;
}

img {
  width: 100%;
}

footer {
  display: flex;
  gap: 20px;
  margin: 0 20px 20px;
}

footer a {
  color: white;
  text-decoration: none;
  line-height: 2;
}

footer a:first-child {
  margin-right: auto;
}

footer a[href^="javascript"] {
  position: relative;
  color: #000;
  background-color: #fff;
  border-radius: 3px;
  padding: 0 10px;
  box-shadow: 0 2px 2px #000;
}

footer a[href^="javascript"]:active {
  top: 2px;
  box-shadow: none;
}

@media (min-width: 48rem) {
  .wrapper {
    margin: 20px auto;
  }

  .content-wrapper {
    display: flex;
    align-items: flex-start;
  }

  .content-wrapper p {
    flex: 2;
  }

  .image-wrapper {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }

  .image-wrapper img {
    width: 100%;
    height: auto;
    top: 0;
    left: 0;
    border-radius: 50px;
  }

  .image-wrapper .img1 {
    z-index: 2;
  }

  .image-wrapper .img2 {
    display: block;
    z-index: 1;
  }

  header {
    height: 400px;
    background: url(images/fly1.webp) no-repeat top 20px left 0px, 
                url(images/fly2.webp) no-repeat top 20px right 0px, 
                url(images/fly-fishing.webp) no-repeat center center / cover;
  }

  header h1 {
    font-size: 2.75em;
    line-height: 2;
    align-self: flex-end;
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
  }
}
