/* Mundi brand overrides — v0.2 (3-level visual loop, iteration 2).
   Reference: mundi.io blog (Ghost/Midnight). Primary #f05a26; Lato/Mulish/Roboto. */

:root {
  --mundi-primary: #f05a26;
  --mundi-ink: #15171a;
  --mundi-navy: #15233f;
}

/* ---- Article body ---- */
.wp-block-post-content {
  font-family: "Mulish", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: #2b2b2b;
}
.wp-block-post-title {
  font-family: "Lato", system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.18;
  color: var(--mundi-ink);
}
.wp-block-post-content h2,
.wp-block-post-content .wp-block-heading {
  font-family: "Lato", system-ui, sans-serif;
  font-weight: 800;
  color: var(--mundi-ink);
}
.mundi-eyebrow a { color: var(--mundi-primary); text-decoration: none; }
.mundi-date { color: #8a8f98; }
a { color: var(--mundi-primary); }

/* Single-post hero image — tidy banner like the Mundi blog (not a giant) */
.mundi-post-hero img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
/* Inline content images stay within the reading column */
.wp-block-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 14px 0;
}
.wp-block-post-content figure { margin: 14px 0; }
.wp-block-post-content h2,
.wp-block-post-content h3 { margin-top: 28px; }

/* ---- Header ---- */
.mundi-header { border-bottom: 1px solid #ededed; }
.mundi-header a { color: var(--mundi-ink); text-decoration: none; }
.mundi-logo img { display: block; }

/* ---- Footer (navy) ---- */
.mundi-footer a { color: #ffffff; opacity: 0.85; text-decoration: none; }
.mundi-footer a:hover { opacity: 1; }
.mundi-footer h4 { color: var(--mundi-primary); margin-bottom: 8px; font-family: "Lato", sans-serif; }
.mundi-copyright { opacity: 0.7; }

/* ---- Author byline (under title) ---- */
.mundi-byline { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; }
.mundi-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--mundi-primary);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-family: "Lato", sans-serif; font-weight: 800; font-size: 16px;
}
.mundi-byline-name { font-family: "Lato", sans-serif; font-weight: 700; color: var(--mundi-ink); font-size: 14px; }

/* ---- Sidebar lead form (navy-headed, like the Mundi blog) ---- */
.mundi-leadform { border: 1px solid #e6e6e6; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 34px rgba(0,0,0,0.07); background: #fff; }
.mundi-leadform-head { background: var(--mundi-navy); color: #fff; font-family: "Lato", sans-serif; font-weight: 800; font-size: 18px; line-height: 1.25; padding: 18px 20px; }
.mundi-leadform-body { padding: 18px 20px; }
.mundi-leadform-body input { width: 100%; box-sizing: border-box; padding: 11px 13px; border: 1px solid #dcdcdc; border-radius: 6px; font-size: 14px; margin-bottom: 10px; }
.mundi-leadform-q { font-size: 13px; font-weight: 700; color: var(--mundi-navy); margin: 12px 0 6px; }
.mundi-leadform-opts { display: flex; gap: 8px; margin-bottom: 8px; }
.mundi-leadform-opts span { flex: 1; text-align: center; border: 1px solid #dcdcdc; border-radius: 6px; padding: 9px; font-size: 13px; color: #555; }
.mundi-leadform .mundi-form-btn { display: block; text-align: center; margin-top: 8px; }

/* ---- Sidebar lead form (sticky right rail) ---- */
.mundi-sidebar { position: sticky; top: 90px; }
.mundi-form {
  position: relative;
  background: #ffffff;
  border: 1px solid #ececec;
  border-radius: 10px;
  padding: 26px 24px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.07);
}
.mundi-form h3 {
  font-family: "Lato", system-ui, sans-serif;
  font-weight: 800;
  font-size: 20px;
  line-height: 1.25;
  color: var(--mundi-ink);
  margin: 0 0 10px;
}
.mundi-form p { font-family: "Mulish", sans-serif; font-size: 14px; color: #555; margin: 0 0 14px; }
.mundi-form input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 12px;
}
.mundi-form-btn {
  display: inline-block;
  background: var(--mundi-primary);
  color: #ffffff !important;
  padding: 12px 22px;
  border-radius: 6px;
  font-family: "Lato", sans-serif;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.mundi-form-dots {
  position: absolute;
  top: -10px; right: -10px;
  width: 64px; height: 64px;
  background-image: radial-gradient(var(--mundi-primary) 2px, transparent 2px);
  background-size: 12px 12px;
  opacity: 0.5;
}

/* ---- Related posts grid ---- */
.mundi-related h2 { font-family: "Lato", sans-serif; font-weight: 800; color: var(--mundi-ink); margin-bottom: 20px; }
.mundi-related .wp-block-post-title { margin-top: 8px; line-height: 1.3; }
.mundi-related .wp-block-post-title a { color: var(--mundi-ink); text-decoration: none; }
.mundi-related .wp-block-post-featured-image img { border-radius: 6px; aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.mundi-related .mundi-eyebrow a { font-size: 11px; }

/* ---- Navy CTA bar ---- */
.mundi-cta-bar h2 { font-family: "Lato", sans-serif; font-weight: 800; margin-bottom: 18px; }
.mundi-cta-bar .wp-block-button__link { padding: 13px 26px; }

/* ===== Marketing pages ===== */
/* Header / nav */
.mundi-mkt-header { border-bottom: 1px solid #ededed; }
.mundi-mkt-header a { color: var(--mundi-ink); text-decoration: none; }
.mundi-mkt-nav { gap: 22px; }
.mundi-mkt-nav .mundi-lang a { color: #8a8f98; }
.mundi-login-btn .wp-block-button__link { padding: 10px 20px; }

/* Servicios dropdown */
.mundi-dropdown { position: relative; }
/* Desktop header: vertically center every nav item on one line (the dropdown + button were
   sizing to the flex line height and rendering their content off-center). */
@media (min-width: 901px) {
  .mundi-mkt-header > .wp-block-group { align-items: center; }
  .mundi-mkt-nav { align-items: center; }
  .mundi-mkt-nav > * { align-self: center; }
  .mundi-mkt-nav p { margin: 0; }
  .mundi-mkt-nav .mundi-dropdown { display: inline-flex; align-items: center; }
  .mundi-mkt-nav .wp-block-buttons { margin: 0; align-self: center; height: auto !important; align-items: center; }
  .mundi-mkt-nav .wp-block-button { margin: 0; align-self: center; height: auto !important; display: flex; align-items: center; }
  .mundi-login-btn .wp-block-button__link { line-height: 1.2; }
}
.mundi-dropdown-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 600; color: var(--mundi-ink); cursor: pointer;
}
.mundi-dropdown-menu {
  position: absolute; top: 100%; left: 0; margin-top: 10px;
  width: 460px; max-width: 70vw;
  background: #fff; border: 1px solid #ececec; border-radius: 12px;
  box-shadow: 0 18px 50px rgba(20, 35, 63, 0.14);
  padding: 10px; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease; z-index: 50;
}
/* transparent bridge over the gap so moving the cursor into the menu keeps it open (clickable) */
.mundi-dropdown-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.mundi-dropdown:hover .mundi-dropdown-menu,
.mundi-dropdown:focus-within .mundi-dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.mundi-dropdown-menu a {
  display: block; padding: 12px 14px; border-radius: 8px; text-decoration: none;
}
.mundi-dropdown-menu a:hover { background: #fff3ee; }
.mundi-dropdown-menu strong {
  display: block; font-family: "Lato", sans-serif; font-weight: 800;
  font-size: 15px; color: var(--mundi-ink); margin-bottom: 2px;
}
.mundi-dropdown-menu span {
  display: block; font-size: 13px; color: #6b7280; line-height: 1.4;
}

/* Mobile hamburger nav (responsive marketing header) — CSS-only checkbox toggle.
   Desktop: nav inline as usual, hamburger hidden. Mobile (<=900px): nav collapses
   behind the hamburger and drops as a full-width panel when checked. */
.mundi-nav-toggle, .mundi-hamburger, .mundi-svc-toggle { display: none; }
@media (max-width: 900px) {
  .mundi-mkt-header > .wp-block-group { flex-wrap: wrap; }
  .mundi-hamburger { display: inline-flex; align-items: center; margin-left: auto; cursor: pointer; }
  /* open menu = a clean stacked panel with dividers, not a raw floating list */
  .mundi-mkt-nav { display: none !important; width: 100%; flex-direction: column;
                   align-items: stretch !important; gap: 0; margin-top: 12px;
                   border-top: 1px solid #eef0f3; }
  .mundi-nav-toggle:checked ~ .mundi-mkt-nav { display: flex !important; }
  /* top-level items flush at the nav edge; one consistent left baseline */
  .mundi-mkt-nav > * { width: 100%; margin: 0; padding: 14px 0; border-bottom: 1px solid #eef0f3; }
  /* Servicios = collapsed by default, taps open (nested checkbox); titles only on mobile */
  .mundi-mkt-nav .mundi-dropdown { padding: 0; border-bottom: 1px solid #eef0f3; }
  .mundi-mkt-nav .mundi-dropdown-trigger {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; padding: 14px 0; cursor: pointer;
  }
  .mundi-mkt-nav .mundi-dropdown-trigger svg { transition: transform .2s ease; }
  .mundi-svc-toggle:checked ~ .mundi-dropdown-trigger svg { transform: rotate(180deg); }
  .mundi-mkt-nav .mundi-dropdown-menu {
    position: static; transform: none; opacity: 1; visibility: visible;
    width: 100%; max-width: 100%; margin: 0; box-shadow: none; border: 0;
    padding: 0 0 10px 0; display: none;
  }
  .mundi-svc-toggle:checked ~ .mundi-dropdown-menu { display: block; }
  /* sub-items: one clean 16px indent, left-aligned among themselves */
  .mundi-mkt-nav .mundi-dropdown-menu a { display: block; padding: 9px 0 9px 16px; }
  .mundi-mkt-nav .mundi-dropdown-menu strong { font-weight: 600; }
  .mundi-mkt-nav .mundi-dropdown-menu span { display: none; }   /* titles only (no long descriptions) */
  .mundi-mkt-nav .wp-block-buttons { padding: 16px 0; border-bottom: 0; }
  .mundi-mkt-nav .mundi-lang { border-bottom: 0; }
  .mundi-login-btn .wp-block-button__link { display: inline-block; }
}

/* Mobile: stack the value-prop icon row vertically (match mundi mobile, friendlier tap area) */
@media (max-width: 781px) {
  .mundi-valprops .wp-block-column { flex-basis: 100% !important; margin-bottom: 8px; }
  .mundi-valprops .wp-block-columns { gap: 22px; }
  /* Global mobile spacing pass — more generous vertical rhythm per section, closer to mundi mobile */
  .mundi-home > .wp-block-group,
  .mundi-landing > .wp-block-group { padding-top: 44px !important; padding-bottom: 44px !important; }
  .mundi-services .wp-block-column,
  .mundi-features .wp-block-column { margin-bottom: 14px; }
}

/* Footer social icons: ≥44×44px tap target (WCAG/Apple), keeps icon glyph small */
.mundi-social .wp-block-social-link { margin: 0 2px; }
.mundi-social .wp-block-social-link .wp-block-social-link-anchor,
.mundi-social a.wp-block-social-link-anchor {
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 10px;
}

/* Cookie notice — FIXED bottom banner (popup), site-wide + dismissible (matches mundi.io) */
.mundi-cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  background: #ffffff; border-top: 1px solid #ececec;
  box-shadow: 0 -2px 24px rgba(20, 35, 63, 0.12);
  padding: 18px 32px; font-size: 14px; color: #4a4a4a;
}
.mundi-cookie-banner:not([hidden]) {
  display: flex; align-items: center; justify-content: center; gap: 24px;
}
.mundi-cookie-text { margin: 0; max-width: 1000px; line-height: 1.5; }
.mundi-cookie-text a { color: #f05a26; text-decoration: underline; }
.mundi-cookie-accept {
  flex: 0 0 auto; background: #f05a26; color: #fff; border: 0; border-radius: 6px;
  padding: 11px 30px; font-weight: 700; font-size: 14px; cursor: pointer; line-height: 1.2;
}
.mundi-cookie-accept:hover { background: #e0500f; }
@media (max-width: 600px) {
  .mundi-cookie-banner { padding: 16px 20px; }
  .mundi-cookie-banner:not([hidden]) { flex-direction: column; gap: 12px; text-align: center; }
}

/* Hero */
.mundi-hero-title { letter-spacing: -0.01em; }
.mundi-img-placeholder { width: 100%; }
/* Home CTAs (hero + register): compact + side-by-side, like the reference (not oversized/stacked) */
.mundi-home .wp-block-buttons { gap: 14px; flex-wrap: wrap; }
.mundi-home .wp-block-button__link {
  font-size: 15px;
  font-weight: 600;
  padding: 12px 26px;
  line-height: 1.2;
}

/* Value-prop line icons (reference: $-in-circle, wallet, globe — orange outline, larger) */
.mundi-valprops { margin-top: 16px; }
.mundi-vp-icon { text-align: center; margin-bottom: 14px; }
.mundi-vp-icon svg { display: inline-block; }

/* Section cards (services + features) */
.mundi-services .wp-block-column,
.mundi-features .wp-block-column {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 8px;
  padding: 22px;
}
.mundi-services h3, .mundi-features h3 { color: var(--mundi-ink); margin-top: 0; }
.mundi-valprops p { color: #4a4a4a; }

/* Marketing footer */
.mundi-mkt-footer a { color: #ffffff; opacity: 0.85; text-decoration: none; }
.mundi-mkt-footer a:hover { opacity: 1; }
.mundi-mkt-footer h4 { color: var(--mundi-primary); margin-bottom: 8px; font-family: "Lato", sans-serif; }

/* Hero dashboard image (cropped from the reference) */
.mundi-hero-img {
  background-image: url(../img/hero-dashboard.png);
  background-size: cover;
  background-position: left top;
  border-radius: 10px;
  min-height: 360px;
  box-shadow: 0 14px 44px rgba(20, 35, 63, 0.10);
  /* mundi.io hero floats gently — approximate that motion (judged in L3, not a PNG) */
  animation: mundi-hero-float 6s ease-in-out infinite;
  will-change: transform;
}
@keyframes mundi-hero-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
@media (prefers-reduced-motion: reduce) {
  .mundi-hero-img { animation: none; }
}
/* Service hero circular photos (measured via browser bbox, not blind-cropped) */
.mundi-hero-proveedores, .mundi-hero-anticipos, .mundi-hero-revolventes {
  width: 100%; max-width: 420px; aspect-ratio: 1 / 1; margin: 0 auto;
  border-radius: 50%; background-size: cover; background-position: center;
  outline: 2px dashed rgba(240, 90, 38, 0.45); outline-offset: 8px;
}
.mundi-hero-proveedores { background-image: url(../img/hero-proveedores.png); }
.mundi-hero-anticipos { background-image: url(../img/hero-anticipos.png); }
.mundi-hero-revolventes { background-image: url(../img/hero-revolventes.png); }

/* Register-CTA section */
.mundi-register-img { background: #e9edf3 url(../img/cta-people.png) center/cover no-repeat; border-radius: 10px; min-height: 300px; }
.mundi-register h2 { color: var(--mundi-ink); }

/* ===== Legal pages ===== */
.mundi-legal-header .mundi-logo img { margin: 0 auto; }
.mundi-legal-title { color: var(--mundi-navy); }
.mundi-legal-body {
  font-family: "Mulish", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: #3a3f47;
}
.mundi-legal-body h2,
.mundi-legal-body .wp-block-heading {
  font-family: "Lato", system-ui, sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: var(--mundi-navy);
  margin-top: 30px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.mundi-legal-body a { color: var(--mundi-primary); }
.mundi-legal-body p { margin: 0 0 14px; }

/* ===== Archive grids (tag / author / blog index) ===== */
.mundi-archive-head { border-bottom: 1px solid #ededed; }
.mundi-archive-title { color: var(--mundi-ink); }
.mundi-cards .wp-block-post {
  border: 1px solid #ececec;
  border-radius: 8px;
  padding: 22px 20px;
  background: #fff;
}
.mundi-cards .mundi-eyebrow a { color: var(--mundi-primary); font-size: 11px; text-decoration: none; }
.mundi-cards .wp-block-post-title { margin: 8px 0 8px; line-height: 1.3; }
.mundi-cards .wp-block-post-title a { color: var(--mundi-ink); text-decoration: none; }
.mundi-cards .wp-block-post-excerpt { color: #5a6068; font-size: 13px; line-height: 1.6; }
.mundi-cards .wp-block-post-excerpt__more-text { display: none; }
.mundi-cards .wp-block-post-date, .mundi-cards .wp-block-post-author { color: #8a8f98; font-size: 12px; }

/* Author archive: image-led masonry cards */
.mundi-masonry .wp-block-post-template {
  column-count: 3;
  column-gap: 24px;
}
.mundi-masonry .wp-block-post {
  break-inside: avoid;
  margin: 0 0 24px;
  display: inline-block;
  width: 100%;
}
.mundi-masonry .wp-block-post { border: none; padding: 0; }
.mundi-masonry .wp-block-post-featured-image img {
  border-radius: 8px; width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block;
}
.mundi-masonry .wp-block-post-title { margin-top: 10px; }
.mundi-masonry .wp-block-post-title a { color: var(--mundi-ink); text-decoration: none; font-family: "Lato", sans-serif; }
.mundi-author-bio { color: #5a6068; }

/* ===== Landing (factoraje) ===== */
.mundi-cookie-bar { background: var(--mundi-primary); color: #fff; }
.mundi-cookie-bar p, .mundi-cookie-bar a { color: #fff; }
.mundi-landing-hero h1 { color: var(--mundi-navy); }
.mundi-steps .mundi-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--mundi-primary); color: #fff; font-weight: 800; font-family: "Lato", sans-serif;
}
.mundi-why .mundi-check { color: var(--mundi-primary); font-weight: 800; }
.mundi-converter {
  background: #fff; border: 1px solid #ececec; border-radius: 10px; padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}
.mundi-converter .mundi-conv-row {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid #e3e3e3; border-radius: 8px; padding: 12px 16px; margin-bottom: 12px;
}
.mundi-converter .mundi-conv-amt { font-weight: 800; font-family: "Lato", sans-serif; color: var(--mundi-ink); }
/* FOREX hero widget (divisas) */
.mundi-fx-widget { background:#fff; border:1px solid #ececec; border-radius:12px; padding:24px; box-shadow:0 14px 44px rgba(20,35,63,0.10); }
.mundi-fx-title { font-family:"Lato",sans-serif; font-weight:800; color:var(--mundi-ink); margin:0 0 14px; }
.mundi-fx-panel { background:#15233f; border-radius:16px; padding:40px 36px; min-height:300px; display:flex; align-items:center; box-shadow:0 18px 50px rgba(20,35,63,0.18); }
.mundi-forex-illus { width:100%; max-width:540px; aspect-ratio:688/407; margin:0 auto; background:url(../img/forex-illustration.png) center/contain no-repeat; border-radius:12px; }
@media (max-width:781px){ .mundi-fx-panel { padding:28px 20px; min-height:auto; } }
.mundi-faq summary { font-family:"Lato",sans-serif; font-weight:700; color:var(--mundi-ink); cursor:pointer; font-size:15px; }
.mundi-faq details { background:#fff; }

.mundi-landing-cta { background: var(--mundi-navy); color: #fff; }
.mundi-landing-cta h2 { color: #fff; }
.mundi-landing-photo { background: #d9dfe8 url(../img/cta-people.png) center/cover no-repeat; border-radius: 10px; min-height: 300px; }
.mundi-laptop-img { background: #eef1f5 url(../img/why-laptop.png) center/contain no-repeat; border-radius: 10px; min-height: 300px; }
/* real buyer-logo strip (cropped from reference) */
.mundi-logos-img { background: url(../img/buyer-logos.png) center/contain no-repeat; width: 100%; max-width: 1040px; margin: 18px auto 0; aspect-ratio: 1140 / 302; }

/* App-demo section (the Mundi app "adelanto en proceso" product screenshot) */
.mundi-appdemo-img {
  background: url(../img/app-demo.png) center top / contain no-repeat;
  width: 100%; max-width: 1200px; margin: 0 auto;
  aspect-ratio: 1280 / 865;
}

/* ===== Blog index (home) ===== */
.mundi-section-head { border-bottom: 1px solid #ededed; padding-bottom: 10px; }
.mundi-section-head h2 { color: var(--mundi-ink); margin: 0; }
.mundi-vertodo { margin: 0; }
.mundi-vertodo a { color: var(--mundi-primary); text-decoration: none; }
.mundi-masonry-img .wp-block-post { border: none; padding: 0; background: transparent; }
.mundi-masonry-img .wp-block-post-featured-image img {
  border-radius: 8px; width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; margin-bottom: 10px;
}
.mundi-blog-latest .wp-block-post { background: #fff; }
.mundi-newsletter input::placeholder { color: #9aa7bd; }

