/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Loading state to prevent flickering */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    width: 100%;
    margin: 0;
    padding: 0;
    visibility: hidden; /* Initially hidden to prevent FOUC */
}

body.loading * {
    animation-duration: 0ms !important;
    transition-duration: 0ms !important;
}

/* Show body after loading */
body {
    visibility: visible;
}

/* Full width styles */
html {
    width: 100%;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

.main-content {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Remove any max-width constraints */
* {
    box-sizing: border-box;
}

/* Full width layout */
.main-content,
.hero-section,
.content-wrapper,
.news-section,
.pokja-section,
.left-content,
.right-sidebar {
    width: 100%;
}

/* Responsive adjustments for full width */
@media (min-width: 1400px) {
    .container {
        padding: 0 40px;
    }
}

@media (min-width: 1600px) {
    .container {
        padding: 0 60px;
    }
}

@media (min-width: 1920px) {
    .container {
        padding: 0 80px;
    }
}

.container {
    width: 100%;
    margin: 0;
    padding: 0 20px;
    max-width: none;
}

/* Responsive container padding for different screen sizes */
@media (min-width: 1200px) {
    .container {
        padding: 0 30px;
    }
}

/* Mobile First Approach */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
}

/* Header */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    flex-wrap: wrap;
    width: 100%;
    margin: 0;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: #4A90E2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
}

.logo-text h1 {
    color: #4A90E2;
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

.logo-text p {
    color: #666;
    font-size: 12px;
    margin: 0;
}
@media (max-width: 480px) {
    .logo-text p {
        display: none;
    }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    padding: 8px 10px;
    border-radius: 6px;
}

.nav-link:hover,
.nav-link.active {
    color: #4A90E2;
    background: #f0f7ff;
}

/* ── Dropdown ── */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    min-width: 210px;
    z-index: 2000;
    padding: 8px 0;
    border: 1px solid #f0f0f0;
    animation: dropFade 0.15s ease;
}

@keyframes dropFade {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    color: #444;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.dropdown-item i {
    width: 16px;
    color: #4A90E2;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.dropdown-item:hover {
    background: #f0f7ff;
    color: #4A90E2;
}

.dropdown-menu-wide {
    min-width: 260px;
}

.dropdown-group-label {
    display: block;
    padding: 6px 18px 4px 28px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dropdown-group-label i {
    margin-right: 6px;
    color: #4A90E2;
}

.dropdown-item.dropdown-sub {
    padding-left: 36px;
    font-size: 0.84rem;
}

.dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 4px 12px;
}

.search-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.search-input {
    padding: 8px 15px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    outline: none;
    transition: border-color 0.3s;
    width: 160px;
    font-size: 0.85rem;
}

.search-input:focus {
    border-color: #4A90E2;
}

.search-btn {
    background: #FFD700;
    border: none;
    padding: 9px 13px;
    border-radius: 50%;
    cursor: pointer;
    color: #333;
    transition: background 0.3s;
    font-size: 0.9rem;
}

.search-btn:hover {
    background: #FFC107;
}

/* Mobile Navigation */
@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 0;
        box-shadow: 0 5px 20px rgba(0,0,0,0.12);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.3s ease, opacity 0.3s ease;
    }

    .nav-menu.active {
        max-height: 600px;
        opacity: 1;
        pointer-events: all;
    }

    .nav-link {
        padding: 12px 20px;
        border-bottom: 1px solid #f5f5f5;
        border-radius: 0;
        font-size: 0.95rem;
    }

    /* Mobile dropdown inline */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
        display: none;
        background: #f8f9fa;
        animation: none;
    }

    .dropdown.open .dropdown-menu {
        display: block;
    }

    .dropdown-item {
        padding: 10px 30px;
        border-bottom: 1px solid #efefef;
        font-size: 0.9rem;
    }

    .search-section {
        padding: 12px 20px;
        margin-left: 0;
    }

    .search-input {
        width: 100%;
        max-width: none;
    }

    .header .container {
        flex-direction: column;
        align-items: stretch;
        position: relative;
    }

    .logo-section {
        justify-content: space-between;
        width: 100%;
    }
}

/* Hero Section - Modern Layout */
.hero-section {
    /* Background gradasi biru yang modern */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Full width dengan margin negatif untuk sejajar dengan header */
    width: calc(100% + 40px);
    margin: 0 -20px 40px -20px;
    padding: 60px 20px;
    min-height: 400px;
    
    /* Flexbox untuk layout responsive */
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Modern decoration elements */
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100%;
    height: 200%;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: rotate(15deg);
    pointer-events: none;
}

/* Container dalam hero section sejajar dengan navigation */
.hero-section .container {
    max-width: none;
    margin: 0;
    padding: 0 20px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    height: 100%;
}

.hero-text {
    flex: 1;
    color: white;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 20px;
    position: relative;
    z-index: 3;
}

.hero-text h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, #e8f4fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-text h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    margin-bottom: 20px;
    font-weight: 500;
    line-height: 1.4;
    opacity: 0.95;
    color: rgba(255,255,255,0.9);
}

.hero-text p {
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    margin-bottom: 30px;
    line-height: 1.7;
    opacity: 0.85;
    max-width: none;
    color: rgba(255,255,255,0.8);
}

.cta-button {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    align-self: flex-start;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.6);
    background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
}

.hero-image {
    flex: 1.2;
    position: relative;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.carousel {
    position: relative;
    width: 100%;
    max-width: 650px;
    height: 350px;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.3s ease;
}

.carousel:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: none;
    border-radius: 20px;
    opacity: 0;
    transition: all 0.8s ease-in-out;
    transform: scale(1.1);
}

.carousel-slide.active {
    display: block;
    opacity: 1;
    transform: scale(1);
}

/* Hero Image Stability */
.hero-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 20px;
    transition: all 0.8s ease-in-out;
    image-rendering: -webkit-optimize-contrast;
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    position: relative;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.4s ease;
    display: inline-block;
    border: 2px solid rgba(255,255,255,0.6);
    position: relative;
}

.indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: #FFD700;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

.indicator.active {
    background: #FFD700;
    border-color: #FFD700;
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.indicator.active::after {
    width: 6px;
    height: 6px;
}

/* Responsive Hero Section */
@media (max-width: 768px) {
    .hero-section {
        padding: 35px 15px 40px;
        width: calc(100% + 30px);
        margin: 0 -15px 40px -15px;
        min-height: auto;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        height: 100%;
    }
    
    .hero-text {
        max-width: 100%;
        order: 2;
        padding-right: 0;
        flex: none;
    }
    
    .hero-image {
        order: 1;
        width: 100%;
        max-width: 100%;
        flex: none;
    }
    
    .carousel {
        width: 100%;
        max-width: 100%;
        height: 200px;
        transform: none;
        border-radius: 14px;
    }

    .carousel-slide,
    .hero-image img {
        height: 200px;
        position: absolute;
        width: 100%;
        border-radius: 14px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        width: calc(100% + 20px);
        margin: 0 -10px 40px -10px;
        padding: 25px 10px 35px;
        min-height: auto;
    }
    
    .hero-content {
        gap: 18px;
    }
    
    .hero-image {
        width: 100%;
        max-width: 100%;
    }
    
    .carousel {
        width: 100%;
        max-width: 100%;
        height: 185px;
        border-radius: 12px;
    }

    .carousel-slide,
    .hero-image img {
        height: 185px;
        border-radius: 12px;
    }
}

@media (min-width: 1200px) {
    .hero-section {
        width: calc(100% + 60px);
        margin: 0 -30px 40px -30px;
        padding: 70px 30px;
        min-height: 450px;
    }
    
    .hero-text {
        padding-right: 40px;
        max-width: 550px;
    }
}

@media (min-width: 1600px) {
    .hero-section {
        width: calc(100% + 120px);
        margin: 0 -60px 40px -60px;
        padding: 80px 60px;
        min-height: 500px;
    }
    
    .hero-text {
        padding-right: 50px;
        max-width: 600px;
    }
    
    .hero-image {
        max-width: 700px;
    }
    
    .carousel,
    .carousel-slide,
    .hero-image img {
        height: 320px;
    }
}


/* Large screen optimization */
@media (min-width: 1400px) {
    .hero-content {
        gap: 30px;
    }
    
    .hero-text h2 {
        font-size: 2.4rem;
    }
    
    .hero-text h3 {
        font-size: 1.1rem;
    }
    
    .hero-image {
        max-width: 800px;
    }
}

/* Standard laptop screens (1366px - common resolution) */
@media (min-width: 1366px) and (max-width: 1399px) {
    .hero-content {
        gap: 28px;
    }
    
    .hero-text h2 {
        font-size: 2.3rem;
    }
    
    .hero-text h3 {
        font-size: 1.05rem;
    }
    
    .hero-image {
        max-width: 750px;
    }
}

/* Small laptop screens (1280px) */
@media (min-width: 1280px) and (max-width: 1365px) {
    .hero-content {
        gap: 26px;
    }
    
    .hero-image {
        max-width: 700px;
    }
}

/* Tablet landscape (1024px - 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
    .hero-content {
        gap: 24px;
    }
    
    .hero-text h2 {
        font-size: 2rem;
    }
    
    .hero-text h3 {
        font-size: 0.95rem;
    }
    
    .hero-image {
        max-width: 550px;
    }
}

/* Extra large screens (1600px and up) */
@media (min-width: 1600px) {
    .hero-content {
        gap: 35px;
        max-width: none;
    }
    
    .hero-text h2 {
        font-size: 2.6rem;
    }
    
    .hero-text h3 {
        font-size: 1.2rem;
    }
    
    .hero-text p {
        font-size: 0.85rem;
    }
    
    .hero-image {
        max-width: 900px;
    }
}

/* Ultra-wide screens (1920px and up) */
@media (min-width: 1920px) {
    .hero-content {
        gap: 40px;
        max-width: none;
    }
    
    .hero-text h2 {
        font-size: 2.8rem;
    }
    
    .hero-text h3 {
        font-size: 1.3rem;
    }
    
    .hero-text p {
        font-size: 0.9rem;
        max-width: 340px;
    }
    
    .hero-image {
        max-width: 1000px;
    }
}

/* Standard laptop screens (1366px - common resolution) */
@media (min-width: 1366px) and (max-width: 1399px) {
    .hero-content {
        gap: 50px;
    }
    
    .hero-text h2 {
        font-size: 3.2rem;
    }
}

/* Small laptop screens (1280px) */
@media (min-width: 1280px) and (max-width: 1365px) {
    .hero-content {
        gap: 40px;
    }
}

/* Tablet landscape (1024px - 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
    .hero-content {
        gap: 35px;
    }
    
    .hero-text h2 {
        font-size: 2.8rem;
    }
    
    .hero-text h3 {
        font-size: 1.4rem;
    }
}

/* Main Content Layout */
.main-content {
    width: 100%;
    margin: 0;
    padding: 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    width: 100%;
    padding: 0 20px;
}

/* Konsisten dengan padding hero section */
@media (min-width: 1200px) {
    .content-wrapper {
        padding: 0 30px;
    }
}

@media (min-width: 1400px) {
    .content-wrapper {
        padding: 0 40px;
    }
}

@media (min-width: 1600px) {
    .content-wrapper {
        padding: 0 60px;
    }
}

@media (min-width: 1920px) {
    .content-wrapper {
        padding: 0 80px;
    }
}

@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 0 15px;
        gap: 20px;
    }

    /* Right sidebar di mobile: full width, kompak */
    .right-sidebar {
        gap: 20px;
    }

    .chart-section {
        padding: 20px;
        margin-bottom: 0;
    }

    .stats-section {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-item {
        padding: 14px;
        gap: 10px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .stat-content h4 {
        font-size: 1.2rem;
    }

    .stat-content p {
        font-size: 0.8rem;
    }

    /* Health summary compact di mobile */
    .health-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-top: 14px;
    }

    .health-sum-item {
        padding: 10px;
        gap: 8px;
    }

    .health-sum-item strong {
        font-size: 1rem;
    }

    /* Donut chart compact */
    .donut-wrap {
        width: 150px;
        height: 150px;
    }

    .donut-total {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .content-wrapper {
        padding: 0 10px;
    }
}

/* News Section */
.news-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 40px;
    width: 100%;
}

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

/* Performance Optimizations - Prevent Flickering */
.news-section,
.pokja-section,
.announcement-section,
.agenda-section,
.quick-info-section,
.stats-section {
    will-change: auto;
    backface-visibility: hidden;
    transform: translateZ(0); /* Force hardware acceleration */
}

/* Grid Stability */
.news-grid,
.pokja-grid {
    transform: translateZ(0); /* Force hardware acceleration */
}

/* Prevent layout shifts */
.section-header h3 {
    color: #333;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0; /* Remove any margin that might cause shifts */
}

.section-header h3 i {
    color: #4A90E2;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

/* Stable transitions */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.view-all {
    color: #4A90E2;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.view-all:hover {
    color: #357ABD;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
}

/* Ensure 6 cards display properly */
@media (min-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* News Card Stability - Prevent Flickering */
.news-card {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    will-change: transform;
    display: flex;
    flex-direction: column;
}

/* Ketika news-card dibungkus <a> tag */
a.news-card,
.news-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

a.news-card:visited,
.news-card-link:visited {
    color: inherit;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* ── News Banner (gambar + warna kategori) ── */
.news-banner {
    position: relative;
    width: 100%;
    height: 190px;
    overflow: hidden;
    flex-shrink: 0;
}

.news-banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.news-card:hover .news-banner-img {
    opacity: 0.4;
}

.news-banner-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 18px 20px;
    color: white;
}

.news-banner-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.news-banner-text {
    margin-bottom: 8px;
}

.news-banner-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.news-banner-sub {
    display: block;
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.3;
    font-weight: 500;
}

.news-banner-desc {
    font-size: 0.78rem;
    opacity: 0.9;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.news-banner-date {
    font-size: 0.74rem;
    opacity: 0.85;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Card body bawah banner */
.news-card-body {
    padding: 16px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.news-card-body h4 {
    color: #333;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-body p {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Prevent flickering on images */
.news-card img {
    width: 100%;
    object-fit: cover;
    transition: none;
    image-rendering: -webkit-optimize-contrast;
}

/* Stable content area */
.news-content {
    padding: 20px;
    position: relative;
}

/* Prevent category badge from causing reflow */
.news-category {
    color: white;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    white-space: nowrap;
}

.news-card h4 {
    margin: 15px 0 10px;
    color: #333;
    font-size: 1.1rem;
    line-height: 1.4;
}

.news-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.news-date {
    color: #999;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Mobile News */
@media (max-width: 768px) {
    .news-section {
        padding: 20px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .section-header {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .section-header h3 {
        font-size: 1.1rem;
    }

    .news-banner {
        height: 160px;
    }
}

/* ── Inovasi Section ── */
.inovasi-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    width: 100%;
    margin-top: 30px;
}

.inovasi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.inovasi-card {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 1px solid #eee;
}

.inovasi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.inovasi-card-banner {
    position: relative;
    height: 110px;
    overflow: hidden;
    flex-shrink: 0;
}

.inovasi-banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.25;
}

.inovasi-banner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 14px 16px;
    color: white;
    gap: 8px;
}

.inovasi-banner-icon {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.inovasi-modul-badge {
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.inovasi-card-body {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.inovasi-card-body h4 {
    color: #333;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.inovasi-card-body p {
    color: #666;
    font-size: 0.82rem;
    line-height: 1.5;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.inovasi-card-date {
    color: #999;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

@media (max-width: 768px) {
    .inovasi-section { padding: 20px; }
    .inovasi-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
}

@media (max-width: 480px) {
    .inovasi-grid { grid-template-columns: 1fr; }
}

/* ── Pokja Section ── */
.pokja-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    width: 100%;
}

.pokja-section h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pokja-section h3 i {
    color: #4A90E2;
}

.pokja-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 25px;
    width: 100%;
}

.pokja-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.pokja-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.pokja-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.5rem;
}

.pokja-card h4 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.pokja-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.pokja-link {
    color: #4A90E2;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.pokja-link:hover {
    color: #357ABD;
}

/* Mobile Pokja */
@media (max-width: 768px) {
    .pokja-section {
        padding: 20px;
    }
    
    .pokja-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, auto);
        gap: 20px;
    }
    
    .pokja-card {
        padding: 20px;
    }
}

/* Right Sidebar */
.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* ── Chart / Data Kesehatan Section ── */
.chart-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.chart-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 18px;
}

.chart-title {
    color: #333;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 14px;
}

/* Donut chart wrapper */
.donut-wrap {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 14px;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.donut-total {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.donut-label {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-top: 3px;
}

/* Legend */
.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
}

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

.legend-text {
    color: #555;
    flex: 1;
}

.legend-val {
    color: #333;
    font-weight: 600;
    min-width: 30px;
    text-align: right;
}

/* Health summary cards */
.health-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.health-sum-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 3px solid #4A90E2;
}

.health-sum-item i {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.health-sum-item div {
    display: flex;
    flex-direction: column;
}

.health-sum-item strong {
    font-size: 1.2rem;
    color: #333;
    line-height: 1.2;
}

.health-sum-item span {
    font-size: 0.75rem;
    color: #888;
    line-height: 1.3;
}

/* ── Announcement Section ── */
.announcement-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.announcement-section h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.announcement-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.announcement-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    position: relative;
}

.announcement-icon {
    background: #4A90E2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.announcement-content h4 {
    color: #333;
    font-size: 1rem;
    margin-bottom: 5px;
    line-height: 1.3;
}

.announcement-content p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.announcement-content small {
    color: #999;
    font-size: 0.8rem;
}

.announcement-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #FFD700;
    color: #333;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* Mobile Announcements */
@media (max-width: 768px) {
    .announcement-section {
        padding: 20px;
    }
    
    .announcement-item {
        padding: 12px;
    }
    
    .announcement-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* Agenda Section - Hidden */
.agenda-section {
    display: none !important;
}

.agenda-section h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.agenda-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.agenda-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.agenda-date {
    background: #4A90E2;
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    flex-shrink: 0;
    min-width: 60px;
}

.agenda-date .date {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
}

.agenda-date .month {
    display: block;
    font-size: 0.8rem;
    opacity: 0.9;
}

.agenda-content h4 {
    color: #333;
    font-size: 1rem;
    margin-bottom: 5px;
}

.agenda-content p {
    color: #666;
    font-size: 0.9rem;
}

/* Mobile Agenda */
@media (max-width: 480px) {
    .agenda-item {
        padding: 12px;
        gap: 12px;
    }
    
    .agenda-date {
        min-width: 50px;
        padding: 8px;
    }
    
    .agenda-date .date {
        font-size: 1.1rem;
    }
    
    .agenda-content h4 {
        font-size: 0.9rem;
    }
    
    .agenda-content p {
        font-size: 0.8rem;
    }
}



/* ── Quick Access Section (di bawah inovasi) ── */
.quick-access-section {
    background: white;
    border-radius: 15px;
    padding: 25px 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.quick-access-section h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.qa-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 16px 8px;
    background: #f8f9fa;
    border-radius: 12px;
    border-bottom: 3px solid var(--qa-color, #4A90E2);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.qa-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    background: white;
}

.qa-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--qa-color, #4A90E2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.qa-item span {
    font-size: 0.78rem;
    font-weight: 600;
    color: #444;
    text-align: center;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .quick-access-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
    .qa-icon { width: 36px; height: 36px; font-size: 0.9rem; }
    .qa-item span { font-size: 0.72rem; }
    .quick-access-section { padding: 20px; }
}

@media (max-width: 480px) {
    .quick-access-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Quick Info Section ── */
.quick-info-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.quick-info-section h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.quick-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.quick-info-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s, background 0.3s;
    cursor: pointer;
}

.quick-info-item:hover {
    transform: translateY(-3px);
    background: #e9ecef;
}

.quick-info-item i {
    color: #4A90E2;
    font-size: 1.5rem;
    margin-bottom: 10px;
    display: block;
}

.quick-info-item span {
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Mobile Quick Info */
@media (max-width: 768px) {
    .quick-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .quick-info-item {
        padding: 15px;
    }
    
    .quick-info-item i {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }
    
    .quick-info-item span {
        font-size: 0.85rem;
    }
}

/* Stats Section */
.stats-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.stats-section .section-header {
    margin-bottom: 25px;
}

.stats-section h3 {
    color: #333;
    font-size: 1.3rem;
}

.stats-section small {
    color: #666;
    font-size: 0.85rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-content h4 {
    color: #333;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-content p {
    color: #666;
    font-size: 0.9rem;
}

/* Mobile Stats */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-item {
        padding: 15px;
        gap: 12px;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .stat-content h4 {
        font-size: 1.3rem;
    }
    
    .stat-content p {
        font-size: 0.85rem;
    }
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0 20px;
    width: 100%;
}

.footer .container {
    width: 100%;
    margin: 0;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

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

.footer-logo .logo {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

.footer-logo-text h3 {
    color: #4A90E2;
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.footer-logo-text p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.social-media {
    display: flex;
    gap: 15px;
}

.social-media a {
    width: 40px;
    height: 40px;
    background: #4A90E2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
}

.social-media a:hover {
    background: #357ABD;
}

.footer-middle {
    display: flex;
    gap: 40px;
}

.footer-column h4 {
    color: #4A90E2;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

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

.footer-column li {
    margin-bottom: 8px;
}

.footer-column a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: white;
}

.contact-info h4 {
    color: #4A90E2;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.contact-info p {
    margin-bottom: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.contact-info i {
    color: #4A90E2;
    width: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.newsletter {
    margin-top: 30px;
}

.newsletter h4 {
    color: #4A90E2;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.newsletter p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    outline: none;
}

.newsletter-form button {
    background: #FFD700;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.newsletter-form button:hover {
    background: #FFC107;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Mobile Footer */
@media (max-width: 768px) {
    .footer {
        padding: 30px 0 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .footer-middle {
        justify-content: space-around;
        gap: 20px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .contact-info p {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-middle {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-column {
        text-align: center;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .news-card,
    .pokja-card,
    .announcement-item,
    .agenda-item,
    .quick-info-item,
    .stat-item {
        border: 2px solid #333;
    }
}

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