/* Refinamientos visuales del tema — todo el resto se controla desde theme.json y bloques. */

.wp-site-blocks { background: var(--wp--preset--color--background); }

/* Encabezado institucional */
.pm-site-title {
  font-family: var(--wp--preset--font-family--fraunces) !important;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.pm-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--wp--preset--color--muted);
}

/* Bloque de alerta */
.pm-alert {
  border: 1px solid color-mix(in oklab, var(--wp--preset--color--alert) 40%, transparent);
  background: color-mix(in oklab, var(--wp--preset--color--alert) 15%, transparent);
  border-radius: 8px;
}
.pm-alert__badge {
  background: var(--wp--preset--color--alert);
  color: #1a1200;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
}

/* Etiqueta de categoría */
.pm-tag {
  display: inline-block;
  background: color-mix(in oklab, var(--wp--preset--color--accent-red) 12%, transparent);
  color: var(--wp--preset--color--accent-red);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
}

/* Tarjetas */
.pm-card {
  background: var(--wp--preset--color--white);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow .2s ease;
}
.pm-card:hover { box-shadow: 0 12px 30px -18px rgba(15,30,61,.35); }

/* Hero */
.pm-hero { position: relative; border-radius: 10px; overflow: hidden; }
.pm-hero .wp-block-cover__inner-container h1 { color: #fff; }

/* Menú principal */
.pm-mainnav {
  background: var(--wp--preset--color--institutional);
  color: var(--wp--preset--color--institutional-foreground);
}
.pm-mainnav a { color: #fff !important; text-transform: uppercase; font-weight: 600; letter-spacing: .05em; font-size: .85rem; }
.pm-mainnav .wp-block-navigation__submenu-container {
  background: #fff; color: var(--wp--preset--color--foreground);
  border: 1px solid var(--wp--preset--color--border);
  min-width: 240px;
}
.pm-mainnav .wp-block-navigation__submenu-container a { color: var(--wp--preset--color--foreground) !important; text-transform: none; font-weight: 500; }
.pm-mainnav .wp-block-navigation__submenu-container a:hover { background: var(--wp--preset--color--surface); }

/* Agenda / accesos rápidos */
.pm-panel__title {
  font-family: var(--wp--preset--font-family--fraunces);
  font-weight: 700;
  color: var(--wp--preset--color--institutional);
  border-bottom: 1px solid var(--wp--preset--color--border);
  padding: 1rem 1.25rem;
  background: var(--wp--preset--color--surface);
}
.pm-agenda-day {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 6px;
  background: var(--wp--preset--color--institutional); color: #fff;
  font-family: var(--wp--preset--font-family--fraunces); font-weight: 800; line-height: 1;
}
.pm-agenda-day small { font-size: .65rem; letter-spacing: .15em; font-weight: 700; margin-top: 2px; }

/* Video destacado */
.pm-video { position: relative; }
.pm-video::after {
  content: "▶"; position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 3rem; text-shadow: 0 4px 20px rgba(0,0,0,.5);
  background: rgba(15,30,61,.28); pointer-events: none;
}

/* Footer */
.pm-footer { background: var(--wp--preset--color--institutional); color: #fff; }
.pm-footer a { color: #fff; opacity: .85; }
.pm-footer a:hover { opacity: 1; text-decoration: underline; }

/* Barra superior */
.pm-topbar { background: var(--wp--preset--color--institutional); color: #fff; font-size: .75rem; }
.pm-topbar a { color: #fff; }

/* Utilidad */
.pm-divider { height: 1px; background: var(--wp--preset--color--border); }
/* ---------- Hero: título sobre imagen con fondo alpha ---------- */
.pm-hero-query .wp-block-post-template { list-style:none; padding:0; margin:0; gap:0 !important; }
.pm-hero-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(11,25,48,.12);
  isolation: isolate;
}
.pm-hero-item .wp-block-post-featured-image,
.pm-hero-item .pm-hero-item__img { margin: 0; }
.pm-hero-item .wp-block-post-featured-image img {
  display: block;
  width: 100%;
  height: clamp(320px, 55vw, 620px);
  object-fit: cover;
}
.pm-hero-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem clamp(1.25rem, 4vw, 3.5rem);
  height: 30%;
  min-height: 96px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: rgba(11,25,48,0.75);
  color: #fff;
  z-index: 2;
}
.pm-hero-caption > .wp-block-group { width: 100%; }
.pm-hero-caption, .pm-hero-caption * { color: #fff !important; }
.pm-hero-caption a { color: #fff !important; text-decoration: none; }
.pm-hero-caption a:hover { text-decoration: underline; }
.pm-hero-title { font-family: var(--wp--preset--font-family--fraunces); margin: .4rem 0 0; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.pm-hero-caption .pm-hero-excerpt { display: none; }
.pm-tag--hero { display: inline-block; background:#b41c2b; color:#fff !important; padding:.25rem .6rem; font-size:.7rem; letter-spacing:.14em; text-transform:uppercase; font-weight:700; border-radius:2px; }
.pm-hero-empty { padding:2rem; border:1px dashed var(--wp--preset--color--border); border-radius:8px; text-align:center; color: var(--wp--preset--color--muted); }

@media (max-width: 640px) {
  .pm-hero-item .wp-block-post-featured-image img { height: 60vw; min-height: 260px; }
  .pm-hero-caption { padding: .85rem 1.1rem; min-height: 84px; }
  .pm-hero-excerpt { display: none; }
}


/* ---------- Alertas: fila colapsable ---------- */
.pm-alert-query { margin: 0 !important; }
.pm-alert-query .wp-block-post-template { list-style: none; margin: 0; padding: 0; gap: 0 !important; }
.pm-alert-query .pm-alert { margin-top: 1.5rem; align-items: flex-start; gap: .85rem; }
.pm-alert__icon { font-size: 1.5rem; margin: 0; line-height: 1.2; }
.pm-alert__title { font-size: .95rem !important; font-weight: 700; margin: 0; }
.pm-alert__title a { color: var(--wp--preset--color--foreground); text-decoration: none; }
.pm-alert__title a:hover { text-decoration: underline; }
.pm-alert__text { font-size: .875rem; margin: 0; opacity: .9; }


/* =====================================================================
   v1.3 — Paleta institucional (#000f9f / #3cb4e5 / #c8a977) + REM
   ===================================================================== */

body, .wp-site-blocks { font-family: var(--wp--preset--font-family--rem), system-ui, sans-serif; }
h1, h2, h3, h4, h5, h6,
.pm-site-title, .pm-panel__title, .pm-hero-title {
  font-family: var(--wp--preset--font-family--rem), system-ui, sans-serif !important;
}

/* Encabezado con imagen de fondo */
.pm-header-cover { color: #fff; }
.pm-header-cover .pm-eyebrow { color: rgba(255,255,255,.8); }
.pm-header-cover .pm-site-title,
.pm-header-cover .pm-site-title a { color: #fff !important; text-decoration: none; }
.pm-header-cover .wp-block-search__input { border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.12); color: #fff; }
.pm-header-cover .wp-block-search__button { background: var(--wp--preset--color--accent-blue); color: #04203a; border: 0; }
.pm-header-cover .wp-block-site-logo img { background: #fff; border-radius: 6px; padding: 4px; }

/* Etiquetas de categoría */
.pm-tag {
  background: color-mix(in oklab, var(--wp--preset--color--accent-blue) 18%, transparent);
  color: var(--wp--preset--color--institutional);
}
.pm-tag--hero { background: var(--wp--preset--color--accent-gold) !important; color: #1a1305 !important; }

/* Alerta en dorado institucional */
.pm-alert {
  border-color: color-mix(in oklab, var(--wp--preset--color--accent-gold) 55%, transparent);
  background: color-mix(in oklab, var(--wp--preset--color--accent-gold) 18%, transparent);
}
.pm-alert__badge { background: var(--wp--preset--color--accent-gold); color: #1a1305; }

/* Hero: franja inferior 30% con azul institucional al 75% */
.pm-hero-caption { background: rgba(0, 15, 159, 0.75); }
.pm-hero-item { box-shadow: 0 8px 24px rgba(0,15,159,.14); }
.pm-card:hover { box-shadow: 0 12px 30px -18px rgba(0,15,159,.4); }
.pm-video::after { background: rgba(0,15,159,.30); }

/* Agenda dinámica (tipo de contenido "Eventos") */
.pm-agenda { display: flex; flex-direction: column; }
.pm-agenda-query .wp-block-post-template { list-style: none; margin: 0; padding: 0; gap: 0 !important; }
.pm-agenda-item { border-top: 1px solid var(--wp--preset--color--border); align-items: flex-start; }
.pm-agenda-item:hover { background: var(--wp--preset--color--surface); }
.pm-agenda-day {
  flex: 0 0 auto;
  width: 56px; height: 56px; border-radius: 6px;
  background: var(--wp--preset--color--institutional); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1; gap: 0;
}
.pm-agenda-day .pm-agenda-day__num { font-size: 1.35rem; font-weight: 800; margin: 0; }
.pm-agenda-day .pm-agenda-day__mon { font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin: 2px 0 0; }
.pm-agenda-item__title { margin: 0; line-height: 1.25; }
.pm-agenda-item__title a { color: var(--wp--preset--color--foreground); text-decoration: none; }
.pm-agenda-item__title a:hover { color: var(--wp--preset--color--institutional); text-decoration: underline; }
.pm-agenda-item__meta { margin: 0; }
.pm-agenda-item__meta .wp-block-post-excerpt__more-link { display: none; }
.pm-agenda-empty { padding: 1.25rem; border-top: 1px solid var(--wp--preset--color--border); }
.pm-agenda-more { border-top: 1px solid var(--wp--preset--color--border); margin: 0; }
.pm-agenda-more a { color: var(--wp--preset--color--institutional); text-decoration: none; }
