/* ==========================================================================
   Calcuvo Premium Blog Stylesheet (blog.css)
   ========================================================================== */

/* Blog Page Container spacing */
.blog-section {
    padding-top: 130px !important; /* Spacing below the fixed navbar */
    padding-bottom: 80px !important;
    background-color: #fafbfc;
    min-height: 100vh;
}

/* Page Headers */
.blog-header {
    margin-bottom: 50px;
    text-align: center;
}

.blog-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #365292 0%, #7f96e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}

.blog-header p {
    font-size: 1.05rem;
    color: #607d8b;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Blog Cards Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* Premium Card Design */
.blog-card {
    background: #ffffff;
    border: 1px solid #eef2f5;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(54, 82, 146, 0.08);
    border-color: #dbe3eb;
}

/* Cover Image Container */
.blog-card-image-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background: linear-gradient(135deg, #eef2f7 0%, #dbe3eb 100%);
}

.blog-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover .blog-card-image {
    transform: scale(1.08);
}

/* Badge overlay */
.blog-card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(54, 82, 146, 0.9);
    backdrop-filter: blur(4px);
    color: #ffffff;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Card Body */
.blog-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #90a4ae;
    margin-bottom: 12px;
    font-weight: 500;
}

.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.blog-card-meta i {
    color: #7f96e5;
    font-size: 13px;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
}

.blog-card-title a {
    color: #1e2a3a;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.blog-card-description {
    font-size: 0.92rem;
    color: #546e7a;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read More Button */
.blog-card-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f4f6f8;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #37474f;
}

.blog-card-author i {
    color: #365292;
    background: #eef2fa;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-link {
    font-size: 13px;
    font-weight: 700;
    color: #365292;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.blog-card-link:hover {
    color: #7f96e5;
}

.blog-card-link i {
    transition: transform 0.2s ease;
}

.blog-card-link:hover i {
    transform: translateX(4px);
}

/* ==========================================================================
   Single Blog Details Page
   ========================================================================== */
.blog-details-layout {
    margin-top: 20px;
}

.blog-details-card {
    background: #ffffff;
    border: 1px solid #eef2f5;
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    margin-bottom: 40px;
}

.blog-details-hero {
    position: relative;
    width: 100%;
    height: 450px;
    background: #eef2f7;
    overflow: hidden;
}

@media (max-width: 768px) {
    .blog-details-hero {
        height: 280px;
    }
}

.blog-details-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-details-header {
    padding: 40px 40px 20px 40px;
}

@media (max-width: 576px) {
    .blog-details-header {
        padding: 24px 20px 15px 20px;
    }
}

.blog-details-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.blog-tag-pill {
    background: rgba(54, 82, 146, 0.06);
    color: #365292;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.blog-tag-pill:hover {
    background: #365292;
    color: #ffffff;
    text-decoration: none;
}

.blog-details-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #1e2a3a;
    line-height: 1.3;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .blog-details-title {
        font-size: 1.75rem;
    }
}

.blog-details-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #edf1f5;
    color: #607d8b;
    font-size: 14px;
    font-weight: 500;
}

.blog-details-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-details-meta i {
    color: #365292;
    font-size: 16px;
}

/* Premium Reading Typography */
.blog-details-body {
    padding: 20px 40px 40px 40px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #37474f;
    letter-spacing: 0.1px;
}

@media (max-width: 576px) {
    .blog-details-body {
        padding: 15px 20px 30px 20px;
    }
}

/* HTML parsed elements styles */
.blog-details-body p {
    margin-bottom: 24px;
}

.blog-details-body h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e2a3a;
    margin-top: 40px;
    margin-bottom: 18px;
    line-height: 1.4;
}

.blog-details-body h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e2a3a;
    margin-top: 30px;
    margin-bottom: 14px;
    line-height: 1.4;
}

.blog-details-body blockquote {
    background: #fcfdfe;
    border-left: 4px solid #365292;
    padding: 20px 24px;
    margin: 30px 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #455a64;
}

.blog-details-body blockquote p:last-child {
    margin-bottom: 0;
}

.blog-details-body ul, .blog-details-body ol {
    margin-bottom: 24px;
    padding-left: 20px;
}

.blog-details-body li {
    margin-bottom: 8px;
}

.blog-details-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.blog-details-body pre, .blog-details-body code {
    background: #f4f6fa;
    border-radius: 6px;
    padding: 3px 6px;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9rem;
    color: #c0392b;
}

.blog-details-body pre {
    padding: 16px 20px;
    overflow-x: auto;
    margin: 30px 0;
    color: #37474f;
}

.blog-details-body pre code {
    background: transparent;
    padding: 0;
    font-size: 0.88rem;
    color: inherit;
}

/* ==========================================================================
   Premium Sidebars / Widgets
   ========================================================================== */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.blog-widget {
    background: #ffffff;
    border: 1px solid #eef2f5;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.01);
}

.blog-widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e2a3a;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f4f6f8;
    position: relative;
}

.blog-widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 35px;
    height: 2px;
    background: #365292;
}

/* Author bio widget */
.author-widget-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 10px;
}

.author-widget-avatar {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background: linear-gradient(135deg, #365292 0%, #7f96e5 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(54, 82, 146, 0.2);
}

.author-widget-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e2a3a;
    margin-bottom: 6px;
}

.author-widget-bio {
    font-size: 0.88rem;
    color: #607d8b;
    line-height: 1.5;
}

/* Recent Posts widget */
.recent-post-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recent-post-item {
    display: flex;
    gap: 12px;
    align-items: center;
}

.recent-post-img-wrap {
    width: 65px;
    height: 65px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #eef2f7;
}

.recent-post-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-post-content {
    display: flex;
    flex-direction: column;
}

.recent-post-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-post-title a {
    color: #1e2a3a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.recent-post-title a:hover {
    color: #365292;
}

.recent-post-date {
    font-size: 0.78rem;
    color: #90a4ae;
}

/* Sidebar tags widget */
.sidebar-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sidebar-tag-link {
    background: #f4f6f8;
    color: #455a64;
    font-size: 12.5px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-tag-link:hover {
    background: #365292;
    color: #ffffff;
    text-decoration: none;
}

/* ==========================================================================
   Pagination Styling
   ========================================================================== */
.blog-pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.blog-pagination .pagination {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
}

.blog-pagination .page-item .page-link {
    background: #ffffff;
    border: 1px solid #eef2f5;
    color: #455a64;
    padding: 10px 16px;
    font-size: 14.5px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.blog-pagination .page-item.active .page-link {
    background: #365292;
    border-color: #365292;
    color: #ffffff;
}

.blog-pagination .page-item.disabled .page-link {
    background: #fafbfc;
    color: #b0bec5;
    cursor: not-allowed;
    border-color: #eef2f5;
}

.blog-pagination .page-item .page-link:hover:not(.disabled) {
    background: rgba(54, 82, 146, 0.06);
    color: #365292;
}

.blog-pagination .page-item.active .page-link:hover {
    background: #365292;
    color: #ffffff;
}
