/* ========== root ========== */
* {
  font-family: "Nunito", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  box-sizing: border-box;
}

:root {
  --first-bg: #ecbf0a;
  --second-bg: #0ab3ec;
  --third-bg: #0ecd3e;
  --fourth-bg: #f15581;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: bold;
}

p {
  font-size: clamp(12px, 4vw, 1rem);
}

/* ========== custom  class ========== */

.container-fluid {
  padding-left: 0;
  padding-right: 0;
}

.container {
  position: relative;
}

.btn-cstm {
  text-decoration: none;
  padding: 0.6rem 1rem;
  font-size: clamp(12px, 4vw, 16px);
  font-weight: bold;
  border: 2px dashed;
  border-radius: 2rem;
  color: #000;
  transition: 0.3s;
  display: flex;
  align-items: center;
}

.btn-cstm i {
  font-size: 1.25em;
}

.btn-yellow {
  color: #000;
  background-color: var(--first-bg);
  border-color: #000;
  outline: 0.2rem solid var(--first-bg);
}

.btn-blue {
  color: #fff;
  background-color: var(--second-bg);
  border-color: #fff;
  outline: 0.2rem solid var(--second-bg);
}

.btn-yellow:hover {
  color: #000;
  filter: brightness(80%);
}

.btn-blue:hover {
  color: #fff;
  filter: brightness(80%);
}

.next-btn {
  position: fixed;
  bottom: 3%;
  right: 5%;
}
.prev-btn {
  position: fixed;
  bottom: 3%;
  left: 5%;
}

.section-title h1 {
  font-weight: bold;
  position: relative;
  display: inline-block;
  line-height: 1;
  z-index: 3;
}

.section-title h1::before {
  content: "";
  width: 102%;
  height: 50%;
  position: absolute;
  z-index: -1;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.section-title.yellow-layer h1::before {
  background-color: #f9d741;
}
.section-title.green-layer h1::before {
  background-color: #00ff004d;
}
.section-title.purple-layer h1::before {
  background-color: #845fcf;
}

.crop-text {
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

#muteButton {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  text-align: center;
  font-size: 0.9em;
  line-height: 40px;
  color: #fff;
  background-color: var(--fourth-bg);
  border: 2px dashed #fff;
  outline: 0.2rem solid var(--fourth-bg);
  position: fixed;
  top: 3%;
  right: 5%;
  z-index: 10;
  cursor: pointer;
  transition: 0.3s;
  animation: spin 30s infinite linear; /* Animasi berputar infinite */
}

#muteButton:hover {
  filter: brightness(90%);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.fade-1,
.fade-2 {
  opacity: 0;
  transform: translateY(20px);
  animation-duration: 1s;
  animation-fill-mode: forwards;
}

.fade-1 {
  animation-name: fadeInFromBottom1;
}

.fade-2 {
  animation-name: fadeInFromBottom2;
  animation-delay: 0.7s; /* Penundaan 2 detik sebelum animasi dimulai */
}

.fade-3 {
  opacity: 0;
  animation: fade 1s forwards;
  animation-delay: 1.3s;
}

.pop {
  transform: scale(0);
  animation: pop 1s forwards;
  animation-delay: 1.5s;
}

@keyframes fadeInFromBottom1 {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInFromBottom2 {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes pop {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* ========== HEADER ========== */

header {
  background-image: url(../img/kids-background.webp);
  background-repeat: no-repeat;
  background-position: bottom;
  background-size: cover;
  position: relative;
}

header::after {
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.3);
}

header h1 {
  font-size: clamp(1.7rem, 4vw, 3rem);
}
header p {
  width: 60%;
}

.text-hightlight {
  color: var(--first-bg);
}

header .container {
  position: relative;
  z-index: 3;
}

/* ========== ABOUT ========== */

.about-box {
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  width: 100%;
  border: 2px dashed #000;
  border-radius: 1rem;
  outline: 0.5rem solid #fff;
  box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.1),
    -10px -10px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.about-box h4 {
  margin-bottom: 0;
  font-size: 1.25em;
}

.about-box.box-1 {
  border-color: var(--second-bg);
}
.about-box.box-2 {
  border-color: var(--first-bg);
}
.about-box.box-3 {
  border-color: var(--third-bg);
}
.about-box.box-4 {
  border-color: var(--fourth-bg);
}

.faq-item .question {
  position: relative;
}

.faq-item .icon {
  height: 25px;
  width: 25px;
  text-align: center;
  line-height: 25px;
  border-radius: 0.2rem;
  position: absolute;
  top: 50%;
  right: 0;
  font-size: 1rem;
  transform: translateY(-50%);
}

.faq-item .answer {
  padding-top: 1rem;
  display: none;
}

.img-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.img-container img {
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  object-fit: cover;
}

.img-container .img {
  position: relative;
}

.img-container .img::after {
  content: "";
  transition: 0.3s;
}

.img-container .img:hover::after {
  content: attr(data-title);
  color: white;
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  font-size: clamp(1rem, 4vw, 1.25rem);
  background-color: rgba(0, 0, 0, 0.5);
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== MENU ASPIRASI ========== */

.menu-aspirasi {
  background-color: #ffe988;
}

.aspirasi-item {
  margin-bottom: 1.25rem;
  text-decoration: none;
  background-color: rgb(255, 255, 255);
  color: #000;
  padding: 0.75rem 1rem;
  border: 2px dashed;
  border-radius: 1rem;
  outline: 0.75rem solid #fff;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.1),
    -10px -10px 10px rgba(0, 0, 0, 0.1);
}

.aspirasi-item h4 {
  color: #000;
}

.aspirasi-item:hover {
  color: inherit;
  transform: scale(1.025);
}

.aspirasi-item i {
  font-size: 2rem;
}

.curhat {
  color: var(--second-bg);
}

.request {
  color: var(--first-bg);
}

.kritik {
  color: var(--third-bg);
}
.laporan {
  color: var(--fourth-bg);
}

/* ========== KUIS ========== */
#quiz-container {
  width: 100%;
  text-align: center;
}

.container-inner {
  min-height: 70vh;
  padding: 2rem 1rem;
  width: 100%;
  background-color: #fff;
  border: 2px dashed var(--second-bg);
  border-radius: 1rem;
  outline: 0.75rem solid #fff;
  box-shadow: 10px 10px 50px rgba(0, 0, 0, 0.1),
    -10px -10px 50px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#question {
  font-size: clamp(1.25rem, 4vw, 2.5rem);
  margin-bottom: 3rem;
}

#choices {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

#choices button {
  padding: 1rem;
  width: 20%;
  min-width: 100px;
  aspect-ratio: 1;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: block;
}

.correct {
  background-color: #5cb85c;
  color: #fff;
}

.incorrect {
  background-color: #d9534f;
  color: #fff;
}

@media screen and (max-width: 768px) {
  #choices {
    flex-direction: column;
    align-items: center;
  }

  #choices button {
    width: 100%;
    min-width: 100px;
    aspect-ratio: 0;
  }
}

/* ========== INPUT ASPIRASI ========== */

.aspirasi-input {
  background-color: #7f65b2;
}

.aspirasi-container {
  padding: 0 0.5rem;
}

.aspirasi-input textarea {
  width: 100%;
  height: 70vh;
  margin-bottom: 1rem;
  resize: none;
  padding: 0.25rem 1rem;
  border: 2px dashed var(--first-bg);
  border-radius: 1rem;
  outline: 0.5rem solid #fff;
  box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.1),
    -10px -10px 10px rgba(0, 0, 0, 0.1);
}

input.foto {
  width: 100%;
  padding: 0.5rem 0.5rem;
  background-color: #fff;
  border: 2px dashed var(--second-bg);
  border-radius: 1rem;
  outline: 0.5rem solid #fff;
  box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.1),
    -10px -10px 10px rgba(0, 0, 0, 0.1);
}

.aspirasi-input button {
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  border: 2px dashed #fff;
  outline: 3px solid var(--fourth-bg);
  color: #fff;
  background-color: var(--fourth-bg);
  transition: 0.3s;
}

.aspirasi-input button:hover {
  filter: brightness(90%);
}

/* ========== PENUTUP ========== */
.penutup {
  background-image: url(../img/kids-background.webp);
  background-repeat: no-repeat;
  background-position: bottom;
  background-size: cover;
  position: relative;
}

.penutup::after {
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.3);
}

.penutup .container {
  z-index: 10;
}

.penutup h1 {
  font-size: 5em;
}

@media screen and (max-width: 768px) {
  header p {
    width: 100% !important;
  }

  .btn-cstm {
    padding: 0.4rem 0.75rem;
  }

  .chat-container {
    width: 100% !important;
  }

}
