/* ==========================================================================
   File: assets/css/blog-page.css
   ========================================================================== */

:root {
    --primary-dark: #0a1128;
    --primary-darker: #050814; /* Deep cinematic dark for banners */
    --secondary-blue: #1e3a8a;
    --accent-green: #00d084;
    --accent-green-hover: #00a86b;
    --text-main: #334155;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-color-dark: rgba(255, 255, 255, 0.1);
    
    --radius-xl: 24px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-pill: 50px;
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 40px rgba(0, 208, 132, 0.2);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Resets */
.blog-page-wrapper {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

.blog-page-wrapper a {
    text-decoration: none;
    transition: var(--transition);
}

.text-accent { color: var(--accent-green) !important; }
.text-accent-light { color: var(--secondary-blue) !important; }

/* -----------------------------------------
   Hero Banner Section (Strictly Dark/Cinematic)
----------------------------------------- */
.blog-hero {
    background-color: var(--primary-darker);
    background-image: linear-gradient(135deg, var(--primary-darker) 0%, #0a0f1e 100%);
    position: relative;
    padding: 120px 0 100px;
    overflow: hidden;
    color: var(--text-light);
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    opacity: 0.4;
}

.hero-glow-1 { top: -10%; left: -5%; width: 400px; height: 400px; background: var(--secondary-blue); }
.hero-glow-2 { bottom: -20%; right: -5%; width: 500px; height: 500px; background: rgba(0, 208, 132, 0.15); }

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 15px;
}

.hero-container .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.hero-content { flex: 0 0 50%; max-width: 50%; padding-right: 30px; }
.hero-image-col { flex: 0 0 50%; max-width: 50%; }

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color-dark);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 24px;
    backdrop-filter: blur(4px);
}

.hero-title { font-size: 3.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 24px; color: var(--text-light); }
.hero-description { font-size: 1.125rem; color: var(--text-muted); margin-bottom: 40px; max-width: 500px; }

/* Search Bar */
.search-input-wrapper {
    position: relative;
    max-width: 450px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color-dark);
    border-radius: var(--radius-pill);
    padding: 5px 20px;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}
.search-input-wrapper.is-focused { border-color: var(--accent-green); background: rgba(255, 255, 255, 0.1); box-shadow: var(--shadow-glow); }
.search-icon { color: var(--text-muted); font-size: 16px; margin-right: 12px; }
.search-field { background: transparent; border: none; color: var(--text-light); width: 100%; padding: 12px 0; font-size: 16px; outline: none; }
.search-field::placeholder { color: var(--text-muted); }

.hero-illustration img { border-radius: var(--radius-xl); transform: translateY(0); transition: transform 0.5s ease; width: 100%; height: auto; }

/* -----------------------------------------
   Main Layout Grid Integrity
----------------------------------------- */
.main-blog-container { max-width: 1320px; margin: 0 auto; padding: 80px 15px; }
.section-heading { font-size: 2rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 30px; }

.blog-layout-row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.blog-main-feed { flex: 0 0 66.666667%; max-width: 66.666667%; padding: 0 15px; }
.blog-sidebar { flex: 0 0 33.333333%; max-width: 33.333333%; padding: 0 15px; }

/* -----------------------------------------
   Featured Article
----------------------------------------- */
.featured-section { margin-bottom: 80px; }
.featured-article-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}
.featured-article-card:hover { transform: translateY(-5px); box-shadow: 0 25px 30px -5px rgba(0, 0, 0, 0.08); }

.featured-article-card .row { display: flex; flex-wrap: wrap; margin: 0; }
.featured-article-card .col-lg-6 { flex: 0 0 50%; max-width: 50%; }

.featured-image-wrapper { position: relative; height: 100%; min-height: 350px; overflow: hidden; }
.featured-image-wrapper img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; transition: transform 0.7s ease; }
.featured-article-card:hover .featured-image-wrapper img { transform: scale(1.03); }

.featured-badge { position: absolute; top: 20px; left: 20px; background: var(--accent-green); color: #fff; padding: 4px 12px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; letter-spacing: 1px; z-index: 2; text-transform: uppercase; }

.featured-content { padding: 40px; }
.article-category { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 15px; display: inline-block; }
.featured-title { font-size: 2rem; font-weight: 700; line-height: 1.3; margin-bottom: 20px; }
.featured-title a { color: var(--primary-dark); }
.featured-title a:hover { color: var(--secondary-blue); }
.featured-excerpt { color: var(--text-main); font-size: 1.1rem; line-height: 1.6; margin-bottom: 30px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; font-size: 14px; color: var(--text-muted); }
.article-meta i { margin-right: 5px; }

/* -----------------------------------------
   Main Feed (Left Column Lists)
----------------------------------------- */
.feed-article-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}
.feed-article-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

/* Hardcoding native flex to fix image stacking */
.feed-article-card .row { display: flex; flex-wrap: wrap; margin: 0; align-items: center; gap: 0; }
.feed-article-card .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; padding-right: 20px; }
.feed-article-card .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }

.feed-image-wrapper { position: relative; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 16/10; }
.feed-image-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.feed-article-card:hover .feed-image-wrapper img { transform: scale(1.05); }

.feed-content { padding: 10px 0; }
.feed-title { font-size: 1.4rem; font-weight: 700; line-height: 1.3; margin-bottom: 15px; }
.feed-title a { color: var(--primary-dark); }
.feed-title a:hover { color: var(--secondary-blue); }
.feed-excerpt { color: var(--text-main); font-size: 1rem; line-height: 1.5; margin-bottom: 20px; }

.feed-article-card .article-meta { justify-content: space-between; border-top: 1px solid var(--border-color); padding-top: 15px; margin-top: auto; }
.meta-left { display: flex; gap: 15px; flex-wrap: wrap; }

/* Pagination */
.blog-pagination { margin-top: 50px; }
.blog-pagination ul { display: flex; list-style: none; padding: 0; margin: 0; gap: 10px; justify-content: center; }
.blog-pagination .page-numbers { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-main); font-weight: 600; padding-inline: 50px; }
.blog-pagination .page-numbers.current, .blog-pagination .page-numbers:hover { background: var(--secondary-blue); color: #fff; border-color: var(--secondary-blue); }
.blog-pagination .page-numbers.prev, .blog-pagination .page-numbers.next { width: auto; padding: 0 20px; }

/* -----------------------------------------
   Sidebar & Widgets
----------------------------------------- */
.sticky-sidebar-wrapper { position: sticky; top: 30px; }
.sidebar-widget { background: var(--bg-card); border-radius: var(--radius-lg); padding: 30px; margin-bottom: 30px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); }
.widget-title { font-size: 1.25rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--border-color); }

/* Widget Specifics */
.category-list { list-style: none; padding: 0; margin: 0; }
.category-list li { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--border-color); }
.category-list li:last-child { border-bottom: none; padding-bottom: 0; }
.category-list a { color: var(--text-main); font-weight: 500; }
.category-list a:hover { color: var(--secondary-blue); }
.category-list .count { background: var(--bg-main); color: var(--text-muted); font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: var(--radius-pill); }

.recent-post-item { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.recent-post-item:last-child { margin-bottom: 0; }
.recent-thumb { width: 70px; height: 70px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; }
.recent-thumb img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.recent-thumb:hover img { transform: scale(1.1); }
.recent-title { font-size: 14px; font-weight: 600; line-height: 1.4; margin-bottom: 5px; }
.recent-title a { color: var(--primary-dark); }
.recent-title a:hover { color: var(--secondary-blue); }
.recent-date { font-size: 12px; color: var(--text-muted); }

.tags-container { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-pill { background: var(--bg-main); color: var(--text-main); padding: 6px 16px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 500; border: 1px solid var(--border-color); }
.tag-pill:hover { background: var(--secondary-blue); color: #fff; border-color: var(--secondary-blue); }

/* CTA Widget - Dark & Premium */
.widget-cta { background: var(--primary-darker); color: #fff; text-align: center; position: relative; overflow: hidden; border: none; padding: 40px 30px; }
.cta-glow { position: absolute; top: -50px; right: -50px; width: 150px; height: 150px; background: var(--accent-green); border-radius: 50%; filter: blur(60px); opacity: 0.3; }
.cta-heading { color: #fff; font-size: 1.5rem; font-weight: 700; line-height: 1.4; margin-bottom: 25px; position: relative; z-index: 2; }
.btn-primary { display: inline-block; background: var(--accent-green); color: var(--primary-darker); font-weight: 700; padding: 12px 28px; border-radius: var(--radius-pill); border: none; position: relative; z-index: 2; cursor: pointer; transition: var(--transition); }
.btn-primary:hover { background: var(--accent-green-hover); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0, 208, 132, 0.3); }

/* -----------------------------------------
   Newsletter Banner (Dark Constraint Applied)
----------------------------------------- */
.newsletter-section { padding: 0 15px 80px; max-width: 1320px; margin: 0 auto; }
.newsletter-card { background: var(--primary-darker); border-radius: var(--radius-xl); padding: 50px; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.newsletter-card::before { content: ""; position: absolute; bottom: 0; right: 0; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(0, 208, 132, 0.15)); z-index: 0; }

.newsletter-card .row { display: flex; flex-wrap: wrap; align-items: center; margin: 0; }
.newsletter-content { flex: 0 0 50%; max-width: 50%; display: flex; align-items: center; gap: 25px; position: relative; z-index: 1; }
.newsletter-icon { width: 80px; height: 80px; background: var(--secondary-blue); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; color: #fff; flex-shrink: 0; }
.newsletter-subtitle { color: var(--accent-green); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 5px; }
.newsletter-heading { color: #fff; font-size: 2rem; font-weight: 700; line-height: 1.2; margin-bottom: 10px; }
.newsletter-desc { color: var(--text-muted); margin: 0; font-size: 15px; }

.newsletter-form-col { flex: 0 0 50%; max-width: 50%; position: relative; z-index: 1; }
.input-group-custom { display: flex; background: #fff; padding: 8px; border-radius: var(--radius-pill); box-shadow: var(--shadow-md); }
.input-group-custom input { flex: 1; border: none; padding: 10px 25px; border-radius: var(--radius-pill); outline: none; font-size: 15px; color: var(--text-main); }
.input-group-custom .btn-primary { padding: 12px 35px; }

/* -----------------------------------------
   Responsive Breakpoints
----------------------------------------- */
@media (max-width: 1199px) {
    .hero-title { font-size: 3rem; }
    .featured-title { font-size: 1.75rem; }
}

@media (max-width: 991px) {
    .hero-content, .hero-image-col { flex: 0 0 100%; max-width: 100%; padding-right: 0; text-align: center; }
    .hero-content { margin-bottom: 50px; }
    .hero-description { margin: 0 auto 30px; }
    .search-input-wrapper { margin: 0 auto; }
    .hero-illustration { display: none; }
    
    .blog-main-feed, .blog-sidebar { flex: 0 0 100%; max-width: 100%; }
    .featured-article-card .col-lg-6 { flex: 0 0 100%; max-width: 100%; }
    .featured-image-wrapper { min-height: 250px; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
    .featured-content { padding: 30px; }
    
    .blog-sidebar { margin-top: 50px; }
    .sticky-sidebar-wrapper { position: static; }
    
    .newsletter-content, .newsletter-form-col { flex: 0 0 100%; max-width: 100%; }
    .newsletter-content { margin-bottom: 30px; flex-direction: column; text-align: center; }
}

@media (max-width: 767px) {
    .hero-title { font-size: 2.5rem; }
    .featured-title { font-size: 1.5rem; }
    
    .feed-article-card .col-md-5, .feed-article-card .col-md-7 { flex: 0 0 100%; max-width: 100%; padding-right: 0; }
    .feed-article-card { padding: 15px; }
    .feed-image-wrapper { margin-bottom: 15px; aspect-ratio: 16/9; }
    
    .input-group-custom { flex-direction: column; background: transparent; box-shadow: none; padding: 0; gap: 15px; }
    .input-group-custom input { padding: 15px 25px; }
    .input-group-custom .btn-primary { width: 100%; }
    
    .newsletter-card { padding: 30px 20px; }
}