/* Updated CSS for Larger Envelope and Letter */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap");

* {
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 150vh;
  background: #05353d;
}
.proposal-button{
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #25d6a1;
  color: #fff;
  padding: 10px 20px;
  border: none;
  font-size: 20px;
  cursor: pointer;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s ease-in-out;
}
.proposal-button a{
  text-decoration: none;
  color: #6b3232;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.title {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, 80%);
  text-align: center;
  color: #fff;
  font-size: 40px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.title {
  position: relative; /* Ensures z-index works properly */
}

.title span {
  color: #25d6a1;
  font-size: 100px;
}

.image-container {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.hover-text {
  font-size: 24px;
  cursor: pointer;
  font-weight: bold;
  color: blue;
  text-decoration: underline;
}

/* The Popup Image */
.popup-image {
  position: fixed; /* Ensures it stays on top */
  top: -70%; /* Moves it to the top */
  left: 50%;
  transform: translateX(-50%);
  width: 450px;
  border: 2px solid #3c3737;
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.3);
  z-index: 99999; /* Ensures it is above everything */
  opacity: 0; /* Initially hidden */
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

/* Show image when hovering over the container */
.image-container:hover .popup-image {
  opacity: 1;
  visibility: visible;
}

/* Wrapper for the letter animation */
.wrapper {
  position: absolute;
  top: 90%;
  left: 50%;
  transform: translateX(-50%);
  bottom: 4%;
  background: #f5edd1;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
}

.wrapper .envelope {
  position: relative;
  width: 900px; /* Increased width */
  height: 337px; /* Increased height */
}

.wrapper .envelope::before {
  position: absolute;
  content: "";
  z-index: 4;
  top: 0;
  border-top: 200px solid #25d6a1;
  border-right: 450px solid transparent;
  border-left: 450px solid transparent;
  transform-origin: top;
  transition: all 0.5s ease-in-out 0.7s;
}

.wrapper.open .envelope:before {
  transform: rotateX(180deg);
  z-index: 0;
}

.wrapper .envelope::after {
  position: absolute;
  content: "";
  z-index: 4;
  border-top: 170px solid transparent;
  border-right: 450px solid #f4d5a0;
  border-bottom: 168px solid #ffdda2;
  border-left: 450px solid #f7d8a2;
}

.envelope .letter {
  position: absolute;
  width: 70%;
  height: 80%;
  background: #ffffff;
  padding: 30px 20px;
  right: 15%;
  bottom: 0;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  transition: all 1s ease-in-out;
  z-index: 2;
  font-size: 8.4px;
  line-height: 1.5;
}

.wrapper.open .envelope .letter {
  bottom: 200px;
  transform: scale(1.3);
  transition-delay: 1s;
}

.heart {
  position: absolute;
  width: 80px;
  height: 80px;
  background: red;
  top: 50%;
  left: 50%;
  z-index: 5;
  transform: translate(-85%, -60%) rotate(45deg);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.5s ease-in-out 1s;
  transform-origin: bottom;
}

.wrapper.open .heart {
  transform: translate(-20%, -40%) rotate(230deg);
  transition-delay: 0.4s;
}

.heart:before,
.heart:after {
  position: absolute;
  content: "";
  width: 80px;
  height: 80px;
  background-color: red;
  border-radius: 50%;
}

.heart:before {
  top: -40px;
}

.heart:after {
  right: 40px;
}

.float-text {
  position: absolute;
  left: 50%;
  transform: translateX(-51%) scale(0);
  top: -10px;
  display: flex;
  align-items: center;
  gap: 30px;
  z-index: 1;
  transition: all 1s ease-in-out;
}

.wrapper.open .float-text {
  transform: translateX(-51%) scale(0.5);
  top: -350px;
  transition-delay: 1s;
}

.float-text .big-heart {
  position: relative;
  width: 90px;
  height: 80px;
  background: red;
  transform: rotate(-45deg);
  box-shadow: -10px 10px 50px red;
  animation: anim 0.5s linear infinite;
}

.float-text .big-heart::before,
.float-text .big-heart::after {
  position: absolute;
  content: "";
  height: 80px;
  width: 80px;
  background: red;
  border-radius: 50%;
}

.float-text .big-heart::before {
  top: -50%;
}

.float-text .big-heart::after {
  right: -50%;
}

@keyframes anim {
  0%,
  100% {
    transform: scale(1) rotate(-45deg);
  }
  60% {
    transform: scale(0.9) rotate(-45deg);
  }
}

.float-text span {
  min-width: 60px;
  margin-left: 20px;
  color: red;
  font-size: 180px;
  font-weight: 600;
}
