/* ==========================================================================
   Eumax blog styles
   Every selector is scoped under .eu-blog, which wraps generated blog
   content only — the site header, nav, footer and modals sit outside it.
   validate_blog.py enforces this scoping and checks brace balance.
   ========================================================================== */

.eu-blog {
  --eu-blue: #104c88;
  --eu-blue-dark: #0b3661;
  --eu-amber: #eaa51e;
  --eu-ink: #1f1f1f;
  --eu-body: #3f4550;
  --eu-muted: #7b828c;
  --eu-line: #e4e8ee;
  --eu-bg: #f6f8fa;
  --eu-card: #fff;
  font-family: 'Montserrat', sans-serif;
  color: var(--eu-body);
  -webkit-font-smoothing: antialiased;
}

.eu-blog *,
.eu-blog *::before,
.eu-blog *::after { box-sizing: border-box; }

.eu-blog img { max-width: 100%; height: auto; }
.eu-blog a { text-decoration: none; }

/* ---------- page banner ---------- */
.eu-blog-banner {
  position: relative;
  background: linear-gradient(115deg, var(--eu-blue-dark), var(--eu-blue) 55%, #1a6bb8);
  padding: 46px 0 42px;
  overflow: hidden;
}
.eu-blog-banner::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -40px;
  width: 320px;
  height: 320px;
  border: 44px solid rgba(255, 255, 255, .05);
  border-radius: 50%;
}
.eu-blog-banner > .auto-container { position: relative; z-index: 2; }

.eu-crumb { font-size: 13px; color: rgba(255, 255, 255, .78); font-weight: 500; }
.eu-crumb a { color: rgba(255, 255, 255, .78); }
.eu-crumb a:hover { color: var(--eu-amber); }
.eu-crumb span { margin: 0 7px; opacity: .5; }

.eu-eyebrow {
  display: inline-block;
  background: var(--eu-amber);
  color: #1c1c1c;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 3px;
  margin: 16px 0 12px;
}

.eu-blog-banner h1 {
  font-size: 34px;
  line-height: 1.26;
  font-weight: 800;
  color: #fff;
  margin: 0;
  max-width: 860px;
  letter-spacing: -.018em;
}

.eu-lede {
  color: rgba(255, 255, 255, .88);
  font-size: 15.5px;
  max-width: 640px;
  margin: 14px 0 0;
  line-height: 1.65;
}

.eu-byline {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 20px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .85);
  font-weight: 500;
}
.eu-who { display: flex; align-items: center; gap: 9px; }
.eu-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--eu-amber);
  color: var(--eu-blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
}

/* ---------- index: featured ---------- */
.eu-blog-wrap { background: var(--eu-bg); padding: 0 0 60px; }
.eu-featured { margin: -34px 0 46px; position: relative; z-index: 3; }

.eu-feat {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--eu-card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(16, 76, 136, .13);
}
.eu-feat-img { position: relative; min-height: 340px; background: var(--eu-blue-dark); }
.eu-feat-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.eu-flag {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  background: var(--eu-amber);
  color: #1c1c1c;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 3px;
}
.eu-feat-body { padding: 38px 40px; display: flex; flex-direction: column; justify-content: center; }
.eu-cat {
  color: var(--eu-blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.eu-feat-body h2 {
  font-size: 26px;
  line-height: 1.28;
  font-weight: 700;
  color: var(--eu-ink);
  margin: 12px 0 14px;
}
.eu-feat-body p { font-size: 14.5px; line-height: 1.72; margin: 0 0 20px; color: var(--eu-body); }
.eu-more { display: inline-flex; align-items: center; gap: 9px; color: var(--eu-blue); font-weight: 700; font-size: 13.5px; }
.eu-more i { transition: transform .22s; }
.eu-feat:hover .eu-more i { transform: translateX(5px); }

/* ---------- index: filters ---------- */
.eu-filterbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.eu-chips { display: flex; gap: 9px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; flex: 1; }
.eu-chips::-webkit-scrollbar { display: none; }
.eu-chip {
  white-space: nowrap;
  border: 1.5px solid var(--eu-line);
  background: #fff;
  color: var(--eu-body);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 17px;
  border-radius: 40px;
  cursor: pointer;
  transition: all .18s;
}
.eu-chip:hover { border-color: var(--eu-blue); color: var(--eu-blue); }
.eu-chip.on { background: var(--eu-blue); border-color: var(--eu-blue); color: #fff; }
.eu-n { opacity: .6; font-weight: 500; margin-left: 5px; font-size: 11px; }
.eu-count { font-size: 12.5px; color: var(--eu-muted); margin: 16px 0 22px; font-weight: 500; }

/* ---------- cards ---------- */
.eu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.eu-card {
  background: var(--eu-card);
  border: 1px solid var(--eu-line);
  border-radius: 7px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform .22s, box-shadow .22s;
}
.eu-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(16, 76, 136, .12); }
.eu-card-img { position: relative; aspect-ratio: 16 / 10; background: var(--eu-blue-dark); overflow: hidden; }
.eu-card-img img { width: 100%; height: 100%; object-fit: cover; }
.eu-ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--eu-blue-dark), var(--eu-blue) 60%, #1a6bb8);
  overflow: hidden;
}
.eu-ph::after {
  content: "";
  position: absolute;
  right: -34px; bottom: -46px;
  width: 150px; height: 150px;
  border: 22px solid rgba(255, 255, 255, .07);
  border-radius: 50%;
}
.eu-ph-mark {
  position: relative; z-index: 1;
  color: rgba(255, 255, 255, .82);
  font-size: 15px; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase;
}
.eu-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  background: rgba(255, 255, 255, .95);
  color: var(--eu-blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 0 4px 0 0;
}
.eu-card-body { padding: 20px 21px 22px; display: flex; flex-direction: column; flex: 1; }
.eu-card-body h3 { font-size: 16px; line-height: 1.38; font-weight: 700; color: var(--eu-ink); margin: 0 0 10px; }
.eu-card:hover .eu-card-body h3 { color: var(--eu-blue); }
.eu-card-body p { font-size: 13.3px; line-height: 1.68; margin: 0 0 18px; color: var(--eu-body); flex: 1; }
.eu-card-meta {
  display: flex;
  gap: 13px;
  font-size: 11.5px;
  color: var(--eu-muted);
  font-weight: 500;
  border-top: 1px solid var(--eu-line);
  padding-top: 13px;
}

/* ---------- pagination ---------- */
.eu-pager { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 48px 0 0; }
.eu-pg {
  min-width: 40px;
  height: 40px;
  border: 1.5px solid var(--eu-line);
  background: #fff;
  border-radius: 5px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--eu-body);
  cursor: pointer;
  padding: 0 12px;
  transition: all .18s;
}
.eu-pg:hover:not(:disabled) { border-color: var(--eu-blue); color: var(--eu-blue); }
.eu-pg.on { background: var(--eu-blue); border-color: var(--eu-blue); color: #fff; }
.eu-pg:disabled { opacity: .35; cursor: not-allowed; }
.eu-empty { text-align: center; padding: 70px 20px; color: var(--eu-muted); grid-column: 1 / -1; }

/* ---------- post layout ---------- */
.eu-post-wrap { padding: 0 0 20px; }
.eu-shell { display: grid; grid-template-columns: 262px 1fr; gap: 52px; padding: 44px 0 20px; align-items: start; }
.eu-rail { position: sticky; top: 24px; }
.eu-toc-h {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--eu-muted);
  margin-bottom: 14px;
}
.eu-toc {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
  border-left: 2px solid var(--eu-line);
  max-height: 52vh;
  overflow-y: auto;
}
.eu-toc li { margin: 0; }
.eu-toc li a {
  display: block;
  padding: 7px 0 7px 15px;
  font-size: 12.8px;
  line-height: 1.45;
  color: var(--eu-muted);
  font-weight: 500;
  margin-left: -2px;
  border-left: 2px solid transparent;
  transition: all .16s;
}
.eu-toc li a:hover { color: var(--eu-blue); }
.eu-toc li a.on { color: var(--eu-blue); border-left-color: var(--eu-blue); font-weight: 600; }

.eu-share { display: flex; gap: 8px; margin-bottom: 28px; }
.eu-share a {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--eu-line);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--eu-muted);
  font-size: 13px;
  transition: all .18s;
}
.eu-share a:hover { background: var(--eu-blue); border-color: var(--eu-blue); color: #fff; }

.eu-railcta {
  background: linear-gradient(150deg, var(--eu-blue-dark), var(--eu-blue));
  border-radius: 8px;
  padding: 22px 20px;
  color: #fff;
}
.eu-railcta h4 { font-size: 15px; font-weight: 700; margin: 0 0 8px; line-height: 1.35; color: #fff; }
.eu-railcta p { font-size: 12.4px; line-height: 1.62; margin: 0 0 16px; color: rgba(255, 255, 255, .85); }
.eu-railcta a {
  display: block;
  text-align: center;
  background: var(--eu-amber);
  color: #1c1c1c;
  font-weight: 700;
  font-size: 12.8px;
  padding: 11px;
  border-radius: 5px;
  transition: filter .18s;
}
.eu-railcta a:hover { filter: brightness(1.08); }

/* ---------- article body ---------- */
.eu-art { max-width: 760px; min-width: 0; }
.eu-hero { border-radius: 8px; overflow: hidden; margin-bottom: 34px; background: var(--eu-blue-dark); }
.eu-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.eu-art p { font-size: 15.5px; line-height: 1.78; margin: 0 0 21px; text-align: left !important; }
.eu-art h2 {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--eu-ink);
  margin: 44px 0 16px;
  scroll-margin-top: 24px;
}
.eu-art h3 { font-size: 18px; line-height: 1.36; font-weight: 700; color: var(--eu-ink); margin: 32px 0 12px; }
.eu-art ul, .eu-art ol { margin: 0 0 22px; padding-left: 22px; }
.eu-art li { font-size: 15.2px; line-height: 1.72; margin-bottom: 9px; text-align: left !important; }
.eu-art p a,
.eu-art li a,
.eu-art td a { color: var(--eu-blue); font-weight: 600; }
.eu-art p a:hover,
.eu-art li a:hover,
.eu-art td a:hover { text-decoration: underline; }
.eu-lead { font-size: 17px !important; line-height: 1.72 !important; color: var(--eu-ink); font-weight: 500; }

.eu-tbl {
  overflow-x: auto;
  margin: 26px 0 30px;
  border: 1px solid var(--eu-line);
  border-radius: 7px;
  -webkit-overflow-scrolling: touch;
}
.eu-tbl table { border-collapse: collapse; width: 100%; min-width: 540px; font-size: 13.8px; }
.eu-tbl th {
  background: var(--eu-blue);
  color: #fff;
  text-align: left;
  padding: 13px 15px;
  font-weight: 600;
  font-size: 12.8px;
  white-space: nowrap;
}
.eu-tbl td { padding: 12px 15px; border-top: 1px solid var(--eu-line); line-height: 1.55; }
.eu-tbl tbody tr:nth-child(even) { background: #fafbfc; }
.eu-tbl-note {
  font-size: 12.3px !important;
  color: var(--eu-muted);
  margin: -18px 0 30px !important;
  font-style: italic;
}

.eu-callout {
  background: #f0f5fb;
  border-left: 3px solid var(--eu-blue);
  border-radius: 0 6px 6px 0;
  padding: 18px 22px;
  margin: 28px 0;
}
.eu-callout p { margin: 0 !important; font-size: 14.4px; line-height: 1.7; }
.eu-callout strong { color: var(--eu-blue); }

/* ---------- FAQ ---------- */
.eu-faq { margin: 16px 0 8px; border-top: 1px solid var(--eu-line); }
.eu-faq details { border-bottom: 1px solid var(--eu-line); }
.eu-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 17px 34px 17px 0;
  font-size: 15.2px;
  font-weight: 600;
  color: var(--eu-ink);
  position: relative;
  line-height: 1.5;
}
.eu-faq summary::-webkit-details-marker { display: none; }
.eu-faq summary::after {
  content: "\f067";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  right: 4px;
  top: 19px;
  font-size: 12px;
  color: var(--eu-blue);
}
.eu-faq details[open] summary::after { content: "\f068"; }
.eu-faq details p { padding: 0 0 18px; margin: 0 !important; font-size: 14.6px; color: var(--eu-body); }

/* ---------- CTAs ---------- */
.eu-endcta {
  background: linear-gradient(140deg, var(--eu-blue-dark), var(--eu-blue));
  border-radius: 9px;
  padding: 34px 36px;
  margin: 48px 0 10px;
  color: #fff;
}
.eu-endcta h3 { color: #fff; font-size: 21px; margin: 0 0 10px; font-weight: 700; }
.eu-endcta p { color: rgba(255, 255, 255, .87); font-size: 14.5px; margin: 0 0 20px !important; line-height: 1.68; }
.eu-btns { display: flex; gap: 11px; flex-wrap: wrap; }
.eu-endcta .eu-btn-a,
.eu-btn-a {
  background: var(--eu-amber);
  color: #1c1c1c;
  font-weight: 700;
  font-size: 13.4px;
  padding: 12px 22px;
  border-radius: 5px;
}
.eu-btn-a:hover { filter: brightness(1.08); }
.eu-endcta .eu-btn-b,
.eu-btn-b {
  border: 1.5px solid rgba(255, 255, 255, .5);
  color: #fff;
  font-weight: 600;
  font-size: 13.4px;
  padding: 11px 21px;
  border-radius: 5px;
}
.eu-btn-b:hover { background: rgba(255, 255, 255, .12); }

/* ---------- prev / next ---------- */
.eu-prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 44px 0 0;
  padding-top: 30px;
  border-top: 1px solid var(--eu-line);
}
.eu-art .eu-pn,
.eu-pn { border: 1px solid var(--eu-line); border-radius: 7px; padding: 16px 18px; transition: border-color .2s; }
.eu-pn:hover { border-color: var(--eu-blue); }
.eu-lbl {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--eu-muted);
  margin-bottom: 7px;
}
.eu-t { font-size: 14px; font-weight: 600; color: var(--eu-ink); line-height: 1.42; }
.eu-pn.next { text-align: right; }

/* ---------- related ---------- */
.eu-related { background: var(--eu-bg); padding: 52px 0 62px; margin-top: 56px; border-top: 1px solid var(--eu-line); }
.eu-related h3 { font-size: 21px; font-weight: 700; color: var(--eu-ink); margin: 0 0 26px; }
.eu-backlink { margin-top: 34px; }
.eu-backlink a { color: var(--eu-blue); font-weight: 600; font-size: 13.5px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .eu-shell { grid-template-columns: 1fr; gap: 0; }
  .eu-rail { position: static; margin-bottom: 34px; }
  .eu-toc { max-height: none; margin-bottom: 22px; }
  .eu-art { max-width: 100%; }
  .eu-art p, .eu-art li { text-align: left !important; }
}

@media (max-width: 991px) {
  .eu-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .eu-feat { grid-template-columns: 1fr; }
  .eu-feat-img { min-height: 230px; }
  .eu-feat-body { padding: 30px 28px; }
  .eu-feat-body h2 { font-size: 22px; }
  .eu-blog-banner h1 { font-size: 27px; }
  .eu-art p, .eu-art li { text-align: left !important; }
}

@media (max-width: 767px) {
  .eu-grid { grid-template-columns: 1fr; }
  .eu-prevnext { grid-template-columns: 1fr; }
  .eu-pn.next { text-align: left; }
  .eu-blog-banner { padding: 38px 0 40px; }
  .eu-blog-banner h1 { font-size: 23px; }
  .eu-featured { margin: -26px 0 36px; }
  .eu-feat-body { padding: 26px 22px; }
  .eu-feat-body h2 { font-size: 19.5px; }
  .eu-art h2 { font-size: 20px; margin: 36px 0 14px; }
  .eu-art p { font-size: 15px; text-align: left !important; }
  .eu-art li { text-align: left !important; }
  .eu-endcta { padding: 26px 22px; }
}

@media (max-width: 380px) {
  .eu-blog-banner h1 { font-size: 21px; }
  .eu-art p, .eu-art li { text-align: left !important; }
}

@media (prefers-reduced-motion: reduce) {
  .eu-blog *, .eu-blog *::before, .eu-blog *::after {
    transition: none !important;
    animation: none !important;
  }
}