/* Proyectos (body.mfx-pr). El hero y el ancho completo del primer bloque ya los da mapyessa-custom-css.php (page-id-1852). */
body.mfx-pr .elementor > .e-con.e-parent {
    width: 100vw !important; max-width: none !important;
    margin-left: calc(50% - 50vw) !important; margin-right: 0 !important;
}
body.mfx-pr #contacto { scroll-margin-top: 110px; }
body.mfx-pr .mp-pr-wrap { max-width: 1100px; margin: 0 auto; text-align: center; width: 100%; }
body.mfx-pr .mp-pr-kicker { margin: 0 0 12px; color: #0089e4; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
body.mfx-pr .mp-pr-wrap h2 { margin: 0 0 18px; color: #192730; font-size: clamp(27px, 3vw, 38px); line-height: 1.15; }
body.mfx-pr .mp-pr-lead { max-width: 820px; margin: 0 auto 8px; color: #4a5c68; font-size: 17px; line-height: 1.7; }
body.mfx-pr .mp-pr-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px 0 8px; padding: 0; list-style: none; }
body.mfx-pr .mp-pr-chips li { padding: 8px 14px; border-radius: 999px; background: #eaf4fb; color: #194f70; font-size: 14px; font-weight: 600; }
body.mfx-pr .mp-pr-infographic { display: block; width: 100%; max-width: 1100px; height: auto; margin: 30px auto 0; }
/* Clientes */
body.mfx-pr .mp-pr-logos { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 36px; }
body.mfx-pr .mp-pr-logo { display: flex; align-items: center; justify-content: center; height: 110px; padding: 18px 14px; box-sizing: border-box; overflow: hidden; background: #fff; border: 1px solid #d4e1e9; border-radius: 9px; }
body.mfx-pr .mp-pr-logo img { display: block; width: auto; max-width: 100%; max-height: 70px; object-fit: contain; }
/* Galería filtrable (mapyessa-proyectos-galeria.php + galeria.js) */
body.mfx-pr .mpg { max-width: 1100px; margin: 34px auto 0; width: 100%; }
body.mfx-pr .mpg [hidden] { display: none !important; }
body.mfx-pr .mpg-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
body.mfx-pr .mpg-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px; font: inherit; font-size: 14px; font-weight: 600; color: #194f70; background: #fff; border: 1px solid #c9d9e4; border-radius: 999px; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
body.mfx-pr .mpg-chip:hover { border-color: #0a4f8a; }
body.mfx-pr .mpg-chip[aria-pressed="true"] { color: #fff; background: #0a4f8a; border-color: #0a4f8a; }
body.mfx-pr .mpg-count { min-width: 22px; padding: 1px 7px; font-size: 12px; font-weight: 700; text-align: center; color: #194f70; background: #eaf4fb; border-radius: 999px; }
body.mfx-pr .mpg-chip[aria-pressed="true"] .mpg-count { color: #0a4f8a; background: #fff; }
body.mfx-pr .mpg-status { margin: 18px 0 14px; font-size: 14px; color: #4a5c68; text-align: center; }
body.mfx-pr .mpg-carousel { position: relative; }
body.mfx-pr .mpg-track { display: flex; gap: 14px; margin: 0; padding: 4px 0 8px; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; cursor: grab; }
body.mfx-pr .mpg-track::-webkit-scrollbar { display: none; }
body.mfx-pr .mpg-track.is-drag { cursor: grabbing; scroll-snap-type: none; }
body.mfx-pr .mpg-item { flex: 0 0 calc((100% - 28px) / 3); margin: 0; padding: 0; scroll-snap-align: start; }
body.mfx-pr .mpg-arrow { position: absolute; top: calc(50% - 22px); z-index: 2; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0 0 3px; font-size: 30px; line-height: 1; color: #fff; background: #0a4f8a; border: 0; border-radius: 50%; box-shadow: 0 4px 14px rgba(10, 38, 64, .3); cursor: pointer; transition: opacity .15s ease, background .15s ease; }
body.mfx-pr .mpg-arrow:hover:not(:disabled) { background: #083e6e; }
body.mfx-pr .mpg-arrow:disabled { opacity: 0; pointer-events: none; }
body.mfx-pr .mpg-arrow-prev { left: -14px; }
body.mfx-pr .mpg-arrow-next { right: -14px; }
body.mfx-pr .mpg-carousel.is-single .mpg-arrow { display: none; }
body.mfx-pr .mpg-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
body.mfx-pr .mpg-dot { width: 8px; height: 8px; background: #c3d3df; border-radius: 50%; transition: width .2s ease, background .2s ease; }
body.mfx-pr .mpg-dots.is-bar { display: block; max-width: 220px; height: 4px; margin: 16px auto 0; background: #d4e1e9; border-radius: 99px; overflow: hidden; }
body.mfx-pr .mpg-bar-fill { display: block; height: 100%; background: #0a4f8a; border-radius: 99px; transition: width .2s ease; }
body.mfx-pr .mpg-dot.is-on { width: 22px; background: #0a4f8a; border-radius: 99px; }
body.mfx-pr .mpg-thumb { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; background: #dbe5ec; border: 0; border-radius: 10px; cursor: zoom-in; }
body.mfx-pr .mpg-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease; }
body.mfx-pr .mpg-thumb:hover img { transform: scale(1.04); }
body.mfx-pr .mpg-tag { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 4px 10px; font-size: 12px; font-weight: 600; line-height: 1.3; color: #fff; background: rgba(10, 38, 64, .78); border-radius: 999px; }
body.mfx-pr .mpg button:focus-visible, .mpg-box button:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
/* Visor (se agrega al <body>) */
.mpg-lock { overflow: hidden; }
.mpg-box { position: fixed; inset: 0; z-index: 99999; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 64px 40px; background: rgba(8, 20, 33, .94); }
.mpg-box[hidden] { display: none; }
.mpg-fig { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.mpg-fig img { display: block; max-width: 100%; max-height: calc(100vh - 170px); object-fit: contain; border-radius: 6px; }
.mpg-cap { margin-top: 12px; max-width: 760px; font-size: 14px; line-height: 1.45; color: #e6eef5; text-align: center; }
.mpg-btn { position: absolute; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; font-size: 28px; line-height: 1; color: #fff; background: rgba(255, 255, 255, .12); border: 0; border-radius: 50%; cursor: pointer; }
.mpg-btn:hover { background: rgba(255, 255, 255, .26); }
.mpg-close { top: 14px; right: 14px; font-size: 20px; }
.mpg-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.mpg-next { right: 12px; top: 50%; transform: translateY(-50%); }
.mpg-counter { position: absolute; top: 24px; left: 20px; margin: 0; font-size: 14px; color: #c9d9e4; }
@media (max-width: 767px) {
    .mpg-box { padding: 60px 8px 28px; }
    .mpg-prev, .mpg-next { top: auto; bottom: 18px; transform: none; }
    .mpg-prev { left: 20px; } .mpg-next { right: 20px; }
    .mpg-fig img { max-height: calc(100vh - 220px); }
}
@media (prefers-reduced-motion: reduce) { body.mfx-pr .mpg-thumb img { transition: none; } }
@media (max-width: 999px) { body.mfx-pr .mpg-item { flex-basis: calc((100% - 14px) / 2); } }
@media (max-width: 921px) { body.mfx-pr .mp-pr-logos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) {
    body.mfx-pr .mp-pr-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.mfx-pr .mpg-item { flex-basis: 84%; }
    body.mfx-pr .mpg-arrow-prev { left: 4px; } body.mfx-pr .mpg-arrow-next { right: 4px; }
    /* 10 botones en móvil: una sola fila con desplazamiento horizontal en vez de 5 líneas */
    body.mfx-pr .mpg-filters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
    body.mfx-pr .mpg-chip { flex: none; scroll-snap-align: start; }
    body.mfx-pr .mp-pr-lead { font-size: 16px; }
}
