/* =========================================================
   CEPC website styles
   All look-and-feel knobs live in :root below — edit there
   to retheme the entire site.
   ========================================================= */
:root {
  --c-bg:        #ffffff;
  --c-fg:        #1a1f2c;
  --c-muted:     #5b6478;
  --c-accent:    #0b4f9c;       /* CEPC blue */
  --c-accent-2:  #14a085;       /* teal accent */
  --c-band:      #f3f6fb;
  --c-border:    #e3e8f0;
  --c-footer-bg: #0f1a30;
  --c-footer-fg: #d8deea;

  --w-page:      1180px;
  --r-card:      10px;
  --font-sans:   "Inter", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --shadow-sm:   0 1px 2px rgba(15,26,48,.06), 0 2px 6px rgba(15,26,48,.06);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--c-fg);
  background: var(--c-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--c-fg);
}
.brand-mark {
  width: 40px; height: 40px;
  object-fit: contain;
  display: inline-block;
}
.brand-text { font-size: 1.05rem; letter-spacing: .02em; }
.brand-sub  { font-size: .75rem; color: var(--c-muted); display: block; font-weight: 500; }

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  font-size: 1.5rem; color: var(--c-fg);
}
.nav-main ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 6px;
}
.nav-main a {
  color: var(--c-fg);
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 500;
  font-size: .95rem;
}
.nav-main a:hover    { background: var(--c-band); text-decoration: none; }
.nav-main a.active   { color: var(--c-accent); background: var(--c-band); }

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(135deg, rgba(11,79,156,.55) 0%, rgba(26,115,209,.45) 60%, rgba(20,160,133,.55) 100%),
    url("../../images/swiper0.jpg") center/cover no-repeat;
  color: #fff;
  padding: 80px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(800px 400px at 90% -10%, rgba(0,0,0,.18), transparent 60%),
    radial-gradient(600px 300px at -10% 110%, rgba(0,0,0,.18), transparent 60%);
  pointer-events: none;
}
.hero.hero-blue {
  background: linear-gradient(135deg, #0b4f9c 0%, #1a73d1 60%, #14a085 100%);
}
.hero.hero-blue::after {
  background:
    radial-gradient(800px 400px at 90% -10%, rgba(255,255,255,.18), transparent 60%),
    radial-gradient(600px 300px at -10% 110%, rgba(255,255,255,.10), transparent 60%);
}

/* Faint detector schematic decoration in the AGORA hero, bottom-right */
.hero-detector-bg {
  position: absolute;
  right: 4%;
  bottom: 6%;
  height: 66%;
  width: auto;
  max-width: 45%;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}
@media (max-width: 680px) {
  .hero-detector-bg { right: -6%; opacity: 0.13; max-width: 70%; }
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0 0 16px;
  line-height: 1.15;
  letter-spacing: -.01em;
}
.hero p.lead {
  font-size: 1.15rem;
  max-width: 760px;
  margin: 0 0 28px;
  color: rgba(255,255,255,.92);
}
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease;
}
.btn-primary {
  background: #fff; color: var(--c-accent);
}
.btn-primary:hover { background: #eef3fb; text-decoration: none; }
.btn-ghost {
  background: transparent; color: #fff; border-color: rgba(255,255,255,.6);
}
.btn-ghost:hover { background: rgba(255,255,255,.12); text-decoration: none; }

/* ---------- Sections ---------- */
section.section { padding: 64px 0; }
section.section.band { background: var(--c-band); }

.section-title {
  font-size: 1.8rem;
  margin: 0 0 6px;
  letter-spacing: -.01em;
}
.section-sub {
  color: var(--c-muted);
  margin: 0 0 32px;
  max-width: 720px;
}

/* ---------- Highlight cards ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(15,26,48,.08), 0 12px 24px rgba(15,26,48,.08);
}
.card .card-img {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #0b4f9c, #14a085);
  display: flex; align-items: center; justify-content: center;
}
.card .card-img img { width: 100%; height: 100%; object-fit: cover; }
.card .card-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p  { margin: 0 0 14px; color: var(--c-muted); font-size: .95rem; }
.card .card-link { margin-top: auto; font-weight: 600; font-size: .9rem; }

/* ---------- News ---------- */
.news-list {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  gap: 18px;
}
.news-item {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  align-items: start;
}
.news-item time {
  color: var(--c-accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: .9rem;
}
.news-item h3 { margin: 0 0 6px; font-size: 1.1rem; }
.news-item p  { margin: 0; color: var(--c-muted); font-size: .95rem; }

/* ---------- Quick links (footer-of-front-page band) ---------- */
.quick-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.quick-link {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  padding: 26px;
  text-align: left;
  display: block;
  color: var(--c-fg);
  transition: border-color .15s ease, transform .08s ease;
}
.quick-link:hover { border-color: var(--c-accent); text-decoration: none; transform: translateY(-2px); }
.quick-link .ql-icon {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.4rem; font-weight: 700;
  margin-bottom: 14px;
}
.quick-link h3 { margin: 0 0 6px; font-size: 1.1rem; }
.quick-link p  { margin: 0; color: var(--c-muted); font-size: .95rem; }

/* ---------- Documents ---------- */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.doc-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-accent);
  border-radius: var(--r-card);
  padding: 18px 22px;
  display: block;
  color: var(--c-fg);
  transition: border-color .15s ease, transform .08s ease, box-shadow .15s ease;
}
.doc-card:hover {
  border-color: var(--c-accent);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.doc-card .doc-tag {
  display: inline-block;
  background: var(--c-band);
  color: var(--c-accent);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.doc-card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.doc-card p  { margin: 0; color: var(--c-muted); font-size: .95rem; }

/* ---------- Page content ---------- */
.page-hero {
  background: var(--c-band);
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--c-border);
}
.page-hero h1 { margin: 0 0 8px; font-size: 2.2rem; }
.page-hero p  { margin: 0; color: var(--c-muted); max-width: 760px; }

.prose { max-width: 820px; }
.prose h2 { margin: 36px 0 12px; font-size: 1.5rem; }
.prose h3 { margin: 28px 0 10px; font-size: 1.2rem; }
.prose p  { margin: 0 0 14px; }
.prose ul { margin: 0 0 16px 22px; }
.prose li { margin: 4px 0; }

table.spec {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 28px;
  font-size: .95rem;
}
table.spec th, table.spec td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border);
}
table.spec th { background: var(--c-band); }

/* ---------- Workshop banner (front-page advertisement) ---------- */
.workshop-banner {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 32px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--c-border);
  border-left: 6px solid var(--c-accent);
  border-radius: var(--r-card);
  padding: 28px;
  color: var(--c-fg);
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.workshop-banner:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(15,26,48,.08), 0 12px 24px rgba(15,26,48,.08);
}
.workshop-banner-img img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}
.workshop-banner-body { display: flex; flex-direction: column; gap: 10px; }
.workshop-banner-body h2 {
  margin: 4px 0 4px;
  font-size: 1.6rem;
  color: var(--c-accent);
}
.workshop-banner-body p { margin: 0; color: var(--c-fg); }
.workshop-tag {
  display: inline-block;
  align-self: flex-start;
  background: var(--c-band);
  color: var(--c-accent);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
}
.workshop-link { color: var(--c-accent); font-weight: 600; }
.workshop-banner .btn { align-self: flex-start; margin-top: 8px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-footer-bg);
  color: var(--c-footer-fg);
  padding: 48px 0 24px;
  margin-top: 64px;
}
.site-footer a { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
}
.footer-grid h4 {
  color: #fff; margin: 0 0 12px; font-size: 1rem;
  letter-spacing: .02em; text-transform: uppercase;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 6px 0; font-size: .92rem; }
.footer-bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .85rem;
  color: #99a3b8;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .quick-links { grid-template-columns: 1fr 1fr; }
  .docs-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-toggle { display: inline-block; }
  .nav-main {
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    display: none;
  }
  .nav-main.open { display: block; }
  .nav-main ul { flex-direction: column; padding: 8px 16px 16px; gap: 0; }
  .nav-main a { display: block; padding: 12px 8px; border-radius: 0; }
  .grid-3, .quick-links { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .workshop-banner { grid-template-columns: 1fr; }
  .workshop-banner-img { max-width: 320px; margin: 0 auto; }
  .news-item { grid-template-columns: 1fr; }
  .hero { padding: 60px 0; }
}
