/* ========================================
   GLOBAL STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.custom-background {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

a {
    transition: all 0.3s ease;
    text-decoration: none !important;
}

a:hover {
    opacity: 0.8;
}

/* --- NAVBAR STYLING: HITAM DENGAN BORDER PUTIH --- */
.navbar-custom {
    background-color: #000000 !important;
    border-top: 1px solid #ffffff !important;
    border-bottom: 1px solid #ffffff !important;
    padding: 0 1rem !important;
}

.navbar-custom .nav-item {
    position: relative;
}

.navbar-custom .nav-link {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    padding: 12px 18px !important;
    text-transform: uppercase;
    transition: all 0.2s ease-in-out;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-item.active .nav-link {
    color: #ffd700 !important;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Submenu / Dropdown Styling */
.navbar-custom .dropdown-menu {
    background-color: #000000 !important;
    border: 1px solid #ffffff !important;
    border-radius: 0;
    margin-top: 0;
    padding: 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.navbar-custom .dropdown-item {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.navbar-custom .dropdown-item:last-child {
    border-bottom: none;
}

.navbar-custom .dropdown-item:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
}

.navbar-custom .navbar-toggler {
    border-color: #ffffff;
    padding: 4px 8px;
    margin: 6px 0;
}

/* ========================================
   COLOR VARIABLES
   ======================================== */
.bg-color-1 { background: linear-gradient(135deg, #1a1a2e, #16213e) !important; }
.bg-color-2 { background: rgba(255, 0, 0, 0.85) !important; }
.bg-color-3 { background: #0f3460 !important; }
.bg-color-4 { background: rgba(255, 255, 255, 0.15) !important; }
.bg-color-5 { background: #e94560 !important; }
.bg-color-6 { background: #1a1a2e !important; }
.bg-color-7 { background: #16213e !important; }
.bg-color-8 { background: rgba(255, 255, 255, 0.92) !important; }
.bg-color-9 { background: #ffd700 !important; }

.bg-gradient-1 {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95)) !important;
    backdrop-filter: blur(10px);
}

.text-white { color: #ffffff !important; }
.text-black { color: #1a1a2e !important; }
.text-title { color: #ffd700 !important; }
.text-color-9 { color: #ffd700 !important; }

.line-height-small {
    line-height: 1.2 !important;
}

/* ========================================
   HEADER
   ======================================== */
header {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #ffd700;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-wrapper .web-logo {
    max-height: 60px;
    width: auto;
}

header .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #fff;
    border-radius: 25px 0 0 25px;
    padding: 8px 20px;
}

header .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

header .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffd700;
    box-shadow: none;
    color: #fff;
}

header .btn-danger {
    border-radius: 0 25px 25px 0;
    background: #ffd700;
    border-color: #ffd700;
    color: #1a1a2e;
    padding: 8px 20px;
}

header .btn-danger:hover {
    background: #ffed4a;
    border-color: #ffed4a;
}

/* ========================================
   WIDGETS STYLES
   ======================================== */
.widget {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 0;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
}

.widget .widget-title {
    color: #ffd700;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 10px;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.widget .widget-content {
    color: #fff;
}

.widget .widget-content ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 0;
}

.widget .widget-content ul li:last-child {
    border-bottom: none;
}

.widget .widget-content a {
    color: #fff;
    transition: all 0.3s ease;
}

.widget .widget-content a:hover {
    color: #ffd700;
    padding-left: 5px;
}

.widget .badge-warning {
    background: #ffd700;
    color: #1a1a2e;
    font-weight: 700;
}

.widget-recent-posts img {
    border-radius: 5px;
}

/* ========================================
   RESPONSIVE WIDGET
   ======================================== */
@media (max-width: 768px) {
    .widget {
        padding: 10px 0;
    }
    
    .widget .widget-title {
        font-size: 14px;
    }
}

/* ========================================
   MARQUEE / SCROLLING TEXT
   ======================================== */
.bg-color-2 marquee {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ========================================
   PAGE TITLE
   ======================================== */
.page-title {
    border-radius: 10px;
    border-left: 5px solid #ffd700;
    border-right: 5px solid #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    font-weight: 800;
}

.page-title span:first-child {
    color: #ffd700;
}

.page-title span:last-child {
    color: #ffffff;
}

/* ========================================
   POST CARDS (HOME & SEARCH)
   ======================================== */
.card-post {
    border-radius: 15px !important;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0.35rem;
}

.card-post:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.card-post .card-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    overflow: hidden;
    background: #0f0f1a;
    border-radius: 10px 10px 0 0;
}

.card-post .card-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-post .card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-post .text-title {
    font-size: 15px;
    font-family: 'Rajdhani', sans-serif;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-post .badge {
    font-size: 10px;
    border-radius: 20px !important;
    font-weight: 600;
}

.card-post .btn {
    border-radius: 50px !important;
    font-size: 0.875rem;
    transition: transform 0.2s ease;
}

.card-post .btn:hover {
    transform: scale(1.05);
}

/* ========================================
   SINGLE POST & PAGE
   ======================================== */
.card-blog {
    border-radius: 15px !important;
    overflow: hidden;
}

.card-blog .card-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background: #1a1a2e;
}

.card-blog .card-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-blog .card-body {
    border-radius: 0 0 15px 15px;
}

.card-blog .card-body table {
    width: 100%;
}

.card-blog .card-body table tr td {
    padding: 5px;
}

.card-blog .card-body .text-black {
    font-size: 16px;
    line-height: 1.8;
}

.card-blog .card-body .text-black p {
    margin-bottom: 0.5rem;
    color: #000;
}

.card-blog .card-body h1,
.card-blog .card-body h2,
.card-blog .card-body h3,
.card-blog .card-body h4,
.card-blog .card-body h5,
.card-blog .card-body h6 {
    color: #000;
}

.card-blog .card-body .text-black img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 10px 0;
}

.card-blog .card-body .text-black .emoji {
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar-wrapper {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    padding: 0;
    backdrop-filter: blur(10px);
    width: 350px;
}

.sidebar-wrapper .page-title {
    font-size: 18px;
    padding: 10px !important;
    border-width: 3px;
}

.sidebar-wrapper .card-post {
    margin-bottom: 10px;
}

.sidebar-wrapper .card-post .card-thumbnail {
    padding-top: 56.25%; /* 16:9 */
}

.sidebar-wrapper .card-post .badge {
    font-size: 10px;
}

.sidebar-wrapper .card-post .card-content p small {
    font-size: 13px;
    -webkit-line-clamp: 2;
}

.sidebar-wrapper .card-post .btn {
    font-size: 10px;
    padding: 4px 12px;
}

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

.paginate {
    display: inline-flex;
    gap: 5px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 12px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.paginate .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.paginate .page-numbers:hover {
    background: rgba(255, 215, 0, 0.3);
    color: #ffd700;
    transform: translateY(-2px);
}

.paginate .page-numbers.current {
    background: #ffd700;
    color: #1a1a2e;
    font-weight: 700;
}

.paginate .page-numbers.current:hover {
    background: #ffed4a;
    transform: translateY(-2px);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-info {
    background: rgba(255, 215, 0, 0.2) !important;
    border: 1px solid #ffd700 !important;
    color: #ffd700 !important;
    border-radius: 25px !important;
    padding: 5px 18px !important;
    transition: all 0.3s ease;
}

.btn-info:hover {
    background: #ffd700 !important;
    color: #1a1a2e !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-top: 2px solid #ffd700;
    margin-top: auto;
}

footer .site-url {
    color: #ffd700;
    font-weight: 600;
    transition: all 0.3s ease;
}

footer .site-url:hover {
    color: #ffed4a;
    text-decoration: underline !important;
}

/* ========================================
   CONTENT HOME
   ======================================== */
.content-wrapper {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.content-home {
    max-width: 800px;
    margin: 0 auto;
}

/* ========================================
   RESPONSIVE
   ======================================== */
   
@media (min-width: 1200px) {
    .container, .container-lg, .container-md, .container-sm, .container-xl {
        max-width: 1250px;
    }
}

@media (max-width: 992px) {
    .sidebar-wrapper {
        min-width: 100%;
        max-width: 100%;
        margin-top: 20px;
    }
    
    .page-title {
        font-size: 20px !important;
        padding: 12px !important;
    }

    .card-blog .card-body {
        padding: 15px !important;
    }

    .card-blog .card-body .text-black {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    header .logo-wrapper .web-logo {
        max-height: 40px;
    }

    header .form-control {
        font-size: 12px;
        padding: 6px 12px;
        width: 120px;
    }

    header .btn-danger {
        padding: 6px 12px;
        font-size: 12px;
    }

    .page-title {
        font-size: 16px !important;
        padding: 10px !important;
        border-width: 3px;
    }

    .card-post .card-thumbnail {
        padding-top: 60%;
    }

    .sidebar-wrapper .card-post .card-content .text-title {
        font-size: 11px;
        height: 26px;
    }

    .paginate .page-numbers {
        padding: 5px 10px;
        font-size: 12px;
        min-width: 30px;
    }

    .content-home {
        padding: 15px !important;
    }

    h1.display-1 {
        font-size: 60px !important;
    }

    .card-blog .card-body .text-black {
        font-size: 13px;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    header .logo-wrapper .web-logo {
        max-height: 30px;
    }

    header .form-control {
        width: 80px;
        font-size: 10px;
        padding: 4px 8px;
    }

    header .btn-danger {
        padding: 4px 8px;
        font-size: 10px;
    }

    .page-title {
        font-size: 14px !important;
        padding: 8px !important;
    }

    .card-post .card-content {
        padding: 10px !important;
    }

    .paginate .page-numbers {
        padding: 4px 8px;
        font-size: 10px;
        min-width: 25px;
    }
}

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

.card-post {
    animation: fadeInUp 0.6s ease forwards;
}

.card-post:nth-child(1) { animation-delay: 0.1s; }
.card-post:nth-child(2) { animation-delay: 0.2s; }
.card-post:nth-child(3) { animation-delay: 0.3s; }
.card-post:nth-child(4) { animation-delay: 0.4s; }
.card-post:nth-child(5) { animation-delay: 0.5s; }
.card-post:nth-child(6) { animation-delay: 0.6s; }
.card-post:nth-child(7) { animation-delay: 0.7s; }
.card-post:nth-child(8) { animation-delay: 0.8s; }

/* ========================================
   SCROLLBAR CUSTOM
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #ffd700;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ffed4a;
}

/* ========================================
   LAZY LOAD
   ======================================== */
/* Mencegah SVG loading ditarik membesar melebihi kotaknya */
img.lazy[src*="loading.svg"] {
    object-fit: contain !important;
    padding: 25% !important;
}

img.lazy.loaded {
    object-fit: cover !important;
    padding: 0 !important;
}

/* ========================================
   MISC
   ======================================== */
hr.bg-secondary {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.fw-bold {
    font-weight: 700 !important;
}

@media print {
    .bg-color-2,
    .bg-color-4,
    .bg-gradient-1,
    .sidebar-wrapper,
    footer,
    header,
    .pagination-wrapper {
        background: #fff !important;
        color: #000 !important;
    }
}