/* --- Global Styles & Roblox 2006 Variables --- */
:root {
    --roblox-red: #DA242A;
    --roblox-grey-light: #CBCBCB;
    --roblox-grey-medium: #A3A2A5;
    --roblox-grey-dark: #545454;
    --white: #FFFFFF;
    --black: #000000;

    --font-main: Arial, Helvetica, sans-serif;
    --font-headline: 'Arial Black', Gadget, sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--roblox-grey-light);
    color: var(--black);
    margin: 0;
    font-size: 14px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4IiBoZWlnaHQ9IjgiPgo8cmVjdCB3aWR0aD0iOCIgaGVpZ2h0PSI4IiBmaWxsPSIjY2JjYmNiIj48L3JlY3Q+CjxyZWN0IHg9IjMiIHk9IjMiIHdpZHRoPSIyIiBoZWlnaHQ9IjIiIGZpbGw9IiNiZWJlYmUiPjwvcmVjdD4KPC9zdmc+');
}

.container { max-width: 1000px; margin: 0 auto; padding: 0 15px; }
a { color: var(--roblox-red); font-weight: bold; text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Header & Navigasi --- */
.site-header { background: var(--white); padding: 15px 0; text-align: center; border-bottom: 2px solid var(--black); }
.site-logo a { display: inline-block; text-decoration: none; line-height: 0; }
.site-logo img { height: 50px; width: auto; vertical-align: middle; }
.main-nav-container { background: var(--roblox-grey-dark); padding: 8px 0; border-bottom: 2px solid var(--black); }
.main-nav { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 15px; }
.main-nav a { color: var(--white); font-size: 16px; font-weight: bold; }
.search-form { display: flex; }
.search-form input[type="text"] { border: 2px solid var(--black); padding: 4px; font-family: var(--font-main); }
.search-form button { background: var(--roblox-red); color: var(--white); border: 2px solid; border-color: #ff8a8d #8B0000 #8B0000 #ff8a8d; border-style: outset; font-weight: bold; cursor: pointer; padding: 4px 8px; }
.search-form button:active { border-style: inset; }

/* --- Ticker & Sections --- */
.ticker-wrap { background-color: var(--white); padding: 8px 0; border-bottom: 2px solid var(--black); white-space: nowrap; overflow: hidden; }
.ticker-content { display: inline-block; padding-left: 100%; animation: marquee 60s linear infinite; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
.ticker-item { display: inline-flex; align-items: center; margin-right: 30px; }
.ticker-label { background: var(--roblox-red); color: var(--white); padding: 3px 8px; font-weight: bold; font-size: 12px; margin-right: 10px; border: 1px solid var(--black); }
.ticker-item a { font-weight: normal; color: var(--black); }
.section-title { font-family: var(--font-headline); font-size: 24px; background: var(--roblox-grey-medium); color: var(--white); padding: 5px 10px; border: 2px solid var(--black); border-bottom: none; margin: 20px 0 0 0; }
.main-layout .section-title { margin-top: 0; }
.section-content { background: var(--white); border: 2px solid var(--black); padding: 15px; }

/* === FIXED LAYOUT - NO MORE GAP === */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 360px; 
    gap: 20px;
    margin-top: 20px;
    align-items: start;
}
.main-column { 
    min-width: 0; 
}
.sidebar-column { 
    min-width: 0;
    /* Make sidebar column fill available height to prevent gaps */
    min-height: 100%;
}

/* Make sidebar content stretch to fill available height */
.sidebar-column .section-content {
    min-height: 500px; /* Adjust this value as needed */
    display: flex;
    flex-direction: column;
}

/* --- Post Cards --- */
.main-story-card img { max-width: 100%; height: auto; margin-bottom: 10px; border: 2px solid var(--black); }
.main-story-card .post-date { display: block; color: var(--roblox-grey-dark); font-size: 12px; margin-bottom: 8px; }
.main-story-card h1 { font-size: 28px; font-family: var(--font-headline); margin: 0 0 8px 0; }
.main-story-card h1 a { color: var(--black); }
.main-story-card p { margin: 0; line-height: 1.5; }

/* --- Sidebar Post (Berita Terpopuler) --- */
.sidebar-post { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 15px; }
.sidebar-post:last-child { margin-bottom: 0; }
.sidebar-post img { width: 100px; height: 60px; object-fit: cover; border: 1px solid var(--roblox-grey-medium); flex-shrink: 0; }
.sidebar-post div { flex-grow: 1; }
.sidebar-post h3 { font-size: 14px; line-height: 1.35; margin: 0 0 4px 0; font-family: var(--font-main); font-weight: bold; }
.sidebar-post h3 a { color: var(--black); text-decoration: none; }
.sidebar-post h3 a:hover { color: var(--roblox-red); }
.sidebar-post .post-date { font-size: 12px; color: var(--roblox-grey-dark); }

/* ========== FIXED CSS FOR LIVE STREAM SIDEBAR ========== */
.sidebar-live-stream {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid var(--roblox-grey-light);
}

.sidebar-live-title {
    font-family: var(--font-headline);
    font-size: 18px;
    margin: 0 0 12px 0;
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center; /* Center the title */
    text-align: center;
}

.live-indicator-sidebar {
    width: 12px;
    height: 12px;
    background-color: var(--roblox-red);
    border-radius: 50%;
    margin-right: 8px;
    animation: blink 1.5s infinite;
    border: 1px solid var(--black);
    flex-shrink: 0;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.video-container-sidebar {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: #000;
    margin: 0 auto; /* Center the container */
    max-width: 100%;
    border: 2px solid var(--black); /* Add border to match the design */
}

.video-container-sidebar iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none; /* Remove the frameborder styling conflict */
    display: block;
    box-sizing: border-box;
}

/* Additional fix for proper alignment with other sidebar elements */
.sidebar-post:last-child {
    margin-bottom: 15px; /* Add margin before live stream section */
}

/* Ensure the live stream section doesn't interfere with grid layout */
.sidebar-column .section-content {
    display: flex;
    flex-direction: column;
}

.sidebar-live-stream {
    align-self: stretch; /* Make sure it takes full width */
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.video-container-sidebar {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-container-sidebar iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid var(--black);
    display: block;
    box-sizing: border-box;
}

/* --- Grid & Grid Cards (Arsip / Rekomendasi) --- */
.older-posts-grid, .recommendations-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; }
.grid-post-card img { width: 100%; height: 120px; object-fit: cover; border: 1px solid var(--roblox-grey-medium); margin-bottom: 8px; }
.grid-post-card h2 { font-size: 16px; margin: 0 0 5px 0; line-height: 1.3; }
.grid-post-card h2 a { color: var(--black); font-family: var(--font-main); }
.grid-post-card .post-date { font-size: 12px; color: var(--roblox-grey-dark); }

/* --- Full Article Page --- */
.full-article-container { background: var(--white); padding: 20px; border: 2px solid var(--black); }
.full-article-container h1 { font-family: var(--font-headline); font-size: 40px; margin: 0 0 5px 0; }
.full-article-container .post-date { color: var(--roblox-grey-dark); margin-bottom: 20px; display: block; }
.full-article-container .article-category { display: inline-block; background: var(--roblox-red); color: var(--white); padding: 3px 8px; font-weight: bold; font-size: 12px; margin-bottom: 15px; border: 1px solid var(--black); }
.full-article-container img.featured-image { max-width: 100%; height: auto; margin-bottom: 20px; border: 2px solid var(--black); }

.article-body { 
    font-size: 16px; 
    line-height: 1.6;
}

.article-body p {
    margin: 0;
    padding: 0;
}

.article-body img { 
    max-width: 100%; 
    height: auto; 
    display: block; 
    margin: 1em auto;
    border: 2px solid var(--roblox-grey-medium); 
}

.back-link { display: inline-block; margin-top: 30px; background: var(--roblox-red); color: var(--white); padding: 8px 15px; border: 2px solid; border-color: #ff8a8d #8B0000 #8B0000 #ff8a8d; border-style: outset; }
.back-link:active { border-style: inset; }

/* --- About Page Styles --- */
.about-page h1 { text-align: center; margin-bottom: 20px; }
.about-slogan {
    background: var(--roblox-grey-dark);
    color: var(--white);
    padding: 20px 30px;
    margin: 20px 0 40px 0;
    text-align: center;
    font-size: 22px;
    font-family: var(--font-headline);
    border-left: 5px solid var(--roblox-red);
    border-right: 2px solid var(--black);
    border-top: 2px solid var(--black);
    border-bottom: 2px solid var(--black);
    quotes: """ """;
}
.about-slogan::before { content: open-quote; font-size: 1.5em; line-height: 0; vertical-align: -0.25em; margin-right: 5px; }
.about-slogan::after { content: close-quote; font-size: 1.5em; line-height: 0; vertical-align: -0.25em; margin-left: 5px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.about-grid .about-card:last-child { grid-column: 1 / -1; }
.about-card { background: #FFFFFF; border: 2px solid var(--black); padding: 20px; display: flex; flex-direction: column; }
.about-card .card-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; border-bottom: 2px solid var(--roblox-grey-light); padding-bottom: 10px; }
.about-card .card-icon { font-size: 2em; color: var(--roblox-red); line-height: 1; }
.about-card h2 { font-family: var(--font-headline); font-size: 20px; margin: 0; color: var(--black); }
.about-card .card-body p, .about-card .card-body ul { font-size: 14px; line-height: 1.6; margin: 0 0 1em 0; }
.about-card .card-body p:last-child, .about-card .card-body ul:last-child { margin-bottom: 0; }
.about-card .card-body ul { padding-left: 20px; }

/* --- Load More Button (Arsip Berita) --- */
.load-more-container {
    text-align: center;
    margin-top: 20px;
}
#load-more-btn {
    background: var(--roblox-red);
    color: var(--white);
    border: 2px solid;
    border-color: #ff8a8d #8B0000 #8B0000 #ff8a8d;
    border-style: outset;
    font-weight: bold;
    cursor: pointer;
    padding: 8px 20px;
    font-size: 16px;
    font-family: var(--font-main);
}
#load-more-btn:hover {
    filter: brightness(1.1);
}
#load-more-btn:active {
    border-style: inset;
}
#load-more-btn:disabled {
    background: var(--roblox-grey-medium);
    color: var(--roblox-grey-dark);
    border-color: #c0c0c0 #404040 #404040 #c0c0c0;
    cursor: not-allowed;
}

/* --- Footer --- */
.site-footer { text-align: center; background: var(--roblox-grey-dark); color: var(--white); padding: 15px; margin-top: 30px; border-top: 2px solid var(--black); }
.site-footer a { color: var(--roblox-red); }

/* --- Responsive Design --- */
@media (max-width: 800px) {
    .main-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .site-logo img { height: 60px; }
    .main-nav-container { padding: 10px 15px; }
    .full-article-container h1 { font-size: 32px; }
    .about-grid { grid-template-columns: 1fr; }
}