:root {
  --primary: #1e3a8a;
  --secondary: #2563eb;
  --accent: #f97316;
  --bg-light: #f4f7fe;
}
.btn-orange-blue {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  color: white !important;
  border: none;
  border-radius: 50px;
  padding: 10px 24px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-orange-blue:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.3);
}

.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 100px 0 80px;
}

.hero-title {
  font-weight: 700;
  line-height: 1.2;
  font-size: clamp(2.5rem, 5vw, 4rem);
}

.hero-carousel-img {
  height: 450px;
  object-fit: cover;
  border-radius: 20px;
}

.hover-card {
  border: none;
  border-radius: 20px;
  transition: all 0.4s ease;
  background: white;
}

.hover-card:hover {
  transform: translateY(-10px);
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.hover-card:hover p,
.hover-card:hover h3,
.hover-card:hover h4,
.hover-card:hover .icon-box {
  color: white !important;
}

.icon-box i,
.icon-box svg {
  color: #1e3a8a;
  transition: all 0.3s ease;
}

.article-card {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  transition: 0.3s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  background: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.article-img {
  height: 220px;
  object-fit: cover;
  width: 100%;
}

.article-date {
  font-size: 0.85rem;
  color: #6c757d;
  font-weight: 500;
}

.footer-link {
  color: #6c757d;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-link:hover {
  color: var(--secondary);
  padding-left: 5px;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  transform: translateY(20px);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-light);
  color: #334155;
  overflow-x: hidden;
}

.front-navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.front-navbar .navbar-brand {
  font-weight: 700;
  color: var(--primary) !important;
  font-size: 1.5rem;
}

.article-detail-img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 30px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.article-content-wrapper {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #334155;
  overflow-wrap: break-word;
}

.article-content-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 15px 0;
}

.article-content-wrapper h1,
.article-content-wrapper h2,
.article-content-wrapper h3 {
  font-weight: 700;
  color: #1e293b;
  margin-top: 32px;
  margin-bottom: 16px;
}

.article-content-wrapper p {
  margin-bottom: 18px;
}

.article-content-wrapper ul,
.article-content-wrapper ol {
  margin-bottom: 22px;
}

.article-content-wrapper hr {
  margin: 30px 0;
  border-color: #cbd5e1;
}

.sidebar-widget {
  background: #fff;
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  border: 1px solid #f1f5f9;
}

.sidebar-title {
  position: relative;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 20px;
  padding-bottom: 10px;
  font-size: 1.2rem;
}

.sidebar-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 3px;
  background: var(--secondary);
  border-radius: 3px;
}

.sidebar-post-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px dashed #e2e8f0;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  cursor: pointer;
}

.sidebar-post-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.sidebar-post-item:hover {
  transform: translateX(5px);
}

.sidebar-post-item:hover .sidebar-post-title {
  color: var(--secondary);
}

.sidebar-post-img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.sidebar-post-img-placeholder {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  flex-shrink: 0;
}

.sidebar-post-content {
  flex-grow: 1;
  overflow: hidden;
}

.sidebar-post-title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
  margin-bottom: 5px;
  color: #334155;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s;
}

.sidebar-post-meta {
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  gap: 10px;
  align-items: center;
}

.cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: #f8fafc;
  text-decoration: none;
  color: #4b5563;
  font-weight: 500;
  transition: all 0.3s;
  cursor: pointer;
  border: 1px solid transparent;
}

.cat-item:hover {
  background: #eff6ff;
  color: var(--secondary);
  border-color: #bfdbfe;
  transform: translateY(-2px);
}

.cat-count {
  background: #e0e7ff;
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.popular-number {
  position: absolute;
  left: -10px;
  top: -10px;
  width: 24px;
  height: 24px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
  border: 2px solid #fff;
  z-index: 2;
}

.img-wrapper {
  position: relative;
}

@media (max-width: 768px) {
  .article-content-wrapper {
    font-size: 1rem;
  }

  #detailTitle {
    font-size: 2rem;
  }
}
    /* =======================================
       GLOBAL & FRONTEND CSS (TIDAK DIUBAH)
       ======================================= */
    body {
      font-family: 'Inter', sans-serif;
      background-color: var(--bg-light);
      color: #334155;
      overflow-x: hidden;
    }
    ::-webkit-scrollbar { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
    ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

    /* Frontend Components */
    .front-navbar { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); }
    .front-navbar .navbar-brand { font-weight: 700; color: var(--primary) !important; font-size: 1.5rem; }
    .front-navbar .nav-link { font-weight: 500; color: #4b5563 !important; transition: color 0.3s; cursor: pointer; }
    .front-navbar .nav-link:hover { color: var(--secondary) !important; }
    
    .btn-orange-blue {
      background: linear-gradient(135deg, var(--secondary), var(--accent));
      color: white !important;
      border: none; border-radius: 50px; padding: 10px 24px; font-weight: 600; transition: all 0.3s ease;
    }
    .btn-orange-blue:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 10px 20px rgba(249, 115, 22, 0.3); }

    .hero-section { background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); color: white; padding: 100px 0 80px; }
    .hero-title { font-weight: 700; line-height: 1.2; font-size: clamp(2.5rem, 5vw, 4rem); }
    .hero-carousel-img { height: 450px; object-fit: cover; border-radius: 20px; }

    .hover-card { border: none; border-radius: 20px; transition: all 0.4s ease; background: white; }
    .hover-card:hover { transform: translateY(-10px); background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent)); color: white; box-shadow: 0 20px 40px rgba(0,0,0,0.15); }
    .hover-card:hover p, .hover-card:hover h3, .hover-card:hover .icon-box {
      color: white !important;
    }
    /* Tambahan agar SVG dan FontAwesome ikut putih saat di-hover */
    .hover-card:hover .icon-box i, .hover-card:hover .icon-box svg, .hover-card:hover .icon-box path {
      color: white !important;
      fill: white !important;
    }
    .icon-box i, .icon-box svg {
      color: #1e3a8a; /* Warna var(--primary) agar icon lebih elegan */
      transition: all 0.3s ease;
    }
    .footer-link { color: #6c757d; text-decoration: none; transition: all 0.3s ease; }
    .footer-link:hover { color: var(--secondary); padding-left: 5px; }

    /* Custom Article Card */
    .article-card { border: none; border-radius: 20px; overflow: hidden; transition: 0.3s; box-shadow: 0 4px 6px rgba(0,0,0,0.05); background:#fff; height: 100%; display: flex; flex-direction: column;}
    .article-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
    .article-img { height: 220px; object-fit: cover; width: 100%; }
    .article-date { font-size: 0.85rem; color: #6c757d; font-weight: 500;}
    .article-detail-img { width: 100%; max-height: 500px; object-fit: cover; border-radius: 20px; margin-bottom: 30px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
    .article-content-wrapper { font-size: 1.1rem; line-height: 1.8; color: #334155; overflow-wrap: break-word; }
    .article-content-wrapper img { max-width: 100%; height: auto; border-radius: 10px; margin: 15px 0; }

    /* Back to Top Button */
    .back-to-top { position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; background: linear-gradient(135deg, var(--secondary), var(--accent)); color: white; border: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); cursor: pointer; z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.3s ease; transform: translateY(20px); }
    .back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
    .back-to-top:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(249, 115, 22, 0.4); color: white; }
    @media (max-width: 768px) { .back-to-top { bottom: 20px; right: 20px; width: 45px; height: 45px; font-size: 1rem; } }

    /* CSS BARU: SIDEBAR BLOG WIDGET */
    .sidebar-widget { background: #fff; border-radius: 16px; padding: 25px; margin-bottom: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #f1f5f9; }
    .sidebar-title { position: relative; font-weight: 700; color: #1e3a8a; margin-bottom: 20px; padding-bottom: 10px; font-size: 1.2rem; }
    .sidebar-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 50px; height: 3px; background: var(--secondary); border-radius: 3px; }
    .sidebar-post-item { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dashed #e2e8f0; text-decoration: none; color: inherit; transition: all 0.3s; cursor: pointer; }
    .sidebar-post-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
    .sidebar-post-item:hover { transform: translateX(5px); }
    .sidebar-post-item:hover .sidebar-post-title { color: var(--secondary); }
    .sidebar-post-img { width: 70px; height: 70px; object-fit: cover; border-radius: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); flex-shrink: 0; }
    .sidebar-post-img-placeholder { width: 70px; height: 70px; border-radius: 12px; background: #e2e8f0; display: flex; align-items: center; justify-content: center; color: #94a3b8; flex-shrink: 0; }
    .sidebar-post-content { flex-grow: 1; overflow: hidden; }
    .sidebar-post-title { font-weight: 600; font-size: 0.95rem; line-height: 1.3; margin-bottom: 5px; color: #334155; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color 0.3s; }
    .sidebar-post-meta { font-size: 0.75rem; color: #64748b; display: flex; gap: 10px; align-items: center; }
    .cat-list { list-style: none; padding: 0; margin: 0; }
    .cat-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 15px; margin-bottom: 8px; border-radius: 10px; background: #f8fafc; text-decoration: none; color: #4b5563; font-weight: 500; transition: all 0.3s; cursor: pointer; border: 1px solid transparent; }
    .cat-item:hover { background: #eff6ff; color: var(--secondary); border-color: #bfdbfe; transform: translateY(-2px); }
    .cat-count { background: #e0e7ff; color: var(--secondary); font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
    .popular-number { position: absolute; left: -10px; top: -10px; width: 24px; height: 24px; background: var(--accent); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: bold; border: 2px solid #fff; z-index: 2; }
    .img-wrapper { position: relative; }


    /* =======================================
       BACKEND CMS CSS (TIDAK DIUBAH)
       ======================================= */
    .login-wrapper { min-height: 100vh; display: flex; background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); }
    .login-card { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); border-radius: 24px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
    
    .app-wrapper { display: flex; min-height: 100vh; }
    .sidebar { width: 260px; background: #ffffff; border-right: 1px solid #e2e8f0; display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 1040; transition: transform 0.3s ease; }
    .sidebar-header { padding: 20px; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; gap: 10px; }
    .sidebar-menu { padding: 15px 10px; overflow-y: auto; flex-grow: 1; }
    .nav-item-custom { padding: 10px 15px; margin-bottom: 5px; border-radius: 10px; color: #64748b; display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 500; transition: all 0.2s; cursor: pointer; }
    .nav-item-custom:hover, .nav-item-custom.active { background: #eff6ff; color: var(--secondary); }
    .nav-item-custom.active { background: linear-gradient(90deg, #eff6ff 0%, #ffffff 100%); border-left: 4px solid var(--secondary); }
    .menu-label { font-size: 0.75rem; text-transform: uppercase; color: #94a3b8; font-weight: 700; margin: 15px 0 5px 15px; letter-spacing: 0.5px;}

    .main-content { flex-grow: 1; margin-left: 260px; display: flex; flex-direction: column; min-height: 100vh; transition: margin 0.3s ease; }
    .topbar { height: 70px; background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(10px); border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 1030; }
    .content-area { padding: 24px; flex-grow: 1; }

    .card-modern { background: #fff; border-radius: 16px; border: 1px solid #e2e8f0; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); }
    .stat-card { padding: 20px; }
    .stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }

    /* Skeleton Loader */
    .placeholder-glow .placeholder { background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
    @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

    /* Preview Badge */
    .preview-badge { position: fixed; bottom: 20px; right: 20px; z-index: 9999; background: #ffc107; color: #000; padding: 10px 20px; border-radius: 10px; font-weight: bold; box-shadow: 0 4px 10px rgba(0,0,0,0.2); animation: pulse 2s infinite; text-align: center;}
    @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }

    /* Fix for TinyMCE inside Bootstrap Modal */
    .tox-tinymce-aux { z-index: 999999 !important; }
    .tox .tox-promotion { display: none !important; }

    /* =======================================
       ADVANCED EDITOR CSS (MINI VS CODE)
       ======================================= */
    .editor-wrapper { display: flex; height: calc(100vh - 180px); background: var(--cm-bg); border-radius: 10px; overflow: hidden; border: 1px solid #333; color: #abb2bf; }
    .editor-wrapper.fullscreen { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1050; height: 100vh; border-radius: 0; }
    .editor-toolbar { background: #21252b; padding: 10px 15px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--cm-border); }
    .editor-pane-left { flex: 1; display: flex; flex-direction: column; min-width: 200px; }
    .editor-pane-right { flex: 1; display: flex; flex-direction: column; min-width: 200px; background: #fff; position: relative;}
    .editor-resizer { width: 5px; background: #1e1e1e; cursor: col-resize; transition: background 0.2s; z-index: 10;}
    .editor-resizer:hover, .editor-resizer.active { background: var(--secondary); }
    .editor-tabs { display: flex; background: #21252b; border-bottom: 1px solid #181a1f; }
    .editor-tab { padding: 8px 16px; cursor: pointer; font-size: 13px; font-family: monospace; color: #7f848e; display: flex; align-items: center; gap: 8px; border-right: 1px solid #181a1f; user-select: none; }
    .editor-tab.active { background: var(--cm-bg); color: #e5c07b; border-top: 2px solid var(--secondary); }
    .editor-tab.css-tab.active { color: #56b6c2; }
    .cm-container { flex: 1; overflow: hidden; position: relative; }
    .cm-editor { height: 100%; font-family: 'Fira Code', 'Courier New', Courier, monospace; font-size: 14px; }
    .iframe-preview { flex: 1; width: 100%; height: 100%; border: none; background: #fff; }
    .btn-editor { background: #2c313a; color: #abb2bf; border: 1px solid #181a1f; border-radius: 4px; padding: 5px 12px; font-size: 13px; transition: 0.2s; display: inline-flex; align-items: center; gap: 6px; }
    .btn-editor:hover { background: #3e4451; color: #fff; }
    .btn-editor.primary { background: var(--secondary); color: #fff; border-color: var(--secondary); }
    .btn-editor.primary:hover { background: #1d4ed8; }
    .btn-editor.ai { background: linear-gradient(90deg, #9333ea, #db2777); color: #fff; border: none; }
    .btn-editor.ai:hover { opacity: 0.9; box-shadow: 0 0 10px rgba(219, 39, 119, 0.5); }
    .save-status { font-size: 12px; color: #98c379; margin-left: 10px; opacity: 0; transition: opacity 0.3s; }
    .save-status.show { opacity: 1; }

    @media (max-width: 991px) {
      .sidebar { transform: translateX(-100%); } .sidebar.active { transform: translateX(0); }
      .main-content { margin-left: 0; }
      .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); z-index: 1035; backdrop-filter: blur(2px); }
      .sidebar-overlay.active { display: block; }
      .editor-wrapper { flex-direction: column; }
      .editor-resizer { width: 100%; height: 5px; cursor: row-resize; }
    }



body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f7fb;
  color: #222;
}

.header {
  background: #0f172a;
  color: white;
  padding: 36px 20px;
  text-align: center;
}

.header a {
  color: white;
  text-decoration: none;
}

.container {
  max-width: 1100px;
  margin: auto;
  padding: 30px 20px;
}

#article-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-body {
  padding: 20px;
}

.card a {
  color: #2563eb;
  font-weight: bold;
  text-decoration: none;
}

.category {
  color: #2563eb;
  font-size: 14px;
  font-weight: bold;
}

.article-container {
  max-width: 850px;
  background: white;
  margin-top: 30px;
  border-radius: 18px;
}

.featured-image {
  width: 100%;
  border-radius: 14px;
  margin: 20px 0;
}

.content {
  line-height: 1.8;
  font-size: 17px;
}