/* Inicio V4. Fuente única de la portada. No concatenar con el legado. */
.mg4-front #page { max-width:none; }
.mg4-front .site-content { padding:0; }
.mg4-front .inside-article { padding:0; }
.mg4-front .site-main { margin:0; }
.mg4-front .entry-content { margin-top:0; }
.mg4-front .entry-header { display:none; }
.mg4-home {
 --navy:#002554; --blue:#003e99; --link:#0055b8; --sky:var(--mg-sky,#5fc3e2); --amber:#e7a33e; --ink:#35465b; --paper:var(--mg-paper,#fefdfb); --line:#d4dfe7;
 color:var(--navy); background:#fff; font-family:inherit; line-height:1.65;
}
.mg4-home *, .mg4-home *::before, .mg4-home *::after { box-sizing:border-box; }
.mg4-home :is(h1,h2,h3,h4,p,figure) { margin:0; }
.mg4-home :is(h1,h2,h3,h4) { color:var(--navy); font-weight:700; }
.mg4-home h2 { font-size:clamp(34px,4.5vw,64px); letter-spacing:-.045em; line-height:1.06; }
.mg4-home h3 { font-size:clamp(28px,3.5vw,46px); letter-spacing:-.035em; line-height:1.12; }
.mg4-home p { color:var(--ink); font-size:17px; line-height:1.7; }
.mg4-home a { color:var(--link); }
.mg4-home img { display:block; max-width:100%; }
.mg4-home :is(a,button,select,canvas,summary):focus-visible { outline:3px solid var(--link); outline-offset:5px; }
.mg4-home [hidden] { display:none; }
.mg4-wrap { width:min(100%,1280px); margin-inline:auto; padding-inline:40px; }
.mg4-home .mg4-kicker { font-size:11px; font-weight:700; letter-spacing:.15em; text-transform:uppercase; line-height:1.5; color:var(--link); }
.mg4-link { display:inline-flex; align-items:center; gap:28px; min-height:48px; font-size:15px; font-weight:650; text-decoration:none; border-bottom:1px solid var(--amber); }
.mg4-home .mg4-link svg, .mg4-service-action svg, .mg4-home .mg-news-controls svg { width:24px; height:24px; flex:0 0 24px; transition:transform .2s ease; }
.mg4-link:hover svg, .mg4-service-action:hover svg { transform:translateX(4px); }
.mg4-hero { position:relative; isolation:isolate; overflow:hidden; background:var(--navy); }
.mg4-hero-photo { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:65% 54%; z-index:-3; }
.mg4-hero::after { content:''; position:absolute; inset:0; z-index:-2; background:linear-gradient(90deg,#001b3eef,#001b3edc 35%,#001b3e22 85%),linear-gradient(0deg,#001b3e66,transparent 45%); }
.mg4-hero-copy { padding-block:80px 112px; }
.mg4-home .mg4-hero .mg4-kicker { color:var(--sky); margin-bottom:28px; }
.mg4-home .mg4-hero h1 { color:#fff; font-size:clamp(46px,5.4vw,78px); line-height:1.02; letter-spacing:-.05em; max-width:14ch; }
.mg4-hero h1 span { font-weight:400; }
.mg4-home .mg4-hero-intro { max-width:45ch; color:#e2eaf3; margin-top:26px; font-size:17px; }
.mg4-home .mg4-link-light { color:#fff; margin-top:24px; }
.mg4-home .mg4-link-light:focus-visible { outline-color:#fff; }
.mg4-hero-actions { display:flex;flex-wrap:wrap;align-items:center;gap:16px 28px;margin-top:30px; }
.mg4-home .mg4-hero-actions .mg4-link-light { margin-top:0; }
.mg4-home .mg4-hero-secondary { display:inline-flex;align-items:center;min-height:48px;padding:10px 16px;border:1px solid var(--sky);border-radius:2px;color:#fff;font-size:15px;font-weight:600;text-decoration:none;background:#00255470; }
.mg4-home .mg4-hero-secondary:hover { background:var(--navy); }
.mg4-hero-network { position:absolute; inset:0; width:100%; height:100%; stroke:var(--amber); stroke-width:1; opacity:.6; pointer-events:none; z-index:-1; }
.mg4-hero-network circle { fill:var(--amber); }
.mg4-home .mg4-hero-caption { position:absolute; right:40px; bottom:28px; font-size:10px; color:#fff; text-transform:uppercase; letter-spacing:.14em; }
/* Trámites: los contenedores son artículos, nunca enlaces envolviendo bloques. */
.mg4-services { padding-block:58px 80px; }
.mg4-heading { display:flex; justify-content:space-between; align-items:end; gap:32px; margin-bottom:32px; }
.mg4-heading h2 { margin-top:16px; }
.mg4-home .mg4-heading > p { font-size:15px; }
.mg4-service-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.7fr); gap:18px 24px; }
.mg4-service { display:flex; flex-direction:column; gap:22px; min-width:0; padding:26px; background:var(--paper); border:1px solid var(--line);border-radius:3px; transition:transform .22s ease, background .22s ease; }
.mg4-service:hover { transform:translateY(-3px); background:#f3f7fa; }
.mg4-service-top { display:flex; justify-content:space-between; align-items:center; }
.mg4-home .mg4-index { color:var(--link); font-size:11px; letter-spacing:.12em; font-weight:650; }
.mg4-icon { width:32px; height:32px; color:var(--link); }
.mg4-icon svg { width:100%; height:100%; display:block; }
.mg4-home .mg4-service h3 { font-size:25px; letter-spacing:-.025em; }
.mg4-home .mg4-service-copy p { margin-top:13px; font-size:14px; }
.mg4-service-action { display:flex; align-items:center; justify-content:space-between; gap:14px; min-height:44px; margin-top:auto; padding-top:4px; font-size:14px; font-weight:650; text-decoration:none; }
.mg4-service-action:hover { text-decoration:underline; text-underline-offset:5px; }
.mg4-service-featured { grid-row:span 3;background:var(--navy); border-color:var(--navy);padding:34px; }
.mg4-service:not(.mg4-service-featured) { display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:20px; }
.mg4-service:not(.mg4-service-featured) .mg4-service-top { flex-direction:column;gap:8px; }
.mg4-service:not(.mg4-service-featured) .mg4-service-action { margin:0;font-size:13px; }
.mg4-service:not(.mg4-service-featured) .mg4-service-copy p { margin-top:8px; }
.mg4-home .mg4-service:not(.mg4-service-featured) h3 { font-size:23px; }
.mg4-home .mg4-service-featured h3 { font-size:clamp(32px,3.6vw,46px); }
.mg4-service-featured:hover { background:#00346c; }
.mg4-home .mg4-service-featured h3 { color:#fff; }
.mg4-home .mg4-service-featured p { color:#dbe7f3; }
.mg4-home .mg4-service-featured .mg4-index { font-size:11px; color:#f3bb69; }
.mg4-service-featured .mg4-icon { color:#f3bb69; width:38px; height:38px; }
.mg4-home .mg4-service-featured a { color:#f3bb69; font-size:15px; }
.mg4-service-featured a:focus-visible { outline-color:#fff; }
/* Relato institucional: una diagonal une los dos principios y desemboca en comunidad. */
.mg4-institution { background:var(--paper); padding-top:80px; }
.mg4-about-heading { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); gap:22px 80px; align-items:end; }
.mg4-about-heading .mg4-kicker { grid-column:1/-1; }
.mg4-about-description { max-width:48ch; }
.mg4-about-links { display:flex;flex-wrap:wrap;gap:12px 28px;margin-top:22px; }
.mg4-commitment { display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); margin-block:58px 88px; position:relative; }
.mg4-commitment-photo { padding-block:42px; position:relative; z-index:1; margin-right:-42px; }
.mg4-commitment-photo img { width:100%; height:100%; object-fit:cover; object-position:68% center; min-height:330px; }
.mg4-commitment-copy { padding:56px 50px 24px 90px; background:var(--navy); }
.mg4-home .mg4-commitment-copy .mg4-kicker { color:var(--sky); margin-bottom:24px; }
.mg4-home .mg4-commitment-copy h3 { color:#fff; font-size:clamp(30px,3.4vw,46px); }
.mg4-home .mg4-commitment-copy > p:last-of-type { margin-top:26px; color:#dbe7f3; font-size:16px; }
.mg4-draw-line { width:100%; height:74px; display:block; stroke:var(--amber); stroke-width:1.5; margin-top:20px; overflow:visible; }
.mg4-principles { position:relative; isolation:isolate; padding-bottom:82px; }
.mg4-principle-network { position:absolute; inset:0; width:100%; height:100%; stroke:#d39a47; stroke-width:1; z-index:-1; opacity:.65; pointer-events:none; }
.mg4-principle { display:grid; gap:64px; align-items:center; }
.mg4-principle figure { overflow:hidden; background:#d7e2ea; }
.mg4-principle img { width:100%; height:100%; object-fit:cover; object-position:70% center; }
.mg4-principle h3 { margin-block:16px; }
.mg4-principle p { max-width:32ch; }
.mg4-safety { grid-template-columns:minmax(0,1.35fr) minmax(0,.85fr); }
.mg4-safety figure { aspect-ratio:1.35; }
.mg4-safety > div { padding:28px 24px 28px 0; background:var(--paper); }
.mg4-quality { grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); width:84%; margin:76px 0 0 auto; }
.mg4-quality figure { aspect-ratio:1.55; }
.mg4-quality > div { padding-block:28px; background:var(--paper); }
.mg4-community { position:relative; isolation:isolate; overflow:hidden; background:var(--navy); }
.mg4-community > img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center 55%; z-index:-2; }
.mg4-community::after { content:''; position:absolute; inset:0; background:linear-gradient(90deg,#001b3ef5,#001b3ebd 42%,#001b3e11); z-index:-1; }
.mg4-community .mg4-wrap { padding-block:90px; }
.mg4-home .mg4-community .mg4-index { color:#f3bb69; }
.mg4-home .mg4-community h3 { color:#fff; font-size:clamp(42px,5.3vw,72px); margin-block:18px; }
.mg4-home .mg4-community p:last-child { color:#e2eaf3; max-width:38ch; }
/* Acceso a contenido aprobado: no reproduce recomendaciones técnicas. */
.mg4-care-entry { background:#f0f7fb;border-block:1px solid #d7e8f0;padding-block:44px; }
.mg4-care-entry > div { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px 60px;align-items:center; }
.mg4-care-entry .mg4-kicker { margin-bottom:14px;padding-left:14px;border-left:3px solid var(--sky); }
.mg4-care-entry h2 { font-size:clamp(28px,3.2vw,40px);max-width:24ch; }
.mg4-care-entry .mg4-care-copy { margin-top:16px;max-width:65ch;font-size:16px; }
.mg4-care-links { display:flex;flex-direction:column;align-items:flex-start;gap:10px; }
.mg4-home .mg4-care-emergency { display:inline-flex;align-items:center;min-height:44px;padding-block:8px;font-size:14px;font-weight:600;color:var(--navy);text-underline-offset:5px; }
/* Globo: composición oscura; información accesible fuera del lienzo. */
.mg4-territory { background:#001c40; padding-block:80px; color:#fff; overflow:hidden; }
.mg4-territory-heading { display:grid; grid-template-columns:1fr 1fr; gap:22px 70px; align-items:end; }
.mg4-territory-heading .mg4-kicker { grid-column:1/-1; }
.mg4-home .mg4-territory h2 { color:#fff; }
.mg4-home .mg4-territory .mg4-kicker { color:var(--sky); }
.mg4-home .mg4-territory-heading > p:last-child { color:#c7d7e7; font-size:16px; }
.mg4-territory-layout { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,.85fr); align-items:center; gap:28px; margin-top:36px; }
.mg4-globe-stage { position:relative; aspect-ratio:1; min-width:0; align-self:start; }
.mg4-globe-poster, .mg4-globe { width:100%; height:100%; display:block; }
.mg4-globe { touch-action:pan-y; cursor:grab; border-radius:8px; }
.mg4-globe:active { cursor:grabbing; }
.mg4-globe-pins { position:absolute; inset:0; pointer-events:none; }
.mg4-home .mg4-globe-pin { position:absolute; pointer-events:auto; display:grid; place-items:center; width:44px; height:44px; padding:0; background:none; border:0; transform:translate(-50%,-50%); cursor:pointer; }
.mg4-globe-pin span { width:12px; height:12px; border:2px solid #001c40; border-radius:50%; background:#f3bb69; box-shadow:0 0 0 4px #e7a33e30; }
.mg4-globe-pin:is(:hover,:focus-visible) span, .mg4-globe-pin[aria-pressed=true] span { box-shadow:0 0 0 7px #e7a33e55; }
.mg4-home .mg4-globe-tooltip { position:absolute; max-width:220px; font-size:12px; color:#fff; padding:7px 10px; border-left:1px solid #e7a33e; background:#002554ee; pointer-events:none; }
.mg4-home .mg4-globe-help { font-size:12px; color:#a8bfd5; margin-top:10px; }
.mg4-territory-side { position:relative; z-index:1; }
.mg4-globe-controls { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:24px; }
.mg4-globe-controls button { min-height:44px; border:1px solid #7b99b5; border-radius:3px; background:transparent; color:#fff; padding:10px 14px; font-size:13px; cursor:pointer; }
.mg4-globe-controls button:first-child { color:#002554; background:#e7a33e; border-color:#e7a33e; font-weight:650; }
.mg4-globe-controls button:hover { border-color:#fff; }
.mg4-territory-select label { display:block; margin-bottom:10px; font-size:14px; }
.mg4-territory-select select { width:100%; min-width:0; min-height:48px; color:#002554; background:#fff; border:0; border-radius:2px; font-size:16px; padding:12px; }
.mg4-territory-panel { margin-top:20px; padding:30px; background:#fff; color:#002554; border-radius:3px; box-shadow:0 20px 45px #00000012; }
.mg4-home .mg4-territory-type { font-size:10px; line-height:1.55; letter-spacing:.08em; color:#0055b8; text-transform:uppercase; margin-bottom:18px; }
.mg4-home .mg4-territory-name { font-size:32px; }
.mg4-home .mg4-territory-place { font-size:14px; font-weight:650; margin-top:12px; }
.mg4-home .mg4-territory-description { font-size:14px; margin-top:18px; }
.mg4-territory-more { margin-top:18px; font-size:14px; }
.mg4-territory-photo { margin-top:20px; }
.mg4-territory-photo img { width:100%; height:auto; aspect-ratio:8/5; object-fit:cover; }
.mg4-home .mg4-territory-status { font-size:12px; color:#adc2d7; margin-top:20px; }
.mg4-map-legend { display:flex;flex-wrap:wrap;gap:10px 22px;margin-bottom:20px;color:#dbe7f3;font-size:12px; }
.mg4-map-legend span { display:inline-flex;align-items:center;gap:8px; }
.mg4-map-legend i { width:13px;height:13px;border:1px solid #ffffff60;border-radius:2px;background:#d5edf6; }
.mg4-map-legend span:last-child i { background:#e7a33e; }
.mg4-home .mg4-territory-document { display:inline-flex;align-items:center;min-height:44px;margin-top:14px;font-size:13px;text-underline-offset:4px; }
.mg4-home .mg4-territory-document[hidden] { display:none; }
.mg4-territory-fallback { margin-top:16px; color:#dbe7f3; font-size:13px; }
.mg4-territory-fallback summary { min-height:44px; padding-block:12px; cursor:pointer; }
.mg4-territory-fallback h4 { color:#fff; margin-block:16px 10px; font-size:16px; }
.mg4-territory-fallback ul { margin:0 0 20px 18px; }
.mg4-home .mg4-cartography-credit { font-size:11px; color:#adc2d7; margin-top:30px; }
.mg4-territory :is(button,select,canvas,summary):focus-visible { outline-color:#f3bb69; }
/* Mismo contrato funcional de Carrusel.js; sin estilos heredados de mg-news. */
.mg4-news { padding-block:80px; display:grid; grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr); gap:64px; align-items:center; }
.mg4-news h2 { margin-block:18px 24px; font-size:clamp(32px,3.7vw,52px); }
.mg4-news-intro > p:last-of-type { max-width:30ch; font-size:16px; }
.mg4-home .mg-news-controls { display:flex; gap:10px; margin-top:28px; }
.mg4-home .mg-news-controls button { width:46px; height:46px; padding:0; display:grid; place-items:center; border:1px solid #9eb3c5; border-radius:50%; color:var(--navy); background:#fff; cursor:pointer; }
.mg4-home .mg-news-controls button:hover { color:#fff; background:var(--navy); }
.mg4-home .mg-news-prev svg { transform:rotate(180deg); }
.mg4-news-content { min-width:0; }
.mg4-home .mg-news-viewport { overflow:hidden; }
.mg4-home .mg-news-track { display:flex; width:100%; flex-wrap:nowrap; transition:transform .5s ease; }
.mg4-home .mg-news-card { flex:0 0 100%; width:100%; min-width:100%; margin:0; }
.mg4-home .mg-news-card > img { width:100%; height:auto; aspect-ratio:1672/941; object-fit:contain; background:var(--navy); }
.mg4-news-caption { padding:24px 26px; background:var(--paper); }
.mg4-home .mg4-news-caption h3 { font-size:23px; }
.mg4-home .mg4-news-caption p { margin-top:12px; font-size:14px; }
.mg4-home .mg-news-dots { display:flex; justify-content:flex-end; gap:4px; margin-top:12px; }
.mg4-home .mg-news-dot { width:32px; height:32px; padding:0; border:10px solid #fff; border-radius:50%; background:#8d9eac; cursor:pointer; }
.mg4-home .mg-news-dot.is-active { background:var(--link); }
@media (max-width:1000px) {
 .mg4-wrap { padding-inline:28px; }
 .mg4-service-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .mg4-service-featured { grid-row:span 3; }
 .mg4-service:not(.mg4-service-featured) { grid-template-columns:32px minmax(0,1fr);gap:12px; }
 .mg4-service:not(.mg4-service-featured) .mg4-service-action { grid-column:2; }
 .mg4-service { padding:24px; }
 .mg4-commitment-copy { padding:38px 30px 18px 65px; }
 .mg4-about-heading, .mg4-principle, .mg4-news { gap:36px; }
 .mg4-territory-layout { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:20px; }
}
@media (max-width:900px) {
 .mg4-about-heading { grid-template-columns:1fr; }
 .mg4-about-description { max-width:60ch; }
 .mg4-care-entry > div { grid-template-columns:1fr;gap:24px; }
}
@media (max-width:760px) {
 .mg4-wrap { padding-inline:22px; }
 .mg4-hero-copy { padding-block:52px 150px; }
 .mg4-home .mg4-hero h1 { font-size:clamp(43px,8vw,62px); }
 .mg4-home .mg4-hero-intro { font-size:15px; max-width:36ch; }
 .mg4-hero::after { background:linear-gradient(180deg,#001b3ef5,#001b3edb 55%,#001b3e22); }
 .mg4-hero-photo { object-position:66% bottom; }
 .mg4-home .mg4-hero-caption { left:22px; bottom:22px; right:auto; font-size:9px; }
 .mg4-hero-network { left:-80%; width:180%; }
 .mg4-services { padding-block:40px 55px; }
 .mg4-heading { display:block; }
 .mg4-heading > p { margin-top:20px; }
 .mg4-institution { padding-top:55px; }
 .mg4-commitment { grid-template-columns:1fr; margin-block:36px 55px; }
 .mg4-commitment-photo { margin-right:0; padding:0; }
 .mg4-commitment-photo img { aspect-ratio:1.7; min-height:0; }
 .mg4-commitment-copy { padding:32px 26px 16px; }
 .mg4-principles { padding-bottom:55px; }
 .mg4-principle-network { opacity:.4; }
 .mg4-principle { grid-template-columns:1fr; gap:0; }
 .mg4-principle > div { padding:26px 0 0 24px; border-left:1px solid #c2d3df; }
 .mg4-safety figure { aspect-ratio:1.25; }
 .mg4-quality { width:100%; margin-top:42px; }
 .mg4-quality figure { grid-row:1; width:calc(100% - 40px); margin-left:40px; aspect-ratio:1.2; }
 .mg4-community .mg4-wrap { padding-block:130px 42px; }
 .mg4-community::after { background:linear-gradient(0deg,#001b3ef5,#001b3e99 65%,#001b3e11); }
 .mg4-territory { padding-block:55px; }
 .mg4-territory-heading { grid-template-columns:1fr; gap:20px; }
 .mg4-territory-layout { grid-template-columns:1fr; gap:30px; }
 .mg4-globe-stage { width:min(100%,460px); margin-inline:auto; }
 .mg4-territory-panel { padding:26px; }
 .mg4-news { display:block; padding-block:55px; }
 .mg4-news-intro { margin-bottom:28px; }
 .mg4-home .mg-news-controls { margin-top:20px; }
 .mg4-news-caption { padding:22px; }
}
@media (max-width:560px) {
 .mg4-service-grid { grid-template-columns:1fr; gap:14px; }
 .mg4-service { padding:24px; gap:18px; }
 .mg4-service-featured { grid-row:auto; }
 .mg4-service:not(.mg4-service-featured) { display:flex;align-items:stretch; }
 .mg4-service:not(.mg4-service-featured) .mg4-service-top { flex-direction:row; }
 .mg4-service-top { align-items:center; }
 .mg4-home .mg4-service h3 { font-size:25px; }
}
@media (prefers-reduced-motion:reduce) {
 .mg4-home .mg-news-track, .mg4-home .mg4-service, .mg4-home svg { transition:none; }
 .mg4-service:hover, .mg4-link:hover svg, .mg4-service-action:hover svg { transform:none; }
}
