/* Basic Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background-color: #eaeaea; 
    padding: 20px;
    padding-bottom: 80px; 
    padding-top: 100px; /* Clears the header */
}

/* --- Floating Header Styling --- */
.main-header {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%;
    background-color: #760000;     
    box-shadow: 0 2px 10px rgba(0,0,0,0.5); 
    z-index: 1000; 
    display: flex;
    justify-content: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1100px; 
    padding: 10px 20px;
}

.header-logo img {
    height: 50px; 
    width: auto;
    display: block;
}

/* Navigation Menu */
.main-nav {
    display: flex;
    align-items: center;
    gap: 25px; 
}

.main-nav a {
    text-decoration: none;
    color: #e5e5e5; 
    font-weight: 600;
    font-size: 0.95rem; 
    transition: color 0.2s; 
    text-shadow: 1px 1px 2px #000;
}

.main-nav a:hover {
    color: #ff9999; 
}

.main-nav .header-btn {
    background-color: #d40000; 
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);    
}

.main-nav .header-btn:hover {
    background-color: #990000;  
}

/* Hamburger Icon */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
}

/* --- Grid Layout Wrapper --- */
.layout-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Main content takes 2/3, Sidebar takes 1/3 */
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

/* Main Left Column */
.main-content {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding-bottom: 30px; 
}

/* Banner Styling */
.banner-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article Styling */
.seo-text {
    text-align: center;
    padding: 20px 15px;
}
.seo-text h1 { font-size: 1.5rem; color: #333; }
.seo-text p { font-size: 0.9rem; color: #666; margin-top: 5px; }

article {
    padding: 0 25px 25px 25px;
    line-height: 1.6;
    color: #444;
}
article h1 { font-size: 1.3rem; color: #222; margin-bottom: 15px; }
article h2 { font-size: 1.1rem; color: #222; margin-top: 25px; margin-bottom: 10px; }
article p, article ul { margin-bottom: 15px; font-size: 0.95rem; }
article ul { margin-left: 20px; }
article hr { border: 0; height: 1px; background: #eaeaea; margin: 30px 0; }

/* The Grid System for Links */
.link-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px;
    padding: 0 25px;
}
.grid-item {
    background-color: #1b1f24;   
    color: white;
    text-decoration: none;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}
.grid-item:hover { transform: scale(1.02); }
.item-thumb { width: 100%; height: 80px; object-fit: cover; }
.item-text { padding: 10px; position: relative; }
.item-text h3 { font-size: 0.9rem; margin-bottom: 4px; }
.item-text p { font-size: 0.75rem; color: #aaa; }
.badge {
    position: absolute; top: -25px; left: 5px;
    background-color: #ff9800; color: #fff; font-size: 0.6rem;
    padding: 2px 6px; border-radius: 3px; font-weight: bold;
}


/* --- Sidebar Styling --- */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Pengumuman Widget (Dark Theme) */
.dark-widget {
    background-color: #111114;
    padding: 20px;
    color: white;
}
.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.widget-header h2 { font-size: 1.2rem; }
.widget-header a { color: #aaa; text-decoration: none; font-size: 0.9rem; }
.widget-header a:hover { color: white; }

.announcement-item {
    display: flex;
    background-color: #2a2a35;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    text-decoration: none;
    color: white;
    align-items: center;
    gap: 15px;
    transition: background-color 0.2s; 
}
.announcement-item:hover { background-color: #2a2a2a; }
.announcement-item img {
    width: 120px; height: 50px; border-radius: 6px; object-fit: cover;
}
.announcement-text h4 { font-size: 0.9rem; margin-bottom: 5px; }
.announcement-text span { font-size: 0.75rem; color: #aaa; }

/* Featured Posts Widget (Light Theme) */
.light-widget {
    background-color: white;
    padding: 20px;
}
.widget-title-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}
.widget-title-line h2 { font-size: 1.1rem; color: #333; white-space: nowrap; }
.widget-title-line .line { flex-grow: 1; height: 2px; background-color: #28a745; }

.featured-item {
    display: block;
    position: relative;
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    text-decoration: none;
    color: white;
}
.featured-item .overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.1) 100%);
}
.featured-item h3 {
    position: absolute; bottom: 15px; left: 15px; right: 15px;
    font-size: 1rem; z-index: 2; text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}
.feat-badge {
    position: absolute; top: 15px; left: 15px;
    color: white; font-size: 0.7rem; font-weight: bold;
    padding: 4px 8px; border-radius: 4px; z-index: 2; text-transform: uppercase;
}


/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    /* Stack layout to 1 column on mobile */
    .layout-wrapper {
        grid-template-columns: 1fr;
    }
    
    .link-grid {
        grid-template-columns: 1fr; /* Makes links stack 1 by 1 on very small screens */
    }

    /* Hamburger Menu Logic */
    .hamburger { display: block; }
    
    .main-nav {
        display: none; /* Hidden by default on mobile */
        flex-direction: column;
        position: absolute;
        top: 70px; /* Sits right below the header */
        left: 0;
        width: 100%;
        background-color: #760000;
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.5);
        align-items: flex-start;
    }
    
    .main-nav.active {
        display: flex; /* Shown when hamburger is clicked */
    }
    
    .main-nav a:not(.header-btn) { display: block; }
    .header-content { padding: 10px 15px; }
}

/* Floating Elements */
.floating {
    background-color: rgba(33, 34, 35, 0.95); 
    border-top: 1px solid #07111e;
    position: fixed; bottom: 0; left: 0; right: 0; width: 100%;
    padding: 10px 20px; z-index: 999;
}
.cta-daftar {
    padding: 12px; color: #fff; font-size: 16px; font-weight: 700;
    text-align: center; text-decoration: none; text-transform: uppercase;
    border: 1px solid #ff4d4d; border-radius: 50px;
    background: linear-gradient(to bottom, #C82909 0, #901d06 100%);
    display: block; max-width: 600px; margin: 0 auto;
}
.btn-blink { animation: 1.5s infinite pulse; }
@keyframes pulse {
    0%, 100% { transform: scale(0.98); background: linear-gradient(to bottom, #901d06 0, #5a1204 100%); }
    50% { transform: scale(1); background: linear-gradient(to bottom, #C82909 0, #a82207 100%); }
}