/* =============================================
   MediGuideBD Blog Styles
   ============================================= */

/* --- Blog Page Hero --- */
.blog-hero {
    background: linear-gradient(135deg, #0891b2 0%, #164e63 100%);
    padding: 60px 0 40px;
    color: #fff;
    margin-bottom: 40px;
}

.blog-hero h1 {
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.blog-hero .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.blog-hero .breadcrumb-item a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.blog-hero .breadcrumb-item.active {
    color: rgba(255,255,255,0.6);
}

.blog-hero .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.5);
}

/* --- Blog Card --- */
.blog-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.blog-card .card-img-top {
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .card-img-top {
    transform: scale(1.05);
}

.blog-card .card-img-wrapper {
    overflow: hidden;
    position: relative;
}

.blog-card .card-img-wrapper .category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

.blog-card .card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card .card-title {
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.4;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.blog-card .card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card .card-title a:hover {
    color: #0891b2;
}

.blog-card .card-text {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.6;
    flex-grow: 1;
}

.blog-card .card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 15px;
    margin-top: auto;
    border-top: 1px solid #f1f5f9;
    font-size: 0.82rem;
    color: #9ca3af;
}

.blog-card .card-meta i {
    margin-right: 4px;
}

.blog-card .read-more-link {
    color: #0891b2;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s;
}

.blog-card .read-more-link:hover {
    gap: 10px;
}

/* --- Blog Sidebar --- */
.blog-sidebar .sidebar-widget {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}

.blog-sidebar .widget-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1a1a2e;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #0891b2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-sidebar .category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-sidebar .category-list li {
    margin-bottom: 0;
}

.blog-sidebar .category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.92rem;
}

.blog-sidebar .category-list li a:hover,
.blog-sidebar .category-list li a.active {
    background: #ecfeff;
    color: #0891b2;
}

.blog-sidebar .category-list li a .count {
    background: #f1f5f9;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.blog-sidebar .tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.blog-sidebar .tag-cloud a {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #374151;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
}

.blog-sidebar .tag-cloud a:hover {
    background: #0891b2;
    color: #fff;
}

/* --- Blog Search --- */
.blog-search-form .input-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.blog-search-form .form-control {
    border: none;
    padding: 12px 16px;
    font-size: 0.95rem;
}

.blog-search-form .form-control:focus {
    box-shadow: none;
}

.blog-search-form .btn {
    border: none;
    padding: 12px 20px;
    background: #0891b2;
    color: #fff;
}

.blog-search-form .btn:hover {
    background: #0e7490;
}

/* --- Single Post --- */
.blog-single-hero {
    background: linear-gradient(135deg, #0891b2 0%, #164e63 100%);
    padding: 60px 0 50px;
    color: #fff;
}

.blog-single-hero .post-category {
    display: inline-block;
    padding: 4px 16px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 15px;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s;
}

.blog-single-hero .post-category:hover {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

.blog-single-hero h1 {
    font-weight: 700;
    font-size: 2.2rem;
    line-height: 1.3;
    margin-bottom: 20px;
}

.blog-single-hero .post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
}

.blog-single-hero .post-meta img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.5);
}

.blog-single-content {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    margin-top: -30px;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.blog-single-content .featured-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 30px;
}

.blog-single-content .post-body {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #374151;
}

.blog-single-content .post-body h1,
.blog-single-content .post-body h2,
.blog-single-content .post-body h3,
.blog-single-content .post-body h4 {
    color: #1a1a2e;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.blog-single-content .post-body h2 { font-size: 1.6rem; }
.blog-single-content .post-body h3 { font-size: 1.3rem; }

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

.blog-single-content .post-body blockquote {
    border-left: 4px solid #0891b2;
    padding: 16px 24px;
    margin: 24px 0;
    background: #f0fdfa;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #374151;
}

.blog-single-content .post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
}

.blog-single-content .post-body table th,
.blog-single-content .post-body table td {
    border: 1px solid #e5e7eb;
    padding: 10px 15px;
}

.blog-single-content .post-body table th {
    background: #f8fafc;
    font-weight: 600;
}

.blog-single-content .post-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 20px 0;
}

.blog-single-content .post-body a {
    color: #0891b2;
    text-decoration: underline;
}

.blog-single-content .post-body ul, .blog-single-content .post-body ol {
    margin-bottom: 15px;
    padding-left: 25px;
}

.blog-single-content .post-body li {
    margin-bottom: 8px;
}

/* --- Post Tags & Share --- */
.post-tags-share {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 24px;
    margin-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.post-tags .tag-label {
    font-weight: 600;
    color: #374151;
    margin-right: 8px;
}

.post-tags a {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #374151;
    font-size: 0.85rem;
    text-decoration: none;
    margin: 2px;
    transition: all 0.2s;
}

.post-tags a:hover {
    background: #0891b2;
    color: #fff;
}

.social-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    margin-left: 6px;
    transition: transform 0.2s, opacity 0.2s;
    font-size: 0.95rem;
}

.social-share a:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.social-share .share-fb { background: #1877f2; }
.social-share .share-tw { background: #1da1f2; }
.social-share .share-linkedin { background: #0a66c2; }
.social-share .share-whatsapp { background: #25d366; }

/* --- Post Navigation --- */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
}

.post-navigation .nav-link-box {
    flex: 1;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    text-decoration: none;
    color: #374151;
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-navigation .nav-link-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    color: #0891b2;
}

.post-navigation .nav-link-box .nav-direction {
    font-size: 0.8rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.post-navigation .nav-link-box .nav-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.post-navigation .nav-link-box.next-post {
    text-align: right;
}

/* --- Related Posts --- */
.related-posts {
    margin-top: 40px;
}

.related-posts .section-title {
    font-weight: 700;
    font-size: 1.4rem;
    color: #1a1a2e;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-posts .section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, #0891b2, transparent);
}

/* --- Featured Post Card --- */
.featured-post-card {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    height: 320px;
    display: block;
    text-decoration: none;
    color: #fff;
}

.featured-post-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-post-card:hover img {
    transform: scale(1.08);
}

.featured-post-card .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #fff;
}

.featured-post-card .overlay .category-badge {
    font-size: 0.75rem;
    padding: 3px 12px;
    border-radius: 20px;
    background: #0891b2;
    display: inline-block;
    margin-bottom: 8px;
}

.featured-post-card .overlay h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
}

.featured-post-card .overlay .meta {
    font-size: 0.8rem;
    opacity: 0.8;
}

.featured-post-card:hover {
    color: #fff;
    text-decoration: none;
}

/* --- Blog Pagination --- */
.blog-pagination .pagination {
    gap: 5px;
}

.blog-pagination .page-item .page-link {
    border-radius: 10px;
    border: none;
    color: #374151;
    padding: 8px 16px;
    background: #f1f5f9;
    transition: all 0.2s;
}

.blog-pagination .page-item.active .page-link {
    background: #0891b2;
    color: #fff;
}

.blog-pagination .page-item .page-link:hover {
    background: #0891b2;
    color: #fff;
}

/* --- No Image Placeholder --- */
.no-image-placeholder {
    height: 220px;
    background: linear-gradient(135deg, #e0f2fe, #ecfeff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0891b2;
    font-size: 3rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .blog-hero h1 { font-size: 1.6rem; }
    .blog-single-hero h1 { font-size: 1.6rem; }
    .blog-single-content { padding: 24px 16px; margin-top: -20px; }
    .blog-card .card-img-top { height: 180px; }
    .post-navigation { flex-direction: column; }
    .post-tags-share { flex-direction: column; }
    .featured-post-card { height: 250px; }
    .blog-single-hero .post-meta { gap: 12px; font-size: 0.82rem; }
}
