/* Kunci utama biar gak bisa digeser kiri kanan di hp ⚡ */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    background-color: transparent;
}

body {
    color: #fff;
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* HEADER & NAVBAR DEFAULTS (PC MODE) */
header {
    background-color: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid #222;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-sizing: border-box;
    width: 100%;
}

header h1 {
    margin: 0;
    font-size: 24px;
    color: #ff4d4d;
    letter-spacing: 1px;
    flex-shrink: 0;
}

nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

nav a {
    color: #bbb;
    text-decoration: none;
    margin-left: 15px;
    font-size: 14px;
    transition: 0.3s;
    padding: 6px 12px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #222;
}

nav a:hover {
    color: #fff;
    background: #ff4d4d;
    border-color: #ff4d4d;
}

.container {
    position: relative;
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    z-index: 1;
    flex: 1 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* SEARCH BOX */
.search-wrapper-main {
    position: relative;
    max-width: 400px;
    margin-bottom: 30px;
    width: 100%;
}

.search-box-main {
    display: flex;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.search-box-main input {
    flex: 1;
    padding: 12px;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid #222;
    border-radius: 5px;
    color: #fff;
    outline: none;
    min-width: 0;
}

.search-box-main input:focus {
    border-color: #ff4d4d;
}

.search-box-main button {
    padding: 10px 20px;
    background: #ff4d4d;
    border: none;
    color: #fff;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    flex-shrink: 0;
}

.search-suggestions-main {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #141414;
    border: 1px solid #ff4d4d;
    border-radius: 5px;
    margin-top: 5px;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
    z-index: 999;
    box-sizing: border-box;
}

.suggestion-item-main {
    padding: 12px;
    color: #fff;
    text-decoration: none;
    display: block;
    font-size: 14px;
    border-bottom: 1px solid #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.suggestion-item-main:hover {
    background: #ff4d4d;
    color: #fff;
}

.section-title {
    font-size: 22px;
    border-left: 4px solid #ff4d4d;
    padding-left: 15px;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* NEWS GRID */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    width: 100%;
}

.news-card {
    background-color: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(3px);
    border: 1px solid #222;
    border-radius: 8px;
    overflow: hidden;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: #ff4d4d;
    background-color: rgba(25, 25, 25, 0.9);
}

.card-thumbnail-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-bottom: 1px solid #222;
    background: #141414;
}

.card-thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.news-card:hover .card-thumbnail-wrapper img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-category {
    color: #ff4d4d;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 10px;
}

.card-title {
    margin: 0 0 15px 0;
    font-size: 18px;
}

.card-title a {
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
}

.card-title a:hover {
    color: #ff4d4d;
}

.card-snippet {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 20px;
    flex: 1;
}

.card-snippet img {
    display: none !important;
}

.card-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #222;
    padding-top: 15px;
}

/* WADAH ARTIKEL BACA (KACA BURAM MATRIX) ⚡ */
.article-container {
    background-color: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(5px);
    border: 1px solid #222;
    border-radius: 8px;
    padding: 30px;
    margin-top: 20px;
    margin-bottom: 30px;
}

footer {
    flex-shrink: 0;
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid #222;
    background-color: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(5px);
    position: relative;
    z-index: 10;
    width: 100%;
    box-sizing: border-box;
}

/* 🚀 PERBAIKAN TOTAL MOBILE ANTI-BEKU (Max-width: 768px) */
@media (max-width: 768px) {
    header {
        position: static !important;
        padding: 15px 20px;
        flex-direction: column;
        gap: 12px;
        text-align: center;
        width: 100%;
    }

    header h1 {
        font-size: 22px;
        width: 100%;
    }

    nav {
        justify-content: center;
        gap: 6px;
        width: 100%;
    }

    nav a {
        margin: 0;
        font-size: 12px;
        padding: 8px 12px;
        flex: 1 1 auto;
        text-align: center;
    }

    .container {
        margin-top: 25px;
        padding: 0 15px;
    }

    .search-wrapper-main {
        max-width: 100%;
        margin-bottom: 25px;
    }

    .search-box-main {
        width: 100%;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card-thumbnail-wrapper {
        height: 200px;
    }

    footer div {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
}