/* ==========================================================================
   BLOG SECTION STYLES
   ========================================================================== */

/* === FORCE DARK NAVIGATION FOR BLOG PAGE === */
/* This section ensures the blog page gets the same dark navy header as index.html */
body nav {
    position: fixed !important;
    top: 0 !important;
    width: 100% !important;
    background: #1e2a3a !important; /* Dark navy blue matching index */
    backdrop-filter: blur(10px) !important;
    padding: 1rem 5% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    z-index: 1000 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

body nav .logo {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

body nav .logo img {
    height: 40px !important;
    width: auto !important;
}

body nav .logo-text {
    color: #ffffff !important; /* White logo text */
    letter-spacing: -0.5px !important;
}

body nav .nav-links {
    display: flex !important;
    gap: 2.5rem !important;
    list-style: none !important;
    align-items: center !important;
    flex: 1 !important;
    justify-content: center !important;
    margin: 0 4rem !important;
}

body nav .nav-links a {
    color: #e0e0e0 !important; /* Light gray links */
    font-weight: 500 !important;
    transition: color 0.3s ease !important;
    text-decoration: none !important;
}

body nav .nav-links a:hover,
body nav .nav-links a.active {
    color: #ffffff !important; /* White on hover */
}

body nav .btn-primary {
    background: #4d94ff !important; /* Blue button matching index */
    color: white !important;
    padding: 0.7rem 1.8rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
    display: inline-block !important;
    text-align: center !important;
    text-decoration: none !important;
}

body nav .btn-primary:hover {
    background: #0066cc !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3) !important;
    color: white !important;
}

/* === BLOG SECTION CONTAINER === */
.blog-section {
    padding: 6rem 5%;
    background: var(--bg-primary);
}

.blog-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* === BLOG HERO === */
.blog-hero {
    margin-top: 80px;
    padding: 4rem 5%;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    text-align: center;
}

.blog-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.blog-hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* === CATEGORY FILTERS === */
.blog-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-weight: 500;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

/* === FEATURED POST === */
.featured-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.featured-post-image {
    position: relative;
    min-height: 400px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
}

.featured-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-category {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.featured-post-content {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.post-date::before {
    content: '📅 ';
}

.post-read-time::before {
    content: '⏱️ ';
}

.featured-post-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.featured-post-content p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* === BLOG GRID === */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

/* === BLOG CARD === */
.blog-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.blog-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 30px rgba(0, 102, 204, 0.1);
    transform: translateY(-5px);
}

.blog-card-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

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

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

.blog-card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-card-content p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:hover {
    color: var(--secondary-color);
    gap: 0.75rem;
}

/* === LOAD MORE BUTTON === */
.blog-load-more {
    text-align: center;
    padding: 2rem 0;
}

/* === PAGINATION === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-btn {
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-weight: 500;
}

.page-btn:hover,
.page-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* === INDIVIDUAL BLOG POST STYLES === */
.post-hero {
    margin-top: 80px;
    padding: 4rem 5%;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    color: white;
    text-align: center;
}

.post-category-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.post-hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.post-meta-hero {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 1rem;
    opacity: 0.9;
}

.post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 5%;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    font-weight: bold;
}

.author-info h4 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.author-info p {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* === POST CONTENT STYLING === */
.post-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.post-content .lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.post-content h2 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: var(--text-dark);
}

.post-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--text-dark);
}

.post-content p {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

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

.post-content li {
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-style: italic;
}

.post-content code {
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 2rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: #d4d4d4;
}

.post-image {
    margin: 2rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: auto;
}

.post-image figcaption {
    padding: 1rem;
    background: var(--bg-secondary);
    font-size: 0.875rem;
    color: var(--text-light);
    text-align: center;
}

/* === KEY TAKEAWAY BOX === */
.key-takeaway {
    background: linear-gradient(135deg, #e6f3ff 0%, #f0f9ff 100%);
    border-left: 4px solid var(--primary-color);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: var(--radius-md);
}

.key-takeaway h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.key-takeaway p,
.key-takeaway ul {
    margin-bottom: 0;
}

/* === POST TAGS === */
.post-tags {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.tag {
    display: inline-block;
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: all var(--transition-normal);
}

.tag:hover {
    background: var(--primary-color);
    color: white;
}

/* === POST NAVIGATION === */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.nav-post {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-normal);
}

.nav-post:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-label {
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.nav-title {
    color: var(--text-dark);
    font-weight: 600;
}

/* === RELATED POSTS === */
.related-posts {
    margin-top: 4rem;
    padding: 3rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.related-posts h2 {
    text-align: center;
    margin-bottom: 2rem;
}

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

.related-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

.related-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.related-card h4 {
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.related-card p {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0;
}

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

    .featured-post {
        grid-template-columns: 1fr;
    }

    .featured-post-image {
        min-height: 300px;
    }

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

@media (max-width: 768px) {
    body nav .nav-links {
        display: none !important;
    }

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

    .blog-hero h1,
    .post-hero h1 {
        font-size: 2rem;
    }

    .post-meta-hero {
        flex-direction: column;
        gap: 0.5rem;
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }

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

    .blog-filters {
        justify-content: flex-start;
    }

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

    .featured-post-content h3 {
        font-size: 1.5rem;
    }
}
