html,
body {
  overflow-x: hidden;
}

body {
  background-color: #f6eee0;
}

/* === HERO POSTCARD SECTION === */
.postcard {
  position: relative;
  background: linear-gradient(
      to bottom,
      rgba(246, 238, 224, 0) 70%,
      #f6eee0 100%
    ),
    url("images/AFA_Postcard_04.jpg") no-repeat center center;
  background-size: cover;
  height: 500px;
}

.postcard-overlay {
  position: absolute;
  bottom: -170px; /* anchors it to the bottom of the postcard */
  width: 100%;
  padding: 80px 20px 20px 20px;
  text-align: center;
  background: linear-gradient(
    to bottom,
    rgba(246, 238, 224, 0) 0%,
    #f6eee0 100%
  );
  font-family: "Playpen Sans", sans-serif;
  color: #5c0129;
}

#lost-and-found {
  width: 50%;
}
/*.postcard-overlay h1 {
  font-family: "Playpen Sans", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-variation-settings: "width" 100;
  color: #5c0129;
  text-align: center;
  font-size: 2rem;
  line-height: 1.4;
  margin: 0;
  padding: 0 10px;
}
*/
.postcard-overlay h1 {
  font-family: "Playpen Sans", sans-serif;
  font-size: 2rem;
  font-optical-sizing: auto;
  font-style: normal;
  font-variation-settings: "width" 100;
  color: #5c0129;
  text-align: center;
  margin-top: 0px;
}

/* === GALLERY SECTION === */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 190px auto;
  padding: 0 20px;
  margin-bottom: 50px;
}

.student {
  text-align: center;
  background: transparent;
  font-family: "Playpen Sans", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  padding: 16px;
  border-radius: 10px;
  box-shadow: none;
}

.student img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 1);
}

.student p {
  margin: 0;
  font-weight: 500;
  color: #444444;
  line-height: 1.4;
}

.student a {
  color: #5c0129;
  text-decoration: none;
  font-size: 0.95rem;
}

.student a:hover {
  text-decoration: underline;
}

/* === DOG IMAGE SECTION === */
.dog-crop-box {
  width: 600px;
  overflow: hidden;
  margin-left: auto;
  margin-right: 0;
  margin-top: -100px;
  position: relative;
  z-index: 1;
  transition: transform 0.25s ease-in-out;
}
.dog-crop-box:hover {
  transform: rotate(4deg);
}

.dog-image {
  width: auto;
  max-width: none;
  display: block;
  transform: translateX(30px);
}

/* === FOOTER === */
.site-footer {
  background-color: #5c0129;
  color: #fff;
  text-align: center;
  padding: 20px 0;
  font-family: "Quicksand", cursive;
  font-size: 0.95rem;
  margin-top: 60px;
}

.site-footer a {
  color: #f6eee0;
  text-decoration: none;
}

.footer-icon {
  width: 36px;
  height: auto;
  margin-top: 10px;
  transition: transform 0.3s ease;
}

/* === STUDENT LINKS NEXT TO DOG === */
.student-dog-wrapper {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  flex-wrap: nowrap;
  max-width: 1200px;
  margin: 80px auto;
  padding: 0 20px;
  gap: 40px;
}

.student-links {
  flex: 1;
  max-width: 300px;
  color: #5c0129;
  font-family: "Playpen Sans", sans-serif;
  font-optical-sizing: auto;
  /* font-style: normal;
  font-variation-settings: "wght" 400; */
}

.student-links strong {
  font-family: "Playpen Sans", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.student-links ul {
  list-style: none;
  padding-left: 0;
}

.student-links li {
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.student-links a {
  color: #000;
  text-decoration: none;
  border-bottom: none;
  transition: color 0.2s ease;
}

.student-links a:hover {
  color: #5c0129;
  text-decoration: underline;
}

/* Mobile phones (portrait) - up to 480px */
@media (max-width: 480px) {
  .postcard {
    height: 360px;
    background-position: center top;
  }

  .postcard-overlay {
    padding: 0;
    text-align: center;
  }

  .postcard-overlay h1 {
    font-size: 1.5rem;
  }

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

  .student {
    max-width: 100%;
    margin: 0 auto;
  }

  .dog-crop-box {
    width: 100%;
    margin: 0 auto;
    overflow: visible;
    display: flex;
    justify-content: center;
  }

  .dog-image {
    max-width: 70%;
    transform: translate(0);
  }

  .student-links {
    text-align: center;
    max-width: 100%;
  }
}

/* Tablets (landscape and portrait) - up to 768px */
@media (max-width: 768px) {
  #lost-and-found {
    width: 80%;
  }

  .postcard {
    height: 360px;
    background-position: center top;
    bottom: 0;
  }

  .postcard-overlay {
    padding: 0;
    text-align: center;
    top: 300px;
    height: 170px;
  }

  .postcard-overlay h1 {
    font-size: 1.5rem;
  }

  .gallery {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 20px;
    margin-top: 110px;
    margin-bottom: 50px;
  }

  .student {
    max-width: 100%;
    margin: 0 auto;
  }

  .dog-crop-box {
    width: 100%;
    margin: 0 auto;
    overflow: visible;
    display: flex;
    justify-content: center;
  }

  .dog-image {
    max-width: 70%;
    transform: translate(0);
  }

  .student-links {
    text-align: center;
    max-width: 100%;
  }
}
