@charset "utf-8";
/* CSS Document */

/* ================= SLIDER ================= */

.slider {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.slide {
  position: absolute;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 3s;
}

.slide.active {
  opacity: 1;
  position: relative;
}

.slide img {
  width: 100%;
  height: auto;
  display: block;
}

/* ================= HERO IMAGE ================= */

.hero-image {
  width: 100%;
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ================= DESKTOP OVERLAY (UNCHANGED) ================= */

.overlay {
  position: absolute;
  bottom: 120px;
  left: 40px;
  background: rgba(0,0,0,0.4);
  color: white;
  padding: 20px;
  max-width: 60%;
}
@media (max-width: 768px) {

  .slider {
    width: 100%;
    margin-top: 90px;
  }

  /* 🔥 IMPORTANT FIX: give slide a real container size */
  .slide {
    position: absolute;
    width: 100%;
    height: 100%;
  }

  .slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
  }

  /* ================= LARGE CENTERED OVERLAY (FIXED 90% COVER) ================= */

  .overlay {
    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    width: 90%;
    height: 90%;

    background: rgba(0, 0, 0, 0.6);

    padding: 20px;
    box-sizing: border-box;

    text-align: center;
    color: white;

    display: flex;
    flex-direction: column;

    justify-content: center;
    align-items: center;

    overflow-y: auto;

    opacity: 0;
  }

  /* animation trigger from your JS */
  .overlay.show {
    animation: overlaySlideIn 1.2s ease forwards;
  }

  @keyframes overlaySlideIn {
    from {
      opacity: 0;
      transform: translate(-50%, -50%) translateY(40px);
    }
    to {
      opacity: 1;
      transform: translate(-50%, -50%);
    }
  }

  /* ================= TEXT SCALING ================= */

  .overlay h1 {
    font-size: 5vw;
    margin-bottom: 10px;
  }

  .overlay h2 {
    font-size: 4vw;
    margin-bottom: 10px;
  }

  .overlay p {
    font-size: 3.2vw;
  }

}


