/* === RUANGSANTRI THEME EXTENDED CSS === */

/* === MODERN LOGO DESIGN === */
@import url("https://fonts.googleapis.com/css2?family=Expletus+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap");

.logo-modern {
  font-family: "Expletus Sans", monospace;
  font-weight: 700;
  font-size: 2.2rem;
  color: #0d8174;
  text-decoration: none;
  position: relative;
  display: inline-block;
  letter-spacing: -0.02em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-modern::before {
  content: "";
  position: absolute;
  left: -6px; /* lebih dekat ke logo, bisa adjust ke -4px atau -2px sesuai kebutuhan */
  bottom: 5px; /* posisi vertikal, bisa adjust */
  width: 4px;
  height: 80%;
  background: linear-gradient(180deg, #0d8174 0%, #fd7e14 100%);
  border-radius: 2px;
  transform: scaleY(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.18;
  z-index: 1;
  pointer-events: none;
}

.logo-modern:hover::before {
  transform: scaleY(1);
}

.logo-modern:hover {
  color: #0a6b5f;
  text-decoration: none;
  transform: translateX(5px);
}

.logo-modern .logo-name {
  font-weight: 700;
  background: linear-gradient(135deg, #0d8174 0%, #30c0a5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 2;
}

.logo-modern .logo-dot {
  color: #fd7e14;
  font-weight: 900;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

.logo-subtitle {
  font-family: "Expletus Sans", monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: #6c757d;
  margin-top: -2px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  z-index: 2;
}

/* Responsive logo adjustments */
@media (max-width: 991.98px) {
  .logo-modern {
    font-size: 1.8rem;
  }
  .logo-subtitle {
    font-size: 0.65rem;
  }
}

@media (max-width: 575.98px) {
  .logo-modern {
    font-size: 1.5rem;
  }
  .logo-subtitle {
    font-size: 0.6rem;
    margin-top: -1px;
  }
}

/* Alternative compact logo for smaller spaces */
.logo-compact {
  font-family: "Expletus Sans", monospace;
  font-weight: 700;
  font-size: 1.5rem;
  color: #0d8174;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.3s ease;
}

.logo-compact::before {
  content: "<";
  color: #fd7e14;
  font-size: 1.2em;
}

.logo-compact::after {
  content: "/>";
  color: #fd7e14;
  font-size: 1.2em;
}

.logo-compact:hover {
  transform: scale(1.05);
  text-decoration: none;
  color: #0a6b5f;
}

/* Navbar logo specific styling */
.navbar-brand {
  text-decoration: none !important;
  padding: 0.5rem 0;
}

.navbar-brand:hover {
  text-decoration: none !important;
}

.navbar-brand .logo-modern {
  margin-bottom: -2px;
}

.navbar-brand .logo-subtitle {
  margin-top: -4px;
  font-size: 0.65rem;
}

@media (max-width: 575.98px) {
  .navbar-brand .logo-modern {
    font-size: 1.3rem !important;
  }
  .navbar-brand .logo-subtitle {
    font-size: 0.55rem;
    margin-top: -2px;
  }
}

/* === MODERN FOOTER DESIGN === */
.footer {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  border-top: 3px solid #0d8174;
  color: #333 !important;
}

.footer .logo-modern {
  margin-bottom: 0;
}

.footer .logo-modern .logo-name {
  background: linear-gradient(135deg, #0d8174 0%, #30c0a5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer .logo-modern .logo-dot {
  color: #fd7e14;
}

.footer .hover-primary {
  transition: color 0.3s ease;
}

.footer .hover-primary:hover {
  color: #0d8174 !important;
  transform: translateY(-2px);
}

.footer .social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(13, 129, 116, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
  color: #6c757d;
}

.footer .social-links a:hover {
  background: #0d8174;
  color: white !important;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(13, 129, 116, 0.3);
}

.footer .newsletter-form .form-control {
  border-radius: 25px 0 0 25px;
  border: none;
  padding: 12px 16px;
}

.footer .newsletter-form .btn {
  border-radius: 0 25px 25px 0;
  padding: 12px 16px;
  border: none;
}

.footer .footer-tech-stack .badge {
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 12px;
}

.footer h6 {
  position: relative;
  padding-bottom: 8px;
}

.footer h6::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, #0d8174, #30c0a5);
  border-radius: 1px;
}

@media (max-width: 768px) {
  .footer .social-links {
    justify-content: center;
    margin-bottom: 1rem;
  }

  .footer .text-md-end {
    text-align: center !important;
  }

  .footer .footer-tech-stack {
    margin-top: 1rem;
  }
}

/* Card shadow effect (desktop & mobile) */
/* Card shadow effect (desktop & mobile) */
.card.border-0,
.card.border-0.h-100.overflow-hidden,
.masonry-card-featured,
.masonry-card-side {
  box-shadow: 0 1px 2.5px #0d6efd0a;
  transition: border-color 0.22s, box-shadow 0.22s;
}
.masonry-card-featured {
  border-radius: 12px;
  border: 1px solid #f1f3f4;
}
.masonry-card-side {
  border-radius: 8px;
  border: 1px solid #f1f3f4;
}
.position-relative.overflow-hidden.height-400 {
  height: 400px;
}
.position-relative.overflow-hidden.height-180 {
  height: 180px !important;
}
.object-cover {
  object-fit: cover !important;
}
.rounded-3 {
  border-radius: 1rem !important;
}
.rounded-2 {
  border-radius: 0.5rem !important;
}
.rounded-circle {
  border-radius: 50% !important;
}
.border-f1 {
  border: 1px solid #f1f3f4 !important;
}
.border-e4 {
  border: 1.2px solid #e4eaf1 !important;
}
.border-b1 {
  border: 1.1px solid #0d6efd !important;
}
.border-b2 {
  border: 2.2px solid #0d6efd !important;
}
.bg-light {
  background: #f8f9fa !important;
}
.bg-primary {
  background: rgba(13, 110, 253, 0.1) !important;
  color: #0d6efd !important;
}
.badge.bg-primary {
  border: 1.1px solid #0d6efd !important;
  font-weight: 600;
}
.badge.bg-primary:focus,
.badge.bg-primary:active {
  outline: none;
  border: 1.5px solid #0d6efd !important;
}
.badge.bg-light {
  font-size: 0.85rem !important;
  padding: 0.22em 0.85em 0.22em 0.7em !important;
}
.badge.bg-light.text-dark.mb-1 {
  background: rgba(13, 110, 253, 0.07) !important;
  color: #0d6efd !important;
}
.badge.bg-light.text-dark.mb-1:focus,
.badge.bg-light.text-dark.mb-1:active {
  outline: none;
  border: 2px solid #0d6efd !important;
}
.ruang-author-box {
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  background: #fff;
  border-radius: 1.2rem;
  box-shadow: 0 2px 16px #0d6efd0a;
}
.ruang-author-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 50%;
  border: 2.5px solid #e4eaf1;
}
.ruang-author-name {
  font-size: 1.13rem;
  font-weight: 700;
}
.ruang-author-bio {
  font-size: 0.97rem;
  color: #6c757d;
  line-height: 1.5;
  margin-top: 0.1rem;
  max-width: 420px;
}
.ruang-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  font-weight: 500;
  font-size: 1rem;
  border-radius: 999px;
  transition: all 0.16s;
  box-shadow: 0 1px 6px #0d6efd0a;
  padding: 0.36em 1.1em 0.36em 1em;
  background: #fff;
  min-width: 40px;
  min-height: 36px;
  line-height: 1.1;
  margin-bottom: 0;
}

/* Additional styles for responsive design */
@media (max-width: 575.98px) {
  .ruang-share-btn {
    font-size: 0.93rem;
    padding: 0.28em 0.7em 0.28em 0.7em;
    min-width: 34px;
    min-height: 32px;
    margin-bottom: 0.3rem;
  }
  .ruang-share-btn svg {
    width: 18px !important;
    height: 18px !important;
  }
}
.col-lg-4,
.col-lg-4 .bg-white,
.col-lg-4 .p-4,
.col-lg-4 .mb-4 {
  font-size: 0.97rem;
}
.sidebar-article-title {
  font-size: 0.97rem;
  line-height: 1.35;
  margin-bottom: 0.3rem !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.7em;
  max-height: 2.7em;
}
:root {
  --navbar-height: 72px;
}
@media (max-width: 991.98px) {
  :root {
    --navbar-height: 60px;
  }
}
.ruang-sticky-sidebar {
  top: calc(var(--navbar-height) + 18px) !important;
}
.meta-modern {
  color: #222;
  font-size: 0.83rem;
  opacity: 0.92;
  font-weight: 500;
  gap: 0.32rem;
  background: rgba(13, 110, 253, 0.06);
  border-radius: 2rem;
  padding: 0.18em 0.8em 0.18em 0.6em;
  box-shadow: 0 1px 8px #0d6efd0a;
  transition: background 0.18s;
  line-height: 1.6;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.meta-modern .meta-date {
  letter-spacing: 0.01em;
  font-size: 0.78rem;
  color: #0d6efd;
  font-weight: 600;
}
.meta-modern .meta-icon {
  width: 2em;
  height: 2em;
  background: #eaf1ff;
  box-shadow: 0 1px 4px #0d6efd11;
  margin-right: 0.5em;
}
@media (max-width: 575.98px) {
  .meta-modern {
    font-size: 0.79rem;
    gap: 0.18rem;
    padding: 0.16em 0.6em 0.16em 0.4em;
  }
  .meta-modern .meta-date {
    font-size: 0.72rem;
  }
  .meta-modern .meta-icon {
    width: 1.5em;
    height: 1.5em;
    margin-right: 0.3em;
  }
  .meta-modern svg {
    width: 14px;
    height: 14px;
    margin-right: 4px !important;
  }
}
.article-content {
  font-size: 1rem;
  line-height: 1.8;
  color: #2c3e50;
  font-family: "Archivo", Arial, "Segoe UI", sans-serif;
  overflow-wrap: break-word;
  word-wrap: break-word;
  overflow-x: hidden;
}

.article-content img {
  max-width: 100% !important;
  height: auto !important;
}

.article-content table {
  word-wrap: break-word;
  table-layout: auto;
  width: 100%;
  overflow-x: auto;
  display: block;
  white-space: nowrap;
}

/* Default for regular pre tags */
.article-content pre {
  overflow-x: auto !important;
  max-width: 100% !important;
  word-wrap: break-word !important;
  white-space: pre-wrap !important;
}

/* Strong override for hljs code blocks to maintain proper formatting */
.article-content pre.hljs,
.article-content pre code.hljs,
.article-content pre > code.hljs,
.article-content .hljs,
.hljs {
  white-space: pre !important;
  word-wrap: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  overflow-x: auto !important;
}

/* Ensure inline code doesn't break unnecessarily */
.article-content code:not(.hljs) {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}

.article-content * {
  max-width: 100%;
  box-sizing: border-box;
}

/* Force hljs code blocks to never wrap - highest priority */
pre code.hljs,
pre.hljs,
code.hljs,
.hljs {
  white-space: pre !important;
  word-wrap: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  overflow-x: auto !important;
}
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
}
.article-content p {
  margin-bottom: 1.5rem;
}
.article-content ul,
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}
.article-content blockquote {
  border-left: 4px solid #007bff;
  background: #f8f9fa;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0.375rem;
}

@media (max-width: 991.98px) {
  .sticky-top,
  .ruang-sticky-sidebar {
    position: static !important;
    top: auto !important;
  }
}
@media (max-width: 575.98px) {
  .p-4 {
    padding: 1rem !important;
  }
  .mb-4 {
    margin-bottom: 1rem !important;
  }
  .mb-5 {
    margin-bottom: 1.2rem !important;
  }
  .mt-5,
  .pt-5 {
    margin-top: 1.2rem !important;
    padding-top: 1.2rem !important;
  }
  .article-content {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    overflow-x: hidden;
  }

  .article-content img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  .article-content table {
    font-size: 0.85rem;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .article-content pre {
    font-size: 0.75rem !important;
    padding: 0.5rem !important;
    margin: 0.5rem 0 !important;
    overflow-x: auto !important;
    white-space: pre !important;
  }

  /* Ensure hljs code blocks maintain proper formatting on mobile */
  .article-content pre.hljs,
  .article-content pre code.hljs,
  .article-content pre > code.hljs,
  .article-content .hljs,
  .hljs {
    font-size: 0.7rem !important;
    white-space: pre !important;
    word-wrap: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    line-height: 1.4 !important;
    overflow-x: auto !important;
  }

  /* Mobile inline code styling */
  .article-content code:not(.hljs) {
    font-size: 0.8rem !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
  }
}
.sidebar-article-title ~ small.text-muted,
.d-flex.flex-column.gap-3 small.text-muted {
  font-size: 0.81rem !important;
}
.card.border-0 {
  border: 1px solid #f1f3f4;
  transition: border-color 0.25s, box-shadow 0.25s;
}
/* No hover/focus shadow or border effect for masonry cards */
@media (max-width: 575.98px) {
  .container.py-5 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
  .row.mb-4 {
    margin-bottom: 1rem !important;
  }
  .card.border-0 {
    min-width: 0;
    border-radius: 6px;
  }
  .card-body.p-3 {
    padding: 1rem !important;
  }
  .badge.bg-light.text-dark.mb-2 {
    font-size: 0.7rem !important;
    padding: 0.3em 0.7em !important;
  }
  .h3,
  h2.fw-bold {
    font-size: 1.25rem !important;
  }
  .h6.fw-bold {
    font-size: 1rem !important;
  }
  .modern-pagination {
    gap: 0.25rem;
  }
  .modern-page-link {
    min-width: 32px;
    height: 32px;
    line-height: 32px;
    font-size: 0.95rem;
  }
  .row.g-4 > [class^="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .position-relative.overflow-hidden[style*="height: 200px;"] {
    height: 140px !important;
  }
}

.modern-pagination {
  gap: 0.5rem;
  padding: 0;
}
.modern-pagination li {
  list-style: none;
}
.modern-page-link {
  display: inline-block;
  min-width: 38px;
  height: 38px;
  line-height: 38px;
  text-align: center;
  border-radius: 50%;
  background: #fff;
  color: #0d6efd;
  border: 1.5px solid #e3e6ee;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 4px #0d6efd09;
  text-decoration: none;
  margin: 0 2px;
  position: relative;
}
.modern-page-link:hover,
.modern-page-link:focus {
  background: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
  box-shadow: 0 2px 12px #0d6efd22;
  text-decoration: none;
}
.modern-page-link.active {
  background: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
  box-shadow: 0 2px 12px #0d6efd22;
  cursor: default;
}
.modern-page-link.disabled {
  background: #f8f9fa;
  color: #b0b8c9;
  border-color: #e3e6ee;
  cursor: not-allowed;
  pointer-events: none;
}

/* === ARABIC TEXT SUPPORT === */
/* Arabic text styling using Amiri font */
.arabic-text {
  font-family: "Amiri", "Times New Roman", serif !important;
  font-size: 1.25em;
  line-height: 1.8;
  direction: rtl;
  text-align: right;
  unicode-bidi: isolate;
  font-weight: 400;
}

/* Arabic text in headings */
.arabic-heading {
  font-family: "Amiri", "Times New Roman", serif !important;
  font-size: 1.4em;
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  unicode-bidi: isolate;
  font-weight: 700;
  margin: 1.5rem 0 1rem 0;
}

/* Arabic quote styling */
.arabic-quote {
  font-family: "Amiri", "Times New Roman", serif !important;
  font-size: 1.3em;
  line-height: 1.7;
  direction: rtl;
  text-align: right;
  unicode-bidi: isolate;
  font-style: italic;
  font-weight: 400;
  background: rgba(13, 110, 253, 0.05);
  border-right: 4px solid #0d6efd;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}

/* Inline Arabic text within paragraphs */
.arabic-inline {
  font-family: "Amiri", "Times New Roman", serif !important;
  font-size: 1.15em;
  direction: rtl;
  unicode-bidi: isolate;
  font-weight: 400;
}

/* Arabic verse styling for Quran */
.arabic-verse {
  font-family: "Amiri", "Times New Roman", serif !important;
  font-size: 1.4em;
  line-height: 1.9;
  direction: rtl;
  text-align: center;
  unicode-bidi: isolate;
  font-weight: 400;
  background: rgba(13, 110, 253, 0.03);
  border: 1px solid rgba(13, 110, 253, 0.1);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 12px;
}

/* Mixed content container for Arabic + Latin text */
.mixed-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 14px;
}

.mixed-content .arabic-text {
  margin-bottom: 0.5rem;
}

.mixed-content .latin-text {
  font-family: "Archivo", Arial, "Segoe UI", sans-serif;
  font-style: italic;
  color: #6c757d;
  font-size: 0.95em;
}

/* Responsive adjustments for Arabic text */
@media (max-width: 768px) {
  .arabic-text {
    font-size: 1.1em;
    line-height: 1.7;
  }

  .arabic-heading {
    font-size: 1.25em;
    line-height: 1.5;
  }

  .arabic-quote {
    font-size: 1.15em;
    padding: 0.8rem 1rem;
  }

  .arabic-verse {
    font-size: 1.25em;
    line-height: 1.8;
    padding: 1rem;
  }
}

/* RTL support for entire content if needed */
.rtl-content {
  direction: rtl;
  text-align: right;
}

.rtl-content h1,
.rtl-content h2,
.rtl-content h3,
.rtl-content h4,
.rtl-content h5,
.rtl-content h6 {
  text-align: right;
}

.rtl-content .arabic-text {
  text-align: right;
}

/* === PAGINATION STYLES === */
.modern-page-link {
  padding: 3px 10px;
  font-size: 0.9rem;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1px solid #0d8174;
  color: #0d8174;
  text-decoration: none;
  transition: all 0.2s ease;
  background-color: transparent;
}

.modern-page-link:hover {
  background-color: #0d8174;
  color: white;
  text-decoration: none;
  border-color: #0d8174;
}

.modern-page-link.active {
  background-color: #0d8174;
  color: white;
  border-color: #0d8174;
}

.modern-page-link.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #0d8174;
}

.modern-page-link.disabled:hover {
  background-color: transparent;
  color: #0d8174;
  border-color: #0d8174;
}

.hljs {
  background: transparent !important;
  color: #a6accd !important;
  border-radius: 0 !important;
  border: none !important;
  padding: 0.4rem !important;
  margin: 0 !important;
  overflow-x: auto !important;
  box-shadow: none !important;
  font-family: "JetBrains Mono", "Fira Code", "SF Mono", Monaco, Inconsolata,
    "Roboto Mono", monospace !important;
  font-size: 13px !important;
  line-height: 2.2 !important;
  font-weight: 400 !important;
  position: relative;

  /* Maintain code formatting - no word wrapping - ENFORCED */
  white-space: pre !important;
  word-wrap: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;

  /* Modern scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: rgba(167, 172, 205, 0.3) transparent;
}

/* Webkit scrollbar for modern browsers */
.hljs::-webkit-scrollbar {
  height: 8px;
}

.hljs::-webkit-scrollbar-track {
  background: rgba(58, 63, 88, 0.3);
  border-radius: 4px;
}

.hljs::-webkit-scrollbar-thumb {
  background: rgba(167, 172, 205, 0.4);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.hljs::-webkit-scrollbar-thumb:hover {
  background: rgba(167, 172, 205, 0.6);
}

/* Palenight theme colors */
.hljs-keyword {
  color: #c792ea !important;
}
.hljs-string {
  color: #c3e88d !important;
}
.hljs-number {
  color: #f78c6c !important;
}
.hljs-comment {
  color: #676e95 !important;
  font-style: italic;
}
.hljs-function {
  color: #82aaff !important;
}
.hljs-variable {
  color: #eeffff !important;
}
.hljs-title {
  color: #82aaff !important;
  font-weight: 500 !important;
}
.hljs-attr {
  color: #ffcb6b !important;
}
.hljs-tag {
  color: #f07178 !important;
}
.hljs-name {
  color: #f07178 !important;
}
.hljs-selector-id {
  color: #f07178 !important;
}
.hljs-selector-class {
  color: #ffcb6b !important;
}
.hljs-property {
  color: #80cbc4 !important;
}
.hljs-built_in {
  color: #ffcb6b !important;
}
.hljs-type {
  color: #ffcb6b !important;
}
.hljs-literal {
  color: #f78c6c !important;
}
.hljs-params {
  color: #eeffff !important;
}
.hljs-meta {
  color: #ffcb6b !important;
}
.hljs-link {
  color: #80cbc4 !important;
}
.hljs-operator {
  color: #89ddff !important;
}
.hljs-symbol {
  color: #f78c6c !important;
}
.hljs-bullet {
  color: #f78c6c !important;
}
.hljs-addition {
  color: #c3e88d !important;
  background: rgba(195, 232, 141, 0.1);
}
.hljs-deletion {
  color: #f07178 !important;
  background: rgba(240, 113, 120, 0.1);
}

/* Custom highlight for .env files */
.hljs.language-env .hljs-attr {
  color: #ffcb6b !important;
  font-weight: bold;
}
.hljs.language-env .hljs-string {
  color: #c3e88d !important;
}
.hljs.language-env .hljs-comment {
  color: #676e95 !important;
  font-style: italic;
}

/* Copy button styling */
.code-container {
  position: relative;
  margin: 1.5rem 0;
  background: #292d3e;
  border-radius: 12px;
  border: 2px solid #3a3f58;
  box-shadow: 0 4px 12px rgba(41, 45, 62, 0.15);
  overflow: hidden;
  padding: 1rem;
}

.code-container pre {
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.copy-code-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 0.5rem;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  font-family: inherit;
  z-index: 10;
}

.code-container:hover .copy-code-btn {
  opacity: 1;
}

.copy-code-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.copy-code-btn.copied {
  background: #28a745;
}

/* Clean modern blockquote style for article content */
.ruang-article-content {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

.ruang-article-content img {
  max-width: 100% !important;
  height: auto !important;
}

.ruang-article-content table {
  word-wrap: break-word;
  table-layout: fixed;
  width: 100%;
}

.ruang-article-content pre {
  overflow-x: auto !important;
  max-width: 100% !important;
  word-wrap: break-word !important;
  white-space: pre-wrap !important;
}

.ruang-article-content blockquote {
  background: #f8f9fa;
  border-left: 2px solid #0d8174;
  margin: 1.5em 0;
  padding: 1em 1.5em;
  font-style: italic;
  color: #333;
  border-radius: 0.2em;
  box-shadow: 0 1px 4px rgba(13, 129, 116, 0.04);
  position: relative;
  overflow-wrap: break-word;
}
.ruang-article-content blockquote:before {
  content: "\201C";
  color: #0d8174;
  font-size: 2.5em;
  position: absolute;
  left: 12px;
  top: 0;
  line-height: 1;
  opacity: 0.18;
  font-family: serif;
}
.ruang-article-content blockquote p {
  margin-bottom: 0;
  font-size: 1.08em;
}

/* Responsive code blocks */
@media (max-width: 768px) {
  .code-container {
    margin: 1rem 0;
    border-radius: 8px;
  }

  .hljs {
    padding: 1rem !important;
    font-size: 9px !important;
  }

  .copy-code-btn {
    top: 8px;
    right: 8px;
    opacity: 1;
    font-size: 0.6rem;
    padding: 3px 6px;
  }

  /* Mobile scrollbar */
  .hljs::-webkit-scrollbar {
    height: 6px;
  }

  /* Responsive article content */
  .ruang-article-content {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    overflow-x: hidden;
  }

  .ruang-article-content img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  .ruang-article-content table {
    font-size: 0.85rem;
    min-width: auto !important;
  }

  .ruang-article-content pre {
    font-size: 0.75rem !important;
    padding: 0.5rem !important;
    margin: 0.5rem 0 !important;
    overflow-x: auto !important;
    white-space: pre !important;
  }

  .ruang-article-content blockquote {
    margin: 1rem 0;
    padding: 0.75em 1em;
    font-size: 0.9rem;
  }
}

/* === MODERN SIDEBAR STYLING === */
.modern-sidebar {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.latest-posts-widget,
.quick-nav-widget {
  background: linear-gradient(145deg, #ffffff 0%, #fefefe 100%);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(13, 129, 116, 0.06) !important;
  box-shadow: 0 1px 3px rgba(13, 129, 116, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
}

.latest-posts-widget:hover,
.quick-nav-widget:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(13, 129, 116, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
  border-color: rgba(13, 129, 116, 0.08) !important;
}

.widget-decoration {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 80px;
  height: 80px;
  background: radial-gradient(
    circle,
    rgba(13, 129, 116, 0.015) 0%,
    transparent 60%
  );
  border-radius: 50%;
  pointer-events: none;
}

.widget-header {
  z-index: 2;
}

.widget-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(
    135deg,
    rgba(13, 129, 116, 0.06) 0%,
    rgba(48, 192, 165, 0.06) 100%
  );
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(13, 129, 116, 0.04);
}

.widget-underline {
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #0d8174 0%, #30c0a5 100%);
  border-radius: 2px;
  animation: underline-expand 2s ease-in-out infinite alternate;
}

@keyframes underline-expand {
  0% {
    width: 40px;
  }
  100% {
    width: 60px;
  }
}

.latest-posts-list {
  position: relative;
}

.latest-post-item {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(13, 129, 116, 0.03);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  backdrop-filter: blur(2px);
}

.latest-post-item:hover {
  background: rgba(13, 129, 116, 0.02);
  border-color: rgba(13, 129, 116, 0.06);
  transform: translateX(6px);
  box-shadow: 0 1px 6px rgba(13, 129, 116, 0.06);
}

.latest-post-item:hover .post-thumbnail img {
  transform: scale(1.05);
}

.latest-post-item:hover .thumbnail-overlay {
  opacity: 1;
}

.post-number {
  position: absolute;
  top: -5px;
  left: -8px;
  z-index: 3;
}

.post-thumbnail {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(13, 129, 116, 0.05);
  transition: all 0.3s ease;
}

.latest-post-item:hover .post-thumbnail {
  border-color: rgba(13, 129, 116, 0.08);
}

.thumbnail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(13, 129, 116, 0.1) 0%,
    rgba(48, 192, 165, 0.1) 100%
  );
  opacity: 0;
  transition: all 0.3s ease;
}

.post-title {
  font-size: 0.85rem;
  line-height: 1.3;
  transition: all 0.3s ease;
  font-weight: 600;
}

.latest-post-item:hover .post-title {
  color: #0d8174 !important;
}

.post-meta {
  opacity: 0.8;
  transition: all 0.3s ease;
}

.latest-post-item:hover .post-meta {
  opacity: 1;
}

.post-date,
.reading-time {
  background: rgba(13, 129, 116, 0.025);
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.3s ease;
  border: 1px solid rgba(13, 129, 116, 0.02);
}

.latest-post-item:hover .post-date,
.latest-post-item:hover .reading-time {
  background: rgba(13, 129, 116, 0.05);
  color: #0d8174 !important;
  border-color: rgba(13, 129, 116, 0.04);
}

/* Animation for post items */
.latest-post-item {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

.latest-post-item[data-index="0"] {
  animation-delay: 0.1s;
}
.latest-post-item[data-index="1"] {
  animation-delay: 0.2s;
}
.latest-post-item[data-index="2"] {
  animation-delay: 0.3s;
}
.latest-post-item[data-index="3"] {
  animation-delay: 0.4s;
}
.latest-post-item[data-index="4"] {
  animation-delay: 0.5s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* View All Button Styling */
.latest-posts-widget .btn-outline-primary {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(248, 249, 250, 0.9) 100%
  );
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.latest-posts-widget .btn-outline-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(13, 129, 116, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.latest-posts-widget .btn-outline-primary:hover::before {
  left: 100%;
}

.latest-posts-widget .btn-outline-primary:hover {
  background: linear-gradient(135deg, #0d8174 0%, #30c0a5 100%);
  color: white !important;
  border-color: transparent !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(13, 129, 116, 0.2);
}

/* Categories Widget Styling */
.category-badge {
  display: inline-flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.category-badge::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(13, 129, 116, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.category-badge:hover::before {
  left: 100%;
}

.category-badge:hover {
  background-color: rgba(13, 129, 116, 0.15) !important;
  color: #0a6b5f !important;
  border-color: rgba(13, 129, 116, 0.3) !important;
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(13, 129, 116, 0.2);
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .modern-sidebar {
    position: relative !important;
    top: 0 !important;
    margin-top: 3rem;
  }

  .latest-posts-widget,
  .categories-widget,
  .quick-nav-widget {
    margin-bottom: 2rem;
  }

  .latest-post-item:hover {
    transform: none;
  }

  .quick-nav-link:hover {
    transform: none;
  }

  .reading-progress-container {
    right: 10px !important;
    width: 50px !important;
    height: 50px !important;
  }
}

@media (max-width: 767.98px) {
  .latest-posts-widget,
  .categories-widget,
  .quick-nav-widget {
    padding: 1.5rem !important;
    margin-bottom: 1.5rem;
  }

  .post-thumbnail {
    width: 70px !important;
    height: 50px !important;
  }

  .post-title {
    font-size: 0.8rem;
  }

  .widget-icon {
    width: 35px !important;
    height: 35px !important;
  }

  .quick-nav-icon {
    width: 28px !important;
    height: 28px !important;
  }

  .category-badge {
    font-size: 0.7rem !important;
    padding: 0.35em 0.7em !important;
  }
}

/* Loading Shimmer Effect */
.sidebar-loading .latest-post-item {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Sidebar Hover Effects Enhancement */
.latest-posts-widget:hover .widget-icon,
.categories-widget:hover .widget-icon {
  transform: rotate(5deg) scale(1.1);
  background: linear-gradient(
    135deg,
    rgba(13, 129, 116, 0.15) 0%,
    rgba(48, 192, 165, 0.15) 100%
  );
}

/* Floating animation for widget decorations */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-10px) rotate(1deg);
  }
  66% {
    transform: translateY(5px) rotate(-1deg);
  }
}

.widget-decoration {
  animation: float 6s ease-in-out infinite;
  animation-delay: 1s;
}

/* Enhanced category badge animations */
.category-badge {
  position: relative;
  isolation: isolate;
}

.category-badge::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(13, 129, 116, 0.1) 50%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.category-badge:hover::after {
  opacity: 1;
}

/* Quick Navigation Widget Styling */
.quick-nav-link {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(13, 129, 116, 0.02);
}

.quick-nav-link:hover {
  background-color: rgba(13, 129, 116, 0.03) !important;
  border-color: rgba(13, 129, 116, 0.06);
  color: #0d8174 !important;
  transform: translateX(4px);
}

.quick-nav-link:hover .quick-nav-icon {
  background: rgba(13, 129, 116, 0.08) !important;
  transform: scale(1.05) rotate(2deg);
}

.quick-nav-link:hover i.fa-arrow-right,
.quick-nav-link:hover i.fa-chevron-up {
  color: #0d8174 !important;
  transform: translateX(2px);
}

.quick-nav-icon {
  transition: all 0.3s ease;
  background: rgba(13, 129, 116, 0.04) !important;
  border: 1px solid rgba(13, 129, 116, 0.03);
}

/* Smooth appearance animation for initial load */
.modern-sidebar {
  animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .latest-posts-widget,
  .categories-widget,
  .quick-nav-widget {
    background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
    border-color: rgba(13, 129, 116, 0.2) !important;
    color: #e9ecef;
  }

  .latest-post-item {
    background: rgba(255, 255, 255, 0.05);
    color: #e9ecef;
  }

  .latest-post-item:hover {
    background: rgba(13, 129, 116, 0.1);
  }

  .post-title a {
    color: #e9ecef !important;
  }

  .latest-post-item:hover .post-title a {
    color: #30c0a5 !important;
  }

  .category-badge {
    background-color: rgba(13, 129, 116, 0.15) !important;
    color: #30c0a5 !important;
    border-color: rgba(13, 129, 116, 0.25) !important;
  }

  .quick-nav-link {
    color: #e9ecef !important;
  }

  .quick-nav-link:hover {
    color: #30c0a5 !important;
    background-color: rgba(13, 129, 116, 0.15) !important;
  }

  .widget-icon {
    background: rgba(13, 129, 116, 0.2) !important;
  }

  .quick-nav-icon {
    background: rgba(13, 129, 116, 0.15) !important;
  }
}
