/*
 * mesh-magazine.css — Mesh Magazine (blog) cream-paper templates.
 *
 * Two server-rendered shortcodes own their own markup, so layout is fully in
 * our control (unlike injected CSS over an Elementor template):
 *   #mesh-mag-article  → templates/pages/magazine-single.php  [mesh_magazine_single]
 *   #mesh-mag-index    → templates/pages/magazine-index.php   [mesh_magazine_index]
 *
 * Everything is scoped under .mesh-mag so it never touches venue/portal pages.
 * Both wrappers full-bleed-break out of the boxed Elementor container the
 * shortcode renders inside (same trick as #venue-wrap).
 */

.mesh-mag {
  --mz-black:   #0a0a0a;
  --mz-white:   #f5f2eb;   /* cream paper */
  --mz-yellow:  #ffe135;
  --mz-purple:  #7c3aff;
  --mz-ink2:    #3a3a3a;
  --mz-ink3:    #777;
  --mz-rule:    #d4d0c8;
  --mz-head:    'Barlow Condensed', sans-serif;
  --mz-body:    'Space Grotesk', sans-serif;

  /* Full-width cream paper. The wrapping Elementor container is boxed, so the
   * shortcode's neutraliser (shortcode-magazine.php) widens the whole ancestor
   * chain to full width + cream; this block then fills it. Centring of the
   * actual content is done by .mz-shell / .mz-index-inner, NOT viewport math. */
  position: relative;
  width: 100%;
  background: var(--mz-white);
  color: var(--mz-black);
  font-family: var(--mz-body);
  overflow-x: hidden;
}

/* Centred content shell (single article). */
.mz-shell { max-width: 1280px; margin: 0 auto; padding: 0 clamp(22px, 4vw, 56px); }
.mesh-mag *, .mesh-mag *::before, .mesh-mag *::after { box-sizing: border-box; }
.mesh-mag img { display: block; max-width: 100%; }
.mesh-mag a { color: inherit; text-decoration: none; }

/* Suppress the Astra/Elementor breadcrumb + title the template would otherwise
 * stack above our own header. */
.mesh-mag .ast-breadcrumbs-wrapper,
.mesh-mag .breadcrumb-trail { display: none; }

.mz-h    { font-family: var(--mz-head); text-transform: uppercase; }
.mz-kick { font-family: var(--mz-head); text-transform: uppercase; font-weight: 700;
           letter-spacing: 0.13em; color: var(--mz-purple); }

/* ═══════════════════════════════════════════════════════════════════════════
 * SINGLE ARTICLE
 * ═══════════════════════════════════════════════════════════════════════════ */
#mesh-mag-article { padding: 52px 0 64px; }

/* Text measure, centred inside .mz-shell. Hero + related span the full shell. */
.mz-col { max-width: 880px; margin: 0 auto; }

.mz-article-kick { font-size: 13px; margin-bottom: 18px; display: block; }
.mz-article-kick a { color: var(--mz-purple); }

.mz-title {
  font-family: var(--mz-head);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--mz-black);
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.9;
  letter-spacing: -0.015em;
  margin: 0 0 20px;
}
.mz-dek {
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.45;
  color: var(--mz-ink2);
  font-weight: 500;
  margin: 0 0 24px;
  max-width: 640px;
}
.mz-byline {
  font-family: var(--mz-head);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  color: var(--mz-ink3);
  border-top: 1px solid var(--mz-rule);
  border-bottom: 1px solid var(--mz-rule);
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

/* Hero: full shell width, locked to a standard cinematic band so any source
 * image (portrait, huge, tiny) renders at a consistent size. */
.mz-hero { margin: 38px 0 58px; }
.mz-hero img { width: 100%; height: clamp(320px, 40vw, 520px); object-fit: cover; display: block; }
.mz-hero figcaption {
  font-family: var(--mz-head);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  color: var(--mz-ink3);
  margin-top: 12px;
}

/* Body copy. */
.mz-body { font-size: 18px; line-height: 1.75; color: #1a1a1a; }
.mz-body p { margin: 0 0 1.3em; }
.mz-body h2, .mz-body h3 {
  font-family: var(--mz-head);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.02;
  color: var(--mz-black);
  margin: 1.7em 0 0.5em;
}
.mz-body h2 { font-size: clamp(26px, 3.4vw, 40px); }
.mz-body h3 { font-size: clamp(21px, 2.6vw, 28px); }
.mz-body a { color: var(--mz-purple); text-decoration: underline; text-underline-offset: 2px; }
.mz-body img { margin: 1.4em 0; }
.mz-body ul, .mz-body ol { margin: 0 0 1.3em 1.2em; }
.mz-body li { margin-bottom: 0.5em; }

/* Drop cap on the opening paragraph. */
.mz-body > p:first-of-type::first-letter {
  font-family: var(--mz-head);
  font-weight: 900;
  text-transform: uppercase;
  float: left;
  font-size: 5rem;
  line-height: 0.72;
  padding: 9px 14px 0 0;
  color: var(--mz-purple);
}

/* Pull-quote. */
.mz-body blockquote {
  font-family: var(--mz-head);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.04;
  color: var(--mz-black);
  border: 0;
  border-left: 7px solid var(--mz-yellow);
  padding: 4px 0 4px 26px;
  margin: 1.6em 0;
}
.mz-body blockquote p { margin: 0; }

/* Tags row. */
.mz-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  border-top: 1px solid var(--mz-rule);
  margin-top: 30px;
  padding-top: 18px;
}
.mz-tags a {
  font-family: var(--mz-head);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 700;
  color: var(--mz-purple);
}

/* Related rail. */
.mz-related { margin-top: 40px; }
.mz-related-inner { border-top: 1.5px solid var(--mz-black); padding-top: 20px; }
.mz-related-title { font-weight: 800; font-size: 23px; letter-spacing: 0.02em; margin-bottom: 18px; }
.mz-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.mz-card-thumb { width: 100% !important; height: 150px !important; object-fit: cover !important; background: var(--mz-rule); }
.mz-card-kick { display: block; font-size: 10px; letter-spacing: 0.12em; margin: 11px 0 4px; }
.mz-card-title {
  font-family: var(--mz-head);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.98;
  color: var(--mz-black);
  font-size: 18px;
}

/* ═══════════════════════════════════════════════════════════════════════════
 * INDEX / COVER
 * ═══════════════════════════════════════════════════════════════════════════ */
#mesh-mag-index { padding: 30px 0 56px; }
.mz-index-inner { max-width: 1360px; margin: 0 auto; padding: 0 clamp(22px, 4vw, 56px); }

/* Nameplate. */
.mz-nameplate {
  text-align: center;
  border-top: 1.5px solid var(--mz-black);
  border-bottom: 1.5px solid var(--mz-black);
  padding: 16px 0 12px;
  margin-bottom: 30px;
}
.mz-nameplate-name {
  font-family: var(--mz-head);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(44px, 9vw, 104px);
  line-height: 0.84;
  letter-spacing: -0.02em;
  color: var(--mz-black);
}
.mz-nameplate-tag {
  font-family: var(--mz-head);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 12px;
  color: var(--mz-ink2);
  margin-top: 8px;
}

/* Top band: lead story + "Lo último" list. */
.mz-top { display: grid; grid-template-columns: 1.6fr 1fr; gap: 30px; }
/* !important: Astra's article img rules otherwise let the lead grow unbounded. */
.mz-lead-img { width: 100% !important; height: clamp(300px, 30vw, 440px) !important; object-fit: cover !important; background: var(--mz-purple); }
.mz-lead-kick { display: block; font-size: 12px; margin: 16px 0 6px; }
.mz-lead-title {
  font-family: var(--mz-head);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.94;
  color: var(--mz-black);
  font-size: clamp(28px, 3.8vw, 46px);
}
.mz-lead-dek { font-size: 15px; color: var(--mz-ink2); line-height: 1.5; margin-top: 10px; max-width: 92%; }
.mz-lead-meta { font-family: var(--mz-head); text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; color: var(--mz-ink3); margin-top: 12px; }

.mz-latest-title {
  font-family: var(--mz-head);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--mz-black);
  border-bottom: 2px solid var(--mz-black);
  padding-bottom: 8px;
  margin-bottom: 2px;
}
.mz-latest-item { display: block; border-bottom: 1px solid var(--mz-rule); padding: 13px 0; }
.mz-latest-item:last-child { border-bottom: 0; }
.mz-latest-item .mz-card-kick { font-size: 10px; margin: 0 0 3px; }
.mz-latest-item .mz-card-title { font-size: 20px; }

/* Bottom grid. */
.mz-grid {
  border-top: 1.5px solid var(--mz-black);
  margin-top: 32px;
  padding-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.mz-grid .mz-card-thumb { height: 150px; }
.mz-grid .mz-card-title { font-size: 22px; }
.mz-grid .mz-card-dek { font-size: 13px; color: var(--mz-ink2); line-height: 1.45; margin-top: 6px; }

/* Load-more: appended cards (same look as the grid, no rule) + the button. */
.mz-more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mz-more-grid:not(:empty) { margin-top: 24px; }
.mz-more-grid .mz-card-thumb { height: 150px; }
.mz-more-grid .mz-card-title { font-size: 22px; }
.mz-more-grid .mz-card-dek { font-size: 13px; color: var(--mz-ink2); line-height: 1.45; margin-top: 6px; }
.mz-more-wrap { text-align: center; margin-top: 40px; }
/* Scoped under the id + !important so Astra/Elementor's global button styles
 * (theme background, radius, shadow) can't slide in over it. */
#mesh-mag-index .mz-more-btn {
  display: inline-block;
  font-family: var(--mz-head) !important;
  text-transform: uppercase !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  font-size: 16px !important;
  line-height: 1 !important;
  color: var(--mz-black) !important;
  background: transparent !important;
  border: 1.5px solid var(--mz-black) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  width: auto !important;
  padding: 15px 42px !important;
  margin: 0 !important;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
#mesh-mag-index .mz-more-btn:hover {
  background: var(--mz-black) !important;
  color: var(--mz-white) !important;
}

/* ── Responsive ─────────────────────────────────────────────────────────────*/
@media (max-width: 880px) {
  .mz-top { grid-template-columns: 1fr; gap: 28px; }
  .mz-grid, .mz-more-grid { grid-template-columns: 1fr 1fr; }
  .mz-related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .mz-grid, .mz-more-grid, .mz-related-grid { grid-template-columns: 1fr; }
  .mz-byline { flex-direction: column; gap: 4px; }
  #mesh-mag-article { padding: 36px 0 48px; }
}
