@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }

/* --- Container Padding Fix (Touch na ho side mein) --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* Mobile mein 20px gap rahega */
}

/* --- Header --- */
.glass-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
    height: 70px;
    display: flex; align-items: center;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { font-size: 1.4rem; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 8px; }

/* Desktop Menu */
.nav-links { display: none; gap: 25px; align-items: center; }
.nav-link { font-weight: 600; font-size: 0.95rem; color: var(--text-muted); }
.nav-link:hover { color: var(--primary); }

/* Login Button */
.btn-nav { background: var(--text-main); color: white; padding: 8px 20px; border-radius: 50px; font-size: 0.85rem; font-weight: 600; }

/* Mobile Menu Button */
#mobile-menu-btn { background: none; border: none; font-size: 1.4rem; color: var(--text-main); cursor: pointer; }

/* --- Hero Section --- */
.hero { text-align: center; padding: 50px 20px 30px; }
.hero h1 { font-size: 2rem; font-weight: 800; line-height: 1.2; margin-bottom: 10px; }
.hero p { color: var(--text-muted); font-size: 1rem; max-width: 600px; margin: 0 auto; }
.gradient-text { background: linear-gradient(to right, var(--primary), #0ea5e9); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* --- Blog Grid --- */
.grid-posts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    padding-bottom: 60px;
}

/* --- Blog Card Fix --- */
.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); border-color: var(--primary); }

/* IMAGE FIX: Aspect Ratio & Object Fit */
.card-image-wrap {
    width: 100%;
    height: 200px; /* Fixed Height */
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
}
.card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Photo khichigi nahi, crop hogi center se */
    transition: transform 0.5s;
}
.blog-card:hover .card-image-wrap img { transform: scale(1.05); }

/* Content Padding */
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }

/* Meta Tags */
.card-meta { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; margin-bottom: 8px; }
.card-title { font-size: 1.25rem; font-weight: 700; line-height: 1.35; margin-bottom: 10px; color: var(--text-main); }
.card-excerpt { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 20px; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* --- Bottom Section (Admin + Read More) --- */
.card-footer {
    padding-top: 15px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between; /* Alag Alag Kone Mein */
    margin-top: auto;
}

.author-info { display: flex; align-items: center; gap: 8px; }
.author-avatar { width: 24px; height: 24px; background: #e2e8f0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: bold; }
.author-name { font-size: 0.8rem; font-weight: 600; color: var(--text-main); }

/* Read More Button */
.btn-read-more {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    display: flex; align-items: center; gap: 4px;
}
.btn-read-more:hover { text-decoration: underline; gap: 6px; }

/* --- Footer & Pre-Footer --- */
.pre-footer { background: linear-gradient(135deg, #064e3b 0%, #10b981 100%); color: white; padding: 40px 20px; text-align: center; margin-top: 40px; border-radius: 0; }
.pre-footer h2 { font-size: 1.8rem; margin-bottom: 10px; }
.main-footer { background: white; border-top: 1px solid var(--border); padding: 30px 20px; font-size: 0.9rem; text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-top: 15px; flex-wrap: wrap; }

/* --- Media Queries --- */
@media (min-width: 768px) {
    .nav-links { display: flex; }
    #mobile-menu-btn { display: none; }
    .grid-posts { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 3rem; }
}
@media (min-width: 1024px) {
    .grid-posts { grid-template-columns: repeat(3, 1fr); }
}

/* --- Single Post Typography --- */
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #334155;
}

.post-content p { margin-bottom: 1.5rem; }

.post-content h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.post-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.post-content ul, .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 20px;
}

.post-content li { margin-bottom: 0.5rem; }

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.post-content blockquote {
    border-left: 4px solid var(--primary);
    background: #f0fdf4;
    padding: 15px 20px;
    font-style: italic;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}
