/*
Theme Name: FEPREMI
Author: Santiago Massa
Description: Base de implementación del diseño aprobado de FEPREMI.
Version: 0.3.7
Text Domain: fepremi
*/
body {
  margin: 0;
}
.interior-hero {
  position: relative;
  isolation: isolate;
  min-height: 440px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.interior-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 66%;
  z-index: -2;
}
.interior-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, #efefe7fa 10%, #efefe7dc 58%, #efefe760);
  z-index: -1;
}
.interior-hero-copy {
  width: 100%;
  padding-block: 64px;
}
.interior-hero h1 {
  margin-top: 28px;
  max-width: 1000px;
  font-size: clamp(42px, 6.1vw, 96px);
  overflow-wrap: anywhere;
}
.interior-body {
  max-width: 1200px;
  margin: auto;
  padding: 64px 24px 88px;
  overflow-wrap: anywhere;
}
.interior-body > * + * {
  margin-top: 28px;
}
.interior-body h2 {
  font-size: clamp(28px, 4vw, 48px);
  margin-top: 48px;
}
.interior-body a:not(.wp-block-button__link) {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.interior-body li + li {
  margin-top: 12px;
}
.interior-body .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.interior-body .wp-block-button__link {
  display: inline-block;
  background: var(--pine);
  color: white;
  border-radius: 99px;
  padding: 16px 24px;
}
.interior-body .wp-block-button__link:focus-visible {
  outline: 3px solid var(--pine);
  outline-offset: 4px;
}
@media (max-width: 700px) {
  .interior-hero {
    min-height: 320px;
  }
  .interior-hero-copy {
    padding-block: 40px;
  }
  .interior-body {
    padding: 36px 20px 56px;
  }
  .institution-grid,
  .institution-contact {
    grid-template-columns: 1fr;
  }
  .institution-contact p {
    overflow-wrap: anywhere;
  }
}
.site-header,
.site-main,
.site-footer {
  max-width: 1200px;
  margin-inline: auto;
  padding: 24px;
}
.skip-link {
  position: absolute;
  left: -10000px;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  background: white;
  color: black;
  padding: 12px;
  z-index: 100;
}
img {
  max-width: 100%;
  height: auto;
}
.site-main.front-content {
  max-width: none;
  padding: 0;
}
.home .header-shell {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
}
.front-content > .wp-block-group {
  margin-block: 0;
}
.front-content .home-scene {
  padding-top: 158px;
  display: flex;
  flex-direction: column;
}
.front-content .home-hero {
  flex: 1;
}
.front-content .home-links {
  margin-top: auto;
}
.nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.menu-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.menu-panel a {
  display: block;
}
.wp-block-group.actions {
  display: flex;
}
.wp-block-group.home-links {
  display: grid;
}
.home-links .wp-block-group {
  border-top: 1px solid #ffffff70;
  padding-top: 20px;
}
.home-links p {
  margin: 0;
}
.home-links .quick-title {
  display: block;
  font-size: 29px;
  line-height: 1.2;
  margin-top: 8px;
}
.home-links .eyebrow {
  font-size: 11px;
}
.front-content .wp-block-image img {
  width: 100%;
  height: 490px;
  object-fit: cover;
}
.front-content .wp-block-image {
  margin: 0;
}
.front-content .photo-frame figcaption {
  font-size: 13px;
  margin-top: 14px;
}
.front-content p.line-link {
  display: block;
  border: 0;
  padding: 0;
}
.front-content p.line-link a {
  display: inline-block;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.front-content p.pill {
  padding: 0;
  border: 0;
  background: transparent;
  display: block;
}
.front-content p.pill a {
  display: inline-flex;
  align-items: center;
  padding: 15px 23px;
  border-radius: 99px;
  background: var(--pine);
  color: white;
  font-size: 16px;
  min-height: 52px;
}
.front-content p.pill.light a {
  background: var(--mint);
  color: var(--pine);
}
.wp-block-post-template.news-grid {
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px;
}
.news-grid .wp-block-post {
  list-style: none;
}
.news-grid .wp-block-post-title {
  font-size: 29px;
  margin: 15px 0 20px;
}
.news-grid .wp-block-post-featured-image {
  margin: 0 0 22px;
}
.news-grid .wp-block-post-featured-image img {
  height: 230px;
  object-fit: cover;
  width: 100%;
}
.editor-styles-wrapper {
  font-family: Neue, Arial, sans-serif !important;
  background: #efefe7;
  color: #004b51;
}
.editor-styles-wrapper .home-scene {
  padding-top: 30px;
}
.editor-styles-wrapper .wp-block {
  max-width: none;
}
@media (max-width: 950px) {
  .front-content .home-scene {
    padding-top: 110px;
  }
  .nav ul {
    gap: 15px;
  }
}
@media (max-width: 600px) {
  .home-links .quick-title {
    font-size: 24px;
  }
  .front-content .wp-block-image img {
    height: 310px;
  }
  .wp-block-post-template.news-grid {
    grid-template-columns: 1fr;
  }
}
.archive-header {
  padding-block: 72px 36px;
}
.archive-header .eyebrow,
.news-date {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.archive-header h1 {
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.95;
  margin: 12px 0 0;
}
.news-card {
  border-top: 1px solid currentColor;
  padding: 24px 0 42px;
}
.news-card h2 {
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.05;
  margin: 12px 0;
}
.news-card h2 a {
  text-decoration: none;
}
.news-date {
  opacity: 0.7;
}
.institution-single,
.institution-archive {
  padding-block: 72px;
}
.institution-single h1,
.institution-archive h1 {
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.95;
  margin: 12px 0 52px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.institution-contact {
  border-top: 1px solid currentColor;
  margin-top: 64px;
  padding-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.institution-contact h2 {
  grid-column: 1/-1;
}
.institution-contact p {
  margin: 0;
}
.institution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.institution-card {
  border-top: 1px solid currentColor;
  padding: 24px 0 32px;
}
.institution-card h2 {
  font-size: 30px;
  line-height: 1.05;
  margin: 0 0 16px;
}
.institution-card h2 a {
  text-decoration: none;
}
.institution-card p {
  min-height: 3em;
}

/* Revisión editorial 29/10/2026: una misma grilla en todo el sitio. */
body .interior-body:not(.designed-content) {
  max-width: none;
  padding-inline: var(--pad);
}
body .header {
  padding-bottom: 12px;
}
body .brand img {
  margin-left: -18px;
  transform: translateY(-5px);
}
body .urgent-link {
  background: var(--pine);
  color: #fff;
  border-color: var(--pine);
}
body .menu-panel .urgent-link {
  padding: 12px 18px;
  margin-top: 12px;
  width: fit-content;
}
body .nav ul {
  gap: clamp(12px, 1.4vw, 24px);
}
body .interior-hero,
body.page-id-9 .interior-hero {
  min-height: 440px;
}
body .interior-hero-copy,
body.page-id-9 .interior-hero-copy {
  padding-block: 64px;
}
body .interior-hero h1,
body.page-id-9 .interior-hero h1 {
  font-size: clamp(42px, 6.1vw, 96px);
  margin: 28px 0 0;
  line-height: 1.03;
  font-weight: 400;
  letter-spacing: -0.05em;
}
body .interior-hero .lead {
  font-size: 21px;
  line-height: 1.45;
  margin-top: 28px;
}
body .fopremi-panel {
  padding-inline: 0 !important;
}
body .fepremi-contact-layout {
  max-width: none;
  width: auto;
  margin: 0;
  padding: 64px var(--pad);
  gap: clamp(40px, 6vw, 100px);
  align-items: flex-start;
}
body .fepremi-contact-layout > .wp-block-column {
  min-width: 0;
  flex-basis: 0;
  flex-grow: 1;
}
body .fepremi-contact-layout .section {
  padding: 0;
  margin: 0;
}
body .fepremi-contact-layout .contact-info {
  display: grid;
  gap: 36px;
}
body .contact-details {
  display: grid;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
body .fepremi-contact-layout .fepremi-contacto {
  max-width: none;
  margin: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafbf7;
}
body .fepremi-contact-layout .fepremi-contacto h2 {
  font-size: 32px;
  margin-top: 0;
}
body .fepremi-contact-layout .fc-grid {
  grid-template-columns: 1fr;
}
body .fepremi-contact-layout textarea {
  min-height: 150px;
}
body .fepremi-contact-layout input,
body .fepremi-contact-layout select,
body .fepremi-contact-layout textarea {
  max-width: 100%;
  box-sizing: border-box;
}
body.page-id-13 .interior-body {
  padding: 0;
}
body.page-id-9 .interior-body {
  display: block;
  padding: 48px var(--pad) 72px;
}
body.page-id-9 .interior-body > .fepremi-directorio {
  max-width: none;
  padding: 0;
  margin: 32px 0;
  width: 100%;
}
body .fd-filtros {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 24px;
}
body .fd-filtros label {
  min-width: 0;
}
body .fd-filtros button {
  background: transparent;
  color: var(--pine);
  border-color: var(--line);
  min-height: 52px;
  margin: 0;
}
body .fd-layout {
  grid-template-columns: minmax(270px, 1fr) minmax(0, 2fr);
  gap: 24px;
  align-items: start;
}
body .fd-map {
  padding: 20px;
  top: 24px;
}
body .fd-map [data-fd-map] {
  height: 620px;
}
body .fd-list {
  max-height: 760px;
  padding-right: 8px;
}
body .fd-card {
  padding: 18px;
  margin-bottom: 10px;
}
body .fd-card h3 {
  font-size: 21px;
}
body .fd-card .fd-actions {
  gap: 8px;
  margin: 14px 0;
}
body .fd-card .fd-actions button,
body .fd-card .fd-actions a {
  padding: 10px 12px;
  font-size: 13px;
}
body .footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
body .footer-social a {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 44px;
  height: 44px;
}
body .footer-social a:hover {
  background: var(--pine);
  color: #fff;
}
body .footer-social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
body .afiliacion-search {
  padding: 64px var(--pad);
}
body .afiliacion-search h2 {
  margin: 0 0 24px;
}
body .afiliacion-search select {
  max-width: 460px;
  margin: 12px 0 28px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fafbf7;
}
body .afiliacion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
body .afiliacion-card {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  min-width: 0;
}
body .afiliacion-card h3 {
  margin: 0 0 16px;
  font-size: 27px;
}
body .afiliacion-card p {
  font-size: 16px;
  margin: 10px 0;
  overflow-wrap: anywhere;
}
body .afiliacion-card[hidden] {
  display: none;
}
@media (max-width: 1100px) {
  body .nav {
    display: none;
  }
  body .menu-button {
    display: block;
  }
  body .afiliacion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 781px) {
  body .interior-hero,
  body.page-id-9 .interior-hero {
    min-height: 340px;
  }
  body .interior-hero-copy,
  body.page-id-9 .interior-hero-copy {
    padding-block: 40px;
  }
  body .interior-hero h1,
  body.page-id-9 .interior-hero h1 {
    font-size: clamp(36px, 9vw, 52px);
  }
  body .interior-hero .lead {
    font-size: 18px;
  }
  body .fepremi-contact-layout {
    display: flex;
    flex-direction: column;
    padding-block: 40px;
    gap: 40px;
  }
  body .fepremi-contact-layout > .wp-block-column {
    width: 100%;
    flex-basis: auto;
  }
  body .fepremi-contact-layout > .wp-block-column:last-child {
    order: -1;
  }
  body .fepremi-contact-layout .fepremi-contacto {
    padding: 22px;
  }
  body .fd-filtros {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  body .fd-layout {
    grid-template-columns: 1fr;
  }
  body .fd-map {
    position: static;
    order: -1;
    padding: 14px;
  }
  body .fd-map [data-fd-map] {
    height: 420px;
  }
  body .fd-list {
    max-height: 600px;
    padding: 0;
  }
  body .afiliacion-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  body .fd-filtros {
    grid-template-columns: 1fr;
  }
  body .header {
    gap: 12px;
  }
  body .brand {
    width: 115px;
  }
  body .brand img {
    width: 155px;
    margin-left: -14px;
  }
  body .urgent-link {
    font-size: 11px;
    padding: 10px 12px;
  }
  body .menu-button {
    padding: 10px 12px;
    font-size: 13px;
  }
}
body .front-content .home-hero h1 {
  font-size: clamp(42px, 6.1vw, 96px);
}

@media (max-width: 781px) {
  body .front-content .home-hero h1 {
    font-size: clamp(36px, 9vw, 52px);
  }
}
/* Contacto: dos columnas, dos niveles tipográficos y un solo aviso de urgencias. */
body .fepremi-contact-layout.contact-clean {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(40px, 6vw, 100px);
  padding: 64px var(--pad);
  margin: 0;
  max-width: none;
  align-items: start;
}
body .contact-clean > .wp-block-column {
  margin: 0;
  min-width: 0;
}
body .contact-clean .contact-clean-info {
  display: grid;
  gap: 24px;
}
body .contact-clean .contact-clean-info > * {
  margin: 0;
}
body .contact-clean .contact-clean-info p {
  font-size: 18px;
  line-height: 1.65;
}
body .contact-clean .contact-clean-info h2,
body .contact-clean #consulta-fepremi h2 {
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin: 0;
  font-weight: 400;
}
body .contact-clean .contact-clean-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
body .contact-clean .contact-clean-routing {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
body .contact-clean #consulta-fepremi {
  padding: 0;
  margin: 0;
  max-width: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body .contact-clean #consulta-fepremi > .eyebrow {
  display: none;
}
body .contact-clean #consulta-fepremi > p:not(.eyebrow) {
  font-size: 16px;
  line-height: 1.6;
  margin: 20px 0 0;
}
body .contact-clean #consulta-fepremi form {
  margin-top: 28px;
  gap: 24px;
}
body .contact-clean #consulta-fepremi .fc-grid {
  grid-template-columns: 1fr;
  gap: 24px;
}
body .contact-clean #consulta-fepremi label,
body .contact-clean #consulta-fepremi label > span,
body .contact-clean #consulta-fepremi form p {
  font-size: 16px;
  line-height: 1.6;
}
body
  .contact-clean
  #consulta-fepremi
  input:not([type="checkbox"]):not([type="hidden"]),
body .contact-clean #consulta-fepremi textarea,
body .contact-clean #consulta-fepremi select {
  font-size: 18px;
  border: 0;
  border-bottom: 1px solid #94aaa4;
  border-radius: 0;
  background: transparent;
  padding: 12px 0;
  box-shadow: none;
}
body .contact-clean #consulta-fepremi textarea {
  height: 150px;
  min-height: 150px;
}
body .contact-clean #consulta-fepremi button {
  border-radius: 99px;
  font-size: 16px;
  padding: 14px 24px;
}
@media (max-width: 781px) {
  body .fepremi-contact-layout.contact-clean {
    grid-template-columns: 1fr;
    padding-block: 40px;
    gap: 48px;
  }
  body .contact-clean > .wp-block-column:last-child {
    order: -1;
  }
  body .contact-clean .contact-clean-info p {
    font-size: 16px;
  }
}

/* Afiliación: todas las instituciones visibles, con datos desplegables. */
body .afiliacion-grid {
  grid-template-columns: 1fr;
  gap: 0;
}
body .afiliacion-acordeon {
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
body .afiliacion-acordeon:first-child {
  border-top: 1px solid var(--line);
}
body .afiliacion-acordeon summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  font-size: 24px;
  line-height: 1.25;
  list-style: none;
  cursor: pointer;
}
body .afiliacion-acordeon summary::-webkit-details-marker {
  display: none;
}
body .afiliacion-acordeon summary::after {
  content: none;
}
body .afiliacion-chevron {
  font-size: 24px;
  transition: transform 0.2s;
}
body .afiliacion-acordeon[open] .afiliacion-chevron {
  transform: rotate(180deg);
}
body .afiliacion-contactos {
  padding: 0 0 24px;
  max-width: 65ch;
}
body .afiliacion-contactos p {
  padding: 0;
  margin: 10px 0;
  font-size: 17px;
  line-height: 1.6;
}
body .afiliacion-acordeon summary:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
  body .afiliacion-chevron {
    transition: none;
  }
}
@media (max-width: 950px) {
  body .header .brand img {
    transform: none;
  }
}
/* Misma separación entre texto/foto y las tarjetas siguientes. */
body .front-content .section:has(> .split .photo-column):has(+ .section > .three),
body .interior-body .section:has(> .split .photo-column):has(+ .section > .three) {
  padding-bottom: 40px;
  margin-bottom: 0;
}
body .front-content .section:has(> .split .photo-column) + .section:has(> .three),
body .interior-body .section:has(> .split .photo-column) + .section:has(> .three) {
  padding-top: 40px;
  margin-top: 0;
}
#documentos-institucionales > h2 {
  margin-bottom: 32px;
}
.titulo-contactos-urgencias {
  margin-bottom: 24px;
}
.red-instituciones > h2 { margin-bottom:40px; }
.red-instituciones .red-logos { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); align-items:center; }
body .red-instituciones .red-logos figure { margin:0; }
.red-logos a { display:flex;align-items:center;justify-content:center;min-height:110px;padding:12px;border-radius:8px;transition:background .2s; }
body .red-instituciones .red-logos img { width:auto;height:auto;object-fit:contain; }
.red-logos a:hover { background:#004b5108; }
.red-logos a:focus-visible { outline:2px solid #004b51;outline-offset:4px; }
@media(max-width:1000px){.red-instituciones .red-logos{grid-template-columns:repeat(4,minmax(0,1fr));}}
@media(max-width:600px){.red-instituciones .red-logos{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}.red-logos a{min-height:95px;}}
@media(prefers-reduced-motion:reduce){.red-logos a{transition:none;}}
/* Inicio: distribución compacta de las instituciones */
.red-instituciones .red-logos {
  gap: 10px 0;
}
.red-instituciones .red-logos a {
  min-height: 64px;
  padding: 8px;
}
body .red-instituciones .red-logos img {
  max-width: min(100%, 132px);
  max-height: 48px;
}
.red-instituciones .red-logos-respaldo {
  grid-template-columns: repeat(2, minmax(0, 150px));
  justify-content: center;
  margin-bottom: 32px;
}
@media (min-width: 1100px) {
  .red-instituciones .red-logos:not(.red-logos-respaldo) {
    grid-template-columns: repeat(56, minmax(0, 1fr));
  }
  .red-instituciones .red-logos:not(.red-logos-respaldo) > figure {
    grid-column: span 8;
  }
  .red-instituciones .red-logos:not(.red-logos-respaldo) > figure:nth-of-type(n+15) {
    grid-column: span 7;
  }
}
@media (min-width: 601px) and (max-width: 1099px) {
  .red-instituciones .red-logos:not(.red-logos-respaldo) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .red-instituciones .red-logos:not(.red-logos-respaldo) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  body .red-instituciones .red-logos img { max-height: 40px; }
}

#fede-panel .fede-avatar { display:inline-block; flex:0 0 44px; width:44px; height:44px; border:0; border-radius:50%; font-size:0; background: url('assets/fede-avatar.png') center/cover no-repeat; }

/* Respaldo: logos más grandes y a la izquierda */
.red-instituciones .red-logos-respaldo {
  grid-template-columns: repeat(2, minmax(0, 210px));
  justify-content: start;
  gap: 20px;
}

.red-instituciones .red-logos-respaldo a {
  justify-content: flex-start;
}

body .red-instituciones .red-logos-respaldo img {
  max-width: 100%;
  max-height: 70px;
}

/* Subtítulos más discretos */
.red-instituciones h3 {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 400;
  margin-bottom: 16px;
}

/* Beneficios: botón de atención */
#fuera-del-departamento .copy p > a {
  display: inline-flex;
  align-items: center;
  padding: 14px 22px;
  background: #004b51;
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
}

#fuera-del-departamento .copy p > a:hover {
  background: #003b40;
}