* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  font-family: "Montserrat", sans-serif;
  height: 100%;
}

header {
  background-color: #431650;
  padding: 20px 40px;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

.container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  width: 40px;
}

.logo span {
  color: white;
  font-weight: bold;
  font-size: 18px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

nav ul li a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  font-size: 16px;
}

nav ul li a.active {
  font-weight: bold;
  border-bottom: 3px solid #ffd25d;
}

.hero {
  position: relative;
  height: 100vh;
  background: linear-gradient(
      to bottom,
      rgba(67, 22, 80, 0.9) 0%,
      rgba(67, 22, 80, 0.8) 60%,
      rgba(255, 255, 255, 0.5) 100%
    ),
    url("img/polmed.jpg") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 1;
}

.hero .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(75, 0, 110, 0.9), rgba(75, 0, 110, 0.9));
  z-index: 1;
}

.hero-text {
  color: white;
  z-index: 2;
  position: relative;
}

.hero-text .subtitle {
  font-size: 20px;
  margin-bottom: 10px;
}

.hero-text h1 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 10px;
}

.hero-text .description {
  font-size: 22px;
}

.about {
  background-color: #f7f2fd;
  padding: 50px 40px;
  border-radius: 25px;
  max-width: 97%;
  margin: 30px auto 0 auto;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.25); /* ⬅️ Opacity shadow dinaikkan */
}

.about-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.about-text {
  flex: 1 1 60%;
  padding: 20px;
}

.about-text .judul-utama {
  font-size: 28px;
  color: #431650;
  margin-bottom: 0;
}

.about-text .judul-sub {
  margin-top: 5px;
  font-size: 28px;
}

.about-text .highlight {
  background-color: #f7c439;
  padding: 2px 8px;
  color: #431650;
  font-weight: bold;
}

.about-text p {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin-top: 20px;
}

.about-image {
  flex: 1 1 35%;
  text-align: center;
}

.about-image img {
  max-width: 100%;
  height: auto;
}

.visi-misi {
  background-color: #f7f2fd;
  padding: 60px 20px;
  border-radius: 25px;
  max-width: 97%;
  margin: 50px auto;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.25);
}

.visi-misi-wrapper {
  text-align: center;
}

.logo-kabinet img {
  width: 300px;
  margin-bottom: 10px;
  filter: drop-shadow(0 0px 4px rgba(0, 0, 0, 0.3));
}

.logo-kabinet h2 {
  color: #431650;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 5px;
}

.periode {
  font-size: 18px;
  color: #333;
  margin-bottom: 40px;
}

.visi-box,
.misi-box {
  margin: 20px 0;
}

.title {
  background-color: #431650;
  color: white;
  padding: 10px 400px;
  display: inline-block;
  border-radius: 12px;
  font-size: 20px;
  margin-bottom: 20px;
  max-width: 100%;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  .title {
    font-size: 16px;
    padding: 10px 150px;
    text-align: center;
  }
}

.visi-text {
  max-width: 750px;
  margin: 0 auto;
  font-size: 16px;
  color: #333;
  line-height: 1.7;
}

.misi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px; /* bisa jadi 10px jika mau lebih rapat */
  justify-content: center;
  max-width: 860px; /* atur lebar maksimal grid agar tidak terlalu luas */
  margin: 0 auto; /* untuk posisi di tengah */
  margin-top: 30px;
}

.misi-card {
  background-color: white;
  border-radius: 18px;
  padding: 25px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
  min-height: 170px;
}

.misi-card img {
  width: 70px;
  margin-bottom: 15px;
}

.misi-card p {
  font-size: 14px;
  color: #333;
}

/* Warna Kartu */
.purple {
  background-color: #e9d8fd;
}
.yellow {
  background-color: #fdeecb;
}
.violet {
  background-color: #ddd6fe;
}
.beige {
  background-color: #fdeecb;
}
.light-purple {
  background-color: #ede9fe;
}
.orange {
  background-color: #fdeecb;
}

.kementerian {
  display: flex;
  flex-direction: column;
  align-items: center; /* ⬅️ memastikan konten di tengah horizontal */
  text-align: center;
  margin: 50px auto;
}

.kementerian-title {
  font-size: 36px; /* Diperbesar */
  font-weight: 700;
  color: #431650;
}

.kementerian-subtitle {
  font-size: 20px; /* Diperbesar */
  font-weight: 500;
  color: #431650;
  margin-bottom: 40px;
}

.kementerian-grid-5,
.kementerian-grid-4 {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  flex-shrink: 0;
  flex-grow: 0;
}

.kementerian-grid-5 {
  max-width: 1200px;
  margin: 0 auto 40px auto;
}

.kementerian-grid-4 {
  max-width: 950px;
  margin: 0 auto;
}

.kementerian-card {
  background-color: white;
  border-radius: 20px;
  padding: 15px 12px 10px; /* ⬅️ lebih kecil */
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  width: 200px;
  text-align: center;
  min-height: 200px; /* ⬅️ agar semua kartu seragam tingginya */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kementerian-card img {
  width: 180px;
  filter: drop-shadow(0 0px 3px rgba(0, 0, 0, 0.3));
  /* 0px biar ditengah
  3px biar tidak terlalu menyebar
  0.3 opacity*/
  margin: 0 auto 10px; /* ⬅️ tengah + jarak bawah */
  display: block; /* ⬅️ agar margin auto bisa bekerja */
}

.kementerian-card p {
  font-weight: bold;
  background-color: #e0caf9;
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 16px;
  color: #431650;
  margin-top: -20px;
}
.kementerian-card.yellow p {
  background-color: #ffd25d;
  color: #431650;
}

.kementerian-card.border-kuning {
  background-color: #f8f1f0;
}

.kementerian-card.purple {
  background-color: #f7f2fd;
}

.footer {
  background-color: #431650;
  color: white;
  padding: 50px 30px 20px;
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  font-family: "Poppins", sans-serif;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto 30px;
  gap: 30px;
}

.footer-left h3,
.footer-right h3 {
  color: #fff;
  font-size: 20px;
  margin-bottom: 10px;
}

.footer-left p {
  font-size: 14px;
  line-height: 1.6;
}

.footer-center {
  text-align: center;
}

.footer-center img.footer-logo {
  width: 130px;
  margin-bottom: 10px;
}

.footer-center p {
  font-size: 18px;
  font-weight: semibold;
}

.footer-center p strong {
  color: white;
}

.social-icons-grid {
  display: grid;
  grid-template-columns: repeat(3, 40px); /* 3 kolom */
  grid-gap: 10px;
  justify-content: center;
  margin-top: 10px;
}

.social-icons-grid img {
  width: 40px;
  height: 40px;
}

.footer hr {
  border: none;
  border-top: 2px solid #ddd;
  margin: 20px 0;
}

.footer-bottom {
  text-align: center;
  font-size: 13px;
  color: #ccc;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  font-weight: 400;
  font-size: 15px;
  padding: 10px;
  display: inline-block;
  position: relative;
}

.nav-menu a:hover {
  transform: scale(1.05); /* efek tebal tanpa geser */
  color: #ffffff;
}

.nav-menu .active {
  color: #ffffff;
  font-weight: 600;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background-color: #ffffff;
  list-style: none;
  min-width: 180px;
  border-radius: 5px;
  z-index: 999;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.dropdown-menu li a {
  padding: 10px 20px;
  display: block;
  color: #431650;
}

.dropdown-menu li a:hover {
  background-color: #9e9e9e;
  border-radius: 5px;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.nav-menu a.active:hover {
  transform: none;
  color: #ffffff;
  cursor: default;
}

.nav-menu li:nth-child(3) a,
.nav-menu li:nth-child(4) a,
.nav-menu li:nth-child(5) a {
  position: relative;
  top: -2px;
}
/* Tombol Toggle Menu untuk Mobile */
.menu-toggle {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 1001;
}
/* Tombol Close (X) di Sidebar */
.close-btn {
  display: none;
  font-size: 28px;
  color: white;
  background: none;
  border: none;
  align-self: flex-end;
  margin-bottom: 20px;
  cursor: pointer;
}

/* Media Query untuk Tampilan Mobile */
@media (max-width: 768px) {
  header {
    position: static;
    width: 100%;
    padding: 10px 20px;
  }
  .close-btn {
    display: block;
  }
  .misi-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 20px;
  }

  .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .menu-toggle {
    display: block;
  }

  nav {
    position: fixed;
    top: 0;
    left: -260px;
    width: 240px;
    height: 100vh;
    background-color: #431650;
    flex-direction: column;
    padding: 60px 20px 20px;
    display: flex;
    transition: all 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
  }

  nav.open {
    left: 0;
  }

  .nav-menu {
    flex-direction: column;
    gap: 20px;
  }

  .nav-menu li {
    width: 100%;
  }

  .dropdown-menu {
    position: relative;
    background-color: #fff;
    box-shadow: none;
    padding-left: 15px;
  }

  .dropdown-menu li a {
    color: #431650;
    padding: 10px 10px;
  }
  .footer {
    padding: 20px 15px 10px;
  }

  .footer-content {
    flex-direction: row; /* biar sejajar */
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 10px;
  }

  .footer-left {
    flex: 1;
    min-width: 100px;
    max-width: 30.33%; /* opsional, biar proporsional */
    text-align: left;
    padding: 0;
  }
  .footer-center {
    flex: 1;
    min-width: 100px;
    max-width: 30.33%; /* opsional, biar proporsional */
    text-align: center;
    padding: 0;
  }
  .footer-right {
    flex: 1;
    min-width: 100px;
    max-width: 30.33%; /* opsional, biar proporsional */
    text-align: right;
    padding: 0;
  }

  .footer-left h3,
  .footer-right h3 {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .footer-left p {
    font-size: 8px;
    line-height: 1.4;
  }
  .footer-right p,
  .footer-center p {
    font-size: 11px;
    line-height: 1.4;
  }

  .footer-center img.footer-logo {
    width: 80px;
    margin-bottom: 5px;
  }

  .social-icons-grid {
    grid-template-columns: repeat(3, 26px);
    grid-gap: 6px;
    justify-content: flex-start;
    margin-top: 6px;
  }

  .social-icons-grid img {
    width: 26px;
    height: 26px;
  }

  .footer-bottom {
    font-size: 10px;
    text-align: center;
    padding: 0 10px;
  }
  .hero {
    height: 87vh; /* Ubah tinggi hero agar tidak terlalu besar */
    background-position: center;
    background-size: cover;
    padding: 40px 20px;
  }

  .hero-text h1 {
    font-size: 27px; /* Perkecil ukuran judul */
  }

  .hero-text .subtitle {
    font-size: 19px;
  }

  .hero-text .description {
    font-size: 16px;
    padding: 0 10px;
  }
}

html,
body {
  overflow-x: hidden;
}
.kementerian-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.kementerian-grid-5 a,
.kementerian-grid-4 a {
  display: flex; /* pastikan kartu tidak menjadi inline */
}
