/* --- ESTILOS GENERALES --- */
body {
  font-family: "Montserrat", sans-serif;
  background-color: #fdeef4;
  color: #a08291;
  margin: 0;
  padding: 40px 20px;
  box-sizing: border-box;
  overflow-x: hidden;
  min-height: 100vh;
}

/* --- SOBRE INICIAL --- */
#envelope-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  
  background-color: #f7dbe9;
  transition: visibility 1s;
}
#envelope-overlay.opened {
  background-color: transparent;
  display: none;
}
.envelope-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 500px;
  
  height: 357px;
  
  /* background-color: #fff0f5; */
  background-image: url('img/sobre.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  
  
  border-radius: 9px;
  margin-left: 5%;
  margin-right: 5%;
}

@media(min-width:767px){
  .envelope-body {
  margin-top: 10%;
}
}
.envelope-flap {
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  background-color: transparent;
  /*transition: transform 1s ease-in-out, opacity 1s ease-in-out;*/
  opacity: 1;
}
/* .envelope-flap.top {
  border-width: 0 190px 150px 190px;
  border-color: transparent transparent #fae1ed transparent;
  top: 80%;
  left: 50%;
  transform: translate(-50%, -150px);
  z-index: 1;
} */
.envelope-flap.bottom {
  border-width: 193px 170px 0 170px;
  border-color: #fae1ed transparent transparent transparent;
  bottom: 88.9%;
  left: 50%;
  transform: translate(-50%, 150px);
  z-index: 1;
  width: 10%;
  max-width: 10%;
}

@media(min-width: 767px){
  .envelope-flap.bottom {
  width: 30%;
  max-width: 30%;
}
}

#open-invitation-btn{
  
  z-index: 101;
  padding: 15px 30px;
  font-size: 1rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  background-color: #e5a9c0;
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(229, 169, 192, 0.5);
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}


#open-invitation-btn:hover {
  transform: scale(1.05);
}
#envelope-overlay.opened .envelope-flap.top {
  transform: translate(-50%, -150px) translateY(-100vh);
  opacity: 0;
}
#envelope-overlay.opened .envelope-flap.bottom {
  transform: translate(-50%, 150px) translateY(100vh);
  opacity: 0;
}
#envelope-overlay.opened .envelope-body,
#envelope-overlay.opened #open-invitation-btn {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}
#envelope-overlay.hidden {
  visibility: hidden;
}

/* --- CONTENEDOR DE LA INVITACIÓN --- */
.invitation-container {
  max-width: 500px;
  margin: 0 auto;
  background: white;
  background-image: url("img/fondo.png");
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
  position: relative;
  z-index: 1;
  opacity: 0; /* Control inicial de visibilidad */
  transition: opacity 0.5s ease-in-out; /* Transición suave */
}
.invitation-container.visible {
  opacity: 1; /* Clase para hacerlo visible */
}

/* --- DECORACIONES Y PERSONAJES --- */
.deco-img {
  position: absolute;
  z-index: -1;
}
.cloud.c1 {
  top: -3%;
  left: -50px;
  width: 200px;
  z-index: -1;
}
.cloud.c2 {
  top: 6%;
  right: -40px;
  width: 200px;
}
.cloud.c3 {
  top: 60%;
  left: -90px;
  width: 196px;
}
.cloud.c4 {
  top: 60%;
  right: -40px;
  width: 160px;
}
.star.s1 {
  top: 7%;
  left: 112px;
  width: 70px;
  z-index: 2;
}
.star.s2 {
  top: 7%;
  right: 42px;
  width: 75px;
  z-index: 2;
}
.star.s3 {
  top: 82%;
  left: 78px;
  width: 65px;
}
.star.s4 {
  top: 82%;
  right: 17px;
  width: 103px;
}


.serpentina.se1{
    top: -12%;
    left:-25px;
    width: 166px;
    z-index: -2;
}

@media(min-width: 480px){
  .serpentina.se1{
    width: 210px;
  }
}

.serpentina.se2{
    top: -12%;
    right: -25px;
    width: 166px;
    transform: rotateY(180deg);
    z-index: -2;
}

@media(min-width: 480px){
  .serpentina.se2{
    
    right: -40px;
    
  }
}

.decoracion-inferior{
    position: absolute;
    z-index: -1;
}

.main-elephant {
  width: 360px;
  margin-top: -20px;
  margin-left: -25px;
}

@media(min-width:480px){
  .main-elephant {
    margin-left: 0;
  }
}
.side-char {
  position: absolute;
  bottom: 0;
  width: 120px;
}
.bear {
  width: 300px;
  left: -155px;
  bottom: -100px;
}
@media(min-width: 480px){
  .bear {
    bottom: -45px;
  }
}

.elephant {
  width: 230px;
  left: 6rem;
  bottom: -108px;
  z-index: -1;
}
@media(min-width: 480px){
  .elephant {
    width: 230px;
    left: 9rem;
    bottom: -90px;
    z-index: -1;
  }
}

@media(min-width: 767px){
  .elephant {
  width: 230px;
  left: 22rem;
  bottom: -90px;
  z-index: -1;
}

}
.pacifier {
  width: 60px;
  margin: 5px 0;
}

/* --- TEXTOS --- */
.guest-name {
  font-family: "Dancing Script", cursive;
  font-size: 3.5rem;
  color: #e5a9c0;
  margin: -20px 0 0 0;
}
.event-title {
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 2px;
  margin: 0 0 15px 0;
  font-family: "Bree Serif", serif;
  color: #E88A87;
}
.intro-text {
  font-size: 1rem;
  line-height: 1.6;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  color: #9F7654;
  margin: 5px auto;
}
.intro-text:first-of-type {
  text-transform: uppercase;
  margin-bottom: 20px;
}

.intro-text.cita{
  font-style: italic;
  text-transform: capitalize;
  font-weight: 400;
  color: #505050;
  font-family: "Playfair Display", serif;
  margin: 0px 70px 0px 70px;
  font-size: 1rem;
}
.closing-text {
  font-size: 2.5rem;
  font-weight: 700;
  color: #e5a9c0;
  margin: 45px 0 25px 0;
  font-family: "Dancing Script", cursive;
}
.divider {
  border-top: 1px solid #9F7654;
  margin: 20px auto;
  width: 80%;
}


/* --- DETALLES DEL EVENTO --- */
.event-details {
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 500;
  font-size: 0.8rem;
  margin: 35px 0 ;
}

@media(min-width: 480px){
    .event-details {
    font-size: 1.2rem;
  }
}

@media(min-width: 767px){
    .event-details {
    justify-content: space-evenly;
  }
}

.detail-item{
    border-top: 2px solid #9F7654;
    border-bottom: 2px solid #9F7654;
    padding: 10px 0px;
    font-family: "Nunito", sans-serif;
    color: #545454;
}

.event-details .date {
  border-top: none;
  border-bottom: none;
  padding: 0 30px;
  font-family: "Playfair", serif;
  
}

.event-details .day {
  font-size: 4rem;
  font-weight: 700;
  color: #545454;
  margin: 0;
  line-height: 1;
}

@media(min-width: 480px){
  .event-details .day {
    font-size: 4.5rem;
  }
}

.event-details .month {
  margin: 0;
  font-size: 1.1rem;
}

@media(min-width: 480px){
  .event-details .month {
    font-size: 1.3rem;
  }
}

/* --- PAPÁS Y UBICACIÓN --- */
.parents-location {
  display: flex;
  justify-content: space-around;
  align-items: start;
}
/* .parents-location {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  gap: 10px
}  */
.info-section {

  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  
}

.info-section:last-child {

  width: 160px;
  margin-left: 10px;
}
.info-section h3 {
  margin: 0 0 5px 0;
  font-size: 1rem;
}
.info-section p {
  margin: 0;
  font-size: 0.95rem;
}

/* --- BOTONES --- */
.action-buttons {
  margin: 25px 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}
.button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(45deg, #f7c5d8, #e5a9c0);
    color: white;
    padding: 19px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    width: 80%;
    font-size: 1.2rem;
}
.button:hover {
  transform: scale(1.03);
  transition: transform 0.2s;
}

.action-buttons a.button{
  flex-direction: row-reverse;
  
}

a.button svg{
  width: 32px;
}

/* --- ANIMACIONES --- */
.anim-on-load {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.anim-on-load.visible {
  opacity: 1;
  transform: translateY(0);
}
.anim-loop-float {
  animation: float 4s infinite alternate ease-in-out;
}
.anim-loop-circle {
  animation: circle 15s infinite linear;
}
.anim-loop-circle-2 {
  animation: circle 20s infinite linear;
}
.anim-loop-rotate {
  animation: rotate 5s infinite alternate ease-in-out;
}
.side-char.elephant {
  animation-delay: 0.8s;
}

@keyframes float {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-15px);
  }
}
@keyframes circle {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(5px, 5px) rotate(5deg);
  }
  50% {
    transform: translate(0, 10px) rotate(0deg);
  }
  75% {
    transform: translate(-5px, 5px) rotate(-5deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}
@keyframes rotate {
  from {
    transform: rotate(-8deg);
  }
  to {
    transform: rotate(8deg);
  }
}
