/* ============================================
   BLOG/RESOURCES PAGE STYLES - FIXED VERSION
   Modern, Clean Design for Bootstrap 4
   ============================================ */

:root {
    --primary-color: #e03a3c;
    --primary-dark: #c62d2f;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   BLOG HERO SECTION
   ============================================ */

.blog-hero {
    background: linear-gradient(135deg, #ffeddd 0%, #e07257 100%);
    padding: 80px 0;
    position: relative;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.9);
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-description {
    text-align: center;
    font-size: 18px;
    color: rgba(0, 0, 0, 0.9);
    margin: 0;
}

/* ============================================
   BLOG CONTENT SECTION
   ============================================ */

.blog-content {
    padding: 60px 0 100px;
    background: #fafbfc;
}

/* ============================================
   FEATURED POST - FIXED
   ============================================ */

.featured-post {
    position: relative;
    margin-bottom: 50px;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}



.featured-grid {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -ms-flex-direction: column;
    flex-direction: column;
}

.featured-image {
    -ms-flex: 0 0 100%;
    flex: 0 0 100%;
    max-width: 100%;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.featured-image img {
    width: 100%;
    height: 450px;
    object-fit: contain;
    display: block;
    transition: var(--transition);
}

.featured-post:hover .featured-image img {
    transform: scale(1.05);
}

.featured-info {
    -ms-flex: 0 0 100%;
    flex: 0 0 100%;
    max-width: 100%;
    padding: 40px;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
}

.featured-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 16px;
}

.featured-author {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.featured-author i {
    margin-right: 8px;
}

.featured-excerpt {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 24px;
}

.featured-actions {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 12px;
}

/* ============================================
   BLOG GRID - FIXED
   ============================================ */

.blog-grid {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
}

.blog-card {
    -ms-flex: 0 0 50%;
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 15px;
    margin-bottom: 30px;
}

.blog-card-inner {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    height: 100%;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
}

.blog-card:hover .blog-card-inner {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.blog-card-image {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #f5f5f5;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: var(--transition);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.08);
}

.blog-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(224, 58, 60, 0.95);
    color: var(--white);
    border-radius: 50%;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: var(--shadow-sm);
}

.blog-card-body {
    padding: 24px;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
}

.blog-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 12px;
    margin-top: 0;
}

.blog-card-author {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.blog-card-author i {
    margin-right: 6px;
}

.blog-card-excerpt {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
}

.blog-card-link {
    display: -ms-inline-flexbox;
    display: inline-flex;
    -ms-flex-align: center;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    margin-top: auto;
}

.blog-card-link:hover {
    gap: 12px;
    color: var(--primary-dark);
    text-decoration: none;
}

.blog-card-link i {
    transition: var(--transition);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
    display: -ms-inline-flexbox;
    display: inline-flex;
    -ms-flex-align: center;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--white);
    text-decoration: none;
}

.btn-secondary {
    display: -ms-inline-flexbox;
    display: inline-flex;
    -ms-flex-align: center;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #6c757d;
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #5a6268;
    color: var(--white);
    text-decoration: none;
}

/* ============================================
   SIDEBAR - FIXED & WIDER
   ============================================ */

.blog-sidebar {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 20px;
}

.sidebar-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 24px;
    margin-top: 0;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--primary-color);
}

.recent-posts {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 20px;
}

.recent-post-item {
    display: -ms-flexbox;
    display: flex;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.recent-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.recent-post-image {
    -ms-flex-negative: 0;
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
}

.recent-post-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.recent-post-content {
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    -ms-flex-pack: center;
    justify-content: center;
}

.recent-post-content a {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    line-height: 1.4;
    display: block;
    margin-bottom: 6px;
    transition: var(--transition);
}

.recent-post-content a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.recent-post-author {
    font-size: 13px;
    color: var(--text-light);
    display: block;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: 100px 20px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.empty-state i {
    color: var(--text-light);
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 16px;
    color: var(--text-light);
    margin: 0;
}

/* ============================================
   BLOG DETAIL PAGE
   ============================================ */

.blog-detail-hero {
    position: relative;
    height: 400px;
    background-size: cover;
    background-position: center;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: end;
    align-items: flex-end;
    padding: 40px 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.6) 100%
    );
}

.breadcrumb-nav {
    position: relative;
    z-index: 10;
}

.breadcrumb-link {
    display: -ms-inline-flexbox;
    display: inline-flex;
    -ms-flex-align: center;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

.breadcrumb-link:hover {
    background: var(--white);
    transform: translateX(-4px);
    color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}

.blog-detail-content {
    padding: 60px 0;
    background: #fafbfc;
}

.blog-article {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.article-header {
    margin-bottom: 32px;
}

.article-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 16px;
}

.article-meta {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 20px;
}

.meta-item {
    font-size: 14px;
    color: var(--text-light);
}

.meta-item i {
    margin-right: 6px;
}

.article-image {
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-content {
    margin-bottom: 32px;
}

.article-text {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 32px;
}

.article-file,
.article-link,
.article-video {
    margin: 32px 0;
    padding: 24px;
    background: var(--bg-light);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.article-file h4,
.article-video h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.article-file h4 i,
.article-video h4 i {
    margin-right: 8px;
    color: var(--primary-color);
}

.file-actions {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 12px;
}

.article-additional-image {
    margin: 32px 0;
    border-radius: 12px;
    overflow: hidden;
}

.article-additional-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-footer {
    padding-top: 32px;
    border-top: 2px solid var(--border-color);
}

/* ============================================
   PDF MODAL
   ============================================ */

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 991px) {
    .blog-hero {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .featured-grid {
        -ms-flex-direction: column;
        flex-direction: column;
    }
    
    .featured-image,
    .featured-info {
        -ms-flex: 0 0 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .featured-image img {
        height: 350px;
    }
    
    .featured-info {
        padding: 30px;
    }
    
    .blog-sidebar {
        margin-top: 50px;
        position: relative;
        top: 0;
    }
}

@media (max-width: 767px) {
    .blog-hero {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-description {
        font-size: 16px;
    }
    
    .blog-content {
        padding: 40px 0 60px;
    }
    
    .featured-post {
        margin-bottom: 40px;
    }
    
    .featured-badge {
        top: 16px;
        left: 16px;
        font-size: 12px;
        padding: 6px 14px;
    }
    
    .featured-image img {
        height: 250px;
    }
    
    .featured-title {
        font-size: 24px;
    }
    
    .featured-info {
        padding: 24px;
    }
    
    .blog-card {
        -ms-flex: 0 0 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .blog-card-image {
        height: 220px;
    }
    
    .sidebar-title {
        font-size: 20px;
    }
    
    .recent-post-image {
        width: 80px;
        height: 80px;
    }
    
    .blog-detail-hero {
        height: 250px;
        padding: 30px 0;
    }
    
    .article-title {
        font-size: 28px;
    }
    
    .blog-article {
        padding: 24px;
    }
}

@media (max-width: 575px) {
    .hero-title {
        font-size: 28px;
    }
    
    .featured-title {
        font-size: 20px;
    }
    
    .featured-actions {
        -ms-flex-direction: column;
        flex-direction: column;
    }
    
    .featured-actions .btn-primary,
    .featured-actions .btn-secondary {
        width: 100%;
        -ms-flex-pack: center;
        justify-content: center;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .blog-article {
        padding: 20px;
    }
    
    .blog-sidebar {
        padding: 20px;
    }
    
    .recent-post-image {
        width: 70px;
        height: 70px;
    }
    
    .recent-post-content a {
        font-size: 14px;
    }
}