/* ============================================
   KATEGORI - STYLE KHUSUS
   ============================================ */

/* ============================================
   ROOT VARIABLES (sesuaikan dengan tema utama)
   ============================================ */
:root {
    --primary: #0056b3;
    --primary-dark: #003d82;
    --primary-light: #e8f0fe;
    --secondary: #f59e0b;
    --success: #10b981;
    --danger: #dc2626;
    --dark: #1a1a2e;
    --text: #2c3e50;
    --text-light: #666;
    --gray: #888;
    --gray-light: #f5f7fa;
    --border: #e8e8e8;
    --white: #ffffff;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --transition: all 0.3s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================
   CATEGORY HERO
   ============================================ */
.category-hero {
    padding: 50px 0 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, var(--primary-light) 100%);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.category-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0,86,179,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.category-hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -15%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0,168,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.category-hero-content {
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.category-hero-icon {
    width: 85px;
    height: 85px;
    background: linear-gradient(135deg, var(--primary), #00a8ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 10px 30px rgba(0,86,179,0.3);
    transition: var(--transition);
}

.category-hero-icon:hover {
    transform: scale(1.05) rotate(-5deg);
}

.category-hero-text h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark);
    margin: 0 0 8px;
    line-height: 1.2;
}

.category-hero-text p {
    color: var(--text-light);
    font-size: 1.05rem;
    margin: 0 0 12px;
    max-width: 600px;
    line-height: 1.6;
}

.category-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.category-stats span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-light);
    background: var(--white);
    padding: 5px 18px;
    border-radius: 25px;
    box-shadow: var(--shadow);
    font-weight: 500;
}

.category-stats i {
    color: var(--primary);
}

/* ============================================
   CATEGORY CONTENT
   ============================================ */
.category-content {
    padding: 40px 0 60px;
}

.category-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

/* ============================================
   CATEGORY NEWS GRID
   ============================================ */
.category-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* News Card */
.category-news-grid .news-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.category-news-grid .news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* News Image */
.category-news-grid .news-image {
    position: relative;
    padding-bottom: 65%;
    overflow: hidden;
    background: var(--gray-light);
}

.category-news-grid .news-image a {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.category-news-grid .news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-news-grid .news-card:hover .news-image img {
    transform: scale(1.05);
}

/* Tags on Image */
.headline-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--secondary);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
    display: flex;
    align-items: center;
    gap: 4px;
}

.headline-tag i {
    font-size: 0.6rem;
}

.featured-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: var(--danger);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.3);
}

/* News Content */
.category-news-grid .news-content {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.75rem;
    color: var(--gray);
    flex-wrap: wrap;
    gap: 5px;
}

.news-category a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.news-category a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.news-date i {
    margin-right: 3px;
}

.category-news-grid .news-content h3 {
    font-size: 1.05rem;
    line-height: 1.4;
    margin-bottom: 8px;
}

.category-news-grid .news-content h3 a {
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
}

.category-news-grid .news-content h3 a:hover {
    color: var(--primary);
}

.category-news-grid .news-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 14px;
    flex: 1;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--gray);
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.news-footer i {
    margin-right: 4px;
}

/* ============================================
   SIDEBAR - KATEGORI
   ============================================ */
.category-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.category-sidebar .sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.category-sidebar .widget-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-sidebar .widget-title i {
    color: var(--primary);
}

/* Popular List Sidebar */
.popular-list-sidebar {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-list-sidebar li {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-light);
}

.popular-list-sidebar li:last-child {
    border-bottom: none;
}

.popular-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
}

.popular-link:hover {
    color: var(--primary);
}

.popular-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.popular-text {
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.3;
}

.popular-view-count {
    display: block;
    font-size: 0.7rem;
    color: var(--gray);
    margin-top: 4px;
    margin-left: 40px;
}

/* Category List Sidebar */
.category-list-sidebar {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list-sidebar li {
    margin-bottom: 6px;
}

.category-list-sidebar li:last-child {
    margin-bottom: 0;
}

.category-list-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.category-list-sidebar a i {
    width: 20px;
    color: var(--primary);
    font-size: 0.9rem;
}

.category-list-sidebar a:hover {
    background: var(--primary-light);
    color: var(--primary);
    transform: translateX(5px);
}

.category-list-sidebar a.active {
    background: var(--primary);
    color: var(--white);
}

.category-list-sidebar a.active i {
    color: var(--white);
}

/* Newsletter Widget */
.newsletter-widget p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.sidebar-newsletter {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-newsletter input {
    padding: 10px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: var(--transition);
    font-family: var(--font);
}

.sidebar-newsletter input:focus {
    outline: none;
    border-color: var(--primary);
}

.sidebar-newsletter button {
    padding: 10px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
}

.sidebar-newsletter button:hover {
    background: var(--primary-dark);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.empty-state i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--gray);
    margin-bottom: 20px;
    font-size: 1rem;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-back:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet & Desktop kecil */
@media (max-width: 1024px) {
    .category-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .category-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }

    .category-sidebar .sidebar-widget {
        margin-bottom: 0;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .category-hero {
        padding: 35px 0 25px;
    }

    .category-hero-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .category-hero-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .category-hero-text h1 {
        font-size: 1.8rem;
    }

    .category-hero-text p {
        font-size: 0.95rem;
        max-width: 100%;
    }

    .category-stats {
        justify-content: center;
    }

    .category-news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .category-sidebar {
        grid-template-columns: 1fr;
    }

    .category-content {
        padding: 30px 0 40px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .category-hero {
        padding: 25px 0 20px;
    }

    .category-hero-icon {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }

    .category-hero-text h1 {
        font-size: 1.4rem;
    }

    .category-hero-text p {
        font-size: 0.9rem;
    }

    .category-stats span {
        font-size: 0.8rem;
        padding: 4px 14px;
    }

    .category-news-grid .news-content h3 {
        font-size: 0.95rem;
    }

    .category-news-grid .news-content p {
        font-size: 0.85rem;
    }

    .category-sidebar .sidebar-widget {
        padding: 18px;
    }

    .news-meta-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .news-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .empty-state {
        padding: 40px 15px;
    }

    .empty-state i {
        font-size: 3rem;
    }

    .empty-state h3 {
        font-size: 1.2rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-news-grid .news-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.category-news-grid .news-card:nth-child(1) { animation-delay: 0.05s; }
.category-news-grid .news-card:nth-child(2) { animation-delay: 0.1s; }
.category-news-grid .news-card:nth-child(3) { animation-delay: 0.15s; }
.category-news-grid .news-card:nth-child(4) { animation-delay: 0.2s; }
.category-news-grid .news-card:nth-child(5) { animation-delay: 0.25s; }
.category-news-grid .news-card:nth-child(6) { animation-delay: 0.3s; }
.category-news-grid .news-card:nth-child(7) { animation-delay: 0.35s; }
.category-news-grid .news-card:nth-child(8) { animation-delay: 0.4s; }
.category-news-grid .news-card:nth-child(9) { animation-delay: 0.45s; }
.category-news-grid .news-card:nth-child(10) { animation-delay: 0.5s; }
.category-news-grid .news-card:nth-child(11) { animation-delay: 0.55s; }
.category-news-grid .news-card:nth-child(12) { animation-delay: 0.6s; }