:root {
--primary: #4361ee;
--primary-dark: #3a56d4;
--secondary: #3f37c9;
--accent: #4cc9f0;
--dark: #1a1a2e;
--light: #f8f9fa;
--gray: #6c757d;
--success: #4ade80;
--warning: #fbbf24;
--danger: #f87171;
--code-bg: #2b2d42;
--primary-transparent: rgba(67, 97, 238, 0.1);
}

body {
font-family: 'Poppins', sans-serif;
color: var(--dark);
background-color: #fefefe;
line-height: 1.6;
}

.code-font {
font-family: 'Fira Code', monospace;
}


/* Navbar Base */
.navbar {
  min-height: 60px;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  padding: 0 1rem;
}

.navbar-brand {
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.navbar-brand span {
  color: var(--dark);
  margin-left: 4px;
}

.navbar-brand:hover {
  color: var(--primary-dark);
  transform: translateY(-1px);
}

/* Nav Items */
.nav-item {
  margin: 0 0.25rem;
}

.nav-box {
  position: relative;
  display: inline-block;
  padding: 0.6rem 1.3rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  border-radius: 8px;
  color: var(--dark);
}

.nav-link:hover .nav-box {
  background-color: var(--primary-transparent);
  color: var(--primary);
  transform: translateY(-2px) scale(1.02);
}

.nav-link.active .nav-box {
  background-color: var(--primary-transparent);
  color: var(--primary);
  font-weight: 500;
}

/* Animated Border Effect */
.nav-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: all 0.4s ease;
  transform: scale(0.95);
  opacity: 0;
}

.nav-link:hover .nav-box::before {
  border-color: var(--primary);
  transform: scale(1);
  opacity: 0.4;
}

.nav-link.active .nav-box::before {
  border-color: var(--primary);
  transform: scale(1);
  opacity: 0.6;
}

/* Dropdown Menu */
.dropdown-menu {
  border: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  margin-top: 8px;
}

.dropdown-item {
  padding: 0.5rem 1.5rem;
  transition: all 0.3s;
  border-radius: 4px;
}

.dropdown-item:hover {
  background-color: var(--primary-transparent);
  color: var(--primary);
  transform: translateX(4px);
}

/* Mobile Toggle */
.navbar-toggler {
  border: none;
  padding: 0.5rem;
}

.navbar-toggler:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-transparent);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(67, 97, 238, 0.8)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .navbar {
    padding: 0.5rem 1rem;
  }
  
  .nav-item {
    margin: 0.25rem 0;
  }
  
  .nav-box {
    padding: 0.75rem 1rem;
    width: 100%;
    text-align: left;
  }
  
  .dropdown-menu {
    box-shadow: none;
    border: 1px solid rgba(0, 0, 0, 0.05);
  }
  
  .navbar-collapse {
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
  }
}

/* Special Effects */
.navbar.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(5px);
}

/* Accent Color for Special Items */
.nav-item.special .nav-box {
  background-color: var(--secondary);
  color: white !important;
}

.nav-item.special .nav-box::before {
  border-color: white !important;
}

.nav-item.special:hover .nav-box {
  background-color: #e5177e !important;
}



/* Dropdown menu */
.dropdown-menu {
border-radius: 8px;
border: none;
box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.dropdown-item {
padding: 8px 15px;
font-weight: 500;
}

.dropdown-item:hover {
background-color: #f8f9fa; /* Latar belakang saat hover */
}

/* Warna ikon dalam dropdown */
.dropdown-item i {
font-size: 1.2em;
}

/* Tombol Masuk & Daftar */
.btn-outline-primary {
border-color: #007BFF;
color: #007BFF;
}

.btn-outline-primary:hover {
background-color: #007BFF;
color: #fff;
}

.btn-primary {
background-color: #007BFF;
border-color: #007BFF;
}

.btn-primary:hover {
background-color: #0069d9;
border-color: #0062cc;
}

/* Hero Section */
.hero-section {
background: linear-gradient(135deg, rgba(67, 97, 238, 0.03) 0%, rgba(76, 201, 240, 0.03) 100%);
padding: 5rem 0;
position: relative;
overflow: hidden;
}

.hero-section::before {
content: "";
position: absolute;
top: -50%;
right: -10%;
width: 70%;
height: 200%;
background: radial-gradient(circle, rgba(76, 201, 240, 0.1) 0%, rgba(76, 201, 240, 0) 70%);
z-index: 0;
}

.hero-title {
font-weight: 700;
font-size: 3.5rem;
line-height: 1.2;
margin-bottom: 1.5rem;
position: relative;
}

.hero-title span {
color: var(--primary);
position: relative;
}

.hero-title span::after {
content: "";
position: absolute;
bottom: 5px;
left: 0;
width: 100%;
height: 10px;
background-color: rgba(76, 201, 240, 0.4);
z-index: -1;
}

.hero-subtitle {
font-size: 1.2rem;
color: #555;
margin-bottom: 2rem;
max-width: 600px;
}

.hero-img {
border-radius: 20px;
box-shadow: 0 25px 50px -12px rgba(67, 97, 238, 0.2);
transform: perspective(1000px) rotateY(-10deg);
transition: all 0.5s ease;
position: relative;
z-index: 1;
}

.hero-img:hover {
transform: perspective(1000px) rotateY(0deg);
}

/* Buttons */
.btn-primary {
background-color: var(--primary);
border-color: var(--primary);
padding: 0.6rem 1.5rem;
font-weight: 500;
border-radius: 8px;
transition: all 0.3s ease;
}

.btn-primary:hover {
background-color: var(--secondary);
border-color: var(--secondary);
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(67, 97, 238, 0.3);
}

.btn-outline-primary {
color: var(--primary);
border-color: var(--primary);
padding: 0.6rem 1.5rem;
font-weight: 500;
border-radius: 8px;
transition: all 0.3s ease;
}

.btn-outline-primary:hover {
background-color: var(--primary);
color: white;
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(67, 97, 238, 0.3);
}

/* Cards */
.card-tutorial {
border: none;
border-radius: 15px;
overflow: hidden;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
transition: all 0.3s ease;
height: 100%;
position: relative;
background-color: white;
}

.card-tutorial:hover {
transform: translateY(-10px);
box-shadow: 0 15px 30px rgba(67, 97, 238, 0.15);
}

.card-tutorial::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 5px;
background: linear-gradient(90deg, var(--primary), var(--accent));
}

.card-img-top {
height: 180px;
object-fit: cover;
transition: all 0.5s ease;
}

.card-tutorial:hover .card-img-top {
transform: scale(1.05);
}

.card-body {
padding: 1.5rem;
}

.card-title {
font-weight: 600;
margin-bottom: 0.75rem;
color: var(--dark);
}

.card-text {
color: #666;
font-size: 0.95rem;
margin-bottom: 1.25rem;
}

.badge-category {
background-color: rgba(67, 97, 238, 0.1);
color: var(--primary);
font-weight: 500;
padding: 0.35rem 0.75rem;
border-radius: 50px;
margin-bottom: 1rem;
display: inline-block;
}

/* Section Headings */
.section-title {
font-weight: 700;
font-size: 2.2rem;
margin-bottom: 1.5rem;
position: relative;
display: inline-block;
}

.section-title::after {
content: "";
position: absolute;
bottom: 5px;
left: 0;
width: 50%;
height: 8px;
background-color: rgba(76, 201, 240, 0.4);
z-index: -1;
}

/* Features */
.feature-box {
background-color: white;
border-radius: 15px;
padding: 2rem;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
transition: all 0.3s ease;
height: 100%;
border: 1px solid rgba(0, 0, 0, 0.03);
}

.feature-box:hover {
transform: translateY(-5px);
box-shadow: 0 15px 30px rgba(67, 97, 238, 0.1);
}

.feature-icon {
width: 70px;
height: 70px;
background: linear-gradient(135deg, var(--primary), var(--accent));
color: white;
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.8rem;
margin-bottom: 1.5rem;
}

/* Newsletter */
.newsletter-section {
background: linear-gradient(135deg, var(--primary), var(--secondary));
padding: 4rem 0;
color: white;
position: relative;
overflow: hidden;
}

.newsletter-section::before {
content: "";
position: absolute;
top: -50%;
right: -10%;
width: 70%;
height: 200%;
background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
z-index: 0;
}

.newsletter-title {
font-weight: 700;
font-size: 2rem;
margin-bottom: 1rem;
}

.newsletter-input {
background-color: rgba(255, 255, 255, 0.15);
border: none;
color: white;
padding: 1rem;
border-radius: 8px;
height: auto;
}

.newsletter-input::placeholder {
color: rgba(255, 255, 255, 0.7);
}

.newsletter-btn {
background-color: white;
color: var(--primary);
font-weight: 600;
border-radius: 8px;
padding: 1rem 1.5rem;
transition: all 0.3s ease;
}

.newsletter-btn:hover {
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
background-color: var(--dark);
color: white;
padding: 4rem 0 2rem;
}

.footer-logo {
font-weight: 700;
font-size: 1.8rem;
text-decoration: none;
color: white;
margin-bottom: 1.5rem;
display: inline-block;
}

.footer-about {
opacity: 0.8;
margin-bottom: 1.5rem;
line-height: 1.7;
}

.footer-links h5 {
font-weight: 600;
margin-bottom: 1.5rem;
position: relative;
padding-bottom: 0.5rem;
}

.footer-links h5::after {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 40px;
height: 3px;
background-color: var(--accent);
}

.footer-links ul {
list-style: none;
padding: 0;
}

.footer-links li {
margin-bottom: 0.75rem;
}

.footer-links a {
color: rgba(255, 255, 255, 0.7);
text-decoration: none;
transition: all 0.3s ease;
}

.footer-links a:hover {
color: white;
padding-left: 5px;
}

.social-icons {
display: flex;
gap: 1rem;
margin-top: 1.5rem;
}

.social-icon {
width: 40px;
height: 40px;
background-color: rgba(255, 255, 255, 0.1);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: white;
transition: all 0.3s ease;
}

.social-icon:hover {
background-color: var(--accent);
transform: translateY(-3px);
}

.footer-bottom {
border-top: 1px solid rgba(255, 255, 255, 0.1);
padding-top: 2rem;
margin-top: 2rem;
opacity: 0.7;
}

/* Animations */
@keyframes float {
0% { transform: translateY(0px); }
50% { transform: translateY(-10px); }
100% { transform: translateY(0px); }
}

.floating {
animation: float 6s ease-in-out infinite;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
.hero-title {
font-size: 2.8rem;
}
}

@media (max-width: 768px) {
.hero-title {
font-size: 2.3rem;
}

.hero-img {
margin-top: 2rem;
}

.section-title {
font-size: 1.8rem;
}
}

/* Contoh animasi fade-in dan slide-up */
.feature-box, .card-tutorial {
opacity: 0;
transform: translateY(20px);
transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.feature-box.animate, .card-tutorial.animate {
opacity: 1;
transform: translateY(0);
}

/* Styling tombol Back to Top */
.back-to-top {
position: fixed;
bottom: 30px;
right: 30px;
display: none; /* Sembunyikan secara default */
z-index: 9999;
opacity: 0.8;
transition: opacity 0.3s, visibility 0.3s;
}
.back-to-top:hover {
opacity: 1;
}

/* Optional: Tambahkan efek tampilan saat muncul */
.show {
display: inline-block;
}

/* Style halaman detail blog dengan sidebar */
.section-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
font-size: 2rem;
margin-bottom: 2rem;
}
.article-img {
width: 100%;
height: auto;
border-radius: 8px;
margin-bottom: 1.5rem;
}
.author-box {
display: flex;
align-items: center;
gap: 10px;
margin-top: 2rem;
}
.author-img {
border-radius: 50%;
width: 60px;
height: 60px;
object-fit: cover;
}
/* Sidebar styles */
.sidebar {
position: sticky;
top: 80px;
}
.category-list, .latest-articles {
margin-bottom: 2rem;
}
.category-list h5, .latest-articles h5 {
font-family: 'Poppins', sans-serif;
font-weight: 600;
margin-bottom: 1rem;
}
.category-item {
display: flex;
align-items: center;
gap: 10px;
padding: 8px 0;
border-bottom: 1px solid #eee;
cursor: pointer;
}
.category-item:hover {
background-color: #f8f9fa;
}
.article-card {
transition: transform 0.3s, box-shadow 0.3s;
}
.article-card:hover {
transform: translateY(-5px);
box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.article-card img {
height: 120px;
object-fit: cover;
border-radius: 8px;
}

/* Komentar dan artikel terkait */
.comments-section {
margin-top: 4rem;
}
.comment {
display: flex;
gap: 10px;
margin-bottom: 1.5rem;
}
.comment-img {
border-radius: 50%;
width: 50px;
height: 50px;
object-fit: cover;
}
.comment-body {
background-color: #f8f9fa;
padding: 10px 15px;
border-radius: 8px;
width: 100%;
}
.comment-author {
font-weight: 600;
margin-bottom: 0.3rem;
}
.article-related {
margin-top: 4rem;
}
.article-related h5 {
margin-bottom: 1.5rem;
}

/* Custom style untuk halaman blog */
.section-title {
font-family: 'Poppins', sans-serif;
font-weight: 600;
font-size: 2rem;
margin-bottom: 1.5rem;
}

.card-blog {
transition: transform 0.3s, box-shadow 0.3s;
}
.card-blog:hover {
transform: translateY(-5px);
box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.card-img-top {
height: 200px;
object-fit: cover;
border-radius: 8px;
}
.blog-meta {
font-size: 0.85rem;
color: #6c757d;
}

@media (max-width: 991.98px) {
.navbar-collapse {
background-color: white; /* Pastikan background solid */
padding: 1rem;
border-radius: 0 0 10px 10px;
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
margin-top: 0.5rem;
}

.dropdown-menu {
background-color: white !important; /* Force white background */
border: none !important;
box-shadow: none !important;
margin-left: 1rem;
padding-left: 1rem;
border-left: 2px solid var(--primary) !important;
}

.nav-item {
margin-bottom: 0.5rem;
}

.navbar-toggler:focus {
box-shadow: 0 0 0 0.15rem rgba(67, 97, 238, 0.25);
}
}

/* Dark Mode Styles */
body.dark-mode {
background-color: #1a1a2e;
color: #f8f9fa;
}

.dark-mode .navbar {
background-color: #2b2d42 !important;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.dark-mode .navbar-brand,
.dark-mode .nav-link,
.dark-mode .nav-box {
color: #f8f9fa !important;
}

.dark-mode .dropdown-menu {
background-color: #2b2d42;
border-color: #3a3d57;
}

.dark-mode .dropdown-item {
color: #f8f9fa;
}

.dark-mode .dropdown-item:hover {
background-color: #3a3d57;
}

.dark-mode .search-input {
background-color: #2b2d42;
color: #f8f9fa;
border-color: #3a3d57;
}

.dark-mode .search-btn {
background-color: #3a3d57;
color: #f8f9fa;
border-color: #3a3d57;
}

/* Blog Post Styles */
.blog-post {
background: #fff;
border-radius: 8px;
padding: 2rem;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.blog-title {
font-size: 2rem;
font-weight: 700;
color: #2c3e50;
line-height: 1.3;
}

.blog-meta {
color: #7f8c8d;
font-size: 0.9rem;
margin-bottom: 1.5rem;
}

.blog-meta i {
width: 16px;
text-align: center;
margin-right: 3px;
}

.blog-image {
width: 100%;
border-radius: 8px;
margin-bottom: 1.5rem;
}

.blog-content {
line-height: 1.8;
color: #34495e;
}

.blog-content p {
margin-bottom: 1.5rem;
}

.blog-subtitle {
font-size: 1.5rem;
font-weight: 600;
color: #2c3e50;
margin: 2.5rem 0 1.5rem;
padding-bottom: 0.5rem;
border-bottom: 2px solid #f1f1f1;
}

.blog-note {
background: #f8f9fa;
border-left: 4px solid #3498db;
padding: 1rem;
margin: 2rem 0;
border-radius: 0 4px 4px 0;
display: flex;
}

.note-icon {
color: #3498db;
margin-right: 1rem;
font-size: 1.2rem;
}

.note-content {
flex: 1;
}

.blog-code {
background: #282c34;
color: #abb2bf;
padding: 1.5rem;
border-radius: 8px;
margin: 1.5rem 0;
overflow-x: auto;
}

.blog-list {
margin: 1.5rem 0;
padding-left: 1.5rem;
}

.blog-list li {
margin-bottom: 0.5rem;
}

.blog-table {
width: 100%;
margin: 1.5rem 0;
border-collapse: collapse;
}

.blog-table th, .blog-table td {
padding: 12px 15px;
border: 1px solid #ddd;
text-align: left;
}

.blog-table th {
background-color: #f8f9fa;
}

/* Author Section */
.blog-author {
display: flex;
margin: 3rem 0;
padding: 1.5rem;
background: #f8f9fa;
border-radius: 8px;
}

.author-image {
margin-right: 1.5rem;
}

.author-image img {
width: 80px;
height: 80px;
border-radius: 50%;
object-fit: cover;
}

.author-info h5 {
margin-bottom: 0.5rem;
color: #2c3e50;
}

/* Comments Section */
.blog-comments {
margin-top: 3rem;
}

.comments-title {
font-size: 1.5rem;
margin-bottom: 1.5rem;
color: #2c3e50;
}

.comment-item {
display: flex;
margin-bottom: 1.5rem;
padding-bottom: 1.5rem;
border-bottom: 1px solid #eee;
}

.comment-avatar {
margin-right: 1rem;
}

.comment-avatar img {
width: 50px;
height: 50px;
border-radius: 50%;
object-fit: cover;
}

.comment-header {
display: flex;
align-items: center;
margin-bottom: 0.5rem;
}

.comment-author {
font-weight: 600;
margin-right: 1rem;
color: #2c3e50;
}

.comment-date {
color: #7f8c8d;
font-size: 0.85rem;
}

.comment-text {
color: #34495e;
line-height: 1.6;
}

.comment-form {
margin-top: 2rem;
}

.form-title {
font-size: 1.25rem;
margin-bottom: 1.5rem;
color: #2c3e50;
}

/* Related Articles - Your Original Style */
.article-related {
margin-top: 3rem;
padding-top: 2rem;
border-top: 1px solid #eee;
}

.article-card {
transition: all 0.3s ease;
height: 100%;
border: none !important;
}

.article-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.article-card .card-img-top {
height: 150px;
object-fit: cover;
border-radius: 6px 6px 0 0;
}

.article-card .card-body {
padding: 1.25rem;
}

.article-card .card-title {
font-size: 1rem;
font-weight: 600;
color: #2c3e50;
margin-bottom: 0.75rem;
}

.article-card .card-text {
color: #7f8c8d;
font-size: 0.9rem;
margin-bottom: 1rem;
}

.article-card .text-muted {
font-size: 0.8rem;
}

/* Sidebar Widgets */
.blog-widget {
background: #fff;
border-radius: 8px;
padding: 1.5rem;
margin-bottom: 1.5rem;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.widget-title {
font-size: 1.25rem;
margin-bottom: 1.5rem;
color: #2c3e50;
padding-bottom: 0.75rem;
border-bottom: 2px solid #f1f1f1;
}

.category-list {
list-style: none;
padding: 0;
}

.category-list li {
margin-bottom: 0.75rem;
}

.category-list a {
color: #34495e;
text-decoration: none;
transition: color 0.3s;
}

.category-list a:hover {
color: #3498db;
}

.category-list i {
width: 20px;
text-align: center;
margin-right: 0.5rem;
}

.popular-posts {
margin-top: 1rem;
}

.popular-post {
display: flex;
margin-bottom: 1rem;
padding-bottom: 1rem;
border-bottom: 1px solid #eee;
}

.popular-post:last-child {
border-bottom: none;
margin-bottom: 0;
padding-bottom: 0;
}

.post-image {
width: 80px;
margin-right: 1rem;
}

.post-image img {
width: 100%;
height: 60px;
object-fit: cover;
border-radius: 4px;
}

.post-info h5 {
font-size: 0.95rem;
margin-bottom: 0.5rem;
}

.post-info h5 a {
color: #2c3e50;
text-decoration: none;
transition: color 0.3s;
}

.post-info h5 a:hover {
color: #3498db;
}

.post-meta {
font-size: 0.8rem;
color: #7f8c8d;
}

.post-meta span {
margin-right: 0.75rem;
}

.post-meta i {
margin-right: 0.25rem;
}


/* Dark Mode Toggle Styling */
.dark-mode-toggle {
width: 2.5em;
height: 1.5em;
cursor: pointer;
}

.form-check-label {
cursor: pointer;
margin-left: 0.5rem;
}