* {
  margin: 0;
}

.hero-video-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.hero-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  /* Ensure the video is behind the overlay content */
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

/* Overlay content container */
.hero-overlay {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  color: white;
  padding: 0 2rem;
  width: 1080px;
}

/* Title and subtitle styles */
.hero-title {
  font-family: 'Figtree', sans-serif;
  font-size: 1.3rem;
  font-weight: 300;
  /* text-transform: uppercase; */
  margin-bottom: 2rem;
  color: #D8BFAA;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-family: 'PlayfairDisplay', serif;
  font-size: 5rem;
  font-weight: 400;
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.hero-image,
.hero-subtitle {
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}

.hero-image.fade-out,
.hero-subtitle.fade-out {
  opacity: 0;
}

.animate-on-scroll-btn {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll-btn.visible {
  opacity: 1;
}

/* Button animation */

.hero-button {
  position: relative;
  display: inline-block;
  padding: 1rem 2rem;
  margin-top: 2rem;
  background: transparent;
  color: #D8BFAA;
  font-size: 16px;
  font-family: 'Figtree', sans-serif;
  font-weight: 400;
  text-decoration: none;
  overflow: hidden;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.hero-button .button-text {
  position: relative;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.4s ease 1.6s;
}

/* Top border */
.hero-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background-color: #D8BFAA;
  transition: width 0.4s ease;
  opacity: 0;
  z-index: 1;
}

/* Right border */
.hero-button::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 2px;
  height: 0%;
  background-color: #D8BFAA;
  transition: height 0.4s ease;
  opacity: 0;
  z-index: 1;
}

/* Bottom border */
.hero-button .bottom-line {
  position: absolute;
  bottom: 0;
  right: 0;
  height: 2px;
  width: 0%;
  background-color: #D8BFAA;
  transition: width 0.4s ease;
  opacity: 0;
  z-index: 1;
}

/* Left border */
.hero-button .left-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 2px;
  height: 0%;
  background-color: #D8BFAA;
  transition: height 0.4s ease;
  opacity: 0;
  z-index: 1;
}

/* Animate on scroll trigger */
.hero-button.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animate each border in order (snake-like) */
.hero-button.visible::before {
  width: 100%;
  opacity: 1;
  transition-delay: 0.4s;
}

.hero-button.visible::after {
  height: 100%;
  opacity: 1;
  transition-delay: 0.8s;
}

.hero-button.visible .bottom-line {
  width: 100%;
  opacity: 1;
  transition-delay: 1.2s;
}

.hero-button.visible .left-line {
  height: 100%;
  opacity: 1;
  transition-delay: 1.6s;
}

.hero-button.visible .button-text {
  opacity: 1;
}

.hero-button:hover {
  background-color: #D8BFAA;
  color: #1F3B73;
}

/* Tablets: Medium screens */
@media (max-width: 1024px) {
  .hero-overlay {
    width: 90%;
    top: 35%;
    padding: 0 1.5rem;
  }

  .hero-subtitle {
    font-size: 3.5rem;
  }

  .hero-title {
    font-size: 1.1rem;
  }
}

/* Mobile: Small screens */
@media (max-width: 768px) {
  .hero-overlay {
    top: 40%;
    width: 90%;
    padding: 0 1rem;
  }

  .hero-bg-video,
  .hero-image {
    object-position: center;
  }
}

/* Extra Small Devices (Phones) */
@media (max-width: 480px) {
  .hero-overlay {
    top: 40%;
    padding: 0 1rem;
  }

  .hero-subtitle {
    font-size: 2.2rem;
  }

  .hero-title {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .mobile-break {
    display: block;
  }
}