/* ========================================
   Blog Pages - Public Blog Styles
   ======================================== */

.blog-page {
    background: #f8f9fa;
    min-height: 100vh;
}

/* Hero Section */
.blog-hero {
    background: #fff;
    color: #1a3a5c;
    padding: 140px 0 40px;
    text-align: center;
    border-bottom: 1px solid #e8ecf1;
}

.blog-hero-title {
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 10px;
    letter-spacing: -0.5px;
    color: #1a3a5c;
}

.blog-hero-sub {
    font-size: 18px;
    color: #666;
    margin: 0;
    font-weight: 300;
}

/* Blog Content */
.blog-content {
    padding: 40px 0 60px;
}

/* Category Filter */
.blog-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
    justify-content: center;
}

.blog-filter button {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
}

.blog-filter button:hover {
    border-color: #1a3a5c;
    color: #1a3a5c;
}

.blog-filter button.active {
    background: #1a3a5c;
    border-color: #1a3a5c;
    color: #fff;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.blog-grid-sm {
    grid-template-columns: repeat(3, 1fr);
}

/* Blog Card */
.blog-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.blog-card-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #e9ecef;
    position: relative;
}

.blog-card-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(26, 58, 92, 0.9);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.blog-card-body {
    padding: 20px;
}

.blog-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a3a5c;
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-summary {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #999;
}

.blog-card-meta .fa-volume-up {
    color: #1a3a5c;
}

/* Blog Detail */
.blog-detail {
    padding: 160px 0 60px;     /* +40px top breathing room from nav */
}

.blog-detail .container {
    max-width: 800px;
}

.blog-detail-header {
    margin-bottom: 28px;
    text-align: center;
}

.blog-detail-hero-image {
    margin: 0 -20px 36px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(26, 58, 92, 0.08);
}
.blog-detail-hero-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 460px;
    object-fit: cover;
}
@media (max-width: 768px) {
    .blog-detail { padding: 130px 0 40px; }
    .blog-detail-hero-image { margin-left: 0; margin-right: 0; border-radius: 4px; }
    .blog-detail-hero-image img { max-height: 280px; }
}

.blog-detail-cat {
    display: inline-block;
    background: #e8f0f8;
    color: #1a3a5c;
    padding: 4px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}

.blog-detail-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a3a5c;
    margin: 0 0 16px;
    line-height: 1.3;
}

.blog-detail-meta {
    font-size: 14px;
    color: #888;
}

/* Audio Player */
.blog-audio {
    background: #f1f3f5;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 32px;
}

.blog-audio label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
    font-weight: 500;
}

.blog-audio audio {
    width: 100%;
}

/* Detail Body */
.blog-detail-body {
    font-size: 17px;
    line-height: 1.9;
    color: #333;
    font-family: Georgia, 'Times New Roman', serif;
}

.blog-detail-body h1 {
    font-size: 32px;
    color: #1a3a5c;
    margin: 0 0 20px;
    font-family: 'Poppins', sans-serif;
    line-height: 1.3;
}

.blog-detail-body h2 {
    font-size: 24px;
    color: #1a3a5c;
    margin: 36px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8ecf1;
    font-family: 'Poppins', sans-serif;
}

.blog-detail-body h3 {
    font-size: 20px;
    color: #2d5a8f;
    margin: 28px 0 12px;
    font-family: 'Poppins', sans-serif;
}

.blog-detail-body p {
    margin: 0 0 18px;
}

.blog-detail-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.blog-detail-body img[style*="float:left"],
.blog-detail-body img[style*="float: left"] {
    margin: 4px 24px 16px 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.blog-detail-body img[style*="float:right"],
.blog-detail-body img[style*="float: right"] {
    margin: 4px 0 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.blog-detail-body blockquote {
    border-left: 4px solid #1a3a5c;
    margin: 24px 0;
    padding: 16px 24px;
    background: #f7f9fc;
    color: #444;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

.blog-detail-body ul,
.blog-detail-body ol {
    margin: 0 0 18px;
    padding-left: 28px;
}

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

.blog-detail-body hr {
    border: none;
    border-top: 1px solid #e8ecf1;
    margin: 36px 0;
}

.blog-detail-body a {
    color: #2d5a8f;
    text-decoration: underline;
}

.blog-detail-body a:hover {
    color: #1a3a5c;
}

/* Clear floats after floated images */
.blog-detail-body::after {
    content: '';
    display: table;
    clear: both;
}

/* Related Articles */
.blog-related {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e9ecef;
}

.blog-related h3 {
    font-size: 22px;
    font-weight: 600;
    color: #1a3a5c;
    margin: 0 0 20px;
    text-align: center;
}

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

.blog-paging button {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    color: #1a3a5c;
    cursor: pointer;
    transition: all 0.2s ease;
}

.blog-paging button:hover:not(:disabled) {
    background: #1a3a5c;
    color: #fff;
}

.blog-paging button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.blog-paging span {
    font-size: 14px;
    color: #666;
}

/* Responsive */
@media (max-width: 991px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .blog-grid-sm {
        grid-template-columns: repeat(2, 1fr);
    }
    .blog-hero-title {
        font-size: 32px;
    }
    .blog-detail-title {
        font-size: 28px;
    }
}

@media (max-width: 767px) {
    .blog-grid,
    .blog-grid-sm {
        grid-template-columns: 1fr;
    }
    .blog-hero {
        padding: 120px 0 40px;
    }
    .blog-hero-title {
        font-size: 28px;
    }
    .blog-hero-sub {
        font-size: 15px;
    }
    .blog-detail {
        padding: 100px 0 40px;
    }
    .blog-detail-title {
        font-size: 24px;
    }
    .blog-card-img {
        height: 180px;
    }
}
