/*
Theme Name: PBN News
Description: SEO-friendly news theme for PBN network
Version: 1.0.0
*/

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1a1a2e;
    background: #f5f5f7;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: #2563eb; text-decoration: none; transition: color 0.2s; }
a:hover { color: #1d4ed8; }

img { max-width: 100%; height: auto; }

/* === Container === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* === Header === */
.site-header { background: #fff; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.site-branding { display: flex; align-items: center; gap: 12px; }
.site-title { font-size: 1.5rem; font-weight: 700; color: #1a1a2e; }
.site-title a { color: inherit; }
.site-title a:hover { color: #2563eb; }
.site-description { font-size: 0.85rem; color: #6b7280; }

/* === Navigation === */
.main-navigation ul { display: flex; list-style: none; gap: 4px; flex-wrap: wrap; }
.main-navigation a { display: block; padding: 8px 16px; color: #374151; font-weight: 500; font-size: 0.95rem; border-radius: 6px; }
.main-navigation a:hover,
.main-navigation .current-menu-item > a { background: #eff6ff; color: #2563eb; }
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: 4px 8px; }

/* === Content Layout === */
.content-area { display: flex; gap: 40px; padding: 40px 0; }
.site-main { flex: 1; min-width: 0; }
.sidebar { width: 320px; flex-shrink: 0; }

/* === Posts Grid === */
.posts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.post-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.06); transition: transform 0.2s, box-shadow 0.2s; }
.post-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.post-card-image img { display: block; width: 100%; height: 200px; object-fit: cover; }
.post-card-body { padding: 20px; }
.post-card-category { font-size: 0.8rem; font-weight: 600; color: #2563eb; text-transform: uppercase; margin-bottom: 8px; }
.post-card-title { font-size: 1.15rem; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.post-card-title a { color: #1a1a2e; }
.post-card-title a:hover { color: #2563eb; }
.post-card-meta { font-size: 0.85rem; color: #9ca3af; display: flex; gap: 12px; }

/* === Single Post === */
.single-post .site-main { background: #fff; border-radius: 12px; padding: 32px; }
.entry-header { margin-bottom: 24px; }
.entry-category { font-weight: 600; color: #2563eb; font-size: 0.9rem; margin-bottom: 8px; }
.entry-title { font-size: 2rem; font-weight: 700; line-height: 1.3; color: #1a1a2e; }
.entry-meta { color: #9ca3af; font-size: 0.9rem; margin-top: 8px; }
.entry-thumbnail { margin: -32px -32px 24px; border-radius: 12px 12px 0 0; overflow: hidden; }
.entry-thumbnail img { width: 100%; max-height: 450px; object-fit: cover; }
.entry-content { font-size: 1.05rem; line-height: 1.8; }
.entry-content h2 { font-size: 1.5rem; font-weight: 700; margin: 32px 0 16px; }
.entry-content h3 { font-size: 1.25rem; font-weight: 600; margin: 24px 0 12px; }
.entry-content p { margin-bottom: 20px; }
.entry-content img { border-radius: 8px; margin: 16px 0; }
.entry-content ul, .entry-content ol { margin: 0 0 20px 20px; }
.entry-content blockquote { border-left: 4px solid #2563eb; padding: 12px 20px; margin: 20px 0; background: #f8fafc; border-radius: 0 8px 8px 0; font-style: italic; }
.entry-footer { margin-top: 32px; padding-top: 20px; border-top: 1px solid #e5e7eb; }

/* === Pagination === */
.pagination { text-align: center; padding: 32px 0; }
.page-numbers { display: inline-block; padding: 8px 16px; margin: 0 4px; border: 1px solid #e5e7eb; border-radius: 6px; color: #374151; font-weight: 500; }
.page-numbers.current { background: #2563eb; color: #fff; border-color: #2563eb; }
.page-numbers:hover:not(.current) { background: #eff6ff; border-color: #bfdbfe; }

/* === Breadcrumbs === */
.breadcrumbs { padding: 12px 0; font-size: 0.9rem; color: #9ca3af; }
.breadcrumbs a { color: #6b7280; }
.breadcrumbs a:hover { color: #2563eb; }
.breadcrumbs .sep { margin: 0 8px; }

/* === Widgets === */
.widget { background: #fff; border-radius: 12px; padding: 24px; margin-bottom: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.widget-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; color: #1a1a2e; }
.widget ul { list-style: none; }
.widget li { padding: 8px 0; border-bottom: 1px solid #f3f4f6; }
.widget li:last-child { border-bottom: none; }
.widget a { color: #4b5563; }
.widget a:hover { color: #2563eb; }

/* === Footer === */
.site-footer { background: #1a1a2e; color: #9ca3af; padding: 48px 0 24px; }
.footer-widgets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 32px; }
.footer-widget-title { color: #fff; font-size: 1.05rem; font-weight: 600; margin-bottom: 16px; }
.footer-widget ul { list-style: none; }
.footer-widget li { padding: 4px 0; }
.footer-widget a { color: #9ca3af; }
.footer-widget a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #374151; padding-top: 20px; text-align: center; font-size: 0.9rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-menu ul { display: flex; list-style: none; gap: 16px; }
.footer-menu a { color: #9ca3af; }

/* === Search === */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] { flex: 1; padding: 10px 14px; border: 1px solid #e5e7eb; border-radius: 8px; font-family: inherit; font-size: 0.95rem; }
.search-form button { padding: 10px 20px; background: #2563eb; color: #fff; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; font-family: inherit; }
.search-form button:hover { background: #1d4ed8; }

/* === Archive / Category Header === */
.archive-header { background: #fff; border-radius: 12px; padding: 24px; margin-bottom: 24px; text-align: center; }
.archive-title { font-size: 1.75rem; font-weight: 700; }
.archive-description { color: #6b7280; margin-top: 8px; }

/* === 404 === */
.error-404 { text-align: center; padding: 80px 20px; }
.error-404 h1 { font-size: 4rem; color: #d1d5db; }
.error-404 p { font-size: 1.2rem; color: #6b7280; margin-bottom: 24px; }

/* === Mobile === */
@media (max-width: 768px) {
    .content-area { flex-direction: column; }
    .sidebar { width: 100%; }
    .posts-grid { grid-template-columns: 1fr; }
    .menu-toggle { display: block; }
    .main-navigation { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid #e5e7eb; }
    .main-navigation.toggled { display: block; }
    .main-navigation ul { flex-direction: column; padding: 8px 0; }
    .footer-widgets { grid-template-columns: 1fr; }
    .entry-title { font-size: 1.5rem; }
}

/* === Print === */
@media print {
    .site-header, .sidebar, .site-footer { display: none; }
    .site-main { width: 100%; }
}
