/* ZXD2400 Thai Manual — Wiki Theme */

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

body {
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  background: #c8ccd1;
  color: #202122;
}

/* ── Header ───────────────────────────────── */
.wiki-header {
  background: #1c2d5a;
  border-bottom: 3px solid #3a6bbf;
}
.wiki-header-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.wiki-site-name {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 0.3px;
}
.wiki-site-name:hover { color: #c8d8ff; }

/* ── Breadcrumb ───────────────────────────── */
.wiki-breadcrumb {
  background: #eaecf0;
  border-bottom: 1px solid #c8ccd1;
  padding: 6px 20px;
  font-size: 13px;
  color: #54595d;
  max-width: 100%;
}
.wiki-breadcrumb-inner {
  max-width: 1060px;
  margin: 0 auto;
}
.wiki-breadcrumb a { color: #0645ad; text-decoration: none; }
.wiki-breadcrumb a:hover { text-decoration: underline; }
.wiki-breadcrumb span { color: #72777d; }

/* ── Page wrapper ─────────────────────────── */
.wiki-body {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  gap: 0;
}

/* ── Main content ─────────────────────────── */
.wiki-content {
  flex: 1;
  background: #ffffff;
  border-left: 1px solid #c8ccd1;
  border-right: 1px solid #c8ccd1;
  padding: 28px 40px 48px;
  min-height: calc(100vh - 130px);
}

/* ── Typography ───────────────────────────── */
h1.wiki-title {
  font-size: 24px;
  font-weight: normal;
  border-bottom: 1px solid #c8ccd1;
  padding-bottom: 6px;
  margin-bottom: 20px;
  color: #202122;
}
h2.wiki-h2 {
  font-size: 18px;
  font-weight: 600;
  border-left: 4px solid #3a6bbf;
  border-bottom: 1px solid #c8ccd1;
  padding: 6px 10px;
  margin: 28px 0 12px;
  background: #f0f4ff;
  color: #1c2d5a;
  border-radius: 0 2px 0 0;
}
h3.wiki-h3 {
  font-size: 16px;
  font-weight: bold;
  margin: 20px 0 8px;
  color: #202122;
}
p { margin-bottom: 12px; }
a { color: #0645ad; text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: #202122; }

/* ── Tables ───────────────────────────────── */
table.wikitable {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
  font-size: 14px;
  background: #fff;
}
table.wikitable th {
  background: #eaecf0;
  border: 1px solid #a2a9b1;
  padding: 8px 12px;
  text-align: center;
  font-weight: bold;
  font-size: 15px;
}
table.wikitable td {
  border: 1px solid #a2a9b1;
  padding: 8px 12px;
  vertical-align: top;
}
table.wikitable td.center { text-align: center; color: #72777d; font-size: 13px; }
table.wikitable td img { display: block; margin: 0 auto; }

/* EEPROM / parameter tables */
table.param-table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
  font-size: 13px;
}
table.param-table th {
  background: #eaecf0;
  border: 1px solid #a2a9b1;
  padding: 6px 10px;
  text-align: center;
  font-weight: bold;
}
table.param-table td {
  border: 1px solid #a2a9b1;
  padding: 6px 10px;
  vertical-align: top;
}
table.param-table tr:nth-child(even) td { background: #f8f9fa; }

/* ── Info / Warning boxes ─────────────────── */
.box {
  border-radius: 4px;
  padding: 12px 16px;
  margin: 14px 0;
  font-size: 14px;
  line-height: 1.6;
}
.box-info {
  background: #eaf3fb;
  border: 1px solid #a2c4e0;
  border-left: 4px solid #3388cc;
}
.box-note {
  background: #f0f8e8;
  border: 1px solid #a8cc80;
  border-left: 4px solid #4aaa30;
}
.box-warning {
  background: #fff8e8;
  border: 1px solid #f0c060;
  border-left: 4px solid #e08820;
}
.box-danger {
  background: #fff0f0;
  border: 1px solid #e0a0a0;
  border-left: 4px solid #cc2222;
  font-weight: bold;
}

/* ── Navigation buttons ───────────────────── */
.page-nav {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 5px 14px;
  background: #f8f9fa;
  border: 1px solid #a2a9b1;
  border-radius: 3px;
  color: #0645ad;
  font-size: 14px;
  text-decoration: none;
}
.btn:hover { background: #eaecf0; text-decoration: none; }

/* ── Index page cards ─────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #72777d;
  margin: 32px 0 10px;
  padding-left: 2px;
}
.section-label:first-child { margin-top: 8px; }
a.card {
  display: block;
  background: #fff;
  border: 1px solid #c8ccd1;
  border-left: 4px solid #3a6bbf;
  border-radius: 4px;
  padding: 16px 20px;
  margin-bottom: 10px;
  text-decoration: none;
  transition: box-shadow 0.15s, border-left-color 0.15s;
}
a.card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.1); text-decoration: none; }
a.card h2 { font-size: 17px; color: #0645ad; margin-bottom: 4px; font-weight: 600; }
a.card p { font-size: 14px; color: #54595d; margin: 0; }
a.card.teal { border-left-color: #2a9d82; }
a.card.teal h2 { color: #196b55; }
a.card.amber { border-left-color: #c87c20; }
a.card.amber h2 { color: #7a3e00; }
a.card.green { border-left-color: #4aaa60; }
a.card.green h2 { color: #1e5c2c; }

/* ── HR ───────────────────────────────────── */
hr.wiki-hr {
  border: none;
  border-top: 1px solid #c8ccd1;
  margin: 24px 0;
}

/* ── Lists ────────────────────────────────── */
ul.wiki-list, ol.wiki-list {
  padding-left: 28px;
  margin: 10px 0 14px;
}
ul.wiki-list li, ol.wiki-list li { margin-bottom: 8px; }

/* ── Footer ───────────────────────────────── */
.wiki-footer {
  background: #eaecf0;
  border-top: 1px solid #c8ccd1;
  padding: 14px 20px;
  text-align: center;
  font-size: 13px;
  color: #72777d;
}

/* ── Buy banner (above footer) ───────────── */
.wiki-buy {
  background: #fffbf0;
  border-top: 2px solid #c87c20;
  padding: 10px 20px;
  text-align: center;
  font-size: 14px;
}
.wiki-buy a { color: #7a3e00; font-weight: bold; text-decoration: none; }
.wiki-buy a:hover { text-decoration: underline; color: #c87c20; }

/* ── Homepage buy banner (inline) ────────── */
.buy-banner {
  background: #fffbf0;
  border: 1px solid #f0c060;
  border-left: 4px solid #c87c20;
  border-radius: 4px;
  padding: 14px 18px;
  margin: 14px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.buy-banner img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid #f0c060;
}
.buy-banner-text { flex: 1; }
.buy-banner a { color: #7a3e00; font-weight: bold; text-decoration: none; font-size: 15px; }
.buy-banner a:hover { text-decoration: underline; color: #c87c20; }
@media (max-width: 680px) {
  .buy-banner { flex-direction: column; align-items: flex-start; }
  .buy-banner img { width: 100%; height: 160px; }
}

/* ── YouTube embed ───────────────────────── */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid #c8ccd1;
  border-radius: 4px;
}
.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 680px) {
  .wiki-content { padding: 16px 14px 32px; }
  h1.wiki-title { font-size: 20px; }
  table.wikitable { font-size: 13px; }
  table.param-table { font-size: 12px; }
}
