/* =========================================
 * Bing Eater & Smart Grid Styles v11.0
 * Exact Match to User Design
 * ========================================= */

/* =========================================
   1. SIDEBAR STYLES (Bing Eater)
   ========================================= */
.be-sidebar-wrapper { margin: 20px 0; font-family: inherit; }
.be-sidebar-heading { font-size: 1.2rem; text-transform: uppercase; color: #2c3e50; font-weight: 800; margin-bottom: 15px; letter-spacing: 0.5px; border-bottom: 2px solid #eee; padding-bottom: 10px; }
.be-sidebar-list { list-style: none; padding: 0; margin: 0; counter-reset: be-sidebar-counter; }
.be-sidebar-item { position: relative; padding: 15px 15px 15px 50px; margin-bottom: 12px; background-color: #fff; border: 1px solid #f0f0f0; border-left-width: 4px; border-left-style: solid; border-radius: 6px; box-shadow: 0 2px 5px rgba(0,0,0,0.03); transition: all 0.3s ease; counter-increment: be-sidebar-counter; }
.be-sidebar-item:hover { transform: translateX(5px); box-shadow: 0 5px 15px rgba(0,0,0,0.08); }
.be-sidebar-item::before { content: counter(be-sidebar-counter, decimal-leading-zero); position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-weight: 900; color: #e0e0e0; font-size: 24px; line-height: 1; z-index: 1; }
.be-sidebar-item a { text-decoration: none; font-size: 15px; font-weight: 600; color: #2c3e50; display: block; line-height: 1.4; transition: color 0.2s; position: relative; z-index: 2; }
@media (max-width: 600px) { .be-sidebar-item { padding: 12px 12px 12px 45px; } .be-sidebar-item a { font-size: 14px; } }

/* =========================================
   2. HERO GRID STYLES (Popular Posts - Image 1 Design)
   ========================================= */
.sg-hero-section { 
    padding: 50px 0; 
    position: relative; 
    overflow: hidden; 
    background: #f8f9fa;
}

/* Heading Section */
.sg-hero-heading { 
    text-align: center; 
    margin-bottom: 40px; 
    position: relative; 
    z-index: 2; 
}

.sg-hero-heading h2 { 
    font-size: 2.5rem; 
    font-weight: 700; 
    color: #2d3436; 
    margin: 0 0 10px 0; 
    letter-spacing: -0.5px;
}

/* ✨ Gradient underline (matching Image 1) */
.sg-hero-heading h2::after {
    content: '';
    display: block;
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    margin: 15px auto 0;
    border-radius: 2px;
}

.sg-hero-heading .sg-subtitle { 
    font-size: 1rem; 
    color: #636e72; 
    margin-top: 10px; 
    font-weight: 400; 
}

/* HERO GRID LAYOUT */
.sg-hero-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); 
    gap: 25px; 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
    position: relative; 
    z-index: 2; 
}

@media (max-width: 768px) { 
    .sg-hero-grid { 
        grid-template-columns: 1fr; 
        gap: 20px; 
        padding: 0 15px;
    } 
    .sg-hero-heading h2 { font-size: 2rem; } 
}

/* ✨ HERO CARD DESIGN (Exact match to Image 1) */
.sg-post-card { 
    background: #fff; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); 
    transition: all 0.3s ease; 
    position: relative; 
    border: 1px solid #e8e8e8;
}

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

/* ✨ Card Thumbnail (Navy blue with dots pattern - matching Image 1) */
.sg-card-thumb { 
    height: 200px; 
    background: #001f3f; /* Navy blue base */
    background-image: 
        radial-gradient(circle, rgba(102, 126, 234, 0.4) 2px, transparent 2px),
        radial-gradient(circle, rgba(118, 75, 162, 0.3) 1px, transparent 1px);
    background-size: 50px 50px, 30px 30px;
    background-position: 0 0, 25px 25px;
    background-repeat: repeat;
    position: relative; 
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* When actual image exists, show it */
.sg-card-thumb[style*="url"] {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Gradient overlay on image */
.sg-card-thumb::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    background: linear-gradient(to bottom, rgba(0,31,63,0.3), rgba(0,31,63,0.7)); 
    opacity: 0.8;
    z-index: 1;
}

/* ✨ Category Badge (Top-left, blue pill - matching Image 1) */
.sg-cat-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 3;
    background: #4a90e2 !important;
    color: #ffffff !important;
    padding: 5px 12px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1rem !important;
        backdrop-filter: none !important;
    box-shadow: none !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

/* Card Body */
.sg-card-body { 
    padding: 20px; 
    position: relative; 
}

/* ✨ Card Title (Matching Image 1 style) */
.sg-card-title { 
    margin: 0 0 12px 0; 
    font-size: 1.25rem; 
    line-height: 1.4; 
    font-weight: 700; 
}

.sg-card-title a { 
    text-decoration: none; 
    color: #2d3436;
    transition: color 0.2s ease; 
    display: block;
}

.sg-card-title a:hover { 
    color: #667eea;
}

.sg-card-title, 
.sg-card-title a {
    background: transparent !important;
    box-shadow: none !important;
}

/* Card Description */
.sg-card-desc { 
    color: #636e72; 
    font-size: 0.9rem; 
    line-height: 1.6; 
    margin-bottom: 15px; 
}

/* ✨ Card Meta (Date and Author - matching Image 1) */
.sg-card-meta { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding-top: 15px; 
    border-top: 1px solid #e8e8e8; 
    font-size: 0.85rem; 
}

.sg-meta-date { 
    color: #95a5a6; 
    font-size: 0.8rem; 
}

.sg-meta-author { 
    font-weight: 600; 
    color: #667eea;
}

/* ✨ Tag Badge (Top-right corner - removed as not in Image 1) */
.sg-card-tag { 
    display: none; /* Hidden - not visible in Image 1 */
}

/* =========================================
   3. CATEGORY GRID STYLES (Popular Category - Image 2 Design)
   ========================================= */
.sg-cat-section { 
    padding: 50px 0; 
    position: relative; 
    overflow: hidden; 
    background: #fafafa;
}

/* Section Header */
.sg-section-header { 
    text-align: center; 
    margin-bottom: 40px; 
    position: relative; 
    z-index: 2; 
}

.sg-section-header h2 { 
    font-size: 2.5rem; 
    font-weight: 700; 
    color: #2d3436; 
    margin: 0 0 10px 0; 
    letter-spacing: -0.5px;
}

/* ✨ Gradient underline (matching Image 2) */
.sg-section-header h2::after {
    content: '';
    display: block;
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    margin: 15px auto 0;
    border-radius: 2px;
}

.sg-section-header .subtitle { 
    font-size: 1rem; 
    color: #636e72; 
    margin-top: 5px; 
    font-style: normal; 
}

.single-content h3.sg-cat-title {
    margin: 0px;
}

/* ✨ CATEGORY GRID LAYOUT (3 columns - matching Image 2) */
.sg-cat-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

@media (max-width: 1100px) {
    .sg-cat-container { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
    .sg-cat-container { 
        grid-template-columns: 1fr; 
        padding: 0 15px;
    }
    .sg-section-header h2 { font-size: 2rem; }
}

/* ✨ CATEGORY COLUMN CARD (Exact match to Image 2) */
.sg-cat-column { 
    background: #fff; 
    border-radius: 8px; 
    overflow: hidden; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    border: 1px solid #e8e8e8;
    display: flex; 
    flex-direction: column; 
    height: 100%; 
}

.sg-cat-column:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 8px 20px rgba(0,0,0,0.12); 
}

/* ✨ Category Header (Orange gradient - exact match to Image 2) */
.sg-cat-header { 
    padding: 12px 10px; 
    position: relative; 
    text-align: center; 
    flex-shrink: 0; 
    background: linear-gradient(135deg, #ff6b35 0%, #ff8b3d 100%);
    border-radius: 0;
}

/* Arrow pointer at bottom of header (matching Image 2) */
.sg-cat-header::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 10px solid #ff8b3d;
}

.sg-cat-title { 
    font-size: 1.2rem; 
    font-weight: 700; 
    margin: 0; 
    color: #ffffff; 
}

.sg-cat-title span {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    margin-left: 8px;
    vertical-align: middle;
    display: inline-block;
}

.sg-cat-subtitle { 
    display: block; 
    font-size: 0.7rem; 
    color: rgba(255,255,255,0.95); 
    text-transform: uppercase; 
    letter-spacing: 1.5px; 
    font-weight: 600;
}

/* ✨ SCROLL LIST (Matching Image 2 - white background, clean list) */
.sg-scroll-box { 
    height: 300px; 
    overflow-y: auto; 
    background: #fff; 
    scrollbar-width: thin; 
    scrollbar-color: #ff6b35 #f5f5f5;
    padding: 0;
}

.sg-scroll-box::-webkit-scrollbar { 
    width: 6px; 
}

.sg-scroll-box::-webkit-scrollbar-track { 
    background: #f5f5f5; 
}

.sg-scroll-box::-webkit-scrollbar-thumb { 
    background-color: #ff6b35; 
    border-radius: 3px;
}

.sg-scroll-box::-webkit-scrollbar-thumb:hover {
    background-color: #ff8b3d;
}

/* ✨ Post List Items (Exact match to Image 2) */
.sg-post-list { 
    padding: 0; 
    margin: 0; 
    list-style: none; 
}

.sg-post-item { 
    padding: 18px 20px; 
    border-bottom: 1px solid #f0f0f0; 
    transition: background 0.2s; 
    position: relative;
}

.sg-post-item:last-child { 
    border-bottom: none; 
}

.sg-post-item:hover { 
    background: #fffbf7; 
}

/* Orange dot indicator on hover */
.sg-post-item::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #ff6b35;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.sg-post-item:hover::before {
    opacity: 1;
}

.sg-post-item a { 
    color: #2d3436; 
    text-decoration: none; 
    font-size: 0.95rem; 
    font-weight: 600; 
    display: block; 
    margin-bottom: 6px; 
    line-height: 1.4; 
    transition: color 0.2s, padding-left 0.2s;
}

.sg-post-item:hover a {
    color: #ff6b35;
    padding-left: 12px;
}

.sg-post-meta { 
    font-size: 0.75rem; 
    color: #95a5a6; 
    display: block; 
}

/* ✨ Category Footer (View All button - matching Image 2) */
.sg-cat-footer { 
    padding: 15px; 
    text-align: center; 
    background: #fafafa; 
    border-top: 1px solid #f0f0f0; 
    margin-top: auto; 
    flex-shrink: 0; 
}

.sg-action-btn {
    display: inline-block;
    padding: 0px 25px;
    background: #ff6b35;
    border: 2px solid #ff6b35;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: capitalize;
    transition: all 0.3s;
    letter-spacing: 0.5px;
}

.sg-action-btn:hover { 
    background: #ff6b35;
    color: #fff; 
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* Arrow icon in button */
.sg-action-btn::after {
    content: ' →';
    margin-left: 5px;
    transition: margin-left 0.3s;
}

.sg-action-btn:hover::after {
    margin-left: 10px;
}