@import url("https://fonts.googleapis.com/css2?family=Open+Sans+Condensed:wght@300;700&display=swap");

/* Reset gaya default */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  font-family: "Open Sans Consended", sans-serif;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background: rgb(255, 255, 255, 1);
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 999; /* Tambahin ini biar selalu di atas */
}

/* Navigasi */
nav a {
  color: black;
  font-size: 18px;
  transition: 0.3s;
  font-weight: 500;
  padding: 10px;
}

nav {
  display: flex;
  gap: 10px; /* Menambah jarak antar item menu */
}

/* Khusus Nav a yang aktive */
nav a.active {
  color: #0763fa;
}

/* Hover untuk Nav a yang tidak active */
nav a:not(.active):hover {
  color: white;
  background-color: #0763fa;
  transition:0.5s ease-in-out;
  transition-delay:0.1s;
  border-radius: 13px;
}

/* Bagian kanan header */
.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Tombol Contact */
.btn-contact {
  display: inline-block;
  background-color: #0763fa; /* Warna biru */
  color: white; /* Warna teks putih */
  font-size: 15px;
  font-weight: bold;
  padding: 11px 30px;
  border-radius: 40px; /* Bikin tombol oval */
  text-align: center;
  transition: 0.3s; /* Efek hover */
}

/* Efek hover: lebih terang saat disentuh */
.btn-contact:hover {
  background-color: #7babf8;
}

/* Hamburger Menu */
#menu-toggle {
  display: none;
}

.menu-icon {
  display: none;
  font-size: 30px;
  cursor: pointer;
}

/*Berita*/
body {
  margin: 0;
  padding: 0;
  color: #070707;
}

.container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 50px;
  overflow: hidden; /* Biar gak keluar dari batas container */
}

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

.berita-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: 0.3s;
  padding: 15px;
  margin: 10px;
}

.berita-card:hover {
  transform: scale(1.02);
}

.berita-detail img {
  margin: 20px;
}

.berita-content,
.berita-detail {
  padding: 20px;
}

.berita-content h3 {
  margin-bottom: 10px; /* Jarak bawah h3 */
}

.berita-content p {
  margin-top: 5px; /* Jarak atas p */
}

.berita-content h2,
.berita-detail h2 {
  font-size: 20px;
  color: #1e3a8a;
  margin-bottom: 10px;
}

.info-penulis {
  display: flex;
  gap: 20px;
  color: #6c757d; /* Warna abu-abu */
  font-size: 14px;
  align-items: center;
  margin-bottom: 20px; /* Jarak bawah ke elemen lain */
}

.ikon i {
  margin-right: 5px;
  color: #6c757d;
}

.ikon b {
  font-weight: 600;
  color: #2c3e50; /* Warna tulisan tebal */
}

.berita-content p,
.berita-detail p {
  font-size: 16px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 10px;
}

.link-baca,
.berita-detail .link-baca {
  color: #1e3a8a;
  text-decoration: underline;
  cursor: pointer;
  transition: 0.3s;
}

.link-baca:hover {
  color: #374151;
  text-decoration-color: #374151;
}

.berita-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.berita-detail img {
  max-width: 700px; /* Batasin lebar gambar */
  width: 100%;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Biar teks paragrafnya rapi */
.berita-detail p {
  max-width: 800px;
  line-height: 1.8;
  text-align: justify; /* Rata kanan-kiri */
  color: #555;
  margin-bottom: 20px;
}

/* Judul berita */
.berita-detail h2,
.berita-detail h3 {
  color: #1e3a8a;
  margin-bottom: 10px;
}

.berita-detail .link-baca:hover {
  color: #374151;
  text-decoration-color: #374151;
}

/* Responsif */
@media (max-width: 770px) {
  nav {
    display: none;
    position: absolute;
    right: 40px;
    top: 60px;
    background: white;
    flex-direction: column;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
  }

  .menu-icon {
    display: block;
  }

  /* Saat checkbox aktif, tampilkan menu */
  #menu-toggle:checked ~ nav {
    display: flex;
  }
}

