/* ===================================================
   STUDEV BLOG - COMPLETE REFACTOR
   Version: 4.0
   Modern, Clean & Mobile-First Design
   =================================================== */

/* === CSS VARIABLES === */
:root {
    /* Colors */
    --primary: #a00000;
    --primary-dark: #7a0000;
    --primary-light: #c81818;

    /* Light Theme */
    --bg-main: #F9FAFB;
    --bg-secondary: #f8f9fa;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Spacing */
    --header-height: 70px; /* REVISI: Kembali ke 70px */
    --nav-height: 52px; /* REVISI: Kembali ke 52px */
    --container-max: 1200px;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-main: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --card-bg: #1e293b;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* === BASE STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-main);
    transition: background-color var(--transition-base), color var(--transition-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-heading {
    font-family: 'Poppins', sans-serif;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-base);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Container */
.container-xl {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1rem;
}

/* === HEADER === */
.header-main {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.header-content {
    display: grid;
    grid-template-columns: auto 1fr auto; 
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0; 
    min-height: var(--header-height);
    transition: all 0.3s ease;
}

.header-main.header-compact .header-content {
    padding: 0.5rem 0;
    min-height: 60px;
}

.header-main.header-compact .header-logo img {
    height: 28px;
}

.header-main.header-compact .search-input {
    padding: 0.6rem 1rem 0.6rem 2.75rem;
    font-size: 0.85rem;
}

.header-main.header-compact .btn-icon {
    width: 36px;
    height: 36px;
}

.header-main.header-compact .btn-icon svg {
    width: 18px;
    height: 18px;
}

.header-logo {
    justify-self: start; 
}

.header-logo img {
    height: 32px; 
    width: auto;
    transition: all 0.3s ease;
}

.header-logo:hover img {
    transform: scale(1.05);
}

/* Search Bar */
.header-search {
    max-width: none; 
    width: 100%;
    margin: 0 auto;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrapper svg {
    position: absolute;
    left: 1rem;
    width: 18px; 
    height: 18px; 
    stroke: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem; 
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem; 
    transition: all var(--transition-base);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(160, 0, 0, 0.1);
    background: var(--bg-main);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-self: end; 
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; 
    height: 40px; 
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    transition: all var(--transition-base);
}

.btn-icon svg {
    width: 20px; 
    height: 20px; 
    stroke: var(--text-primary);
    transition: all var(--transition-base);
}

.btn-icon:hover {
    background: var(--primary);
}

.btn-icon:hover svg {
    stroke: white;
    transform: scale(1.1);
}

.btn-icon:active {
    transform: scale(0.95);
}

/* Navigasi Kategori */
.nav-categories {
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-main);
    transition: all 0.3s ease;
    transform: translateY(0);
    opacity: 1;
    max-height: 200px; 
    overflow: hidden;
    position: relative;
    z-index: 99; 
}

.nav-categories.nav-hidden {
    transform: translateY(-100%);
    opacity: 0;
    max-height: 0;
    pointer-events: none;
    border-bottom: none;
}

.nav-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.75rem 0; 
}

.nav-scroll::-webkit-scrollbar {
    display: none;
}

.nav-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem; 
    border-radius: 9999px;
    font-size: 0.9rem; 
    font-weight: 500;
    white-space: nowrap;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    transition: all var(--transition-base);
}

.nav-pill:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.nav-pill.active {
    background: var(--primary);
    color: white;
}

/* === MAIN CONTENT === */
.main-content {
    padding: 3rem 0;
}

/* Section Styles */
.section-bento,
.section-list {
    margin-bottom: 4rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    font-size: 1.75rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.section-title .title-text {
    color: var(--text-primary);
}

.section-title .title-line {
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header .section-title {
    margin-bottom: 0;
}

.link-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--primary);
    transition: gap var(--transition-base);
}

.link-more:hover {
    gap: 0.75rem;
}

.link-more svg {
    width: 16px;
    height: 16px;
}

/* === BENTO GRID === */
.bento-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    grid-auto-rows: 240px;
}

.bento-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--card-bg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-link {
    display: block;
    height: 100%;
}

/* Featured Card */
.bento-card.featured {
    grid-column: span 2;
    grid-row: span 2;
}

.card-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.bento-card:hover .card-image img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
}

.badge-category {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    align-self: flex-start;
    transition: transform var(--transition-base);
}

.bento-card:hover .badge-category {
    transform: translateY(-4px);
}

.card-overlay .card-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.card-meta svg {
    width: 14px;
    height: 14px;
}

/* Small Bento Cards */
.bento-card.small {
    grid-column: span 1;
    grid-row: span 1;
}

.bento-card.small .card-image {
    height: 140px;
}

.card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.badge-small {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.card-title-small {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
}

.card-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Trending Bento Card */
.bento-card.trending {
    grid-column: span 1;
    grid-row: span 1;
    background: linear-gradient(135deg, rgba(160, 0, 0, 0.1) 0%, rgba(160, 0, 0, 0.05) 100%);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.trending-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    align-self: flex-start;
    margin-bottom: 1rem;
}

.trending-badge svg {
    width: 16px;
    height: 16px;
}

.bento-card.trending .card-title-small {
    flex: 1;
}

.card-category {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* === CARD GRID === */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Simple Card (Trending) */
.card-simple {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-simple:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.rank-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: rgba(160, 0, 0, 0.1);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    align-self: flex-start;
}

.card-simple-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    flex: 1;
    font-family: 'Poppins', sans-serif;
}

.card-simple-category {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Event Card */
.card-event {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    height: 100%;
}

.card-event:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-event-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.card-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card-event:hover .card-event-image img {
    transform: scale(1.1);
}

.card-event-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.event-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.card-event-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.event-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.event-meta svg {
    width: 14px;
    height: 14px;
}

/* Article Card */
.card-article {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    height: 100%;
}

.card-article:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-article-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.card-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card-article:hover .card-article-image img {
    transform: scale(1.1);
}

.card-article-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.article-category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.card-article-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
}

.card-article-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.article-meta svg {
    width: 14px;
    height: 14px;
}

/* === BUTTONS === */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(160, 0, 0, 0.3);
}

/* === FOOTER === */
.footer-main {
    background: linear-gradient(to bottom, var(--bg-secondary) 0%, var(--bg-main) 100%);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-column h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column ul li a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color var(--transition-base);
}

.footer-column ul li a:hover {
    color: var(--primary);
}

.footer-about p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-office {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.footer-office strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    transition: all var(--transition-base);
}

.footer-social a svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
    transition: stroke var(--transition-base);
}

.footer-social a:hover {
    background: var(--primary);
}

.footer-social a:hover svg {
    stroke: white;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-tags a {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: rgba(160, 0, 0, 0.1);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-base);
}

.category-tags a:hover {
    background: var(--primary);
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--primary);
    font-weight: 500;
}

/* === BACK TO TOP === */
.btn-back-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 99;
}

.btn-back-top.show {
    opacity: 1;
    visibility: visible;
}

.btn-back-top svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.btn-back-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

/* === RESPONSIVE === */
@media (max-width: 991.98px) {
    .header-content {
        grid-template-columns: auto 1fr auto;
        gap: 1rem;
    }

    .header-search {
        grid-column: 1 / -1;
        grid-row: 2;
        max-width: 100%;
        padding: 0 0 0.5rem 0; 
    }
    
    .search-input {
        font-size: 0.9rem;
    }

    .nav-categories {
        max-height: 0;
        opacity: 0;
        transform: translateY(-10px); 
        pointer-events: none;
        overflow: hidden;
        padding-top: 0; 
        padding-bottom: 0;
        border-bottom: none; 
    }
    
    .nav-scroll {
        padding-top: 0;
    }

    .nav-categories.show-mobile {
        max-height: 200px; 
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
        border-bottom: 1px solid var(--border-color); 
    }
    
    .nav-categories.show-mobile .nav-scroll {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .nav-categories.nav-hidden {
        transform: translateY(0);
        opacity: 1;
        max-height: 200px;
    }
    
    .nav-categories:not(.show-mobile).nav-hidden {
         transform: translateY(-100%);
         opacity: 0;
         max-height: 0;
    }
    
    .bento-container {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 1.25rem;
    }

    .bento-card.featured,
    .bento-card.small,
    .bento-card.trending {
        grid-column: 1;
        grid-row: auto;
    }

    .bento-card.featured {
        min-height: 300px;
    }

    .bento-card.small .card-image {
        height: 200px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 767.98px) {
    .main-content {
        padding: 2rem 0;
    }

    .section-bento,
    .section-list {
        margin-bottom: 3rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .btn-back-top {
        width: 44px;
        height: 44px;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

/* === ANIMATIONS === */
@media (prefers-reduced-motion: no-preference) {

    .bento-card,
    .card-simple,
    .card-event,
    .card-article {
        animation: fadeIn 0.6s ease forwards;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

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

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ====================================================== */
/* === PAGE SPESIFIK: ARTIKEL DETAIL & KATEGORI === */
/* ====================================================== */

.article-post-wrapper {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
}

.article-header .article-category {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: inline-block;
}

.article-header .article-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.article-meta-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-meta-header span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-meta-header svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-muted);
}

.article-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.article-share-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.article-share a {
    color: var(--text-muted);
    transition: color var(--transition-base);
}

.article-share a:hover {
    color: var(--primary);
}

.article-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h2 {
    font-size: 1.75rem;
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content h4 {
    font-size: 1.25rem;
}

.article-content a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: underline;
}

.article-content a:hover {
    color: var(--primary-dark);
}

.article-content ul,
.article-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content figure {
    margin: 2rem 0;
}

.article-content img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.article-author-box {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

.article-author-box img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
}

.article-author-box .author-info span {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.article-author-box .author-info h5 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-top: 0.25rem;
}

.article-sidebar .widget-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-sidebar .widget-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.article-sidebar .popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-sidebar .popular-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.article-sidebar .popular-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.article-sidebar .popular-list .rank {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(160, 0, 0, 0.1);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.article-sidebar .popular-list .post-info a {
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    display: block;
    margin-bottom: 0.25rem;
}

.article-sidebar .popular-list .post-info a:hover {
    color: var(--primary);
}

.article-sidebar .popular-list .post-info .date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.article-sidebar .category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-sidebar .category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.article-sidebar .category-list li:first-child a {
    padding-top: 0;
}

.article-sidebar .category-list li:last-child a {
    border-bottom: none;
    padding-bottom: 0;
}

.article-sidebar .category-list li a:hover {
    color: var(--primary);
}

.article-sidebar .category-list li a svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-base);
}

.article-sidebar .category-list li a:hover svg {
    transform: translateX(4px);
}

.article-sidebar .cta-widget {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
}

.article-sidebar .cta-widget h5 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.article-sidebar .cta-widget p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.article-sidebar .cta-widget .btn-cta {
    display: inline-block;
    background-color: white;
    color: var(--primary-dark);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-base);
}

.article-sidebar .cta-widget .btn-cta:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* ====================================================== */
/* === PENAMBAHAN STYLE BARU DARI article_category.html === */
/* ====================================================== */

.category-header {
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.category-header h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.breadcrumb {
    --bs-breadcrumb-divider-color: var(--text-muted);
    --bs-breadcrumb-item-active-color: var(--text-secondary);
    margin-bottom: 0;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item::before {
    color: var(--text-muted) !important;
}

/* Pagination (Bootstrap Override) */
.pagination {
    --bs-pagination-color: var(--primary);
    --bs-pagination-active-bg: var(--primary);
    --bs-pagination-active-border-color: var(--primary);
    --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(160, 0, 0, 0.25);
    --bs-pagination-hover-color: var(--primary-dark);
}

.page-link {
    color: var(--primary);
}

.page-link:hover {
    color: var(--primary-dark);
}

.page-item.disabled .page-link {
    color: var(--text-muted);
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

.page-link.active,
.active>.page-link {
    background-color: var(--primary);
    border-color: var(--primary);
}


/* ====================================================== */
/* === MEDIA QUERY UNTUK PAGE SPESIFIK === */
/* ====================================================== */

@media (max-width: 991.98px) {
    .article-post-wrapper {
        padding: 1.5rem;
    }

    .article-header .article-title {
        font-size: 2rem;
    }
    
    .category-header h1 {
        font-size: 2rem;
    }
}

/* ====================================================== */
/* === RELATED ARTICLES LIST === */
/* ====================================================== */

.related-articles-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.related-article-item {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.25rem;
}

.related-article-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-article-link {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

.related-article-link:hover {
    opacity: 0.8;
}

.related-article-image {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--bg-secondary);
}

.related-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.related-article-link:hover .related-article-image img {
    transform: scale(1.05);
}

.related-article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.related-article-content .article-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.related-article-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-article-content .article-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-article-content .article-meta i {
    width: 14px;
    height: 14px;
}

/* Responsive untuk related articles */
@media (max-width: 576px) {
    .related-article-image {
        width: 100px;
        height: 67px;
    }
    
    .related-article-title {
        font-size: 0.9rem;
    }
}
/* ====================================================== */
/* === CARD ARTICLE IMAGE CLICKABLE === */
/* ====================================================== */

/* Pastikan card-article-image sebagai link tetap terlihat baik */
.card-article-image {
    display: block;
    text-decoration: none;
}

/* Untuk memastikan tidak ada konflik jika sebelumnya card-article-image adalah div */
.card-article a.card-article-image {
    display: block;
    text-decoration: none;
}

/* ====================================================== */
/* === SEARCH RESULT TITLE TRUNCATE === */
/* ====================================================== */

/* Override untuk card title di hasil search agar sama tinggi */
.search-results .card-article-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3em; /* 2 baris minimum */
    max-height: 3em; /* 2 baris maksimum */
    line-height: 1.5em;
}

/* Pastikan link di dalam title tidak break layout */
.search-results .card-article-title a {
    display: inline;
    color: inherit;
    text-decoration: none;
}

.search-results .card-article-title a:hover {
    color: var(--primary);
}

/* ====================================================== */
/* === CARD IMAGE HOVER ENHANCEMENT === */
/* ====================================================== */

.card-article a.card-article-image {
    display: block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-article a.card-article-image img {
    transition: transform 0.4s ease, filter 0.3s ease;
}

.card-article a.card-article-image:hover img {
    transform: scale(1.05);
}

/* Optional: Overlay effect saat hover */
.card-article a.card-article-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.card-article a.card-article-image:hover::after {
    background: rgba(0, 0, 0, 0.1);
}

/* ====================================================== */
/* === CARD EVENT CLICKABLE ENHANCEMENT === */
/* ====================================================== */

/* Image link wrapper */
.card-event-image-link {
    display: block;
    text-decoration: none;
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.card-event-image-link .card-event-image {
    height: 100%;
}

/* Hover effect untuk image link */
.card-event-image-link:hover .card-event-image img {
    transform: scale(1.1);
}

/* Optional: Overlay effect saat hover image */
.card-event-image-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.card-event-image-link:hover::after {
    background: rgba(0, 0, 0, 0.15);
}

/* Title link */
.card-event-title-link {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base);
    display: block;
}

.card-event-title-link:hover {
    color: var(--primary);
}

/* Button styling untuk link */
a.btn-primary {
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

/* Ensure button inside card-event-body tidak full width */
.card-event-body > a.btn-primary {
    align-self: flex-start;
    margin-top: 0.5rem;
}

/* Hover state untuk card event tetap berfungsi */
.card-event:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .card-event-body > a.btn-primary {
        align-self: stretch; /* Full width di mobile */
    }
}