.welcome-section {
  background-color: #111;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 90vh;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.welcome-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  width: 100%;
}

.left-container {
  text-align: left;
  opacity: 0;
  /* Start hidden */
  transform: translateX(-50px);
  /* Shifted left */
  animation: slideInLeft 0.8s ease-out forwards;
  animation-delay: 0.2s;
  /* Optional delay */
}

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.left-container button {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 2px;
  background-color: transparent;
  border: none;
  border-radius: 5px;
  position: relative;
  color: var(--color-classic-orange);
}

.left-container button i {
  padding-left: 8px;
}

.left-container button:hover {
  color: var(--color-dark-orange);
  transition: 0.4s;
  cursor: pointer;
}

.intro {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 20px;
  color: rgb(177, 177, 177);
}

.intro span {
  color: var(--color-pastel-orange);
}

.left-container h2 {
  font-size: 40px;
  color: #fff;
}

.left-container p {
  font-size: 16px;
  line-height: 1.6;
  margin: 30px 0px;
  color: rgb(143, 143, 143);
}

.social-media {
  display: flex;
  align-self: start;
  gap: 19px;
  margin: 10px 0px;
}

.social-media i {
  will-change: filter, transform;
  font-size: 26px;
  color: var(--color-pastel-orange);
  animation: pulse 3s ease-in-out infinite;
}

.social-media i:hover {
  color: var(--color-bronze-orange);
  cursor: pointer;
}

.buttons {
  display: flex;
  justify-content: start;
  gap: 20px;
  margin: 40px 1px;
}

.right-container {
  text-align: center;
}

.right-container video {
  max-width: 100%;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.right-container .video-wrapper {
  text-align: center;
}

.right-container .title {
  margin-bottom: 12px;
  font-size: 18px;
  color: #ccc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media screen and (min-width:768px) {
  .scroll-stage {
    display: grid;
    place-items: center;
    width: 100%;
    padding: 20px;
    position: relative;
    /* For overlaps */
  }

  .title {
    grid-column: 1 / -1;
    /* Span full width */
    text-align: center;
    margin-bottom: 10px;
  }

  .image-container {
    margin-top: 50px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2-column grid */
    gap: 10px;
    width: 90%;
    max-width: 800px;
  }

  .image-container img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: fill;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    position: relative;
    cursor: pointer;
  }

  /* Add overlaps for interest */
  .image-container img:nth-child(2) {
    margin-top: -20%;
    /* Overlap the first */
    z-index: 1;
  }

  .image-container img:nth-child(3) {
    grid-column: 2;
    /* Position in second column */
    margin-top: -10%;
    z-index: 2;
  }

  .image-container img:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(255, 127, 80, 0.3);
  }

  .modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    /* Dark overlay */
    justify-content: center;
    align-items: center;
  }

  .modal-content {
    max-width: 90%;
    max-height: 80%;
    margin: auto;
    display: block;
    border-radius: 8px;
  }

  .close,
  .prev,
  .next {
    position: absolute;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
  }
  .close{
    top: 15px;
    right: 35px;
  }
  .prev,
  .next {
    top: 50%;
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.3s ease;
    user-select: none;
  }

  .prev {
    left: 0;
    right: auto;
  }

  .next {
    right: 0;
    left: auto;
  }

  .caption {
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    position: absolute;
    bottom: 20px;
    width: auto;
    text-align: center;

    background: linear-gradient(135deg, rgba(255, 180, 120, 0.1), rgba(255, 100, 150, 0.1), rgba(120, 130, 255, 0.1));
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 99999px;

    /* Smooth fade-in */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }

  /* Show caption when modal image is active */
  .modal-content:hover + .caption,
  .caption.show {
    opacity: 1;
    transform: translateY(0);
  }
}

@media screen and (max-width:768px) {
  .modal {
    display: none;
  }

  .scroll-stage {
    --peek: 25vh;
    --gap: 2vh;
    --radius: 5px;
    --maxw: 90vw;

    width: 100%;
    padding-block: 40px;
  }

  .image-container img {
    position: sticky;
    top: calc(50vh - (min(var(--maxw), 90vw) / (16 / 9) / 2));
    width: min(var(--maxw), 90vw);
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    margin-bottom: var(--gap);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
    border: 2px solid transparent;
  }

  .image-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Stacking order */
  .image-container img:nth-child(n) {
    z-index: n;
  }

  /* Last one leaves a slice of previous visible */
  .image-container img:last-child {
    margin-bottom: 1vh;
  }

  .image-container img+img {
    margin-top: calc(30vh - (min(var(--maxw), 90vw) / (16 / 9) / 2) + var(--peek));
    filter: brightness(1.05) saturate(1.1);
    box-shadow: 0 15px 35px rgba(255, 127, 80, 0.3);
    transition: all 0.4s ease;
  }

  .image-container img+img+img {
    margin-top: calc(20vh - (min(var(--maxw), 90vw) / (16 / 9) / 2) + var(--peek) * 2);
    filter: brightness(1.03) saturate(1.05);
    box-shadow: 0 15px 30px rgba(255, 127, 80, 0.2);
    transition: all 0.4s ease;
  }

  .image-container img:first-child {
    filter: brightness(1.05) saturate(1.1);
    box-shadow: 0 15px 35px rgba(255, 127, 80, 0.3);
    transition: all 0.4s ease;
    top: calc(47.5vh - (min(var(--maxw), 90vw) / (16 / 9) / 2));
  }
}

.profile img {
  width: 380px;
  padding-bottom: 50px;
}

.features {
  position: relative;
}

.features div {
  position: absolute;
  z-index: 9999;
  display: flex;
  justify-content: center;
  user-select: none;
  align-items: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.features i {
  font-size: 30px;
  margin-right: 5px;
}

.fa-fade {
  animation-name: fade;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
}

.features .first {
  top: -140px;
  right: 80%;
  color: #66309a;
}

.features .first i {
  animation-duration: 4s;
}

.features .second {
  top: -120px;
  right: 10%;
  color: #f7e025;
}

.features .second i {
  animation-duration: 3s;
}

.features .third {
  top: -300px;
  right: 85%;
  color: #f0652c;
}

.features .third i {
  animation-duration: 7s;
}

.features .fourth {
  top: -350px;
  right: 80px;
  color: #3e863d;
}

.features .fourth i {
  animation-duration: 4s;
}

.features .fifth {
  top: -450px;
  right: 70%;
  color: #c1132d;
}

.features .fifth i {
  animation-duration: 6s;
}

.features .sixth {
  top: 0px;
  right: 30%;
  color: #b1b1b1;
}

.features .sixth i {
  animation-duration: 8s;
}

.features .seventh {
  top: -30px;
  right: 55%;
  color: #00558b;
}

.features .seventh i {
  animation-duration: 5s;
}

.features .eighth {
  top: -480px;
  right: 45%;
  color: #c6c6c6;
}

.features .eighth i {
  animation-duration: 9s;
}

@keyframes fade {

  0%,
  100% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    filter: brightness(1) saturate(1) hue-rotate(0deg);
  }

  50% {
    transform: scale(1.15);
    filter: brightness(1.1) saturate(3) hue-rotate(-20deg);
  }
}

@media screen and (max-width:1080px) {
  .welcome-container {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .profile img {
    width: 300px;
  }

  .left-container h2 {
    font-size: 30px;
  }

  .features div {
    display: none;
  }
}

@media screen and (max-width:768px) {
  .profile img {
    width: 200px;
  }

  .intro {
    margin-bottom: 10px;
  }

  .left-container h2 {
    font-size: 25px;
  }

  .left-container p {
    font-size: 14px;
  }

  .flip-card {
    width: 250px;
    height: 450px;
  }
}

@media screen and (max-width: 480px) {
  .welcome-section {
    height: auto;
    padding: 3rem 1rem;
  }

  .buttons {
    display: none;
  }

  .flip-card {
    width: 200px;
    height: 400px;
  }
}