/* =====================================================
   Portal Berita DP3AP2KB Kabupaten Lamandau
   Custom CSS - Modern & Responsive
   ===================================================== */

:root {
    --primary: #1d4ed8;
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;
    --secondary: #0ea5e9;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --gray-900: #0f172a;
    --gray-800: #1e293b;
    --gray-700: #334155;
    --gray-600: #475569;
    --gray-500: #64748b;
    --gray-400: #94a3b8;
    --gray-300: #cbd5e1;
    --gray-200: #e2e8f0;
    --gray-100: #f1f5f9;
    --gray-50: #f8fafc;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #1d4ed8 0%, #1e40af 50%, #0ea5e9 100%);
    --gradient-light: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--gray-50);
    overflow-x: hidden;
}

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

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

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

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-sm {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== TOP BAR ========== */
.topbar {
    background: var(--gray-900);
    color: var(--gray-300);
    font-size: 13px;
    padding: 8px 0;
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.topbar-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.topbar-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.topbar-social {
    display: flex;
    gap: 12px;
}

.topbar-social a {
    color: var(--gray-400);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.topbar-social a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* ========== HEADER ========== */
.header {
    background: var(--white);
    box-shadow: 0 1px 0 rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 200;
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    gap: 16px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(29,78,216,0.3);
    flex-shrink: 0;
}

.logo-text h1 {
    font-size: 17px;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.2;
}

.logo-text p {
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 1px;
    white-space: normal;
    line-height: 1.4;
    max-width: 220px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

/* ========== NAVIGATION ========== */
.nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 14px;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    line-height: inherit;
}

.nav-link i:not(.nav-arrow) { font-size: 13px; opacity: 0.7; }
.nav-arrow { font-size: 10px !important; opacity: 1 !important; transition: transform 0.2s; }

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: #eff6ff;
}

.nav-link.active {
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 3px 3px 0 0;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown.open .nav-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: white;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.13);
    min-width: 220px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 300;
    border: 1px solid var(--gray-100);
}

.nav-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-header {
    font-size: 10px;
    font-weight: 700;
    color: var(--gray-400);
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 10px 4px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 13.5px;
    color: var(--gray-700);
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
}

.dropdown-item:hover {
    background: #eff6ff;
    color: var(--primary);
}

.dropdown-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-100);
    margin: 6px 0;
}

.dropdown-all {
    color: var(--primary);
    font-weight: 600;
}

/* Nav Search inline */
.nav-search { display: none; }

/* Search Toggle & Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.nav-search-toggle {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1.5px solid var(--gray-200);
    background: var(--gray-50);
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
}

.nav-search-toggle:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Expandable Search Bar */
.header-search-bar {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.header-search-bar.open {
    max-height: 70px;
    padding-bottom: 12px;
}

.header-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gray-50);
    border: 1.5px solid var(--gray-200);
    border-radius: 12px;
    padding: 10px 16px;
    transition: border-color 0.2s;
}

.header-search-form:focus-within {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(29,78,216,0.08);
}

.header-search-form i { color: var(--gray-400); font-size: 14px; }

.header-search-form input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    color: var(--dark);
    font-family: inherit;
}

.header-search-form button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 16px;
    padding: 0;
    transition: color 0.2s;
}

.header-search-form button:hover { color: var(--danger); }

/* Hamburger animasi */
.menu-toggle {
    display: none;
    flex-direction: column;
    flex-shrink: 0;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1.5px solid var(--gray-200);
    background: var(--gray-50);
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--gray-600);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.menu-toggle:hover { background: #eff6ff; border-color: var(--primary); }

/* ========== HERO SLIDER ========== */
.hero {
    position: relative;
    height: 520px;
    overflow: hidden;
    background: var(--gray-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.75) 0%, rgba(15, 23, 42, 0.2) 50%, transparent 100%);
    z-index: 2;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-text {
    max-width: 700px;
    color: var(--white);
    animation: fadeInUp 1s ease;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    -webkit-font-smoothing: antialiased;
}

.hero-title {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-desc {
    font-size: 17px;
    opacity: 0.95;
    margin-bottom: 24px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-controls {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 4;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.hero-dot.active {
    background: var(--white);
    width: 40px;
    border-radius: 20px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-800);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

/* ========== SECTION ========== */
.section {
    padding: 60px 0;
}

.section-sm {
    padding: 40px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--gray-900);
    position: relative;
    padding-left: 16px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 70%;
    background: var(--gradient-primary);
    border-radius: 3px;
}

.section-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.section-link:hover {
    gap: 8px;
}

/* ========== GRID ========== */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-main { grid-template-columns: 2fr 1fr; }

/* ========== NEWS CARD ========== */
.news-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.news-card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--gray-200);
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.08);
}

.news-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    filter: brightness(0.72);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.news-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 10px;
}

.news-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-title a {
    color: inherit;
}

.news-card-title a:hover {
    color: var(--primary);
}

.news-card-excerpt {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--gray-100);
}

.read-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.read-more:hover {
    gap: 8px;
}

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

.news-card-featured .news-card-image {
    aspect-ratio: 16/10;
}

.news-card-featured .news-card-title {
    font-size: 24px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.news-card-featured .news-card-excerpt {
    font-size: 15px;
}

/* News list (horizontal layout) */
.news-list-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-100);
}

.news-list-item:last-child {
    border-bottom: none;
}

.news-list-item .image {
    aspect-ratio: 4/3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--gray-200);
}

.news-list-item .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-list-item h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-list-item h4 a {
    color: inherit;
}

.news-list-item h4 a:hover {
    color: var(--primary);
}

.news-list-item .meta {
    font-size: 12px;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ========== SIDEBAR ========== */
.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-100);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--gradient-primary);
}

.category-list {
    list-style: none;
}

.category-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}

.category-list a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.category-count {
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

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

/* Popular news widget */
.popular-item {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
    align-items: center;
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-number {
    width: 34px;
    height: 34px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.popular-item h5 {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-item h5 a {
    color: inherit;
}

.popular-item h5 a:hover {
    color: var(--primary);
}

.popular-item .meta {
    font-size: 11px;
    color: var(--gray-500);
}

/* Search widget */
.search-box {
    display: flex;
    gap: 8px;
}

.search-box input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(192, 38, 211, 0.1);
}

.search-box button {
    width: 42px;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    transform: scale(1.05);
}

/* Tag cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-cloud a {
    padding: 5px 12px;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition);
}

.tag-cloud a:hover {
    background: var(--gradient-primary);
    color: var(--white);
}

/* ========== DETAIL BERITA ========== */
.article {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.article-image {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
}

.article-body {
    padding: 36px;
}

.article-category {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 50px;
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
}

.article-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.3;
    margin-bottom: 16px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 28px;
    flex-wrap: wrap;
    color: var(--gray-600);
    font-size: 14px;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--gray-700);
}

.article-content p {
    margin-bottom: 0;
    min-height: 1em;
}

.article-content p + p {
    margin-top: 14px;
}

.article-content h2,
.article-content h3 {
    color: var(--gray-900);
    margin: 28px 0 14px;
    font-weight: 700;
}

.article-content h2 { font-size: 24px; }
.article-content h3 { font-size: 20px; }

.article-content img {
    border-radius: var(--radius-sm);
    margin: 18px 0;
}

.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 12px 20px;
    margin: 20px 0;
    background: var(--gradient-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--gray-700);
}

.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 20px;
    margin-top: 28px;
    border-top: 1px solid var(--gray-100);
}

.article-share {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-100);
    align-items: center;
    flex-wrap: wrap;
}

.share-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.share-btn:hover {
    color: var(--white);
    transform: translateY(-3px);
}

.share-fb { background: #1877f2; }
.share-tw { background: #1da1f2; }
.share-wa { background: #25d366; }
.share-tg { background: #0088cc; }

/* ========== PAGE HEADER ========== */
.page-header {
    background: var(--gradient-primary);
    padding: 60px 0 40px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.page-header-inner {
    position: relative;
    z-index: 2;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.85);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
}

.breadcrumb a:hover {
    color: var(--white);
}

.page-header h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}

.page-header p {
    opacity: 0.9;
    font-size: 16px;
    max-width: 700px;
}

/* ========== FORM ========== */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-label .req {
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    background: var(--white);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(192, 38, 211, 0.1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-hint {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ========== ALERT ========== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid;
}

.alert-success {
    background: #f0fdf4;
    color: #15803d;
    border-color: var(--success);
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: var(--danger);
}

.alert-warning {
    background: #fffbeb;
    color: #a16207;
    border-color: var(--warning);
}

.alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #3b82f6;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    color: var(--gray-700);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

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

.pagination .active {
    background: var(--gradient-primary);
    color: var(--white);
}

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== FOOTER ========== */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 60px 0 0;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 36px;
    margin-bottom: 40px;
}

.footer h4 {
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 10px;
}

.footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 3px;
}

.footer-about p {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 18px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.footer-logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
}

.footer-logo h3 {
    color: var(--white);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.footer-logo p {
    font-size: 12px;
    color: var(--gray-500);
    margin: 2px 0 0;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer ul a {
    color: var(--gray-400);
    font-size: 14px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer ul a:hover {
    color: var(--primary-light);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
    margin-bottom: 12px;
}

.footer-contact i {
    color: var(--primary-light);
    padding-top: 3px;
    flex-shrink: 0;
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.footer-social a {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--gradient-primary);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-bottom {
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: 13px;
}

.footer-bottom p {
    color: var(--gray-500);
}

.footer-bottom a {
    color: var(--primary-light);
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius);
}

.empty-state-icon {
    font-size: 56px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--gray-500);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .hero-title { font-size: 36px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Tablet: grid-main (2fr/1fr) & grid-3 terlalu sempit sebelum breakpoint 768 */
@media (max-width: 900px) {
    .grid-main { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .news-card-featured { grid-column: span 2; }
    .populer-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .topbar-info {
        justify-content: center;
        font-size: 12px;
    }

    .topbar-social {
        display: none;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 290px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        padding: 72px 16px 20px;
        gap: 2px;
        box-shadow: -5px 0 30px rgba(0,0,0,0.12);
        transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
        overflow-y: auto;
        z-index: 201;
        justify-content: flex-start;
        flex: none;
    }

    .nav.show { right: 0; }

    .nav-link {
        padding: 12px 14px;
        border-radius: 10px;
        font-size: 14px;
    }

    .nav-link.active::after { display: none; }

    /* Mobile dropdown: toggle dengan .open */
    .nav-dropdown { position: static; }

    .dropdown-menu {
        position: static;
        transform: none !important;
        box-shadow: none;
        border: none;
        background: var(--gray-50);
        border-radius: 10px;
        margin: 4px 0 4px 12px;
        padding: 4px;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, opacity 0.2s ease, visibility 0.2s;
    }

    .nav-dropdown.open .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 400px;
    }

    .nav-dropdown.open .nav-arrow { transform: rotate(180deg); }

    /* Sembunyikan nav desktop, tampilkan via slide panel */
    .nav {
        display: none !important;
    }

    .nav.show {
        display: flex !important;
    }

    .header-actions {
        display: flex !important;
    }

    .menu-toggle {
        display: flex !important;
    }

    .menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .menu-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    .logo-text h1 { font-size: 14px; }
    .logo-text p { font-size: 10px; max-width: 160px; -webkit-line-clamp: 2; line-clamp: 2; }
    .logo { max-width: calc(100% - 100px); }

    .hero { height: 420px; }
    .hero-title { font-size: 28px; }
    .hero-desc { font-size: 14px; }

    .section { padding: 40px 0; }
    .section-title { font-size: 22px; }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

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

    .news-card-featured {
        grid-column: span 1;
        grid-row: span 1;
    }

    .news-card-featured .news-card-title {
        font-size: 18px;
    }

    .page-header { padding: 40px 0 30px; }
    .page-header h1 { font-size: 26px; }

    .article-body { padding: 20px; }
    .article-title { font-size: 22px; }
    .article-content { font-size: 15px; }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-controls {
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .logo-icon { width: 44px; height: 44px; font-size: 18px; }
    .hero-title { font-size: 24px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
    .news-list-item { grid-template-columns: 90px 1fr; }
    .grid-4, .grid-3 { grid-template-columns: 1fr; }
    .stat-number { font-size: 32px; }
    .article-title { font-size: 20px; }
    .article-body { padding: 16px; }
}

/* ========== UTILITIES ========== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* ========== ARTIKEL MEDIA (foto utama + thumbnail) ========== */
.article-media {
    margin-bottom: 24px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--gray-100);
}

.article-media-main img.article-image {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
    margin: 0;
    border-radius: 0;
    transition: opacity 0.25s ease;
}

.article-thumbs {
    display: flex;
    gap: 6px;
    padding: 8px;
    background: var(--gray-100);
    overflow-x: auto;
    scrollbar-width: thin;
}

.thumb-btn {
    flex-shrink: 0;
    width: 72px;
    height: 52px;
    border: 2px solid transparent;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    background: none;
    padding: 0;
    opacity: 0.65;
    transition: var(--transition);
}

.thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-btn:hover {
    opacity: 1;
    border-color: var(--gray-400);
}

.thumb-btn.active {
    opacity: 1;
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .article-media-main img.article-image { height: 240px; }
    .thumb-btn { width: 58px; height: 42px; }
}

/* ========== TICKER BERITA ========== */
.news-ticker {
    display: flex;
    align-items: center;
    background: var(--dark);
    color: white;
    height: 42px;
    overflow: hidden;
}

.ticker-label {
    background: var(--primary);
    padding: 0 18px;
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
    flex-shrink: 0;
    gap: 6px;
}

.ticker-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.ticker-content {
    display: flex;
    gap: 40px;
    animation: ticker 40s linear infinite;
    white-space: nowrap;
}

.ticker-content a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13px;
    flex-shrink: 0;
    transition: color 0.2s;
}

.ticker-content a:hover { color: white; }

@keyframes ticker {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ========== STATISTIK ========== */
.stat-card {
    padding: 28px 16px;
    color: white;
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.9;
}

.stat-number {
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.85;
    font-weight: 500;
}

/* ========== BERITA POPULER ========== */
.populer-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: white;
    border-radius: 10px;
    text-decoration: none;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    overflow: hidden;
    min-width: 0;
}

.populer-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
    border-color: var(--primary-light);
}

.populer-rank {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    flex-shrink: 0;
}

.populer-item img {
    width: 72px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.populer-info { flex: 1; min-width: 0; }

.populer-badge {
    display: inline-block;
    font-size: 10px;
    color: #ffffff !important;
    padding: 2px 8px;
    border-radius: 50px;
    font-weight: 800;
    margin-bottom: 4px;
    position: relative;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}
.populer-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    border-radius: 50px;
    z-index: 0;
}
.populer-badge {
    isolation: isolate;
}
.populer-badge span,
.populer-badge {
    position: relative;
    z-index: 1;
}

.populer-info h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.4;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.populer-info span {
    font-size: 11px;
    color: var(--gray-400);
}

@media (max-width: 900px) {
    .populer-grid { grid-template-columns: 1fr !important; }
}

/* ========== KOMENTAR ========== */
.komentar-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.komentar-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
}

.komentar-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.komentar-body { flex: 1; min-width: 0; }

.komentar-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.komentar-nama {
    font-size: 14px;
    color: var(--dark);
}

.komentar-waktu {
    font-size: 12px;
    color: var(--gray-400);
}

.komentar-isi {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.7;
    margin: 0;
}

.komentar-form-wrap {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 24px;
}

.form-input-public {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: var(--gray-50);
    transition: var(--transition);
    outline: none;
    color: var(--dark);
}

.form-input-public:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

textarea.form-input-public { min-height: 100px; }

@media (max-width: 640px) {
    .komentar-fields { grid-template-columns: 1fr !important; }
    .komentar-item { padding: 12px; gap: 10px; }
    .komentar-avatar { width: 34px; height: 34px; font-size: 13px; }
}

/* ========== GALERI BERITA ========== */
.article-gallery {
    margin: 32px 0;
    padding-top: 28px;
    border-top: 1px solid var(--gray-200);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.gallery-item {
    display: block;
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: zoom-in;
    background: var(--gray-100);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    color: white;
    font-size: 11px;
    padding: 16px 8px 6px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#galleryLightbox {
    display: flex !important;
}

#galleryLightbox[style*="display:none"],
#galleryLightbox[style*="display: none"] {
    display: none !important;
}

@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
}

/* Loading animation */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100), var(--gray-200), var(--gray-100));
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
