/* ============================================
   Blog Page Styles
   ============================================ */

/* Hero Section */
.blog-hero {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #2c3e50 0%, #1a1a2e 100%);
}

.blog-hero .hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.7;
}

.blog-hero .hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.blog-hero .container {
    position: relative;
    z-index: 3;
}

.blog-hero h1 {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.1em;
    margin: 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

/* Category Tabs */
.blog-categories {
    background: #fff;
    padding: 1.5rem 0;
    border-bottom: 1px solid #eee;
}

.categories-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    justify-content: flex-start;
}

.category-tab {
    font-size: 0.95rem;
    font-weight: 500;
    color: #555;
    text-decoration: none;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.category-tab:hover {
    color: #ffc107;
}

.category-tab.active {
    color: #ffc107;
    border-bottom-color: #ffc107;
}

/* Blog Posts Grid */
.blog-posts {
    padding: 3rem 0;
    background: #fff;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Post Card */
.post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.post-image-link {
    display: block;
}

.post-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f5f5f5;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-category-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #ffc107;
    color: #1a1a1a;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
    z-index: 2;
}

.post-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    color: #fff;
    z-index: 1;
}

.new-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #fff;
    margin-bottom: 0.5rem;
}

.post-image-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-image-excerpt {
    font-size: 0.75rem;
    line-height: 1.5;
    margin: 0;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Post Content */
.post-content {
    padding: 1.25rem;
}

.post-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 0.75rem;
}

.post-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.post-excerpt {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #666;
    margin: 0 0 1rem;
}

.read-more {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e67e22;
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #d35400;
}

.post-date {
    font-size: 0.85rem;
    color: #999;
    margin: 0;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

/* Pagination */
.blog-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.blog-pagination nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.blog-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 0.5rem;
    font-size: 0.95rem;
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-pagination .page-link:hover {
    color: #ffc107;
}

.blog-pagination .page-link.active {
    color: #ffc107;
    font-weight: 700;
}

/* ============================================
   Single Blog Post Styles
   ============================================ */

/* Post Hero */
.blog-post-hero {
    position: relative;
    min-height: 450px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: linear-gradient(135deg, #2c3e50 0%, #1a1a2e 100%);
}

.blog-post-hero .hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.blog-post-hero .hero-content {
    position: relative;
    z-index: 2;
    padding: 3rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    width: 100%;
    color: #fff;
}

.blog-post-hero .new-badge {
    margin-bottom: 1rem;
}

.blog-post-hero h1 {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    max-width: 600px;
}

/* Post Content */
.blog-post-content {
    padding: 3rem 0;
    background: #fff;
}

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

.post-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.post-header h1 {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    margin: 0 0 1rem;
}

.post-header .post-category {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffc107;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.post-header .post-meta {
    font-size: 0.9rem;
    color: #999;
    margin: 0;
}

.post-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body h2,
.post-body h3,
.post-body h4 {
    font-family: 'Poppins', sans-serif;
    color: #1a1a1a;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.post-body a {
    color: #1a237e;
    text-decoration: underline;
}

.post-body ul,
.post-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.post-body li {
    margin-bottom: 0.5rem;
}

.post-source {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #888;
}

.post-source a {
    color: #1a237e;
    word-break: break-all;
}

/* Share Section */
.blog-share {
    padding: 3rem 0;
    background: #fff;
    text-align: center;
}

.blog-share h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 0.5rem;
}

.blog-share p {
    font-size: 1rem;
    color: #555;
    margin: 0 0 1.5rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #fff;
    font-size: 1.25rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.share-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.share-btn.facebook { background: #1877f2; }
.share-btn.linkedin { background: #0a66c2; }
.share-btn.twitter { background: #1a1a1a; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.email { background: #ea4335; }
.share-btn.print { background: #666; }

/* Post Navigation */
.blog-navigation {
    padding: 2rem 0;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    max-width: 45%;
}

.nav-link.next {
    text-align: right;
    margin-left: auto;
}

.nav-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.nav-title {
    display: block;
    font-size: 0.95rem;
    color: #1a237e;
    transition: color 0.3s ease;
}

.nav-link:hover .nav-title {
    color: #ffc107;
}

/* Related Posts */
.related-posts {
    padding: 3rem 0;
    background: #fff;
}

.related-posts h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 2rem;
    text-align: center;
}

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

/* Responsive */
@media (max-width: 992px) {
    .posts-grid,
    .related-posts .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .blog-categories {
        padding: 1rem 0;
    }

    .categories-tabs {
        gap: 0.25rem 0.75rem;
    }

    .category-tab {
        font-size: 0.85rem;
    }

    .posts-grid,
    .related-posts .posts-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .blog-post-hero {
        min-height: 350px;
    }

    .blog-post-hero .hero-content {
        padding: 2rem 1rem;
    }

    .blog-post-content {
        padding: 2rem 0;
    }

    .share-buttons {
        gap: 0.5rem;
    }

    .share-btn {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-link {
        max-width: 100%;
    }

    .nav-link.next {
        text-align: left;
    }
}
