/*
Theme Name: Mandiri Pro Theme
Version: 1.6 (Optimized Grid & Pagination)
*/

:root {
    --maroon: #800000;
    --dark-blue: #00008B;
    --sky-blue: #87CEEB;
    --white: #ffffff;
    --black: #000000;
    --gray: #f4f4f4;
    --text-color: #333;
}

/* --- 1. GLOBAL TYPOGRAPHY --- */
body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0; padding: 0;
    background: #eef2f5;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .widget-title { font-weight: bold !important; margin-top: 0; word-wrap: break-word; }
img { max-width: 100%; height: auto; }

/* --- 2. LAYOUT --- */
#page-wrapper { max-width: 1280px; margin: 0 auto; background: var(--white); box-shadow: 0 0 25px rgba(0,0,0,0.1); }
.container { display: flex; gap: 30px; padding: 40px 30px; align-items: flex-start; }

/* --- 3. HEADER & NAV --- */
.top-header { background: var(--maroon); color: var(--white); padding: 8px 20px; text-align: center; font-size: 0.9rem; font-weight: bold; }
.main-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 30px; border-bottom: 4px solid var(--dark-blue); flex-wrap: wrap; gap: 15px; }
.header-cta a { background: var(--dark-blue); color: var(--white); padding: 12px 25px; text-decoration: none; border-radius: 5px; font-weight: bold; transition: 0.3s; }
.nav-container { background: var(--black); position: sticky; top: 0; z-index: 999; }
.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; }
.main-navigation ul li a { display: block; padding: 15px 25px; color: var(--white); text-decoration: none; font-weight: bold; text-transform: uppercase; font-size: 14px; }
.main-navigation ul li a:hover { background: var(--maroon); }
.menu-toggle { display: none; background: var(--maroon); color: white; padding: 15px; cursor: pointer; font-weight: bold; text-align: center; }

/* --- 4. HERO SLIDER --- */
.hero-slider { position: relative; height: 450px; overflow: hidden; background: #000; }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1s ease-in-out; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; }
.slide.active { opacity: 1; z-index: 10; }
.slide-content { background: rgba(0, 0, 0, 0.6); padding: 40px; text-align: center; color: var(--white); max-width: 700px; border-radius: 10px; border: 2px solid var(--sky-blue); position: relative; z-index: 20; }

/* --- 5. OPTIMIZED POST GRID --- */
.content-area { flex: 3; min-width: 0; }
.sidebar-right { flex: 1; background: #f9f9f9; padding: 25px; border: 1px solid #ddd; border-top: 3px solid var(--maroon); }

.post-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.post-card {
    background: var(--white);
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    height: 100%; /* Menyeimbangkan tinggi kotak */
    transition: 0.3s;
    border-radius: 5px;
    overflow: hidden;
}

.post-card:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

.post-card img {
    width: 100%;
    height: 180px; /* Paksa tinggi gambar */
    object-fit: cover; /* Agar gambar tidak gepeng */
    display: block;
}

.post-card h3 { padding: 15px 15px 5px 15px; font-size: 1.1rem; flex-grow: 0; }
.post-card p { padding: 0 15px 15px 15px; font-size: 0.9rem; color: #666; flex-grow: 1; }

/* --- 6. PAGINATION --- */
.gfc-pagination { text-align: center; margin: 40px 0; display: flex; justify-content: center; gap: 8px; }
.gfc-pagination a, .gfc-pagination span { padding: 8px 16px; border: 1px solid var(--dark-blue); background: #fff; color: var(--dark-blue); text-decoration: none; font-weight: bold; border-radius: 4px; }
.gfc-pagination .current { background: var(--dark-blue); color: #fff; }

/* --- 7. FOOTER --- */
.footer-widgets { background: var(--dark-blue); color: var(--white); padding: 50px 30px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.footer-bottom { background: var(--black); color: #ccc; text-align: center; padding: 25px; }

/* --- 8. RESPONSIVE --- */
@media screen and (max-width: 1024px) { .post-grid { grid-template-columns: repeat(2, 1fr); } .footer-widgets { grid-template-columns: repeat(2, 1fr); } }
@media screen and (max-width: 768px) { .container { flex-direction: column; } .menu-toggle { display: block; } .main-navigation ul { display: none; flex-direction: column; background: #222; } .main-navigation ul.toggled { display: flex; } }
@media screen and (max-width: 480px) { .post-grid { grid-template-columns: 1fr; } }