body {
    background: #ffffff;
    color: #0f172a;
}

.market-dashboard-hero {
    max-width: 1200px;
    margin: 20px auto 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 24px;
    background: #081529;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.market-widget,
.volume-widget {
    background: #061630;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

.volume-widget {
    padding: 0;
    overflow: hidden;
}

.volume-widget img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.market-widget h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gainers-title {
    color: #22c55e !important;
}

.losers-title {
    color: #ef4444 !important;
}

.market-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 600;
}

.market-row:last-child {
    border-bottom: none;
}

.green {
    color: #22c55e;
    font-weight: 700;
}

.red {
    color: #ef4444;
    font-weight: 700;
}

.category-hero {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto 0;
    height: 260px;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    padding: 0 40px;
}

.category-hero-content {
    max-width: 600px;
    z-index: 2;
    position: relative;
}

.category-hero-content h1 {
    font-family: 'Poppins', 'Noto Sans Telugu', sans-serif;
    font-size: 44px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 12px;
}

.category-hero-content p {
    font-size: 16px;
    color: #f1f5f9;
    line-height: 1.5;
    margin: 0;
}

.category-section {
    max-width: 100%;
}

.category-main-layout {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 24px auto 60px;
    padding: 0 20px;
    align-items: flex-start;
}

.category-left-feed {
    flex: 1;
    min-width: 0;
}

.category-right-sidebar {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.category-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.category-post-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    text-decoration: none;
    color: #0f172a;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.category-post-card:hover {
    transform: translateY(-2px);
}

.category-post-image {
    width: 220px;
    height: 130px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

.category-post-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.5s ease;
    border-radius: 7px;
}

.category-post-card:hover .category-post-image img {
    transform: scale(1.02);
}

.category-post-body {
    flex-grow: 1;
    min-width: 0;
}

.category-post-date {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #64748b;
    font-size: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 8px;
    white-space: nowrap;
}

.category-post-date i {
    color: #2563eb;
    font-size: 12px;
}

.category-post-title {
    font-family: 'Poppins', 'Noto Sans Telugu', sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    color: #0f172a;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.category-post-card:hover .category-post-title {
    color: #2563eb;
}

.category-post-excerpt {
    font-size: 12px;
    line-height: 1.6;
    color: #475569;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Sidebar Widgets for Category Page */
.category-sidebar-widget {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.category-sidebar-widget .widget-title {
    font-family: 'Poppins', 'Noto Sans Telugu', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #2563eb;
}

.sidebar-articles-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-article-card {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: #0f172a;
    align-items: center;
    transition: color 0.2s ease;
}

.sidebar-article-card:hover {
    color: #2563eb;
}

.sidebar-article-card img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.sidebar-article-body {
    flex-grow: 1;
    min-width: 0;
}

.sidebar-article-body h4 {
    font-family: 'Poppins', 'Noto Sans Telugu', sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    color: #0f172a;
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-article-body span {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
}

.sidebar-disclaimer-body {
    font-size: 12px;
    line-height: 1.5;
    color: #475569;
}

.trading-disclaimer {
    margin-top: 40px;
    padding: 18px 22px;
    background: #f8fafc;
    border-radius: 8px;
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2563eb;
}

.pagination-wrap {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-wrap a,
.pagination-wrap span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    margin: 0;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.pagination-wrap a:hover {
    border-color: #cbd5e1;
    color: #0f172a;
    background: #f8fafc;
    transform: translateY(-1px);
}

.pagination-wrap .active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.empty-box {
    padding: 60px;
    text-align: center;
    font-size: 18px;
    color: #64748b;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px dashed #e2e8f0;
}

@media (max-width: 992px) {
    .category-main-layout {
        flex-direction: column;
        gap: 30px;
        margin: 16px auto 40px;
    }
    .category-left-feed {
        width: 100%;
    }
    .category-right-sidebar {
        width: 100%;
    }
    .market-dashboard-hero {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 20px;
    }
    .category-hero {
        height: 220px;
        padding: 0 30px;
    }
    .category-hero-content h1 {
        font-size: 34px;
    }
    .category-hero-content p {
        font-size: 14px;
    }
    .category-post-card {
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
        padding-bottom: 20px;
    }
    .category-post-image {
        width: 160px;
        height: 100px;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .market-dashboard-hero {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }
    .category-hero {
        height: 180px;
        padding: 0 20px;
        margin: 10px auto 0;
        border-radius: 12px;
    }
    .category-hero-content h1 {
        font-size: 28px;
    }
    .category-posts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .category-post-card {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        padding-bottom: 16px;
    }
    .category-post-image {
        width: 120px;
        height: 80px;
        flex-shrink: 0;
    }
    .category-post-body {
        padding: 0;
        margin-top:8px;
    }
    .category-post-title {
        font-size: 12px;
        line-height: 1.4;
        margin-bottom: 4px;
    }
    .category-post-excerpt {
        display: none !important;
    }
    .category-post-date {
        margin-bottom: 4px;
    }
    .category-section {
        margin: 24px auto 40px;
    }
}

/* Category Carousel Styles */
.category-carousel-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    background: #0f172a;
}

#categoryCarousel {
    width: 100%;
}

.category-carousel-wrapper .carousel-item {
    height: 380px;
    position: relative;
    background: #0b0f19;
}

.carousel-slide-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
    z-index: 5;
}

.category-carousel-wrapper .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0f172a;
    display: block;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.4) 60%, rgba(15, 23, 42, 0.15) 100%);
    z-index: 1;
}

.carousel-caption-custom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 40px 40px 80px;
    z-index: 2;
    color: #ffffff;
    max-width: 800px;
    text-align: left;
}

.carousel-badge {
    display: inline-block;
    background: #2563eb;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.carousel-caption-custom h2 {
    font-family: 'Poppins', 'Noto Sans Telugu', sans-serif;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 12px;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-caption-custom p {
    font-size: 15px;
    color: #cbd5e1;
    line-height: 1.55;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2563eb;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.carousel-slide-link:hover .carousel-read-btn {
    background: #1d4ed8;
    transform: translateX(2px);
}

/* Ensure carousel controls are visible, styled, and aligned */
.carousel-control-prev,
.carousel-control-next {
    width: 60px !important;
    opacity: 0.8 !important;
    z-index: 10 !important;
    transition: 0.2s !important;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1 !important;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 2.2rem !important;
    height: 2.2rem !important;
    background-color: rgba(15, 23, 42, 0.6) !important;
    background-size: 55% 55% !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Carousel Responsive styling */
@media (max-width: 992px) {
    .category-carousel-wrapper .carousel-item {
        height: 320px;
    }
    .carousel-caption-custom h2 {
        font-size: 24px;
    }
    .carousel-caption-custom p {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .category-carousel-wrapper {
        border-radius: 12px;
        margin: 10px auto 0;
    }
    .category-carousel-wrapper .carousel-item {
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .carousel-caption-custom {
        padding: 20px 20px 20px 50px;
    }
    .carousel-caption-custom h2 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    .carousel-caption-custom p {
        display: none !important;
    }
    .carousel-badge {
        padding: 4px 10px;
        font-size: 10px;
        margin-bottom: 10px;
    }
    .carousel-read-btn {
        display: none !important;
    }
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px !important;
    }
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 1.8rem !important;
        height: 1.8rem !important;
    }
}
