/* Sitio público ENGM — identidad del Gobierno de Tamaulipas: guinda, dorado y crema; Montserrat. */
:root {
    --g: #7a1631;          /* guinda */
    --g-dark: #4e0d20;
    --g-soft: #f6e9ed;
    --gold: #b38e5d;       /* dorado */
    --gold-soft: #efe3d1;
    --cream: #f8f4ee;
    --ink: #2a2526;
    --muted: #6f676a;
    --line: #ece5e2;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(78, 13, 32, .10);
    --max: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); background: #fff; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--g); }
a:hover { color: var(--g-dark); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }

/* Franja institucional */
.gov-bar { background: var(--g-dark); color: #f3e7ea; font-size: .78rem; }
.gov-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.gov-bar a { color: #f3e7ea; text-decoration: none; opacity: .9; }
.gov-bar a:hover { opacity: 1; color: #fff; }
.gov-bar .gov-links { display: flex; gap: 18px; flex-wrap: wrap; }
.gov-bar .gov-social { display: flex; gap: 14px; font-size: .95rem; }

/* Encabezado */
.site-header { background: #fff; border-bottom: 4px solid var(--gold); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 12px rgba(0,0,0,.04); }
.site-header .wrap { max-width: 1320px; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 96px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; max-width: 330px; }
.brand img { height: 78px; width: auto; }
.brand-name { font-weight: 800; font-size: 1.08rem; line-height: 1.15; color: var(--g); }
.brand-name small { display: block; font-weight: 500; font-size: .74rem; color: var(--muted); letter-spacing: .02em; margin-top: 3px; }
.brand-gov { height: 44px; width: auto; padding-left: 14px; border-left: 1px solid var(--line); flex-shrink: 0; margin-right: auto; }
@media (max-width: 1679.98px) { .brand-gov { display: none; } }

.nav { display: flex; align-items: center; gap: 2px; }
.nav > li { list-style: none; position: relative; }
.nav ul { padding: 0; margin: 0; }
.nav a, .nav button { display: flex; align-items: center; gap: 5px; padding: 10px 9px; white-space: nowrap; border-radius: 9px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .86rem; background: none; border: 0; cursor: pointer; font-family: inherit; }
.nav a:hover, .nav button:hover, .nav .open > button { background: var(--g-soft); color: var(--g); }
.nav a.active { color: var(--g); }
.nav .chev { font-size: .65rem; transition: transform .2s; }
.nav .open > button .chev { transform: rotate(180deg); }
.nav .sub { position: absolute; top: calc(100% + 6px); left: 0; min-width: 250px; background: #fff; border-radius: 12px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 8px; display: none; }
.nav .sub::before { content: ''; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.nav .open > .sub, .nav > li:hover > .sub { display: block; }
.nav .sub { width: max-content; max-width: 360px; }
.nav .sub li { list-style: none; }
.nav .sub a { font-weight: 500; padding: 9px 12px; white-space: normal; line-height: 1.35; }
.nav-cta { background: var(--g) !important; color: #fff !important; margin-left: 8px; }
.nav-cta:hover { background: var(--g-dark) !important; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 46px; height: 46px; font-size: 1.2rem; color: var(--g); cursor: pointer; }

/* Avisos */
.notice { background: var(--gold-soft); color: #5b4320; font-size: .9rem; }
.notice.urgente { background: var(--g); color: #fff; }
.notice .wrap { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.notice a { color: inherit; font-weight: 700; white-space: nowrap; }
.notice i { flex-shrink: 0; }

/* Secciones (bloques) */
.sb { padding: 72px 0; }
.sb.bg-crema { background: var(--cream); }
.sb.bg-guinda { background: linear-gradient(135deg, var(--g) 0%, var(--g-dark) 100%); color: #fff; }
.sb.bg-guinda a:not(.btn) { color: #fff; }
.sb + .sb.bg-blanco, .sb.bg-blanco + .sb.bg-blanco { padding-top: 24px; }
.sb-head { max-width: 760px; margin: 0 auto 36px; text-align: center; }
.sb-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.sb-head h2::after { content: ''; display: block; width: 64px; height: 4px; border-radius: 4px; background: var(--gold); margin: 14px auto 0; }
.sb-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.bg-guinda .sb-head p { color: #f0dfe4; }
.kicker { display: inline-block; text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; font-weight: 700; color: var(--gold); margin-bottom: 10px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: .95rem; text-decoration: none; border: 2px solid transparent; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-principal { background: var(--gold); color: #fff; }
.btn-principal:hover { background: #9c7a4d; color: #fff; }
.btn-claro { border-color: rgba(255,255,255,.8); color: #fff; }
.btn-claro:hover { background: #fff; color: var(--g); }
.bg-blanco .btn-claro, .bg-crema .btn-claro { border-color: var(--g); color: var(--g); }
.btn-guinda { background: var(--g); color: #fff; }
.btn-guinda:hover { background: var(--g-dark); color: #fff; }

/* Portada */
.hero { position: relative; color: #fff; background: var(--g-dark); overflow: hidden; display: flex; align-items: center; }
.hero.h-grande { min-height: 78vh; }
.hero.h-mediano { min-height: 56vh; }
.hero.h-chico { min-height: 38vh; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.03); animation: heroZoom 18s ease-out forwards; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(78,13,32,.92) 0%, rgba(122,22,49,.72) 45%, rgba(122,22,49,.25) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-top: 80px; padding-bottom: 80px; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); max-width: 780px; margin-bottom: 18px; }
.hero p { font-size: clamp(1rem, 1.6vw, 1.2rem); max-width: 640px; color: #f3e6e9; margin: 0 0 30px; }
.hero .kicker { color: var(--gold-soft); }
.hero .btns { display: flex; flex-wrap: wrap; gap: 12px; }
@keyframes heroZoom { to { transform: scale(1); } }

.page-header { background: linear-gradient(135deg, var(--g) 0%, var(--g-dark) 100%); color: #fff; padding: 64px 0 56px; position: relative; overflow: hidden; }
.page-header.has-img { background-size: cover; background-position: center; }
.page-header.has-img::before { content: ''; position: absolute; inset: 0; background: rgba(78,13,32,.82); }
.page-header .wrap { position: relative; }
.page-header h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0; }
.page-header p { margin: 10px 0 0; max-width: 720px; color: #f0dfe4; font-size: 1.08rem; }
.page-header::after { content: ''; position: absolute; right: -60px; bottom: -60px; width: 260px; height: 260px; border-radius: 50%; border: 36px solid rgba(179,142,93,.18); }
.crumbs { font-size: .8rem; margin-bottom: 12px; opacity: .85; }
.crumbs a { color: #fff; text-decoration: none; }

/* Texto */
.prose { max-width: 780px; margin: 0 auto; font-size: 1.05rem; }
.prose.ancho { max-width: none; }
.prose h2 { font-size: 1.6rem; margin-top: 1.4em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.3em; color: var(--g); }
.bg-guinda .prose h3 { color: var(--gold-soft); }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.4em 0; padding: 14px 20px; border-left: 4px solid var(--gold); background: var(--cream); border-radius: 0 10px 10px 0; font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose img { max-width: 100%; height: auto; border-radius: 12px; margin: 1em auto; }
body { overflow-x: hidden; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose th { background: var(--cream); }
.prose .ql-align-center { text-align: center; } .prose .ql-align-right { text-align: right; } .prose .ql-align-justify { text-align: justify; }
.block-title { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 18px; }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.split.img-izquierda .split-media { order: -1; }
.split-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; }
.split-media { position: relative; }
.split-media::before { content: ''; position: absolute; inset: 18px -18px -18px 18px; border: 3px solid var(--gold); border-radius: var(--radius); z-index: -1; }
.split.img-izquierda .split-media::before { inset: 18px 18px -18px -18px; }

/* Tarjetas */
.cards { display: grid; gap: 22px; }
.cards.c2 { grid-template-columns: repeat(2, 1fr); } .cards.c3 { grid-template-columns: repeat(3, 1fr); } .cards.c4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; color: var(--ink); text-decoration: none; }
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--ink); }
.card-img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.card-body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-icon { width: 54px; height: 54px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--g-soft); color: var(--g); font-size: 1.35rem; margin-bottom: 6px; }
.card h3 { font-size: 1.12rem; margin: 0; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.card .more { margin-top: auto; padding-top: 8px; color: var(--g); font-weight: 700; font-size: .88rem; }
.bg-guinda .card { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.18); color: #fff; }
.bg-guinda .card p { color: #f0dfe4; }
.bg-guinda .card-icon { background: rgba(255,255,255,.12); color: var(--gold-soft); }

/* Accesos rápidos */
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.quick a { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; transition: transform .15s, box-shadow .15s; }
.quick a:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.quick i { width: 44px; height: 44px; border-radius: 12px; background: var(--g-soft); color: var(--g); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.bg-guinda .quick a { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #fff; }
.bg-guinda .quick a:hover { background: rgba(255,255,255,.16); }
.bg-guinda .quick i { background: var(--gold); color: #fff; }
.sb-quick_links { padding: 34px 0; }
.sb-quick_links .block-title { text-align: center; }

/* Cifras */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px; text-align: center; }
.stat-value { font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; color: var(--g); line-height: 1; }
.bg-guinda .stat-value { color: var(--gold-soft); }
.stat-label { color: var(--muted); font-weight: 600; margin-top: 8px; }
.bg-guinda .stat-label { color: #f0dfe4; }

/* Llamado a la acción */
.cta { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 8px; }
.cta p { margin: 0; max-width: 640px; opacity: .92; font-size: 1.05rem; }
.cta .btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* Preguntas */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 10px; overflow: hidden; }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--g); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details > div { padding: 0 20px 18px; color: var(--muted); white-space: pre-line; }

/* Video */
.video { max-width: 900px; margin: 0 auto; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.video iframe { width: 100%; height: 100%; border: 0; }

/* Noticias */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--ink); }
.post-card .ph { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--g-soft), var(--gold-soft)); display: flex; align-items: center; justify-content: center; color: var(--g); font-size: 2rem; overflow: hidden; }
.post-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.post-card .pb { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.post-date { font-size: .78rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .06em; }
.post-card h3 { font-size: 1.08rem; margin: 0; }
.post-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.see-all { text-align: center; margin-top: 30px; }

/* Eventos */
.events { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.event { display: flex; gap: 18px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--ink); }
.event-date { flex-shrink: 0; width: 70px; text-align: center; border-radius: 12px; background: var(--g); color: #fff; padding: 8px 0; }
.event-date b { display: block; font-size: 1.6rem; line-height: 1; }
.event-date span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.event h3 { font-size: 1.05rem; margin: 2px 0 4px; }
.event p { margin: 0; color: var(--muted); font-size: .92rem; }
.event .meta { font-size: .82rem; color: var(--gold); font-weight: 600; }

/* Documentos */
.docs { max-width: 880px; margin: 0 auto; display: grid; gap: 10px; }
.doc { display: flex; align-items: center; gap: 16px; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.doc:hover { border-color: var(--gold); box-shadow: var(--shadow); color: var(--ink); }
.doc i { color: #c0392b; font-size: 1.6rem; width: 32px; text-align: center; flex-shrink: 0; }
.doc b { display: block; }
.doc small { color: var(--muted); }
.doc .dl { margin-left: auto; color: var(--g); font-weight: 700; font-size: .85rem; white-space: nowrap; }
.doc-cat { max-width: 880px; margin: 34px auto 12px; font-size: 1.15rem; color: var(--g); }

/* Galería */
.albums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.album-card { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; display: block; color: #fff; text-decoration: none; background: var(--g-soft); }
.album-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.album-card:hover img { transform: scale(1.05); }
.album-card .cap { position: absolute; inset: auto 0 0 0; padding: 40px 18px 16px; background: linear-gradient(transparent, rgba(40,6,16,.88)); }
.album-card .cap b { display: block; font-size: 1.05rem; }
.album-card .cap small { opacity: .85; }
.photos { columns: 3 260px; column-gap: 14px; }
.photos a { display: block; margin-bottom: 14px; border-radius: 12px; overflow: hidden; break-inside: avoid; }
.photos img { width: 100%; transition: transform .3s; }
.photos a:hover img { transform: scale(1.03); }
.lightbox { position: fixed; inset: 0; background: rgba(15,5,8,.92); z-index: 100; display: none; align-items: center; justify-content: center; padding: 30px; }
.lightbox.on { display: flex; }
.lightbox img { max-height: 88vh; border-radius: 10px; }
.lightbox button { position: absolute; top: 18px; right: 22px; background: none; border: 0; color: #fff; font-size: 2rem; cursor: pointer; }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1.3fr; gap: 30px; align-items: stretch; }
.contact-list { display: grid; gap: 14px; align-content: start; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--ink); }
.contact-item i { color: var(--g); font-size: 1.2rem; width: 24px; text-align: center; margin-top: 3px; }
.contact-item small { display: block; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.map { border-radius: var(--radius); overflow: hidden; min-height: 320px; box-shadow: var(--shadow); }
.map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }

/* Artículo */
.article { max-width: 820px; margin: 0 auto; }
.article-cover { width: 100%; border-radius: var(--radius); margin-bottom: 26px; box-shadow: var(--shadow); }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 30px; flex-wrap: wrap; }
.pager a, .pager span { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; }
.pager .on { background: var(--g); color: #fff; border-color: var(--g); }

/* Pie */
.site-footer { background: var(--g-dark); color: #e9d9dd; padding: 56px 0 0; font-size: .92rem; border-top: 6px solid var(--gold); }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer a { color: #e9d9dd; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.foot-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.foot-brand img { height: 64px; background: #fff; border-radius: 12px; padding: 6px; }
.foot-brand b { color: #fff; font-size: 1rem; line-height: 1.25; }
.foot-social { display: flex; gap: 10px; margin-top: 16px; }
.foot-social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; }
.foot-social a:hover { background: var(--gold); }
.foot-bottom { margin-top: 44px; border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: #cdb8bd; }
.foot-logos { display: flex; gap: 22px; align-items: center; background: #fff; border-radius: 12px; padding: 8px 16px; }
.foot-logos img { height: 36px; width: auto; }

/* Aparecer al hacer scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .hero-bg { animation: none; } }

/* Vista previa del editor */
.is-preview [data-block] { position: relative; cursor: pointer; }
.is-preview [data-block]:hover { outline: 2px dashed var(--gold); outline-offset: -2px; }
.is-preview [data-block].selected { outline: 3px solid var(--g); outline-offset: -3px; }
.is-preview [data-block]::before { content: attr(data-label); position: absolute; top: 8px; left: 8px; z-index: 5; background: var(--g); color: #fff; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; opacity: 0; transition: opacity .15s; pointer-events: none; }
.is-preview [data-block]:hover::before, .is-preview [data-block].selected::before { opacity: 1; }
.preview-empty { padding: 120px 20px; text-align: center; color: var(--muted); }

@media (max-width: 1220px) {
    .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .site-nav { position: fixed; inset: 0 0 0 auto; width: min(360px, 88vw); background: #fff; box-shadow: -10px 0 30px rgba(0,0,0,.15); transform: translateX(100%); transition: transform .25s; z-index: 60; overflow-y: auto; padding: 80px 16px 24px; }
    .site-nav.open { transform: none; }
    .nav { flex-direction: column; align-items: stretch; }
    .nav a, .nav button { width: 100%; justify-content: space-between; padding: 13px 14px; font-size: 1rem; }
    .nav .sub { position: static; display: none; box-shadow: none; border: 0; padding: 0 0 6px 12px; }
    .nav > li:not(.open):hover > .sub { display: none; }
    .nav .sub { width: auto; max-width: none; }
    .nav .open > .sub { display: block; }
    .nav-cta { margin: 10px 0 0; justify-content: center !important; }
    .brand-gov { display: none; }
    .nav-close { position: absolute; top: 18px; right: 18px; }
}
@media (max-width: 900px) {
    .split, .contact, .foot { grid-template-columns: 1fr; gap: 30px; }
    .split.img-izquierda .split-media { order: 0; }
    .cards.c3, .cards.c4, .posts, .albums { grid-template-columns: repeat(2, 1fr); }
    .sb { padding: 54px 0; }
}
@media (max-width: 600px) {
    .cards.c2, .cards.c3, .cards.c4, .posts, .albums { grid-template-columns: 1fr; }
    .gov-bar .gov-links a:not(:first-child) { display: none; }
    .site-header .wrap { gap: 10px; }
    .brand { flex-shrink: 1; min-width: 0; gap: 10px; }
    .brand img { height: 56px; }
    .brand-name { font-size: .88rem; }
    .brand-name small { display: none; }
    .menu-toggle { flex-shrink: 0; }
    .hero.h-grande { min-height: 70vh; }
    .event-date { width: 58px; }
}

/* Facebook */
.fb { display: grid; grid-template-columns: 1fr 520px; gap: 40px; align-items: center; }
.fb-frame { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; justify-content: center; }
.fb-frame iframe { width: 100%; max-width: 500px; height: 620px; border: 0; }
.fb .btn { margin-top: 18px; }
@media (max-width: 900px) { .fb { grid-template-columns: 1fr; } .fb-frame iframe { height: 520px; } }

/* Documento PDF */
.pdf-box { max-width: 980px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.pdf-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pdf-head b { display: flex; align-items: center; gap: 10px; }
.pdf-head b i { color: #c0392b; font-size: 1.3rem; }
.pdf-box iframe { width: 100%; height: 75vh; min-height: 520px; border: 0; display: block; background: #f3f0f1; }
@media (max-width: 700px) { .pdf-box iframe { display: none; } }

/* ── Bloques ricos de portada ─────────────────────────────────────── */
.pill-kicker { display: inline-block; background: var(--gold-soft); color: #7a5a2e; font-weight: 700; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; margin-bottom: 12px; }
.bg-guinda .pill-kicker { background: rgba(255,255,255,.14); color: var(--gold-soft); }
.btn-ghost { border-color: var(--line); color: var(--g); background: #fff; }
.btn-ghost:hover { border-color: var(--g); color: var(--g); }
.bg-crema { background-image: radial-gradient(rgba(122,22,49,.06) 1px, transparent 1px); background-size: 22px 22px; }

/* Portada con fotos */
.hs { position: relative; overflow: hidden; color: #fff; background: radial-gradient(circle at 85% 20%, #9a2445 0%, var(--g) 35%, var(--g-dark) 100%); }
.hs-pattern { position: absolute; inset: 0; opacity: .07; background-image: url('img/logo_engm.png'); background-repeat: no-repeat; background-size: 520px; background-position: -120px 120%; filter: grayscale(1) brightness(3); }
.hs-grid { position: relative; display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; padding-top: 76px; padding-bottom: 84px; }
.hs-text h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); margin-bottom: 18px; line-height: 1.08; }
.hs-text h1::after { content: ''; display: block; width: 90px; height: 5px; border-radius: 5px; background: var(--gold); margin-top: 20px; }
.hs-text p { font-size: clamp(1.02rem, 1.6vw, 1.25rem); color: #f3e6e9; margin: 0 0 30px; max-width: 560px; }
.hs-text .kicker { color: var(--gold-soft); }
.hs .btns { display: flex; flex-wrap: wrap; gap: 12px; }
.hs-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hs-badges div { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 12px 18px; min-width: 120px; backdrop-filter: blur(6px); }
.hs-badges b { display: block; font-size: 1.6rem; color: var(--gold-soft); line-height: 1.1; }
.hs-badges span { font-size: .8rem; color: #f0dfe4; }
.hs-media { position: relative; height: 480px; }
.hs-ph { position: absolute; border-radius: 18px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.35); border: 5px solid #fff; }
.hs-ph img { width: 100%; height: 100%; object-fit: cover; }
.hs-ph1 { top: 0; left: 0; width: 72%; height: 66%; z-index: 1; }
.hs-ph2 { bottom: 0; right: 0; width: 56%; height: 52%; z-index: 2; }
.hs-ph3 { bottom: 8%; left: 6%; width: 38%; height: 34%; z-index: 3; }
.hs-media.n1 .hs-ph1 { width: 100%; height: 100%; }
.hs-media.n2 .hs-ph1 { width: 78%; height: 74%; }
.hs-media::before { content: ''; position: absolute; top: 24px; right: -10px; width: 60%; height: 60%; border: 4px solid var(--gold); border-radius: 22px; z-index: 0; }

/* Licenciaturas */
.programs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.programs.n1 { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
.programs.n3 { grid-template-columns: repeat(3, 1fr); }
.program { background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 14px 40px rgba(78,13,32,.10); display: flex; flex-direction: column; border-top: 6px solid var(--g); transition: transform .25s, box-shadow .25s; }
.program.alt { border-top-color: var(--gold); }
.program:hover { transform: translateY(-6px); box-shadow: 0 22px 50px rgba(78,13,32,.16); }
.program-img { aspect-ratio: 16 / 8; overflow: hidden; }
.program-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.program:hover .program-img img { transform: scale(1.05); }
.program-body { padding: 26px 28px 28px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.program-head { display: flex; align-items: center; gap: 14px; }
.program-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--g); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.program.alt .program-icon { background: var(--gold); }
.program-head small { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 700; color: var(--gold); }
.program-head h3 { font-size: 1.35rem; margin: 2px 0 0; }
.program-text { margin: 0; color: var(--muted); }
.program-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; background: var(--cream); border-radius: 14px; padding: 14px 16px; }
.program-facts .wide { grid-column: 1 / -1; }
.program-facts dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.program-facts dd { margin: 2px 0 0; font-weight: 700; color: var(--ink); }
.program-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.program-features li { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.program-features i { color: var(--g); margin-top: 4px; }
.program.alt .program-features i { color: var(--gold); }
.program-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }

/* Pasos */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; position: relative; counter-reset: s; }
.steps.n3 { grid-template-columns: repeat(3, 1fr); } .steps.n4 { grid-template-columns: repeat(4, 1fr); } .steps.n6 { grid-template-columns: repeat(3, 1fr); }
.steps::before { content: ''; position: absolute; top: 32px; left: 8%; right: 8%; height: 3px; background: linear-gradient(90deg, var(--gold), var(--g)); border-radius: 3px; }
.steps li { position: relative; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 70px 18px 22px; margin-top: 0; }
.step-n { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 56px; height: 56px; border-radius: 50%; background: var(--g); color: #fff; font-weight: 800; font-size: 1.35rem; display: flex; align-items: center; justify-content: center; border: 5px solid #fff; box-shadow: 0 6px 18px rgba(122,22,49,.25); }
.steps li:nth-child(even) .step-n { background: var(--gold); }
.steps h3 { font-size: 1.02rem; margin-bottom: 6px; }
.steps p { margin: 0; font-size: .9rem; color: var(--muted); }

/* Calendario por grupos */
.cal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1000px) { .cal-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cal-grid { grid-template-columns: 1fr; } }
.cal-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 8px 24px rgba(78,13,32,.08); }
.cal-head { display: flex; gap: 12px; align-items: center; padding: 14px 18px; color: #fff; background: var(--g); }
.cal-card.c1 .cal-head { background: #9c7a4d; } .cal-card.c2 .cal-head { background: #5a1a2c; } .cal-card.c3 .cal-head { background: #b38e5d; } .cal-card.c4 .cal-head { background: #8b2240; } .cal-card.c5 .cal-head { background: #6d5a3c; }
.cal-n { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.cal-head b { display: block; font-size: 1.02rem; } .cal-head small { opacity: .88; font-size: .8rem; }
.cal-card ul { list-style: none; padding: 8px 18px 14px; margin: 0; }
.cal-card li { display: grid; grid-template-columns: 128px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.cal-card li:last-child { border-bottom: 0; }
.cal-date { font-weight: 700; color: var(--g); }
.cal-note { margin: 22px auto 0; max-width: 720px; text-align: center; background: var(--g); color: #fff; border-radius: 999px; padding: 14px 24px; font-weight: 700; }
.cal-note i { color: var(--gold-soft); margin-right: 6px; }

/* Mosaico */
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: 14px; }
.mosaic a { position: relative; border-radius: 16px; overflow: hidden; display: block; }
.mosaic a:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.mosaic a:nth-child(4) { grid-column: span 2; }
.mosaic.n3 a:nth-child(1) { grid-column: span 2; grid-row: span 2; } .mosaic.n3 a:nth-child(2), .mosaic.n3 a:nth-child(3) { grid-column: span 2; }
.mosaic.n2 { grid-template-columns: 1fr 1fr; grid-auto-rows: 320px; } .mosaic.n2 a { grid-column: auto !important; grid-row: auto !important; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.mosaic a:hover img { transform: scale(1.06); }
.mosaic span { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px; color: #fff; font-weight: 600; font-size: .9rem; background: linear-gradient(transparent, rgba(40,6,16,.85)); }

/* Noticias */
.post-card .ph { position: relative; }
.post-card .ph .ph-logo { width: 46%; height: auto; object-fit: contain; opacity: .9; }
.ph-date { position: absolute; top: 14px; left: 14px; background: var(--g); color: #fff; border-radius: 12px; padding: 6px 10px; text-align: center; font-size: .66rem; font-weight: 700; letter-spacing: .06em; line-height: 1.2; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.ph-date b { display: block; font-size: 1.3rem; letter-spacing: 0; }
.post-card .more { color: var(--g); font-weight: 700; font-size: .88rem; margin-top: 4px; }
.news-fb { display: grid; grid-template-columns: 1.25fr 1fr; gap: 26px; align-items: start; }
.news-panel { background: #fff; border-radius: 20px; box-shadow: 0 14px 40px rgba(78,13,32,.10); padding: 24px 26px; }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.panel-head i { width: 46px; height: 46px; border-radius: 14px; background: var(--g); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.fb-panel .panel-head i { background: #1877f2; }
.panel-head h2 { margin: 0; font-size: 1.35rem; }
.news-row { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.news-row:hover b { color: var(--g); }
.news-date { flex-shrink: 0; width: 62px; height: 66px; border-radius: 14px; background: var(--g-soft); color: var(--g); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.news-date b { font-size: 1.5rem; line-height: 1; } .news-date small { font-size: .68rem; font-weight: 700; letter-spacing: .08em; }
.news-row > span:last-child b { display: block; font-size: 1rem; margin-bottom: 4px; }
.news-row > span:last-child small { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.panel-more { display: inline-flex; gap: 8px; align-items: center; margin-top: 16px; font-weight: 700; text-decoration: none; }
.fb-panel iframe { width: 100%; height: 560px; border: 0; border-radius: 12px; display: block; }

@media (max-width: 1080px) {
    .steps, .steps.n4, .steps.n6 { grid-template-columns: repeat(2, 1fr); }
    .steps::before { display: none; }
    .programs.n3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .hs-grid, .news-fb, .programs { grid-template-columns: 1fr; }
    .hs-media { height: 340px; }
    .mosaic { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; }
    .mosaic a:nth-child(4) { grid-column: auto; }
}
@media (max-width: 600px) {
    .steps, .steps.n3 { grid-template-columns: 1fr; }
    .hs-grid { padding-top: 48px; padding-bottom: 56px; gap: 34px; }
    .hs-media { height: 280px; }
    .hs-badges div { min-width: 0; flex: 1; }
    .cal-card li { grid-template-columns: 1fr; gap: 2px; }
    .program-body { padding: 22px 20px; }
}
@media (min-width: 1221px) and (max-width: 1399.98px) {
    .brand { max-width: 290px; }
    .brand img { height: 70px; }
    .brand-name { font-size: 1rem; }
    .nav a, .nav button { padding: 9px 7px; font-size: .82rem; }
    .nav-cta { margin-left: 4px; }
}
.hs-pattern { opacity: .045; }
