/**
 * footer 組件樣式
 * @package mytheme
 */

/* footer 樣式 */

.site-footer {
  background-color: #0b2f53;
}

.footer-top-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 106px 0 54px;
}

.footer-top-contact {
  width: 100%;
  max-width: 1360px;
  position: relative;
  top: -35px;
  margin-bottom: 32px;
}

.footer-top-contact ul {
  display: flex;
  flex-direction: row;
  gap: 30px;
  justify-content: center;
}

.footer-top-info {
  color: #000;
  background-color: #fff;
  box-shadow: 0 4px 18.8px rgba(0, 0, 0, 0.25);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.top-phone {
  padding: 0 65px;
}

.top-address {
  padding: 0 72px;
}

.top-hours {
  padding: 0 67px;
}

.green-title {
  color: #53bf6f;
}
/**/
.footer-container {
}
.footer-middle-row {
  width: 100%;
  color: #fff;
  gap: 37px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.footer-logo-link {
}

.footer-social-media {
  display: flex;
  gap: 28px;
}
.footer-contact {
  display: flex;
}

.footer-contact ul {
  display: grid;
  gap: 19px 64px;
  grid-template-columns: repeat(2, auto);
}

.footer-line-hr {
  background-color: #fff;
  height: 1px;
  width: 100%;
}

.footer-bottom p {
  color: #fff;
}

.footer-credit-link {
  color: inherit;
  text-underline-offset: 2px;
  transition: opacity 0.2s ease;
}

.footer-credit-link:hover {
  opacity: 0.75;
}

/**
 * 手機版 Footer 聯絡資訊樣式
 *
 * 手機版排版：
 * 第一列：地址
 * 第二列：營業時間
 * 第三列：電話 + 統編（橫向排列）
 *
 * @package mytheme
 */
@media (max-width: 1024px) {
  .footer-top-info {
    padding: 0 25px;
  }
}

@media (max-width: 768px) {
  .footer-top-container {
    padding: 60px 0 36px;
  }

  .footer-top-contact {
    top: 0;
    margin-bottom: 24px;
  }

  .footer-top-contact ul {
    flex-direction: column;
    gap: 0;
  }

  .footer-top-info {
    width: 100%;
    height: 56px;
    border-bottom: 1px solid #e5e7eb;
  }

  .footer-top-info:last-child {
    border-bottom: none;
  }

  .footer-contact ul {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .footer-section {
    flex-direction: column;
    gap: 24px;
    align-items: center;
  }
}

@media (max-width: 992px) {
  .footer-top-container {
    padding: 0;
  }
  .footer-top-contact {
    top: 0;
  }
  .footer-contact ul {
    grid-template-columns: repeat(1, 1fr);
    gap: 15px;
    max-width: 184px;
  }
  .footer-social-media {
    gap: 15px;
  }

  .social-media-icon {
    width: 22px;
    height: 22px;
  }
  .footer-top-contact ul {
    gap: 0;
    height: 33px;
    border-top: 1px solid #5a8164;
    border-bottom: 1px solid #5a8164;
  }

  .footer-contact {
    margin: 28px auto;
    justify-content: center;
  }

  .footer-contact li {
    font-size: 10px;
    letter-spacing: 0.4px;
  }
  .footer-top-info {
    font-size: 10px;
    height: auto;
    box-shadow: none;
  }
  .top-phone {
    border-right: 1px solid #5a8164;
    padding-left: 8px;
    padding-right: 10.5px;
    flex: 1;
  }
  .top-address {
    padding: 0 0 0 10px;
    flex: 1;
  }
  .footer-section {
    flex-direction: column;
    gap: 20px;
  }
  .footer-logo-section .footer-contact ul {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
    margin-top: 0;
    width: 100%;
    justify-items: stretch;
    align-items: flex-start;
  }

  .footer-logo-section .footer-contact li {
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-sm);
  }

  /* 第一列：電話（獨佔一行） */
  .footer-logo-section .footer-contact .footer-phone {
    text-align: left;
    order: 1;
  }

  /* 第二列：地址（獨佔一行） */
  .footer-logo-section .footer-contact .footer-address {
    text-align: left;
    order: 2;
  }

  /* 第三列：營業時間（獨佔一行） */
  .footer-logo-section .footer-contact .footer-hours {
    text-align: left;
    order: 3;
  }

  /* 第四列：信箱（右側） */
  .footer-logo-section .footer-contact .footer-mail {
    order: 4;
  }

  .top-hours {
    display: none;
  }
}

@media (max-width: 480px) {
  /* footer 整體版面 */
  .footer-top-container {
    padding: 40px 0 44px;
  }

  .footer-middle-row {
    width: 100%;
    gap: 0;
    margin: 0 auto;
  }

  /* logo */
  .footer-logo-link {
    display: flex;
    justify-content: center;
  }

  .footer-logo {
    width: 190px;
    height: auto;
  }

  .footer-logo-section {
    width: 100%;
  }

  /* 聯絡資訊：單欄、左對齊、間距 19px、字 13px */
  .footer-contact {
    margin: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .footer-contact ul {
    display: flex;
    flex-direction: column;
    gap: 19px;
    width: 100%;
    max-width: 276px;
    margin: 36px auto;
  }

  .footer-logo-section .footer-contact li,
  .footer-logo-section .footer-contact a,
  .footer-contact li,
  .footer-contact a {
    font-size: 13px;
    line-height: 22px;
    color: #fff;
    font-weight: 400;
    letter-spacing: 0;
    margin-bottom: 0;
  }

  /* 順序：營業時間 → 信箱 → 電話 → 地址 (依 Figma) */
  .footer-hours {
    order: 1;
    text-align: left;
  }

  .footer-mail {
    order: 2;
  }

  .footer-phone {
    order: 3;
    text-align: left;
  }

  .footer-address {
    order: 4;
    text-align: left;
  }

  /* 社群圖示 */
  .footer-social-media {
    gap: 16px;
    width: 100%;
    justify-content: center;
  }

  .social-media-icon {
    width: 30px;
    height: 28px;
    transform: rotate(-1deg);
  }

  /* 白色分隔線 */
  .footer-line-hr {
    width: 375px;
    max-width: 100vw;
    margin: 24px auto;
  }

  /* 版權 */
  .footer-bottom {
    width: 100%;
  }

  .footer-bottom p {
    margin: 0;
    font-size: 12px !important;
    line-height: normal !important;
    text-align: center;
    color: #fff;
  }
}
