body, html {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  position: relative;
  height: 100%;
  overflow-x: hidden;
}

/* Imagen de fondo completa */
.fondo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  min-height: 100vh;
  object-fit: cover;
  z-index: -1;
}

/* Contenedor principal centrado y responsivo */
.contenedor-principal {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0;
  max-width: 500px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.9s ease-out forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Contenedor para background con shadow */
.contenido-central {
  background-color: #ffffff;
  padding: 40px;
  box-shadow: 0 12px 12px rgba(0, 0, 0, 0.45);
  margin-top: 5rem;
}

@media screen and (max-width: 640px) {
  .contenido-central {
    padding: 10px;
    margin: 10px;
  }
}

.index-contain {
  display: flex;
  justify-content: center; /* centra horizontalmente */
  align-items: center;
  gap: 20px; /* espacio entre las imágenes */
  flex-wrap: wrap; /* permite que bajen en pantallas pequeñas */
}

/* Encabezado arriba (logo superior) */
.encabezado {
  position: relative;
  top: 0;
  left: 0;
  transform: none;
  width: 250px;
  margin-bottom: -1.5rem;
}

/* Encabezado para enlaces tramites, beneficios y comunicados */
.encabezado-link {
  top: 0;
  left: 0;
  transform: none;
  width: 250px;
  margin-bottom: -4rem;
}

/* Imagen inferior (logo inferior fijo solo en pantallas grandes) */
.center-down {
  position: relative;
  bottom: 0;
  left: 0;
  transform: none;
  width: 220px;
  margin-top: none;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .encabezado {
    width: 170px;
    margin-bottom: 0rem;
  }
  .encabezado-link {
    width: 170px;
    margin-bottom: 0rem;
  }
  .center-down {
    width: 160px;
    margin-top: 0rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .encabezado {
    width: 200px;
  }
.encabezado-link {
    width: 200px;
  }
  .center-down {
    width: 120px;
  }
}

/* Parte superior derecha */
.logo {
  position: fixed;
  top: 2rem;
  right: 2rem;
  width: 80px;
}

@media (max-width: 640px) {
  .logo {
    max-width: 35px;
    top: .9rem;
    right: 1.5rem;
    z-index: 1;
  }
}

/* Pleca fija en el top */
.pleca {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1;
}

/* Contenedor principal */
.container-index {
  text-align: center;
  padding-top: 1rem;
}

/* Contenedor para los enlaces */
.container {
  text-align: center;
  padding-top: 1rem;
}

.anim-central{
  text-align: center;
  padding: 1rem;
  opacity: 0;
  transform: translateX(-30px);
  animation: slideInLeft 0.6s ease-out forwards;
}

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
/* Títulos base */
.title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  margin-top: 0;
  color: black;
  font-weight: 300;
}

.subtitle {
  font-size: 1.5rem;
  font-weight: 200;
}

.subtitle.spaced {
  margin-top: 1.5rem;
}

/* Para pantallas medianas (641px a 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
  .title {
    font-size: 2rem;
    margin-top: 8%;
    margin-bottom: 2rem;
  }

  .subtitle {
    font-size: 1.25rem;
  }
}

/* Para pantallas pequeñas (hasta 640px) */
@media (max-width: 640px) {
  .title {
    font-size: 1.75rem;
    margin-top: 6%;
    margin-bottom: 1.5rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .subtitle.spaced {
    margin-top: 1rem;
  }
}

/* Botones */
.button-group {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .button-group {
    flex-direction: row;
    gap: 1.5rem;
  }
}

.btn-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btn-img{
  width: 50px;
}

.btn {
  color: white;
  font-size: 1.125rem;
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  background-color: #3498db;
  text-decoration: none;
  font-weight: 400;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn:hover {
  background-color: #2980b9;
}

/* Botón responsivo para móviles */
@media screen and (max-width: 640px) {
  .btn {
    font-size: .9rem;           
    padding: .2rem .6rem;
    border-radius: 4px;
    gap: 0.2rem;
  }
}

/* Boton nuevo para index */
.btn-index {
  color: rgb(0, 0, 0);
  font-size: 1.125rem;
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  background-color: #ffffff;
  text-decoration: none;
  font-weight: 400;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-index:hover {
  background-color: #e1e1e1;
}
/* Botón responsivo para móviles */
@media screen and (max-width: 640px) {
  .btn-index {
    font-size: 1rem;           /* 16px */
    padding: 0.4rem 1.2rem;
    border-radius: 4px;
    gap: 0.4rem;
  }
}


/* Flecha */
.icon {
  font-size: 1.2rem;
  padding-bottom: 5px;
}

@media ( max-width: 640px) {
  .icon{
    font-size: 1rem;
    margin-bottom: -5px;
  }
}

/* Tooltip */
.tooltip {
  position: absolute;
  bottom: -2.2rem;
  background-color: #000000;
  color: #fff;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(5px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10;
}

/* Mostrar tooltip al hacer hover sobre el botón */
.btn-wrapper:hover .tooltip {
  opacity: 1;
  transform: translateY(0);
}


/* tamaño correcto para móviles*/
h2 {
  font-size: 1.5rem;
  color: #000000;
  margin-bottom: auto;
  margin-top: 3rem;
  font-weight: 300;
}

h3 {
  font-size: 3rem;
  color: #000000;
  margin-bottom: auto;
}

/* Móviles */
.phara {
  font-size: 1.1rem;
  color: #000000;
  padding: 1rem;
}

/* Tablets (entre 1001px y 1200px aprox.) */
@media (min-width: 1001px) and (max-width: 1200px) {
  .phara {
    font-size: 1.3rem;
    color: #000000;
    padding: 0.5rem;
  }
}

/* Laptops grandes */
@media (min-width: 1201px) {
  .phara {
    font-size: 1.5rem;
    color: #000;
    padding: 0;
  }
  h2 {
    font-size: 2rem;
    font-weight: 400;
  }
}


.lista-pdf {
  list-style-type: disc;
  padding-left: 20px;
}

.lista-pdf li {
  margin-bottom: 10px;
}

.lista-pdf a {
  text-decoration: none;
  color: #000000;
  font-weight: bold;
  font-size: 1.5rem;
}

.lista-pdf a:hover {
  text-decoration: underline;
  color: #003d80;
}

.beneficios {
  display: flex;
  justify-content: center;
  padding: 1rem;
}

/* Lista vertical de logos */
.beneficios-lista {
  display: flex;
  flex-direction: row; 
  gap: 1.5rem; 
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center; 
}


/* Imagen de cada beneficio */
.bene-img {
  max-width: 200px;
  height: auto;
  object-fit: contain;
  transition: transform 0.2s ease-in-out;
  cursor: pointer;
}

.bene-img:hover {
  transform: scale(1.05);
}

/* Responsive: logos más pequeños en móvil */
@media (max-width: 640px) {
  .bene-img {
    max-width: 90px;
  }
}

/* Iconos tramites */
.icono-pdf {
  width: 24px;
  text-align: center;
  color: #c0392b;
}


/* Imágenes en lugar de PDF */
.contenedor-imagenes {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.fila-imagenes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.fila-imagenes img {
  width: 100%;
  max-width: none;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  object-fit: cover;
  transition: transform 0.3s;
}

.fila-imagenes img:hover {
  transform: scale(1.05);
}

@media (min-width: 600px) {
  .fila-imagenes img {
    max-width: 100%;
  }
}

@media (min-width: 768px) {
  .fila-imagenes img {
    width: auto;
    max-width: 1000px;
  }
}

/* boton para regresar al index */
.btn-back {
  position: fixed;
  margin-top: 2rem;
  margin-left: 2rem;
  z-index: 10;
}

/* Mostrar tooltip al hacer hover sobre el botón */
.btn-back:hover .tooltip {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .btn-back{
    margin-top: 1.1rem;
  }
}

/* Tooltip */
.tooltip {
  position: absolute;
  bottom: -2.2rem;
  background-color: #000000;
  color: #fff;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(5px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10;
}

/* Ventana emergente para contenido de beneficios tipo tooltip*/
.dialogEmergent {
  position: absolute;
  bottom: 0rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ffffff;
  color: #000000;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  width: 80vw;        
  max-width: 20rem;   
  min-width: 12rem;
  font-size: 0.95rem;
  white-space: normal;
  text-align: left;
  box-sizing: border-box;
}

.dialogEmergent.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(-10px);
}

/* Botón de cerrar */
.dialogEmergent .closeDialog {
  position: absolute;
  top: -0.6rem;
  right: 6px;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  font-weight: bold;
  cursor: pointer;
  color: #000;
}

/* Laptops y tablets grandes */
@media (max-width: 1280px) {
  .dialogEmergent {
    font-size: 1rem;
    padding: 1.2rem 1.4rem;
    width: 75vw;
    max-width: 18rem;
  }
  .dialogEmergent .closeDialog {
    font-size: 1.8rem;
    top: -0.7rem;
  }
}

/* Tablets medianas */
@media (max-width: 1024px) {
  .dialogEmergent {
    font-size: 1.1rem;
    width: 70vw;
    max-width: 17rem;
    padding: 1.4rem;
    text-align: center;
  }
  .dialogEmergent .closeDialog {
    font-size: 2rem;
    top: -0.8rem;       
  }
}

/* Móviles grandes */
@media (max-width: 768px) {
  .dialogEmergent {
    font-size: 1rem;
    width: 85vw;
    max-width: 16rem;
    padding: 1.2rem;
  }
  .dialogEmergent .closeDialog {
    font-size: 1.8rem;
    top: -0.7rem;
  }
}

/* Móviles pequeños */
@media (max-width: 480px) {
  .dialogEmergent {
    font-size: 0.9rem;
    width: 20vw;
    max-width: 15rem;
    padding: 1rem;
  }
  .dialogEmergent .closeDialog {
    font-size: 1.6rem;
    top: -0.6rem;
  }
}


/* Lista para imagen */
.bene-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Dedo para beneficios */
.dedo-container {
  position: absolute;
  top: 100px; 
  left: 20%;
  transform: translateX(-50%);
  pointer-events: none; 
  z-index: 10;
}

.dedo-img {
  width: 80px;
  animation: moverDedoLR 1s infinite;
  transition: opacity 0.5s ease; 
}

@media (max-width: 670px) {
  .dedo-container {
    top: 20px;
    left: 20%;
  }
  .dedo-img {
    width: 60px;
  }
}

.dedo-oculto {
  opacity: 0;
  pointer-events: none;
}

@keyframes moverDedoLR {
  0%, 100% {
    transform: translateX(-50%) translateY(0); 
  }
  50% {
    transform: translateX(-40%) translateY(0); 
  }
}

@media (min-width: 670px) and (max-width: 1000px) {
  .dedo-img{
    width: 100px;
  }
}


