:root {
  --primary-color: #00bfa5;
  --sub-color: #00bfa5;
}

/* Regular 400 */
@font-face {
  font-family: "Noto Sans TC";
  src: url("/assets/fonts/NotoSansTC-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ExtraBold 800 */
@font-face {
  font-family: "Noto Sans TC";
  src: url("/assets/fonts/NotoSansTC-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
}

/* Loading */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-spinner {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #00ba89;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.swal2-confirm.custom-ok-btn {
  background-color: #00b889 !important;
  color: white !important;
  border: none;
}

/* Layout */
.container {
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 999;
  width: 90%;
  max-width: 1200px;
}

section {
  padding: 3rem 0;
  position: relative;
  color: #fff;
  min-height: 720px;
  width: 100%;
  overflow: hidden;
}

.section-title {
  font-size: 3rem;
  font-weight: bold;
  line-height: 1.4;
  letter-spacing: 3px;
  padding: 10px;
}
img {
  max-width: 100%;
}

#main {
  overflow: hidden;
}

p {
  text-align: start;
  font-size: 1.2rem;
}
@media (max-width: 425px) {
  section {
    padding: 2rem 0;
  }
  .section-title {
    font-size: 2rem;
  }
  p {
    font-size: 1rem;
  }
}

.btn-block {
  display: flex;
  justify-content: center;
  align-items: center;
}

.home {
  padding: 150px 0;
  .container {
    gap: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
  }
  .content-left {
    padding-top: 4rem;
    position: relative;
    z-index: 4;
  }

  .banner-phone {
    max-width: 120%;
    max-height: 560px;
  }

  .banner-shape {
    max-width: 200%;
    width: 140%;
    position: absolute;
    left: -25%;
    right: 0;
    top: 20rem;
    z-index: 3;
  }

  p {
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: justify;
    font-size: 1.4rem;
    line-height: 3rem;
  }
  @media (max-width: 768px) {
    .container {
      flex-direction: column-reverse;
    }
    .content-left {
      padding-top: 0;
      width: 90%;
    }
  }
  @media (max-width: 425px) {
    .banner-shape {
      top: 16rem;
    }
  }
}

/* 添加半透明白色蒙版 */
.home::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 56%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0)
  );
  /*左白右透明*/
  z-index: 1;
}
/* buildings */
.buildings {
  .section-title {
    text-align: center;
  }
  .building-list {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    margin-bottom: 3rem;
    img {
      width: 100%;
    }
  }
  .p_in_lg {
    display: inline-block;
  }
  .p_in_mb {
    display: none;
  }
  p {
    width: 70%;
    margin: 1rem auto;
  }
  .btn-block {
    display: block;
  }
  @media (max-width: 786px) {
    .section-title {
      text-align: start;
    }
    p {
      width: 100%;
    }
    .p_in_lg {
      display: none;
    }
    .p_in_mb {
      text-align: start;
      display: inline-block;
    }
    .btn-block {
      display: flex;
    }
    .building-list {
      grid-template-columns: 1fr 1fr;
    }
  }
  @media (max-width: 786px) {
  }
}

/* homeowner */
.homeowner {
  background: #00262a;
  .section-title {
    text-align: center;
  }
  .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .homeowner-left {
    .btn-block {
      display: flex;
    }
  }
  .homeowner_img {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .homeowner-list {
    display: grid;
    grid-template-columns: 20% 80%;
    gap: 1rem;
    margin-left: 3rem;
    img {
      height: 70%;
    }
  }
  .list-cards {
    display: flex;
    flex-direction: column;
    gap: 7rem;
  }
  .apply-btn {
    width: 40%;
  }
  @media (max-width: 980px) {
    .list-cards {
      gap: 3rem;
    }
  }
  @media (max-width: 786px) {
    .container {
      grid-template-columns: 1fr;
      gap: 5rem;
    }
    .btn-block {
      margin-top: 3rem;
    }
    .section-title {
      text-align: center;
    }
    .homeowner-list {
      margin-left: 0;
      img {
        margin-top: 1rem;
      }
    }
    .homeowner_img {
      align-items: start;
    }
    .list-cards {
      gap: 6rem;
    }
    .homeowner-left {
      .btn-block {
        display: none;
      }
    }
  }

  @media (max-width: 500px) {
    .list-cards {
      gap: 3rem;
      bottom: 15%;
    }
  }
  @media (max-width: 430px) {
    p {
      font-size: 1rem;
    }
    .list-cards {
      gap: 1rem;
      bottom: 15%;
    }
  }
  @media (max-width: 320px) {
    .list-cards {
      bottom: 3%;
    }
    .homeowner-list {
      height: 135%;
    }
    .homeowner_img {
      align-items: start;
      margin-top: 2rem;
      img {
        height: 60%;
      }
    }
  }
}
/* loop */
.loop {
  .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
  .img_block {
    img {
      width: 50%;
    }
  }
  .loop-right {
    margin-top: 6rem;
  }
  p {
    margin-top: 5rem;
  }
  @media (max-width: 786px) {
    .section-title {
      text-align: center;
    }
    .container {
      grid-template-columns: 1fr;
    }
    .img_block {
      margin-top: 6rem;
      img {
        margin-left: 0;
      }
    }
    .loop-left {
      p {
        position: absolute;
        bottom: 35%;
        width: 90%;
      }
    }
  }
  @media (max-width: 440px) {
    .loop-left {
      p {
        bottom: 31%;
      }
    }
  }
  @media (max-width: 425px) {
    .loop-left {
      p {
        bottom: 23%;
      }
    }
    .img_block {
      margin-top: 9rem;
      margin-bottom: -12rem;
      img {
        width: 65%;
        margin-left: 0;
        margin-bottom: 1rem;
      }
    }
  }
  @media (max-width: 320px) {
    padding-bottom: 4rem;
    .loop-left {
      p {
        bottom: 17%;
      }
    }
  }
}
/* private */
.private {
  background: #00262a;
  .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .private-shape {
    max-width: 150%;
    position: absolute;
    right: -20%;
    bottom: 0;
    opacity: 0.6;
  }
  .private-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    p {
      width: 70%;
      padding-left: 10px;
    }
  }
  @media (max-width: 768px) {
    .container {
      display: flex;
      flex-direction: column-reverse;
    }
    .private-right {
      p {
        width: 90%;
        padding-left: 0;
      }
    }

    .private-left {
      margin-bottom: 10rem;
    }
    .private-shape {
      bottom: 10rem;
    }
    p {
      position: absolute;
      bottom: -10px;
    }
  }
}

/* 表單 */
#apply {
  .title-block {
    text-align: center;
    p {
      text-align: center;
    }
  }
  .form-card {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 30px;
    padding: 50px;
    box-shadow: 0 0 60px rgba(0, 255, 136, 0.3),
      inset 0 0 60px rgba(0, 255, 136, 0.1);
    border: 2px solid rgba(0, 255, 136, 0.3);
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .apply_img {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .form-card::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
      45deg,
      transparent,
      rgba(0, 255, 136, 0.5),
      transparent
    );
    border-radius: 30px;
    z-index: -1;
    animation: borderGlow 3s linear infinite;
  }

  @keyframes borderGlow {
    0%,
    100% {
      opacity: 0.5;
    }
    50% {
      opacity: 1;
    }
  }

  .form-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    align-items: center;
  }

  .robot-image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.4);
    background: linear-gradient(
      135deg,
      rgba(0, 100, 200, 0.3),
      rgba(0, 50, 100, 0.3)
    );
  }

  .form-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .field {
    position: relative;
    display: flex;
    width: 100%;
    align-items: center;
    margin: 1rem;
  }

  .field-label {
    display: block;
    color: #00ff88;
    font-weight: 500;
    width: 9rem;
    text-align: right;
  }

  .input-wrapper,
  select,
  .radio-group,
  .captcha-group {
    width: 90%;
    margin-left: 20px;
  }

  .form-control,
  .form-select {
    padding: 10px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 50px;
    transition: all 0.3s ease;
  }

  .form-control:focus,
  .form-select:focus {
    border-color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    background: #fff;
  }

  .form-control::placeholder {
    color: #999;
  }

  .required {
    color: #ff0044;
  }

  .radio-group {
    display: flex;
    gap: 30px;
  }

  .radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1rem;
    color: #fff;
  }

  .radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #00ff88;
  }

  .captcha-group {
    display: flex;
    gap: 15px;
    align-items: center;
  }

  .captcha-group .form-control {
    flex: 1;
  }

  .captcha-display {
    width: 40%;
    height: 50px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(0, 255, 136, 0.3);
    transition: all 0.3s ease;
  }

  .captcha-display img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .btn-field {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
  }
  @media (max-width: 980px) {
    .form-card {
      margin: 1rem auto;
      display: block;
    }
    .captcha-display {
      width: 20%;
    }
  }

  @media (max-width: 768px) {
    .input-wrapper,
    select,
    .radio-group,
    .captcha-group {
      width: 60%;
    }
    .field-label {
      width: 8rem;
    }
    .field-group {
      grid-template-columns: 1fr;
    }
  }
  @media (max-width: 660px) {
    .form-card {
      margin: 1rem auto;
      padding: 10px;
    }
    .field-label {
      width: 7rem;
    }
    .captcha-group {
      flex-direction: column-reverse;
      align-items: start;
    }
    .captcha-display {
      width: auto;
    }
  }

  @media (max-width: 425px) {
    .field {
      margin: 0;
      padding: 0.5rem;
    }
  }

  @media (max-width: 440px) {
    .form-card {
      padding: 1rem;
    }
    .field {
      display: block;
    }
    .field-label {
      text-align: left;
      margin-bottom: 10px;
    }
    .input-wrapper,
    select,
    .radio-group,
    .captcha-group {
      width: 90%;
      margin: 0 auto;
    }
  }
}
