/* ============================================================
   wa-article.css — WhatsApp Design Override for Article Pages
   Injected after base.css + style.css
   All article pages auto-inherit this style
   ============================================================ */

/* ===== FONTS =====
   Noto Sans TC is loaded via <link rel="stylesheet"> in each page's <head>
   (with preconnect to fonts.gstatic.com) so that font CSS is fetched in
   parallel with this stylesheet instead of serially via @import.
   ===== */

/* ===== RESET BODY & BACKGROUND ===== */
:root {
  --color-bg: #ffffff !important;
  --color-surface-2: #ffffff !important;
  --color-surface-offset: #ffffff !important;
}

body {
  font-family: -apple-system, 'Helvetica Neue', 'Noto Sans TC', Arial, sans-serif !important;
  background-color: #FFFFFF !important;
  background-image: none !important;
  color: #111B21 !important;
  padding-top: 64px !important; /* nav height offset */
}

/* ===== HIDE OLD NAV ===== */
nav.nav {
  display: none !important;
}

/* ===== HIDE OLD SITE-HEADER (some legacy articles) ===== */
header.site-header {
  display: none !important;
}

/* ===== INJECTED WA NAV (via wa-article.js) ===== */
#wa-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #075E54;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

#wa-nav .wa-nav__left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  text-decoration: none;
}

#wa-nav .wa-nav__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
  flex-shrink: 0;
}

#wa-nav .wa-nav__info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

#wa-nav .wa-nav__name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

#wa-nav .wa-nav__sub {
  font-size: 11px;
  color: rgba(255,255,255,0.78);
  white-space: nowrap;
}

#wa-nav .wa-nav__right {
  display: flex;
  align-items: center;
}

#wa-nav .wa-nav__wa-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  text-decoration: none;
  transition: background 0.18s;
}

#wa-nav .wa-nav__wa-btn:hover {
  background: rgba(255,255,255,0.25);
}

#wa-nav .wa-nav__wa-btn svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

/* ===== ARTICLE HEADER SECTION ===== */
.article-header {
  margin-top: 0;
  padding: 32px 0 28px;
}

.article-header .container {
  max-width: 960px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 16px;
  transition: background 0.18s;
}

.back-btn:hover {
  background: rgba(255,255,255,0.28);
}

.article-header__tag {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.article-header__title {
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 10px;
  text-wrap: balance;
}

.article-header__meta {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

/* ===== ARTICLE BODY ===== */
.article-body {
  padding: 24px 0 100px;
  background: #ffffff !important;
}

.article-body .container {
  max-width: 960px;
}

.article-container {
  background: #fff;
  border-radius: 12px;
  padding: clamp(20px, 5vw, 44px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}

/* ===== TYPOGRAPHY ===== */
.article-container p {
  font-size: 15px;
  line-height: 1.85;
  color: #111B21;
  margin-bottom: 16px;
  max-width: 72ch;
}

.article-container h2 {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 700;
  color: #075E54;
  margin-top: 36px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #25D366;
  font-family: -apple-system, 'Helvetica Neue', 'Noto Sans TC', Arial, sans-serif;
}

.article-container h3 {
  font-size: 15px;
  font-weight: 700;
  color: #111B21;
  margin-top: 24px;
  margin-bottom: 10px;
}

.article-container strong {
  color: #075E54;
  font-weight: 700;
}

.article-container ul,
.article-container ol {
  padding-left: 22px;
  margin-bottom: 16px;
}

.article-container li {
  font-size: 15px;
  line-height: 1.8;
  color: #111B21;
  margin-bottom: 6px;
}

.article-container table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.article-container th {
  background: #075E54;
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}

.article-container td {
  padding: 9px 14px;
  border-top: 1px solid #f0f0f0;
  color: #111B21;
}

.article-container tr:nth-child(even) td {
  background: #f8fffe;
}

/* ===== CONTACT BLOCK inside article ===== */
.contact-block {
  background: linear-gradient(135deg, #075E54, #128C7E);
  border-radius: 12px;
  padding: 24px;
  margin-top: 32px;
  text-align: center;
}

.contact-block p {
  color: rgba(255,255,255,0.9) !important;
  margin-bottom: 14px;
  font-size: 15px;
}

.contact-block .btn,
.contact-block .btn--primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s, transform 0.15s;
}

.contact-block .btn:hover,
.contact-block .btn--primary:hover {
  background: #20bd5a;
  transform: translateY(-1px);
}

/* ===== HIDE OLD FOOTER ===== */
footer.footer {
  display: none !important;
}

/* ===== HIDE OLD FLOATING WHATSAPP ===== */
a.whatsapp-float {
  display: none !important;
}
.fab-whatsapp {
  display: none !important;
}

/* ===== INJECTED FLOATING BUTTON BAR (via wa-article.js) ===== */
/* Same style as about.html / info.html float-bar */
#wa-fab-bar {
  position: fixed;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Reuse .float-btn classes from about/info pages */
.float-btn {
  width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  background: rgba(255,255,255,0.92);
  border-radius: 10px;
  padding: 7px 4px 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: transform 0.18s, box-shadow 0.18s;
}

.float-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.24);
}

.float-btn__icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.float-btn__icon--yt   { background: #FF0000; }
.float-btn__icon--ct   { background: #D04A0A; }
.float-btn__icon--me   { background: #075E54; }
.float-btn__icon--srch { background: #25D366; }

.float-btn__label {
  font-size: 9px;
  color: #667781;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

/* ===== DISTRICT ANALYSIS FLOATING BUTTON (dropdown) ===== */
.float-district {
  position: relative;
  width: 48px;
}

.float-district__btn {
  width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  background: #1a3a5c;
  border: none;
  border-radius: 10px;
  padding: 8px 4px 6px;
  box-shadow: 0 2px 8px rgba(26, 58, 92, 0.32);
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}

.float-district__btn:hover,
.float-district.is-open .float-district__btn {
  transform: translateY(-2px);
  background: #224a73;
  box-shadow: 0 4px 14px rgba(26, 58, 92, 0.45);
}

.float-district__icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.float-district__icon svg {
  display: block;
}

.float-district__label {
  font-size: 9px;
  color: #ffffff;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.float-district__menu {
  position: absolute;
  top: 0;
  right: calc(100% + 8px);
  min-width: 200px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  padding: 8px 0;
  z-index: 210;
  border: 1px solid #e3e8ef;
}

.float-district__menu-title {
  font-size: 11px;
  font-weight: 700;
  color: #1a3a5c;
  padding: 6px 14px 8px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #eef2f6;
  margin-bottom: 4px;
}

.float-district__item {
  display: block;
  padding: 9px 14px;
  font-size: 13px;
  color: #111B21;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}

.float-district__item:hover,
.float-district__item:focus-visible {
  background: #f0faf7;
  color: #075E54;
}

@media (max-width: 520px) {
  .float-district {
    width: 48px;
  }
  .float-district__menu {
    min-width: 180px;
  }
}

/* ===== INJECTED STICKY BOTTOM CTA (via wa-article.js) ===== */
#wa-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 80;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.10);
}

#wa-sticky-cta img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

#wa-sticky-cta .wa-cta__text {
  flex: 1;
  min-width: 0;
}

#wa-sticky-cta .wa-cta__name {
  font-size: 14px;
  font-weight: 700;
  color: #111B21;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#wa-sticky-cta .wa-cta__sub {
  font-size: 11px;
  color: #667781;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#wa-sticky-cta .wa-cta__btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #25D366;
  color: #fff;
  border-radius: 22px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s;
  white-space: nowrap;
}

#wa-sticky-cta .wa-cta__btn:hover {
  background: #20bd5a;
}

#wa-sticky-cta .wa-cta__btn svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .article-container {
    padding: 18px 16px 24px;
    border-radius: 10px;
  }

  .article-body {
    padding: 16px 0 100px;
  }

  .article-body .container {
    padding-inline: 10px;
  }

  #wa-sticky-cta .wa-cta__name {
    font-size: 13px;
  }

  #wa-sticky-cta .wa-cta__btn {
    padding: 8px 14px;
    font-size: 13px;
  }
}
