/* --- Variables & Reset --- */
:root {
    --primary: #3498db; /* Blue color like WP */
    --secondary: #2c3e50; /* Dark Blue */
    --light: #f4f6f9;
    --white: #ffffff;
    --dark: #333;
    --border: #e1e4e8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; background: var(--light); color: var(--dark); line-height: 1.6; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* --- Header --- */
.main-header { background: var(--white); border-bottom: 1px solid var(--border); padding: 15px 0; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.main-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo a { font-size: 24px; font-weight: bold; color: var(--secondary); }
.nav-menu ul { display: flex; gap: 20px; }
.nav-menu a { font-weight: 500; color: var(--secondary); }
.nav-menu a:hover { color: var(--primary); }

/* Buttons */
.btn { padding: 8px 15px; border-radius: 4px; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-block; }
.btn-primary { background: var(--primary); color: white; }
.btn-login { color: var(--secondary); border: 1px solid var(--secondary); margin-right: 10px; }
.btn-register { background: var(--secondary); color: white; }

/* --- Ad Spaces --- */
.ad-container { margin: 20px auto; padding: 10px; text-align: center; background: #fff; border: 1px dashed #ccc; max-width: 728px; }

/* --- Post Grid (Codelist Style) --- */
.section-title { margin-bottom: 20px; font-size: 22px; border-left: 5px solid var(--primary); padding-left: 10px; }
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-bottom: 40px; }

.post-card { background: var(--white); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: transform 0.2s; border: 1px solid var(--border); }
.post-card:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.15); }

.post-thumb { height: 160px; overflow: hidden; position: relative; background: #eee; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-badge { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.7); color: #fff; padding: 3px 8px; font-size: 11px; border-radius: 3px; text-transform: uppercase; }

.post-content { padding: 15px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 10px; line-height: 1.4; height: 44px; overflow: hidden; }
.post-meta { display: flex; justify-content: space-between; font-size: 12px; color: #888; margin-bottom: 15px; }
.btn-download { display: block; width: 100%; text-align: center; background: var(--light); color: var(--primary); border: 1px solid var(--border); padding: 8px; border-radius: 4px; font-weight: 600; }
.btn-download:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* --- Footer --- */
.main-footer { background: var(--secondary); color: #ccc; padding: 40px 0 20px; margin-top: 50px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; margin-bottom: 30px; }
.footer-col h3 { color: white; margin-bottom: 15px; }
.footer-col ul li { margin-bottom: 8px; }
.copyright { text-align: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; font-size: 14px; }

/* Mobile */
@media (max-width: 768px) {
    .main-header .container { flex-direction: column; gap: 15px; }
    .nav-menu ul { gap: 10px; font-size: 14px; }
}