/* hero.css */

/* --- základ --- */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 2000 / 500;
  max-height: 30vh;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background-color: #8b8b8b;
  overflow: hidden;
}

.hero picture.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero picture.hero-img source,
.hero picture.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}


.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 1rem;
  margin-top: 90px;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.hero-button {
  display: inline-block;
  background-color: #f39c12;
  color: #fff;
  padding: 12px 24px;
  text-decoration: none;
  font-size: 1rem;
  border-radius: 5px;
  transition: background-color .3s ease;
}

.hero-button:hover {
  background-color: #d35400;
}

/* --- responzívne --- */

/* Tablety */
@media (max-width: 1024px) {
  .hero { max-height: 30vh; }
  .hero h1 { font-size: 2.2rem; }
  .hero p  { font-size: 1.05rem; }
}

/* Mobily */
@media (max-width: 768px) {
  .hero {
    aspect-ratio: auto;
    height: 200px;
  }

  .hero-img {
    object-fit: cover;
    object-position: center;
  }

  .hero-content {
    margin-top: 0px;
    padding: 0 rem;
  }

  .hero h1 { font-size: 1.5rem; }
  .hero p  { font-size: 1rem; }
  .hero-button {
    max-width: 80%;
    text-align: center;
  }
}
