/* Social Media */

.social-media-icons {
  display: flex;
  justify-content: center;
  gap: 3rem;
  width: 100%;
  max-width: 36rem;
}

.social-media-icon {
  width: 3rem;
  vertical-align: middle;
}

#socialMediaContact { margin-top: 2rem; }

/* Gallery */

#galleryContainer {
  position: relative;
  width: 90%;
  max-width: 35rem;
  aspect-ratio: 1 / 1;
  border: 3px solid var(--light-pink);
  box-sizing: border-box;
  margin: 0;
}

#galleryImgs {
  position: absolute;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  z-index: 1;
}

.gallery-item {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.gallery-img.loaded {
  opacity: 1;
}

.img-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.7);
  transition: opacity 0.6s ease;
  z-index: 2;
}

.img-placeholder.fade-out {
  opacity: 0;
  pointer-events: none;
}

#galleryRows {
  position: absolute;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  row-gap: 1rem;
}

.gallery-row {
  background: var(--brown);
}

#galleryCols {
  position: absolute;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 1rem;
}

.gallery-col {
  background: var(--light-pink);
}

#bridalImageGrid {
  display: grid;
  width: 90%;
  max-width: 35rem;
  grid-template-rows: repeat(2, 1fr);
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 0.5rem;
}

.bridal-img {
  width: 100%;
}

#sendButton {
  align-self: flex-start;
  width: 15rem;
  margin-top: 0.32rem;
  padding: 0.8rem 0 0.8rem 0;
}

#ourServicesDesktop, #ourStylistsDesktop, #bridalButtonDesktop {
  display: none;
}

/* Videos */

.video-container {
  width: 80vw;
  max-width: 35rem;
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 4px;
}

.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: all;
}

/* Images */

#stylistsGroupPhoto {
  width: 90%;
  max-width: 35rem;
}

/* Contact */

#contact {padding-top: 3rem; margin-bottom: 0;}

.contact-information, 
#contactForm {
  font-family: var(--font-family-regular);
  width: 90%;
  margin: 0 auto;
  color: var(--text-color-regular);
}

#contactForm {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.contact-input-container {
  display: flex;
  flex-direction: column;
}

.contact-text {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--text-color-regular);
}

.contact-input {
  width: 75%;
  max-width: 35rem;
  background: transparent;
  border: none;
  height: 1.5rem;
  border-bottom: 1px solid var(--text-color-light);
  padding: 1rem 0.3rem;
  letter-spacing: 1px;
  font-size: 1.6rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.contact-input:focus {
  border-bottom: 1px solid var(--pink);
}

.message-input {
  height: 20rem;
  width: 90%;
  max-width: 35rem;
  font-family: var(--font-family-regular);
  border: 1px solid var(--text-color-light);
  border-radius: 4px;
  padding: 1rem 1rem;
  resize: vertical;
}

.message-input:focus {
  border: 1px solid var(--pink);
}

#emailSentPopupOverlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.5s;
  background: rgba(0, 0, 0, 0.5);
}

#emailSentPopup {
  visibility: hidden;
  position: fixed;
  z-index: 4;
  top: -30rem;
  left: 50%;
  margin-left: -45%;
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
  border-left: 5px solid var(--pink);
  border-top: 5px solid var(--pink);
  width: 90%;
  background: var(--background-color);
  transition: 0.5s;
  padding-bottom: 5rem;
}

#emailSentPopup h1 {
  font-size: 3.5rem;
  padding: 1.2rem;
}

#emailSentPopup .top-style-logo {
  width: auto;
  height: 9rem;
  min-height: auto;
}

#emailSentPopup .close-icon {
  transform: rotate(0deg) scale(1);
  transition: transform 0.3s;
}

#emailSentPopup .close-icon:hover {
  transform: rotate(90deg) scale(1.1);
}

#sendButton { cursor: pointer; border: none; }

/* Map */

#map {
  margin-top: 3rem;
  width: 100%;
  height: 40rem;
  border-top: 2px solid var(--brown);
  border-bottom: 2px solid var(--brown);
}

/* Desktop Media Query */

@media(min-width: 1000px) {
  #heroSection { min-height: 40rem; margin-top: 10rem; padding-top: 0.7rem;}

  #bookAppointment { display: none; }

  @keyframes social-media-animation {
    from {
      rotate: 0deg;
    }

    50% {
      rotate: 25deg;
    }

    to {
      rotate: 0deg;
    }
  }

  #socialMediaHero {
    justify-content: left;
    width: auto;
    margin-top: 0rem;
  }

  .social-media-icon:hover {
    animation: social-media-animation 0.3s;
  }

  #galleryContainer {
    margin: 0;
    width: 35vw;
    max-width: 60rem;
  }

  .video-container {
    width: auto;
    height: 100vh;
    position: relative;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: 4px;
  }

  #ourServices, #ourStylists, #bridalButton { display: none; }
  #ourServicesDesktop, #ourStylistsDesktop, #bridalButtonDesktop {display: block;}
  #ourServicesDesktop, #bridalButtonDesktop { margin-top: 4.8rem; }
  #ourStylistsDesktop, #social { margin-top: 1.6rem; }

  #stylistsImagesVerticalContainer {
    margin-left: 0;
    height: 100vh;
    min-height: 45rem;
    align-items: end;
    gap: 0;
    justify-content: space-around;
  }

  #stylistsGroupPhoto {
    width: 80%;
    max-width: 30rem;
  }

  #bridalSection {
    margin-bottom: 8rem;
  }

  #bridalImageGrid {
    width: 35vw;
    max-width: 40rem;
    gap: 0.7rem;
  }

  #contact {
    min-height: 0;
    padding-bottom: 5rem;
    height: auto;
    box-sizing: content-box;
    border-top: 1px solid var(--brown);
    padding-top: 1.6rem;
  }

  .contact-information {
    margin: 0;
  }

  #contactInformationDesktopContainer {
    min-width: 25rem;
    width: auto;
  }

  .contact-text {
    font-size: 1.25rem;
  }

  #contactSectionHorizontalContainer {
    align-items: start;
    height: 40vh;
  }

  #contactForm {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 columns */
    grid-template-rows: auto auto auto auto; /* 4 rows */
    gap: 1.6rem 3.2rem;
    width: 30%;
    margin: 0;
  }

  /* Grid item placement */
  #contactUsHeading {
    grid-row: 1 / 2;
    grid-column: 1 / 3; /* spans both columns */
    margin: 0;
    padding: 0;
  }

  #nameInputContainer {
    grid-row: 2 / 3;
    grid-column: 1 / 2;
  }

  #emailInputContainer {
    grid-row: 2 / 3;
    grid-column: 2 / 3;
  }

  .contact-input {
    max-width: none;
    width: 100%;
    font-size: 1.2rem;
    padding: 1rem 0.3rem;
  }

  #messageInputContainer {
    grid-row: 3 / 4;
    grid-column: 1 / span 2;
  }

  #contactForm .message-input {
    grid-row: 3 / 4;
    grid-column: 1 / span 2;
    height: 8rem;
    max-width: none;
    width: 100%;
    resize: none;
    padding: 0.7rem;
  }

  #sendButton {
    grid-row: 4 / 5;
    grid-column: 1 / 2;
    justify-self: start;
    align-self: center;
  }

  #socialMediaContact {
    grid-row: 4 / 5;
    grid-column: 2 / 3;
    display: flex;
    justify-content: flex-end;
    align-items: start;
    gap: 1.25rem;
    margin: 0;
  }

  #socialMediaContact .social-media-icon {
    width: 2rem;
  }

  #sendButton {
    align-self: flex-start;
    width: 10rem;
    margin-top: 0.32rem;
    padding: 0.6rem 0 0.6rem 0;
  }

  #emailSentPopup {
    margin-left: -25rem;
    width: 50rem;
    height: 30rem;
  }

  #map {
    margin-top: 0;
    border: 0;
    width: 25%;
    min-width: 20rem;
    height: 100%;
  }
}