/* Fonts are loaded in the HTML head for better performance */

* {
  padding: 0;
  margin: 0;
  font-family: 'Noto Sans TC', sans-serif;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  overflow: hidden;
  background: #0a192f;
}

nav {
  width: 100%;
  /* height: 10vh; */
  position: fixed;
  top: 0;
  left: 0;
  background-color: #112240;
  z-index: 1;
}

.nav-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 10%;
}

.nav-container a {
  color: #ccd6f6;
  text-decoration: none;
}

.nav-container a:hover {
  scale: 1.3;
  /* border-color: #64ffda; */
  color: #64ffda;
  /* box-shadow: 0 0 20px #64ffda; */
}

.logo {
  color: #ccd6f6;
  font-size: 2.5rem;
  font-weight: bolder;
  /* text-shadow: 0 0 10px  #ccd6f6; */
}

.logo span {
  font-size: 14px;
  color: #ccd6f6;
  text-shadow: 0 0 10px #ccd6f6;
}

.nav-container .link-icons {
  display: flex;
  /* gap: 3rem; */
  align-items: center;
}

.link-icons a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0.2rem solid #a8b2d1;
  color: #a8b2d1;
  text-decoration: none;
  margin-left: 15px;
  font-size: 1.2em;
  transition: border-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.link-icons a:hover {
  border-color: #64ffda;
  color: #64ffda;
  box-shadow: 0 0 20px #64ffda;
}

#main {
  margin: 12rem auto;
  /* padding: 3rem 0; */
  width: 80%;
  min-height: 100vh;
  background-color: #112240;
  border-bottom: 2px solid #64ffda;
  border-top-left-radius: 600px;
  border-top-right-radius: 30px;
  border-bottom-right-radius: 600px;
  border-bottom-left-radius: 30px;
}

.main-container {
  padding: 3rem 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: 20px;
}

.main-container .image {
  z-index: 0;
  width: 50%;
  text-align: right;
}

.main-container .image img {
  max-width: 100%;
}

.main-container .content {
  width: 50%;
  padding: 50px;
}

.content h1 {
  font-size: 3rem;
  /* font-size: clamp(1rem, 2rem + 5vw, 3rem); */
}

.content h1 span {
  color: #f36e4c;
  text-shadow: 0 0 10px #f36e4c;
}

.content .typewriter {
  font-weight: 500;
  font-size: 2rem;
  /* font-size: clamp(1rem, 1rem + 5vw, 2rem); */
  min-height: 3rem;
  display: flex;
  align-items: center;
}

.typewriter span {
  color: #64ffda;
  font-size: 2rem;
  text-shadow: 0 0 5px #64ffda;
  position: relative;
}

.typewriter span::after {
  content: '';
  position: absolute;
  right: -8px;
  width: 3px;
  height: 100%;
  background-color: #f36e4c;
  animation: cursor 0.8s infinite;
}

@keyframes cursor {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}


.content p {
  font-size: 1rem;
  /* font-size: clamp(0.4rem, 0.2rem + 9vw, 1rem); */
  margin: 10px 0;
  color: #a8b2d1;
}

.social-links i {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 3rem;
  height: 3rem;
  background-color: transparent;
  border: 0.2rem solid #a8b2d1;
  border-radius: 50%;
  color: #a8b2d1;
  margin: 5px 10px;
  font-size: 1.5rem;
  transition: 0.2s linear;
}

.social-links i:hover {
  scale: 1.3;
  /* filter: drop-shadow(0 0 10px rgb(109,67,0)); */
  border-color: #64ffda;
  color: #64ffda;
  box-shadow: 0 0 20px #64ffda;
}

.content button {
  width: 40%;
  height: 6vh;
  margin: 30px 0;
  background-color: #f36e4c;
  color: #0a192f;
  border: none;
  outline: none;
  font-size: 100%;
  font-weight: 700;
  border-radius: 5px;
  transition: 0.2s linear;
}

.content button:hover {
  scale: 1.1;
  color: white;
  border: 2px solid #f36e4c;
  background-color: transparent;
  font-weight: 700;
  box-shadow: 0 0 40px rgb(109, 67, 0);
}

.content button a {
  color: #0a192f;
  text-decoration: none;
}

.content button:hover a {
  color: white;
}

#services h1,
#contact h1 {
  padding: 15vh 0 5vh;
  text-align: center;
  color: white;
}

.service-container {
  margin: 0 auto 10vh;
  width: 80%;
  height: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 20px;
}

.card {
  background-color: #112240;
  border-radius: 10px;
  padding: 25px;
  /* width: 300px; */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  border: 1px solid transparent;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
  border-color: #64ffda;
}

.icon {
  font-size: 2em;
  color: #64ffda;
  margin-bottom: 15px;
}

.card-title {
  font-size: 1.5em;
  margin-bottom: 10px;
  color: #ccd6f6;
}

.card-description {
  font-size: 0.9em;
  line-height: 1.6;
  color: #a8b2d1;
  margin-bottom: 20px;
}

.learn-more-btn {
  margin-bottom: 20px;
  background-color: transparent;
  color: #64ffda;
  border: 1px solid #64ffda;
  border-radius: 5px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

.learn-more-btn:hover {
  background-color: rgba(100, 255, 218, 0.1);
  color: #64ffda;
}

.contact-container {
  margin: 0 auto;
  display: flex;
  background-color: #0a192f;
  /* padding: 25px; */
  width: 80%;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #112240;
  padding: 80px;
}

.contact-info h2 {
  font-size: 2.5em;
  margin-top: 0;
  color: #ccd6f6;
  margin-bottom: 10px;
}

.contact-info h2 span {
  color: #64ffda;
}

.contact-info p {
  line-height: 1.6;
  color: #a8b2d1;
  margin-bottom: 20px;
}

.contact-details {
  margin-bottom: 20px;
}

.contact-details a {
  display: block;
  color: #a8b2d1;
  text-decoration: none;
  margin-bottom: 10px;
  font-size: 1.1em;
  transition: color 0.3s;
}

.contact-details a:hover {
  color: #64ffda;
}

/* 社群媒體圖標 */
.social-icons a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0.2rem solid #a8b2d1;
  color: #a8b2d1;
  text-decoration: none;
  margin-right: 15px;
  font-size: 1.2em;
  transition: border-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.social-icons a:hover {
  border-color: #64ffda;
  color: #64ffda;
  box-shadow: 0 0 20px #64ffda;
}

.contact-form {
  flex: 1;
  background-color: #112240;
  padding: 80px;
}

.contact-form form {
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #a8b2d1;
  border-radius: 5px;
  background-color: transparent;
  /* background-color: #112240; */
  color: #ccd6f6;
  font-size: 1em;
  box-sizing: border-box;
  /* 確保 padding 不會影響寬度 */
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #64ffda;
  box-shadow: 0 0 5px #64ffda;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #a8b2d1;
  opacity: 0.7;
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.submit-btn {
  background-color: transparent;
  color: #64ffda;
  border: 1px solid #64ffda;
  padding: 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  transition: box-shadow 0.3s;
  text-shadow: 0 0 5px rgba(100, 255, 218, 0.5);
  box-shadow: 0 0 10px rgba(100, 255, 218, 0.5);
}

.submit-btn:hover {
  box-shadow: 0 0 20px #64ffda, 0 0 10px #64ffda;
}

/* 表單提示訊息 */
.form-message {
  display: flex;
  /* text-align: center; */
  margin-top: 10px;
  padding: 10px;
  border-radius: 5px;
  font-weight: bold;
  /* display: none;  */
  color: #ccd6f6;
}

.form-message.success {
  color: #38a169;
  background-color: #d1f7e3;
}

.form-message.error {
  color: #e53e3e;
  background-color: #fee2e2;
}

#scroll-up {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  animation: scrollup 2s ease-in-out;
}

#scroll-up i {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 3rem;
  height: 3rem;
  background-color: transparent;
  border: 0.2rem solid #a8b2d1;
  border-radius: 50%;
  color: #a8b2d1;
  /* margin: 5px 10px; */
  font-size: 1.5rem;
  transition: 0.2s linear;
}

@keyframes scrollup {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

#scroll-up i:hover {
  scale: 1.3;
  /* filter: drop-shadow(0 0 10px rgb(109,67,0)); */
  border-color: #64ffda;
  color: #64ffda;
  box-shadow: 0 0 20px #64ffda;
  cursor: pointer;
}

.footer {
  margin-top: 3rem;
  background-color: #112240;
  color: #546b92;
  /* color:#a8b2d1; */
  text-align: center;
  font-size: 9px !important;
  padding: 10px 0;
}

.loader-email {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin-right: 10px;
  /* 與文字保持間距 */
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 991px) {
  .nav-container {
    padding: 10px;
  }

  .link-icons a {
    margin-left: 10px;
  }

  #main {
    margin: 8rem auto;
    padding: 0;
    width: 90%;
    /* min-height: 100vh; */
    /* background-color: #112240; */
    /* border-bottom: 2px solid #64ffda; */
    /* border-top-left-radius: 600px;
  border-top-right-radius: 30px;
  border-bottom-right-radius: 600px;
  border-bottom-left-radius: 30px; */
  }

  .main-container {
    padding: 0 10px;
    flex-direction: column;
    gap: 50px;
  }

  .main-container .image {
    z-index: 0;
    width: 80%;
  }

  .main-container .image img {
    max-width: 100%;
  }

  .main-container .content {
    width: 100%;
    padding: 0px;
  }

  #main,
  .service-container {
    width: 90%;
  }

  .card {
    padding: 10px;
  }

  .contact-container {
    width: 90%;
    flex-direction: column;
    background-color: #0a192f;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    gap: 20px;
  }

  .contact-info,
  .contact-form {
    padding: 50px 10px;
  }

  .contact-info h2,
  .contact-form h2 {
    font-size: 2em;
  }
}