/* ============================================================
   Worldwide Focus Media — modern, responsive, secure stylesheet
   - Mobile-first, CSS Grid/Flexbox
   - System font stack only (no external HTTP fetch → no mixed content)
   ============================================================ */

:root {
  --brand: #064c8a;
  --brand-dark: #04345f;
  --brand-light: #e8f1fb;
  --accent: #e0a500;
  --accent-dark: #b98600;
  --ink: #1d2530;
  --muted: #5b6675;
  --line: #e2e8f0;
  --bg: #f6f8fb;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 6px 22px rgba(8, 30, 60, 0.08);
  --shadow-hover: 0 12px 30px rgba(8, 30, 60, 0.14);
  --maxw: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 0.5em;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------- Header / Nav ---------------- */
.site-header {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 20px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 21px;
  color: #fff;
  min-width: 0;
}
.brand:hover {
  text-decoration: none;
}
.brand-logo {
  height: 78px;
  width: auto;
  max-width: 390px;
  border-radius: 15px;
  object-fit: contain;
  background: #fff;
  padding: 9px 15px;
  flex: 0 0 auto;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}
.brand-cn {
  font-weight: 700;
  font-size: 1.72rem;
  white-space: nowrap;
}
.brand-en {
  font-size: 1.17rem;
  opacity: 0.9;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  color: #eaf2fb;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}
.nav a:hover {
  background: rgba(255, 255, 255, 0.14);
  text-decoration: none;
}
.nav a.active {
  background: var(--accent);
  color: #1d2530;
  font-weight: 700;
}
.nav a.lang {
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 8px;
  width: 44px;
  height: 40px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 0 auto;
  position: relative;
  transition: 0.25s;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle span::before {
  top: -7px;
}
.nav-toggle span::after {
  top: 7px;
}

/* ---------------- Hero ---------------- */
.hero {
  background: radial-gradient(
      1200px 400px at 80% -10%,
      rgba(224, 165, 0, 0.18),
      transparent
    ),
    linear-gradient(135deg, var(--brand), #0a5aa0);
  color: #fff;
  padding: 64px 0 72px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 0.3em;
}
.hero .lead {
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 760px;
  opacity: 0.95;
}
.hero .tag {
  display: inline-block;
  background: var(--accent);
  color: #1d2530;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 18px;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 34px;
}
.stat strong {
  display: block;
  font-size: 1.9rem;
  color: #fff;
}
.stat span {
  font-size: 0.85rem;
  opacity: 0.85;
}

/* ---------------- Sections ---------------- */
.section {
  padding: 54px 0;
}
.section.alt {
  background: #fff;
}
.section h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  text-align: center;
  margin-bottom: 6px;
}
.section .sub {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 34px;
  max-width: 680px;
}

/* category filter */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 36px;
}
.filter-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  transition: 0.18s;
}
.filter-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.filter-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}

/* ---------------- Publication cards ---------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s, box-shadow 0.18s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.card-cover {
  height: 210px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.card-cover .placeholder {
  font-weight: 800;
  color: var(--brand);
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 0 10px;
}
.card-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-cat {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.card h3 {
  font-size: 1.05rem;
  margin: 6px 0 8px;
}
.card-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 8px;
}
.card-summary {
  font-size: 0.92rem;
  color: #33404f;
  margin: 0 0 12px;
  flex: 1;
}
.card details {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: auto;
}
.card summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 600;
  font-size: 0.9rem;
  list-style: none;
}
.card summary::-webkit-details-marker {
  display: none;
}
.card summary::after {
  content: " +";
}
.card details[open] summary::after {
  content: " −";
}
.card details ul {
  margin: 10px 0 6px;
  padding-left: 18px;
  font-size: 0.88rem;
  color: #33404f;
}
.card details a.website {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.88rem;
  font-weight: 600;
}

/* link styled as a card (no inline styles, CSP-safe) */
.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.card-link:hover {
  text-decoration: none;
}
.text-center {
  text-align: center;
}

/* ---------------- Generic content ---------------- */
.prose {
  max-width: 820px;
  margin: 0 auto;
}
.prose p {
  margin: 0 0 1em;
}
.prose h3 {
  margin-top: 1.6em;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.info-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.info-box h4 {
  margin: 0 0 8px;
  color: var(--brand);
}
.info-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  word-break: break-word;
}

/* contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover {
  background: var(--brand-dark);
}
.note {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 10px;
}

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--brand-dark);
  color: #cdd9e6;
  padding: 34px 0;
  margin-top: 30px;
  font-size: 0.9rem;
}
.site-footer a {
  color: #fff;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--brand-dark);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    display: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }
  .nav.open {
    display: flex;
  }
  .nav a {
    padding: 12px 14px;
  }
  .nav-toggle {
    display: block;
  }
  .brand-logo {
    height: 60px;
    max-width: 300px;
    padding: 6px 11px;
  }
  .brand-cn {
    font-size: 1.58rem;
  }
  .brand-en {
    font-size: 1.1rem;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
