/* Custom CSS untuk PB LMII */

:root {
    --primary-green: #006400;
    --light-green: #00b36b;
    --dark-green: #004d00;
    --text-dark: #212529;
    --bg-light: #f8f9fa;
}

body {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    color: var(--text-dark);
}

/* Navbar */
.navbar {
    transition: all 0.3s ease;
}

.nav-link {
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--light-green) !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: var(--light-green);
}

/* Hero Section */
.hero {
    position: relative;
    background-position: center;
    background-repeat: no-repeat;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.hero .container {
    position: relative;
    z-index: 1;
}

/* Buttons */
.btn-success {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    transition: all 0.3s ease;
}

.btn-success:hover {
    background-color: var(--dark-green);
    border-color: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 100, 0, 0.3);
}

.btn-outline-success {
    border-color: var(--light-green);
    color: var(--light-green);
}

.btn-outline-success:hover {
    background-color: var(--light-green);
    border-color: var(--light-green);
}

/* Cards */
.card {
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}

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

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

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

.border-success {
    border-color: var(--light-green) !important;
}

/* Statistics Section */
.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 128, 0, 0.15);
}

.text-success {
    color: var(--light-green) !important;
}

/* Footer */
footer {
    font-family: 'Roboto', sans-serif;
}

.hover-link:hover {
    color: var(--light-green) !important;
    text-decoration: underline !important;
}

.social-icons a {
    color: #fff;
    border-color: var(--light-green);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--light-green);
    color: #fff;
    transform: translateY(-3px);
}

/* News Card Styles */
.news-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.news-card .card-text {
    flex: 1;
}

.news-meta {
    font-size: 0.85rem;
    color: #6c757d;
}

.news-meta i {
    margin-right: 5px;
}

.badge-category {
    background-color: var(--light-green);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-green);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

/* Single News Page */
.news-content {
    line-height: 1.8;
    font-size: 1.05rem;
}

.news-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
}

.news-header-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.share-buttons a {
    margin: 0 5px;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
}

.share-buttons a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        height: 60vh !important;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 1rem;
    }

    footer .text-md-start,
    footer .text-md-end {
        text-align: center !important;
    }

    .news-header-image {
        height: 250px;
    }
}

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

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

/* Search Box */
.search-box {
    position: relative;
}

.search-box input {
    border-radius: 25px;
    padding-left: 40px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}
