/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  font-family: "Montserrat", sans-serif;
  height: 100%;
  background-color: #f4f4f4;
}

/* HEADER */
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;
}

.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;
}

.nav-menu a:hover {
  transform: scale(1.05);
  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;
}

/* HERO SECTION */
.kontak-hero {
  background: linear-gradient(180deg, #431650 55%, #ffd25d 300%);
  color: white;
  padding: 400px 20px 80px;
  text-align: center;
  position: relative;
}

.kontak-hero h1 {
  font-size: 42px;
  font-weight: 700;
  margin-top: -180px;
}

.hiasan {
  position: absolute;
  width: 50px;
  opacity: 0.8;
  z-index: 0;
}

.hiasan-1 {
  top: -10px;
  left: 270px;
  width: 1000px;
}

/* KALENDER */
.kalender-peminjaman {
  padding: 60px 20px;
  background-color: #ffffff;
}

.kalender-box {
  max-width: 1000px;
  margin: 0 auto;
  background: #fff;
  border-radius: 30px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  padding: 30px;
  margin-top: -160px;
  position: relative;
  z-index: 1;
}

/* HEADER KALENDER + TOMBOL TOGGLE */
.kalender-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  position: relative;
}

.kalender-header .center-title-wrapper {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 20px;
}

.kalender-header h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}

.nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav-btn img {
  width: 24px;
  height: 24px;
}

.view-toggle {
  display: flex;
  gap: 8px;
  margin-left: auto;
  z-index: 2;
}

.view-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #e0e0e0;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: 500;
  cursor: pointer;
  font-size: 14px;
}

.view-btn img {
  width: 16px;
  height: 16px;
}

.view-btn.active {
  background-color: #ffd25d;
}

.kalender-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.kalender-table th,
.kalender-table td {
  border: 1px solid #5d2d74;
  width: 14.28%;
  height: 100px;
  vertical-align: top;
  text-align: left;
  padding: 8px;
  position: relative;
}

.kalender-table th {
  background-color: #f2e8f5;
  font-weight: 600;
  text-align: center;
}

.kalender-table td span {
  position: absolute;
  top: 8px;
  left: 10px;
  font-weight: bold;
  font-size: 14px;
}

.kalender-table td::before {
  content: "";
  display: block;
  padding-top: 100%;
}

.kalender-table td.nonaktif {
  background-color: #ffffff;
  color: #cbcbcb;
}

.label {
  font-size: 10px;
  padding: 5px 40px;
  border-radius: 10px;
  font-weight: 500;
  text-align: center;
  width: fit-content;
  max-width: 100%;
  word-wrap: break-word;
}

.label.green {
  background-color: #8aff85;
  color: #000;
}

.label.yellow {
  background-color: #ffeb85;
  color: #000;
}
.label.red {
  background-color: #ff2525;
  color: #000000;
}

.label-wrapper {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* POPUP */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-content {
  background: white;
  padding: 30px;
  border-radius: 20px;
  width: 80%;
  max-width: 500px;
  position: relative;
  text-align: left;
}

.popup-close {
  position: absolute;
  top: -10px;
  right: -10px;
  background: red;
  color: white;
  font-size: 20px;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.highlight {
  background-color: #8aff85;
  padding: 3px 5px;
  border-radius: 5px;
  font-weight: 600;
}

.popup-content .event-block {
  margin-bottom: 20px;
}

.popup-content .event-block:last-child {
  margin-bottom: 0;
}
.highlight.green {
  background-color: #8aff85;
  color: #000;
}
.highlight.yellow {
  background-color: #ffeb85;
  color: #000;
}
.highlight.red {
  background-color: #ff2525;
  color: #000000;
}

.popup-card {
  background: white;
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  position: relative;
  margin-bottom: 20px;
}

.popup-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #000;
}

.popup-info {
  display: flex;
  flex-wrap: wrap;
  margin-top: 12px;
  gap: 12px;
}

.popup-info-item {
  background: #f0f0f0;
  padding: 8px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 14px;
}

.popup-info-item img {
  width: 20px;
  height: 20px;
}

.popup-info-item.status.green {
  background-color: #8aff85;
}

.popup-info-item.status.yellow {
  background-color: #ffd25d;
}

.popup-info-item.status.red {
  background-color: #ff2525;
}

.popup-close-inner {
  position: absolute;
  top: -15px;
  right: -15px;
  background: #ff2525;
  color: white;
  font-size: 20px;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}
.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;
}
.list-view {
  padding-top: 20px;
  display: none;
}

.list-date-group {
  background: #f2e8f5;
  margin-bottom: 20px;
  padding: 15px;
  border-left: 5px solid #5d2d74;
  border-radius: 8px;
}

.list-date-group h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 5px;
}

.day-name {
  font-size: 14px;
  color: #777;
  margin-bottom: 10px;
}

.list-card {
  background: #fff;
  border: 1px solid #ddd;
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
}

.list-info h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.list-info p {
  margin: 5px 0 0;
  font-size: 14px;
  color: #555;
}

.list-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.list-meta .jam {
  background: #e0e0e0;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
}

.list-meta .status {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-transform: capitalize;
  color: #000;
}

.status.green {
  background-color: #8aff85;
}

.status.yellow {
  background-color: #ffd25d;
}

.status.red {
  background-color: #ff2525;
}
.list-meta .jam {
  background: #e0e0e0;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.list-meta .jam img {
  width: 16px;
  height: 16px;
}
/* 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;
  }
  .kontak-hero {
    padding: 200px 20px 60px;
  }

  .kontak-hero h1 {
    font-size: 20px;
    margin-top: -100px;
  }

  .hiasan-1 {
    width: 100%;
    top: 0;
    left: 0;
  }
  .kalender-box {
    padding: 20px 15px;
    margin-top: -100px;
    border-radius: 20px;
  }

  .kalender-header h2 {
    font-size: 18px;
  }

  .nav-btn img {
    width: 18px;
    height: 18px;
  }

  .view-btn {
    padding: 4px 8px;
    font-size: 12px;
  }

  .view-btn img {
    width: 10px;
    height: 10px;
  }

  .kalender-table th,
  .kalender-table td {
    height: 50px;
    padding: 4px;
  }

  .kalender-table td span {
    font-size: 12px;
    top: 4px;
    left: 6px;
  }

  .label {
    font-size: 6px;
    padding: 3px 10px;
    border-radius: 8px;
  }

  .label-wrapper {
    top: 20px;
    gap: 4px;
  }
  .kalender-header .center-title-wrapper {
    position: static;
    transform: none;
    justify-content: center;
    width: 100%;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
  }
}
html,
body {
  overflow-x: hidden;
}
.label-more {
  font-size: 12px;
  color: #555;
  margin-top: 2px;
  cursor: pointer;
}
.popup-content {
  max-height: 500px; /* agar bisa scroll ke bawah */
  overflow-y: auto; /* hanya scroll vertikal */
  overflow-x: hidden; /* hilangkan scroll horizontal */
  padding: 20px;
  box-sizing: border-box;
  word-wrap: break-word; /* supaya teks panjang tidak meluber */
}
.popup-content * {
  max-width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
}
#popupClose {
  display: none;
}
