.hero-section {
  display: flex; /* ✅ make it a flex parent */
  justify-content: center;
  align-items: center; /* vertically center */
  text-align: center;
  position: relative;
  overflow: hidden;
  height: auto;/*80vh ;/* auto; */
  width: 100%;
  padding: 75px 0 20px 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "text  tablet"
    "btns  tablet";
  align-items: center;
  text-align: center;
  width: 100%;         /* ✅ Ensure it stretches */
  max-width: 1200px;   /* ✅ Cap width */
  margin: 0 auto;      /* ✅ Horizontally center */
  box-sizing: border-box;
  overflow: hidden;
  padding: 0;
  /* background: rgba(0, 255, 0, 0.1); TEMP: visual aid */
}

.hero-text-block {
  grid-area: text;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  max-width: 600px;
  z-index: 2;
  flex-shrink: 1;
  min-width: 120px; /* crucial! allows it to shrink below content size */
}
.hero-text-block img {
  max-width: 100%;
  height: auto;
  flex-shrink: 1;
  min-width: 0;
}

/* .hero-logo img{
  max-width: 120px;
} */
.hero-logo {
  max-width: 100%; /* Restrict the width to 100% of its parent container */
  height: auto; /* Maintain aspect ratio */
  max-height: 200px; /* Adjust this value to control the max height */
  object-fit: contain; /* Ensures the image fits within the container without distortion */
}

/* === Download buttons === */
.hero-buttons {
  grid-area: btns;
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  margin-left: 0.2rem;
  margin-right: 0.2rem;
}

.hero-buttons img {
  flex-shrink: 1;
  max-height: 50px;
  /* height: 50px; */
}

/* === Tablet Image === */
.hero-tablet {
  grid-area: tablet;
  align-self: center;
  max-width: 90%;
  /* height: auto; */
  /* object-fit: contain; */
  flex-shrink: 1; /* ADD THIS to prevent stretching */
  min-width: 120px;
}
.hero-tablet img {
  flex-shrink: 1;
}


/* #region Animations */
/* === Desktop Animations === */
.hero-logo,
.hero-subtitle,
.hero-tablet {
  opacity: 0;
  transform: translateX(0);
  animation-fill-mode: forwards;
}

.hero-logo {
  animation: slideFromLeft 1s ease-out  forwards;
}
.hero-subtitle {
  margin: 0.15rem 0 0;
  display: inline-block;
  color: #ffffff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.25rem;
  /* font-size: clamp(1.05rem, 2.1vw, 1.5rem); */
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.25;
  text-shadow:
    0 0 6px rgba(168, 244, 255, 0.7),
    0 0 14px rgba(93, 222, 255, 0.45);
  animation: slideFromLeft 1s ease-out 0.1s forwards;
}
.hero-buttons a {
  opacity: 0;
  transform: scale(0);
  animation-fill-mode: forwards;
}
.hero-buttons a:first-child {
  animation: popInSpring 1s ease-out 1.2s forwards;
}
.hero-buttons a:last-child {
  animation: popInSpring 1s ease-out 1.5s forwards;
}
.hero-tablet {
  animation: slideFromRight 1.2s ease-out 0.2s forwards;
}



@keyframes slideFromLeft {
  0% {
    opacity: 0;
    transform: translateX(-100vw);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideFromRight {
  0% {
    opacity: 0;
    transform: translateX(100vw);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes popInSpring {
  0% {
    opacity: 0;
    transform: scale(0); /* Start from a smaller size */
  }
  40% {
    opacity: 1;
    transform: scale(1.2); /* Overshoot the scale slightly for the spring effect */
  }
  60% {
    transform: scale(0.9); /* Bounce back a little */
  }
  80% {
    transform: scale(1.05); /* Slight bounce in the opposite direction */
  }
  100% {
    opacity: 1;
    transform: scale(1); /* End at normal size */
  }
}

/* #endregion */




/* === Background === */
.hero-background {
  position: absolute;
  /* top: 0;*/
  /* right: 0; */
  min-width: 100%;
  min-height: 100%;
  /* filter: blur(5px); */
  /* object-fit: cover; */
  object-position: right bottom; /* 👈 This is the key line */
  animation: kenburns 30s linear infinite alternate;
  z-index: 0;
}
@keyframes kenburns {
  0% {
    transform: scale(1.3) translate(28px, 8px);
  }
  100% {
    transform: scale(1) translate(0px, 0px);
  }
}

/* === Responsive DESKTOP === */
/* @media (min-width: 769px) {
  .hero-content {
    flex-direction: row;
    align-items: center;
    text-align: center;
    justify-content: space-between;
    padding: 4rem;
  }
} */

/* Breakpoints (for reference)
   --lg: 991px;
   --md: 767px;
   --sm: 575px;
*/
/* === Responsive TABLET === */

/* === Responsive MOBILE === */
@media (max-width: 767px) {  
  .hero-content {
    justify-content: flex-start;
    flex-direction: column;
  }

  .hero-logo,
  .hero-subtitle {
    max-width: 80%;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons {
    position: static;
    transform: none;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
  }

  /* .hero-buttons img {
    height: 45px;
  } */

  .hero-tablet {
    animation: slideFromBottom 1.2s ease-out 0.2s forwards;
    opacity: 0;
    /* margin-top: 1rem; */
    /* margin-bottom: 1rem; */
  }



  @keyframes slideFromBottom {
    0% {
      opacity: 0;
      transform: translateY(100px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
