/* ============================================================
   Profesores UDG v3.04 Beta — Pulso de la comunidad
   ============================================================ */

.proudg-pulse-scene {
  container-type: inline-size;
  position: absolute;
  z-index: 1;
  right: -132px;
  bottom: -28px;
  width: 840px;
  max-width: none;
  aspect-ratio: 3 / 2;
  pointer-events: none;
}

.proudg-pulse-scene > img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  filter: saturate(.98) contrast(1.02);
}

.proudg-pulse-book {
  position: absolute;
  z-index: 3;
  top: 36.2%;
  left: 22.7%;
  display: grid;
  width: 42.2%;
  height: 32.8%;
  grid-template-columns: 1fr 1fr;
  color: #0a234d;
  font-family: "Inter", "Open Sans", Arial, sans-serif;
  pointer-events: none;
}

.proudg-pulse-book__page {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.proudg-pulse-book__page--left {
  padding: 13% 9% 9% 13%;
  transform: rotate(.4deg);
}

.proudg-pulse-book__page--right {
  padding: 10% 13% 8% 8%;
  transform: rotate(-.35deg);
}

.proudg-pulse-book__live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4%;
  color: #00a968;
  font-size: 12px;
  font-size: clamp(9px, 1.62cqw, 13px);
  font-weight: 850;
  letter-spacing: .055em;
}

.proudg-pulse-book__live i {
  width: .72em;
  height: .72em;
  border-radius: 50%;
  background: #08d887;
  box-shadow: 0 0 0 4px rgba(8, 216, 135, .12), 0 0 10px rgba(8, 216, 135, .45);
  animation: proudg-live-pulse 2s ease-out infinite;
}

.proudg-pulse-book__page--left > strong {
  color: #0a234d;
  font-size: 18px;
  font-size: clamp(13px, 2.55cqw, 21px);
  font-weight: 820;
  letter-spacing: -.03em;
  line-height: 1.03;
}

.proudg-pulse-book__wave {
  display: flex;
  height: 19%;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-top: 6%;
  color: #079ff7;
}

.proudg-pulse-book__wave i {
  width: 2px;
  height: 28%;
  border-radius: 999px;
  background: currentColor;
  animation: proudg-wave 1.6s ease-in-out infinite;
}

.proudg-pulse-book__wave i:nth-child(2),
.proudg-pulse-book__wave i:nth-child(8) { height: 55%; animation-delay: -.15s; }
.proudg-pulse-book__wave i:nth-child(3),
.proudg-pulse-book__wave i:nth-child(7) { height: 88%; animation-delay: -.3s; }
.proudg-pulse-book__wave i:nth-child(4),
.proudg-pulse-book__wave i:nth-child(6) { height: 48%; animation-delay: -.45s; }
.proudg-pulse-book__wave i:nth-child(5) { height: 100%; animation-delay: -.6s; }

.proudg-pulse-book__number {
  color: #0b2854;
  font-size: 42px;
  font-size: clamp(30px, 5.8cqw, 48px);
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: .92;
}

.proudg-pulse-book__label {
  margin-top: 3%;
  color: #243a59;
  font-size: 11px;
  font-size: clamp(8px, 1.5cqw, 12px);
  font-weight: 680;
  line-height: 1.15;
}

.proudg-pulse-book__consultations {
  margin-top: 4%;
  color: #4b5f78;
  font-size: 10px;
  font-size: clamp(8px, 1.4cqw, 11px);
  line-height: 1.1;
}

.proudg-pulse-book__consultations b {
  color: #0a4e9d;
  font-weight: 850;
}

.proudg-pulse-book__history {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  gap: 5px;
  margin-top: 5%;
  padding: 3px 9px;
  color: #0566c8;
  border: 1px solid rgba(4, 125, 224, .5);
  border-radius: 5px;
  background: rgba(239, 248, 255, .84);
  box-shadow: 0 3px 8px rgba(14, 71, 124, .1);
  font-size: 9px;
  font-size: clamp(7px, 1.25cqw, 10px);
  font-weight: 850;
  letter-spacing: .035em;
  line-height: 1;
  pointer-events: auto;
  text-transform: uppercase;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.proudg-pulse-book__history:hover,
.proudg-pulse-book__history:focus-visible {
  color: #fff;
  background: #087ff5;
  text-decoration: none;
  transform: translateY(-1px);
}

.proudg-pulse-book__privacy {
  position: absolute;
  right: 0;
  bottom: -8%;
  left: 0;
  color: rgba(20, 43, 72, .75);
  font-size: 7px;
  font-size: clamp(6px, 1.05cqw, 8px);
  font-weight: 650;
  text-align: center;
}

@keyframes proudg-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(8, 216, 135, .42); }
  65%, 100% { box-shadow: 0 0 0 7px rgba(8, 216, 135, 0); }
}

@keyframes proudg-wave {
  0%, 100% { transform: scaleY(.65); opacity: .62; }
  50% { transform: scaleY(1); opacity: 1; }
}

@media (max-width: 1180px) {
  .proudg-pulse-scene {
    right: -190px;
    width: 790px;
  }
}

@media (max-width: 920px) {
  .proudg-home-hero__visual {
    min-height: 440px;
  }

  .proudg-pulse-scene {
    right: 50%;
    bottom: -46px;
    width: min(850px, 112vw);
    transform: translateX(50%);
  }
}

@media (max-width: 620px) {
  .proudg-home-hero__visual {
    min-height: 360px;
  }

  .proudg-pulse-scene {
    bottom: -18px;
    width: min(690px, 132vw);
  }

  .proudg-pulse-book__history {
    min-height: 19px;
    padding: 2px 6px;
  }
}

@media (max-width: 420px) {
  .proudg-home-hero__visual {
    min-height: 320px;
  }

  .proudg-pulse-scene {
    width: 620px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .proudg-pulse-book__live i,
  .proudg-pulse-book__wave i {
    animation: none;
  }
}

/* ============================================================
   Página completa: Histórico de actividad
   ============================================================ */

.proudg-history {
  --history-navy: #061e43;
  --history-blue: #087ff5;
  --history-cyan: #13b7f4;
  --history-green: #0a9c69;
  --history-ink: #0b2143;
  --history-muted: #5a6f89;
  --history-line: #dce6f2;
  min-height: 70vh;
  padding: 22px 0 34px;
  color: var(--history-ink);
  background: #f6f9fd;
  font-family: "Inter", "Open Sans", Arial, sans-serif;
}

.proudg-history__shell {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.proudg-history__breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #61758e;
  font-size: 12px;
}

.proudg-history__breadcrumbs a {
  color: #0869d8;
}

.proudg-history__hero {
  position: relative;
  display: grid;
  min-height: 190px;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  overflow: hidden;
  padding: 30px 42px;
  border: 1px solid #dce9f6;
  border-radius: 20px;
  background:
    radial-gradient(circle at 80% 30%, rgba(24, 184, 255, .17), transparent 28%),
    linear-gradient(120deg, #f3f8ff, #fff 58%, #edf9fb);
}

.proudg-history__hero::after {
  position: absolute;
  right: 300px;
  bottom: -80px;
  width: 180px;
  height: 180px;
  content: "";
  border: 34px solid rgba(8, 127, 245, .045);
  border-radius: 50%;
}

.proudg-history__hero-copy {
  position: relative;
  z-index: 2;
}

.proudg-history__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #0869d8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.proudg-history__hero h1 {
  margin: 0;
  color: var(--history-navy);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 850;
  letter-spacing: -.04em;
  line-height: 1.05;
}

.proudg-history__hero h1 span {
  color: var(--history-blue);
}

.proudg-history__hero p {
  max-width: 650px;
  margin: 12px 0 4px;
  color: #415c7c;
  font-size: 16px;
}

.proudg-history__hero small {
  color: #6f8096;
  font-size: 12px;
}

.proudg-history__owl {
  position: absolute;
  z-index: 1;
  right: 26px;
  bottom: -94px;
  width: 340px;
  height: 280px;
  overflow: hidden;
}

.proudg-history__owl img {
  position: absolute;
  right: -36px;
  bottom: 0;
  width: 365px;
  max-width: none;
}

.proudg-history__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0;
}

.proudg-history__periods {
  display: inline-flex;
  overflow: hidden;
  padding: 4px;
  border: 1px solid #d3e0ee;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(14, 42, 79, .05);
}

.proudg-history__periods button {
  min-width: 76px;
  height: 38px;
  padding: 0 18px;
  color: #253d5c;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.proudg-history__periods button:hover {
  color: #075fb9;
  background: #eef6ff;
}

.proudg-history__periods button.is-active {
  color: #fff;
  background: linear-gradient(135deg, #0869ee, #079af5);
  box-shadow: 0 5px 12px rgba(8, 105, 238, .2);
}

.proudg-history__status {
  min-height: 20px;
  margin: 0;
  color: #657991;
  font-size: 12px;
}

.proudg-history__status.is-loading::before {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 7px;
  content: "";
  vertical-align: -2px;
  border: 2px solid #cfe1f4;
  border-top-color: #087ff5;
  border-radius: 50%;
  animation: proudg-history-spin .7s linear infinite;
}

@keyframes proudg-history-spin { to { transform: rotate(360deg); } }

.proudg-history__metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.proudg-history-metric {
  display: grid;
  min-height: 102px;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--history-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(19, 49, 86, .045);
}

.proudg-history-metric > i {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  color: #0877e8;
  border-radius: 12px;
  background: #eaf4ff;
  font-size: 21px;
}

.proudg-history-metric--growth > i {
  color: #07855d;
  background: #e7f8f1;
}

.proudg-history-metric strong {
  display: block;
  color: var(--history-navy);
  font-size: 29px;
  font-weight: 850;
  letter-spacing: -.035em;
  line-height: 1;
}

.proudg-history-metric--growth strong {
  color: #07855d;
}

.proudg-history-metric--growth.is-negative > i {
  color: #b83447;
  background: #fff0f2;
}

.proudg-history-metric--growth.is-negative strong {
  color: #b83447;
}

.proudg-history-metric span {
  display: block;
  margin-top: 6px;
  color: #5c6f86;
  font-size: 12px;
}

.proudg-history__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr);
  gap: 16px;
}

.proudg-history-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--history-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 24px rgba(19, 49, 86, .04);
}

.proudg-history-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.proudg-history-card h2 {
  margin: 0;
  color: #102b50;
  font-size: 16px;
  font-weight: 800;
}

.proudg-history-legend {
  display: flex;
  gap: 14px;
  color: #536881;
  font-size: 10px;
}

.proudg-history-legend span::before {
  display: inline-block;
  width: 14px;
  height: 3px;
  margin-right: 5px;
  content: "";
  vertical-align: 3px;
  border-radius: 999px;
  background: #13b7f4;
}

.proudg-history-legend span:last-child::before {
  background: #0869d8;
}

.proudg-history-chart {
  position: relative;
  min-height: 310px;
}

.proudg-history-chart svg {
  display: block;
  width: 100%;
  height: 280px;
  overflow: visible;
}

.proudg-history-chart__grid line {
  stroke: #e5edf6;
  stroke-width: 1;
}

.proudg-history-chart__axis {
  fill: #71849a;
  font-size: 10px;
}

.proudg-history-chart__area {
  fill: rgba(19, 183, 244, .1);
}

.proudg-history-chart__line {
  fill: none;
  stroke: #13b7f4;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.proudg-history-chart__line--consultations {
  stroke: #0869d8;
}

.proudg-history-chart__labels {
  display: flex;
  justify-content: space-between;
  padding: 0 12px 0 48px;
  color: #70839a;
  font-size: 10px;
}

.proudg-history__side {
  display: grid;
  gap: 16px;
}

.proudg-history-centers {
  display: grid;
  gap: 12px;
}

.proudg-history-center {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 52px;
  gap: 9px;
  align-items: center;
  color: #1b3559;
  font-size: 11px;
  font-weight: 750;
}

.proudg-history-center__track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf3fa;
}

.proudg-history-center__bar {
  display: block;
  width: var(--bar-width, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #087ff5, #16b7f2);
  transition: width .45s ease;
}

.proudg-history-center__total {
  color: #60748c;
  font-weight: 650;
  text-align: right;
}

.proudg-history__empty {
  margin: 0;
  padding: 16px 0;
  color: #718399;
  font-size: 12px;
}

.proudg-history-insights {
  display: grid;
  gap: 2px;
}

.proudg-history-insight {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid #e7edf5;
}

.proudg-history-insight:last-child {
  border-bottom: 0;
}

.proudg-history-insight > i {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #0876e5;
  border-radius: 10px;
  background: #edf6ff;
  font-size: 17px;
}

.proudg-history-insight span {
  display: block;
  color: #6a7b90;
  font-size: 10px;
}

.proudg-history-insight strong {
  display: block;
  margin-top: 2px;
  color: #132e52;
  font-size: 13px;
  font-weight: 780;
}

.proudg-history__participation {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.proudg-history-participation {
  display: flex;
  min-height: 78px;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--history-line);
  border-radius: 14px;
  background: #fff;
}

.proudg-history-participation > i {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  place-items: center;
  color: #0875e2;
  border-radius: 11px;
  background: #eaf4ff;
  font-size: 19px;
}

.proudg-history-participation--approved > i {
  color: #07855d;
  background: #e7f8f1;
}

.proudg-history-participation strong {
  display: block;
  color: #102b50;
  font-size: 24px;
  line-height: 1;
}

.proudg-history-participation span {
  display: block;
  margin-top: 5px;
  color: #64778f;
  font-size: 11px;
}

.proudg-history__privacy {
  display: flex;
  min-height: 62px;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 13px 18px;
  color: #34506f;
  border: 1px solid #dce8f5;
  border-radius: 13px;
  background: #edf6ff;
  font-size: 12px;
}

.proudg-history__privacy > i {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: #087ff5;
}

.proudg-history__privacy a {
  margin-left: auto;
  padding: 8px 13px;
  color: #0766c6;
  border: 1px solid #8bc4f8;
  border-radius: 8px;
  background: #fff;
  font-weight: 750;
  white-space: nowrap;
}

.proudg-history__privacy a:hover {
  color: #fff;
  background: #087ff5;
  text-decoration: none;
}

.proudg-history__collection-note {
  margin: 12px 2px 0;
  color: #73859a;
  font-size: 10px;
  text-align: right;
}

@media (max-width: 980px) {
  .proudg-history__hero {
    grid-template-columns: 1fr 260px;
  }

  .proudg-history__owl {
    right: -10px;
    width: 290px;
  }

  .proudg-history__metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .proudg-history__grid {
    grid-template-columns: 1fr;
  }

  .proudg-history__side {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .proudg-history {
    padding-top: 14px;
  }

  .proudg-history__shell {
    width: min(100% - 22px, 560px);
  }

  .proudg-history__hero {
    min-height: 270px;
    grid-template-columns: 1fr;
    align-items: start;
    padding: 25px 22px;
  }

  .proudg-history__hero h1 {
    font-size: 36px;
  }

  .proudg-history__hero p {
    max-width: 76%;
    font-size: 14px;
  }

  .proudg-history__owl {
    right: -60px;
    bottom: -124px;
    width: 270px;
    opacity: .92;
  }

  .proudg-history__toolbar {
    align-items: flex-start;
    flex-direction: column-reverse;
  }

  .proudg-history__periods,
  .proudg-history__periods button {
    width: 100%;
  }

  .proudg-history__periods button {
    min-width: 0;
    flex: 1 1 0;
    padding: 0 8px;
  }

  .proudg-history__metrics,
  .proudg-history__side,
  .proudg-history__participation {
    grid-template-columns: 1fr;
  }

  .proudg-history-metric {
    min-height: 86px;
  }

  .proudg-history-card__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .proudg-history-chart {
    min-height: 250px;
  }

  .proudg-history-chart svg {
    height: 225px;
  }

  .proudg-history__privacy {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .proudg-history__privacy a {
    width: 100%;
    margin-left: 0;
    text-align: center;
  }
}
