/* public/css/components/hero.css */

.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero-image {
  position: relative;
  width: 100%;
  padding-bottom: 50%;
  overflow: hidden;
}

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

/* 整張 hero 圖可點擊（overlay 設 pointer-events:none 讓點擊穿透到此連結） */
.hero-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  /* background: rgba(0, 0, 0, 0.3); */
}

.hero-content {
  text-align: center;
  color: white;
  z-index: 10;
  padding: 20px;
  margin-bottom: 50px;
  pointer-events: auto;
}

.hero-subtitle {
  font-family: "Lora", serif;
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.76);
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
  animation: hero-fadeInUp 1s ease-out 0.3s both;
}

.hero-button {
  display: inline-block;
  padding: 15px 40px;
  font-size: 16px;
  color: white;
  background: transparent;
  border: 1px solid white;
  text-decoration: none;
  transition: all 0.3s ease;
  animation: hero-fadeInUp 1s ease-out 0.3s both;
}

.hero-button:hover,
.hero-button:focus {
  background: rgba(255, 255, 255, 0.76);
  color: #333;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

@keyframes hero-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Laptop: 769px - 1024px */
@media (max-width: 1024px) {
  .hero-image {
    padding-bottom: 45%;
  }

  .hero-content {
    margin-bottom: 45px;
  }

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

  .hero-button {
    padding: 14px 36px;
    font-size: 15px;
  }
}

/* Tablet: 481px - 768px */
@media (max-width: 768px) {
  .hero-image {
    padding-bottom: 50%;
  }

  .hero-content {
    margin-bottom: 40px;
  }

  .hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 18px;
  }

  .hero-button {
    padding: 12px 30px;
    font-size: 14px;
  }
}

/* Mobile: 480px 以下 */
@media (max-width: 480px) {
  .hero-image {
    padding-bottom: 52%;
  }

  /* 手機版不顯示文案，整張圖經由 .hero-link 可點 */
  .hero-content {
    display: none;
  }
}
