/* ============================================================
   EPA Blog Stylesheet — blog/blog.css
   Matches the main site design system
   ============================================================ */

:root {
    --primary: #f26d21;
    --primary-rgb: 242, 109, 33;
    --primary-dark: #e05e1a;
    --accent: #f26d21;
    --secondary: #f26d21;
    --blog-dark:       #0f172a;
    --blog-text:       #1e293b;
    --blog-muted:      #64748b;
    --blog-border:     #e2e8f0;
    --blog-bg:         #f8fafc;
    --blog-white:      #ffffff;
    --blog-card-bg:    #ffffff;
    --blog-radius:     16px;
    --blog-radius-sm:  8px;
    --blog-shadow:     0 4px 24px rgba(15,23,42,0.08);
    --blog-shadow-lg:  0 12px 40px rgba(15,23,42,0.14);
    --blog-transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    --blog-font:       'Plus Jakarta Sans', sans-serif;
}

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

body {
    font-family: var(--blog-font);
    color: var(--blog-text);
    background: var(--blog-bg);
    line-height: 1.6;
}

/* ── UTILITY ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.badge-cuet    { background: #dbeafe; color: #1d4ed8; }
.badge-ipmat   { background: #ede9fe; color: #6d28d9; }
.badge-clat    { background: #dcfce7; color: #15803d; }
.badge-general { background: #fef9c3; color: #a16207; }
.badge-cbse    { background: #ffe4e6; color: #be123c; }
.btn-primary {
    background: var(--primary);
    color: var(--blog-white);
    padding: 12px 28px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--blog-transition);
    border: none;
    cursor: pointer;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-ghost {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 10px 24px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--blog-transition);
    cursor: pointer;
}
.btn-ghost:hover { background: var(--primary); color: var(--blog-white); }

/* ── HEADER ── */
.blog-header {
    background: var(--blog-white);
    border-bottom: 1px solid var(--blog-border);
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(10px);
}
.blog-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 16px;
}
.blog-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.blog-logo img { height: 36px; }
.blog-logo span { display: none; }
.blog-nav { display: flex; align-items: center; gap: 24px; }
.blog-nav a { text-decoration: none; color: var(--blog-muted); font-weight: 500; font-size: 14px; transition: var(--blog-transition); }
.blog-nav a:hover, .blog-nav a.active { color: var(--primary); }

/* ── HERO (listing page) ── */
.blog-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #334155 100%);
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}
.blog-hero::before {
    content: '';
    position: absolute;
    top: -40%; left: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(242,109,33,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.blog-hero-content { position: relative; z-index: 1; text-align: center; }
.blog-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 16px;
}
.blog-hero h1 span { color: var(--primary); }
.blog-hero p { font-size: 18px; color: rgba(255,255,255,0.7); max-width: 560px; margin: 0 auto 32px; }

/* Search */
.blog-search-wrap {
    max-width: 540px;
    margin: 0 auto;
    position: relative;
}
.blog-search-wrap input {
    width: 100%;
    padding: 16px 56px 16px 20px;
    border-radius: 100px;
    border: none;
    font-size: 15px;
    font-family: var(--blog-font);
    outline: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.blog-search-wrap button {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    background: var(--primary);
    border: none; border-radius: 100px;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    color: white; cursor: pointer; font-size: 16px;
    transition: var(--blog-transition);
}
.blog-search-wrap button:hover { background: var(--primary-dark); }

/* ── FILTERS ── */
.blog-filters-wrap {
    background: var(--blog-white);
    border-bottom: 1px solid var(--blog-border);
}
.blog-filters {
    display: flex;
    gap: 8px;
    padding: 20px 0;
    overflow-x: auto;
    scrollbar-width: none;
    align-items: center;
    flex-wrap: wrap;
}
.filter-pill {
    padding: 8px 20px;
    border-radius: 100px;
    border: 2px solid var(--blog-border);
    background: transparent;
    color: var(--blog-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--blog-transition);
    white-space: nowrap;
    font-family: var(--blog-font);
}
.filter-pill:hover { border-color: var(--primary); color: var(--primary); }
.filter-pill.active { background: var(--primary); border-color: var(--primary); color: white; }

/* ── MAIN LAYOUT ── */
.blog-main { padding: 60px 0 80px; }

/* ── FEATURED POST ── */
.featured-post {
    background: var(--blog-white);
    border-radius: var(--blog-radius);
    overflow: hidden;
    box-shadow: var(--blog-shadow);
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 60px;
    transition: var(--blog-transition);
}
.featured-post:hover { box-shadow: var(--blog-shadow-lg); }
.featured-post__img { position: relative; min-height: 320px; overflow: hidden; }
.featured-post__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.featured-post:hover .featured-post__img img { transform: scale(1.05); }
.featured-label {
    position: absolute; top: 16px; left: 16px;
    background: var(--primary);
    color: white; font-size: 11px; font-weight: 700;
    padding: 4px 12px; border-radius: 100px; letter-spacing: 1px;
    text-transform: uppercase;
}
.featured-post__body {
    padding: 48px 40px;
    display: flex; flex-direction: column; justify-content: center;
}
.featured-post__meta { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.featured-post__date { font-size: 13px; color: var(--blog-muted); }
.featured-post h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; line-height: 1.25; margin-bottom: 14px; color: var(--blog-dark); }
.featured-post p { color: var(--blog-muted); font-size: 15px; line-height: 1.7; margin-bottom: 28px; }

/* ── BLOG GRID ── */
.blog-section-title {
    font-size: 22px; font-weight: 700; color: var(--blog-dark);
    margin-bottom: 28px;
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    margin-bottom: 48px;
}
.blog-card {
    background: var(--blog-card-bg);
    border-radius: var(--blog-radius);
    overflow: hidden;
    box-shadow: var(--blog-shadow);
    transition: var(--blog-transition);
    display: flex; flex-direction: column;
    text-decoration: none; color: inherit;
    border: 1px solid var(--blog-border);
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--blog-shadow-lg); border-color: var(--primary); }
.blog-card__img { position: relative; height: 200px; overflow: hidden; }
.blog-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.blog-card:hover .blog-card__img img { transform: scale(1.07); }
.blog-card__img-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #f26d21, #ff8c42);
    display: flex; align-items: center; justify-content: center;
    font-size: 48px; color: rgba(255,255,255,0.6);
}
.blog-card__body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.blog-card__meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.blog-card__date { font-size: 12px; color: var(--blog-muted); }
.blog-card h3 { font-size: 17px; font-weight: 700; line-height: 1.4; color: var(--blog-dark); margin-bottom: 10px; }
.blog-card p { font-size: 14px; color: var(--blog-muted); line-height: 1.6; flex: 1; }
.blog-card__footer { padding: 0 24px 20px; display: flex; align-items: center; justify-content: space-between; }
.read-more { font-size: 13px; font-weight: 600; color: var(--primary); text-decoration: none; display: flex; align-items: center; gap: 6px; transition: var(--blog-transition); }
.read-more:hover { gap: 10px; color: var(--primary-dark); }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 80px 24px; color: var(--blog-muted); }
.empty-state i { font-size: 64px; margin-bottom: 16px; display: block; opacity: 0.3; }
.empty-state h3 { font-size: 20px; color: var(--blog-dark); margin-bottom: 8px; }

/* ── PAGINATION ── */
.pagination { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.page-btn {
    width: 40px; height: 40px;
    border-radius: 50%; border: 2px solid var(--blog-border);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600;
    text-decoration: none; color: var(--blog-muted);
    transition: var(--blog-transition);
    background: white;
    cursor: pointer;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.page-btn.wide { width: auto; padding: 0 16px; border-radius: 100px; }

/* ── SINGLE POST ── */
.post-hero {
    position: relative;
    background: var(--blog-dark);
    overflow: hidden;
    min-height: 440px;
    display: flex; align-items: flex-end;
}
.post-hero__bg { position: absolute; inset: 0; }
.post-hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.35; }
.post-hero__gradient {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,0.98) 20%, rgba(15,23,42,0.4) 100%);
}
.post-hero__content {
    position: relative; z-index: 2;
    padding: 60px 0 48px;
    width: 100%;
}
.post-hero__content .container { max-width: 900px; }
.post-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; }
.post-breadcrumb a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 13px; }
.post-breadcrumb a:hover { color: white; }
.post-breadcrumb span { color: rgba(255,255,255,0.4); font-size: 13px; }
.post-hero__title { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 800; color: white; line-height: 1.2; margin: 14px 0 20px; }
.post-meta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.post-meta-item { display: flex; align-items: center; gap: 6px; font-size: 14px; color: rgba(255,255,255,0.65); }
.post-meta-item i { font-size: 15px; }

/* ── POST BODY ── */
.post-content-wrap { max-width: 900px; margin: 0 auto; padding: 56px 24px 80px; }
.post-content {
    font-size: 17px;
    line-height: 1.85;
    color: var(--blog-text);
}
.post-content h2 { font-size: 1.6rem; font-weight: 700; margin: 2.5em 0 0.8em; color: var(--blog-dark); }
.post-content h3 { font-size: 1.25rem; font-weight: 700; margin: 2em 0 0.6em; color: var(--blog-dark); }
.post-content p { margin-bottom: 1.5em; }
.post-content ul, .post-content ol { padding-left: 24px; margin-bottom: 1.5em; }
.post-content li { margin-bottom: 8px; }
.post-content a { color: var(--primary); text-decoration: underline; }
.post-content img { width: 100%; border-radius: var(--blog-radius); margin: 2em 0; box-shadow: var(--blog-shadow); }
.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 16px 24px;
    background: #f1f5f9;
    border-radius: 0 var(--blog-radius-sm) var(--blog-radius-sm) 0;
    margin: 2em 0;
    font-style: italic;
    color: var(--blog-muted);
}
.post-content pre {
    background: var(--blog-dark); color: #e2e8f0;
    padding: 24px; border-radius: var(--blog-radius-sm);
    overflow-x: auto; margin: 2em 0; font-size: 14px; line-height: 1.6;
}

/* ── SHARE ── */
.share-section { border-top: 1px solid var(--blog-border); padding-top: 32px; margin-top: 48px; }
.share-section h4 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.share-links { display: flex; gap: 12px; flex-wrap: wrap; }
.share-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border-radius: 100px;
    font-size: 13px; font-weight: 600;
    text-decoration: none; transition: var(--blog-transition);
}
.share-fb  { background: #1877f2; color: white; }
.share-wa  { background: #25d366; color: white; }
.share-li  { background: #0a66c2; color: white; }
.share-tw  { background: #111827; color: white; }
.share-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }

/* ── RELATED POSTS ── */
.related-posts {
    background: var(--blog-bg);
    padding: 64px 0;
    border-top: 1px solid var(--blog-border);
    margin-top: 32px;
}
.related-posts h2 { font-size: 24px; font-weight: 800; color: var(--blog-dark); margin-bottom: 32px; }

/* ── FOOTER ── */
.blog-footer {
    background: var(--blog-dark);
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 24px;
    font-size: 14px;
}
.blog-footer a { color: var(--primary); text-decoration: none; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .featured-post { grid-template-columns: 1fr; }
    .featured-post__img { min-height: 220px; }
    .featured-post__body { padding: 28px 24px; }
    .blog-grid { grid-template-columns: 1fr; }
    .blog-nav { display: none; }
    .post-hero__content .container { padding: 0 20px; }
}
@media (max-width: 480px) {
    .blog-hero { padding: 60px 0 80px; }
    .blog-main { padding: 40px 0 60px; }
    .post-content-wrap { padding: 40px 20px 60px; }
}
