/* PRODVISION Transparencia – los estilos se limitan a la biblioteca. */
.pv-transparencia {
  /* Paleta institucional PRODVISION: morado + dorado. Sobrescribible desde Apariencia. */
  --pv-primary: #8F2183;
  --pv-accent: #F4B334;
  --pv-navy: var(--pv-primary);
  --pv-navy-deep: color-mix(in srgb, var(--pv-primary) 80%, #000 20%);
  --pv-green: var(--pv-accent);
  --pv-text: #34283A;
  --pv-muted: #756875;
  --pv-border: #EADFE9;
  --pv-light: #FCF8FB;
  width: 100%;
  color: var(--pv-text);
  font-family: inherit;
  line-height: 1.45;
  margin: 0 auto 36px;
}

/* Opt-in: seguir las variables globales publicadas por el tema / Elementor. */
.pv-transparencia.pv-transparencia--tema {
  --pv-primary: var(--e-global-color-primary, var(--wp--preset--color--primary, var(--ast-global-color-0, #8F2183))) !important;
  --pv-accent: var(--e-global-color-accent, var(--wp--preset--color--secondary, #F4B334)) !important;
}

.pv-transparencia *, .pv-transparencia *::before, .pv-transparencia *::after { box-sizing: border-box; }
.pv-transparencia button, .pv-transparencia input { font: inherit; }
.pv-transparencia [hidden] { display: none !important; }
.pv-transparencia :is(button, a, input, [tabindex="0"]):focus-visible { outline: 3px solid var(--pv-green); outline-offset: 3px; }
.pv-transparencia .screen-reader-text { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(1px,1px,1px,1px) !important; white-space: nowrap !important; }
.pv-hero {
  background: var(--pv-primary);
  background: linear-gradient(115deg, color-mix(in srgb,var(--pv-primary) 79%,black 21%) 0%, var(--pv-primary) 70%, color-mix(in srgb,var(--pv-primary) 78%,white 22%) 100%);
  padding: clamp(23px, 4vw, 42px) clamp(22px, 4vw, 44px);
  border-radius: 18px 18px 0 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.pv-hero::after {
  content: "";
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 0 0 42px rgba(255,255,255,.025),0 0 0 85px rgba(255,255,255,.02);
  border-radius: 50%;
  position: absolute;
  right: -75px;
  top: -125px;
  pointer-events: none;
}
.pv-hero__mark { font-size: 11px; color: #FFF0D1; font-weight: 750; letter-spacing: .15em; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.pv-hero__mark span { height: 8px; width: 8px; background: var(--pv-green); border-radius: 50%; }
.pv-hero h2 { font-size: clamp(23px, 3.3vw, 35px); margin: 0 0 9px !important; color: #fff !important; font-weight: 750; letter-spacing: -.025em; line-height: 1.22; }
.pv-hero p { color: #FCEFFC; margin: 0 !important; font-size: 14px; line-height: 1.65; max-width: 620px; }
.pv-toolbar { background: #fff; border: 1px solid var(--pv-border); border-top: none; padding: 19px 24px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.pv-years { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.pv-transparencia .pv-year {
  border: 1px solid #EADFE9;
  border-radius: 9px;
  background: #FAF6F9;
  color: #716270;
  padding: 9px 17px;
  min-height: 41px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.2;
  transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
  box-shadow: none;
}
.pv-transparencia .pv-year:hover { background: #F7EDF5; border-color: #DEC9DA; color: var(--pv-navy); }
.pv-transparencia .pv-year.is-active, .pv-transparencia .pv-year[aria-selected="true"] { background: var(--pv-navy); color: #fff; border-color: var(--pv-navy); box-shadow: 0 3px 9px rgba(143,33,131,.18); }
.pv-search { border: 1px solid #EADFE9; display: flex; gap: 9px; align-items: center; border-radius: 10px; background: #fff; min-height: 42px; padding: 0 12px; color: #857380; flex: 0 1 265px; min-width: 200px; }
.pv-search:focus-within { border-color: var(--pv-navy); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pv-primary) 10%, transparent); }
.pv-transparencia .pv-search input { width: 100%; padding: 9px 0; border: 0; box-shadow: none; outline: none; border-radius: 0; background: transparent; color: var(--pv-text); font-size: 13px; min-height: 36px; }
.pv-search input::placeholder { color: #968895; }
.pv-panels { padding: 23px 24px 15px; background: #fff; border-left: 1px solid var(--pv-border); border-right: 1px solid var(--pv-border); }
.pv-panel__intro { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin: 0 0 18px; font-size: 13px; color: var(--pv-muted); }
.pv-panel__intro strong { color: var(--pv-navy); font-size: 16px; }
.pv-counter { border: 1px solid #EDE2EB; border-radius: 50px; background: #FCF8FB; padding: 5px 11px; font-size: 11px; font-weight: 700; color: #756875; }
.pv-group { overflow: hidden; border: 1px solid var(--pv-border); border-radius: 12px; margin-bottom: 23px; background: #fff; box-shadow: 0 5px 18px rgba(103,38,91,.055); }
.pv-group__heading { display: flex; align-items: center; gap: 10px; min-height: 47px; padding: 11px 17px; background: var(--pv-navy); color: #fff; }
.pv-group__accent { width: 4px; min-width: 4px; border-radius: 5px; align-self: stretch; background: var(--pv-green); }
.pv-group__heading h3 { margin: 0 !important; flex: 1; font-size: 14px; line-height: 1.35; letter-spacing: .012em; font-weight: 750; text-transform: uppercase; color: #fff !important; }
.pv-group__heading h3 span { font-weight: 550; opacity: .84; }
.pv-group__count { background: rgba(255,255,255,.15); border-radius: 7px; padding: 3px 8px; font-weight: 750; font-size: 11px; color: #fff; }
.pv-docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; padding: 9px 18px 13px; }
.pv-doc { min-width: 0; display: flex; align-items: center; border-bottom: 1px solid #F1E9EF; }
.pv-doc:last-child, .pv-doc:nth-last-child(2):nth-child(odd) { border-bottom-color: transparent; }
.pv-transparencia .pv-doc__view { min-width: 0; flex: 1; padding: 15px 4px; display: flex; gap: 13px; align-items: center; text-align: left; border: 0; box-shadow: none; background: transparent; color: var(--pv-text); cursor: pointer; }
.pv-transparencia .pv-doc__view:hover { background: transparent; color: var(--pv-navy); }
.pv-doc__icon { height: 39px; width: 39px; flex: 0 0 39px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--pv-primary) 9%, white); color: var(--pv-primary); border-radius: 9px; transition: background .2s, color .2s; }
.pv-doc__icon svg { width: 22px; height: 22px; }
.pv-doc__view:hover .pv-doc__icon { color: var(--pv-primary); background: color-mix(in srgb, var(--pv-accent) 24%, white); }
.pv-doc__details { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 3px; }
.pv-doc__title { font-size: 14px; font-weight: 650; color: #3A303C; line-height: 1.3; overflow-wrap: anywhere; transition: color .2s; }
.pv-doc__view:hover .pv-doc__title { color: var(--pv-navy); }
.pv-doc__summary { font-size: 11.5px; color: #897B88; line-height: 1.35; overflow-wrap: anywhere; }
.pv-doc__eye { color: #837386; flex: 0 0 auto; display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 650; }
.pv-doc__eye svg { width: 16px; height: 16px; }
.pv-doc__view:hover .pv-doc__eye { color: var(--pv-primary); }
.pv-doc__download { display: flex; align-items: center; justify-content: center; color: #837386; width: 29px; height: 32px; flex: 0 0 29px; border-radius: 7px; }
.pv-doc__download:hover { color: var(--pv-primary); background: color-mix(in srgb, var(--pv-accent) 20%, white); }
.pv-doc__download svg { width: 17px; height: 17px; }
.pv-empty-year, .pv-no-results { text-align: center; padding: 48px 15px 58px; }
.pv-empty-year__icon { margin: 0 auto 10px; height: 47px; width: 47px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: color-mix(in srgb, var(--pv-primary) 8%, white); color: var(--pv-primary); }
.pv-empty-year__icon svg { height: 26px; width: 26px; }
.pv-empty-year h3, .pv-no-results h3 { font-size: 16px; margin: 12px 0 5px !important; color: #3A303C !important; }
.pv-empty-year p, .pv-no-results p { font-size: 13px; color: #8D7D8A; margin: 0 !important; }
.pv-footnote { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #786B77; padding: 17px 24px; background: #FCF8FB; border: 1px solid var(--pv-border); border-radius: 0 0 14px 14px; }
.pv-footnote svg { height: 17px; width: 17px; color: var(--pv-primary); }
/* Modal PDF accesible; se mueve visualmente sobre Elementor y demás capas. */
.pv-transparencia .pv-modal { position: fixed; border: none; max-width: min(1120px, 96vw); width: 1120px; max-height: min(94vh, 1000px); height: min(94vh, 1000px); overflow: hidden; padding: 0; border-radius: 15px; background: #fff; box-shadow: 0 25px 70px rgba(0,0,0,.32); color: #372C37; z-index: 999999; }
.pv-transparencia .pv-modal:not([open]) { display: none; }
.pv-modal::backdrop { background: rgba(8,17,41,.78); backdrop-filter: blur(3px); }
.pv-modal__body { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.pv-modal__header { display: flex; align-items: center; justify-content: space-between; gap: 15px; background: #FCF8FB; padding: 14px 22px; border-bottom: 1px solid #EADFE9; }
.pv-modal__title { min-width: 0; }
.pv-modal__title>span { font-size: 10px; color: var(--pv-primary); font-weight: 800; letter-spacing: .09em; }
.pv-modal__title h3 { font-size: 16px; font-weight: 750; margin: 3px 0 1px !important; color: #3A303C !important; overflow-wrap: anywhere; }
.pv-modal__title small { font-size: 11px; color: #857480; }
.pv-transparencia .pv-modal__close { font-size: 26px; font-weight: 400; flex: 0 0 39px; line-height: 1; color: #786C78; height: 39px; border: 1px solid #EADFE9; background: #fff; border-radius: 9px; padding: 0; cursor: pointer; box-shadow: none; }
.pv-transparencia .pv-modal__close:hover { color: var(--pv-primary); background: color-mix(in srgb, var(--pv-primary) 9%, white); }
.pv-modal__content { display: flex; flex: 1; min-height: 0; background: #EDE5EC; }
.pv-modal__content iframe { display: block; width: 100%; height: 100%; min-height: 0; border: none; background: #fff; }
.pv-modal__footer { display: flex; gap: 14px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 13px 19px; background: #fff; border-top: 1px solid #EADFE9; }
.pv-modal__footer>span { font-size: 12px; color: #786C78; }
.pv-modal__footer>div { display: flex; gap: 10px; flex-wrap: wrap; }
.pv-modal__footer a { color: var(--pv-navy); border: 1px solid #EADFE9; border-radius: 8px; text-decoration: none; font-size: 12px; font-weight: 700; padding: 9px 13px; white-space: nowrap; }
.pv-modal__footer a:last-child { color: #fff; background: var(--pv-navy); border-color: var(--pv-navy); }
.pv-modal__footer a:hover { opacity: .85; }
@media(max-width:900px) { .pv-doc__eye span { display: none; } .pv-doc__eye { margin-right: 0; } }
@media(max-width:670px) {
  .pv-hero { border-radius: 12px 12px 0 0; }
  .pv-toolbar { padding: 15px 15px; align-items: stretch; }
  .pv-years { width: 100%; gap: 5px; }
  .pv-transparencia .pv-year { padding: 9px 12px; font-size: 13px; }
  .pv-search { flex: 1 1 100%; }
  .pv-panels { padding: 17px 13px 10px; }
  .pv-docs { grid-template-columns: 1fr; gap: 0; padding: 7px 13px; }
  .pv-doc:last-child, .pv-doc:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid #F1E9EF; }
  .pv-doc:last-child { border-bottom: none; }
  .pv-group__heading { padding: 12px; }
  .pv-group__heading h3 { font-size: 12px; }
  .pv-doc__title { font-size: 13.5px; }
  .pv-footnote { padding: 15px; }
  .pv-transparencia .pv-modal { max-width: 98vw; width: 98vw; max-height: 96vh; height: 96vh; border-radius: 8px; }
  .pv-modal__header { padding: 11px 13px; }
  .pv-modal__footer { padding: 8px 10px; }
  .pv-modal__footer>span { display: none; }
  .pv-modal__footer>div { flex: 1; justify-content: center; }
  .pv-modal__footer a { flex: 1; text-align: center; }
}
@media(prefers-reduced-motion: reduce) { .pv-transparencia *, .pv-transparencia *::before, .pv-transparencia *::after { scroll-behavior: auto !important; transition: none !important; } }

/* v1.2 – los enlaces externos utilizan el mismo diseño visual que los PDF */
.pv-transparencia a.pv-doc__link{text-decoration:none;width:100%;}
.pv-transparencia a.pv-doc__link:focus-visible{outline:2px solid var(--pv-accent);outline-offset:2px;}
