body {
  display: grid;
}
.fondo-fijo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url(Fondo.webp);
  background-size: cover;
  background-position: center;
  z-index: -1;
}

html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

.foto1,
.foto2 {
  position: fixed;
  max-width: 30%;
  z-index: 1;
  /* Asegúrate de que no excedan el ancho de pantalla */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@font-face {
  font-family: Bacalisties;
  src: url(Bacalisties.ttf);
}

@keyframes slideUp {
  from {
    transform: translateY(50%) scale(0.8);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.invisible {
  color: #00000000;
  margin-top: 30px;
}

.alert {
  all: unset;
  position: absolute;
  margin: auto;
  display: none;
  color: rgb(10, 54, 0);
}

.boton {
  display: flex;
  margin-top: -6%;
  margin-bottom: -30%;
  font-family: 'Courier New', Courier, monospace;
  font-weight: lighter;
}

.boton-pdf {
  display: flex;
  font-family: 'Courier New', Courier, monospace;
  font-weight: lighter;
}

.btn {
  text-decoration: none;
  margin: 20px auto;
  background-color: rgba(255, 255, 255, 0);
  border: solid rgb(10, 54, 0);
  color: rgb(10, 54, 0);
  padding: 5px 20px;
  border-radius: 20px;
  transition: all .3s ease;
  cursor: pointer;
}

.btn:hover {
  background-color: rgb(10, 54, 0);
  color: rgb(255, 255, 255);
}

.foto1 {
  left: 0%;
  top: 0%;
}

.foto2 {
  right: 0%;
  bottom: 0%;
}

.music {
  text-align: right;
  /*text-align: center;*/
  z-index: 3;
  margin-right: 40px;
  margin-top: 20px;
}

.play {
  /*font-family: Bacalisties;*/
  font-family: 'Courier New', Courier, monospace;
  font-size: 30px;
  margin-top: 5px;
  margin-right: -6px;
  color: rgb(10, 54, 0);
}

.name {
  text-align: center;
  color: rgb(10, 54, 0);
  font-family: Bacalisties;
  font-size: 400%;
}

.cursiva {
  font-family: Bacalisties;
  text-align: center;
  font-size: 35px;
  margin: 30px auto 20px auto;
}

.esp {
  font-family: Bacalisties;
  font-size: 50px;
  margin-top: 5px;
  margin-bottom: 50px;
}

.fecha {
  color: rgb(10, 54, 0);
  font-family: 'Courier New', Courier, monospace;
  font-weight: lighter;
  text-align: center; 
}

.fecha_escrita {
  margin: 20px auto 20px auto;
}

.container {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  text-align: center;
  max-width: 600px;
  margin: 15px auto;
  padding: 10px;
}

.tiempo {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.big {
  font-size: 3rem;
}

.etiqueta {
  font-size: 1rem;
  margin-top: 5px;
}

.contenedor-cartas {
  text-align: center;
}

.card-container,
.card-con,
.card-container1 {
  width: 100%;
  max-width: 630px;
  height: auto;
  margin-top: 20px;
  display: flex;
  text-align: center;
  justify-content: center;
  margin: 0 auto;
}

.card-con-video {
  width: 100%;
  max-width: 630px;
  height: auto;
  display: flex;
  text-align: center;
  justify-content: center;
  margin: 40px auto;
}

.card {
  width: 100%;
  margin: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0px 1px 10px rgba(0, 0, 0, 0.2);
  transition: all 400ms ease;
}

.card2 {
  width: 100%;
  margin: 20px;
  overflow: hidden;
  box-shadow: 0px 1px 10px rgba(0, 0, 0, 0.2);
  cursor: default;
  transition: all 400ms ease;
  background: #ffffff00;
  border: solid rgb(10, 54, 0);
}

.card3 {
  width: 94%;
  max-width: 590px;
  margin: 20px;
  box-shadow: 0px 1px 10px rgba(0, 0, 0, 0.2);
  cursor: default;
  transition: all 400ms ease;
  background: #ffffff00;
  border: solid rgb(10, 54, 0);
  position: static;
}

.card-video {
  width: 94%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0px 1px 10px rgba(0, 0, 0, 0.2);
  transition: all 400ms ease;
}

.card:hover {
  box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.4);
  transform: translateY(-2%);

}

.card2:hover {
  box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.4);
  transform: translateY(-2%);
}

.card3:hover {
  box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.4);
  transform: translateY(-3%);
}

.card-video:hover {
  box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.4);
  transform: translateY(-3%);
  z-index: 1;
}

.card img {
  width: 91%;
  margin-top: 9px;
  margin-bottom: 8px;
}

.card2 img {
  width: 45%;
  margin-top: 7.5px;
  margin-bottom: -15%;
}

.card-video video {
  width: 97%;
  margin-top: 9px;
  margin-bottom: 8px;
}

.card2 .contenido {
  padding: 15px;
  text-align: center;
  color: rgb(10, 54, 0);
}

.card3 .contenido {
  padding: 15px;
  text-align: center;
  color: rgb(10, 54, 0);
}

.card2 .contenido p {
  line-height: 100%;
  font-family: 'Courier New', Courier, monospace;
  font-size: 100%;
  margin-bottom: 15px;
}

.card3 .contenido p {
  line-height: 1.5;
  font-family: 'Courier New', Courier, monospace;
  font-size: 90%;
  margin-bottom: 10px;
}

.card2 .contenido h3 {
  text-align: center;
  font-family: Bacalisties;
  font-size: 250%;
  color: rgb(10, 54, 0);
  margin-top: 10%;
  margin-bottom: 5%;
}

.card3 .contenido h3 {
  text-align: center;
  font-family: Bacalisties;
  font-size: 250%;
  color: rgb(10, 54, 0);
  margin-top: 2%;
  margin-bottom: 5%;
}

/* MEDIA QUERY GENERAL PARA DISPOSITIVOS MÓVILES */
@media screen and (max-width: 768px) {
  .music {
    margin-right: 10px;
  }
  
  .music img {
    width: 70px;
  }

  .music p {
    font-size: 140%;
    margin-top: 5px;
    margin-bottom: 20px;
    margin-right: -1px;
  } 

  .card-container,
  .card-container1,
  .card-con,
  .card-con-video {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 10px auto;
    flex-direction: column !important;
  }

  .card-container1 {
    flex-direction: column-reverse !important;
  }

  .card, .card2, .card3 {
    width: 90% !important;
    max-width: 100%;
    margin: 10px auto !important;
    height: auto !important;
    padding: 10px;
  }

  .card-video {
    width: 90% !important;
    max-width: 100%;
    margin: 10px auto !important;
    height: auto;
    padding: 10px;
  }

  .card-video video {
    width: 100%;
    height: auto;
    
    margin: 0 auto 0 auto;
  }

  .card img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 0 auto;
  }

  .card2 img {
    width: 30%;
    margin-top: 15px;
    margin-bottom: 10px;
  }

  .card2 .contenido {
    padding: 10px 15px;
  }

  .card2 .contenido h3 {
    font-size: 280%;
    margin: 10px 0;
  }

  .card2 .contenido p {
    font-size: 150%;
    line-height: 1.5;
    margin: 5px 15px;
  }

  .card3 {
    position: static !important;
    margin-top: 20px;
  }

  .btn {
    font-size: 120%;
    padding: 6px 18px;
  }

  .invisible {
    margin-top: -20px; /* ajustado para mobile */
    font-size: 1px;     /* más pequeño para evitar que empuje el layout */
    height: 1px;
    line-height: 1px;
  }

  .big {
    margin-top: 20px;
  }

  .name {
    font-size: 490%;
  }

  .cursiva{
    font-size: 220%;
    margin: 40px auto 20px auto;
  }

  .fecha_escrita {
    font-size: 150%;
    margin-top: 30px;
  }

  .container {
    flex-wrap: wrap;
  }

  .container span {
    font-size: 100%;
  }

  .boton {
    margin: 10px 0;
  }

  .contenido h3 {
    font-size: 200%;
  }

  .contenido p {
    font-size: 90%;
  }
  .foto1,
  .foto2 {
    max-width: 40%;
  }

  .esp {
    margin-top: 40px;
    margin-bottom: 70px;
  }
}

@media screen and (max-width: 670px) {
  .name {
    font-size: 400%;
  }

  .fecha_escrita {
    font-size: 150%;
  }

  .cursiva {
    font-size: 200%;
  }

  .card2 .contenido p {
    font-size: 100%;
    line-height: 1.5;
    margin: 5px 15px;
  }

}

@media screen and (max-width: 465px) {
  .foto1,
  .foto2 {
    max-width: 60%;
  }
  
  .big {
    font-size: calc(1.8rem + 2.5vw);
    margin-left: 5vw;
    margin-right: 5vw;
  }

  .name {
    font-size: 350%;
  }

  .fecha_escrita {
    font-size: 120%;
  }

  .cursiva {
    font-size: 210%;
  }

  .card2 .contenido p {
    font-size: 100%;
    line-height: 1.5;
    margin: 5px 15px;
  }

}

@media screen and (max-width: 400px) {

  .big {
    font-size: 1.5rem;
  }

  .name {
    font-size: 310%;
  }
 .fecha_escrita {
  font-size: 100%;
 }
 .cursiva {
    font-size: 200%;
  }
}