/**
 * Main Stylesheet
 * Dashboard Stok Bibit Persemaian Indonesia
 * Forestry Theme - Green Colors
 */

/* ============================================
   CSS Variables - Forestry Theme
   ============================================ */
:root {
    /* Forestry Theme: Updated to Match 'AYOTANAMPOHON' Green */
    --primary-color: #009B4C;
    /* Vivid Green from Image */
    --primary-dark: #007A3D;
    /* Darker shade */
    --primary-light: #4CAF50;
    /* Keep leaf green for accents */
    --secondary-color: #F59E0B;
    /* Gold */
    --secondary-dark: #D97706;
    --accent-color: #795548;
    /* Earth Brown */

    --success-color: #009B4C;
    /* Match primary */
    --danger-color: #dc3545;
    --warning-color: #F59E0B;
    --info-color: #0288D1;

    --purple-color: #795548;
    --delivered-color: #009B4C;

    --light-bg: #f0fdf4;
    /* Light green tint */
    --white: #ffffff;
    --text-dark: #1a1a1a;
    --text-light: #555555;
    --border-color: #c8e6c9;

    --shadow: 0 2px 4px rgba(0, 155, 76, 0.1);
    --shadow-lg: 0 4px 8px rgba(0, 155, 76, 0.15);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
}

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

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

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

/* ============================================
   Typography
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

/* Fix heading colors in colored backgrounds */
.bg-primary h1, .bg-primary h2, .bg-primary h3, .bg-primary h4, .bg-primary h5, .bg-primary h6,
.bg-success h1, .bg-success h2, .bg-success h3, .bg-success h4, .bg-success h5, .bg-success h6,
.bg-info h1, .bg-info h2, .bg-info h3, .bg-info h4, .bg-info h5, .bg-info h6,
.bg-danger h1, .bg-danger h2, .bg-danger h3, .bg-danger h4, .bg-danger h5, .bg-danger h6,
.text-white h1, .text-white h2, .text-white h3, .text-white h4, .text-white h5, .text-white h6,
.card-header.text-white h1, .card-header.text-white h2, .card-header.text-white h3, 
.card-header.text-white h4, .card-header.text-white h5, .card-header.text-white h6 {
    color: var(--white) !important;
}

/* Table Header Contrast Fixes moved to Table Section */

p {
    margin-bottom: 1rem;
}

/* ============================================
   Container & Layout
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* Bootstrap Row Override - Ensuring proper spacing */
.row {
    margin-right: -15px;
    margin-left: -15px;
}

/* Removed redundant custom grid to avoid Bootstrap collision */

/* ============================================
   Header & Navigation
   ============================================ */
.header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.navbar-menu a {
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    background: linear-gradient(rgba(45, 80, 22, 0.7), rgba(45, 80, 22, 0.7)),
        url('../images/forest-hero.jpg') center/cover;
    color: var(--white);
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* ============================================
   Carousel Section
   ============================================ */
.hero-carousel {
    position: relative;
    width: 100%;
    margin-bottom: 4rem;
}

.carousel {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

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

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

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(45, 80, 22, 0.6), rgba(45, 80, 22, 0.7));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.carousel-overlay h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-overlay p {
    color: var(--white);
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Carousel Controls */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: var(--white);
    font-size: 2rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    border-radius: 4px;
}

.carousel-control:hover {
    background: rgba(255, 255, 255, 0.5);
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--white);
    width: 30px;
    border-radius: 6px;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}


/* ============================================
   Statistics Cards
   ============================================ */
/* Compatibility with Bootstrap .card */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
}

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

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    margin-right: 20px;
    flex-shrink: 0;
}

.stat-content {
    flex-grow: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: #2d3748;
}

.stat-label {
    color: #718096;
    font-size: 14px;
    font-weight: 500;
}

/* Background colors for icons */
.bg-primary {
    background-color: var(--primary-color) !important;
}

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

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

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

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

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

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

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

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

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

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

.btn-warning {
    background: var(--warning-color);
    color: var(--text-dark);
}

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

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

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

.form-control.error {
    border-color: var(--danger-color);
}

.form-text {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.form-error {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    /* Add this for Safari/Chrome compatibility */
    -moz-appearance: none;
    /* Add this for Firefox */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
    line-height: 1.5;
    min-height: 45px;
    /* Ensure sufficient height */
}

/* ============================================
   Tables
   ============================================ */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table thead {
    background: var(--primary-color);
    color: var(--white);
}

/* Ensure specific background classes override the global white text */
.table thead.bg-light, 
.table thead.bg-light th {
    background-color: #f8f9fa !important;
    color: var(--text-dark) !important;
}

.table thead.bg-dark,
.table thead.bg-dark th {
    background-color: #343a40 !important;
}

.table thead.bg-dark th,
.table thead.bg-primary th,
.table thead.bg-success th,
.table thead.bg-info th,
.table thead.bg-danger th {
    color: var(--white) !important;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background: var(--light-bg);
}

.table-striped tbody tr:nth-child(even) {
    background: #f8f9fa;
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-color: var(--success-color);
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border-color: var(--danger-color);
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-color: var(--warning-color);
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border-color: var(--info-color);
    color: #0c5460;
}

/* ============================================
   Badges
   ============================================ */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 12px;
    color: var(--white);
}

.badge-primary {
    background: var(--primary-color);
}

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

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

.badge-warning {
    background: var(--warning-color);
    color: var(--text-dark);
}

.badge-info {
    background: var(--info-color);
}

.badge-purple {
    background: var(--purple-color);
}

.badge-delivered {
    background: var(--delivered-color);
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    justify-content: center;
    margin: 2rem 0;
}

.pagination a {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--primary-color);
}

.pagination a:hover,
.pagination a.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--primary-color);
    color: var(--white);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

.footer a {
    color: var(--accent-color);
}

/* ============================================
   Utilities
   ============================================ */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}


/* ============================================
   New Frontend Refinements (Forestry Theme)
   ============================================ */

/* Complex Navbar */
.header {
    background: var(--primary-dark);
    /* Dark Forest Green / Navy */
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.navbar-complex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.navbar-brand-complex {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--white);
    flex-shrink: 0;
    min-width: max-content;
}

.brand-logo-img {
    height: 50px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin-right: 10px;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
    /* Prevent width collapse to 0px */
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.5px;
    white-space: nowrap;
    /* Prevent vertical character stacking */
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-subtitle {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.9;
    letter-spacing: 0.5px;
    white-space: nowrap;
    /* Prevent vertical character stacking */
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-links-complex {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-link-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link-item:hover,
.nav-link-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
    /* Gold on hover */
}

/* Split Hero Section */
.hero-split {
    background: var(--light-bg);
    min-height: 55vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    /* 60/40 Split */
    gap: 4rem;
    align-items: center;
}

.hero-text-content {
    text-align: left;
    color: var(--text-dark);
}

.hero-title-large {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.3s ease;
}

.hero-image-wrapper:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Wider Stats Cards */
.stats-section {
    background: var(--white);
    padding: 5rem 0;
}

.stats-grid-wide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.stat-card-wide {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;

    /* Animation Initial State */
    opacity: 0;
    transform: translateY(30px);
}

.stat-card-wide.visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-card-wide:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.stat-icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.stat-icon-wrapper.gold {
    background: rgba(245, 158, 11, 0.1);
    color: var(--secondary-dark);
}

.stat-icon-wrapper.green {
    background: rgba(27, 94, 32, 0.1);
    color: var(--primary-color);
}

.stat-icon-wrapper.brown {
    background: rgba(120, 53, 15, 0.1);
    color: var(--accent-color);
}

.stat-info {
    text-align: left;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-desc {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* News Section */
.news-section {
    padding: 5rem 0;
    background: var(--light-bg);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.news-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-date {
    font-size: 0.85rem;
    color: var(--secondary-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-excerpt {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.news-link {
    margin-top: auto;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.news-link:hover {
    gap: 0.8rem;
    color: var(--primary-dark);
}

/* Dynamic news additions */
.news-image-placeholder {
    width: 100%;
    height: 200px;
    background: #e8f5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #a5d6a7;
}

.news-meta-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.news-source-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-source-pusat {
    background: #e3f2fd;
    color: #1565c0;
}

.news-source-bpdas {
    background: #f3e5f5;
    color: #6a1b9a;
}

.news-empty-landing {
    text-align: center;
    padding: 3rem;
    color: #aaa;
    margin-top: 2rem;
}

.news-empty-landing i {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    color: #c8e6c9;
}

.news-empty-landing p {
    margin-bottom: 1.5rem;
}

/* ===== Landing News Tab Filter ===== */
.nl-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: #fff;
    padding: 0.4rem;
    border-radius: 50px;
    width: -moz-fit-content;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nl-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.25rem;
    border: none;
    background: transparent;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.nl-tab:hover {
    color: var(--primary-color);
}

.nl-tab.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 155, 76, 0.3);
}

.nl-tab-count {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.72rem;
    padding: 0.05rem 0.45rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.nl-tab:not(.active) .nl-tab-count {
    background: #f0f0f0;
    color: #888;
}

.nl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 0;
}

.nl-empty {
    text-align: center;
    padding: 3rem;
    color: #aaa;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nl-empty i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
    color: #c8e6c9;
}

/* Global news source badges (also used in landing) */
.news-meta-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.news-source-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-source-pusat {
    background: #e3f2fd;
    color: #1565c0;
}

.news-source-bpdas {
    background: #e8f5e9;
    color: #1b5e20;
}

.news-source-bpth {
    background: #f1f8e9;
    color: #33691e;
}


@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-text-content {
        text-align: center;
        margin: 0 auto;
    }

    .hero-image-wrapper {
        transform: none;
        max-width: 600px;
        margin: 0 auto;
    }

    .hero-image-wrapper:hover {
        transform: none;
    }

    .navbar-menu {
        display: none;
        /* Hide on mobile for now or implement toggle */
    }
}


.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}

.p-4 {
    padding: 2rem;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.align-center {
    align-items: center;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {

    .col-1,
    .col-2,
    .col-3,
    .col-4,
    .col-5,
    .col-6,
    .col-7,
    .col-8,
    .col-9,
    .col-10,
    .col-11,
    .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .navbar-menu {
        flex-direction: column;
        gap: 0.5rem;
    }

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

    .table {
        font-size: 0.875rem;
    }

    .table th,
    .table td {
        padding: 0.5rem;
    }

    /* Carousel responsive */
    .carousel {
        height: 350px;
    }

    .carousel-overlay h1 {
        font-size: 2rem;
    }

    .carousel-overlay p {
        font-size: 1.1rem;
    }

    .carousel-control {
        font-size: 1.5rem;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 0;
    }

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

    .stats-number {
        font-size: 2rem;
    }

    /* Carousel mobile */
    .carousel {
        height: 250px;
    }

    .carousel-overlay h1 {
        font-size: 1.5rem;
    }

    .carousel-overlay p {
        font-size: 1rem;
    }

    .carousel-control {
        font-size: 1.2rem;
        padding: 0.5rem 0.75rem;
    }

    .carousel-control.next {
        right: 10px;
    }
}

/* ============================================
   Restored Carousel Styles
   ============================================ */
.carousel-section {
    padding: 4rem 2rem;
    background: var(--white);
}

.carousel-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

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

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

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--white);
    padding: 3rem 2rem 2rem;
}

.carousel-caption h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.carousel-caption p {
    font-size: 1.1rem;
    opacity: 0.9;
    color: var(--white);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--white);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--white);
    width: 30px;
    border-radius: 6px;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
    .carousel-wrapper {
        height: 350px;
    }

    .carousel-caption h3 {
        font-size: 1.5rem;
    }

    .carousel-caption p {
        font-size: 0.95rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Hero Section Split Layout */
.hero-split {
    padding: 5rem 2rem;
    background: var(--light-bg);
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-text-content {
    z-index: 2;
    padding-right: 2rem;
}

.hero-title-large {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    max-width: 90%;
}

.hero-image-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Image Transparency Trick (Multiply Blend Mode) */
.hero-image {
    width: 100%;
    max-width: 600px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.hero-image-transparent {
    mix-blend-mode: multiply;
    border-radius: 0;
    box-shadow: none;
    filter: contrast(1.1) saturate(1.1);
}

@media (max-width: 968px) {
    .hero-split {
        padding: 3rem 1.5rem;
        text-align: center;
        min-height: auto;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-text-content {
        padding-right: 0;
        order: 2;
    }

    .hero-image-wrapper {
        order: 1;
        margin-bottom: 1rem;
    }

    .hero-title-large {
        font-size: 2.5rem;
    }

    .cta-buttons {
        justify-content: center !important;
    }
}

/* Fix for Select Inputs - Prevent Cutoff */
select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-height: 45px !important;
    line-height: 1.5 !important;
    padding-top: 10px;
    padding-bottom: 10px;
    background-size: 12px 12px;
    background-position: right 1rem center;
}

/* ============================================
   Hamburger Button
   ============================================ */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.hamburger-btn.is-active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-btn.is-active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   Mobile Nav Overlay
   ============================================ */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 900;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    display: block;
    opacity: 1;
}

/* ============================================
   Breakpoint: <=768px (mobile)
   ============================================ */
@media (max-width: 768px) {

    /* Minimum 15px lateral padding on all containers */
    .container,
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Show hamburger; hide desktop nav */
    .hamburger-btn {
        display: flex;
    }

    .nav-links-complex {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--primary-dark);
        flex-direction: column;
        gap: 0;
        padding: 80px 0 2rem;
        z-index: 950;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-links-complex.nav-open {
        display: flex;
        transform: translateX(0);
    }

    .nav-links-complex li {
        width: 100%;
    }

    .nav-link-item {
        padding: 0.85rem 1.5rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        font-size: 1rem;
        width: 100%;
    }

    .nav-links-complex .btn {
        margin: 0.5rem 1.5rem;
        display: block;
        text-align: center;
    }

    /* Hero: headline text FIRST, image BELOW */
    .hero-split {
        padding: 2rem 0;
        min-height: auto;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .hero-text-content {
        order: 1;
        padding-right: 0;
        text-align: left;
    }

    .hero-image-wrapper {
        order: 2;
        animation: none;
    }

    .hero-title-large {
        font-size: 1.9rem;
        letter-spacing: 0.5px;
    }

    .hero-description {
        font-size: 0.95rem;
        max-width: 100%;
    }

    .cta-buttons {
        justify-content: flex-start !important;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .btn-lg {
        padding: 0.8rem 1.4rem;
        font-size: 0.95rem;
    }

    /* Stats: max 2 columns */
    .stats-section {
        padding: 3rem 0;
    }

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

    .stat-card-wide {
        padding: 1rem;
        gap: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .stat-icon-wrapper {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }

    .stat-value {
        font-size: 1.6rem;
    }

    .stat-desc {
        font-size: 0.8rem;
    }

    /* News: 1 column full width */
    .news-section {
        padding: 3rem 0;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }

    /* Carousel */
    .carousel-section {
        padding: 2rem 0;
    }

    .carousel-wrapper {
        height: 220px;
    }

    .carousel-caption {
        padding: 2rem 1rem 1rem;
    }

    .carousel-caption h3 {
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
    }

    .carousel-caption p {
        font-size: 0.85rem;
    }

    .carousel-btn {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    /* Section titles */
    .section-title h2 {
        font-size: 1.5rem;
    }

    .section-title p {
        font-size: 0.9rem;
    }

    /* Footer */
    .footer {
        margin-top: 2rem;
        padding: 1.5rem 0;
    }
}

/* ============================================
   Breakpoint: <=480px (extra small phones)
   ============================================ */
@media (max-width: 480px) {
    .hero-title-large {
        font-size: 1.6rem;
    }

    .stats-grid-wide {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .stat-card-wide {
        padding: 0.85rem;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .carousel-wrapper {
        height: 170px;
    }

    .carousel-caption {
        padding: 1.5rem 0.75rem 0.75rem;
    }

    .carousel-caption h3 {
        font-size: 0.95rem;
    }

    .carousel-caption p {
        display: none;
    }
}

/* ============================================
   Search Page Layout
   ============================================ */
.search-page-container {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Two-column grid: 300px filter | rest results */
.search-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin-top: 2rem;
    align-items: start;
}

/* Result cards: 2 per row on desktop */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Inline stat row inside result cards */
.search-stat-row {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.search-stat-row .stats-card {
    flex: 1;
}

/* Card base styles if not already defined */
.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--light-bg);
}

.card-title {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--light-bg);
}

/* Stats mini card */
.stats-card {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stats-card.success {
    background: rgba(0, 155, 76, 0.07);
    border-color: var(--primary-color);
}

.stats-number {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
}

.stats-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-light);
    font-weight: 500;
    margin-top: 0.2rem;
}

/* â”€â”€ Mobile: search page stacks filter above results â”€â”€ */
@media (max-width: 768px) {
    .search-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .search-results-grid {
        grid-template-columns: 1fr;
    }

    .search-page-container {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
}

/* --- Header Layout Overrides --- */
.navbar-complex {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: 100%;
}

.navbar-brand-complex {
    display: flex !important;
    align-items: center !important;
    flex: 1 1 auto;
    min-width: 0;
    /* needed for flex truncation */
    margin-right: 15px;
}

.brand-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-logo-img {
    height: 45px !important;
    width: auto !important;
    object-fit: contain !important;
    margin-right: 12px !important;
    flex-shrink: 0;
}

.brand-title {
    font-size: 1.15rem !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-subtitle {
    font-size: 0.85rem !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-links-complex {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-shrink: 0;
    /* Nav links shouldn't shrink */
}

.nav-link-item {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.95rem !important;
    white-space: nowrap !important;
}

.nav-btn-warning {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    font-weight: 700 !important;
    padding: 0.5rem 1rem !important;
    color: #333 !important;
    border-radius: 6px !important;
    text-transform: uppercase !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease !important;
    background: var(--warning-color) !important;
    white-space: nowrap !important;
}

.nav-btn-warning:hover {
    background: #e09600 !important;
    color: #111 !important;
    text-decoration: none !important;
}

@media (max-width: 1150px) {
    .hamburger-btn {
        display: flex !important;
        margin-left: auto;
    }

    .nav-links-complex {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        width: 280px !important;
        height: 100vh !important;
        background: var(--primary-dark) !important;
        flex-direction: column !important;
        gap: 0 !important;
        padding: 80px 0 2rem !important;
        z-index: 950 !important;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3) !important;
        overflow-y: auto !important;
        transform: translateX(100%) !important;
        transition: transform 0.35s ease !important;
    }

    .nav-links-complex.nav-open {
        display: flex !important;
        transform: translateX(0) !important;
    }

    .nav-links-complex li {
        width: 100% !important;
    }

    .nav-link-item {
        padding: 0.85rem 1.5rem !important;
        border-radius: 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
        width: 100% !important;
        font-size: 1rem !important;
        justify-content: flex-start !important;
        white-space: normal !important;
    }

    .nav-btn-warning {
        margin: 1rem 1.5rem !important;
        display: flex !important;
        justify-content: center !important;
    }
}

@media (max-width: 576px) {
    .brand-logo-img {
        height: 36px !important;
        margin-right: 8px !important;
    }

    .brand-title {
        font-size: 1rem !important;
    }

    .brand-subtitle {
        font-size: 0.75rem !important;
    }
}