/* ===== COMPACT JOURNAL DISPLAY (Homepage) ===== */

.journal-item {
  background-color: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  margin-bottom: 15px;
  display: flex;
  gap: 15px;
  transition: all 0.3s ease;
  position: relative;
  max-height: 180px;
}

.journal-item:hover {
  transform: translateX(3px);
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.journal-thumbnail {
  width: 120px;
  height: 150px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.journal-thumbnail:hover {
  transform: scale(1.03);
}

.journal-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.journal-meta {
  font-size: 11px;
  color: #999;
  margin-bottom: 5px;
}



.journal-description {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-height: 2.8em;
}

.file-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #2196f3;
  color: white;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}

.journal-actions {
  display: flex;
  gap: 8px;
  margin-top: 0;
}

.btn-edit,
.btn-delete {
  padding: 6px 12px;
  background: transparent;
  color: #3b82f6;
  border: 1.5px solid #3b82f6;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.3s ease;
  min-width: 70px;
  justify-content: center;
}

.btn-edit {
  background: linear-gradient(135deg, #2196f3, #64b5f6);
  color: white;
}

.btn-edit:hover {
  background: linear-gradient(135deg, #1976d2, #42a5f5);
  transform: translateY(-1px);
}

.btn-delete {
  background: linear-gradient(135deg, #f44336, #e91e63);
  color: white;
}

.btn-delete:hover {
  background: linear-gradient(135deg, #d32f2f, #c2185b);
  transform: translateY(-1px);
}


.btn-edit svg,
.btn-delete svg {
  width: 13px;
  height: 13px;
}

/* View All Button */
.view-all-container {
  display: flex;
  justify-content: center;
  margin-top: 25px;
  padding-top: 25px;
  border-top: 2px solid #f0f0f0;
}

.btn-view-all {
  background: transparent;
  color: #3b82f6;
  padding: 10px 30px;
  border: 1.5px solid #3b82f6;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.btn-view-all:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-view-all i {
  width: 18px;
  height: 18px;
}

/* ===== CENTER NAVBAR ===== */
.nav-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  flex: 1;
  margin: 0 auto;
}

/* ===== FULL JOURNAL PAGE ===== */

/* Filter Section */
.filter-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
  padding: 15px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-row-top {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.filter-row-bottom {
  display: flex;
  justify-content: flex-end;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  background: #f5f5f5;
  border-radius: 8px;
  transition: all 0.3s;
}

.search-box:focus-within {
  background: white;
  box-shadow: 0 0 0 2px #2c3e50;
}

.search-box input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  font-family: "Inter", sans-serif;
}

.search-box i {
  width: 18px;
  height: 18px;
  color: #666;
}

.filter-stats {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

/* Journal List Full Page */
.journal-list-full {
  margin-bottom: 40px;
}

.journal-list-full .journal-item {
  max-height: none;
  height: auto;
}

.journal-list-full .journal-thumbnail {
  width: 140px;
  height: 180px;
}

/* ===== SHARE BUTTON ===== */
.btn-share {
  background: transparent;
  color: #3b82f6;
  padding: 10px 20px;
  border: 1.5px solid #3b82f6;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  width: 100%;
}

.btn-share:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-share svg {
  width: 18px;
  height: 18px;
}

/* Journal Card - Clickable Cover */
.journal-cover {
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.journal-cover:hover {
  transform: scale(1.02);
}

.journal-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Pagination */
.pagination-section {
  display: flex;
  justify-content: center;
  margin: 40px 0;
}

.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pagination-item, .pagination-btn {
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  background: white;
  color: #64748b;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  min-width: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pagination-item:hover, .pagination-btn:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #3b82f6;
  color: #3b82f6;
  transform: translateY(-1px);
}

.pagination-item.active, .pagination-btn.active {
  background: #3b82f6 !important;
  color: white !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.25);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f1f5f9;
}

.pagination-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Back Button */
.back-section {
  margin-top: 40px;
  border-top: 2px solid #f0f0f0;
  padding-top: 20px;
}

.btn-back {
  background: transparent;
  color: #2c3e50;
  padding: 8px 8px;
  border: 1.5px solid #2c3e50;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-back:hover {
  background: #2c3e50;
  color: white;
  transform: translateX(-3px);
}

.btn-back i {
  width: 8px;
  height: 8px;
}

/* ===== COVER PREVIEW FIXED ===== */

.cover-preview {
  position: relative;
  width: 200px;
  height: 260px;
  margin: 20px auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cover-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.remove-cover-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(244, 67, 54, 0.9);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.remove-cover-btn:hover {
  background: #f44336;
  transform: scale(1.1);
}

.remove-cover-btn svg {
  width: 20px;
  height: 20px;
  color: white;
}

.pengurus-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.pengurus-input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  font-family: "Inter", sans-serif;
  transition: all 0.2s;
}

.pengurus-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ===== ICON SORT DROPDOWN ===== */
.sort-dropdown {
  position: relative;
}

.btn-icon-sort {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid #2c3e50;
  background: transparent;
  color: #2c3e50;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-icon-sort:hover {
  background: #2c3e50;
  color: white;
  transform: scale(1.05);
}

.btn-icon-sort svg {
  width: 20px;
  height: 20px;
}

/* Dropdown Menu */
.sort-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 100;
  overflow: hidden;
}

.sort-dropdown.active .sort-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sort-item {
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  font-family: "Inter", sans-serif;
  text-align: left;
}

.sort-item:hover {
  background: #f5f5f5;
}

.sort-item.active {
  background: #2c3e50;
  color: white;
}

.sort-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Container nav di bawah grid artikel */
#latestArticlesNavUser,
#latestArticlesNavAdmin {
  margin-top: 24px;
  text-align: center;
}

/* Tombol Lihat semua artikel */
.btn-preview {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  color: #3b82f6;
  border: 1.5px solid #3b82f6;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-preview:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}

.btn-see-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 30px;
  border: 1.5px solid #3b82f6;
  background: transparent;
  color: #3b82f6;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-see-all:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.25);
}

.btn-see-all:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* ===== MOBILE RESPONSIVE (MAX 768PX) ===== */
@media (max-width: 768px) {
  .btn-see-all {
    width: 100%;
    max-width: 260px;
  }

  /* Prevent scroll when menu open */
  body.menu-open {
    overflow: hidden;
  }

  /* Header adjustments */
  .header-container {
    padding: 15px 20px;
  }

  /* Journal items responsive */
  .journal-item {
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    max-height: none;
  }

  .journal-thumbnail {
    width: 100%;
    height: 180px;
  }

  /* Filter Section Mobile */
  .filter-section {
    flex-direction: column;
    gap: 12px;
    padding: 12px 15px;
  }

  .filter-row-top {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .filter-row-bottom {
    display: flex;
    justify-content: center;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
  }

  .filter-group {
    width: 100%;
  }

  .filter-group select {
    width: 100%;
  }

  /* Search Box Mobile */
  .search-box {
    flex: 1;
    min-width: 0;
    display: flex !important;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 8px;
  }

  .search-box input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    font-family: "Inter", sans-serif;
  }

  .search-box i {
    width: 16px;
    height: 16px;
    color: #666;
    flex-shrink: 0;
  }

  .filter-stats {
    font-size: 13px;
    text-align: center;
  }

  /* Journal actions responsive */
  .card-actions {
    flex-wrap: wrap;
  }


  .btn-edit,
  .btn-delete,
  .btn-share {
    flex: 1;
    min-width: 60px;
  }

  /* ICON SORT DROPDOWN MOBILE */
  .filter-group .sort-dropdown {
    width: auto;
    flex-shrink: 0;
  }

  .sort-dropdown {
    position: static;
  }
  .btn-icon-sort {
    width: 44px;
    height: 44px;
  }

  .btn-icon-sort svg {
    width: 22px;
    height: 22px;
  }

  .sort-menu {
    position: fixed !important;
    top: auto !important;
    left: 15px !important;
    right: 15px !important;
    width: calc(100% - 30px) !important;
    max-width: 100% !important;
    margin-top: 4px;
  }

  .sort-item {
    padding: 14px 16px;
    font-size: 15px;
  }

  .sort-item svg {
    width: 20px;
    height: 20px;
  }
}

/* =========================================
   Universal Action Buttons & Dropdown Styles
   Overrides the old js inline injected logic
   ========================================= */

.dropdown-menu-container {
    position: relative;
}

.card-actions {
    display: flex !important;
    justify-content: flex-end;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.2s;
    color: #666;
}

.dropdown-toggle:hover {
    background: #f0f0f0;
}

.dropdown-toggle feather-icon,
.dropdown-toggle svg {
    width: 20px;
    height: 20px;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    bottom: 100%;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 140px;
    padding: 4px 0;
    margin-bottom: 4px;
}

.dropdown-item-btn {
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    transition: background 0.2s;
}

.dropdown-item-btn:hover {
    background: #f5f5f5;
}

.dropdown-item-btn feather-icon,
.dropdown-item-btn svg {
    width: 14px;
    height: 14px;
}

.dropdown-item-btn.dd-detail,
.dropdown-item-btn.dd-download {
    color: #3b82f6;
}

.dropdown-item-btn.dd-edit {
    color: #f39c12;
}

.dropdown-item-btn.dd-delete {
    color: #e74c3c;
}

.dropdown-item-btn.dd-share {
    color: #27ae60;
}

/* Modal share buttons */
.share-btn-modal {
    width: 100%;
    padding: 10px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.share-btn-modal:hover {
    opacity: 0.9;
}

.share-btn-modal feather-icon,
.share-btn-modal svg {
    width: 16px;
    height: 16px;
}

.share-btn-modal.copy { background: transparent; color:#3b82f6; border:1.5px solid #3b82f6; }
.share-btn-modal.wa { background: #25d366; }
.share-btn-modal.fb { background: #1877f2; }
.share-btn-modal.x { background: #000000; }