/* assets/css/style.css - Mobile Friendly - Janabichar */

:root {
    --primary: #111827;
    --accent: #2563eb;
    --bg: #f9fafb;
    --text: #374151;
    --border: #e5e7eb;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { text-decoration: none; color: var(--accent); }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.logo { font-size: 24px; font-weight: 700; color: var(--primary); letter-spacing: -0.5px; }
.logo a { color: var(--primary); text-decoration: none; }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { color: var(--text); font-weight: 500; font-size: 15px; }

/* Main Container */
.container { max-width: 1100px; margin: 40px auto; padding: 0 20px; }

/* Article Cards (Homepage) */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.card-img { width: 100%; height: 200px; object-fit: cover; display: block; }
.card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.card-category { color: var(--accent); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.card-title { font-size: 20px; font-weight: 700; color: var(--primary); margin-bottom: 10px; line-height: 1.3; }
.card-title a { color: var(--primary); }
.card-meta { font-size: 13px; color: #6b7280; margin-top: 15px; }

/* Single Article */
.single-article { max-width: 750px; margin: 0 auto; background: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.article-header { margin-bottom: 30px; }
.article-header h1 { font-size: clamp(26px, 6vw, 36px); color: var(--primary); line-height: 1.2; margin-bottom: 15px; }
.article-content { font-size: 18px; line-height: 1.8; color: #1f2937; overflow-wrap: break-word; }
.article-content p { margin-bottom: 16px; }
.article-content h2 { font-size: 24px; line-height: 1.3; margin: 28px 0 12px; color: var(--primary); }
.article-content h3 { font-size: 20px; line-height: 1.4; margin: 24px 0 10px; color: var(--primary); }
.article-content ul, .article-content ol { margin: 0 0 16px 20px; }
.article-content li { margin-bottom: 8px; }
.article-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 20px 0; display: block; }
.article-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0; }
.article-content td, .article-content th { border: 1px solid var(--border); padding: 10px; text-align: left; font-size: 15px; }
.article-content blockquote { border-left: 3px solid var(--accent); padding-left: 16px; margin: 16px 0; color: #4b5563; }

/* Forms - Comment + Contact */
input[type="text"], input[type="email"], textarea { width: 100%; max-width: 100%; font-size: 16px; font-family: inherit; }
button { font-family: inherit; }

/* Footer */
.site-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 40px 20px;
    margin-top: 60px;
    text-align: center;
}
.footer-links { margin-bottom: 20px; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text); font-size: 14px; }
.copyright { color: #9ca3af; font-size: 13px; }

/* Tablet */
@media (max-width: 900px) {
    .grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .container { margin: 28px auto; }
}

/* Mobile - FIXED: header stays row, nav is handled by header.php */
/* Mobile */
@media (max-width: 768px) {
    .container { margin: 12px auto !important; padding: 0 12px; }
    .site-header { padding: 0; }
    .header-container { flex-direction: row !important; flex-wrap: nowrap !important; gap: 8px; padding: 10px 12px; }
    .logo { font-size: 18px; }
    .grid { grid-template-columns: 1fr; gap: 14px; }
    .card-img { height: auto; aspect-ratio: 16 / 9; }
    .single-article { padding: 20px 16px; border-radius: 8px; box-shadow: none; }
    .article-content { font-size: 17px; line-height: 1.7; }
    .article-content h2 { font-size: 21px; }
    .article-content h3 { font-size: 18px; }
    section { margin-top: 20px !important; }
}

/* Very small phones */
@media (max-width: 480px) {
    .container { padding: 0 10px; }
    .single-article { padding: 16px 12px; }
    .card-body { padding: 16px; }
    .card-title { font-size: 18px; }
}