/* 
 * Boolokam Main CSS File
 * A consolidated CSS file for the entire site
 * Version: 2.0.3
 */

/* Base Styles */
:root {
    /* Primary Colors */
    --primary-color: #3a86ff;
    --primary-rgb: 0, 0, 0;
    --primary-dark: #222222;
    
    /* Secondary Colors */
    --secondary-color: #6c757d;
    --secondary-rgb: 108, 117, 125;
    --secondary-dark: #5a6268;
    
    /* Accent Colors */
    --accent-color: #000000;
    --accent-rgb: 230, 57, 70;
    --accent-dark: #000000;
    
    /* Status Colors */
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --error-color: #000000;
    
    /* Background Colors */
    --dark-bg: #343a40;
    --light-bg: #f8f9fa;
    --color-background-hover: #f9f9f9;
    
    /* Text Colors */
    --text-color: #212529;
    --heading-color: #000000;
    --muted-text: #6c757d;
    --light-text: #ffffff;
    
    /* Component Colors */
    --border-color: #dee2e6;
    --card-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --header-bg: #ffffff;
    --header-text: #000000;
    --nav-bg: #f0f0f0;
    --nav-text: #ffffff;
    --nav-hover: #ffffff;
    --button-bg: #000000;
    --button-text: #ffffff;
    --footer-bg: #000000;
    --footer-text: #ffffff;
    
    /* Layout Variables */
    --container-width: 1200px;
    --gutter: 20px;
    --sidebar-width: 240px;
    --sidebar-width-collapsed: 60px;
    --header-height: 50px;
    --tradingview-height: 40px;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color, #fff);
    margin: 0;
    padding: 0;
    padding-top: var(--tradingview-height); /* Add padding for the fixed TradingView widget */
    overflow-x: hidden;
}

body > * {
    flex-shrink: 0;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 12px;
}

/* Layout styles - Improved for better responsiveness */
.main-content {
    display: flex;
    min-height: calc(100vh - var(--tradingview-height)); /* Account for TradingView widget height */
    position: relative;
    width: 100%;
}

main {
    flex: 1;
    min-width: 0;
    padding: 15px;
    order: 2; /* Make main content load after sidebar */
    transition: margin-left 0.3s ease, width 0.3s ease;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
}

/* Hero Section Styles */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
    height: auto;
}

.trending-column {
    grid-column: 1 / 2;
    display: flex;
    flex-direction: column;
}

.featured-column {
    grid-column: 2 / 3;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.videos-column {
    grid-column: 3 / 4;
}

.hero-section .column {
    background-color: #fff;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.column-header {
    padding: 12px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.column-header h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.column-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure it takes full height */
}

/* Trending Section */
.trending-list {
    counter-reset: trending-counter;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.trending-item {
    padding: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    display: flex;
    flex-direction: column;
}

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

.trending-meta {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: #888;
    margin-bottom: 5px;
}

.trending-meta::before {
    counter-increment: trending-counter;
    content: counter(trending-counter);
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-color);
    margin-right: 5px;
}

.trending-meta .category {
    font-weight: 600;
    color: var(--accent-color);
    text-transform: uppercase;
}

.trending-title {
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
}

.trending-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 12px;
    color: #555;
}

.trending-stats span {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #555;
    flex: 1;
    text-align: center;
}

.trending-stats span i {
    margin-right: 5px;
    font-size: 12px;
}

/* Featured Section */
.featured-section {
    margin-bottom: 30px;
}

.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.featured-main {
    grid-row: span 2;
}

/* Add featured-secondary-row with explicit 2-column layout */
.featured-secondary-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.featured-primary {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.featured-secondary {
    margin-bottom: 15px;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.featured-primary:hover,
.featured-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.featured-primary a.full-card-link,
.featured-secondary a.full-card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    text-decoration: none;
    background: transparent;
    border-radius: inherit;
}

.featured-image {
    position: relative;
    height: 0;
    padding-bottom: 45%;
    overflow: hidden;
}

.featured-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-category-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--accent-color);
    color: #fff;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    display: inline-block;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 2;
}

.card .featured-category-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    font-size: 11px;
    padding: 3px 8px;
}

.featured-content {
    padding: 15px 15px 0px 15px;
    flex-direction: column;
    height: 100%;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.featured-content h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.featured-primary .featured-content h3 a,
.featured-secondary .featured-content h3 a {
    position: relative;
    z-index: 2;
    color: var(--heading-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.featured-primary .featured-content h3 a:hover,
.featured-secondary .featured-content h3 a:hover {
    color: var(--accent-color);
}

.featured-content p {
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Post Meta with views, date, author */
.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #777;
}

.post-meta .view-count {
    display: flex;
    align-items: center;
}

.post-meta .view-count i {
    margin-right: 4px;
}

.post-meta .divider {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #ccc;
    margin: 0 5px;
}

/* Post Stats - Updated styling for proper positioning and interactions */
.post-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background-color: #fafafa;
    width: 100%;
    margin-top: auto; /* Push to the bottom of flex container */
    padding: 0;
}

.post-stats span {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    text-align: center;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
    padding: 12px 0;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.post-stats span:last-child {
    border-right: none;
}

.post-stats span:hover {
    background-color: #f0f0f0;
    color: #0078ff;
}

.post-stats span.active {
    color: #0078ff;
    font-weight: 600;
}

.post-stats span.active i {
    transform: scale(1.1);
}

.post-stats span i {
    margin-right: 6px;
    transition: transform 0.2s ease;
}

/* Featured content post stats */
.featured-content .post-stats {
    margin-top: auto; /* Push to bottom */
    background-color: #fafafa;
    width: calc(100% + 30px);
    margin-left: -15px;
    margin-right: -15px;
    border-radius: 0 0 16px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 0; /* Remove margin to avoid spacing issues */
    position: relative;
}

.featured-primary .featured-content .post-stats {
    bottom: 0;
    left: 0;
}

/* Latest item stats */
.latest-item .post-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto; /* Push to bottom */
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    width: 100%;
    background-color: #fafafa;
    border-radius: 0 0 12px 12px;
}

.latest-item .post-stats span {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b8b8b;
    font-size: 13px;
    font-weight: 500;
    flex: 1;
    text-align: center;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
    padding: 10px 0;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 3; /* Higher than card link */
}

.latest-item .post-stats span:last-child {
    border-right: none;
}

.latest-item .post-stats span:hover {
    background-color: #f0f0f0;
    color: #000;
}

.latest-item .post-stats span.active {
    color: var(--accent-color);
}

.latest-item .post-stats span i {
    margin-right: 8px;
    font-size: 14px;
}

/* Card post stats */
.card .post-stats {
    margin-top: auto;
    border-radius: 0 0 16px 16px;
    overflow: hidden;
}

/* Latest news section cards */
.latest-news-section .card .post-stats {
    margin-top: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background-color: #fafafa;
    height: 40px; /* Fixed height for the stats section */
    border-radius: 0 0 16px 16px; /* Match the card's border radius */
}

/* Tags and Categories */
.tag {
    display: inline-block;
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 3px 10px;
    margin: 0 4px 4px 0;
    font-size: 12px;
    color: var(--text-color);
    transition: var(--transition);
}

.tag:hover {
    background-color: var(--primary-color);
    color: var(--light-text);
    border-color: var(--primary-color);
}

.category-badge {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--light-text);
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
    text-transform: uppercase;
}

/* Author Box */
.author-box {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: var(--light-bg);
    border-radius: 6px;
    margin: 20px 0;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-name {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--heading-color);
}

.author-bio {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--text-color);
}

.author-social {
    display: flex;
    gap: 8px;
}

.author-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: var(--light-text);
}

.author-social a:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

/* TradingView Widget Styling - Moved here above the header */
.tradingview-widget-container {
    margin: 0;
    padding: 0;
    line-height: 0;
    display: block;
    height: auto;
    font-size: 0;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
}

.tradingview-widget-container{
    height: 40px !important;
}

.tradingview-widget-container__widget {
    margin: 0;
    padding: 0;
    width: 100% !important;
    overflow: hidden;
}

.tradingview-widget-copyright {
    display: none;
}

/* Header Styles */
.site-header {
    position: fixed;
    top: var(--tradingview-height);
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    background-color: var(--header-bg);
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 5px 10px;
}

.logo{
    width:170px;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.news-tag {
    background-color: #000;
    color: #fff;
    padding: 4px 6px;
    font-weight: bold;
    font-size: 12px;
    margin-right: 8px;
}

.site-title {
    color: var(--header-text);
    font-size: 20px;
    font-weight: bold;
}

.search-box {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box input {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
    width: 180px;
    background-color: #f2f2f2;
    font-weight: 500;
    color: #333;
    text-transform: uppercase;
}

.search-box input::placeholder {
    color: #777;
    font-weight: 500;
    text-transform: uppercase;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.date-weather {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 12px;
    color: var(--text-color);
}

.date {
    font-weight: 500;
    color: #666;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notifications {
    position: relative;
    color: var(--text-color);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-color);
    color: var(--light-text);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    background-color: var(--accent-color);
    color: var(--light-text);
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.share-btn:hover {
    background-color: var(--accent-dark);
    text-decoration: none;
    color: var(--light-text);
}

.share-btn svg {
    width: 18px;
    height: 18px;
}

/* Header Navigation */
.categories-nav {
    display: flex;
    flex-direction: column;
}

.content-type-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 8px 0;
    border-bottom: 1px solid #eee;
}

.content-type-nav li {
    margin-right: 15px;
}

.content-type-nav a {
    display: block;
    padding: 6px 12px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    font-size: 13px;
}

.content-type-nav a.active {
    color: var(--accent-color, #0066cc);
    border-bottom: 2px solid var(--accent-color, #0066cc);
}

.main-nav .category-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-nav .category-list a {
    display: block;
    padding: 4px 8px;
    text-decoration: none;
    color: #333;
    font-size: 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.main-nav .category-list a:hover {
    background-color: #f5f5f5;
}

.main-nav .category-list a.active {
    background-color: var(--accent-color);
    color: white !important;
}

.main-nav {
    background-color: var(--nav-bg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
}

.nav-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 12px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.categories-nav {
    display: flex;
    padding: 8px 0;
}

.categories-nav::-webkit-scrollbar {
    display: none;
}

.categories-nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-nav li {
    margin-right: 8px;
}

.main-nav a {
    display: block;
    padding: 6px 12px;
    color: #333;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.main-nav a:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #000;
    transform: translateY(-2px);
}

.main-nav a.active {
    background-color: var(--accent-color);
    color: var(--light-text);
    font-weight: 600;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2001;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background: #000;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 250px;
    height: 100vh;
    background-color: #f5f5f5;
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
}

.mobile-sidebar-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
}

/* Mobile overlay when menu is open */
body.mobile-menu-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    backdrop-filter: blur(2px);
}

body.mobile-menu-open .mobile-sidebar {
    left: 0;
}

.mobile-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-menu-open .mobile-sidebar-overlay {
    display: block;
}

/* Desktop styles with improved sidebar handling */
@media (min-width: 769px) {
    body {
        padding-left: 0;
        padding-top: var(--tradingview-height);
    }
    
    main {
        margin-top: var(--header-height);
    }
    
    .layout-wrapper {
        display: flex;
        min-height: 100vh;
    }
    
    .sidebar {
        transition: width 0.3s ease;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
}

/* Medium Screens - improved responsive behavior */
@media (max-width: 992px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-main {
        grid-row: auto;
    }
    
    /* Adjust hero section for medium screens - only override the grid-template-columns */
    .hero-section {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .featured-secondary-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .trending-column {
        order: 1;
    }
    
    .latest-news-section .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Adjust sidebar and main content for medium screens */
    .sidebar {
        width: 200px;
    }
    
    main {
        margin-left: 200px;
        width: calc(100% - 200px);
    }
    
    .main-content.sidebar-collapsed {
        margin-left: var(--sidebar-width-collapsed);
        width: calc(100% - var(--sidebar-width-collapsed));
    }
}

/* Mobile Devices - completely redesigned for mobile */
@media (max-width: 768px) {
    /* Layout adjustments */
    .main-content {
        flex-direction: column;
    }
    
    body {
        padding-left: 0 !important;
        padding-top: var(--tradingview-height); /* Space for TradingView widget */
    }
    
    main {
        width: 100% !important;
        order: 1; /* On mobile, main content comes first */
        margin-top: var(--header-height); /* Adjusted for header height + TradingView widget height on mobile */
        margin-left: 0 !important; /* Remove sidebar margin */
        padding: 10px;
    }
    
    /* Stack hero section vertically on mobile - only override the grid-template-columns */
    .hero-section {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .trending-column,
    .featured-column,
    .videos-column {
        grid-column: 1;
    }
    
    /* Mobile sidebar handling */
    .sidebar {
        display: none !important; /* Hide the desktop sidebar on mobile */
    }
    
    /* Show the mobile toggle button */
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        margin-left: 15px;
        z-index: 2001;
    }
    
    .mobile-menu-toggle span {
        width: 100%;
        height: 3px;
        background-color: #000;
        border-radius: 3px;
        transition: all 0.3s ease-in-out;
    }
    
    /* Mobile sidebar specific styles */
    .mobile-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 250px;
        height: 100vh;
        background-color: #fff;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
        z-index: 2000;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        visibility: visible;
        padding: 15px;
    }
    
    body.mobile-menu-open .mobile-sidebar {
        transform: translateX(0);
    }
    
    /* Mobile overlay when menu is open */
    body.mobile-menu-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1500;
        backdrop-filter: blur(2px);
    }
    
    /* Mobile sidebar close button */
    .mobile-sidebar-close {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 24px;
        background: none;
        border: none;
        cursor: pointer;
    }
    
    /* Side-scrolling nav container on mobile */
    .nav-container {
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    
    .nav-container::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .categories-nav,
    .categories-nav ul {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
    }
    
    .categories-nav li {
        flex: 0 0 auto !important;
    }
}

/* Small Screens */
@media (max-width: 576px) {
    .logo a {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .user-actions {
        margin-top: 12px;
    }
    
    .login-btn, .signup-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .date-weather {
        display: none;
    }
    
    .content-grid,
    .grid-2-col,
    .grid-3-col,
    .grid-4-col {
        grid-template-columns: 1fr;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .latest-news-section .grid-container {
        grid-template-columns: 1fr;
    }
}

/* IE Support */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    .tradingview-widget-container {
        height: 40px !important;
    }
}

/* Latest Videos/Movies Tabs */
.tabs-header {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 12px;
}

.tab-button {
    padding: 8px 12px;
    background: #fff;
    border: none;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    color: #333;
    position: relative;
    align-items: center;
    justify-content: center;
    text-align: center;
    display: flex;
    width: 100%;
    transition: all 0.3s ease;
}

.tab-button.active {
    color: white;
    background-color: #000;
}

.tab-button.active::after {
    content: none;
}

.tab-content {
    display: none;
    flex-direction: column;
    gap: 0;
}

.tab-content.active {
    display: flex;
}

/* Latest Item Styles - Enhanced */
.latest-item {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 15px;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.latest-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.15);
}

.latest-item-header {
    display: flex;
    padding: 12px;
    gap: 16px;
}

.latest-thumb {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f5f5f5;
}

.latest-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 28px;
    text-shadow: 0 0 5px rgba(0,0,0,0.6);
    z-index: 3;
}

.latest-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Enable text truncation in flexbox */
}

.latest-details h1 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.latest-details h1 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.latest-details h1 a:hover {
    color: var(--accent-color);
}

.latest-details .category-tag {
    display: inline-block;
    background-color: #000;
    color: #fff;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.latest-details .post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
}

.latest-details .view-count {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.latest-details .view-count i {
    margin-right: 4px;
    font-size: 14px;
}

.latest-details .post-date {
    color: #777;
    font-size: 12px;
}

.latest-details p {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.latest-item .post-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    width: 100%;
    background-color: #fafafa;
}

.latest-item .post-stats span {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b8b8b;
    font-size: 13px;
    font-weight: 500;
    flex: 1;
    text-align: center;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
    padding: 10px 0;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.latest-item .post-stats span:last-child {
    border-right: none;
}

.latest-item .post-stats span:hover {
    background-color: #f0f0f0;
    color: #000;
}

.latest-item .post-stats span i {
    margin-right: 8px;
    font-size: 14px;
}

/* Media queries for mobile */
@media (max-width: 768px) {
    /* Latest item mobile styles */
    .latest-item {
        border-radius: 10px;
        margin-bottom: 10px;
    }
    
    .latest-item-header {
        padding: 10px;
        gap: 10px;
    }
    
    .latest-thumb {
        width: 80px;
        height: 80px;
        border-radius: 6px;
    }
    
    .latest-details h1 {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .latest-details .category-tag {
        padding: 2px 6px;
        font-size: 10px;
    }
    
    .latest-details .view-count {
        font-size: 12px;
    }
    
    .latest-details .view-count i {
        font-size: 12px;
    }
    
    .latest-details .post-date {
        font-size: 11px;
    }
    
    .latest-item .post-stats span {
        font-size: 12px;
        padding: 8px 0;
    }
    
    .latest-item .post-stats span i {
        font-size: 12px;
        margin-right: 4px;
    }
}

/* Improved Sidebar styles */
.sidebar {
    position: fixed;
    top: calc(var(--tradingview-height) + var(--header-height));
    bottom: 0;
    left: 0;
    width: var(--sidebar-width);
    z-index: 900;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    padding: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    order: 1;
    transition: width 0.3s ease, transform 0.3s ease;
}

.sidebar.collapsed {
    width: var(--sidebar-width-collapsed);
    min-width: var(--sidebar-width-collapsed);
}

.sidebar.collapsed .sidebar-content,
.sidebar.collapsed .sidebar-section,
.sidebar.collapsed .sidebar-navigation,
.sidebar.collapsed .whatsapp-follow,
.sidebar.collapsed .social-media-component {
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    overflow: hidden;
    transition: opacity 0.2s;
}

.main-content.sidebar-collapsed {
    margin-left: var(--sidebar-width-collapsed);
    width: calc(100% - var(--sidebar-width-collapsed));
}

.sidebar-collapse {
    display: block;
    position: absolute;
    top: 10px;
    right: -14px;
    z-index: 1100;
}

#sidebar-collapse-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

/* Enhanced Sidebar Navigation */
.sidebar-navigation {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.sidebar-navigation .nav-btn {
    display: block;
    padding: 8px 12px;
    text-align: center;
    background-color: #eaeaea;
    color: #333;
    font-weight: 600;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 13px;
}

.sidebar-navigation .nav-btn:hover {
    background-color: #ddd;
    transform: translateY(-2px);
}

.sidebar-navigation .nav-btn.active {
    background-color: var(--accent-color);
    color: #fff;
}

/* Sidebar Categories with improved spacing */
.sidebar-section h3 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    padding: 15px 0px 0px 0px;
    border-top: 1px solid #e5e5e5;
}

.sidebar-section .category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-section .category-list li {
    margin-bottom: 6px;
}

.sidebar-section .category-list a {
    display: flex;
    align-items: center;
    padding: 8px;
    text-decoration: none;
    color: #444;
    background-color: #f9f9f9;
    border-radius: 5px;
    transition: all 0.2s ease;
    font-size: 13px;
}

.sidebar-section .category-list a:hover {
    background-color: #eaeaea;
    transform: translateX(3px);
}

.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    color: #555;
}

.sidebar-content {
    flex-grow: 1;
    overflow-y: auto;
}

/* Sidebar social media styles */
.social-media-component {
    margin-top: 20px;
    padding: 0px;
    border-radius: 5px;
}

.social-media-header h3 {
    font-size: 16px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e5e5;
}

.social-media-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0px;
    justify-content: space-between;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transition: all 0.2s ease;
    color: #333;
}

.social-icon:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-3px);
}

.whatsapp-follow {
    margin-top: 15px;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    background-color: #25D366;
    color: white;
    border-radius: 5px;
    font-weight: 600;
    font-size: 14px;
    gap: 8px;
    transition: all 0.2s ease;
}

.whatsapp-btn:hover {
    background-color: #1eb856;
    text-decoration: none;
    color: white;
}

/* Footer Styles */
.site-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-wrapper {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-section p {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #ccc;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 14px;
}

.footer-section ul li a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: #888;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Full Card Link - makes entire cards clickable */
.full-card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    text-decoration: none;
    background: transparent;
    border-radius: inherit;
}

/* Ensure other clickable elements are above the full-card link */
.trending-item h4 a,
.featured-primary h3 a,
.featured-secondary h3 a,
.card h3 a,
.trending-category,
.featured-category-tag,
.post-stats,
.post-stats span,
.post-stats i,
.trending-stats,
.trending-content a,
.featured-content a,
.latest-item h3 a,
.latest-details a,
.latest-category,
.latest-thumb .play-icon {
    position: relative;
    z-index: 2;
}

/* Position context for the full-card-link */
.trending-item,
.featured-primary,
.featured-secondary,
.card,
.latest-item {
    position: relative;
    transition: all 0.3s ease;
    border-radius: 4px;
}

/* Hover state for trending items */
.trending-item:hover {
    background-color: var(--color-background-hover);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Hover state for featured items */
.featured-primary:hover,
.featured-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Card hover effect */
.card:hover,
.latest-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: var(--color-background-hover);
}

/* Latest News Section */
.latest-news-section {
    margin-bottom: 30px;
}

.latest-news-section .grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 15px;
}

.latest-news-section .grid-item {
    height: 100%;
    display: flex;
}

.latest-news-section .card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

/* Ensure all images maintain aspect ratio */
.card img, 
.featured-image img,
.latest-thumb img {
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Image loading animation */
.image-loading {
    position: relative;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.card:hover img,
.featured-primary:hover img, 
.featured-secondary:hover img,
.latest-item:hover img {
    transform: scale(1.05);
}

/* Fix grid layout for latest news */
.latest-news-section .grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 15px;
}

.latest-news-section .grid-item {
    height: 100%;
    display: flex;
}

.latest-news-section .card {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.latest-news-section .card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    aspect-ratio: 16/9;
    transition: transform 0.3s ease;
}

.latest-news-section .card:hover img {
    transform: scale(1.05);
}

.latest-news-section .card .post-stats {
    margin-top: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background-color: #fafafa;
    height: 40px; /* Fixed height for the stats section */
    border-radius: 0 0 16px 16px; /* Match the card's border radius */
}

.latest-news-section .card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.latest-news-section .card .featured-category-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

/* Improved mobile layout for latest news section */
@media (max-width: 992px) {
    .latest-news-section .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .latest-news-section .card img {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .latest-news-section .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .latest-news-section .card img {
        height: 160px;
    }
}

@media (max-width: 576px) {
    .latest-news-section .grid-container {
        grid-template-columns: 1fr;
    }
    
    .latest-news-section .card img {
        height: 200px;
    }
    
    /* Full width cards on mobile */
    .latest-news-section .card {
        width: 100%;
        margin-bottom: 15px;
        border-radius: 12px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .latest-news-section .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }
}

/* Image Placeholder Styles with transition */
.img-fallback {
    object-fit: cover;
    background-color: #f0f0f0;
    border: 1px solid #e0e0e0;
    display: block;
    width: 100%;
    max-width: 100%;
    transition: opacity 0.3s ease;
}

.broken-image {
    position: relative;
}

.broken-image::before {
    content: "Image Unavailable";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #888;
    font-size: 12px;
    z-index: 1;
    text-align: center;
    width: 100%;
}

.card .img-fallback {
    height: 180px;
    width: 100%;
}

.featured-image .img-fallback {
    height: 100%;
    min-height: 300px;
}

.latest-thumb .img-fallback {
    aspect-ratio: 16/9;
    min-height: 180px;
}

@media (max-width: 768px) {
    .latest-thumb .img-fallback {
        min-height: 120px;
    }
}

/* Fix for mobile sidebar issue */
#mobile-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background-color: white;
    z-index: 1000;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

body.mobile-menu-open #mobile-sidebar {
    display: block;
    left: 0;
}

body.mobile-menu-open::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Mobile sidebar button */
.mobile-sidebar-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    padding: 5px;
    z-index: 2;
}

/* Cards - Ensure proper flex layout to push stats to bottom */
.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 15px;
    position: relative;
}

.card-text-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Post Stats - Updated styling for proper positioning and interactions */
.post-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background-color: #fafafa;
    width: 100%;
    margin-top: auto; /* Push to the bottom of flex container */
    padding: 0;
}

.post-stats span {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    text-align: center;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
    padding: 12px 0;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.post-stats span:last-child {
    border-right: none;
}

.post-stats span:hover {
    background-color: #f0f0f0;
    color: #0078ff;
}

.post-stats span.active {
    color: #0078ff;
    font-weight: 600;
}

.post-stats span.active i {
    transform: scale(1.1);
}

.post-stats span i {
    margin-right: 6px;
    transition: transform 0.2s ease;
}

/* Ensure stats are at bottom in featured posts */
.featured-primary {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.featured-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.featured-content .post-stats {
    margin-top: auto;
} 