/* Loading Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.artikel-item {
  animation: fadeIn 0.5s ease-in;
  margin-bottom: 2rem;
  padding: 1rem;
  transition: all 0.3s ease;
}

.artikel-item:hover {
  background-color: #f8f9fa;
}

/* Artikel Page Styles */
.artikel-header {
    padding: 2rem 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
}

.artikel-header h1 {
    color: var(--dark);
    margin-bottom: 1rem;
}

.artikel-header .lead {
    color: #666;
    font-size: 1.2rem;
}

.artikel-search .form-control {
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
}

.artikel-search .btn {
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
}

/* Artikel Card Styles */
.artikel-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    background: white;
}

.artikel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.artikel-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.artikel-card-body {
    padding: 1.5rem;
}

.artikel-card-body h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.artikel-card-body p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.artikel-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.artikel-meta .badge {
    font-weight: 500;
    padding: 0.35rem 0.75rem;
}

.artikel-meta .date,
.artikel-meta .read-time {
    color: #888;
}

/* Artikel List Styles */
.artikel-list {
    margin-bottom: 2rem;
}

.artikel-item {
    border-bottom: 1px solid #eee;
    padding: 1.5rem 0;
}

.artikel-item:first-child {
    padding-top: 0;
}

.artikel-item-body {
    padding: 0 1rem;
}

.artikel-item-body h5 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.artikel-item-body h5 a {
    color: var(--dark);
    text-decoration: none;
}

.artikel-item-body h5 a:hover {
    color: var(--primary);
}

.artikel-item-body p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

/* Sidebar Styles */
.artikel-sidebar {
    padding-left: 2rem;
}

@media (max-width: 991.98px) {
    .artikel-sidebar {
        padding-left: 0;
        margin-top: 3rem;
    }
}

.sidebar-widget {
    margin-bottom: 2.5rem;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
    color: var(--dark);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 50px;
    height: 2px;
    background: var(--primary);
}

/* Popular Articles */
.popular-articles {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-articles li {
    margin-bottom: 1rem;
}

.popular-articles li:last-child {
    margin-bottom: 0;
}

.popular-articles a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.popular-articles a:hover {
    background: #f8f9fa;
    color: var(--primary);
}

.popular-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.popular-title {
    flex-grow: 1;
    font-size: 0.95rem;
    margin-right: 0.5rem;
}

.popular-views {
    font-size: 0.8rem;
    color: #888;
    white-space: nowrap;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0.5rem;
    text-align: center;
    border-radius: 8px;
    background: #f8f9fa;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-card:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.category-card i {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.category-card span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Tags Cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #f0f0f0;
    color: #555;
    border-radius: 50px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag:hover {
    background: var(--primary);
    color: white;
}

/* Newsletter Widget */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-form input {
    border-radius: 50px;
    padding: 0.75rem 1.25rem;
    border: 1px solid #ddd;
}

.newsletter-form button {
    border-radius: 50px;
    padding: 0.75rem;
    font-weight: 500;
}

/* Video Thumbnail */
.video-thumbnail {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.video-thumbnail iframe {
    width: 100%;
    height: 180px;
    border: none;
}

.video-caption {
    padding: 0.75rem;
    background: white;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
}

/* Section Title */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 50px;
    height: 2px;
    background: var(--primary);
}

/* Pagination */
.pagination .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
}

.pagination .page-link {
    color: var(--dark);
    border-radius: 50px !important;
    margin: 0 0.25rem;
}

.pagination .page-link:hover {
    color: var(--primary);
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .artikel-item .col-md-4 {
        margin-bottom: 1rem;
    }
    
    .artikel-item-body {
        padding: 0;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
}