/* hero to footer is in a container (navbar is not) */
/* SHARED STYLES */
.container {
  max-width: 1400px;
  margin: 0 auto;
  /* center */
}

section {
  scroll-margin-top: 10px;
  padding: 60px 20px;
}

body {
  background: rgba(157, 130, 229, 0.6);
}

/* CTA BUTTON STYLES */
.cta-button {
  font-weight: 700;
  font-size: 14px;
  color: #5b42c2;
  padding: 16px 32px;
  margin-top: 32px;
  display: inline-block;
  margin: 0 auto;
  line-height: 1.5;
  text-align: center;
  letter-spacing: 3px;
  text-transform: uppercase;
  background: white;
  text-decoration: none;
  border: 2px solid #5b42c2;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.cta-button:hover {
  background-color: #5b42c2;
  color: white;
}

.cta-button {
  padding: 12px 24px;
  font-size: 13px;
}

header {
  background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)),
    url("../images/dog-training-hopkinton-ma-hero.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  /* fill screen */
  color: white;
  text-align: center;
  padding: 200px 0;
}

header h1 {
  font-weight: 700;
  font-size: 82px;
  line-height: 1;
  margin: 50px 5px;
}

header h2 {
  font-weight: 400;
  font-size: 30px;
  line-height: 1.5;
  margin: 0px 60px;
}

header h3 {
  font-weight: 900;
  font-size: 24px;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 5px;
  margin: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

html {
  scroll-padding-top: 100px;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", Times, serif;
}

.signature {
  font-family: "Brush Script MT", cursive, "Segoe Script", "Lucida Handwriting",
    "Comic Sans MS", cursive;
  font-style: italic;
  font-size: 28px;
  margin-top: 20px;
  color: #5b42c2;
}

/* NAVBAR STYLES */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(157, 130, 229, 0.6);
  /* #635589 logo purple */
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
}

/* Logo styles */
.logo img {
  height: 80px;
  width: auto;
}

/* Navigation menu */
.navbar ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

/* Individual nav links */
.navbar ul li a {
  text-decoration: none;
  color: #f0f0f0;
  font-size: 18px;
  font-weight: 500;
  padding: 8px 12px;
  transition: color 0.3s ease, background-color 0.3s ease;
  border-radius: 6px;
}

.navbar ul li a:hover {
  color: #5b42c2;
  /* color upon hover */
  background-color: rgba(255, 255, 255, 0.8);
}

/* FADE-IN ANIMATION */
.section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* When section is visible */
.section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ABOUT US STYLES */
#about {
  background-color: white;
  color: black;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.about-grid img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* SERVICES STYLES */
#services {
  background-color: rgba(157, 130, 229, 0.15);
  /* light purple */
  color: black;
}

#services .cta-button {
  display: block;
  margin: 30px auto 0 auto;
  text-align: center;
  max-width: max-content;
}

#services ul {
  list-style: disc inside;
  margin-bottom: 20px;
}

/* MEET EMILY STYLES */
#meet-emily {
  background-color: white;
  color: black;
}

.meet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.meet-grid img {
  max-width: 400px;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* ABOUT AND MEET PHOTO AND TEXT GRID STYLES */
/* Normal layout (desktop) */
.about-grid,
.meet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  max-width: 1200px;
  margin: 40px auto 0 auto;
}

.about-img {
  max-width: 450px;
  width: 100%;
  margin: 0 auto;
}

.about-img img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Images */
.meet-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 8px;
  box-shadow: none;
}

/* Text */
.about-text,
.meet-text {
  font-size: 18px;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

.meet-text {
  text-align: center;
}

/* INSTAGRAM */
#instagram {
  background-color: rgba(157, 130, 229, 0.07);
  /* soft lavender */
  padding: 60px 20px;
}

/* New for IG mobile & desktop differences to improve mobile loading speed */

/* DESKTOP vs MOBILE INSTAGRAM VISIBILITY */
.instagram-desktop {
  display: block;
}

.instagram-mobile {
  display: none;
}

/* On small screens: hide embeds, show simple image */
@media (max-width: 768px) {
  .instagram-desktop {
    display: none;
  }

  .instagram-mobile {
    display: block;
    margin-top: 20px;
    text-align: center;
  }

  .instagram-preview-image {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
  }
}

/* End of new IG */

.instagram-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  /* responsive */
  gap: 20px;
  justify-items: center;
}

.instagram-media {
  max-width: 100%;
  width: 100px;
}

.social-highlight {
  color: #5b42c2;
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.social-highlight:hover {
  color: #47329b; /* Slightly darker purple on hover */
  text-shadow: 0 0 6px rgba(91, 66, 194, 0.3);
}

/* CONTACT STYLES */
#contact {
  background-color: white;
  color: black;
}

#contact h2 {
  text-align: center;
  margin-bottom: 20px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
  align-items: start;
}

form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 5px;
}

#form-message {
  margin-top: 10px;
  font-weight: bold;
}

/* Hide contact form labels visually but keep on screen readers for accessibility standards */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/*  SHOW/HIDE FORM LOCATION BASED ON SCREEN SIZE */

/* If you'd like, you can fill out the form ON THE RIGHT- large screen */
.desktop-only {
  display: inline;
}

/* If you'd like, you can fill out the form BELOW- small screen */
.mobile-only {
  display: none;
}

.cta-button {
  display: inline-block;
  margin: 30px auto 0 auto;
  text-align: center;
  max-width: max-content;
}

form input,
form textarea,
form button {
  padding: 10px;
  font-size: 16px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

form button {
  background-color: #5b42c2;
  color: white;
  border: none;
  cursor: pointer;
}

form button:hover {
  background-color: #47329b;
}

/* Arrange inputs in two columns when enough space */
.form-row {
  display: flex;
  gap: 10px;
}

/* Ensure inputs fill half the row */
.form-row input {
  flex: 1;
}

.contact-preference {
  display: flex;
  gap: 20px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.contact-preference label {
  font-size: 16px;
}

/* Review CTA: center + remove blue underline */
.review-cta {
  margin-top: 16px;
  text-align: center;
  line-height: 1.6;
  /* span both columns when the grid has 2 cols */
  grid-column: 1 / -1;
}

.review-link {
  text-decoration: none; /* no default blue underline */
  color: #5b42c2; /* match your brand purple */
  font-weight: 600;
  border-bottom: 2px solid transparent;
}
.review-link:hover,
.review-link:focus {
  border-bottom-color: currentColor; /* subtle underline on hover */
}

/* Make the stars line up nicely */
.review-cta [aria-hidden="true"] {
  margin: 0 6px;
}

/* MAP EMBED */
.map-container {
  width: 100%;
  height: 300px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 10px;
}

/* FOOTER STYLES */
footer {
  color: white;
  background: linear-gradient(
    180deg,
    rgba(157, 130, 229, 0.7) 0%,
    rgba(99, 85, 137, 0.4) 100%
  );
  text-align: center;
  padding: 40px 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  align-items: center;
  justify-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-left p {
  margin: 5px 0;
  font-size: 18px;
}

/* Divider between business info and contact/social */
.footer-business {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.footer-column p:first-child {
  font-size: 20px;
  margin: 5px 0;
  font-weight: 600;
}

.footer-column p:nth-child(2) {
  font-size: 18px;
  margin: 5px 0 20px 0;
}

.footer-contact,
.footer-social {
  margin-top: 20px;
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
}

.footer-contact span,
.footer-social span {
  font-weight: 600;
  margin-right: 10px;
  font-size: 18px;
}

.footer-contact a i,
.footer-social a i {
  font-size: 32px;
  color: white;
  transition: color 0.3s ease, transform 0.3s ease, text-shadow 0.3s ease;
}

.footer-contact a i:hover,
.footer-social a i:hover {
  color: #5b42c2;
  text-shadow: 0 0 8px rgba(91, 66, 194, 0.8);
  transform: scale(1.2);
}

.footer-logo {
  margin-bottom: 5px;
  max-width: 250px;
  height: auto;
  opacity: 0.8;
}

/* Footer credits (Logo by / Website by) */
.footer-credits {
  font-size: 11px;
  margin-top: 15px;
  line-height: 1.6;
}

.footer-credits a {
  color: white;
  text-decoration: underline;
}

.footer-credits a:hover {
  color: #5b42c2;
  text-decoration: underline; /* Keep underline for credits */
}

/* Google Review section */
.footer-review {
  margin-top: 15px;
}

.footer-review .review-link {
  color: white;
  font-weight: bold;
  text-decoration: none;
}

/* Make review link purple on hover without underline */
.footer-review a.review-link:hover {
  color: #5b42c2;
  text-decoration: none !important;
}

/* Scroll to Top Button */
#scrollToTopBtn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  background-color: rgba(91, 66, 194, 0.8);
  /* Match your site purple */
  color: white;
  border: none;
  border-radius: 50%;
  padding: 12px 16px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: none;
  /* Hidden by default */
  transition: background-color 0.3s ease;
}

#scrollToTopBtn:hover {
  background-color: rgba(91, 66, 194, 1);
}

/* RESPONSIVE styles for smaller screens */
/* @MEDIA- SHARED STYLES */
@media (max-width: 900px) {
  header {
    padding: 100px 0;
  }

  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: inline;
  }

  .cta-button {
    display: inline-block;
    margin: 30px auto 0 auto;
    text-align: center;
    max-width: max-content;
  }

  section {
    scroll-margin-top: 30px;
  }

  header h1 {
    font-size: 42px;
  }

  header h2 {
    font-size: 20px;
  }

  header h3 {
    font-size: 12px;
  }

  .signature {
    font-size: 21px;
  }

  /* @MEDIA- NAVBAR STYLES */

  .navbar {
    flex-direction: column;
    /* stack logo and menu vertically if needed */
    align-items: center;
  }

  .navbar ul {
    flex-direction: column;
    /* make links stack vertically */
    gap: 10px;
    /* smaller gap for mobile */
    margin-top: 10px;
  }

  .navbar ul li a {
    font-size: 13px;
    /* slightly smaller text on mobile */
    padding: 4px 8px;
    color: black;
  }

  .logo img {
    height: 50px;
    /* slightly smaller logo for mobile */
    width: auto;
  }

  /* @MEDIA- BODY SECTIONS */
  .about-grid,
  .meet-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .map-container {
    height: 250px;
  }

  /* @MEDIA- ABOUT AND MEET PHOTO AND TEXT GRID STYLES */
  .about-grid {
    display: flex;
    flex-direction: column-reverse;
    text-align: center;
  }

  .about-img {
    max-width: 300px;
    /* smaller image on mobile */
    width: 100%;
    height: auto;
    border-radius: 10px;
  }

  .meet-grid img {
    max-width: 250px;
  }

  .meet-grid {
    display: flex;
    flex-direction: column;
    /* stack vertically */
    text-align: center;
  }

  .about-text,
  .meet-text {
    text-align: left;
  }

  /* TRICK: Flip order for About Us (show text first) */
  .about-grid {
    flex-direction: column-reverse;
    /* put text BEFORE image */
  }

  /* @MEDIA- INSTAGRAM SECTION */
  .instagram-grid {
    grid-template-columns: 1fr;
    /* stack vertically on small screens */
  }

  .instagram-media {
    margin-bottom: 20px;
  }

  /* @MEDIA - CONTACT SECTION */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  form {
    padding: 0 10px;
  }

  .form-row {
    flex-direction: column;
  }

  /* @MEDIA- FOOTER STYLES */

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-left p {
    font-size: 15px;
    /* shrink business info on mobile */
  }

  .footer-contact span,
  .footer-social span {
    font-size: 16px;
    /* also shrink "Contact:" and "Connect:" a little */
  }

  .footer-contact a i,
  .footer-social a i {
    font-size: 28px;
    /* icons still big enough for finger tapping */
  }

  .footer-contact,
  .footer-social {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .footer-logo {
    max-width: 200px;
  }

  .footer-credits {
    font-size: 10px;
  }

  /* @MEDIA- SCROLL TO TOP BUTTON */
  #scrollToTopBtn {
    padding: 8px 10px;
    font-size: 18px;
  }
}
