:root {
  --border-radius: 10px;
}

::-moz-selection {
  color: #fff;
  background: var(--bs-primary);
}

::selection {
  color: #fff;
  background: var(--bs-primary);
}

::-webkit-input-placeholder {
  color: var(--bs-dark);
  opacity: 1 !important;
}

::-moz-placeholder {
  color: var(--bs-dark);
  opacity: 1 !important;
}

:-ms-input-placeholder {
  color: var(--bs-dark);
  opacity: 1 !important;
}

:-moz-placeholder {
  color: var(--bs-dark);
  opacity: 1 !important;
}

main.main {
  filter: initial !important;
}

.h-md-100 {
  height: auto;
}

@media (min-width: 768px) {
  .h-md-100 {
    height: 100% !important;
  }
}

.bg-primary {
  background-color: #2f328a !important;
}

.bg-p-silver {
  background-color: #f6f8fc !important;
}

.bg-p-green {
  background-color: #dff4cf !important;
}

.text-primary {
  color: #2f328a !important;
}

.text-white {
  color: #fff !important;
}

.text-p-green {
  color: #dff4cf !important;
}

.text-light {
  color: rgba(255, 255, 255, 0.8) !important;
}

.loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f6f8fc;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
}

.loader-wrapper img {
  width: 120px;
}

.stat-value {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
}

.big-title {
  font-size: clamp(3rem, 4vw, 6rem);
  line-height: 1;
  letter-spacing: 2px;
  font-weight: 900;
  margin: 0.4em 0;
}

.big-title-2 {
  font-size: clamp(2rem, 2vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: 2px;
  font-weight: 900;
  margin: 0.4em 0;
}

.hero-reset {
  height: initial !important;
}

.hero-logo {
  width: 100%;
  max-width: 500px;
  margin-inline: auto;
  display: block;
}

.swiper {
  width: 100%;
}

.swiper-slide img {
  width: 100vw;
  height: auto;
  display: block;
}

#home-slider .slide-1 {
  background-image: url(../images/img-aguascalientes-1.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#home-slider .slide-2 {
  background-image: url(../images/img-aguascalientes-2.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

section.hero {
  padding: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 0 0 25% 25%;
  min-height: 360px;
  width: 100vw;
  position: relative;
}

.btn.btn-light.btn-lg.btn-hero {
  position: absolute;
  top: 2rem;
  right: 1rem;
  transform: translateX(-2%);
  z-index: 2;
  box-shadow: 0 5px 3px 0 rgba(0, 0, 0, 0.33) !important;
}

.btn-hero:hover {
  background: #2f328a !important;
  color: #fff !important;
}

@media (height <=1200px) {
  .hero {
    height: initial;
  }

  .hero-home {
    height: 60dvh !important;
  }
}

@media (height > 1200px) {
  .hero {
    height: initial;
  }

  .hero-home {
    height: 50dvh !important;
  }
}

@media (width <=956px) {
  .hero {
    height: 55dvh;
    border-radius: 0 0 60px 60px;
  }

  #home-slider .container,
  #home-slider .row {
    height: 100%;
  }

  .col-b {
    height: 100%;
  }
}

#home-slider .swiper-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(217, 255, 211, 0) 0, #4f6af4 100%);
  opacity: 0.6;
}

#home-slider {
  --swiper-navigation-color: #ffffff;
}

#home-slider .swiper-button-next,
#home-slider .swiper-button-prev {
  color: #fff;
}

#home-slider,
#home-slider .swiper-slide,
#home-slider .swiper-wrapper {
  height: 100%;
}

#home-slider .swiper-slide {
  position: relative;
}

#home-slider .swiper-slide .row {
  position: relative;
  z-index: 2;
}

.stats-section {
  background: #2f328a;
  color: #fff;
}

.stats-row {
  row-gap: 2rem;
}

.stat-item {
  position: relative;
  font-family: "Visby CF Bold", sans-serif;
}

@media (min-width: 768px) {
  .stat-item:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 15%;
    bottom: 15%;
    width: 1px;
    background: rgba(255, 255, 255, 0.35);
  }
}

.stat-value {
  font-family: "Visby CF Bold", sans-serif;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 1px;
  font-size: clamp(2.5rem, 6.5vw, 5.5rem);
}

.stat-value .suffix-word {
  display: block;
  font-size: 0.6em;
  margin-top: 0.1em;
}

.stat-value sup {
  font-size: 0.45em;
  top: -0.6em;
}

.stat-caption {
  font-size: 0.95rem;
  opacity: 0.9;
}

.text-warning {
  color: #ffc107 !important;
}

.mejora .stats-row {
  margin-top: 2rem;
}

.stat-caption {
  font-size: 1.3rem;
  line-height: 1.3;
}

/* Rankings inicio (2.° lugar + texto + fuente) */
.stats-row--rankings .stat-item--ranking {
  display: flex;
  flex-direction: column;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.stats-row--rankings .stat-item--ranking .stat-caption {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.5rem;
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  line-height: 1.35;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.stat-caption-title {
  display: block;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.stat-source {
  display: block;
  font-size: 0.82em;
  font-weight: 500;
  opacity: 0.88;
  line-height: 1.35;
}


/* Quitar separadores verticales en la sección de rankings */
@media (min-width: 768px) {
  .stats-row--rankings .stat-item--ranking::after {
    display: none !important;
  }
}

.letter {
  position: relative;
  min-height: 200px;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  padding: 1rem;
  background-color: #dff4cf;
  color: #2f328a;
}

.letter h3 {
  color: #2f328a;
}

.letter * {
  z-index: 2;
}

.letter-a::before {
  content: "A";
  position: absolute;
  font-weight: 900;
  font-size: 15rem;
  top: 50%;
  left: 50%;
  z-index: 1;
  color: #dbf3bd;
}

.letter-b::before {
  content: "B";
  position: absolute;
  font-weight: 900;
  font-size: 15rem;
  top: 50%;
  left: 50%;
  z-index: 1;
  color: #dbf3bd;
}

.letter::before {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%) scale(0.8);
  transform-origin: center center;
  transition: transform 0.3s ease-in-out;
  will-change: transform;
}

.letter:hover::before {
  transform: translate(-50%, -50%) scale(2);
  transition: transform 0.3s ease-in-out;
}

.stages-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.stage-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 576px) {
  .stage-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .stage-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

.flip {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 4px solid #dff4cf;
  perspective: 1000px;
  border-radius: 2rem;
  cursor: pointer;
  background: var(--bs-primary);
}

@media (width > 956px) {
  .flip {
    height: 340px;
  }
}

@media (width < 956px) {
  .flip {
    height: 140px;
  }
}

.flip>.back,
.flip>.front {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  transition-duration: 0.5s;
  transition-property: transform, opacity;
  height: 102%;
}

.flip>.front {
  transform: rotateY(0);
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.flip>.front h3 {
  z-index: 2;
}

.flip>.front::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(79, 106, 244, 0.55) 0,
      rgba(47, 50, 138, 0.9) 100%);
}

.flip>.front .flip-title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.25rem;
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: clamp(1.2rem, 3vw, 1.4rem);
  text-align: center;
}

.flip>.back {
  background: #fff;
  color: #2f328a;
  opacity: 0;
  transform: rotateY(-180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.25rem;
}

.flip:hover:not(.active)>.front {
  transform: rotateY(180deg);
}

.flip:hover:not(.active)>.back {
  opacity: 1;
  transform: rotateY(0);
}

.flip.active>.front {
  transform: rotateY(180deg);
}

.flip.active>.back {
  opacity: 1;
  transform: rotateY(0);
}

.flip:hover {
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {

  .flip>.back,
  .flip>.front {
    transition: none;
  }
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

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

.tab-content {
  display: none;
  scroll-margin-top: 100px;
}

.tab-content.active {
  display: block;
}

.pb-extra {
  padding-bottom: 14rem;
}

.stages-section {
  padding-bottom: 3rem;
}

@media (width > 956px) {
  .stages-section .col-12 {
    margin-top: -12rem !important;
    position: relative !important;
    z-index: 2;
  }
}

.stage-back .btn-simple {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  background: var(--bs-primary);
  color: #fff;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
}

.video-section {
  position: relative;
}

.video-section::before {
  content: "";
  position: absolute;
  background: var(--bs-primary);
  z-index: 1;
  border-radius: 0 0 133px 133px;
  width: 100%;
  height: 33%;
  left: 0;
  top: 0;
}

.video-embed {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16/9;
  z-index: 2;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@supports not (aspect-ratio: 16 / 9) {
  .video-embed {
    height: 0;
    padding-bottom: 56.25%;
  }
}

.map-embed {
  position: relative;
  width: 100%;
  height: 500px;
  background: #eef2ff;
  border-radius: 12px;
  overflow: hidden;
}

.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.map-embed:not(.active)::after {
  content: "Haz clic para interactuar con el mapa";
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  pointer-events: none;
}

.choice-card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #e6eaff;
  color: #2f328a;
  border-radius: 20px;
  padding: 22px 28px;
  min-height: 110px;
  width: 100%;
  max-width: 460px;
  text-decoration: none;
  font-weight: 800;
  line-height: 1.25;
}

.choice-card:focus-visible,
.choice-card:hover {
  transform: translateY(-2px);
  outline: 0;
  background: #e1e6ff;
}

.choice-card span {
  font-family: inherit;
  font-size: 1.6rem;
  padding-block: 2rem;
  padding-inline: 1rem;
}

.arrow-up {
  display: block;
  position: relative;
  transform: translateY(-75px);
}

.card-animated {
  transition: all 0.3s ease;
  border: none;
  border-radius: 20px;
}

.card-animated:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.text-bg-p-purple {
  background-color: #6f42c1 !important;
  color: #fff !important;
}

.text-bg-p-cyan {
  background-color: #0dcaf0 !important;
  color: #fff !important;
}

.font-secondary {
  font-size: 0.95rem;
  line-height: 1.5;
}

.br-15 {
  border-radius: 15px;
}

.br-20 {
  border-radius: 20px;
}

.accordion-cards a {
  display: table !important;
  color: #fff !important;
}

.hero-resultados {
  padding-bottom: 15rem;
}

.results .card.card-results {
  margin-top: -15rem;
  position: relative;
  z-index: 1;
}

.buttons img {
  width: 20px;
}

.number {
  background: #e4dcf7;
  color: #8e69c2;
  border-radius: 5px;
  width: 61px;
  height: 61px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.number h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  padding: 0;
}

.card-r {
  background: var(--bs-p-silver) !important;
  border: none !important;
}

.step-number {
  flex-shrink: 0;
}

.step-circle {
  width: 80px;
  height: 80px;
  background: #dff4cf;
  border: 10px solid;
  border-style: double;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 900;
  color: #2f328a;
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.processing-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(47, 50, 138, 0.8);
  backdrop-filter: blur(10px) saturate(180%);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
}

.processing-loader.show {
  display: flex;
}

.processing-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.processing-text {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}

.processing-subtext {
  color: #ccc;
  font-size: 14px;
  text-align: center;
}

@keyframes spin {
  0% {
    transform: rotate(0);
  }

  100% {
    transform: rotate(360deg);
  }
}

.visor-vdi-container {
  width: 100%;
  height: 600px;
  background: #eef2ff;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.visor-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.visor-vdi-container:not(.active)::after {
  content: "Haz clic para interactuar con el visor";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 24px;
  font-weight: 800;
  pointer-events: auto;
  cursor: pointer;
}

.visor-vdi-container.active .visor-iframe {
  pointer-events: auto;
}

.cuestionario {
  border-radius: 20px;
}

.br-10 {
  border-radius: 10px;
}

.form-check-input:checked {
  background-color: #2f328a !important;
  border-color: #2f328a !important;
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(47, 50, 138, 0.25) !important;
}

.loading-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 1rem;
}

.loading-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #2f328a;
  animation: loadingDots 1.4s infinite ease-in-out both;
}

.loading-dots .dot:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dots .dot:nth-child(2) {
  animation-delay: -0.16s;
}

.loading-dots .dot:nth-child(3) {
  animation-delay: 0s;
}

@keyframes loadingDots {

  0%,
  100%,
  80% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.loading-spinner {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.profile-info {
  display: block;
  text-decoration: none;
  transition: none !important;
}

.profile-info:hover {
  color: initial;
  box-shadow: none !important;
  transform: none !important;
  text-decoration: none !important;
  background: 0 0 !important;
}

.profile-info:focus {
  box-shadow: none !important;
  outline: 0 !important;
}

.profile-info .name {
  text-transform: uppercase;
}

.return {
  color: #7b868c;

  & a {
    color: #7b868c;
  }
}

.no-results * {
  color: #7b868c !important;
}

@media (width <=1024px) {
  .hero-logo {
    margin-block: 4rem;
  }

  .flip {
    min-height: 200px;
  }

}

@media (width <=768px) {
  .badges {
    width: 100%;
    padding-block: .5rem;
    overflow-x: scroll;
  }
}

.hero-inner-page {
  height: initial !important;
  z-index: 2;
  position: relative;
}

/* Badges de estatus de trámites (Id_Estatus → d_color); texto con contraste */
.id-\-1 {
  background: #61E28C;
  color: #000;
}

.id-0 {
  background: #FF3300;
  color: #fff;
}

.id-1 {
  background: #FF9933;
  color: #000;
}

.id-2 {
  background: #000000;
  color: #fff;
}

.id-3 {
  background: #99CC00;
  color: #000;
}

.id-4 {
  background: #01b9e6;
  color: #000;
}

.id-5 {
  background: #FFCD00;
  color: #000;
}

.id-6 {
  background: #FFDC4D;
  color: #000;
}

.id-7 {
  background: #8B44EF;
  color: #fff;
}

.id-8 {
  background: #BBB;
  color: #000;
}

.id-9 {
  background: #8B44EF;
  color: #fff;
}

/* ==========================================================================
   Google Translate & Multi-language Toggle
   ========================================================================== */

/* Hide Google Translate original UI */
.goog-te-banner-frame,
.VIpgJd-Zvi9od-ORHb-OEVmcd,
#goog-gt-tt,
.goog-te-balloon-frame {
  display: none !important;
}

body {
  top: 0 !important;
  position: relative !important;
}

.skiptranslate {
  display: none !important;
}

#google_translate_element {
  display: none !important;
}

/* Floating Language Toggle Styles */
.lang-toggle-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 6px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  border: 1px solid rgba(47, 50, 138, 0.1);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lang-toggle-container:hover {
  /* transform: translateY(-5px) scale(1.02); */
}

.lang-btn {
  width: auto;
  height: 16px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border-radius: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(47, 50, 138, 0.1);
  padding: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  position: relative;
}

.lang-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.lang-btn:hover {
  border-color: #2f328a;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(47, 50, 138, 0.3);
}

.lang-btn:hover img {
  transform: scale(1.15);
}

.lang-btn.active {
  border: 2.5px solid #2f328a;
  box-shadow: 0 0 20px rgba(47, 50, 138, 0.4);
  pointer-events: none;
  transform: scale(1.05);
}

.lang-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.2) 0%,
      rgba(255, 255, 255, 0) 50%,
      rgba(255, 255, 255, 0.1) 100%);
  pointer-events: none;
}

.lang-divider {
  width: 1px;
  height: 20px;
  background: rgba(47, 50, 138, 0.2);
}

/* Adjustments for smaller screens */
@media (max-width: 768px) {
  .lang-toggle-container {
    bottom: 20px;
    right: 20px;
    gap: 8px;
    padding: 8px;
  }

  .lang-btn {
    width: 35px;
    height: 35px;
  }
}