/* SECPEC v5: interior pages share the navy, clear type and compact card language of home v4. */
body.page:not(.home) .entry-header {
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 24px;
  padding: 16px 24px;
  background: #1a3661;
}
body.page:not(.home) .entry-header .entry-title {
  max-width: 24ch;
  margin: 0;
  color: #fff !important;
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.02em;
  text-wrap: balance;
}
body.page:not(.home) .entry-content h2 {
  margin-block: 32px 12px;
  color: #1a3661;
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}
body.page:not(.home) .entry-content h3 {
  margin-block: 24px 10px;
  color: #1a3661;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
}
body.page:not(.home) .entry-content .wp-block-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  box-sizing: border-box;
  padding: 16px;
  border: 1px solid #d9e1ea;
  border-radius: 6px;
  background: #f4f7fa;
}
body.page:not(.home) .entry-content .wp-block-file__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 8px 16px;
  border: 0;
  border-radius: 6px;
  background: var(--secpec-action, #0b5963);
  color: #fff;
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
}
body.page:not(.home) .entry-content .wp-block-file__button:hover,
body.page:not(.home) .entry-content .wp-block-file__button:focus-visible { background: var(--secpec-action-hover, #084750); color: #fff; }

/* Repeated public grids: neutral card surfaces, equal image frames, complete artwork. */
body.page-id-5498 .entry-content .gb-grid-wrapper,
body.page-id-5097 .entry-content .gb-grid-wrapper,
body.page-id-4477 .entry-content .gb-grid-wrapper,
body.page-id-4396 .entry-content .gb-grid-wrapper,
body.page-id-4541 .entry-content .gb-grid-wrapper,
body.page-id-4521 .entry-content .gb-grid-wrapper,
body.page-id-4494 .entry-content .gb-grid-wrapper,
body.page-id-4718 .entry-content .gb-grid-wrapper {
  align-items: stretch;
  column-gap: clamp(16px, 2vw, 24px);
  row-gap: clamp(16px, 2vw, 24px);
}
body.page-id-5498 .entry-content .gb-grid-wrapper > .gb-grid-column > .gb-container,
body.page-id-5097 .entry-content .gb-grid-wrapper > .gb-grid-column > .gb-container,
body.page-id-4477 .entry-content .gb-grid-wrapper > .gb-grid-column > .gb-container,
body.page-id-4396 .entry-content .gb-grid-wrapper > .gb-grid-column > .gb-container,
body.page-id-4541 .entry-content .gb-grid-wrapper > .gb-grid-column > .gb-container,
body.page-id-4521 .entry-content .gb-grid-wrapper > .gb-grid-column > .gb-container,
body.page-id-4494 .entry-content .gb-grid-wrapper > .gb-grid-column > .gb-container,
body.page-id-4718 .entry-content .gb-grid-wrapper > .gb-grid-column > .gb-container {
  box-sizing: border-box;
  height: 100%;
  padding: 16px !important;
  border: 1px solid #d9e1ea;
  border-radius: 6px;
  background: #fff;
}
body.page-id-5498 .entry-content .gb-grid-wrapper .gb-block-image,
body.page-id-5097 .entry-content .gb-grid-wrapper .gb-block-image,
body.page-id-4477 .entry-content .gb-grid-wrapper .gb-block-image,
body.page-id-4396 .entry-content .gb-grid-wrapper .gb-block-image,
body.page-id-4541 .entry-content .gb-grid-wrapper .gb-block-image,
body.page-id-4521 .entry-content .gb-grid-wrapper .gb-block-image,
body.page-id-4494 .entry-content .gb-grid-wrapper .gb-block-image,
body.page-id-4718 .entry-content .gb-grid-wrapper .gb-block-image {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0 0 12px;
  border-radius: 6px;
  background: #f4f7fa;
}
body.page-id-5498 .entry-content .gb-grid-wrapper .gb-block-image > img,
body.page-id-5097 .entry-content .gb-grid-wrapper .gb-block-image > img,
body.page-id-4477 .entry-content .gb-grid-wrapper .gb-block-image > img,
body.page-id-4396 .entry-content .gb-grid-wrapper .gb-block-image > img,
body.page-id-4541 .entry-content .gb-grid-wrapper .gb-block-image > img,
body.page-id-4521 .entry-content .gb-grid-wrapper .gb-block-image > img,
body.page-id-4494 .entry-content .gb-grid-wrapper .gb-block-image > img,
body.page-id-4718 .entry-content .gb-grid-wrapper .gb-block-image > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  border-radius: 6px;
  object-fit: contain;
  object-position: center;
}
body.page-id-4494 .entry-content .gb-grid-wrapper .gb-block-image,
body.page-id-4541 .entry-content .gb-grid-wrapper .gb-block-image {
  aspect-ratio: 2 / 1;
}
body.page-id-5498 .entry-content .gb-grid-wrapper .gb-headline,
body.page-id-5097 .entry-content .gb-grid-wrapper .gb-headline,
body.page-id-4477 .entry-content .gb-grid-wrapper .gb-headline,
body.page-id-4396 .entry-content .gb-grid-wrapper .gb-headline,
body.page-id-4541 .entry-content .gb-grid-wrapper .gb-headline,
body.page-id-4521 .entry-content .gb-grid-wrapper .gb-headline,
body.page-id-4494 .entry-content .gb-grid-wrapper .gb-headline,
body.page-id-4718 .entry-content .gb-grid-wrapper .gb-headline {
  margin: 0 0 8px;
  color: #1a3661;
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
}

/* Junta directiva actual, anterior y 2024–2026: one-card-per-person, no content edits. */
body.secpec-junta .entry-content .gb-grid-wrapper,
body.page-id-5207 .entry-content .gb-grid-wrapper {
  display: grid !important;
  grid-template-columns: minmax(148px, 180px) minmax(0, 1fr) !important;
  align-items: start;
  gap: 24px;
  box-sizing: border-box;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid #d9e1ea;
  border-radius: 6px;
  background: #fff;
}
body.secpec-junta .entry-content .gb-grid-wrapper > .gb-grid-column,
body.page-id-5207 .entry-content .gb-grid-wrapper > .gb-grid-column {
  box-sizing: border-box;
  width: auto !important;
  min-width: 0;
  padding: 0 !important;
}
body.secpec-junta .entry-content .gb-grid-wrapper > .gb-grid-column > .gb-container,
body.page-id-5207 .entry-content .gb-grid-wrapper > .gb-grid-column > .gb-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
body.secpec-junta .entry-content .gb-grid-wrapper > .gb-grid-column:nth-child(2) > .gb-container,
body.page-id-5207 .entry-content .gb-grid-wrapper > .gb-grid-column:nth-child(2) > .gb-container { align-items: flex-start; }
body.secpec-junta .entry-content .gb-grid-wrapper .gb-block-image,
body.page-id-5207 .entry-content .gb-grid-wrapper .gb-block-image {
  flex: 0 0 148px;
  width: 148px;
  height: 148px;
  margin: 0 auto 12px;
}
body.secpec-junta .entry-content .gb-grid-wrapper .gb-block-image > img,
body.page-id-5207 .entry-content .gb-grid-wrapper .gb-block-image > img {
  display: block;
  width: 148px !important;
  max-width: 148px !important;
  height: 148px !important;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  object-position: center 22%;
}
body.secpec-junta .entry-content .gb-grid-wrapper h2,
body.page-id-5207 .entry-content .gb-grid-wrapper h2 {
  margin: 0 0 8px;
  color: #1a3661;
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}
body.secpec-junta .entry-content .gb-grid-wrapper p,
body.page-id-5207 .entry-content .gb-grid-wrapper p {
  max-width: none;
  margin: 0 0 8px;
  color: #263547;
  font-size: 16px;
  line-height: 1.5;
}
body.secpec-junta .entry-content .wp-block-separator,
body.page-id-5207 .entry-content .wp-block-separator { display: none; }

@media (max-width: 600px) {
  body.page:not(.home) .entry-header { margin-bottom: 16px; padding: 14px 16px; }
  body.page:not(.home) .entry-header .entry-title { font-size: clamp(30px, 8vw, 38px); }
  body.secpec-junta .entry-content .gb-grid-wrapper,
  body.page-id-5207 .entry-content .gb-grid-wrapper {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px;
    padding: 12px;
  }
  body.secpec-junta .entry-content .gb-grid-wrapper .gb-block-image,
  body.page-id-5207 .entry-content .gb-grid-wrapper .gb-block-image { flex-basis: 120px; width: 120px; height: 120px; }
  body.secpec-junta .entry-content .gb-grid-wrapper .gb-block-image > img,
  body.page-id-5207 .entry-content .gb-grid-wrapper .gb-block-image > img { width: 120px !important; max-width: 120px !important; height: 120px !important; }
}
@media (max-width: 359px) {
  body.secpec-junta .entry-content .gb-grid-wrapper,
  body.page-id-5207 .entry-content .gb-grid-wrapper { grid-template-columns: minmax(0, 1fr) !important; }
}

/* Listados: keep each poster and its event copy in one balanced, full-width card. */
body.page-id-5498 .entry-content .gb-grid-wrapper,
body.page-id-5097 .entry-content .gb-grid-wrapper,
body.page-id-4477 .entry-content .gb-grid-wrapper,
body.page-id-4396 .entry-content .gb-grid-wrapper {
  display: grid;
  grid-template-columns: minmax(220px, 32%) minmax(0, 1fr);
  align-items: start;
  column-gap: 24px;
  row-gap: 16px;
  box-sizing: border-box;
  padding: 16px;
  border: 1px solid #d9e1ea;
  border-radius: 6px;
  background: #fff;
}
body.page-id-5498 .entry-content .gb-grid-wrapper > .gb-grid-column,
body.page-id-5097 .entry-content .gb-grid-wrapper > .gb-grid-column,
body.page-id-4477 .entry-content .gb-grid-wrapper > .gb-grid-column,
body.page-id-4396 .entry-content .gb-grid-wrapper > .gb-grid-column {
  box-sizing: border-box;
  width: auto !important;
  min-width: 0;
  padding: 0 !important;
}
body.page-id-5498 .entry-content .gb-grid-wrapper > .gb-grid-column > .gb-container,
body.page-id-5097 .entry-content .gb-grid-wrapper > .gb-grid-column > .gb-container,
body.page-id-4477 .entry-content .gb-grid-wrapper > .gb-grid-column > .gb-container,
body.page-id-4396 .entry-content .gb-grid-wrapper > .gb-grid-column > .gb-container {
  box-sizing: border-box;
  height: auto;
  padding: 0 !important;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body.page-id-5498 .entry-content .gb-grid-wrapper .gb-block-image:has(> img[width="151"][height="30"]),
body.page-id-5097 .entry-content .gb-grid-wrapper .gb-block-image:has(> img[width="151"][height="30"]),
body.page-id-4477 .entry-content .gb-grid-wrapper .gb-block-image:has(> img[width="151"][height="30"]),
body.page-id-4396 .entry-content .gb-grid-wrapper .gb-block-image:has(> img[width="151"][height="30"]) {
  position: static;
  width: min(100%, 210px);
  max-width: 210px;
  height: auto;
  aspect-ratio: auto;
  margin: 12px 0 0;
  border-radius: 0;
  background: transparent;
}
body.page-id-5498 .entry-content .gb-grid-wrapper .gb-block-image:has(> img[width="151"][height="30"]) > img,
body.page-id-5097 .entry-content .gb-grid-wrapper .gb-block-image:has(> img[width="151"][height="30"]) > img,
body.page-id-4477 .entry-content .gb-grid-wrapper .gb-block-image:has(> img[width="151"][height="30"]) > img,
body.page-id-4396 .entry-content .gb-grid-wrapper .gb-block-image:has(> img[width="151"][height="30"]) > img {
  position: static;
  inset: auto;
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 42px;
  margin: 0;
  object-fit: contain;
}

/* The source preserves each real PDF link after removing its broken icon.
   Render it as a compact text CTA so the first column is no longer a blank frame. */
body.page-id-4718 .entry-content .gb-grid-wrapper:has(> .gb-grid-column:first-child a[aria-label="Descargar"]) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  box-sizing: border-box;
  padding: 16px;
  border: 1px solid #d9e1ea;
  border-radius: 6px;
  background: #fff;
}
body.page-id-4718 .entry-content .gb-grid-wrapper:has(> .gb-grid-column:first-child a[aria-label="Descargar"]) > .gb-grid-column {
  box-sizing: border-box;
  width: auto !important;
  min-width: 0;
  padding: 0 !important;
}
body.page-id-4718 .entry-content .gb-grid-wrapper:has(> .gb-grid-column:first-child a[aria-label="Descargar"]) > .gb-grid-column:first-child {
  order: 2;
}
body.page-id-4718 .entry-content .gb-grid-wrapper:has(> .gb-grid-column:first-child a[aria-label="Descargar"]) > .gb-grid-column:nth-child(2) {
  order: 1;
}
body.page-id-4718 .entry-content .gb-grid-wrapper:has(> .gb-grid-column:first-child a[aria-label="Descargar"]) > .gb-grid-column > .gb-container {
  box-sizing: border-box;
  height: auto;
  padding: 0 !important;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body.page-id-4718 .entry-content .gb-grid-wrapper:has(> .gb-grid-column:first-child a[aria-label="Descargar"]) figure.wp-block-image {
  margin: 0;
}
body.page-id-4718 .entry-content .gb-grid-wrapper:has(> .gb-grid-column:first-child a[aria-label="Descargar"]) figure.wp-block-image:has(> a[aria-label="Descargar"]:empty) {
  display: contents;
}
body.page-id-4718 .entry-content .gb-grid-wrapper:has(> .gb-grid-column:first-child a[aria-label="Descargar"]) a[aria-label="Descargar"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  box-sizing: border-box;
  padding: 9px 16px;
  border-radius: 6px;
  background: var(--secpec-action, #0b5963);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}
body.page-id-4718 .entry-content .gb-grid-wrapper:has(> .gb-grid-column:first-child a[aria-label="Descargar"]:focus-visible) a[aria-label="Descargar"] { outline: 3px solid var(--secpec-action, #0b5963); outline-offset: 2px; }
body.page-id-4718 .entry-content .gb-grid-wrapper:has(> .gb-grid-column:first-child a[aria-label="Descargar"]) a[aria-label="Descargar"]::after { content: "Descargar PDF"; }

@media (max-width: 767px) {
  body.page-id-5498 .entry-content .gb-grid-wrapper,
  body.page-id-5097 .entry-content .gb-grid-wrapper,
  body.page-id-4477 .entry-content .gb-grid-wrapper,
  body.page-id-4396 .entry-content .gb-grid-wrapper { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
