/* ========== GLOBAL ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: system-ui, sans-serif;
  background: #f9fafb;
  color: #111827;
  line-height: 1.6;
}
.container {
  max-width: 1100px;
  margin: auto;
  padding: 0 16px;
}

/* ====== ARTICLE CONTENT ====== */
.article-content {
  line-height: 1.7;
  font-size: 16px;
  color: #111827;
}

.article-content h2 {
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 20px;
  color: #b91c1c;
}

.article-content p {
  margin-bottom: 14px;
}

/* Buat list sejajar dengan teks biasa */
.article-content ul,
.article-content ol {
  margin: 0 0 16px 20px; /* kiri kecil, bawah normal */
  padding: 0;
}

.article-content li {
  margin-bottom: 6px;
}

/* ========== HEADER ========== */
.header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 20px;
  color: #fff;
}
.logo img {
  height: 32px;
}

/* ========== NAVBAR ========== */
.navbar {
  background: #d62828;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* logo kiri, menu kanan */
  position: relative;
  z-index: 1000;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}
.nav-links li a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 20px 0;
  display: block;
}
.nav-links li a:hover {
  color: #ffb703;
}

/* ========== BURGER ICON ========== */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: 0.3s;
}
/* Animasi burger ke "X" */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ====== MOBILE STYLE ====== */
@media(max-width:768px){
  .menu-toggle {
    display: flex;
    z-index: 1100; /* biar tombol selalu di atas */
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    background: #d62828;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    z-index: 1050; /* penting biar muncul di atas hero/content */
  }

  .nav-links.active {
    display: flex !important; /* pastikan override */
  }

  .nav-links li a {
    padding: 14px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }
}

/* ========== HERO ========== */
.hero {
  text-align: center;
  padding: 40px 20px;
  background: #dc2626;
  color: #fff;
  border-radius: 8px;
  margin: 20px 0;
}
.hero h1 { font-size: 28px; }
.hero p { font-size: 16px; opacity: 0.9; }

/* ========== GRID ARTIKEL ========== */
.artikel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 30px 0;
}
.artikel-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
  overflow: hidden;
  transition: 0.3s;
}
.artikel-card:hover { transform: translateY(-4px); }
.artikel-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.artikel-card h3 {
  margin: 12px;
  font-size: 18px;
  color: #b91c1c;
}
.artikel-card p {
  margin: 0 12px 12px;
  color: #374151;
  font-size: 14px;
}
.readmore {
  display: block;
  margin: 0 12px 12px;
  color: #dc2626;
  font-weight: 600;
  text-decoration: none;
}
.readmore:hover { text-decoration: underline; }

/* ========== FOOTER ========== */
.footer {
  background: #111827;
  color: #d1d5db;
  padding: 20px 0;
  text-align: center;
  margin-top: 40px;
}
.footer p { margin: 5px 0; }
.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
}
.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  transition: 0.3s;
}
.footer-links a:hover { color: #fff; }

.breadcrumb {
  font-size: 14px;
  margin: 15px 0;
}
.breadcrumb a {
  color: #d62828;
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb span {
  color: #555;
}
.artikel-content {
  margin-top: 20px;
}
.artikel-content h2 {
  margin: 20px 0 10px;
  color: #b91c1c;
}
.artikel-content p {
  margin-bottom: 15px;
  color: #333;
}
.artikel-content ul, .artikel-content ol {
  margin: 10px 20px;
}

/* ========== ANIMASI WEB ========== */

/* ===== Fade-in saat scroll ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Hover animasi artikel-card ===== */
.artikel-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.artikel-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 8px 18px rgba(0,0,0,.15);
}

/* ===== Hero Ken Burns Effect ===== */
.hero {
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  background: inherit;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  transform: scale(1.1);
  animation: kenburns 12s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1.1) translate(0,0); }
  to { transform: scale(1.2) translate(-10px, -10px); }
}

/* ========== HERO BUTTON ========== */
.cta-button {
    display: inline-block;
    padding: 12px 25px;
    margin-top: 20px;
    background-color: #ff4500; /* Warna tombol */
    color: white;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease;
    font-size: 16px;
}

.cta-button:hover {
    background-color: #dc2626; /* Warna tombol saat hover */
}

/* ========== PETIR EFFECT - ALWAYS ON ========== */
.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ffffff, transparent);
    opacity: 0;
    transform: rotate(45deg);
    pointer-events: none;
    animation: lightning 1s infinite ease-in-out; /* animasi terus-menerus */
}

@keyframes lightning {
    0% {
        opacity: 0;
        transform: rotate(55deg) scale(1);
    }
    25% {
        opacity: 1;
        transform: rotate(120deg) scale(1.05);
    }
    50% {
        opacity: 0;
        transform: rotate(195deg) scale(1);
    }
    75% {
        opacity: 1;
        transform: rotate(260deg) scale(1.05);
    }
    100% {
        opacity: 0;
        transform: rotate(315deg) scale(1);
    }
}
