/* ==========================================================================
   USA Embroidered Patch - Blog & Blog Details Styling
   ========================================================================== */

:root {
    --blog-brand-primary: #1d80c3;
    --blog-brand-hover: #0f6199;
    --blog-brand-dark: #1b2e44;
    --blog-text-muted: #64748b;
    --blog-border: #e2e8f0;
    --blog-bg-light: #f8fafc;
}

/* -------------------------------------------------------------
   Hero / Header
   ------------------------------------------------------------- */
.blog-hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1b2e44 100%);
    color: #ffffff;
    padding: 60px 0 50px;
    position: relative;
    overflow: hidden;
}

.blog-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(29, 128, 195, 0.22) 0%, transparent 60%);
    pointer-events: none;
}

.blog-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #7dd3fc;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.blog-hero-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 14px;
}

.blog-hero-title span {
    color: #38bdf8;
}

.blog-hero-desc {
    font-size: 16px;
    color: #94a3b8;
    max-width: 650px;
    line-height: 1.6;
    margin-bottom: 0;
}

/* -------------------------------------------------------------
   Blog Card Grid (3 per row with vertical & horizontal gaps)
   ------------------------------------------------------------- */
.blog-cards-grid {
    display: flex;
    flex-wrap: wrap;
    row-gap: 32px;
}

.blog-cards-grid > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.blog-card {
    background: #ffffff;
    border: 1px solid var(--blog-border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.09);
    border-color: #cbd5e1;
}

.blog-card-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #e2e8f0;
    overflow: hidden;
}

.blog-card-img-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.blog-card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(6px);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    z-index: 2;
}

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

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

.blog-card-meta i {
    color: var(--blog-brand-primary);
}

.blog-card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--blog-brand-dark);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

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

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

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

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

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 9px;
}

.blog-card-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #cbd5e1;
    border: 1px solid #e2e8f0;
}

.blog-author-initials-badge {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1d80c3 0%, #035882 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(29, 128, 195, 0.25);
    user-select: none;
}

.blog-card-author-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--blog-brand-dark);
}

.blog-card-readmore {
    font-size: 13px;
    font-weight: 700;
    color: var(--blog-brand-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s ease, color 0.2s ease;
}

.blog-card-readmore:hover {
    color: var(--blog-brand-hover);
    gap: 9px;
}

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

.blog-pagination .page-item .page-link {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--blog-border);
    color: var(--blog-brand-dark);
    font-weight: 600;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.2s ease;
    text-decoration: none;
}

.blog-pagination .page-item .page-link:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--blog-brand-primary);
}

.blog-pagination .page-item.active .page-link {
    background: var(--blog-brand-primary);
    border-color: var(--blog-brand-primary);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(29, 128, 195, 0.3);
}

.blog-pagination .page-item.disabled .page-link {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f1f5f9;
}

/* -------------------------------------------------------------
   Blog Details Page (Matching User Image 1)
   ------------------------------------------------------------- */
.blog-details-section {
    padding: 40px 0 60px;
    background: #ffffff;
}

.blog-breadcrumbs {
    font-size: 13px;
    color: var(--blog-text-muted);
    margin-bottom: 24px;
}

.blog-breadcrumbs a {
    color: var(--blog-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-breadcrumbs a:hover {
    color: var(--blog-brand-primary);
}

.blog-breadcrumbs span {
    margin: 0 6px;
    color: #cbd5e1;
}

.blog-breadcrumbs .current {
    color: var(--blog-brand-dark);
    font-weight: 600;
}

/* Single Post Header */
.blog-details-title {
    font-size: clamp(24px, 3.5vw, 38px);
    font-weight: 800;
    line-height: 1.3;
    color: var(--blog-brand-dark);
    margin-bottom: 14px;
}

.blog-details-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--blog-text-muted);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

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

.blog-details-meta-item i {
    color: var(--blog-brand-primary);
}

/* Large Featured Image (Image 1 top) */
.blog-featured-media {
    margin-bottom: 24px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    background: #f1f5f9;
}

.blog-featured-media img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

/* Social Share Bar (Image 1 row under image) */
.blog-share-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    padding: 12px 18px;
    background: var(--blog-bg-light);
    border-radius: 12px;
    border: 1px solid var(--blog-border);
}

.blog-share-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--blog-brand-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 6px;
}

.blog-share-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 14px;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.blog-share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
    color: #ffffff;
}

.blog-share-facebook { background: #1877f2; }
.blog-share-twitter { background: #000000; }
.blog-share-linkedin { background: #0a66c2; }
.blog-share-whatsapp { background: #25d366; }

.blog-share-btn i {
    color: #ffffff !important;
    font-size: 15px;
    line-height: 1;
    display: inline-block;
}

/* Article Content Body */
.blog-prose {
    font-size: 16px;
    line-height: 1.85;
    color: #334155;
    margin-bottom: 40px;
}

.blog-prose h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--blog-brand-dark);
    margin-top: 36px;
    margin-bottom: 16px;
    line-height: 1.35;
}

.blog-prose h3 {
    font-size: 21px;
    font-weight: 700;
    color: var(--blog-brand-dark);
    margin-top: 28px;
    margin-bottom: 14px;
    line-height: 1.4;
}

.blog-prose p {
    margin-bottom: 20px;
}

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

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

.blog-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 24px 0;
}

.blog-prose blockquote {
    border-left: 4px solid var(--blog-brand-primary);
    padding: 14px 20px;
    background: #f0f9ff;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #0369a1;
    margin: 24px 0;
}

/* Author Box at Bottom of Article (Image 1 author details) */
.blog-author-card {
    background: #f8fafc;
    border: 1px solid var(--blog-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.blog-author-avatar-wrap {
    flex-shrink: 0;
}

.blog-author-avatar {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.blog-author-avatar-wrap .blog-author-initials-badge {
    width: 74px;
    height: 74px;
    min-width: 74px;
    font-size: 26px;
    font-weight: 800;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 14px rgba(29, 128, 195, 0.25);
}

.blog-author-meta {
    flex-grow: 1;
}

.blog-author-role-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--blog-brand-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: inline-block;
}

.blog-author-name {
    font-size: 19px;
    font-weight: 800;
    color: var(--blog-brand-dark);
    margin-bottom: 6px;
}

.blog-author-designation {
    font-size: 13px;
    color: var(--blog-text-muted);
    font-weight: 600;
    margin-bottom: 8px;
}

.blog-author-bio {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 0;
}

/* -------------------------------------------------------------
   Sidebar (Image 1 right column: Recent Blogs + Quote Form)
   ------------------------------------------------------------- */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Widget: Recent Blogs */
.blog-widget {
    background: #ffffff;
    border: 1px solid var(--blog-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.blog-widget-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--blog-brand-dark);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.blog-widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--blog-brand-primary);
    border-radius: 2px;
}

.recent-blog-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recent-blog-item {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
    transition: transform 0.2s ease;
}

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

.recent-blog-item:hover {
    transform: translateX(4px);
}

.recent-blog-thumb {
    width: 76px;
    height: 76px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #e2e8f0;
}

.recent-blog-info {
    flex-grow: 1;
}

.recent-blog-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--blog-brand-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    transition: color 0.2s ease;
}

.recent-blog-item:hover .recent-blog-title {
    color: var(--blog-brand-primary);
}

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

/* Widget: Sidebar Quote Form */
.blog-widget-form {
    background: linear-gradient(145deg, #1b2e44, #0b1a2b);
    color: #ffffff;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 12px 30px rgba(27, 46, 68, 0.2);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.blog-widget-form::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(29, 128, 195, 0.25);
    pointer-events: none;
}

.blog-widget-form-badge {
    display: inline-block;
    background: rgba(29, 128, 195, 0.2);
    border: 1px solid rgba(29, 128, 195, 0.4);
    color: #7dd3fc;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.blog-widget-form-title {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
}

.blog-widget-form-desc {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 20px;
    line-height: 1.5;
}

.blog-widget-input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    transition: all 0.2s ease;
    width: 100%;
    margin-bottom: 12px;
}

.blog-widget-input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: #1d80c3;
    color: #ffffff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(29, 128, 195, 0.25);
}

.blog-widget-input::placeholder {
    color: #94a3b8;
}

.blog-widget-btn {
    background: linear-gradient(127deg, #1d80c3, #035882);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 18px;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(29, 128, 195, 0.35);
}

.blog-widget-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(127deg, #0f6199, #024363);
    box-shadow: 0 8px 18px rgba(29, 128, 195, 0.45);
    color: #ffffff;
}

@media (max-width: 768px) {
    .blog-author-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
