/* Hero */
.hero {
  background: url("../assets/img/IMG_20251001_105526_213-min.jpg") center/cover
    no-repeat;
  height: 100vh;
  padding-top: calc(100px + 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.486);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 20px;
}

.hero-content h3 {
  font-size: 48px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 300;
}

.hero-content h1 {
  font-size: 64px;
  font-weight: 700;
}

.hero-content p {
  font-size: 24px;
}

.hero-content .btn {
  margin-top: 15px;
  font-size: 16px;
}

/* About */
.about {
  min-height: calc(100vh - 100px);
  padding-top: calc(100px + 20px);
  display: flex;
  align-items: center;
}

.about-container {
  width: 95%;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}
.about-container {
  flex-wrap: wrap;
}
.about-text {
  flex: 1 1 520px;
  min-width: 260px;
  max-width: 100%;
}
.about-img {
  flex: 1 1 420px;
  min-width: 260px;
  max-width: 550px;
}

.about-text {
  flex: 1;
}

.about-text h2 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 25px;
}
.about-text h2 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  margin-bottom: 25px;
  overflow-wrap: break-word;
  hyphens: auto;
}

.about-text p {
  margin-top: 12px;
  font-size: 18px;
  line-height: 1.7;
  text-align: justify;
  margin-bottom: 35px;
  margin-right: 50px;
}

.about-text .btn {
  position: relative;
  right: 37%;
}

.btn-red {
  display: inline-block;
  padding: 13px 28px;
  background: var(--primary);
  color: white;
  font-size: 18px;
  text-decoration: none;
  border-radius: 10px;
  transition: 0.2s;
}
.btn-red {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  background: var(--primary);
  color: white;
  font-size: clamp(14px, 1.6vw, 18px);
  text-decoration: none;
  border-radius: 10px;
  transition: 0.2s;
  max-width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
}
.about-text .btn-red,
.about-text .btn {
  align-self: flex-start;
}

.btn-red:hover {
  opacity: 0.85;
}

.about-img {
  flex: 1;
  max-width: 550px;
  height: 750px;
}

.about-img img {
  width: 100%;
  height: 750px;
  object-fit: cover;
  border-radius: 10px;
}

/* Recommendation */
.recomendation {
  min-height: calc(100vh - 100px);
  padding-top: calc(100px + 20px);
  display: flex;
  align-items: center;
  background-color: #d9d9d9;
}
.section {
  display: flex;
  justify-content: space-between;
  padding: calc(100px + 20px) 40px 80px 40px;
  width: 1300px;
  margin: auto;
  height: 700px;
}

.top-text {
  color: #f26868;
  font-size: 20px;
  font-style: italic;
  letter-spacing: 1px;
}

.title {
  font-size: 55px;
  margin-top: 10px;
  font-weight: 700;
}

.desc {
  margin-top: 20px;
  max-width: 500px;
  line-height: 1.7;
  font-size: 18px;
  text-align: justify;
}

.btn-more {
  margin-top: 30px;
  padding: 12px 45px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

.image-area {
  position: relative;
  width: 600px;
}

.avatar {
  position: absolute;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #fff;
  transition: top 1000ms ease-in-out, right 1000ms ease-in-out,
    width 1000ms ease-in-out, height 1000ms ease-in-out,
    border 1000ms ease-in-out;
  will-change: top, right, width, height;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.avatar.pos-top {
  width: 140px;
  height: 140px;
  right: -100px;
  top: -70px;
  z-index: 3;
}

.avatar.pos-bottom {
  width: 140px;
  height: 140px;
  right: -100px;
  top: 350px;
  z-index: 3;
}

.avatar.pos-center {
  width: 420px;
  height: 420px;
  right: 15px;
  top: 15px;
  border: 7px solid #000;
  z-index: 5;
}

.image-caption {
  margin-top: 18px;
  font-weight: 600;
  color: #333;
}

.title,
.desc,
.image-caption {
  transition: opacity 500ms ease-in-out;
  opacity: 1;
}

/* kelas bantu fade */
.fade-out {
  opacity: 0;
}

.btn-more {
  background: var(--primary);
  color: white;
  border: 3px solid var(--primary);
  height: 40px;
  width: 120px;
  padding: 0.3rem 1.7rem;
  margin-top: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s ease;
  font-size: 17px;
}

.btn-more:hover {
  background: transparent;
  color: var(--primary);
  border: 3px solid var(--primary);
}

/* layanan */
.layanan {
  min-height: calc(100vh - 100px);
  padding-top: 100px 0;
  display: flex;
  align-items: center;
  background-color: #ffffff;
}

.layanan-content {
  width: 1278px;
  max-width: 1300px;
  margin: auto;
  height: 530px;
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: 0px;
  border-radius: 24px;
  background: url("../assets/img/Layanan.jpg") right center/cover no-repeat;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 360ms cubic-bezier(0.2, 0.9, 0.26, 1),
    box-shadow 360ms ease;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.layanan-content::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.8) 28%,
    rgba(0, 0, 0, 0.35) 48%,
    rgba(0, 0, 0, 0) 65%
  );
  opacity: 1;
  z-index: 1;
  transition: opacity 500ms ease;
  pointer-events: none;
}

.layanan-overlay,
.layanan-content .overlay {
  position: relative;
  z-index: 3;
  color: white;
  padding: 0;
  max-width: 55%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

.layanan-text,
.layanan-content .overlay .layanan-text {
  flex: 1;
  text-align: justify;
  max-width: 700px;
  padding-left: 10%;
}

.layanan-content h1 {
  font-size: 70px;
  font-weight: 700;
  margin: 20px 0 25px;
  color: #ffffff;
  margin: 0 0 24px 0;
  letter-spacing: -1px;
  line-height: 1.1;
  position: relative;
  z-index: 3;
}

.layanan-content p {
  color: rgba(255, 255, 255, 0.95);
  position: relative;
  z-index: 3;
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: 0.3px;
  margin: 0 0 32px 0;
  max-width: 650px;
}

.layanan-content .btn-red,
.layanan-content button {
  position: relative;
  z-index: 4;
  height: 56px;
  padding: 12px 28px;
  font-size: 18px;
  border-radius: 10px;
}

.event {
  min-height: calc(100vh - 100px);
  padding-top: 100px 0;
  display: flex;
  align-items: center;
  background-color: #d9d9d9;
}

.event-content {
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 60px 0;
}

#demo {
  border-radius: 15px;
  overflow: hidden;
}

.carousel-item {
  height: 700px;
  width: 1300px;
  border-radius: 15px;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.carousel-item img {
  height: 100%;
  width: 100%;
  border-radius: 50px;
  border-radius: inherit;
}
.carousel-control-prev:hover,
.carousel-control-next:hover {
  background: none !important;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 45px;
  height: 45px;
  background-size: 60%;
  transition: 0.3s ease-in-out;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  padding: 10px;
}

.carousel-control-prev,
.carousel-control-next {
  background: none !important;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
}

.carousel-caption {
  position: absolute;
  padding: 15px 0;
  color: #f5f5f5;
}

#demo .carousel-caption {
  top: 20px;
  bottom: auto;
  left: 20px;
  right: 20px;
  text-align: left;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.15));
  border-radius: 8px;
  z-index: 4;
}

/* Responsive adjustments for beranda */
@media (max-width: 768px) {
  /* Hero Section */
  .hero {
    height: 70vh;
    padding-top: calc(80px + 20px);
  }

  .hero-content h3 {
    font-size: 32px;
  }

  .hero-content h1 {
    font-size: 42px;
    margin: 10px 0;
  }

  .hero-content p {
    font-size: 16px;
  }

  /* About Section */
  .about {
    min-height: auto;
    padding-top: calc(80px + 20px);
    padding-bottom: 40px;
  }

  .about-container {
    flex-direction: column;
    gap: 30px;
    width: 100%;
    padding: 0 20px;
  }

  .about-text h2 {
    position: relative;
    right: 0%;
    font-size: 32px;
    margin-bottom: 16px;
  }

  .about-text .btn {
    position: relative;
    left: 0%;
}

  .about-text p {
    font-size: 15px;
    line-height: 1.6;
    margin-right: 0;
    margin-bottom: 20px;
  }

  .about-img {
    max-width: 100%;
    height: 300px;
  }

  .about-img img {
    height: 300px;
  }

  /* Recommendation Section */
  .recomendation {
    min-height: auto;
    padding-top: calc(80px + 20px);
    padding-bottom: 40px;
  }

  .section {
    flex-direction: column;
    width: 100%;
    padding: 30px 20px;
    height: auto;
    justify-content: flex-start;
  }

  .top-text {
    font-size: 16px;
  }

  .title {
    font-size: 32px;
    margin-top: 8px;
  }

  .desc {
    font-size: 15px;
    margin-top: 12px;
    max-width: 100%;
  }

  .image-area {
    width: 100%;
    height: 300px;
    position: relative;
    margin-top: 20px;
  }

  .avatar.pos-center {
    width: 200px;
    height: 200px;
    right: 50%;
    top: 50%;
    transform: translate(50%, -50%);
  }

  .avatar.pos-top,
  .avatar.pos-bottom {
    display: none;
  }

  /* Layanan Section */
  .layanan {
    min-height: auto;
    padding: 40px 20px;
  }

  .layanan-content {
    width: 100%;
    max-width: 100%;
    height: auto;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 100%), url("../assets/img/Layanan.jpg") right center/cover no-repeat;
  }

  .layanan-content::before {
    display: none;
  }

  .layanan-overlay {
    max-width: 100%;
  }

  .layanan-text {
    max-width: 100%;
    padding-left: 0;
    text-align: left;
  }

  .layanan-content h1 {
    font-size: 36px;
    margin-bottom: 16px;
  }

  .layanan-content p {
    font-size: 15px;
    line-height: 1.6;
    max-width: 100%;
    margin-bottom: 20px;
  }

  /* Event Section */
  .event-content {
    padding: 30px 20px;
  }

  .carousel-item {
    height: 300px;
    width: 100%;
  }

  #demo {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  /* Hero Section */
  .hero {
    height: 60vh;
    padding-top: calc(80px + 15px);
  }

  .hero-content {
    padding: 16px;
  }

  .hero-content h3 {
    font-size: 24px;
  }

  .hero-content h1 {
    font-size: 28px;
    margin: 8px 0;
  }

  .hero-content p {
    font-size: 14px;
    line-height: 1.5;
  }

  .hero-content .btn {
    margin-top: 12px;
    font-size: 14px;
    padding: 10px 20px;
  }

  /* About Section */
  .about {
    padding-top: calc(80px + 15px);
    padding-bottom: 30px;
  }

  .about-container {
    padding: 0 12px;
    display: flex;
    flex-direction: column;
  }

  .about-container {
    display: grid;
    grid-row: 1/4;
    gap: 10px;
  }

  .about-text h2 {
    grid-column: 1/4;
    font-size: 24px;
    margin-bottom: 12px;
  }

  .about-img {
    height: 220px;
    order: 2;
    margin-bottom: 16px;
  }

  .about-img img {
    grid-column: 2/4;
    height: 220px;
    border-radius: 8px;
  }

  .about-text .btn {
    grid-column: 4/4;
    margin-top: 10%;
    position: relative;
    bottom: 16px;
    left: 0%;
  }

  .about-text p {
    grid-column: 3/4;
    order: 3;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
  }

  /* Recommendation Section */
  .recomendation {
    padding-top: calc(80px + 15px);
    padding-bottom: 30px;
  }

  .section {
    padding: 20px 12px;
  }

  .top-text {
    font-size: 13px;
  }

  .title {
    font-size: 22px;
    margin-top: 6px;
  }

  .desc {
    font-size: 13px;
    margin-top: 10px;
    max-width: 100%;
    text-align: left;
  }

  .image-area {
    height: 240px;
    margin-top: 16px;
  }

  .avatar.pos-center {
    width: 140px;
    height: 140px;
  }

  .image-caption {
    margin-top: 12px;
    font-size: 14px;
  }

  .btn-more {
    font-size: 14px;
    padding: 0.2rem 1.2rem;
    height: 36px;
    margin-top: 12px;
  }

  /* Layanan Section */
  .layanan {
    padding: 30px 12px;
  }

  .layanan-content {
    padding: 20px 16px;
    min-height: auto;
  }

  .layanan-content h1 {
    font-size: 26px;
    margin-bottom: 12px;
  }

  .layanan-content p {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
  }

  .layanan-content .btn-red,
  .layanan-content button {
    height: 44px;
    padding: 10px 20px;
    font-size: 14px;
  }

  /* Event Section */
  .event-content {
    padding: 20px 12px;
  }

  .carousel-item {
    height: 210px;
  }

  #demo {
    max-width: 100%;
  }

  #demo .carousel-caption h3 {
    font-size: 16px;
  }
}

@media (min-width: 481px) and (max-width: 767px) {
  #demo .carousel-caption {
    display: block !important;
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(0,0,0,0.5), rgba(0,0,0,0.15));
    border-radius: 8px;
    z-index: 6;
    text-align: left;
  }
  #demo .carousel-caption h3 {
    font-size: 16px;
    margin: 0;
  }
}
