/* ===================================
   GLOBAL STYLES & VARIABLES
   =================================== */
:root {
    --primary-color: #28a745;
    --secondary-color: #20c997;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
    --white: #ffffff;
}

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

body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===================================
   TOP BAR
   =================================== */
.top-bar {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

.top-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===================================
   NAVIGATION BAR
   =================================== */
.navbar {
    background: white !important;
    padding: 10px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-bottom: 3px solid #28a745;
}

.logo-img {
    width: 55px;
    height: 55px;
    object-fit: contain;
}

.brand-text {
    max-width: 500px;
}

.brand-title {
    font-size: 16px;
    font-weight: 700;
    color: #28a745;
    line-height: 1.3;
}

.navbar-nav .nav-link {
    color: #333 !important;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 16px !important;
    transition: all 0.3s ease;
    border-radius: 5px;
    white-space: nowrap;
}

.navbar-nav .nav-link:hover {
    background: #f0f0f0;
    color: #28a745 !important;
}

.navbar-nav .nav-item.active > .nav-link,
.navbar-nav .nav-link.active {
    background: #28a745;
    color: white !important;
}

.navbar-nav .nav-link i {
    margin-right: 5px;
}

/* Dropdown Styling */
.dropdown-menu {
    background: white;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 8px 0;
    margin-top: 0px;
}

.dropdown-item {
    color: #333;
    font-size: 14px;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #28a745;
    padding-left: 25px;
}

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

.dropdown-submenu > .dropdown-menu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 0px;
}

.dropdown-submenu > .dropdown-toggle::after {
    content: "\f285";
    font-family: "bootstrap-icons";
    border: none;
    vertical-align: middle;
    margin-left: auto;
    float: right;
}

/* HOVER untuk SEMUA ukuran layar (Desktop + Mobile) */
.nav-item.dropdown:hover > .dropdown-menu {
    display: block;
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

/* Styling khusus mobile - submenu tetap pakai hover */
@media (max-width: 991px) {
    .dropdown-submenu > .dropdown-menu {
        position: static;
        margin-left: 1rem;
        border-left: 2px solid #28a745;
        margin-top: 0.5rem;
    }
}

/* ===================================
   HERO SLIDER
   =================================== */
.hero-slider {
    position: relative;
    margin-top: 0;
}

.carousel-item {
    height: 550px;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5);
}

.carousel-item-news img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.0);
}

.carousel-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    max-width: 900px;
}

.carousel-caption h1 {
    font-size: 3rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    animation: fadeInUp 1s ease;
}

.carousel-caption h2 {
    font-size: 2.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    animation: fadeInUp 1.2s ease;
}

.carousel-caption p {
    font-size: 1.2rem;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
    animation: fadeInUp 1.2s ease;
}

.carousel-caption .btn {
    animation: fadeInUp 1.4s ease;
    padding: 12px 35px;
    font-size: 1rem;
    font-weight: 600;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(40, 167, 69, 0.8);
    border-radius: 50%;
}

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

/* ===================================
   RUNNING TEXT
   =================================== */
.running-text {
    background: linear-gradient(90deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    padding: 12px 0;
    overflow: hidden;
    position: relative;
    border-top: 3px solid #ff6600;
    border-bottom: 3px solid #ff6600;
}

.running-text-container {
    overflow: hidden;
}

.running-text-content {
    display: inline-block;
    white-space: nowrap;
    animation: scroll-left 25s linear infinite;
    font-size: 16px;
    font-weight: 600;
    color: #cc0000;
}

@keyframes scroll-left {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* ===================================
   STATISTICS SECTION
   =================================== */
.statistics-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.stat-card {
    background: white;
    padding: 40px 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    border: 3px solid transparent;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #28a745;
}

.stat-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.stat-icon-green {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.stat-icon-yellow {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.stat-icon-red {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: #28a745;
    margin: 15px 0;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 15px;
}

.stat-link {
    display: inline-block;
    color: #28a745;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.stat-link:hover {
    color: #1e7e34;
    transform: translateX(5px);
}

/* ===================================
   NEWS SECTION
   =================================== */
.news-section {
    background: white;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    margin-top: 10px;
    border-radius: 2px;
}

.news-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 2px solid #f0f0f0;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #28a745;
}

.news-card img {
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.news-content {
    padding: 20px;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.news-date {
    font-size: 13px;
    color: #777;
}

.news-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.news-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: #28a745;
}

.news-excerpt {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* News Card Carousel */
.news-card .carousel {
    height: 200px;
}

.news-card .carousel-inner,
.news-card .carousel-item {
    height: 100%;
    margin-top:5px;
}

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

.news-card .carousel-indicators {
    margin-bottom: 0;
}

.news-card .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #28a745;
}

/* Modal Carousel */
.modal-body .carousel-item img {
    max-height: 400px;
    object-fit: contain;
}

.modal-body .carousel-control-prev-icon,
.modal-body .carousel-control-next-icon {
    background-color: rgba(40, 167, 69, 0.8);
    border-radius: 50%;
    padding: 15px;
}

/* ===================================
   SIDEBAR
   =================================== */
.sidebar-widget {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.widget-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #28a745;
}

.kepala-card img {
    border: 5px solid #28a745;
    padding: 5px;
}

.infografis-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.infografis-item img {
    transition: transform 0.3s ease;
}

.infografis-item:hover img {
    transform: scale(1.02);
}

/* ===================================
   PAGINATION
   =================================== */
.pagination {
    margin-top: 30px;
}

.page-link {
    color: #28a745;
    border: 2px solid #e0e0e0;
    padding: 10px 18px;
    margin: 0 5px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #28a745;
    color: white;
    border-color: #28a745;
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: #28a745;
    border-color: #28a745;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 50px 0 0;
    margin-top: 80px;
}

.footer-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #28a745;
}

.footer-text {
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 20px;
}

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

.social-links a {
    width: 45px;
    height: 45px;
    background: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #20c997;
    color: white;
    transform: translateY(-5px);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: #28a745;
    padding-left: 10px;
}

.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-contact li {
    display: flex;
    align-items: start;
    gap: 12px;
    margin-bottom: 15px;
    color: #ccc;
}

.footer-contact i {
    color: #28a745;
    font-size: 18px;
    margin-top: 3px;
}

.footer-bottom {
    background: #0d0d0d;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid #444;
}

/* ===================================
   WHATSAPP FLOAT BUTTON
   =================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.5);
    z-index: 999;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    background: #1fb855;
    color: white;
    transform: scale(1.1);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* ===================================
   SCROLL TO TOP BUTTON
   =================================== */
.scroll-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #28a745;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

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

.scroll-top:hover {
    background: #1e7e34;
    transform: translateY(-5px);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 992px) {
    .brand-text {
        display: block;
    }
    
    .brand-title {
        font-size: 14px;
    }
    
    .navbar-nav .nav-link {
        padding: 10px 15px !important;
    }
    
    .carousel-item {
        height: 400px;
    }
    
    .carousel-caption h1 {
        font-size: 2rem;
    }
    
    .carousel-caption h2 {
        font-size: 1.5rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .news-card img {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        text-align: center;
    }
    
    .carousel-item {
        height: 350px;
    }
    
    .carousel-caption h1 {
        font-size: 1.5rem;
    }
    
    .carousel-caption h2 {
        font-size: 1.2rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
    }
    
    .carousel-caption .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    .running-text-content {
        font-size: 14px;
    }
    
    .stat-card {
        margin-bottom: 20px;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .news-card {
        margin-bottom: 30px;
    }
    
    .news-card .row {
        flex-direction: column;
    }
    
    .news-card img {
        height: 200px;
        width: 100%;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 25px;
        bottom: 20px;
        right: 20px;
    }
    
    .scroll-top {
        bottom: 80px;
        right: 20px;
    }
}

@media (max-width: 576px) {
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .news-title {
        font-size: 1.1rem;
    }
    
    .footer {
        padding: 30px 0 0;
    }
    
    .footer-title {
        font-size: 1.2rem;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background: var(--primary-color) !important;
}

.btn-primary {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.btn-warning {
    background: #ffc107;
    border: none;
    color: #333;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-warning:hover {
    background: #e0a800;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

.btn-outline-primary {
    border: 2px solid #28a745;
    color: #28a745;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: #28a745;
    color: white;
    transform: translateY(-2px);
}

.badge {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

/* ===================================
   LOADING ANIMATION
   =================================== */
.loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #28a745;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}