/* ==========================================================
   footer.css — Footer layout, columns, accordion
   Always loaded on every page.
   ========================================================== */

/* ── Branding row ─────────────────────────────────────────── */
.footer-branding {
  gap: 1.25rem;
}

.footer-brand-id {
  gap: 0.75rem;
}

/* Footer icon — matches CTA button height */
.footer-logo-icon {
  height: 2.125rem;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

/* Tighten gap between brand name and subtitle */
.footer-brand-id .wp-block-group {
  gap: 0 !important;
}

/* ── Action buttons ───────────────────────────────────────── */
.footer-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 6px;
  background: #c49a3c;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #2d2a27 !important;
  text-decoration: none;
  transition: background 0.2s;
  font-family: "Noto Sans TC", "PingFang TC", sans-serif;
  white-space: nowrap;
}

.footer-btn-primary:hover {
  background: #b8913a;
}

.footer-btn-line {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 6px;
  border: 1px solid rgba(246, 244, 240, 0.2);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(246, 244, 240, 0.8) !important;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  font-family: "Noto Sans TC", "PingFang TC", sans-serif;
  white-space: nowrap;
}

.footer-btn-line:hover {
  background: rgba(6, 199, 85, 0.1);
  border-color: rgba(6, 199, 85, 0.3);
  color: #06C755 !important;
}

.footer-brand-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* ── Divider ──────────────────────────────────────────────── */
.footer-divider {
  height: 1px;
  background: rgba(246, 244, 240, 0.1);
  margin: 2rem 0;
}

/* ── Section heading ──────────────────────────────────────── */
.footer-section-title {
  font-family: "Noto Sans TC", "PingFang TC", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(246, 244, 240, 0.9);
  margin: 0 0 0.625rem;
}

/* ── Link list ────────────────────────────────────────────── */
.footer-link-list-v2 {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.footer-link-list-v2 a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(246, 244, 240, 0.5);
  text-decoration: none;
  transition: color 0.2s;
  font-family: "Noto Sans TC", "PingFang TC", sans-serif;
}

.footer-link-list-v2 a:hover {
  color: rgba(246, 244, 240, 0.8);
}

.footer-ext-icon {
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.2s;
}

.footer-link-list-v2 a:hover .footer-ext-icon {
  opacity: 1;
}

/* ── Desktop grid (>= 1024px) ─────────────────────────────── */
.footer-desktop-grid {
  display: none;
}

@media (min-width: 1024px) {
  .footer-desktop-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
}

.footer-primary-grid,
.footer-secondary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

/* ── "顯示更多連結" toggle ────────────────────────────────── */
.footer-other-section {
  margin-top: 2rem;
}

.footer-other-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(246, 244, 240, 0.7);
  font-size: 1rem;
  font-weight: 600;
  font-family: "Noto Sans TC", "PingFang TC", sans-serif;
  transition: color 0.2s;
}

.footer-other-trigger:hover {
  color: rgba(246, 244, 240, 0.9);
}

.footer-other-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease, padding-bottom 0.3s ease;
}

.footer-other-section.is-open .footer-other-content {
  max-height: 800px;
  padding-bottom: 0.5rem;
}

.footer-other-section.is-open .footer-acc-chevron {
  transform: rotate(180deg);
}

/* ── Mobile accordion (< 1024px) ─────────────────────────── */
.footer-accordion {
  display: block;
}

@media (min-width: 1024px) {
  .footer-accordion {
    display: none;
  }
}

.footer-acc-item {
  border-bottom: 1px solid rgba(246, 244, 240, 0.1);
}

.footer-acc-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.875rem 0;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(246, 244, 240, 0.9);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: "Noto Sans TC", "PingFang TC", sans-serif;
  text-align: left;
}

.footer-acc-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-acc-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: rgba(246, 244, 240, 0.1);
  font-size: 0.6875rem;
  font-weight: 400;
  color: rgba(246, 244, 240, 0.4);
}

.footer-acc-chevron {
  flex-shrink: 0;
  color: rgba(246, 244, 240, 0.4);
  transition: transform 0.2s ease;
}

.footer-acc-item.is-open .footer-acc-chevron {
  transform: rotate(180deg);
}

.footer-acc-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease, padding-bottom 0.25s ease;
}

.footer-acc-item.is-open .footer-acc-content {
  max-height: 600px;
  padding-bottom: 0.875rem;
}

/* ── Bottom bar ───────────────────────────────────────────── */
.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(246, 244, 240, 0.1);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.footer-bottom p,
.footer-bottom .wp-block-tt-blocks-tt-copyright-date-block,
.footer-bottom .wp-block-tt-blocks-tt-copyright-date-block * {
  font-size: 0.75rem;
  color: rgba(246, 244, 240, 0.4);
  margin: 0;
  font-family: "Noto Sans TC", "PingFang TC", sans-serif;
}
