/*
|--------------------------------------------------------------------------
| HOMEPAGE
|--------------------------------------------------------------------------
|
| Styling khusus halaman Homepage Website Kampus Madinah Salam.
|
*/

/*
|--------------------------------------------------------------------------
| HERO
|--------------------------------------------------------------------------
*/

/*
|--------------------------------------------------------------------------
| HERO - 16:9
|--------------------------------------------------------------------------
*/

.home-hero {
  position: relative;

  width: 100%;
  aspect-ratio: 16 / 9;

  min-height: 0;

  overflow: hidden;

  display: flex;
  align-items: center;

  isolation: isolate;

  background: #073d2d;
}

/*
|--------------------------------------------------------------------------
| CAROUSEL ITEM
|--------------------------------------------------------------------------
*/

.home-hero .carousel-item {
  position: relative;

  min-height: 720px;

  overflow: hidden;
}

/*
|--------------------------------------------------------------------------
| BACKGROUND IMAGE
|--------------------------------------------------------------------------
*/

.home-hero-image {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;

  object-position: center;
}

/*
|--------------------------------------------------------------------------
| OVERLAY
|--------------------------------------------------------------------------
*/

.home-hero-overlay {
  position: absolute;

  inset: 0;

  z-index: 1;

  background: linear-gradient(
    90deg,
    rgba(5, 43, 27, 0.96) 0%,
    rgba(8, 64, 40, 0.88) 36%,
    rgba(10, 67, 43, 0.58) 62%,
    rgba(5, 35, 23, 0.25) 100%
  );
}

/*
|--------------------------------------------------------------------------
| CONTENT CONTAINER
|--------------------------------------------------------------------------
*/

.home-hero .container {
  position: relative;

  z-index: 2;
}

.home-hero-content {
  min-height: 720px;

  max-width: 760px;

  display: flex;
  flex-direction: column;
  justify-content: center;

  padding-top: 110px;
  padding-bottom: 110px;

  color: #ffffff;
}

/*
|--------------------------------------------------------------------------
| BADGE
|--------------------------------------------------------------------------
*/

.home-hero-badge {
  width: fit-content;

  display: inline-flex;
  align-items: center;

  padding: 8px 14px;

  color: #ffffff;

  background: rgba(255, 255, 255, 0.14);

  border: 1px solid rgba(255, 255, 255, 0.22);

  border-radius: 999px;

  backdrop-filter: blur(8px);

  font-size: 0.82rem;
  font-weight: 600;

  letter-spacing: 0.02em;
}

/*
|--------------------------------------------------------------------------
| TITLE
|--------------------------------------------------------------------------
*/

.home-hero-title {
  max-width: 850px;

  margin-bottom: 18px;

  color: #ffffff;

  font-size: clamp(2.4rem, 5vw, 4.7rem);

  font-weight: 800;

  line-height: 1.08;

  letter-spacing: -0.035em;

  text-wrap: balance;
}

/*
|--------------------------------------------------------------------------
| META
|--------------------------------------------------------------------------
*/

.home-hero-meta {
  display: flex;
  align-items: center;

  margin-bottom: 16px;

  color: rgba(255, 255, 255, 0.78);

  font-size: 0.9rem;
}

/*
|--------------------------------------------------------------------------
| EXCERPT
|--------------------------------------------------------------------------
*/

.home-hero-excerpt {
  max-width: 650px;

  margin-bottom: 0;

  color: rgba(255, 255, 255, 0.86);

  font-size: 1.08rem;

  line-height: 1.8;
}

/*
|--------------------------------------------------------------------------
| BUTTON
|--------------------------------------------------------------------------
*/

.home-hero-button {
  min-height: 48px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding-left: 22px;
  padding-right: 22px;

  border-radius: 10px;

  font-size: 0.95rem;

  font-weight: 600;
}

.home-hero .btn-light {
  color: #12583a;
}

.home-hero .btn-light:hover {
  color: #0d4a31;

  background: #f1f6f3;
}

/*
|--------------------------------------------------------------------------
| INDICATORS
|--------------------------------------------------------------------------
*/

.home-hero .carousel-indicators {
  z-index: 4;

  justify-content: flex-start;

  max-width: 1320px;

  margin-right: auto;
  margin-bottom: 38px;
  margin-left: auto;

  padding-right: 12px;
  padding-left: 12px;
}

.home-hero .carousel-indicators button {
  width: 28px;
  height: 4px;

  margin-right: 5px;
  margin-left: 0;

  background-color: #ffffff;

  border: 0;

  border-radius: 999px;
}

/*
|--------------------------------------------------------------------------
| CAROUSEL NAVIGATION
|--------------------------------------------------------------------------
*/

.home-hero .carousel-control-prev,
.home-hero .carousel-control-next {
  z-index: 3;

  width: 7%;
}

.home-hero .carousel-control-prev-icon,
.home-hero .carousel-control-next-icon {
  width: 42px;
  height: 42px;

  padding: 12px;

  background-size: 45%;

  background-color: rgba(0, 0, 0, 0.24);

  border: 1px solid rgba(255, 255, 255, 0.25);

  border-radius: 50%;

  backdrop-filter: blur(8px);
}

/*
|--------------------------------------------------------------------------
| FALLBACK HERO
|--------------------------------------------------------------------------
*/

.home-hero-fallback {
  position: relative;

  overflow: hidden;

  background:
    radial-gradient(
      circle at 85% 20%,
      rgba(67, 154, 106, 0.38),
      transparent 34%
    ),
    linear-gradient(135deg, #073b27, #12633f);
}

.home-hero-fallback::after {
  content: "";

  position: absolute;

  top: -180px;
  right: -150px;

  width: 550px;
  height: 550px;

  border: 1px solid rgba(255, 255, 255, 0.08);

  border-radius: 50%;
}

/*
|--------------------------------------------------------------------------
| ARABIC / RTL
|--------------------------------------------------------------------------
*/

.home-hero [dir="rtl"] {
  text-align: right;

  line-height: 2;
}

/*
|--------------------------------------------------------------------------
| RESPONSIVE
|--------------------------------------------------------------------------
*/

@media (max-width: 991.98px) {
  .home-hero .carousel-item,
  .home-hero-content {
    min-height: 650px;
  }

  .home-hero-content {
    max-width: 680px;

    padding-top: 120px;
    padding-bottom: 90px;
  }

  .home-hero-overlay {
    background: linear-gradient(
      90deg,
      rgba(5, 43, 27, 0.94) 0%,
      rgba(7, 56, 36, 0.82) 60%,
      rgba(5, 35, 23, 0.45) 100%
    );
  }

  .home-hero .carousel-control-prev,
  .home-hero .carousel-control-next {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .home-hero .carousel-item,
  .home-hero-content {
    min-height: 620px;
  }

  .home-hero-content {
    padding-top: 125px;
    padding-bottom: 90px;
  }

  .home-hero-overlay {
    background: linear-gradient(
      0deg,
      rgba(5, 43, 27, 0.96) 0%,
      rgba(5, 43, 27, 0.78) 65%,
      rgba(5, 43, 27, 0.55) 100%
    );
  }

  .home-hero-title {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .home-hero-excerpt {
    font-size: 0.98rem;

    line-height: 1.7;
  }

  .home-hero-button {
    width: 100%;
  }

  .home-hero .carousel-indicators {
    margin-bottom: 25px;
  }
}

/*
|--------------------------------------------------------------------------
| HERO OVERRIDES - KOMPATIBILITAS HERO DINAMIS
|--------------------------------------------------------------------------
| Hero homepage saat ini menggunakan struktur home-hero-container dan
| home-hero-content. Aturan lama berbasis carousel/rasio 16:9 dapat
| membatasi tinggi Hero dan menyebabkan konten terpotong di layar kecil.
*/

.home-hero {
  aspect-ratio: auto;
  height: auto;
  min-height: 620px;
  overflow: hidden;
}

.home-hero .carousel-item {
  min-height: 0;
}

.home-hero-content {
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

@media (max-width: 991.98px) {
  .home-hero {
    aspect-ratio: auto;
    height: auto;
    min-height: 0;
  }

  .home-hero .carousel-item {
    min-height: 0;
  }

  .home-hero-content {
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
}

@media (max-width: 767.98px) {
  .home-hero {
    aspect-ratio: auto;
    height: auto;
    min-height: 0;
  }

  .home-hero-content {
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
}
