/* ========== Variabel & Reset dasar ========== */
:root {
  --green-polije: #103727;
  --green-darker: #082017;
  --orange-cta: #C25D3C;
  --white: #ffffff;
  --cream-bg: #f5f3ec;
  --text-dark: #263225;
  --text-muted: #e0e0e0;
  --text-gray: #666;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ========== Body & Container ========== */
body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--cream-bg);
  color: var(--text-dark);
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ========== Top bar (kontak & sosial) ========== */
.header-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.top-bar {
  background-color: var(--green-darker);
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 0;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-contact {
  display: flex;
  gap: 20px;
}

.top-socials {
  display: flex;
  gap: 15px;
}

.top-socials a {
  color: rgba(255, 255, 255, 0.8);
  transition: 0.3s;
}

.top-socials a:hover {
  color: var(--orange-cta);
}

/* ========== Navbar utama ========== */
.navbar {
  background-color: var(--green-polije);
  padding: 15px 0;
  transition: 0.3s;
  position: relative;
}

.navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo / brand */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  z-index: 1001;
}

.logo img {
  height: 48px;
  width: auto;
}

.brand {
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  color: var(--white);
}

/* Tautan navigasi kanan */
.nav-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links > li > a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 500;
  transition: 0.3s;
  position: relative;
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
  color: var(--white);
  font-weight: 600;
}

.nav-links > li > a.active::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--white);
}

/* Dropdown sederhana */
.dropdown-menu {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.dropbtn {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  text-decoration: none;
}

.dropbtn i {
  font-size: 0.7rem;
  margin-left: 5px;
  color: var(--orange-cta);
  transition: 0.3s;
}

.dropdown-menu:hover .dropbtn i {
  transform: rotate(180deg);
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: -15px;
  background-color: var(--green-polije);
  min-width: 200px;
  box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 999;
  border-radius: 8px;
  padding: 10px 0;
  margin-top: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Buat 'arrow' spacing area (kosong) */
.dropdown-content::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  width: 100%;
  height: 20px;
  background: transparent;
}

.dropdown-menu:hover .dropdown-content {
  display: block;
  animation: fadeIn 0.3s ease;
}

.dropdown-content a {
  color: rgba(255, 255, 255, 0.9);
  padding: 12px 25px;
  text-decoration: none;
  display: block;
  font-size: 0.9rem;
  transition: 0.3s;
}

.dropdown-content a:hover {
  color: var(--orange-cta);
  background-color: rgba(255, 255, 255, 0.05);
}

/* Tombol profil/user */
.user-btn {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

.user-btn:hover {
  background: var(--orange-cta);
  border-color: var(--orange-cta);
  transform: scale(1.05);
}

.user-btn i {
  color: var(--white);
  font-size: 16px;
}

/* ========== Hamburger (mobile) ========== */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--white);
  cursor: pointer;
  transition: 0.3s;
  z-index: 1001;
}

.hamburger:hover {
  color: var(--orange-cta);
}

/* ========== Halaman & Konten Berita ========== */
.page-header {
  background-color: var(--green-polije);
  padding: 60px 0 100px 0;
  text-align: center;
  color: var(--white);
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.breadcrumb {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Section berita */
.news-section {
  padding: 80px 0;
  min-height: 800px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

/* Kartu berita */
.news-card {
  background-color: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.news-card:hover {
  transform: translateY(-10px);
}

/* Gambar thumbnail */
.news-thumb {
  width: 100%;
  height: 220px;
  position: relative;
  overflow: hidden;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-thumb img {
  transform: scale(1.1);
}

/* Badge tanggal */
.news-date-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: var(--orange-cta);
  color: var(--white);
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Isi kartu */
.news-content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-category {
  color: var(--orange-cta);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}

.news-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--green-polije);
  margin-bottom: 15px;
  line-height: 1.3;
  font-weight: 700;
}

.news-excerpt {
  font-size: 0.95rem;
  color: var(--text-gray);
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.read-more-link {
  text-decoration: none;
  color: var(--green-polije);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.3s;
}

.read-more-link:hover {
  color: var(--orange-cta);
  gap: 12px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.page-link {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  border: 1px solid #ddd;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: 0.3s;
  background: var(--white);
  cursor: pointer;
}

.page-link:hover,
.page-link.active {
  background-color: var(--green-polije);
  color: var(--white);
  border-color: var(--green-polije);
}

/* ========== Footer ========== */
footer {
  background-color: var(--green-darker);
  color: var(--white);
  padding: 80px 0 30px 0;
  position: relative;
  overflow: hidden;
}

/* Tekstur lembut di footer (opasitas rendah) */
footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://www.transparenttextures.com/patterns/cubes.png');
  opacity: 0.03;
  pointer-events: none;
}

/* Grid footer */
.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 60px;
  position: relative;
  z-index: 1;
}

/* Logo di footer */
.f-logo-flex {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.f-logo-circle {
  width: 60px;
  height: 60px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.f-logo-circle img {
  width: 40px;
  height: auto;
}

.f-brand-name {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1px;
}

.f-desc {
  font-size: 0.95rem;
  opacity: 0.7;
  line-height: 1.8;
  margin-bottom: 30px;
}

/* Sosial & link footer */
.f-socials {
  display: flex;
  gap: 15px;
}

.social-link {
  width: 45px;
  height: 45px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--white);
  text-decoration: none;
  transition: 0.3s;
}

.social-link:hover {
  background: var(--orange-cta);
  border-color: var(--orange-cta);
  transform: translateY(-3px);
}

.f-heading {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 30px;
  position: relative;
  display: inline-block;
}

.f-heading::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--orange-cta);
}

.f-links ul,
.f-contact ul {
  list-style: none;
  padding: 0;
}

.f-links li {
  margin-bottom: 15px;
}

.f-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.95rem;
  transition: 0.3s;
  display: inline-flex;
  align-items: center;
}

.f-links a:hover {
  color: var(--white);
  padding-left: 8px;
}

.f-links a::before {
  content: '\203A';
  margin-right: 8px;
  color: var(--orange-cta);
  opacity: 0;
  transition: 0.3s;
  transform: translateX(-5px);
}

.f-links a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.f-contact li {
  margin-bottom: 25px;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  transition: 0.3s;
}

.contact-row:hover {
  color: var(--orange-cta);
}

.contact-row i {
  font-size: 1.3rem;
  color: var(--orange-cta);
  margin-top: 3px;
}

.contact-text h5 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 3px;
  color: var(--white);
}

.contact-text span {
  font-size: 0.9rem;
  opacity: 0.8;
  line-height: 1.5;
  display: block;
}

.newsletter-form input {
  width: 100%;
  padding: 15px 20px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  outline: none;
}

.newsletter-btn {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 40px;
  height: 40px;
  background: var(--orange-cta);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: 0.3s;
}

.newsletter-btn:hover {
  background: #a84d31;
  transform: rotate(15deg);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.6;
}

/* ========== Animasi ========== */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== Responsif (mobile) ========== */
@media (max-width: 768px) {
  /* Tampilkan tombol hamburger di layar kecil */
  .hamburger {
    display: block;
  }

  /* Menu navigasi yang muncul setelah klik hamburger */
  .nav-right {
    display: none; /* default disembunyikan */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--green-polije);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }

  /* Tambahkan kelas .active via JS untuk menampilkan menu */
  .nav-right.active {
    display: flex;
    animation: fadeIn 0.3s ease;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 15px;
    align-items: flex-start;
  }

  .nav-links > li {
    width: 100%;
  }

  .nav-links > li > a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  /* Sub-menu dropdown di mobile menjadi blok vertikal */
  .dropdown-menu {
    display: block;
    height: auto;
  }

  .dropdown-content {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.1);
    margin-top: 5px;
    padding-left: 15px;
  }

  .dropdown-content::before {
    display: none;
  }

  .user-btn {
    margin-top: 20px;
  }

  /* Penyesuaian footer pada perangkat kecil */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .f-col {
    text-align: center;
  }

  .f-heading::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .f-logo-flex,
  .f-socials,
  .contact-row,
  .f-links a {
    justify-content: center;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }
}
