/* =========================================================
   CN LinkLight — WordPress theme layer
   ---------------------------------------------------------
   assets/base.css carries the full design system. This file adds
   only what WordPress needs on top of it:

     · language-menu links (the static build used <button>)
     · nameplate cards for the partners page
     · entry content from the editor
     · pagination
     · a few fixes for markup the editor can inject

   Every directional rule uses logical properties so the RTL
   switch in base.css keeps working here too.
   ========================================================= */

/* ---------- Language menu: anchors, not buttons ---------- */
/* base.css styles `.lang-menu button`; WordPress renders <a> so that
   each language has a real, crawlable URL. */
.lang-menu a {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  color: var(--ink);
  background: transparent;
  text-align: start;
  border-radius: 9px;
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
}
.lang-menu a:hover,
.lang-menu a.active {
  background: var(--teal-soft);
  color: var(--teal-deep);
}
.lang-menu a.active .dot { background: var(--teal); }

/* ---------- Footer contact block ---------- */
.footer-contact {
  margin-top: 18px;
  font-size: .9rem;
  line-height: 1.8;
}
.footer-contact a {
  color: rgba(255, 255, 255, .82);
  transition: color .2s var(--ease);
}
.footer-contact a:hover { color: #fff; }

/* ---------- Nameplate wall (partners page) ---------- */
.nameplates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.nameplate {
  padding: 26px 26px 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.nameplate:hover {
  transform: translateY(-4px);
  border-color: var(--teal);
  box-shadow: var(--shadow-md);
}
.nameplate__pill {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 11px;
  color: var(--teal-deep);
  background: var(--teal-soft);
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.nameplate__zh {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.35;
}
.nameplate__en {
  margin-top: 4px;
  color: var(--ink);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.4;
}
.nameplate__pf {
  margin-top: 10px;
  color: var(--teal-deep);
  font-size: .84rem;
  font-weight: 600;
}
.nameplate__tg {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: .88rem;
  line-height: 1.6;
}

/* ---------- Editor content ---------- */
.entry__content { color: var(--ink-soft); font-size: 1rem; line-height: 1.7; }
.entry__content > * + * { margin-top: 1.1em; }
.entry__content h2,
.entry__content h3,
.entry__content h4 { color: var(--ink); letter-spacing: -.02em; line-height: 1.25; }
.entry__content h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-top: 1.8em; }
.entry__content h3 { font-size: 1.3rem; margin-top: 1.6em; }
.entry__content ul,
.entry__content ol { padding-inline-start: 1.3em; }
.entry__content li + li { margin-top: .45em; }
.entry__content a { color: var(--teal-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.entry__content blockquote {
  margin: 1.6em 0;
  padding-inline-start: 20px;
  border-inline-start: 3px solid var(--gold);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
}
.entry__content img { border-radius: var(--r); box-shadow: var(--shadow-sm); }
.entry__content table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.entry__content th,
.entry__content td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: start;
}

/* ---------- Pagination ---------- */
.pagination { margin-top: 44px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
}
.pagination .page-numbers.current {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}
.pagination .page-numbers:hover { border-color: var(--teal); color: var(--teal-deep); }

/* ---------- WordPress core classes the editor may emit ---------- */
.alignwide { max-width: 1100px; margin-inline: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-inline: calc(50% - 50vw); }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text,
.wp-block-image figcaption {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: .84rem;
  text-align: center;
}
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  color: #fff;
  background: var(--teal);
  border-radius: 0 0 10px 0;
}
.skip-link:focus { inset-inline-start: 0; }

/* ---------- Admin bar offset ---------- */
/* The header is position:fixed; without this the WordPress admin bar
   covers the top of it while logged in. */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .nameplates { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .nameplate { padding: 22px 20px 24px; }
  .entry__content h2 { font-size: 1.45rem; }
}

/* ---------- Arabic adjustments for the WordPress-only components ---------- */
html[data-lang="ar"] .nameplate__zh,
html[data-lang="ar"] .nameplate__pill { letter-spacing: normal; }
html[data-lang="ar"] .entry__content blockquote { font-style: normal; }
