/* ==========================================================================
   N Griffin - Dynamic Blog Stylesheet
   ========================================================================== */

:root {
    --ng-primary: #0d367c;
    --ng-primary-dark: #072353;
    --ng-primary-light: #164ba3;
    --ng-accent: #feca45;
    --ng-accent-hover: #ffb81c;
    --ng-green: #3e8b27;
    --ng-text-main: #1f2937;
    --ng-text-muted: #6b7280;
    --ng-bg-light: #f8fafc;
    --ng-border: #e5e7eb;
    --ng-card-shadow: 0 4px 20px rgba(13, 54, 124, 0.08);
    --ng-card-shadow-hover: 0 12px 32px rgba(13, 54, 124, 0.16);
    --ng-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   Blog Masthead & Hero
   -------------------------------------------------------------------------- */
.blog-hero {
    background: linear-gradient(135deg, #072353 0%, #0d367c 50%, #164ba3 100%);
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.blog-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(254, 202, 69, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.blog-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(254, 202, 69, 0.2);
    color: var(--ng-accent);
    border: 1px solid rgba(254, 202, 69, 0.4);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.blog-hero__title {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.25;
    color: #ffffff;
    margin-bottom: 16px;
}

.blog-hero__subtitle {
    font-size: 17px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    max-width: 680px;
    margin: 0 auto 24px;
}

.blog-breadcrumbs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 16px;
}

.blog-breadcrumbs a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: var(--ng-transition);
}

.blog-breadcrumbs a:hover {
    color: var(--ng-accent);
}

.blog-breadcrumbs span.active {
    color: var(--ng-accent);
    font-weight: 500;
}
/* Recent article thumbnail */
.blog-recent-thumb {
    width: 90px;
    height: 76px;
    flex: 0 0 90px;
    overflow: hidden;
    border-radius: 12px;
}

.blog-recent-thumb a {
    display: block;
    width: 100%;
    height: 100%;
}

.blog-recent-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Shows the full image without cropping */
    object-position: center;
    border-radius: 12px;
}




.blog-tags-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 16px;
}

.blog-tag-pill {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 30px;
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--ng-transition);
    border: 1px solid transparent;
}

.blog-tag-pill:hover,
.blog-tag-pill.active {
    background: var(--ng-primary);
    color: #ffffff;
    text-decoration: none;
    border-color: var(--ng-primary);
}

/* --------------------------------------------------------------------------
   Standard Blog Cards (Grid)
   -------------------------------------------------------------------------- */
.blog-grid-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--ng-card-shadow);
    border: 1px solid var(--ng-border);
    transition: var(--ng-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    margin-top: 30px;
    margin-bottom: 30px;
}

.blog-grid-card:hover {
    box-shadow: var(--ng-card-shadow-hover);
    transform: translateY(-6px);
    border-color: rgba(13, 54, 124, 0.25);
}

.blog-card-img-wrap {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #f1f5f9;
}

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

.blog-grid-card:hover .blog-card-img-wrap img {
    transform: scale(1.08);
}



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

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--ng-text-muted);
    margin-bottom: 12px;
}

.blog-card-meta i {
    color: var(--ng-primary);
    margin-right: 4px;
}

.blog-card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: #0f172a;
    margin-bottom: 12px;
    transition: var(--ng-transition);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 50px;
}

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

.blog-card-title a:hover {
    color: var(--ng-primary);
}

.blog-card-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ng-text-muted);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ng-primary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: var(--ng-transition);
}

.blog-read-more:hover {
    color: var(--ng-accent-hover);
    transform: translateX(4px);
    text-decoration: none;
}

.blog-read-more i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.blog-read-more:hover i {
    transform: translateX(3px);
}

.blog-read-time {
    font-size: 12px;
    color: var(--ng-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --------------------------------------------------------------------------
   Blog Sidebar Widgets
   -------------------------------------------------------------------------- */
.blog-widget {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--ng-card-shadow);
    border: 1px solid var(--ng-border);
    margin-bottom: 30px;
}

.blog-widget__title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    position: relative;
    padding-bottom: 14px;
    margin-bottom: 22px;
}

.blog-widget__title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--ng-accent);
    border-radius: 2px;
}

.blog-recent-item {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f1f5f9;
}

.blog-recent-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.blog-recent-thumb {
    width: 72px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e2e8f0;
}


.blog-recent-item:hover .blog-recent-thumb img {
    transform: scale(1.1);
}

.blog-recent-info h5 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 6px;
}
span {
    font-size: 15px;
    position: relative;
    top: -5px;
}


/* Prevent long article text from overlapping the sidebar */
.blog-detail-article,
.blog-detail-content {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.blog-detail-content {
    overflow-wrap: anywhere;
    word-break: normal;
}

.blog-detail-content img,
.blog-detail-content video,
.blog-detail-content iframe {
    max-width: 100%;
}

.blog-detail-content img {
    height: auto;
}

.blog-detail-content pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.blog-detail-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.blog-recent-info h5 a {
    color: #1e293b;
    text-decoration: none;
    transition: var(--ng-transition);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-recent-info h5 a:hover {
    color: var(--ng-primary);
}

.blog-recent-date {
    font-size: 11px;
    color: var(--ng-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Sidebar CTA card */
.blog-cta-widget {
    background: linear-gradient(135deg, #0d367c 0%, #164ba3 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.blog-cta-widget::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    background: rgba(254, 202, 69, 0.2);
    border-radius: 50%;
}

.blog-cta-widget h4 {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.blog-cta-widget p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
    line-height: 1.6;
}

.blog-cta-btn {
    display: inline-block;
    background: var(--ng-accent);
    color: #0f172a !important;
    font-weight: 700;
    padding: 12px 26px;
    border-radius: 30px;
    text-decoration: none !important;
    transition: var(--ng-transition);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.blog-cta-btn:hover {
    background: #ffffff;
    color: var(--ng-primary) !important;
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Single Post Detail Page
   -------------------------------------------------------------------------- */
.blog-detail-article {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--ng-card-shadow);
    border: 1px solid var(--ng-border);
    margin-bottom: 40px;
}

.blog-detail-header {
    margin-bottom: 30px;
}

.blog-detail-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.3;
    color: #0f172a;
    margin-bottom: 18px;
}

.blog-detail-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--ng-text-muted);
    font-size: 14px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

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

.blog-detail-meta i {
    color: var(--ng-primary);
}

/* Rich Blog Typography */
.blog-detail-content {
    font-size: 17px;
    line-height: 1.85;
    color: #334155;
}

.blog-detail-content p {
    margin-bottom: 22px;
}

.blog-detail-content h2 {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 36px;
    margin-bottom: 16px;
    position: relative;
    padding-left: 16px;
}

.blog-detail-content h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background: var(--ng-primary);
    border-radius: 2px;
}

.blog-detail-content h3 {
    font-size: 21px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 30px;
    margin-bottom: 14px;
}

.blog-detail-content ul,
.blog-detail-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.blog-detail-content li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.blog-detail-content .alert {
    border-radius: 12px;
    padding: 20px 24px;
    margin: 28px 0;
    border-left: 5px solid;
}

.blog-detail-content .alert-info {
    background: #eff6ff;
    border-left-color: var(--ng-primary);
    color: #1e3a8a;
}

.blog-detail-content .alert-success {
    background: #f0fdf4;
    border-left-color: var(--ng-green);
    color: #14532d;
}

.blog-detail-content table {
    width: 100%;
    margin: 28px 0;
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
}

.blog-detail-content table th {
    background: #0d367c;
    color: #ffffff;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
}

.blog-detail-content table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.blog-detail-content table tr:nth-child(even) td {
    background: #f8fafc;
}

/* --------------------------------------------------------------------------
   FAQ Accordion Section in Single Post
   -------------------------------------------------------------------------- */
.blog-faqs-section {
    margin-top: 45px;
    padding-top: 35px;
    border-top: 2px dashed #e2e8f0;
}

.blog-faqs-section h3.faq-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-faqs-section h3.faq-title i {
    color: var(--ng-accent);
}

.blog-faq-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 14px;
    overflow: hidden;
    transition: var(--ng-transition);
}

.blog-faq-item:hover {
    border-color: #cbd5e1;
}

.blog-faq-header {
    padding: 18px 22px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    user-select: none;
    transition: var(--ng-transition);
}

.blog-faq-header:hover {
    color: var(--ng-primary);
}

.blog-faq-icon {
    font-size: 14px;
    color: var(--ng-primary);
    transition: transform 0.3s ease;
}

.blog-faq-item.active .blog-faq-icon {
    transform: rotate(180deg);
}

.blog-faq-body {
    padding: 0 22px 20px 22px;
    display: none;
    color: #475569;
    font-size: 15px;
    line-height: 1.7;
    border-top: 1px solid #f1f5f9;
}

.blog-faq-item.active .blog-faq-body {
    display: block;
    padding-top: 14px;
}

/* --------------------------------------------------------------------------
   Share Bar & Author Box
   -------------------------------------------------------------------------- */
.blog-share-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    margin: 35px 0;
    flex-wrap: wrap;
    gap: 16px;
}

.blog-share-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}

.blog-share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-share-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    font-size: 15px;
    text-decoration: none;
    transition: var(--ng-transition);
}

.blog-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.blog-share-btn.btn-whatsapp { background: #25d366; }
.blog-share-btn.btn-linkedin { background: #0077b5; }
.blog-share-btn.btn-twitter  { background: #1da1f2; }
.blog-share-btn.btn-facebook { background: #1877f2; }
.blog-share-btn.btn-copy     { background: #475569; }

.blog-author-box {
    background: #f8fafc;
    border-radius: 16px;
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 35px 0;
    border: 1px solid #e2e8f0;
}

.blog-author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--ng-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    flex-shrink: 0;
}

.blog-author-info h4 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
}

.blog-author-info p {
    font-size: 14px;
    color: var(--ng-text-muted);
    margin: 0;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Pagination & Empty State
   -------------------------------------------------------------------------- */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.blog-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid var(--ng-border);
    color: var(--ng-text-main);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: var(--ng-transition);
}

.blog-page-link:hover,
.blog-page-link.active {
    background: var(--ng-primary);
    color: #ffffff;
    border-color: var(--ng-primary);
    text-decoration: none;
}

.blog-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px dashed #cbd5e1;
    margin: 30px 0;
}

.blog-empty-state i {
    font-size: 48px;
    color: #94a3b8;
    margin-bottom: 16px;
}

.blog-empty-state h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.blog-empty-state p {
    color: var(--ng-text-muted);
    font-size: 15px;
    margin-bottom: 20px;
}

/* Responsive Overrides */
@media (max-width: 991px) {
    .blog-hero__title {
        font-size: 32px;
    }
    .blog-featured-card .featured-img-wrap {
        height: 260px;
    }
    .blog-featured-content {
        padding: 24px;
    }
    .blog-detail-article {
        padding: 24px;
    }
    .blog-detail-title {
        font-size: 26px;
    }
}

@media (max-width: 576px) {
    .blog-hero {
        padding: 110px 0 60px;
    }
    .blog-hero__title {
        font-size: 26px;
    }
    .blog-author-box {
        flex-direction: column;
        text-align: center;
    }
}
