/* General Body & Container */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    background-color: #1a1a1a; /* Dark background similar to image */
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll on mobile */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Main Header */
.main-header {
    background-color: #000; /* Black header background */
    padding-bottom: 10px; /* Space between header top and nav */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Header Top Section (Logo & Quick Links) */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.logo {
    display: flex;
    align-items: center;
}

.site-logo {
    height: 40px; /* Adjust as needed */
    margin-right: 10px;
    vertical-align: middle;
}

.site-title-text {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    text-decoration: none; /* Ensure link style */
}

/* header-links ini sekarang selalu terlihat, baik di desktop maupun mobile */
.header-links {
    display: flex; /* Pastikan selalu flex untuk layout */
    flex-wrap: wrap;
    justify-content: flex-end; /* Align to right */
}

.header-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    padding: 5px 0; /* Add some padding for touch targets */
    transition: color 0.2s ease;
}

.header-links a i {
    margin-right: 5px;
}

.header-links a:hover {
    color: #ffd700; /* Gold hover color */
}

/* Main Navigation Bar */
.main-nav {
    background-color: #333; /* Dark gray for navigation */
    padding: 10px 0;
    border-top: 1px solid #444;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Space out toggle and list */
}

.menu-toggle {
    display: none; /* Hidden on desktop by default */
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* Default: flex untuk desktop */
    flex-grow: 1;
    justify-content: space-around; /* Distribute items evenly */
}

.nav-list li {
    position: relative;
}

.nav-list a {
    color: #fff;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    font-size: 14px;
    white-space: nowrap; /* Prevent wrapping in nav items */
    transition: background-color 0.2s ease, color 0.2s ease;
    border-radius: 5px; /* Slightly rounded corners */
}

.nav-list a i {
    margin-right: 8px;
}

.nav-list a:hover,
.nav-list a.active {
    background-color: #555;
    color: #ffd700; /* Gold color for active/hover */
}

/* Announcement Bar (Running Text/Widget HTML) */
.announcement-bar {
    background-color: #222; /* Slightly lighter black */
    padding: 8px 0;
    overflow: hidden; /* Hide overflowing text */
    white-space: nowrap; /* Prevent wrapping */
    font-size: 14px;
    border-top: 1px solid #444;
    border-bottom: 1px solid #444;
}

.announcement-bar .container {
    display: flex;
    align-items: center;
}

.announcement-bar i {
    color: #ffd700; /* Gold color for icon */
    margin-right: 10px;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.marquee {
    display: inline-block;
    padding-left: 100%; /* Start off-screen */
    animation: marquee 15s linear infinite; /* Adjust duration as needed */
    color: #fff;
}

@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-100%); }
}

/* Main Content Area */
.main-content {
    padding: 30px 0;
}

/* Result Grid Section */
.result-grid-section {
    margin-bottom: 30px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* Adjusted for 4 columns on large screens */
    gap: 20px;
}

.result-card {
    background-color: #333; /* Dark gray for cards */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    text-align: center;
    display: flex;
    flex-direction: column;
}

.result-card .card-header-main {
    background-color: #444; /* Slightly lighter header for card */
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #555;
}

.result-card .card-header-main img {
    width: 28px; /* As per requirement */
    height: 28px;
    margin-right: 10px;
}

.result-card .card-header-main h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
}

.result-card .card-body-main {
    padding: 20px;
    flex-grow: 1; /* Allow body to take available space */
}

.result-card .result-number {
    font-size: 3.5em; /* Large number for result */
    font-weight: bold;
    color: #ffd700; /* Gold color for result */
    margin-bottom: 10px;
    letter-spacing: 2px; /* Spacing for numbers */
}

.result-card small {
    font-size: 0.9em;
    color: #bbb;
}

.result-card .card-footer-main {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    border-top: 1px solid #444;
    background-color: #444;
}

.result-card .card-footer-main a {
    color: #ffd700; /* Gold for links */
    text-decoration: none;
    font-size: 14px;
    display: flex;
    flex-direction: column; /* Icon above text */
    align-items: center;
    flex: 1; /* Distribute space evenly */
    padding: 5px 0;
    transition: color 0.2s ease;
}

.result-card .card-footer-main a:hover {
    color: #fff;
}

/* Page Titles for other public pages */
.page-title {
    font-size: 2.2em;
    color: #ffd700;
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #555;
}

.content-block {
    background-color: #2b2b2b;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    margin-bottom: 30px;
}

/* Table styling for public pages */
.table-dark {
    --bs-table-bg: #333;
    --bs-table-color: #e0e0e0;
    --bs-table-striped-bg: #3b3b3b;
    --bs-table-striped-color: #e0e0e0;
    --bs-table-active-bg: #4c4c4c;
    --bs-table-active-color: #e0e0e0;
    --bs-table-hover-bg: #424242;
    --bs-table-hover-color: #e0e0e0;
    border: 1px solid #555;
}

.table-dark th, .table-dark td {
    border-color: #555;
    padding: 12px;
    vertical-align: middle;
}

.btn-primary-custom {
    background-color: #ffd700;
    color: #1a1a1a;
    border: 1px solid #ffd700;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-primary-custom:hover {
    background-color: #e0b800;
    color: #000;
    border-color: #e0b800;
}

.btn-secondary-custom {
    background-color: #555;
    color: #fff;
    border: 1px solid #555;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-secondary-custom:hover {
    background-color: #666;
    color: #fff;
    border-color: #666;
}

.btn-sm-outline-primary {
    border: 1px solid #ffd700;
    color: #ffd700;
    background-color: transparent;
    padding: 5px 10px;
    font-size: 0.8em;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-sm-outline-primary:hover {
    background-color: #ffd700;
    color: #000;
}

.btn-read-more {
    background-color: #ffd700;
    color: #1a1a1a;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
}
.btn-read-more:hover {
    background-color: #e0b800;
}

/* Article/Guide Detail & List */
.article-detail h2 {
    color: #FFFFFF; /* Warna Putih */
}
.article-summary h3 {
    color: #ffd700; /* Default tetap kuning untuk listing, bisa diubah jika perlu */
}
.article-summary h3 a {
    color: #FFFFFF; /* Warna Putih untuk link judul di listing */
}
.article-summary h3 a:hover {
    color: #CCCCCC; /* Sedikit abu-abu saat dihover, bisa disesuaikan */
    text-decoration: underline;
}

.article-meta {
    font-size: 0.85em;
    color: #bbb;
    margin-bottom: 20px;
}
.article-content {
    color: #e0e0e0;
    line-height: 1.8;
}
.article-content img {
    max-width: 100% !important; /* Pastikan gambar tidak melebihi lebar kontainer */
    height: auto !important;    /* Pertahankan rasio aspek dan override inline height */
    width: auto !important;     /* Override inline width, biarkan auto */
    display: block;             /* Jadikan elemen blok untuk margin auto */
    margin: 15px auto;          /* Memberi jarak atas/bawah dan memusatkan gambar */
    border-radius: 5px;
}
.article-list .article-summary {
    padding: 15px 0;
}
.article-list hr {
    border-color: #555;
    margin: 15px 0;
}

/* Livedraw grid */
.livedraw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.livedraw-item {
    background-color: #333;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.livedraw-item h3 {
    color: #ffd700;
    margin-bottom: 15px;
}
.livedraw-item .video-placeholder {
    background-color: #111;
    height: 180px; /* Placeholder for video */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border-radius: 5px;
}

/* Form styling (for public pages like filter) */
.form-label {
    color: #fff;
}
.form-control, .form-select {
    background-color: #444;
    color: #fff;
    border: 1px solid #555;
}
.form-control:focus, .form-select:focus {
    background-color: #4a4a4a;
    color: #fff;
    border-color: #ffd700;
    box-shadow: 0 0 0 0.25rem rgba(255, 215, 0, 0.25);
}


/* Footer */
.main-footer {
    background-color: #000; /* Black footer */
    color: #aaa;
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
    border-top: 1px solid #333;
    margin-top: 30px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 15px;
    }
    /* header-links sekarang selalu terlihat, tidak disembunyikan di mobile */
    .header-links { 
        display: flex; /* Pastikan tetap terlihat */
        width: 100%; /* Ambil lebar penuh */
        justify-content: space-around; /* Rata tengah item */
        margin-top: 10px; /* Beri sedikit jarak */
    }
    .header-links a {
        margin: 5px 0; /* Sesuaikan margin di mobile */
    }

    .nav-content {
        justify-content: space-between;
        padding: 0 15px;
    }
    .menu-toggle {
        display: block; /* Tampilkan toggle di mobile */
    }
    .nav-list {
        display: none; /* Sembunyikan daftar menu secara default di mobile */
        flex-direction: column;
        width: 100%;
        background-color: #444; /* Latar belakang untuk menu yang terbuka */
        position: absolute;
        left: 0;
        top: 100%; /* Posisikan di bawah nav bar */
        z-index: 1000; /* Pastikan di atas konten lain */
        padding: 10px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.3);
    }
    .nav-list.active {
        display: flex; /* Tampilkan saat aktif */
    }
    .nav-list li {
        width: 100%;
        border-bottom: 1px solid #555; /* Garis pemisah antar item di mobile */
    }
    .nav-list li:last-child {
        border-bottom: none;
    }
    .nav-list a {
        padding: 12px 20px;
        text-align: left; /* Teks menu rata kiri di mobile */
    }

    .announcement-bar .container {
        padding: 0 10px;
    }

    .result-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Lebih ringkas di mobile */
        gap: 10px;
    }
    .result-card .result-number {
        font-size: 2.5em; /* Angka lebih kecil di mobile */
    }
    .result-card .card-footer-main a {
        font-size: 12px; /* Font lebih kecil untuk link footer */
    }
    .result-card .card-footer-main a i {
        font-size: 1em;
    }
    .page-title {
        font-size: 1.8em;
    }
    .content-block {
        padding: 20px;
    }
    .livedraw-item .video-placeholder {
        height: 150px;
    }

    /* Penyesuaian untuk artikel summary di mobile */
    .article-summary-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .article-thumbnail {
        margin-right: 0;
        margin-bottom: 15px;
    }

    /* Adjust table-responsive for smaller screens in jadwal.php */
    .table-responsive.mx-auto {
        max-width: 100% !important; /* Allow it to take full width on mobile */
        margin-left: 0 !important; /* Remove margin auto to prevent issues */
        margin-right: 0 !important;
    }

    /* Adjust table cells for better readability on mobile in jadwal.php */
    .table-dark th, .table-dark td {
        font-size: 0.85em; /* Slightly smaller font size */
        padding: 8px; /* Reduce padding */
        white-space: normal; /* Allow text to wrap within cells */
    }
}

@media (max-width: 480px) {
    /* ... existing very small screen styles ... */
    .table-dark th, .table-dark td {
        font-size: 0.75em; /* Even smaller font size for very small screens */
        padding: 5px;
    }
}
