/* ============================================================
   blog.css — Blog Landing Page & Detailed Blog Stylesheet
   Extends global style.css with premium blog aesthetics and layouts.
   ============================================================ */

/* ─── HERO BANNER ─────────────────────────────────────────── */
.blog-hero {
    position: relative;
    height: 380px;
    background-image: url('image/blog/banner.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: var(--white);
    padding-top: 80px;
    text-align: center;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(25, 84, 172, 0.88) 0%, rgba(20, 190, 217, 0.7) 100%);
    z-index: 1;
}

.blog-hero .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.blog-hero h1 {
    color: #fff;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    font-family: 'Montserrat', sans-serif;
}

/* ─── BREADCRUMB ──────────────────────────────────────────── */
.projects-breadcrumb {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.projects-breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s;
}

.projects-breadcrumb a:hover {
    color: #fff;
}

.projects-breadcrumb span {
    color: rgba(255, 255, 255, 0.5);
}

/* ─── BLOG GRID SECTION ───────────────────────────────────── */
.blog-section {
    padding: 5rem 0;
}

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

/* ─── BLOG CARD ───────────────────────────────────────────── */
.blog-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(25, 84, 172, 0.12);
    border-color: rgba(20, 190, 217, 0.25);
}

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

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

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

.blog-card-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-cyan);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(20, 190, 217, 0.3);
}

.blog-card-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-meta {
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 0.85rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.blog-card-meta i {
    font-size: 0.85rem;
    color: var(--primary-cyan);
}

.blog-card-title {
    font-size: 1.15rem;
    color: var(--primary-navy);
    font-weight: 700;
    margin-bottom: 0.85rem;
    line-height: 1.4;
    transition: color 0.2s;
}

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

.blog-card-excerpt {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.blog-card-link {
    font-size: 0.88rem;
    color: var(--primary-cyan);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s, gap 0.2s;
    margin-top: auto;
}

.blog-card:hover .blog-card-link {
    color: var(--primary-navy);
    gap: 0.6rem;
}

.blog-card-link i {
    width: 16px;
    height: 16px;
}

/* ─── PAGINATION ──────────────────────────────────────────── */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.pagination-btn:hover {
    background: rgba(20, 190, 217, 0.08);
    color: var(--primary-cyan);
    border-color: var(--primary-cyan);
}

.pagination-btn.active {
    background: var(--primary-cyan);
    color: #fff;
    border-color: var(--primary-cyan);
    box-shadow: 0 4px 12px rgba(20, 190, 217, 0.3);
}

.pagination-btn.wide {
    width: auto;
    padding: 0 1.25rem;
    border-radius: 22px;
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ─── DETAILED BLOG POST PAGE ──────────────────────────────── */
.blog-post-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 5rem 1.5rem;
}

.blog-post-article {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.blog-post-hero-img {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.blog-post-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-post-content {
    padding: 3rem 4rem;
}

.blog-post-header {
    margin-bottom: 2rem;
}

.blog-post-tag {
    background: rgba(20, 190, 217, 0.1);
    color: var(--primary-cyan);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 1.25rem;
}

.blog-post-title {
    font-size: 25px;
    color: var(--primary-navy);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.blog-post-meta {
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 1.25rem;
}

.blog-post-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.blog-post-meta i {
    color: var(--primary-cyan);
}

.blog-post-body {
    font-size: 1.02rem;
    line-height: 1.9;
    color: #000000;
}

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

.blog-post-body h4 {
    font-size: 1.15rem;
    color: #14BED9;
    margin-bottom: 1.5rem;
}

.blog-post-body h3 {
    font-size: 1.35rem;
    color: var(--primary-navy);
    margin: 2.25rem 0 1rem 0;
    font-weight: 700;
}

.blog-post-body hr {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin: 2rem 0;
}

.blog-post-body blockquote {
    background: #f8fafc;
    border-left: 4px solid var(--primary-cyan);
    padding: 1.5rem 2rem;
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #1e293b;
    border-radius: 0 8px 8px 0;
    margin: 2rem 0;
}

.blog-post-body blockquote p {
    margin: 0;
}

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

.blog-post-body ul li,
.blog-post-body ol li {
    margin-bottom: 0.6rem;
    line-height: 1.7;
}

.blog-post-body ul {
    list-style-type: disc;
}

.blog-post-body ol {
    list-style-type: decimal;
}

/* Call to action boxes in blog posts */
.blog-post-cta {
    background: #eff6ff;
    border-left: 4px solid var(--primary-navy);
    padding: 2rem;
    border-radius: 0 12px 12px 0;
    margin: 2.5rem 0;
}

.blog-post-cta h5 {
    font-size: 1.15rem;
    color: var(--primary-navy);
    margin-bottom: 0.5rem;
}

.blog-post-cta p {
    font-size: 0.95rem;
    margin-bottom: 0 !important;
}

.blog-post-cta a {
    color: var(--primary-cyan);
    font-weight: 700;
    text-decoration: underline;
}

.blog-post-cta a:hover {
    color: var(--primary-navy);
}

.blog-post-footer-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 3rem;
    padding-top: 1.75rem;
}

.btn-back-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-cyan);
    font-weight: 700;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.btn-back-blog:hover {
    color: var(--primary-navy);
}

.btn-back-blog i {
    width: 18px;
    height: 18px;
}

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2.2rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

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

    .blog-post-hero-img {
        height: 260px;
    }

    .blog-post-title {
        font-size: 1.75rem;
    }

    .blog-post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .related-posts-section {
        margin-top: 2.5rem;
        padding-top: 2rem;
    }
}

/* ─── RELATED POSTS SECTION ───────────────────────────────── */
.related-posts-section {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.related-posts-heading {
    font-size: 1.5rem;
    color: var(--primary-navy);
    font-weight: 700;
    margin-bottom: 1.75rem;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -0.01em;
}

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

.related-post-card {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.related-post-card:hover {
    transform: translateY(-5px);
    background: #fff;
    box-shadow: 0 12px 24px rgba(25, 84, 172, 0.08);
    border-color: rgba(20, 190, 217, 0.25);
}

.related-post-img-wrap {
    width: 100%;
    height: 140px;
    overflow: hidden;
    position: relative;
    background: #e2e8f0;
}

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

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

.related-post-tag {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--primary-cyan);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
}

.related-post-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.related-post-meta {
    font-size: 0.72rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.related-post-meta i {
    font-size: 0.75rem;
    color: var(--primary-cyan);
}

.related-post-title {
    font-size: 0.95rem;
    color: var(--primary-navy);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.related-post-card:hover .related-post-title {
    color: var(--primary-cyan);
}

.related-post-link {
    font-size: 0.8rem;
    color: var(--primary-cyan);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.2s;
    margin-top: auto;
}

.related-post-card:hover .related-post-link {
    gap: 0.5rem;
}

.related-post-link i {
    width: 14px;
    height: 14px;
}