body, html {
  margin: 0;
  padding: 0;
  font-family: 'Libre Baskerville', serif;
  overflow-x: hidden;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.hero h1 {
  position: relative;
  color: white;
  font-size: 2em;
  text-transform: uppercase;
  font-style: italic;
  opacity: 1;
  animation: textFade 3s ease forwards;
  z-index: 3;
}
.hero-link {
  position: absolute;
  bottom: 42%; /* adjust how close it sits under the title */
  text-align: center;
  width: 100%;
  opacity: 0;
  animation: fadeInLink 5s ease 3s forwards; /* fades in after the main text */
  z-index: 4;
}

.hero-link a {
  color: black;
  text-decoration: none;
  font-style: italic;
  font-size: 1.2em;
  transition: color 0.3s ease;
}

.hero-link a:hover {
  color: white; /* matches when background fades */
}

.background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-color: white;
  background-position: center;
  opacity: 0;
  animation-fill-mode: forwards;
}

.back1 {
  background-image: url('images/stars.webp');
  opacity: 1;
  animation: fadeOut 5s ease forwards;
  z-index: 1;
}

.back2 {
  background-image: url('images/prazno.png');
  opacity: 0;
  animation: fadeIn 5s ease 4s forwards; /* starts 4s later */
  z-index: 2;
}

/* --- Animations --- */
@keyframes fadeOut {
  0% { opacity: 1; }
  55% { opacity: 1;transform: scale(1.05) } /* stay visible for a while */
  100% { opacity: 0; }
}

@keyframes fadeIn {
  0% { opacity: 0; }
  1% { opacity: 0; transform: scale(1.20) } /*follows the fade of stars*/
  100% { opacity: 1; }
}

@keyframes textFade {
  0% { opacity: 0; transform: translateY(50px); color: white; }
  50% { opacity: 1; transform: translateY(0); color: white; }
  80% { opacity: 1; transform: translateY(0); color: white; }
  100% { opacity: 1; transform: translateY(0); color: black; }
}

/* fade-in for the link text */
@keyframes fadeInLink {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* --- Gallery Section --- */
.gallery {
  padding: 60px 0;
  background-color: #fff;
  overflow: hidden;
}

.slider {
  display: flex;
  gap: 30px;
  animation: scrollLoop 20s linear infinite;
  width: max-content;
}

.slider a {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  border-radius: 12px;
  background: linear-gradient(135deg, #dcdcdc, #f5f5f5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-style: italic;
  text-decoration: none;
  font-size: 1em;
  transition: transform 0.3s ease;
}

.slider a:hover {
  transform: scale(1.1);
}

@keyframes scrollLoop {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
