body {
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

/* Gradient header dan footer tematik */
.gradient-header,
.gradient-footer {
    background: linear-gradient(135deg, #FFB300, #F44336, #1E88E5, #002E5D);
}

.gradient-button {
    background-image: linear-gradient(135deg, #FFB300, #F44336, #1E88E5, #002E5D);
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.gradient-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.15);
}

/* Dark mode styles */
body.dark-mode {
    background-color: #111827;
    color: #f3f4f6;
}

.dark-mode .article-card {
    background: #1f2937;
    border-color: #374151;
}


/* =============================================== */
/* == SOLUSI WARNA TEKS JUDUL RESPONSIVE THEME == */
/* =============================================== */

/* Aturan untuk judul di halaman daftar artikel (ruang.html) */
.article-card h3 a {
    color: #1f2937;
    transition: color 0.3s ease;
}

.dark-mode .article-card h3 a {
    color: #f9fafb;
}

/* Aturan untuk judul di halaman detail (artikel.html) */
#article-title {
    color: #111827;
    transition: color 0.3s ease;
}

.dark-mode #article-title {
    color: #ffffff;
}

.dark-mode .filter-tag {
    background: #374151;
    color: #e5e7eb;
}

.dark-mode .filter-tag.active {
    background: linear-gradient(135deg, #FFB300, #F44336);
    color: white;
}

.dark-mode .search-input {
    background: #1f2937;
    border-color: #374151;
    color: #f3f4f6;
}

/* Interactive elements */
.interactive-element {
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.interactive-element:hover {
    transform: scale(1.02);
}

.interactive-element:active {
    transform: scale(0.98);
}

/* Article grid styles */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(16px, 3vw, 24px);
}

.article-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.article-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.article-thumbnail {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-thumbnail img {
    transform: scale(1.1);
}

.article-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-new {
    background: linear-gradient(135deg, #10b981, #059669);
}

.badge-popular {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.badge-trending {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #FFB300, #F44336);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Filter styles */
.filter-container {
    position: relative;
    padding: 16px 0;
    margin-bottom: 32px;
}

.filter-tags-wrapper {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -ms-overflow-style: auto;
    padding-bottom: 4px;
}

.filter-tags-wrapper::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 4px;
    width: 30px;
    background: linear-gradient(to left, rgb(249 250 251 / 0.9), rgb(249 250 251 / 0));
    pointer-events: none;
    opacity: var(--opacity, 1);
    transition: opacity 0.3s;
    z-index: 2;
}

.dark-mode .filter-tags-wrapper::after {
    background: linear-gradient(to left, rgb(17 24 39 / 0.9), rgb(17 24 39 / 0));
}

.filter-tags {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    scroll-behavior: smooth;
    min-width: max-content;
}

.filter-tags-wrapper::-webkit-scrollbar {
    height: 8px;
}

.filter-tags-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
    margin: 0 30px;
}

.filter-tags-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #FFB300, #F44336);
    border-radius: 4px;
    transition: background 0.3s;
}

.filter-tags-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #F44336, #FFB300);
}

.dark-mode .filter-tags-wrapper::-webkit-scrollbar-track {
    background: #1e293b;
}

.dark-mode .filter-tags-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #FFB300, #F44336);
}

@media (max-width: 768px) {
    .filter-tags-wrapper {
        margin: 0 -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .filter-tags-wrapper::after {
        width: 20px;
    }

    .filter-tags {
        gap: 8px;
        padding: 6px 0;
    }

    .filter-tag {
        padding: 10px 20px;
        font-size: 14px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .filter-tags-wrapper::-webkit-scrollbar {
        height: 6px;
    }
}

.filter-tags-wrapper::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}

.filter-tags-wrapper::-webkit-scrollbar-thumb {
    background-color: #F44336;
    border-radius: 10px;
}

.filter-tags-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: #FFB300;
}

.dark-mode .filter-tags-wrapper::-webkit-scrollbar-track {
    background: #111827;
}

.dark-mode .filter-tags-wrapper::-webkit-scrollbar-thumb {
    background-color: #FFB300;
}

.dark-mode .filter-tags-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: #F44336;
}

.filter-tag {
    white-space: nowrap;
    padding: 12px 24px;
    background: #ffffff;
    color: #374151;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dark-mode .filter-tag {
    background: #1f2937;
    border-color: #374151;
    color: #e5e7eb;
}

.filter-tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    border-color: #FFB300;
}

.filter-tag.active {
    background: linear-gradient(135deg, #FFB300, #F44336);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 179, 0, 0.3);
}

/* ================================================= */
/* ==   PERBAIKAN WARNA TEKS FILTER & SORT      == */
/* ================================================= */

/* Perbaikan untuk teks "Filter Kategori" */
.filter-container h3 {
    color: #111827; /* Warna default gelap untuk mode terang */
}

.dark-mode .filter-container h3 {
    color: #ffffff; /* Warna terang untuk mode gelap */
}

/* Perbaikan untuk teks "Urutkan:" (label sort) */
.sort-select-label { /* Menambahkan kelas baru untuk label */
    color: #374151; /* Warna default abu-abu gelap untuk mode terang */
}

.dark-mode .sort-select-label {
    color: #e5e7eb; /* Warna abu-abu terang untuk mode gelap */
}

/* Memastikan teks di dalam dropdown select itu sendiri responsif */
.sort-select {
    color: #374151; /* Default untuk mode terang */
    background-color: white;
    border-color: #e2e8f0;
}
.dark-mode .sort-select {
    color: #e5e7eb; /* Untuk mode gelap */
    background-color: #1f2937;
    border-color: #374151;
}

/* Perbaikan untuk teks "12 artikel tersedia" */
#article-count {
    color: #6b7280; /* Warna default abu-abu */
}

.dark-mode #article-count {
    color: #9ca3af; /* Warna abu-abu yang lebih terang untuk dark mode */
}

/* Search bar styles */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 32px;
}

.search-input {
    width: 100%;
    padding: 16px 24px 16px 56px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    background: white;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    border-color: #FFB300;
    box-shadow: 0 0 0 4px rgba(255, 179, 0, 0.1);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 18px;
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
}

.pagination button {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pagination button:hover {
    border-color: #FFB300;
    color: #FFB300;
    transform: translateY(-2px);
}

.pagination .active {
    background: linear-gradient(135deg, #FFB300, #F44336);
    color: white;
    border-color: transparent;
}

/* Loading animation */
.loading-card {
    background: #f8fafc;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.loading-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Floating animations */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
    .filter-container {
        position: relative;
        top: 0;
    }
    .hero-section h1 {
        font-size: 2.5rem;
    }
}

/* ================================================================== */
/* == UPGRADE TAMPILAN TIPOGRAFI ARTIKEL (INSPIRASI RUANGGURU) == */
/* ================================================================== */

.prose {
    font-size: 1.125rem;
    line-height: 1.75;
    color: #374151;
}

.dark-mode .prose {
    color: #d1d5db;
}

.prose h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-top: 2.5em;
    margin-bottom: 1em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #e5e7eb;
}

.dark-mode .prose h2 {
    border-bottom-color: #374151;
}

.prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
}

.prose ul, .prose ol {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.5em;
}

.prose li {
    padding-left: 0.5em;
    margin-top: 0.5em;
}

.prose li::marker {
    color: #6b7280;
}

.dark-mode .prose li::marker {
    color: #9ca3af;
}

.prose strong {
    color: #111827;
}

.dark-mode .prose strong {
    color: #ffffff;
}

.prose table {
    width: 100%;
    margin-top: 2em;
    margin-bottom: 2em;
    border-collapse: collapse;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.prose th, .prose td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    text-align: left;
}

.prose thead th {
    font-weight: 600;
    background-color: #f9fafb;
}

.dark-mode .prose th, .dark-mode .prose td {
    border-color: #374151;
}

.dark-mode .prose thead th {
    background-color: #1f2937;
}

.prose blockquote {
    font-style: italic;
    color: #4b5563;
    padding: 1rem 1.5rem;
    margin: 2em 0;
    border-left: 4px solid #FFB300;
    background-color: #fefce8;
}

.dark-mode .prose blockquote {
    color: #d1d5db;
    border-left-color: #F44336;
    background-color: rgba(31, 41, 55, 0.5);
}

/* ================================================= */
/* ==   STYLING UNTUK CUSTOM LIST POINTERS      == */
/* ================================================= */

.prose .list-checkmark,
.prose .list-arrow,
.prose .list-square {
    list-style-type: none;
    padding-left: 0.5em;
}

.prose .list-checkmark li,
.prose .list-arrow li,
.prose .list-square li {
    padding-left: 1.5em;
    position: relative;
}

.prose .list-checkmark li::before,
.prose .list-arrow li::before,
.prose .list-square li::before {
    position: absolute;
    left: 0;
    top: 0.1em;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.9em;
}

.prose .list-checkmark li::before {
    content: '\f00c';
    color: #16a34a;
}
.dark-mode .prose .list-checkmark li::before {
    color: #4ade80;
}

.prose .list-arrow li::before {
    content: '\f061';
    color: #ea580c;
}
.dark-mode .prose .list-arrow li::before {
    color: #fb923c;
}

.prose .list-square li::before {
    content: '\f0c8';
    color: #6366f1;
    font-size: 0.7em;
    top: 0.3em;
}
.dark-mode .prose .list-square li::before {
    color: #818cf8;
}

/* ================================================= */
/* ==   PENINGKATAN TAMPILAN TABEL & TIPS BOX   == */
/* ================================================= */

.prose tbody tr:nth-child(even) {
    background-color: #f9fafb;
}
.dark-mode .prose tbody tr:nth-child(even) {
    background-color: rgba(31, 41, 55, 0.5);
}

.prose thead th {
    font-weight: 700;
    color: #111827;
}
.dark-mode .prose thead th {
    color: #ffffff;
}

.prose .callout-tip {
    background-color: #fefce8;
    border: 1px solid #fde68a;
    border-left: 4px solid #facc15;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    margin: 2em 0;
}

.dark-mode .prose .callout-tip {
    background-color: rgba(74, 54, 8, 0.2);
    border-color: #713f12;
    border-left-color: #facc15;
}

.prose .callout-tip p {
    margin: 0;
}

/* ================================================= */
/* ==           STYLING BREADCRUMB              == */
/* ================================================= */

.breadcrumb-nav {
    margin-bottom: 2rem; /* Jarak dengan elemen di bawahnya */
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem; /* Jarak antar item */
    font-size: 0.875rem; /* Ukuran font 14px */
}

.breadcrumb-item a {
    color: #4b5563; /* Warna abu-abu */
    transition: color 0.2s ease-in-out;
}

.dark-mode .breadcrumb-item a {
    color: #9ca3af;
}

.breadcrumb-item a:hover {
    color: #1d4ed8; /* Warna biru saat hover */
}

.dark-mode .breadcrumb-item a:hover {
    color: #60a5fa;
}

.breadcrumb-separator {
    color: #9ca3af;
    margin: 0 0.25rem;
}

.breadcrumb-current {
    color: #6b7280; /* Warna untuk halaman aktif */
    font-weight: 500;
}

.dark-mode .breadcrumb-current {
    color: #d1d5db;
}