/**
 * 聯絡頁面樣式
 * 包含首圖、表單、聯絡資訊三區塊
 */

/* ========== 頁面容器 ========== */

/* ========== 第一區塊：首圖 ========== */
.contact-wagi-hero {
  width: 100%;
  margin: 0;
  padding: 0;
  position: relative;
}

.contact-page {
  position: relative;
}

.contact-wagi-hero .hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.hero-rwd-image {
  display: none;
}

.contact-right-big-blue-yellow-ball-img {
  display: block;
  position: absolute;
  left: 0;
  bottom: -20rem;
  z-index: -1;
}

/* ========== 主內容區 ========== */
.contact-main {
  margin-top: -190px;
  padding-bottom: 82px;
}

/* ========== 第二區塊：聯絡表單 ========== */
.contact-form-wrapper {
  width: 100%;
  max-width: 1310px;
  gap: 68px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
}

.form-section-title {
  width: 100%;
  background-color: var(--color-primary-light);
  color: #000;
  font-size: 2rem;
  font-weight: 400;
  margin: 0;
  padding: var(--spacing-lg) var(--spacing-xl);
  border-bottom: 3px solid #000;
  text-align: center;
}

.form-content {
  width: 100%;
  max-width: 795px;
}

/* ========== 表單樣式 ========== */
.contact-form {
  display: flex;
  flex-direction: column;
  padding: 25px 45px;
  width: 100%;
  gap: 10px;
  border-radius: 44px;
  background: #fff;
  box-shadow: 0 0 26.1px 0 rgba(0, 0, 0, 0.25);
}

/* 表單群組 */
.contact-form .form-group {
  position: relative;
  margin-bottom: 0;
}

.form-group:nth-child(9) {
  margin-bottom: 10px;
}

/* ========== 橫向排列表單群組 ========== */
.contact-form .form-group-inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
}

/* 橫向標籤樣式 */
.contact-form .form-label-inline {
  color: #000;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 紅色星號 */
.contact-form .form-label-inline .required-mark {
  color: #940012;
  font-weight: 700;
}

/* 輸入欄位 - 黑色文字、底線樣式 */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  flex: 1;
  width: 100%;
  padding-bottom: 8px;
  line-height: 51px;
  font-size: 1.5rem;
  color: #000;
  background: transparent;
  border: none;
  border-bottom: 1px solid #000;
  outline: none;
  transition: border-color 0.3s ease;
}

/* Textarea 樣式 - 與 input 同高 */
.contact-form textarea {
  resize: none;
  min-height: auto;
  overflow: hidden;
}

/* Textarea 橫向排列時對齊頂部 */
.contact-form .form-group-inline:has(textarea) {
  align-items: flex-start;
}

.contact-form .form-group-inline:has(textarea) .form-label-inline {
  padding-top: 12px;
}

/* ========== 按鈕選項群組 ========== */
.contact-form .form-label {
  display: block;
  margin-bottom: 18px;
  color: #000;
}

.contact-form .form-label .required-mark {
  color: #940012;
  font-weight: 700;
}

.contact-form .button-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

/* 按鈕選項 */
.contact-form .btn-option {
  display: inline-flex;
  align-items: center;
  padding: 3px 15px;
  border: 1px solid #000;
  border-radius: 60px;
  background: transparent;
  cursor: pointer;
  transition: background 0.3s ease;
  color: #000;
}

.contact-form .btn-option input[type="radio"] {
  display: none;
}

/* 選中狀態 & 懸停狀態 - 背景 #FBE0AD */
.contact-form .btn-option.active,
.contact-form .btn-option:has(input:checked),
.contact-form .btn-option:hover {
  background: #fbe0ad;
}

/* 送出按鈕 */
.contact-form .form-actions {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 92px;
}

.contact-form .btn-submit {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  height: 76px;
  width: 100%;
  cursor: pointer;
  transition: all var(--transition-base);
  border-radius: 20px;
  border: 1px solid #fff;
  border-radius: 60px;
  background: #ca6631;
  letter-spacing: 10.08px;
}

.contact-form .btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(19, 47, 147, 0.3);
}

/* 欄位錯誤提示 — 浮在標籤上方，不佔空間 */
.contact-form .field-error {
  position: absolute;
  top: -1.2rem;
  left: 0;
  color: #940012;
  font-size: 0.875rem;
  white-space: nowrap;
}

/* 紅色星號過渡動畫 */
.contact-form .required-mark {
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

/* 訊息樣式 */

.contact-info-wrapper {
  padding: 0;
  display: flex;
  flex-direction: column;
  max-width: 542px;
  width: 100%;
}

.info-up-image {
  max-width: 300px;
  align-self: end;
}

.contact-form .form-message {
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-md);
  margin-top: var(--spacing-xl);
  font-size: var(--font-size-base);
  text-align: center;
}

.contact-form .form-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid #10b981;
}

.contact-form .form-error {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid #ef4444;
}

/* ========== 第三區塊：聯絡資訊 ========== */
.info-section-title {
  max-width: 650px;
  width: 100%;
  margin-bottom: 8px;
  color: #fff;
  font-size: 24px;
  font-style: normal;
  font-weight: 500;
  line-height: 36px;
  text-align: center;
}

.info-translate-text {
  color: #fff;
  text-align: center;
  font-family: Inter;
  font-size: 24px;
  font-style: normal;
  font-weight: 400;
  line-height: 36px;
}

.contact-info-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 650px;
  width: 100%;
  height: 475px;
  align-items: center;
  background: #eb942f;
  border-radius: 28px;
  justify-content: center;
}

.info-items {
  display: flex;
  flex-direction: column;
  gap: 44px;
  padding-top: 39px;
  margin-top: 34px;
  border-top: 2px solid #fff;
  max-width: 434px;
}

.contact-info-grid .info-item {
  display: flex;
  flex-direction: row;
  gap: 16px;
}

/* 圖片和標籤的容器（橫向排列） */
.contact-info-grid .info-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

/* 圖片 */
.contact-info-grid .info-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-info-grid .info-icon img {
  width: auto;
  height: auto;
  object-fit: contain;
}

/* 標籤文字 */
.contact-info-grid .info-label {
  font-weight: 700;
  font-size: 1.5rem;
  color: #fff;
  margin: 0;
}

/* 內容文字（下方） */
.contact-info-grid .info-value {
  color: #fff;
  margin: 0;
  line-height: 1.6;
}

.contact-info-grid .info-value a {
  color: #fff;
  text-decoration: none;
  transition: all var(--transition-base);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.contact-info-grid .info-value a:hover {
  color: #fff;
  border-bottom: 2px solid #fff;
}

/* ========== 第四區塊：社群媒體 ========== */
.social-media-wrapper {
  display: flex;
  margin: 36px;
  align-items: center;
}

.social-title {
  font-weight: 700;
  line-height: 40px;
  font-size: 36px;
  background: var(--001, linear-gradient(180deg, #f7b52c 0%, #d95431 100%));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
  width: 100%;
  max-width: 200px;
}

.social-icons {
  display: flex;
  gap: 21px;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  background-color: transparent;
  color: transparent;
  border-radius: 0px;
  font-weight: 400;
  font-size: 18px;
  transition: all var(--transition-base);
}

.social-icon {
  display: inline-block;
  transition: transform 0.2s ease;
}

.social-icon:hover {
  transform: scale(1.1);
}

.social-icon img {
  width: auto;
  height: auto;
  object-fit: contain;
}

@media (max-width: 1440px) {
  .contact-form-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .contact-wagi-main {
  }

  .contact-form .form-row {
    max-width: 1000px;
  }
}

@media (max-width: 1024px) {
  .contact-wagi-main {
    margin-top: -65px;
  }

  .info-section-title {
    max-width: 595px;
  }

  .contact-info-grid {
    max-width: 595px;
  }

  .contact-form .form-row {
    gap: 45px;
    max-width: 700px;
  }
}

@media (max-width: 820px) {
  .contact-wagi-main {
    margin-top: -45px;
  }

  .contact-form .form-row {
    max-width: 550px;
  }
}

/* ========== 響應式：手機版 (≤480px) ========== */
@media (max-width: 480px) {
  .hero-image {
    display: none;
  }

  .contact-main {
    padding: 0;
    margin-top: -40px;
  }

  .contact-form {
    gap: 32px;
  }
  .contact-wagi-hero .hero-image {
    display: none;
  }
  .contact-right-big-blue-yellow-ball-img {
    bottom: 32rem;
  }

  .hero-rwd-image {
    display: block;
    width: 100%;
  }
  .contact-wagi-main {
    padding: 0;
    margin-top: -15px;
  }

  /* 表單容器 */
  .contact-form-wrapper {
    padding: 0;
    flex-direction: column;
  }

  /* 手機版表單樣式 */
  .contact-form {
    height: auto;
    padding: 30px 20px;
    gap: 32.75px;
    border-radius: 16.604px;
    background: #fff;
    box-shadow: 0 0 9.849px 0 rgba(0, 0, 0, 0.25);
  }

  .contact-form .form-group-inline {
    flex-direction: row;
    align-items: center;
    gap: 0;
  }

  .contact-form .form-group-inline:has(textarea) {
    align-items: flex-start;
  }

  .contact-form .form-group-inline:has(textarea) .form-label-inline {
    padding-top: 6px;
  }

  .contact-form input[type="text"],
  .contact-form input[type="email"],
  .contact-form textarea {
    font-size: 0.75rem;
    padding-bottom: 6px;
    height: 19.245px;
    line-height: 19.245px;
  }

  .contact-form .form-label-inline {
    font-size: 0.75rem;
  }

  .contact-form .form-label-inline .required-mark {
    font-size: 0.75rem;
  }

  .contact-form .field-error {
    font-size: 0.625rem;
    top: -0.9rem;
  }

  .contact-form .form-label {
    font-size: 0.75rem;
    margin-bottom: 8px;
  }

  .contact-form .btn-option {
    padding: 2px 15px;
    font-size: 0.75rem;
    border-radius: 22.642px;
  }

  .contact-form .button-group {
    gap: 8px;
  }

  .contact-form .form-actions {
    margin-top: 0;
  }

  .form-group:nth-child(9) {
    margin-bottom: 2px;
  }

  .form-group:nth-child(10) {
    margin-bottom: -8px;
  }

  .form-section-title {
    font-size: 1.25rem;
    padding: var(--spacing-md);
    border-bottom: 1px solid #000;
  }

  /* 表單單欄佈局 */
  .contact-form .form-row {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* 扁平化欄位結構以便重新排序 */
  .contact-form .form-column {
    display: contents;
  }

  .contact-form .btn-submit {
    font-size: 1rem;
    padding: 0;
    max-width: 100%;
    height: 30px;
    border-radius: 10px;
    border-radius: 22.642px;
    background: #ca6631;
  }

  /* 聯絡資訊 */

  .info-up-image {
    max-width: 272px;
  }

  .contact-form-wrapper {
    gap: 28px;
  }

  .contact-info-wrapper {
    padding: 0;
    align-items: center;
  }

  .info-section-title {
    text-align: center;
    padding: 0;
    max-width: 265px;
    margin-bottom: 4.43px;
    line-height: 19.926px;
  }

  .info-translate-text {
    line-height: 19.926px;
  }

  .contact-info-grid {
    height: 300px;
    gap: 0;
    align-items: center;
  }

  .info-items {
    margin-top: 18.67px;
    padding-top: 21.56px;
    gap: 24.35px;
  }

  .contact-info-grid .info-item {
    text-align: center;
    gap: 5px;
    align-items: center;
  }

  .contact-info-grid .info-header {
    gap: 7px;
  }

  .contact-info-grid .info-icon {
    justify-content: flex-end;
    width: 17px;
  }

  .contact-info-grid .info-icon img {
    height: auto;
  }

  .contact-info-grid .info-label {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
  }

  .contact-info-grid .info-value {
    font-size: 12px;
    color: #fff;
  }

  .contact-info-grid .info-value a {
    color: #fff;
  }

  /* 社群媒體 */
  .social-media-wrapper {
    margin: 19.78px auto 75.78px;
    gap: 22px;
  }

  .social-title {
    text-align: center;
    max-width: 82px;
  }
  .social-icons {
    gap: 12px;
  }

  .social-icon img {
    width: 32px;
    height: 32px;
  }
}

/* ========== 響應式：平板版 (481px - 1024px) ========== */
@media (max-width: 1024px) and (min-width: 481px) {
  .contact-form-wrapper {
  }

  .form-section-title {
    border-bottom: 2px solid #000;
    font-size: 1.5rem;
  }

  .contact-form .btn-submit {
    border: 2px solid #000;
  }
}
