/* ==========================================================================
   Variables & Reset (Ref: Songjiang Standards)
   ========================================================================== */
:root {
  /* Colors - 富來青川 Branding */
  --color-primary: #A5BEE2;
  /* 富來青川 主色 (粉藍/淡青) */
  --color-primary-hover: #8CAED9;
  --color-secondary: #003668;
  /* 富來青川 輔助色 (深藍) */
  --color-text-main: #333333;
  --color-text-light: #666666;
  --color-bg-light: #f5f5f5;
  --color-white: #ffffff;
  --color-border: #dddddd;
  --color-error: #e74c3c;

  /* Typography */
  --font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --font-family-serif: "Noto Serif TC", serif;
  --font-family-accent: "Rochester", cursive;

  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 20px;
  --spacing-xl: 40px;

  /* Transition */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-premium: 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--color-text-main);
  line-height: 1.6;
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a,
button,
input,
select,
textarea {
  transition: var(--transition-fast);
  color: inherit;
  text-decoration: none;
  outline: none;
}

ul {
  list-style: none;
}

/* Hide reCAPTCHA badge */
.grecaptcha-badge {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* ==========================================================================
   Utility Classes & Animations
   ========================================================================== */
.reveal {
  opacity: 0;
  transition: opacity var(--transition-premium), transform var(--transition-premium);
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.reveal-up {
  transform: translateY(40px);
}

.reveal.active {
  opacity: 1;
  transform: translate(0, 0);
}

.delay-100 {
  transition-delay: 0.1s;
}

.delay-200 {
  transition-delay: 0.2s;
}

/* ==========================================================================
   Main Components
   ========================================================================== */

/* --- Layout --- */
.main-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* --- Hero (KV) --- */
.hero {
  position: relative;
  width: 70%;
  height: 100vh;
  height: 100svh; /* 使用 svh 預防抖動 */
  height: calc(var(--vh, 1vh) * 100);
  background: url("../assets/images/00-00_bg_pc.jpg") no-repeat left center;
  background-size: cover;
  overflow: hidden;
}

@media screen and (min-width: 1025px) {
  .hero {
    position: sticky;
    top: 0;
    height: 100vh;
  }
}



.hero__layout {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
}



.hero__content {
  position: absolute;
  top: 23.15%; /* 250px / 1080px = 23.148% (按照 1920x1080 規格換算) */
  left: 50%;
  transform: translateX(-50%);
  width: 26rem;
  max-width: 85%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__logo {
  display: block; /* 顯示主視覺 Logo */
  width: 100%;
  max-width: 520px;
  margin-bottom: 2.5rem;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

.hero__slogan {
  display: none; /* 隱藏 Slogan 資訊 */
  width: 100%;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

/* --- Scroll Hint --- */
.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 10;
  opacity: 0;
  transform: translateY(40px);
  transition: all var(--transition-premium);
}

.scroll-hint.active {
  opacity: 0.8;
  transform: translateY(0);
}

.scroll-hint__mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--color-white);
  border-radius: 12px;
  position: relative;
}

.scroll-hint__wheel {
  width: 2px;
  height: 6px;
  background-color: var(--color-white);
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
  animation: scrollWheel 2s infinite;
}

.scroll-hint__arrows {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scroll-hint__arrows span {
  display: block;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--color-white);
  border-bottom: 2px solid var(--color-white);
  transform: rotate(45deg);
  margin-top: -4px;
  animation: scrollArrow 2s infinite;
}

.scroll-hint__arrows span:nth-child(2) {
  animation-delay: 0.2s;
}

@keyframes scrollWheel {
  0% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 15px); }
}

@keyframes scrollArrow {
  0% { opacity: 0; transform: rotate(45deg) translate(-5px, -5px); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: rotate(45deg) translate(5px, 5px); }
}

@media screen and (min-width: 1025px) {
  .scroll-hint {
    display: none; /* 在桌面版隱藏，如需要可開啟 */
  }
}

/* --- Form Section --- */
.form-section {
  width: 30%;
  min-height: 100vh;
  background-color: #003668;
  color: var(--color-white);
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.form-section__container {
  width: 100%;
  max-width: 380px;
}

.form-section__title {
  font-family: var(--font-family-serif);
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  color: var(--color-white);
  letter-spacing: 4px;
  text-align: center;
}

.form-section__slogan-img {
  max-width: 75%; /* 從 60% 增加 */
  margin-left: auto;
  margin-right: auto;
  display: block;
}



/* --- Form Elements --- */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  flex: 1;
}

.form__label {
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 1px;
}

.form__row {
  display: flex;
  gap: var(--spacing-md);
}

.form__row-inner {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.form__input,
.form__select {
  width: 100%;
  height: 40px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0;
  color: var(--color-white);
  font-family: inherit;
  font-size: 16px;
  line-height: 40px;
  transition: border-color var(--transition-fast);
  display: block;
  border-radius: 0;
}

.form__input::placeholder {
  color: #ffffff;
  opacity: 1;
}

.form__input::-webkit-input-placeholder {
  color: #ffffff;
  opacity: 1;
}

.form__input::-moz-placeholder {
  color: #ffffff;
  opacity: 1;
}

.form__input:-ms-input-placeholder {
  color: #ffffff;
  opacity: 1;
}

.form__select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.form__select-container {
  position: relative;
}

.form__select-container::after {
  content: "▼";
  font-size: 10px;
  color: var(--color-primary);
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.form__input:focus,
.form__select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form__select option {
  background-color: var(--color-secondary);
  color: var(--color-white);
}

.form__radio-group {
  display: flex;
  gap: 16px;
  white-space: nowrap;
  height: 40px;
  align-items: center;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  cursor: pointer;
}

.radio-label input {
  accent-color: var(--color-primary);
}

.form__checkbox-group {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.form__checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.form__label--small {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

.form__link {
  color: var(--color-primary);
  text-decoration: underline;
}

.form__submit {
  width: 100%;
  background-color: var(--color-primary);
  color: var(--color-secondary);
  border: none;
  padding: 14px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-normal);
  margin-top: 10px;
}

.form__submit:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-2px);
}

.form__note {
  text-align: center;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 15px;
}

.form-section__footer {
  width: 100%;
  text-align: center;
  font-size: 15px; /* 放大文字 */
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 60px; /* 行動版與表單的間距 */
  letter-spacing: 2px;
  font-weight: 300;
}

@media screen and (min-width: 1025px) {
  .form-section__footer {
    position: absolute;
    bottom: 30px;
    left: 0;
    margin-top: 0;
  }
}

/* --- Modal --- */
.modal-content {
  background-color: var(--color-white);
  width: 90%;
  max-width: 800px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 !important;
}

.modal-content__title {
  font-family: var(--font-family-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-main);
  padding: 24px 32px;
  margin: 0;
  border-bottom: 1px solid var(--color-border);
}

.modal-content__body {
  padding: 32px;
  max-height: 65vh;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text-main);
  text-align: justify;
}

.modal-content__body p {
  margin-bottom: var(--spacing-sm);
}

.modal-content__body h4 {
  font-size: 16px;
  font-weight: 600;
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-xs);
  color: #000000;
}

.modal-content__body ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: var(--spacing-sm);
}

.modal-content__body li {
  margin-bottom: 8px;
}

.modal-content__body::-webkit-scrollbar {
  width: 8px;
}

.modal-content__body::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.modal-content__body::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 4px;
}

.modal-content__footer {
  padding: 20px;
  text-align: center;
  border-top: 1px solid var(--color-border);
  background-color: #f9f9f9;
}

.modal-content__btn-close {
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  padding: 12px 40px;
  border-radius: 4px;
  font-size: 16px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.modal-content__btn-close:hover {
  background-color: var(--color-primary-hover);
}

/* ==========================================================================
   Responsive (RWD) Styles
   ========================================================================== */

/* --- Tablet / Small Screens --- */
@media screen and (max-width: 1024px) {
  .main-layout {
    flex-direction: column;
  }

  .hero {
    width: 100%;
    height: 100vh;
    height: -webkit-fill-available; /* Safari 專用方案 */
    height: 100svh;
    height: calc(var(--vh, 1vh) * 100);
    background-image: url("../assets/images/00-00_bg_pad.jpg");
    background-position: center top;
  }

  html {
    scroll-behavior: auto !important; /* 避免手機版平滑捲動與位移衝突導致抖動 */
  }

  body {
    -webkit-overflow-scrolling: touch; /* 提升 iOS 捲動流暢度 */
  }

  .hero__layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    position: relative;
    z-index: 2;
  }

  .hero__content {
    width: 18rem; /* 從 25rem 縮小 */
    max-width: 90%;
  }

  .hero__logo {
    width: 100%;
    margin-bottom: 1.5rem;
  }

  .hero__slogan {
    width: 70%;
    margin: 0 auto;
  }



  .form-section {
    width: 100%;
    min-height: auto;
    padding: 100px 30px; /* 依照要求調整為 100px */
  }

  .form-section__container {
    max-width: 100%;
  }

  .form-section__slogan-img {
    max-width: 55%; /* 從 40% 增加 */
    margin-left: auto;
    margin-right: auto;
    display: block;
  }

  .form-section__title {
    font-size: 2rem;
    margin-top: 20px;
    margin-bottom: 20px;
  }
}

/* --- Mobile Specific (Phones) --- */
@media screen and (max-width: 768px) {
  .hero {
    height: 100vh;
    height: -webkit-fill-available;
    height: 100svh;
    height: calc(var(--vh, 1vh) * 100);
    background-image: url("../assets/images/00-00_bg_mb.jpg");
    background-position: center top;
  }



  .hero__slogan {
    width: 100%;
  }

  .form-section {
    padding: 80px 20px; /* 依照要求調整為 80px */
  }

  .form-section__title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .form__row {
    flex-direction: column;
    gap: 1.25rem;
  }
}
