:root {
  --cedep-tinto: #8F1D50;
  --cedep-tinto-hover: #76163F;
  --cedep-naranja: #F19F53;
  --cedep-naranja-hover: #E68F3D;
  --cedep-pizarra: #263647;
  --cedep-claro: #E2E8F0;
}

.active-tab {
  border-bottom-color: #F29E4C;
  color: #8F1D50;
  font-weight: 700;
}

.brand-logo {
  width: 152px;
  height: auto;
  display: block;
}

.site-header {
  height: 80px;
  font-family: "Open Sans", "Exo", sans-serif;
  font-size: 14px;
  line-height: 20px;
}

.site-header-inner {
  height: 80px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 1.5rem;
}

.site-header .brand-logo {
  width: 152px;
  max-height: 58px;
  object-fit: contain;
}

.site-header .site-nav-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  color: #475569;
  font-family: "Open Sans", "Exo", sans-serif;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 20px !important;
  letter-spacing: 0;
  padding: 0;
}

.site-header .site-nav-link:hover {
  color: #8F1D50;
}

.site-nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 40px;
}

.site-nav-trigger {
  gap: 4px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.site-submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  min-width: 240px;
  padding: 8px;
  border: 1px solid #D8DADD;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 60;
}

.site-submenu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.site-submenu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #435363;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.site-submenu a:hover {
  background: #F4E9EE;
  color: #8F1D50;
}

.site-nav-item:hover .site-submenu,
.site-nav-item:focus-within .site-submenu,
.site-nav-item.is-open .site-submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 2px);
}

.site-header-cta {
  height: 40px;
  min-height: 40px;
  padding: 10px 24px !important;
  border-radius: 9999px !important;
  font-family: "Open Sans", "Exo", sans-serif;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 20px !important;
  letter-spacing: 0;
}

.site-header-cta svg,
.site-header-cta i {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  font-size: 14px;
}

.site-mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #435363;
}

.site-mobile-toggle:hover {
  color: #8F1D50;
}

.site-mobile-link,
.site-mobile-sublink {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: #435363;
  font-weight: 700;
}

.site-mobile-link {
  font-size: 16px;
}

.site-mobile-sublink {
  font-size: 14px;
}

.site-mobile-link:hover,
.site-mobile-sublink:hover,
.site-mobile-link.is-active {
  background: #F4E9EE;
  color: #8F1D50;
}

.convocatoria-card {
  position: relative;
  display: flex;
  min-height: 290px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 28px 20px 18px;
  border: 1px solid #eef2f7;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  text-align: center;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.convocatoria-card h3 {
  min-height: 68px;
  color: #435363;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.convocatoria-card p {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.convocatoria-card time {
  margin-top: auto;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.convocatoria-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #F4E9EE;
  color: #88254F;
  font-size: 11px;
  font-weight: 800;
}

.convocatoria-badge-doctorado {
  background: #FEF5ED;
  color: #9a551d;
}

.convocatoria-logo {
  width: 118px;
  height: 118px;
  object-fit: contain;
}

.convocatoria-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 38px;
  border: 1.5px solid #111827;
  border-radius: 999px;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.convocatoria-button:hover {
  border-color: #88254F;
  background: #88254F;
  color: #fff;
}

.rvoe-download-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-bottom: 1px solid currentColor;
  color: #8F1D50;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.rvoe-download-link:hover {
  color: #F19F53;
}

.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.pdf-modal.hidden {
  display: none;
}

.pdf-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(4px);
}

.pdf-modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(1120px, 100%);
  height: min(86vh, 860px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.34);
}

.pdf-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #D8DADD;
  background: #88254F;
  color: #fff;
}

.pdf-modal-header h2 {
  overflow: hidden;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-modal-action {
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.pdf-modal-close {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.pdf-modal-frame {
  width: 100%;
  min-height: 0;
  flex: 1;
  border: 0;
  background: #f8fafc;
}

.pdf-modal-open {
  overflow: hidden;
}

.site-header button,
.site-header a {
  font-family: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  border-radius: 0.85rem;
  font-family: "Open Sans", "Exo", sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25rem;
  letter-spacing: 0;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: #8F1D50;
  color: #fff;
  box-shadow: 0 10px 22px rgba(143, 29, 80, 0.22);
}

.btn-primary:hover {
  background: #76163F;
  color: #fff;
  box-shadow: 0 14px 28px rgba(143, 29, 80, 0.28);
}

.btn-secondary {
  background: #F19F53;
  color: #172033;
  box-shadow: 0 10px 22px rgba(241, 159, 83, 0.24);
}

.btn-secondary:hover {
  background: #E68F3D;
  color: #172033;
}

.btn-outline-light {
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.04);
}

.btn-outline-light:hover {
  background: #fff;
  color: #8F1D50;
}

.btn-light {
  background: #fff;
  color: #8F1D50;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.btn-light:hover {
  background: #f8fafc;
  color: #76163F;
}

.site-header .site-header-cta {
  min-height: 40px;
  height: 40px;
  padding: 0 24px !important;
  border-radius: 9999px !important;
  font-size: 14px !important;
  line-height: 20px !important;
}

.site-nav-link {
  position: relative;
  white-space: nowrap;
}

.site-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 2px;
  border-radius: 999px;
  background: #F19F53;
  opacity: 0;
  transform: scaleX(0.55);
  transition: opacity 180ms ease, transform 180ms ease;
}

.site-nav-link:hover::after,
.site-nav-link.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.site-nav-link.is-active {
  color: #8F1D50;
}

body.bg-grid-cedep {
  font-family: 'Exo', sans-serif;
}

.bg-grid-cedep {
  background-image: radial-gradient(circle, rgba(136, 37, 79, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

.convocatorias-bg {
  position: relative;
  overflow-x: hidden;
}

.convocatorias-bg::before,
.convocatorias-bg::after {
  content: "";
  position: fixed;
  inset: auto;
  z-index: 0;
  pointer-events: none;
}

.convocatorias-bg::before {
  top: 88px;
  right: -10vw;
  width: 48vw;
  height: 48vw;
  min-width: 340px;
  min-height: 340px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 35%, rgba(241, 159, 83, 0.18), transparent 58%),
    radial-gradient(circle at 65% 65%, rgba(136, 37, 79, 0.15), transparent 62%);
  filter: blur(2px);
  animation: convocatoriasSoftFloat 18s ease-in-out infinite alternate;
}

.convocatorias-bg::after {
  left: -18vw;
  bottom: -18vw;
  width: 58vw;
  height: 58vw;
  min-width: 420px;
  min-height: 420px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 55% 45%, rgba(136, 37, 79, 0.13), transparent 60%),
    radial-gradient(circle at 32% 62%, rgba(67, 83, 99, 0.10), transparent 58%);
  animation: convocatoriasSoftFloatReverse 22s ease-in-out infinite alternate;
}

@keyframes convocatoriasSoftFloat {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.82; }
  50% { transform: translate3d(-2.5%, 1.5%, 0) scale(1.03); opacity: 1; }
  100% { transform: translate3d(-5%, 3%, 0) scale(0.98); opacity: 0.86; }
}

@keyframes convocatoriasSoftFloatReverse {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.78; }
  50% { transform: translate3d(2%, -1.5%, 0) scale(1.04); opacity: 0.94; }
  100% { transform: translate3d(4%, -3%, 0) scale(0.99); opacity: 0.82; }
}

.accent-line {
  position: relative;
}

.accent-line::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: #F19F53;
  border-radius: 2px;
}

.hero-waves {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.16;
  pointer-events: none;
}

.hero-wave {
  position: absolute;
  left: -12%;
  width: 124%;
  min-width: 1440px;
  height: 100%;
  transform-origin: center;
  will-change: transform;
}

.hero-wave-primary {
  bottom: -10%;
  animation: cedepWaveDrift 13s ease-in-out infinite alternate;
}

.hero-wave-secondary {
  bottom: -3%;
  opacity: 0.48;
  animation: cedepWaveDriftReverse 17s ease-in-out infinite alternate;
}

@keyframes cedepWaveDrift {
  0% { transform: translate3d(-2%, 0, 0) scaleY(1); }
  50% { transform: translate3d(2%, -1.5%, 0) scaleY(1.04); }
  100% { transform: translate3d(5%, 0.75%, 0) scaleY(0.98); }
}

@keyframes cedepWaveDriftReverse {
  0% { transform: translate3d(4%, 1%, 0) scaleY(0.98); }
  50% { transform: translate3d(0, -1%, 0) scaleY(1.03); }
  100% { transform: translate3d(-4%, 0, 0) scaleY(1); }
}

.hero-orbit {
  animation: heroOrbit 22s ease-in-out infinite alternate;
  transform-origin: center;
  will-change: transform;
}

.hero-orbit-secondary {
  animation: heroOrbitReverse 28s ease-in-out infinite alternate;
  transform-origin: center;
  will-change: transform;
}

@keyframes heroOrbit {
  0% { transform: rotate(43deg) scale(1.45) translate3d(-1.5%, 0, 0); }
  50% { transform: rotate(47deg) scale(1.52) translate3d(1%, -1%, 0); }
  100% { transform: rotate(50deg) scale(1.46) translate3d(2%, 1%, 0); }
}

@keyframes heroOrbitReverse {
  0% { transform: translate3d(4%, 0, 0) scaleX(1); }
  50% { transform: translate3d(0, -1.5%, 0) scaleX(1.04); }
  100% { transform: translate3d(-4%, 1%, 0) scaleX(0.98); }
}

.posgrado-hero::before {
  content: "";
  position: absolute;
  inset: -18%;
  background:
    radial-gradient(circle at 18% 28%, rgba(241, 159, 83, 0.18), transparent 24%),
    radial-gradient(circle at 82% 68%, rgba(255, 255, 255, 0.08), transparent 22%);
  animation: posgradoHeroGlow 8s ease-in-out infinite alternate;
  pointer-events: none;
}

.posgrado-hero .hero-orbit {
  animation: posgradoHeroOrbit 10s ease-in-out infinite alternate;
}

.posgrado-hero .hero-orbit-secondary {
  animation: posgradoHeroWave 9s ease-in-out infinite alternate;
}

@keyframes posgradoHeroOrbit {
  0% { transform: rotate(42deg) scale(1.42) translate3d(-2%, 0, 0); }
  45% { transform: rotate(48deg) scale(1.55) translate3d(2%, -2%, 0); }
  100% { transform: rotate(53deg) scale(1.47) translate3d(3%, 1.5%, 0); }
}

@keyframes posgradoHeroWave {
  0% { transform: translate3d(5%, 0.5%, 0) scaleX(1.02); }
  50% { transform: translate3d(0, -3%, 0) scaleX(1.07); }
  100% { transform: translate3d(-6%, 1.5%, 0) scaleX(0.98); }
}

@keyframes posgradoHeroGlow {
  0% { transform: translate3d(-2%, 1%, 0) scale(1); opacity: 0.7; }
  100% { transform: translate3d(2%, -2%, 0) scale(1.04); opacity: 1; }
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms ease, transform 700ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.refined-card {
  position: relative;
  overflow: hidden;
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease, background-color 260ms ease;
}

.refined-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(143, 29, 80, 0.08), rgba(242, 158, 76, 0.08));
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
}

.refined-card:hover {
  transform: translateY(-6px);
  border-color: rgba(143, 29, 80, 0.24);
  box-shadow: 0 18px 45px rgba(104, 17, 57, 0.13);
}

.refined-card:hover::before {
  opacity: 1;
}

.identity-icon {
  box-shadow: inset 0 0 0 1px rgba(143, 29, 80, 0.08), 0 8px 20px rgba(143, 29, 80, 0.08);
}

.identity-icon i {
  transition: transform 260ms ease;
}

.refined-card:hover .identity-icon i {
  transform: translateY(-2px) scale(1.06);
}

#programas-lista .grid > div {
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}

#programas-lista .grid > div:hover {
  transform: translateY(-4px);
  border-color: rgba(143, 29, 80, 0.22);
}

#programas-lista p,
#detalle-programa-section p {
  line-height: 1.75;
}

.admission-steps::before {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  top: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8F1D50, #F29E4C, #8F1D50);
  opacity: 0.28;
  z-index: 0;
}

.admission-steps .refined-card {
  overflow: visible;
}

.admission-steps > div {
  z-index: 1;
}

.admission-steps > div span {
  z-index: 2;
  box-shadow: 0 8px 18px rgba(104, 17, 57, 0.18);
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.admission-steps > div:hover span {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 24px rgba(104, 17, 57, 0.24);
}

.calculator-card {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at top right, rgba(242, 158, 76, 0.18), transparent 34%),
    radial-gradient(circle at 0 100%, rgba(143, 29, 80, 0.10), transparent 28%),
    #ffffff;
}

.calculator-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1.5rem;
  padding: 1px;
  background: linear-gradient(135deg, rgba(143, 29, 80, 0.26), rgba(242, 158, 76, 0.34));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}

.price-tile {
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}

.price-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(104, 17, 57, 0.10);
}

.featured-price {
  box-shadow: 0 18px 38px rgba(143, 29, 80, 0.14);
}

.calc-pulse {
  animation: calcPulse 520ms ease;
}

.program-detail-enter {
  animation: programDetailEnter 520ms ease both;
}

@keyframes programDetailEnter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes calcPulse {
  0% { transform: scale(0.98); opacity: 0.72; }
  55% { transform: scale(1.035); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 767px) {
  .admission-steps::before {
    left: 2.75rem;
    right: auto;
    top: 0;
    bottom: 0;
    width: 3px;
    height: auto;
    transform: none;
    background: linear-gradient(180deg, #8F1D50, #F29E4C, #8F1D50);
  }
}

@media (max-width: 420px) {
  .brand-logo { width: 128px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-wave,
  .hero-orbit,
  .hero-orbit-secondary,
  .posgrado-hero::before,
  .convocatorias-bg::before,
  .convocatorias-bg::after,
  .program-detail-enter,
  .calc-pulse {
    animation: none;
  }

  .reveal-on-scroll,
  .refined-card,
  .identity-icon i,
  .admission-steps > div span,
  .btn {
    transition: none;
  }

  .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }
}
