* {
  box-sizing: border-box;
}

body,
html,
h1 {
  padding: 0;
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

html {
  scroll-behavior: smooth;
}

/* Awal elemen tidak terlihat */
.fade-in {
  opacity: 0; 
  transform: translateY(30px); /* Mulai dari bawah */
  transition: opacity 0.5s ease-out, transform 0.5s ease-out; /* Transisi animasi */
}

/* Ketika elemen terlihat */
.fade-in.show {
  opacity: 1; 
  transform: translateY(0); /* Kembali ke posisi awal */
}

/* Style navbar */
.container {
  background-color: rgb(255, 255, 255);
  position: fixed;
  width: 100%;
  z-index: 1000;
  border-bottom: 2px solid #ddd;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Efek timbul */
  transition: box-shadow 0.3s ease-in-out;
}

.container:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#nav-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 80vw;
  height: 60px;
  margin: 0 auto;
}

#nav-header .logo img {
  width: 50px;
  padding-top: 6px;
}

#nav-header ul {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
}

#nav-header li a {
  display: block;
  color: black;
  padding: 0 2em;
  line-height: 60px;
  text-decoration: none;
  text-transform: uppercase;
  height: 60px;
}

#nav-header li a.active {
  color: #180161;
  border-bottom: 5px solid #180161;
  transition: all 0.3s ease;
}

#nav-header li a:hover {
  color: #180161;
  transition: all 0.3s;
  border-bottom: 5px solid #180161;
}

/* Sembunyikan hamburger icon */
#nav-header label,
#hamburger {
  display: none;
}

@media screen and (max-width: 768px) {
  /* Tampilkan hamburger icon */
  #nav-header label {
    display: inline-block;
    color: black;
    font-style: normal;
    font-size: 2rem;
    padding: 0.5rem;
    position: absolute;
    right: 1rem;
    z-index: 1001;
    cursor: pointer;
  }

  /* Susun ulang menjadi vertikal */
  #nav-header {
    width: 100%;
  }

  #nav-header nav ul {
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 60px;
    left: 0;
  }

  #nav-header li a {
    display: block;
    color: white;
    background-color: #180161;
    padding: 0 2em;
    text-decoration: none;
    text-transform: uppercase;
    height: auto;
    transition: all 0.3s ease-in-out; /* Tambahkan efek transisi */
  }

  #nav-header li a:hover {
    color: #007bff; /* Warna saat di-hover */
    background-color: #140144; /* Warna latar belakang saat hover */
    border-bottom: none;
    transition: all 0.3s ease-in-out;
  }

  #nav-header li a.active {
    color: #007bff; /* Warna tulisan active */
    background-color: #140144; /* Warna latar active */
    border-left: 5px solid #0056b3; /* Tambahkan indikator */
    border-bottom: none;
    transition: all 0.3s ease-in-out;
  }

  /* Pindahkan posisi logo ke kanan, dan perkecil */
  .logo {
    position: absolute;
    left: 1rem;
    z-index: 1000;
  }

  .logo img {
    width: 80px;
  }

  /* Untuk menampilkan/ menyembunyikan menu */
  #nav-header nav {
    display: none;
  }
  #nav-header input:checked ~ nav {
    display: flex;
  }
}

/* style hero */
.hero-container {
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3)),
    url("img/bg5.jpg");
  height: 100vh;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-text {
  text-align: center;
  color: white;
}

.hero-text h1 {
  font-size: 4em;
  margin: 0;
  text-shadow: 2px 2px black;
}

.hero-text a {
  text-decoration: none;
  display: inline-block;
  margin-top: 1.3em;
  padding: 0.7em 1.2em;
  background-color: #180161;
  color: white;
  box-shadow: 5px 5px black;
  font-size: 1.1em;
}

.hero-text a:hover {
  background-color: #0f003f;
}

.hero-container {
  background-image: url("img/bg5.jpg");
}

.hero-text {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 2em;
}

/* style showcase */
.showcase {
  display: flex;
  justify-content: space-between;
  max-width: 100%;
  margin: 0 auto;
  padding: 2em;
}

.showcase-image,
.showcase-text {
  width: 50%;
  margin: 1em;
}

.showcase-image img {
  width: 100%;
  border: 1px solid silver;
  padding: 0.3rem;
  box-shadow: 2px 2px 5px black;
}

.showcase:nth-child(even) {
  background-color: #f0f0f0;
}

@media screen and (max-width: 768px) {
  .showcase {
    flex-direction: column;
    padding: 1em 2em;
  }

  .showcase-image,
  .showcase-text {
    width: auto;
  }
}

/* style product */
.product-container {
  max-width: 1100px;
  margin: 30px auto;
  padding: 40px 20px;
  text-align: center;
  background-color: #fff;
  border-radius: 8px;
}

.product-container header hr {
  width: 60px;
  height: 3px;
  background-color: #180161;
  border: none;
  margin: 10px auto;
}

.product-container section {
  margin-top: 2rem;
  display: flex;
  flex-flow: wrap;
  justify-content: center; /* mengatur produk di tengah */
}

.product-container section div {
  width: 22%;
  padding: 20px;
  margin: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: opacity 0.6s ease, transform 0.6s ease;
  background-color: #f4f4f4;
  text-align: center;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(50px);
  /* touch-action: manipulation; memastikan interaksi pada perangkat sentuh */
}

.product-container section div.show {
  opacity: 1;
  transform: translateY(0);
}

.product-container header h1 {
  font-size: 2em;
  margin-bottom: 0;
  color: #333;
}

.main-service {
  font-size: 1rem;
  color: #666;
  margin-bottom: 30px;
}

/* efek hover dan sentuh */
.product-container section div:hover,
.product-container section div:active {
  transform: translateY(-10px) scale(1.05); /*efek timbul*/
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.product-container section i {
  color: #180161;
  margin-bottom: 15px;
  font-size: 2em;
  transition: color 0.3s ease, transform 0.3s ease;
}

.product-container section h4 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 10px;
}

.paragraph-service {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
}

/* hover dan sentuh */
.product-container section div:hover i,
.product-container section div:active i {
  color: #0056b3;
  transform: rotate(15deg); /*efek rotasi*/
}

.product-container section div:hover h4,
.product-container section div:active h4 {
  color: #0056b3;
}

.product-container section div:hover .paragraph-service,
.product-container section div:active .paragraph-service {
  color: #444;
}

/* efek latar belakang saat di hover/sentuh */
.product-container section div::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(24, 1, 97, 0.1), transparent 50%);
  transition: transform 0.5s ease;
  z-index: -1;
}

.product-container section div:hover::before,
.product-container section div:active::before {
  transform: scale(1.5);
}

@media screen and (max-width: 992px) {
  .product-container section div {
    width: 45%; /* 2 kolom pada tablet */
  }
}

@media screen and (max-width: 768px) {
  .product-container section div {
    width: 90%; /* 1 kolom pada ponsel */
  }
}

@media screen and (max-width: 480px) {
  .product-container {
    padding: 20px 10px;
  }

  .product-container header h1 {
    font-size: 1.5em;
  }

  .product-container section div {
    padding: 15px;
    margin: 10px 0;
  }
}

/* style blog */
.blog-container {
  max-width: 1100px;
  margin: 30px auto;
  text-align: center;
  padding: 40px 20px;
  background-color: #fff;
}

.blog-container header h1.judul-blog {
  font-size: 2rem;
  color: #333;
  margin-bottom: 10px;
}

.blog-container header {
  padding: 2rem 2em;
  text-align: center;
}

.blog-container header hr {
  width: 60px;
  height: 3px;
  background-color: #180161;
  border: none;
  margin: 10px auto;
}

.blog-container header p.paragraf-blog {
  font-size: 1rem;
  color: #666;
  margin-bottom: 30px;
}

.blog-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.snippet {
  background-color: #f4f4f4;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  opacity: 0; /* Awalnya tidak terlihat */
  transform: translateY(50px); /* Bergeser ke bawah */
  transition: opacity 0.6s ease, transform 0.6s ease; /* Animasi muncul */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%; /* Pastikan tinggi card penuh */
}

/* Snippet terlihat (dengan animasi) */
.snippet.show {
  opacity: 1;
  transform: translateY(0); /* Muncul ke posisi asli */
}

.snippet:hover {
  transform: translateY(-10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.snippet-img {
  width: 100%;
  height: auto;
  display: block;
}

.snippet-txt {
  padding: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.isi-blog {
  font-size: 1.4rem;
  color: #333;
}

.paragraf-blog {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
  flex-grow: 1; /* Isi ruang kosong di dalam card */
  margin-bottom: 20px; /* Jarak antar teks dan tombol */
}

.btn-blog {
  background-color: #180161;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: auto; /* Jaga agar tombol tetap di bawah */
  display: inline-block; /* Pastikan tombol tetap muncul */
}

.btn-blog a.read-more {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.btn-blog:hover {
  background-color: #0056b3;
}

@media screen and (max-width: 768px) {
  .blog-index {
    grid-template-columns: 1fr;
  }

  .blog-container .snippet {
    width: 48%;
  }
}

@media screen and (max-width: 481px) {
  .blog-container .snippet {
    width: 100%;
  }

  .blog-index {
    justify-content: center;
  }
}

/* efek untuk hover gambar */
.snippet figure {
  padding: 0;
  margin: 0;
  overflow: hidden;
}

.snippet figure img {
  width: 100%;
  transform: rotate(10deg) scale(1.4);
  transition: 0.3s ease-in-out;
}

.snippet:hover figure img {
  transform: rotate(0) scale(1.1);
}

.snippet-img {
  transform: rotate(10deg) scale(1.4);
  transition: 0.3s ease-in-out;
}

.snippet figure:hover img {
  transform: rotate(0) scale(1.1);
}

/* Contact Us Page Styling */
#contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: stretch;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 50px;
  padding: 20px;
  background-color: #180161;
  /* border-radius: 8px; */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.contact-info {
  flex: 1;
  padding: 20px;
  max-width: 50%;
  box-sizing: border-box;
  color: #333;
  background-color: #180161;
  border-radius: 8px;
}

.contact-info h2 {
  font-size: 28px;
  margin-bottom: 20px;
  color: #f4f4f4;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.contact-item i {
  font-size: 24px;
  color: #f4f4f4;
  margin-right: 15px;
  transition: color 0.3s ease, tranform 0.3s ease;
}

.contact-item a {
  /* text-decoration: none; */
  font-size: 16px;
  color: #f4f4f4;
  transition: color 0.3s ease, transform 0.3s ease;
}

.contact-item a:hover {
  color: #007bff;
}

.contact-item span {
  color: #f4f4f4;
  transition: color 0.3s ease, transform 0.3s ease;
}

.map {
  flex: 1;
  padding: 20px;
  max-width: 50%;
  box-sizing: border-box;
}

iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  #contact {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-info,
  .map {
    max-width: 100%;
    padding: 10px;
    /* text-align: center; */
  }

  .contact-info h2 {
    padding-bottom: 10px;
  }

  /* 
  .contact-item {
    justify-content: center;
  } */

  iframe {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .contact-info h2 {
    font-size: 24px;
  }

  .contact-item i {
    font-size: 20px;
  }

  .contact-item a {
    font-size: 14px;
  }
}

/* Footer Section */
.footer-container {
  background-color: #0f003f;
  color: #fff;
  text-align: center;
  padding: 1rem;
}

.footer-container p {
  margin: 0;
}
