/* ============================================
   INFOGRAFIS DETAIL - MINIMAL STYLE
   ============================================ */

/* Container spacing - untuk jarak dari navbar floating */
.container-xxl.flex-grow-1.container-p-y {
  padding-top: 9rem !important;
  margin-top: 0 !important;
}

/* Tambahan untuk memastikan tidak tertutup navbar */
.layout-page {
  padding-top: 9rem !important;
}

.content-wrapper {
  padding-top: 2rem !important;
}

/* Breadcrumb Minimal */
.breadcrumb-minimal {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #999;
  margin-top: 3rem;
  margin-bottom: 2rem;
}

.breadcrumb-minimal a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-minimal a:hover {
  color: #696cff;
}

.breadcrumb-minimal span:last-child {
  color: #333;
  font-weight: 500;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Image Container - Reduced Size */
.detail-image-container {
  position: relative;
  width: 100%;
  max-height: 500px;
  margin-bottom: 2rem;
  border-radius: 16px;
  overflow: hidden;
  background: #f5f5f9;
}

.detail-image-container img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
}

/* Badges on Image */
.detail-badge {
  position: absolute;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.detail-badge-featured {
  top: 1.5rem;
  left: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.detail-badge-category {
  top: 1.5rem;
  right: 1.5rem;
}

.detail-badge-featured ~ .detail-badge-category {
  top: 4rem;
}

/* Header */
.detail-header {
  margin-bottom: 2.5rem;
}

.detail-header h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  color: #2c2c3e;
  margin: 0 0 1rem 0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: #999;
  margin-bottom: 1rem;
}

.detail-meta span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.detail-meta i {
  font-size: 1rem;
}

.detail-organization {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: #f8f9fa;
  border-radius: 10px;
  font-size: 0.875rem;
  color: #5d596c;
}

.detail-organization i {
  font-size: 1.125rem;
  color: #696cff;
}

/* Section */
.detail-section {
  margin-bottom: 2.5rem;
}

.detail-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2c2c3e;
  margin-bottom: 1rem;
}

.detail-content {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #5d596c;
  text-align: justify;
}

.detail-content p {
  margin-bottom: 1rem;
}

/* Gallery */
.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-item {
  position: relative;
  padding-bottom: 100%;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #f5f5f9;
}

.gallery-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Info Grid */
.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.info-box {
  padding: 1.25rem;
  background: #f8f9fa;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.info-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #999;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 0.9375rem;
  color: #2c2c3e;
  font-weight: 500;
}

/* Tags */
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.detail-tags span {
  padding: 0.5rem 1rem;
  background: #f8f9fa;
  color: #666;
  border-radius: 12px;
  font-size: 0.875rem;
  transition: all 0.2s;
  cursor: pointer;
}

.detail-tags span:hover {
  background: #696cff;
  color: white;
}

/* Share */
.detail-share {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: #f8f9fa;
  border-radius: 12px;
  margin-bottom: 3rem;
}

.detail-share > span {
  font-size: 0.875rem;
  font-weight: 600;
  color: #5d596c;
}

.share-links {
  display: flex;
  gap: 0.5rem;
}

.share-links a,
.share-links button {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: white;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.share-links a:hover,
.share-links button:hover {
  background: #696cff;
  color: white;
  transform: translateY(-2px);
}

.share-links i {
  font-size: 1.25rem;
}

/* Related */
.detail-related {
  margin-bottom: 3rem;
}

.detail-related h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2c2c3e;
  margin-bottom: 1.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.related-item {
  display: block;
  text-decoration: none;
  transition: transform 0.3s;
}

.related-item:hover {
  transform: translateY(-8px);
}

.related-image {
  position: relative;
  padding-bottom: 75%;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f9;
  margin-bottom: 0.75rem;
}

.related-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.related-item:hover .related-image img {
  transform: scale(1.05);
}

.related-item h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #2c2c3e;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-item:hover h3 {
  color: #696cff;
}

.related-item span {
  font-size: 0.8125rem;
  color: #999;
}

/* Sidebar */
.download-card {
  display: block;
  padding: 1rem;
  background: linear-gradient(135deg, #71dd37 0%, #5cb422 100%);
  border-radius: 12px;
  color: white;
  text-decoration: none;
  margin-bottom: 2rem;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(113, 221, 55, 0.2);
  text-align: right;
  font-size: 0.9375rem;
  font-weight: 600;
}

.download-card:hover {
  transform: translateY(-2px);
  color: white;
  box-shadow: 0 4px 12px rgba(113, 221, 55, 0.3);
}

.download-card i {
  display: none;
}

.download-card span {
  font-size: 0.9375rem;
  font-weight: 600;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #2c2c3e;
  margin-bottom: 0.5rem;
}

.sidebar-item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  text-decoration: none;
  transition: transform 0.2s;
}

.sidebar-item:hover {
  transform: translateX(4px);
}

.sidebar-item:last-child {
  margin-bottom: 0;
}

.sidebar-thumb {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f9;
}

.sidebar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.sidebar-item:hover .sidebar-thumb img {
  transform: scale(1.1);
}

.sidebar-text {
  flex: 1;
  min-width: 0;
}

.sidebar-text h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #2c2c3e;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.sidebar-item:hover .sidebar-text h4 {
  color: #696cff;
}

.sidebar-text span {
  font-size: 0.8125rem;
  color: #999;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox .close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 3rem;
  color: white;
  cursor: pointer;
  line-height: 1;
  font-weight: 300;
  transition: opacity 0.2s;
}

.lightbox .close:hover {
  opacity: 0.7;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  animation: zoomIn 0.3s;
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Dark Mode */
[data-bs-theme="dark"] .breadcrumb-minimal a {
  color: #b4b7c5;
}

[data-bs-theme="dark"] .breadcrumb-minimal a:hover {
  color: #696cff;
}

[data-bs-theme="dark"] .breadcrumb-minimal span:last-child {
  color: #d9dbe6;
}

[data-bs-theme="dark"] .detail-image-container {
  background: #1e1e2d;
}

[data-bs-theme="dark"] .detail-header h1 {
  color: #d9dbe6;
}

[data-bs-theme="dark"] .detail-meta {
  color: #7a7e96;
}

[data-bs-theme="dark"] .detail-organization {
  background: #2b2c40;
  color: #b4b7c5;
}

[data-bs-theme="dark"] .detail-section h2 {
  color: #d9dbe6;
}

[data-bs-theme="dark"] .detail-content {
  color: #b4b7c5;
}

[data-bs-theme="dark"] .info-box {
  background: #2b2c40;
}

[data-bs-theme="dark"] .info-label {
  color: #7a7e96;
}

[data-bs-theme="dark"] .info-value {
  color: #d9dbe6;
}

[data-bs-theme="dark"] .detail-tags span {
  background: #2b2c40;
  color: #b4b7c5;
}

[data-bs-theme="dark"] .detail-tags span:hover {
  background: #696cff;
  color: white;
}

[data-bs-theme="dark"] .detail-share {
  background: #2b2c40;
}

[data-bs-theme="dark"] .detail-share > span {
  color: #d9dbe6;
}

[data-bs-theme="dark"] .share-links a,
[data-bs-theme="dark"] .share-links button {
  background: #1e1e2d;
  color: #b4b7c5;
}

[data-bs-theme="dark"] .share-links a:hover,
[data-bs-theme="dark"] .share-links button:hover {
  background: #696cff;
  color: white;
}

[data-bs-theme="dark"] .detail-related h2,
[data-bs-theme="dark"] .sidebar-section h3 {
  color: #d9dbe6;
}

[data-bs-theme="dark"] .related-image,
[data-bs-theme="dark"] .sidebar-thumb,
[data-bs-theme="dark"] .gallery-item {
  background: #1e1e2d;
}

[data-bs-theme="dark"] .related-item h3,
[data-bs-theme="dark"] .sidebar-text h4 {
  color: #d9dbe6;
}

[data-bs-theme="dark"] .related-item:hover h3,
[data-bs-theme="dark"] .sidebar-item:hover .sidebar-text h4 {
  color: #696cff;
}

[data-bs-theme="dark"] .related-item span,
[data-bs-theme="dark"] .sidebar-text span {
  color: #7a7e96;
}

/* Responsive */
@media (max-width: 991.98px) {
  .detail-image-container {
    max-height: 400px;
  }

  .detail-image-container img {
    max-height: 400px;
  }

  .detail-header h1 {
    font-size: 1.5rem;
  }

  .detail-badge {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }

  .detail-badge-featured,
  .detail-badge-category {
    top: 1rem;
  }

  .detail-badge-featured {
    left: 1rem;
  }

  .detail-badge-category {
    right: 1rem;
  }

  .detail-badge-featured ~ .detail-badge-category {
    top: 3rem;
  }

  .download-card {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
  }

  .download-card span {
    font-size: 0.875rem;
  }
}

@media (max-width: 767.98px) {
  .container-xxl.flex-grow-1.container-p-y {
    padding-top: 7rem !important;
  }

  .layout-page {
    padding-top: 7rem !important;
  }

  .breadcrumb-minimal {
    margin-top: 2rem;
  }

  .detail-image-container {
    max-height: 350px;
  }

  .detail-image-container img {
    max-height: 350px;
  }

  .detail-header h1 {
    font-size: 1.25rem;
  }

  .detail-meta {
    font-size: 0.8125rem;
    gap: 1rem;
  }

  .detail-share {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
  }

  .share-links {
    width: 100%;
    justify-content: flex-start;
  }

  .detail-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .detail-info-grid {
    grid-template-columns: 1fr;
  }

  .lightbox .close {
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
  }

  .lightbox img {
    max-width: 95%;
    max-height: 95%;
  }

  .sidebar-thumb {
    width: 60px;
    height: 60px;
  }
}
