/*--------------------------------------------------------------
# Crossing Paths: International Trade — Custom Styles
# publications-crossingpaths.css
# Depends on: main.css + txc.css
# Layout follows the Laredo Vision page: hero/intro + edition
# content in the left (lg-8) column, previous-editions sidebar
# (.lv-* — copied from publications-vision.css, same component)
# in the right (lg-4) column.
# Font sizes: rem only, min 0.75rem, multiples of 0.05
--------------------------------------------------------------*/

/* ══════════════════════════════════════════════════════════════
   INTRO HERO — Crossing Paths wordmark + what-is-this paragraph
   (replaces the Vision page's logo-image hero)
══════════════════════════════════════════════════════════════ */
.cp-hero {
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--default-color) 10%, transparent);
  border-radius: 14px;
  padding: 32px;
  margin-bottom: 32px;
}

.cp-hero-mark {
  display: flex;
  align-items: stretch;
  gap: 28px;
}

.cp-hero-mark-imgwrap {
  flex: 0 0 220px;
  min-height: 200px;
  border-radius: 10px;
  overflow: hidden;
}

.cp-hero-mark-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cp-hero-mark-text {
  line-height: 1.15;
  flex: 1;
  min-width: 0;
}

.cp-hero-mark-title {
  font-family: var(--heading-font);
  font-weight: 800;
  font-size: 2.3rem;
  color: var(--heading-color);
  letter-spacing: 0.01em;
  display: block;
}

.cp-hero-mark-sub {
  font-size: 0.9rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--default-color) 65%, transparent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-top: 0.3rem;
}

.cp-hero-desc {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--default-color);
  margin: 0.9rem 0 0;
}

.cp-hero-desc + .cp-hero-desc {
  margin-top: 1rem;
}

/* ══════════════════════════════════════════════════════════════
   EDITION HEADER — kicker, title, thesis, PDF download
══════════════════════════════════════════════════════════════ */
.cp-edition {
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--default-color) 10%, transparent);
  border-radius: 14px;
  padding: 36px 32px;
  margin-bottom: 1.5rem;
}

.cp-edition-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: color-mix(in srgb, var(--accent-gold) 18%, transparent);
  color: var(--heading-color);
  border: 1px solid color-mix(in srgb, var(--accent-gold) 45%, transparent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.cp-edition-title {
  font-family: var(--heading-font);
  font-weight: 800;
  font-size: 1.65rem;
  color: var(--heading-color);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.cp-edition-thesis {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--default-color);
  margin-bottom: 1.5rem;
}

.cp-edition-thesis strong { color: var(--heading-color); }

.cp-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent-color), color-mix(in srgb, var(--accent-color), #6c5ce7 20%));
  color: var(--contrast-color);
  padding: 0.7rem 1.6rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px color-mix(in srgb, var(--accent-color), transparent 70%);
}

.cp-pdf-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent-color), transparent 60%);
  color: var(--contrast-color);
}

.cp-credit {
  font-size: 0.82rem;
  color: color-mix(in srgb, var(--default-color) 55%, transparent);
  margin-top: 1rem;
}

/* ══════════════════════════════════════════════════════════════
   PART DIVIDER — "What Got Built" / "What It Returned"
══════════════════════════════════════════════════════════════ */
.cp-part-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2.5rem 0 1.25rem;
}

.cp-part-heading .cp-part-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--heading-color);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.cp-part-heading h3 {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--heading-color);
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   STAT BOXES — count-up callouts (3-up, stacks on mobile)
══════════════════════════════════════════════════════════════ */
.cp-stats {
  margin-bottom: 1.75rem;
}

.cp-stat-box {
  background: var(--surface-color);
  border-radius: 10px;
  padding: 1.25rem 1.1rem;
  height: 100%;
  text-align: center;
  box-shadow: 0 5px 15px color-mix(in srgb, var(--heading-color), transparent 93%);
  border-top: 3px solid var(--accent-gold);
  transition: transform 0.3s ease;
}

.cp-stat-box:hover { transform: translateY(-4px); }

.cp-stat-box .cp-countup {
  display: block;
  font-family: var(--heading-font);
  font-weight: 800;
  font-size: 1.9rem;
  color: var(--accent-color);
  line-height: 1.1;
}

.cp-stat-box .cp-stat-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--heading-color);
  margin-top: 0.4rem;
}

.cp-stat-box .cp-stat-sub {
  display: block;
  font-size: 0.75rem;
  color: color-mix(in srgb, var(--default-color) 60%, transparent);
  margin-top: 0.2rem;
}

/* ══════════════════════════════════════════════════════════════
   CHART SECTIONS
══════════════════════════════════════════════════════════════ */
.cp-chart-section {
  background: var(--surface-color);
  border-radius: 12px;
  padding: 1.5rem 1.5rem 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 5px 15px color-mix(in srgb, var(--heading-color), transparent 94%);
}

.cp-chart-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 0.25rem;
}

.cp-chart-subtitle {
  font-size: 0.8rem;
  color: color-mix(in srgb, var(--default-color) 60%, transparent);
  margin-bottom: 1rem;
}

.cp-chart-canvas-wrap {
  position: relative;
  height: 280px;
  width: 100%;
}

.cp-chart-canvas-wrap.cp-tall { height: 320px; }

.cp-chart-note {
  font-size: 0.78rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--default-color) 65%, transparent);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed color-mix(in srgb, var(--default-color) 15%, transparent);
}

.cp-chart-sidetext {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--default-color);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--default-color) 10%, transparent);
}

.cp-chart-sidetext strong { color: var(--heading-color); }

/* ══════════════════════════════════════════════════════════════
   TABLES — Nuevo Laredo market, Logistics employment by sector
══════════════════════════════════════════════════════════════ */
.cp-table-wrap {
  overflow-x: auto;
  margin-bottom: 0.5rem;
}

table.cp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

table.cp-table thead th {
  background: var(--heading-color);
  color: #fff;
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  text-align: left;
  white-space: nowrap;
}

table.cp-table thead th:first-child { border-radius: 6px 0 0 0; }
table.cp-table thead th:last-child { border-radius: 0 6px 0 0; }

table.cp-table tbody td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--default-color) 8%, transparent);
  color: var(--default-color);
}

table.cp-table tbody tr:last-child td { border-bottom: none; }

table.cp-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--background-color) 70%, transparent);
}

table.cp-table .cp-negative { color: #a13c3c; font-weight: 600; }
table.cp-table .cp-positive { color: #2f7a4f; font-weight: 600; }

/* ══════════════════════════════════════════════════════════════
   CLOSING BOX — "Where It Stands"
══════════════════════════════════════════════════════════════ */
.cp-closing {
  background: linear-gradient(135deg, var(--heading-color), var(--accent-color));
  color: #fff;
  border-radius: 14px;
  padding: 2rem;
  margin: 2rem 0;
}

.cp-closing-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}

.cp-closing h3 {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #fff;
}

.cp-closing p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.92);
  margin-bottom: 1.25rem;
}

.cp-closing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 1.25rem;
}

.cp-closing-grid .cp-countup {
  display: block;
  font-family: var(--heading-font);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--accent-gold);
}

.cp-closing-grid span.cp-closing-label {
  display: block;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.8);
  margin-top: 0.2rem;
}

/* ══════════════════════════════════════════════════════════════
   SOURCES
══════════════════════════════════════════════════════════════ */
.cp-sources {
  font-size: 0.78rem;
  line-height: 1.7;
  color: color-mix(in srgb, var(--default-color) 60%, transparent);
  margin-top: 1.5rem;
}

/* ══════════════════════════════════════════════════════════════
   SIDEBAR — Previous Editions (copied from publications-vision.css;
   same component, same classes, driven by a different JSON file)
══════════════════════════════════════════════════════════════ */
.lv-sidebar {
  position: sticky;
  top: 90px;
  background-color: var(--surface-color);
  border-radius: 8px;
  overflow: hidden;
}

.lv-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0;
  background: var(--surface-color);
  gap: 8px;
}

.lv-sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading-color);
  margin: 0;
  white-space: nowrap;
}

.lv-pagination { display: flex; align-items: center; gap: 4px; }

.lv-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 20px;
  border: none;
  background: transparent;
  color: var(--default-color);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--default-font);
  line-height: 1;
}

.lv-page-btn:hover { background: color-mix(in srgb, var(--accent-color) 10%, transparent); color: var(--accent-color); }
.lv-page-btn.active { background: var(--accent-color); color: #fff; }
.lv-page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Year buttons hold 4 digits, not 1-2 — swap the fixed 30px circle
   for an auto-width pill so "2026" doesn't get crushed. */
.lv-page-btn.lv-year-btn {
  width: auto;
  height: 26px;
  padding: 0 8px;
  border-radius: 13px;
  font-size: 0.78rem;
}
.lv-page-btn i { font-size: 0.95rem; }

.lv-tab-content { padding: 1.5rem; }

.lv-tab-post {
  padding: 1rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.lv-tab-post:first-child { padding-top: 0; }
.lv-tab-post:last-child { padding-bottom: 0; border-bottom: none; }

.lv-tab-post-img img {
  border-radius: 8px;
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}

.lv-tab-post-body {
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.lv-pdf-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: color-mix(in srgb, var(--accent-gold) 15%, transparent);
  color: var(--heading-color);
  border: 1px solid color-mix(in srgb, var(--accent-gold) 40%, transparent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 50px;
  text-decoration: none;
  width: fit-content;
  transition: all 0.2s ease;
}

.lv-pdf-pill:hover { background: var(--accent-gold); color: #fff; border-color: var(--accent-gold); }

.lv-post-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--heading-color);
  line-height: 1.4;
  margin: 0.35rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lv-post-meta {
  font-size: 0.8rem;
  color: color-mix(in srgb, var(--default-color) 60%, transparent);
  line-height: 1.4;
  margin: 2px 0 0;
}

.lv-post-city {
  font-size: 0.8rem;
  color: #737577;
  margin: 0;
}

.lv-sidebar-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--default-color) 50%, transparent);
}

/* Year heading above each page's group of editions */
.lv-year-heading {
  font-family: var(--heading-font);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--heading-color);
  padding-bottom: 0.6rem;
  margin-bottom: 0.6rem;
  border-bottom: 2px solid color-mix(in srgb, var(--accent-gold) 50%, transparent);
}

/* "Collected" badge on a year's annual compiled PDF */
.lv-collected-badge {
  display: inline-block;
  background: color-mix(in srgb, var(--heading-color) 10%, transparent);
  color: var(--heading-color);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 8px;
  border-radius: 50px;
  margin-bottom: 3px;
  margin-right: 4px;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 991px) {
  .lv-sidebar { position: static; margin-top: 32px; }
}

@media (max-width: 768px) {
  .cp-edition-title { font-size: 1.35rem; }
  .cp-hero-mark-title { font-size: 1.7rem; }
  /* Below ~991px the hero text wraps to many lines, so stretching
     the image to match the full row height (desktop behavior) would
     squeeze it into an unrecognizable sliver. Give it a fixed,
     still-large box instead and stop it stretching with the row. */
  .cp-hero-mark-imgwrap { flex: 0 0 170px; height: 190px; align-self: flex-start; }
  .cp-stat-box .cp-countup { font-size: 1.6rem; }
  .cp-chart-canvas-wrap { height: 230px; }
  .cp-chart-canvas-wrap.cp-tall { height: 260px; }
  .cp-closing { padding: 1.5rem; }
}

@media (max-width: 480px) {
  .cp-hero-mark { gap: 16px; }
  .cp-hero-mark-imgwrap { flex: 0 0 130px; height: 150px; align-self: flex-start; }
  .cp-hero-mark-title { font-size: 1.4rem; }
}

@media (max-width: 576px) {
  .cp-hero, .cp-edition { padding: 24px 20px; }
  .cp-chart-section { padding: 1.1rem 1.1rem 0.75rem; }
}
