* {
  margin: 0px;
  padding: 0px;
}

body {
  /* transition: background-color 1s ease-in-out; */
  scroll-behavior: smooth;
  background-color: #ffffff;
  width: 100%;
}

::-webkit-scrollbar {
  width: 10px;
  background-color: #fef9e1;
  display: none;
}

::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background-color: #e5d0ac;
}

/* navbar */

nav {
  display: flex;
  background-color: #ffffff;
  justify-content: space-between;
  padding: 20px 0px;
  letter-spacing: 1px;
  height: 10px;
  width: 100%;
  align-items: center;
  position: fixed;
  top: 0;
  z-index: 999;
}

.logo {
  display: flex;
  width: 50%;
  height: 45px;
  align-items: center;
  position: relative;
  left: 10px;
}

.logo img {
  width: 30px;
  padding: 0px 18px;
}

.logo .nama {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0px 5px;
  font-weight: 600;
  font-size: 16px;
  color: #a31d1d;
  font-family: Helvetica, sans-serif;
}

nav ul {
  display: flex;
  list-style: none;
  justify-content: space-evenly;
  width: 50%;
  box-sizing: border-box;
}

nav ul li {
  position: relative;
}

nav ul li a {
  text-decoration: none;
  color: #a31d1d;
  font-weight: 600;
  font-family: Arial;
  font-size: 13px;
  padding: 10px;
  display: inline-block;
}

nav ul li span {
  width: 100%;
  height: 3px;
  position: absolute;
  bottom: 4px;
  left: 0;
  opacity: 0;
  background-color: #6d2323;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
  pointer-events: none;
}

nav ul li a:hover span,
nav ul li.active a span {
  transform: scaleX(1);
  opacity: 1;
}

/* ikon menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  height: 20px;
  justify-content: space-between;
  position: relative;
  right: 10px;
}

.menu-toggle input {
  position: absolute;
  width: 40px;
  height: 28px;
  left: -6px;
  top: -4px;
  opacity: 0;
  cursor: pointer;
  z-index: 15;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background-color: black;
  border-radius: 3px;
  transition: all 0.5s;
}

/* humberger menu animation */

/* humberger pertama berputar 45 derajat */

/*input dihitung sebagai anak pertama,sehingga span pertama menjadi anak kedua*/
.menu-toggle span:nth-child(2) {
  transform-origin: 0 100%;
}

.menu-toggle span:nth-child(4) {
  transform-origin: 0 100%;
}

/* ketika input diceklis maka ia akan mencari span pertama yang merupakan anak kedua */
.menu-toggle input:checked ~ span:nth-child(2) {
  transform: rotate(50deg) translate(-1px, -3px);
}

.menu-toggle input:checked ~ span:nth-child(3) {
  transform: scale(0);
  opacity: 0;
}

.menu-toggle input:checked ~ span:nth-child(4) {
  transform: rotate(-50deg) translate(0px, 4px);
}

/* section */
.container-satu {
  width: 100%;
  height: 300px;
  margin: auto;
  margin-top: 50px;
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  box-sizing: border-box;
}

.container-satu .tagline {
  width: 50%;
  padding: 1rem;
  text-align: center;
}

.container-satu .tagline h3 {
  font-size: 25px;
  letter-spacing: 1.3px;
  margin-bottom: 0.5rem;
}

.container-satu .tagline h5 {
  font-size: 18px;
  margin-bottom: 0.5rem;
}

.container-satu .tagline blockquote {
  font-size: 1.2rem;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.container-satu .logo {
  width: 20%;
  box-sizing: border-box;
  margin: auto;
}

.container-satu .logo img {
  width: 100%;
}

.container-dua {
  width: 100%;
  background-color: #e5d0ac;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.container-dua h3 {
  padding-bottom: 2rem;
  font-size: 20px;
  letter-spacing: 0.8px;
}

.container-dua ul {
  margin: auto;
  width: 90%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
}

.container-dua ul li {
  width: 250px;
  height: 250px;
  /* box-sizing: border-box; */
  background-color: #fef9e1;
  padding: 1.3rem;
  list-style-type: none;
  box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.5);
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: baseline;
  text-align: justify;
}

.container-dua ul li h4 {
  font-size: 18px;
  margin-bottom: 0.4rem;
  text-align: center;
  width: 100%;
}

.dinas {
  text-align: center;
  margin-top: 1.5rem;
}

.container-tiga {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  overflow-x: auto;
}

.card {
  margin: 10px;
  border: 2px solid #a31d1d;
  border-radius: 15px;
  width: 230px;
  height: 310px;
  flex-shrink: 0;
  overflow: hidden;
}

@keyframes moveRight {
  0% {
    left: -120px;
  }
  100% {
    left: 100vw;
  }
}

@keyframes moveLeft {
  100% {
    right: 100vw;
  }
  0% {
    right: 0px;
  }
}

.card .header {
  background-image: url(img/logo/KABINET\ RUANG\ PIJAR.PNG);
  background-repeat: no-repeat;
  background-size: cover;
  height: 230px;
  overflow: hidden;
}

.card .header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
}

.card .content {
  padding: 10px;
  text-align: center;
  /* box-sizing: border-box; */
}

.card .content h3 {
  font-size: 18px;
  margin-bottom: 5px;
}

.card .content p {
  text-transform: uppercase;
}

/* footer */
.kontak {
  display: flex;
  background-color: #ffffff;
  flex-direction: column;
  height: auto;
  position: relative;
}

.kabinet {
  display: flex;
  flex-direction: row;
  align-items: center;
  font-family: Helvetica, sans-serif;
}

.kabinet img {
  width: 3%;
  padding: 10px;
}

.kontak h3 {
  font-size: 18px;
  padding: 10px;
}

.kontak ul {
  padding-left: 10px;
  list-style: none;
}

.kontak ul li {
  padding-bottom: 5px;
}

.kontak ul li a {
  text-decoration: none;
  color: red;
}

.kontak p {
  width: inherit;
  height: 20px;
  margin: auto;
  font-size: 16px;
  padding: 20px;
}

@media screen and (min-width: 577px) and (max-width: 991px) {
  /* Container Satu */
  .container-satu {
    flex-direction: column-reverse;
    height: auto;
    margin-top: 12rem;
    padding: 2rem;
    text-align: center;
  }

  .container-satu .tagline {
    width: 100%;
    margin-top: 10rem;
    padding: 1rem;
  }

  .container-satu .logo {
    width: 60%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
  }

  /* Container Dua */
  .container-dua {
    padding: 2rem 1rem;
  }

  .container-dua ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    height: auto;
  }

  .container-dua ul li {
    width: 40%;
    height: 13rem;
    padding: 1rem;
    font-size: 15px;
  }

  .container-dua ul li h4 {
    font-size: 17px;
    text-align: center;
  }

  .container-dua ul li p {
    font-size: 15px;
  }

  /* Container Tiga */
  .container-tiga {
    padding: 1rem;
    gap: 1rem;
    overflow-x: auto;
  }

  .card {
    width: 30%;
    min-width: 220px;
    height: auto;
    margin: 0.5rem;
  }

  .card .header {
    height: 250px;
  }

  .card .content h3 {
    font-size: 17px;
  }

  /* Footer - Kontak */
  .kabinet {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
  }

  .kabinet img {
    width: 35px;
    padding: 8px;
  }

  .kontak h3 {
    font-size: 17px;
    padding: 1rem;
  }

  .kontak ul li {
    font-size: 15px;
  }

  .kontak p {
    font-size: 15px;
    text-align: center;
  }
}

@media screen and (max-width: 576px) {
  .logo {
    width: 100%;
  }

  nav ul {
    position: absolute;
    flex-direction: column;
    top: 20px;
    left: 0px;
    width: 100%;
    height: 220px;
    background-color: #ffff;
    z-index: 10;
    transform: translateY(-300px);
    transition: all 0.5s;
  }

  nav ul li {
    padding: 10.5px;
    text-align: center;
  }

  body .blur {
    transition: background-color 0.5s ease-in-out;
    opacity: 0.8;
  }

  nav ul.slide {
    transform: translateY(29px);
    background-color: #ffffff;
    z-index: 10;
  }

  .menu-toggle {
    display: flex;
    z-index: 5;
  }

  .container-satu {
    flex-direction: column-reverse;
    justify-content: center;
    height: auto;
    width: 100%;
    padding: 1rem;
  }

  .container-satu .tagline {
    width: 100%;
    padding: 0.5rem;
  }

  .container-satu .tagline h3 {
    font-size: 20px;
  }

  .container-satu .tagline h5 {
    font-size: 18px;
  }

  .container-satu .tagline blockquote {
    font-size: 1.1rem;
  }

  .container-satu .logo {
    width: 80%;
    margin-left: 24px;
    display: flex;
    justify-content: center;
    height: 250px;
  }

  .container-satu .logo img {
    width: 100%;
    height: auto;
  }

  .container-dua {
    width: 100%;
    padding: 1rem 0rem;
  }

  .container-dua h3 {
    font-size: 18px;
    text-align: center;
    padding-bottom: 1.5rem;
  }

  .container-dua ul {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    padding: 0;
  }

  .container-dua ul li {
    width: 80%;
    max-width: 90%;
    height: auto;
    padding: 1rem;
    font-size: 14px;
  }

  .container-dua ul li h4 {
    font-size: 16px;
    text-align: center;
  }

  .container-dua ul li p {
    font-size: 15px;
  }
  .container-tiga {
    padding: 1rem 0rem;
    width: 100%;
  }

  .card {
    width: 50%;
    min-width: 200px; /* agar tetap bisa scroll horizontal */
    height: 270px;
    margin: 0 0.5rem;
  }

  .card .header {
    height: 180px;
  }

  .card .content {
    padding: 10px;
  }

  .card .content h3 {
    font-size: 16px;
  }
  /* FOOTER - KONTAK */
  .kabinet {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 10px;
  }

  .kabinet img {
    width: 30px; /* Ukuran ikon yang lebih masuk akal untuk mobile */
    padding: 5px;
  }

  .kontak h3 {
    font-size: 16px;
    padding: 8px 10px;
  }

  .kontak ul {
    padding-left: 15px;
  }

  .kontak ul li {
    font-size: 14px;
    padding-bottom: 4px;
  }

  .kontak ul li a {
    font-size: 14px;
  }

  .kontak p {
    font-size: 14px;
    text-align: center;
    padding: 10px;
  }
}
