* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  background-image: url("/images/servicebg.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

h1 {
  text-align: center;
  font-size: 36px;
  color: #00947a;
  margin-top: 100px;
  opacity: 0;
  animation: fadeIn 1s ease-in-out forwards;
  animation-delay: 0s;
}

/* Main */
main {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

main.loaded {
  opacity: 1;
}

/* Text Section */
.text {
  font-weight: bold;
  text-align: center;
  font-size: 18px;
  margin-top: 80px;
  padding: 20px;
  border: 1px solid #00947a;
  margin-left: auto;
  margin-right: auto;
  width: 78%;
  color: #00947a;
  opacity: 0;
  transform: translateX(30px);
  animation: slideUp 1s ease-in-out forwards;
  animation-delay: 0.5s;
}

/* Image Container */
.image-container {
  display: flex;
  justify-content: center;
  margin: 120px auto;
  gap: 80px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeIn 1s ease-in-out forwards;
  animation-delay: 1s;
}

/* Service Title */
.service-title {
  font-size: 20px;
  margin-bottom: 7px;
  text-align: center;
  color: #00947a;
  opacity: 0;
  animation: fadeIn 1s ease-in-out forwards;
  animation-delay: 1.5s;
}

/* Service Image */
.service-image {
  width: 100%;
  max-width: 320px;
  height: auto;
  border: 2px solid #dfdfdf;
  box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
  object-fit: cover;
  opacity: 0;
  transform: translateX(30px);
  animation: fadeIn 1.5s ease-in-out forwards;
  animation-delay: 2s;
}

/* Hover Effect */
.service-image:hover {
  transform: scale(1.05);
  border-color: #007ba0;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
}

/* Fade In Keyframes */
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Slide Up Animation */
@keyframes slideUp {
  0% {
    opacity: 0;
    transform: translateX(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Styles */
@media (max-width: 768px) {
  h1 {
    font-size: 28px;
    margin-top: 80px;
  }

  .text {
    font-size: 16px;
    width: 90%;
    margin-top: 50px;
    padding: 15px;
  }

  .image-container {
    gap: 20px;
    margin: 50px auto;
    flex-direction: column;
  }

  .service-title {
    font-size: 18px;
  }

  .service-image {
    max-width: 80%;
    margin: 0 auto;
  }
}
