body {
  background-image: url('/imagenes/fondo.jpg');
  background-repeat: no-repeat;       /* evita que se repita */
  background-position: center center; /* centra la imagen */
  background-attachment: fixed;       /* la imagen se queda fija al hacer scroll */
  background-size: cover;             /* hace que cubra todo el fondo */
  color: #fff;
}

.encabezado, .pie {
/*  background-color: rgba(0, 0, 0, 0.75);
  padding: 1rem 2rem;
  color: #fff;
  text-align: center; */
  background-color: rgba(25, 25, 25, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  color: #fff;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu {
  list-style: none;
  display: flex;
  gap: 2rem;
  padding: 0;
  margin: 0;
  justify-content: space-evenly;
}

.menu li a {
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  padding: 8px 4px; 
  position: relative;
  overflow: hidden;
}

.menu li a::after {
   content: '';             /* Los pseudo-elementos como '::after' siempre necesitan esta propiedad. */
   position: absolute;      /* Se posiciona con respecto al enlace (que es 'relative'). */
   bottom: 0;               /* Lo alinea a la parte inferior del enlace. */
   left: 50%;               /* Lo posiciona justo en el centro horizontal del enlace. */
   transform: translateX(-50%); /* Truco para asegurar que esté perfectamente centrado. */
   width: 0;                /* Inicia con un ancho de cero, por eso no se ve. */
   height: 2px;             /* El grosor de la línea. */
   background-color: #fff;  /* El color de la línea. */
   transition: width 0.3s ease-in-out; /* ¡La magia! Anima el cambio de ancho en 0.3 segundos. */
}
 
.menu li a:hover::after {
   width: 100%;             /* El ancho de la línea se expande al 100%, haciéndola visible. */
}

.seccion {
  padding: 2rem;
  background-color: rgba(0, 0, 0, 0.5);
  margin: 1rem;
  border-radius: 12px;
}

.tarjetas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.tarjeta {
  width: 30%;
  background-color: rgba(255, 255, 255, 0.85);
  color: #333;
  display: flex;
  flex-direction: row;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 180px;
}

.tarjeta:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.tarjeta img {
  width: 40%;
  height: 100%;
  object-fit: cover;
}

.tarjeta-descripcion {
  padding: 1rem;
  width: 60%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Acortador de descripción */
.tarjeta-descripcion p {
  display: -webkit-box;
  -webkit-line-clamp: 15;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0; /* Ajusta o elimina el margen si es necesario */
}

/* CONTADOR DE VISITAS */

.contenedor {
      position: relative;
      width: 110px;
      height: 70px;
      margin: 2rem auto;
      background: none;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .caja-transparente {
      position: absolute;
      width: 110px;
      height: 70px;
      background-color: rgba(0, 0, 0, 0.0);
      z-index: 2;
      border-radius: 5px;
    }

    .cont {
      position: absolute;
      z-index: 1;
    }


@media (max-width: 768px) {
  /*
  .tarjetas {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
  }
  
  .tarjeta {
    width: 100%;
    flex-direction: column;
    min-height: auto;
    padding: 0 5px;
  }

  .tarjeta img {
    width: 100%;
    height: auto;
  }

  .tarjeta-descripcion {
    width: 100%;
    padding: 0;
  }
  */
  .tarjetas {
    flex-direction: column;
    align-items: center;
  }

  .tarjeta {
    width: 100%;
    flex-direction: column;
    min-height: auto;
  }

  .tarjeta img {
    width: 100%;
    height: auto;
  }

  .tarjeta-descripcion {
    width: 100%;
    padding: 1rem;
  }
} 

.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0; top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
}

.modal-contenido {
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  position: relative;
  max-width: 800px;
  width: 90%;
  max-height: 90%;
  overflow-y: auto;
  text-align: center;
  color: #222;
}

.modal-contenido img {
  width: 100%;
  max-height: 400px;
  margin-right: 10px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.cerrar {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 2rem;
  cursor: pointer;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input, textarea, button {
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 6px;
  border: none;
}

#btnVolverArriba {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  background-color: #333;
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.4);
  z-index: 999;
  transition: background-color 0.3s ease;
}

#btnVolverArriba:hover {
  background-color: #555;
}

.modal-contenido {
  position: relative;
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  /* overflow: hidden; */
  text-align: justify;
  color: #222;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}

.modal-contenido img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  transition: transform 0.3s ease;
  will-change: transform;
  margin-bottom: 1rem;
}

.cerrar {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2rem;
  color: #000;
  background: #fff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

#btnVolverArriba i {
  font-size: 1.2rem;
}

.redes-sociales {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.redes-sociales a {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-size: 1.2rem;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.15);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.redes-sociales a i {
  margin-right: 0.75rem;
  font-size: 1.5rem;
}

.redes-sociales a:hover {
  transform: scale(1.05);
}

/* Colores personalizados por red (opcional) */
.facebook { background-color: #3b5998; }
.instagram { background-color: #E1306C; }
.whatsapp { background-color: #25D366; }
.youtube { background-color: #FF0000; }

.redes-sociales a:hover {
  filter: brightness(1.1);
}

@media (max-width: 768px) {
  .modal-contenido {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .modal-contenido img {
    width: 100%;
    height: auto;
    max-height: 250px;
    margin-bottom: 1rem;
  }
}