/* ==========================================
   BERITA MAXWIN - Main Stylesheet
   Dark Theme with Gold Accent (#FFD700)
   ========================================== */

:root {
    --gold: #FFD700;
    --gold-dark: #B8860B;
    --gold-light: #FFF8DC;
    --bg-dark: #121212;
    --bg-card: #1E1E1E;
    --bg-card-hover: #2A2A2A;
    --text-light: #FFFFFF;
    --text-muted: #AAAAAA;
    --border-color: #333333;
}

/* Base Styles */
body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--gold-light);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

.text-gold {
    color: var(--gold) !important;
}

/* Navbar */
.navbar {
    background-color: rgba(18, 18, 18, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
    font-weight: 700;
    color: var(--gold) !important;
}

.navbar .nav-link {
    color: var(--text-light) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--gold) !important;
    background-color: rgba(255, 215, 0, 0.1);
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-header {
    background-color: rgba(255, 215, 0, 0.1);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.card-title a {
    color: var(--text-light);
}

.card-title a:hover {
    color: var(--gold);
}

/* Buttons */
.btn-warning {
    background-color: var(--gold);
    border-color: var(--gold);
    color: #000;
    font-weight: 600;
}

.btn-warning:hover {
    background-color: var(--gold-dark);
    border-color: var(--gold-dark);
    color: #000;
}

.btn-outline-warning {
    border-color: var(--gold);
    color: var(--gold);
}

.btn-outline-warning:hover {
    background-color: var(--gold);
    border-color: var(--gold);
    color: #000;
}

/* Slideshow - Full image display without cropping */
#mainSlideshow {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

#mainSlideshow .carousel-inner {
    border-radius: 15px;
}

#mainSlideshow .carousel-item {
    width: 100%;
}

#mainSlideshow .carousel-item img {
    width: 100%;
    height: auto !important;
    max-height: none !important;
    object-fit: contain;
    display: block;
}

/* Mobile */
@media (max-width: 576px) {
    #mainSlideshow {
        border-radius: 10px;
    }

    #mainSlideshow .carousel-inner {
        border-radius: 10px;
    }
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#mainSlideshow:hover .carousel-control-prev,
#mainSlideshow:hover .carousel-control-next {
    opacity: 1;
}

/* Always show controls on touch devices */
@media (hover: none) {
    .carousel-control-prev,
    .carousel-control-next {
        opacity: 0.7;
    }
}

.carousel-indicators {
    margin-bottom: 10px;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid var(--gold);
    margin: 0 5px;
}

.carousel-indicators button.active {
    background-color: var(--gold);
}

/* Sidebar */
.sidebar .card {
    margin-bottom: 1.5rem;
}

.sidebar .list-group-item {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-light);
    transition: all 0.2s ease;
}

.sidebar .list-group-item:hover {
    background-color: rgba(255, 215, 0, 0.1);
    color: var(--gold);
}

/* Article */
.article-content {
    font-size: 1.1rem;
    line-height: 1.9;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--gold);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content p {
    margin-bottom: 1.2rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--gold);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-style: italic;
}

.article-content a {
    text-decoration: underline;
}

.article-content table {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
}

.article-content table th,
.article-content table td {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
}

.article-content table th {
    background-color: rgba(255, 215, 0, 0.1);
    color: var(--gold);
}

/* Meta Info */
.meta-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.meta-info i {
    color: var(--gold);
}

/* Badges */
.badge-kategori {
    background-color: rgba(255, 215, 0, 0.2);
    color: var(--gold);
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item a {
    color: var(--text-muted);
}

.breadcrumb-item a:hover {
    color: var(--gold);
}

.breadcrumb-item.active {
    color: var(--gold);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
}

/* Search Form */
.search-form .form-control {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-light);
}

.search-form .form-control:focus {
    background-color: var(--bg-card);
    border-color: var(--gold);
    color: var(--text-light);
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
}

.search-form .form-control::placeholder {
    color: var(--text-muted);
}

/* Share Buttons */
.share-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-card);
    color: var(--text-light);
    margin-right: 0.5rem;
    transition: all 0.2s ease;
}

.share-buttons a:hover {
    background-color: var(--gold);
    color: #000;
    transform: translateY(-2px);
}

/* Berita List - Horizontal Layout */
.berita-list .berita-img-wrap {
    width: 180px;
    min-width: 180px;
    height: 130px;
    overflow: hidden;
}

.berita-list .berita-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.berita-list .berita-content {
    padding: 15px;
}

.berita-list .card-title {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 8px;
}

.berita-list .card-text {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 10px;
}

.berita-list .badge {
    font-size: 0.7rem;
}

.berita-list small {
    font-size: 0.75rem;
    color: #888;
}

@media (max-width: 768px) {
    .berita-list .berita-img-wrap {
        width: 120px;
        min-width: 120px;
        height: 100px;
    }

    .berita-list .berita-content {
        padding: 10px;
    }

    .berita-list .card-title {
        font-size: 0.9rem;
    }

    .berita-list .card-text {
        display: none;
    }
}

/* Popular Article */
.popular-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.popular-item h6 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.popular-item h6 a {
    color: var(--text-light);
}

.popular-item h6 a:hover {
    color: var(--gold);
}

.popular-item .views {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Related Articles */
.related-articles .card {
    height: 100%;
}

.related-articles .card-img-top {
    height: 150px;
}

/* Footer */
footer {
    background-color: #0A0A0A;
    border-top: 1px solid var(--border-color);
}

footer h5 {
    color: var(--gold);
}

footer a {
    color: var(--text-muted);
}

footer a:hover {
    color: var(--gold);
}

footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--bg-card);
    border-radius: 50%;
    color: var(--text-light);
    margin-right: 0.5rem;
    transition: all 0.2s ease;
}

footer .social-links a:hover {
    background-color: var(--gold);
    color: #000;
}

/* Pagination */
.pagination .page-link {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-light);
}

.pagination .page-link:hover {
    background-color: rgba(255, 215, 0, 0.2);
    border-color: var(--gold);
    color: var(--gold);
}

.pagination .page-item.active .page-link {
    background-color: var(--gold);
    border-color: var(--gold);
    color: #000;
}

/* Rating Stars */
.rating-stars {
    color: var(--gold);
}

/* Alerts */
.alert-warning {
    background-color: rgba(255, 215, 0, 0.1);
    border-color: var(--gold);
    color: var(--gold);
}

/* Tables */
.table-dark {
    background-color: var(--bg-card);
}

.table-dark th {
    background-color: rgba(255, 215, 0, 0.1);
    color: var(--gold);
}

/* Forms */
.form-control,
.form-select {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-light);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--bg-card);
    border-color: var(--gold);
    color: var(--text-light);
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(184, 134, 11, 0.2));
    border: 2px solid var(--gold);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
}

.cta-box h4 {
    color: var(--gold);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Scroll to Top */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--gold);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* Responsive */
@media (max-width: 991px) {
    .sidebar {
        margin-top: 2rem;
    }
}

@media (max-width: 576px) {
    .card-img-top {
        height: 180px;
    }

    .article-content {
        font-size: 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}
