/* =============================================
   Blog Public Styles
   Matches LPU Online University site design
   ============================================= */

/* ===== BLOG HERO ===== */
.blog-hero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 48px 0 40px;
    color: #fff;
}

.blog-hero__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-hero__title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.2;
}

.blog-hero__subtitle {
    font-size: 15px;
    color: #94a3b8;
    max-width: 600px;
    line-height: 1.6;
}

.breadcrumb-nav .breadcrumb {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    gap: 8px;
    font-size: 13px;
}

.breadcrumb-item a {
    color: #94a3b8;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #f58220;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    margin-right: 8px;
    color: #64748b;
}

.breadcrumb-item.active {
    color: #cbd5e1;
}

/* Search */
.blog-search-form {
    display: flex;
    max-width: 420px;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255,255,255,.1);
}

.blog-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 16px;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.blog-search-input::placeholder {
    color: #94a3b8;
}

.blog-search-btn {
    background: #f58220;
    border: none;
    padding: 10px 18px;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
}

/* ===== BLOG SECTION ===== */
.blog-section {
    padding: 48px 0 64px;
    background: #f8fafc;
}

.blog-section__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-grid-wrapper {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    align-items: start;
}

/* ===== BLOG CARDS GRID ===== */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.blog-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

.blog-card__image-link {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #e2e8f0;
}

.blog-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.blog-card:hover .blog-card__image {
    transform: scale(1.05);
}

.blog-card__image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #cbd5e1;
}

.blog-card__body {
    padding: 20px;
}

.blog-card__cats {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.blog-card__cat {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #f58220;
    background: rgba(245,130,32,.08);
    padding: 2px 8px;
    border-radius: 4px;
    text-decoration: none;
}

.blog-card__cat:hover {
    background: rgba(245,130,32,.15);
}

.blog-card__title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #1e293b;
}

.blog-card__title a {
    color: inherit;
    text-decoration: none;
}

.blog-card__title a:hover {
    color: #f58220;
}

.blog-card__excerpt {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 12px;
}

.blog-card__meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #94a3b8;
}

.blog-card__meta i {
    margin-right: 3px;
}

/* ===== SIDEBAR ===== */
.blog-sidebar {
    position: sticky;
    top: 80px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 8px rgba(0,0,0,.06);
    margin-bottom: 24px;
}

.sidebar-widget__title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f58220;
}

.sidebar-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-categories li {
    border-bottom: 1px solid #f1f5f9;
}

.sidebar-categories li:last-child {
    border-bottom: none;
}

.sidebar-categories a {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    color: #475569;
    text-decoration: none;
    transition: color .2s;
}

.sidebar-categories a:hover, .sidebar-categories a.active {
    color: #f58220;
}

.sidebar-categories span {
    color: #94a3b8;
    font-size: 12px;
}

/* ===== PAGINATION ===== */
.blog-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 48px;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: all .2s;
}

.pagination-link:hover, .pagination-link.active {
    background: #f58220;
    color: #fff;
    border-color: #f58220;
}

/* ===== EMPTY STATE ===== */
.blog-empty {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
    color: #94a3b8;
}

.blog-empty i {
    font-size: 64px;
    display: block;
    margin-bottom: 12px;
}

.blog-empty a {
    color: #f58220;
}

/* ===== SINGLE POST ===== */
.post-breadcrumb {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 0;
}

.post-breadcrumb__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.post-breadcrumb .breadcrumb {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
    font-size: 13px;
}

.post-breadcrumb .breadcrumb-item a {
    color: #64748b;
    text-decoration: none;
}

.post-breadcrumb .breadcrumb-item a:hover {
    color: #f58220;
}

.post-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    margin-right: 8px;
    color: #94a3b8;
}

.post-breadcrumb .breadcrumb-item.active {
    color: #94a3b8;
}

/* Post Article */
.post-article {
    padding: 40px 0 64px;
    background: #fff;
}

.post-article__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.post-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 48px;
    align-items: start;
}

/* Post Header */
.post-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.post-category-badge {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #f58220;
    background: rgba(245,130,32,.08);
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none;
}

.post-category-badge:hover {
    background: rgba(245,130,32,.15);
}

.post-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.25;
    color: #1e293b;
    margin-bottom: 16px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    margin-bottom: 28px;
    font-size: 14px;
    color: #64748b;
}

.post-meta__item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-meta__item i {
    font-size: 16px;
}

.post-author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* Feature Image */
.post-feature-image {
    margin: 0 0 32px;
}

.post-feature-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
}

/* Table of Contents (inline) */
.post-toc {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 32px;
    overflow: hidden;
}

.post-toc__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
}

.post-toc__title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-toc__toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
}

.post-toc__list {
    list-style: none;
    padding: 0 20px 16px;
    margin: 0;
    counter-reset: toc-counter;
}

.post-toc__list.collapsed {
    display: none;
}

.post-toc__list li {
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}

.post-toc__list li:last-child {
    border-bottom: none;
}

.post-toc__list a {
    font-size: 14px;
    color: #475569;
    text-decoration: none;
    transition: color .2s;
}

.post-toc__list a:hover {
    color: #f58220;
}

.toc-level-3 a { font-size: 13px; color: #64748b; }
.toc-level-4 a { font-size: 12px; color: #94a3b8; }

/* Post Content */
.post-content {
    font-size: 16px;
    line-height: 1.85;
    color: #334155;
}

.post-content h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    margin-top: 40px;
    margin-bottom: 16px;
    line-height: 1.3;
}

.post-content h3 {
    font-size: 21px;
    font-weight: 700;
    color: #1e293b;
    margin-top: 32px;
    margin-bottom: 12px;
}

.post-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: #334155;
    margin-top: 24px;
    margin-bottom: 8px;
}

.post-content p {
    margin-bottom: 18px;
}

.post-content a {
    color: #f58220;
    text-decoration: underline;
    text-decoration-color: rgba(245,130,32,.3);
    text-underline-offset: 3px;
}

.post-content a:hover {
    text-decoration-color: #f58220;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.post-content ul, .post-content ol {
    margin: 0 0 18px 24px;
    padding: 0;
}

.post-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.post-content table th, .post-content table td {
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    text-align: left;
}

.post-content table th {
    background: #f8fafc;
    font-weight: 600;
    color: #1e293b;
}

.post-content table tr:nth-child(even) td {
    background: #fafbfc;
}

.post-content blockquote {
    border-left: 4px solid #f58220;
    margin: 20px 0;
    padding: 16px 20px;
    background: #fffaf5;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #64748b;
}

/* FAQ Section */
.post-content .faq-section {
    background: #f8fafc;
    padding: 28px;
    border-radius: 12px;
    margin: 32px 0;
    border: 1px solid #e2e8f0;
}

.post-content .faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.post-content .faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.post-content .faq-item h3 {
    margin-top: 0;
    font-size: 17px;
    color: #1e293b;
}

.post-content .faq-item p {
    margin-bottom: 0;
    color: #475569;
}

/* Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 24px 0;
    margin-top: 32px;
    border-top: 1px solid #e2e8f0;
    font-size: 14px;
    color: #64748b;
}

.post-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
}

.post-tag:hover {
    background: rgba(245,130,32,.1);
    color: #f58220;
}

/* Author Box */
.author-box {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px;
    margin-top: 32px;
    border: 1px solid #e2e8f0;
}

.author-box__avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-box__name {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px;
}

.author-box__name a {
    color: inherit;
    text-decoration: none;
}

.author-box__name a:hover {
    color: #f58220;
}

.author-box__bio {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Related Posts */
.related-posts {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid #e2e8f0;
}

.related-posts__title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
}

.related-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-card {
    background: #f8fafc;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    transition: transform .2s;
    border: 1px solid #e2e8f0;
}

.related-card:hover {
    transform: translateY(-3px);
}

.related-card__img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.related-card__body {
    padding: 14px;
}

.related-card__title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    margin: 0 0 6px;
}

.related-card__date {
    font-size: 12px;
    color: #94a3b8;
}

/* Sidebar (desktop TOC) */
.post-sidebar {
    position: relative;
}

.post-sidebar__sticky {
    position: sticky;
    top: 80px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.post-sidebar__title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #64748b;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f58220;
}

.post-sidebar__toc {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-sidebar__toc li {
    padding: 5px 0;
}

.post-sidebar__toc a {
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
    display: block;
    padding: 2px 0;
    border-left: 2px solid transparent;
    padding-left: 10px;
    transition: all .2s;
}

.post-sidebar__toc a:hover, .post-sidebar__toc a.active {
    color: #f58220;
    border-left-color: #f58220;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
    .blog-grid-wrapper {
        grid-template-columns: 1fr;
    }

    .post-layout {
        grid-template-columns: 1fr;
    }

    .post-sidebar {
        display: none;
    }

    .post-title {
        font-size: 28px;
    }

    .related-posts__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 575.98px) {
    .blog-hero__title {
        font-size: 24px;
    }

    .blog-posts-grid {
        grid-template-columns: 1fr;
    }

    .post-title {
        font-size: 24px;
    }

    .post-content {
        font-size: 15px;
    }

    .related-posts__grid {
        grid-template-columns: 1fr;
    }

    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
