/* ============================================
   TimesBull Core Theme CSS
   Version: 3.0.0 - ENTERPRISE
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #e74c3c;
    --primary-dark: #c0392b;
    --primary-light: #fee2e2;
    --text-dark: #222222;
    --text-medium: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --border-light: #eeeeee;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --radius: 8px;
    --container: 1280px;
    --footer-bg: #1a1a1a;
}

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

body {
    font-family: 'Noto Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-light);
    color: var(--text-medium);
    line-height: 1.5;
    overflow-x: hidden;
}

.tb-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Header */
.tb-header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.tb-header-top {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.tb-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.tb-logo img {
    max-height: 45px;
    width: auto;
}

.tb-site-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Desktop Navigation */
.tb-nav-desktop {
    flex: 1;
}

.tb-primary-menu {
    display: flex;
    list-style: none;
    justify-content: center;
    gap: 30px;
}

.tb-primary-menu a {
    color: var(--text-medium);
    font-size: 15px;
    font-weight: 500;
    padding: 8px 0;
}

.tb-primary-menu a:hover {
    color: var(--primary);
}

.tb-primary-menu .sub-menu {
    position: absolute;
    background: var(--bg-white);
    min-width: 200px;
    box-shadow: var(--shadow-md);
    border-radius: 6px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
}

.tb-primary-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
}

/* Header Actions */
.tb-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tb-search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
}

.tb-search-toggle:hover {
    background: var(--bg-light);
}

.tb-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.tb-mobile-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-dark);
}

/* Scroll Menu */
.tb-scroll-menu {
    background: var(--primary);
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 999;
}

.tb-scroll-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tb-scroll-items {
    flex: 1;
    overflow-x: auto;
    scroll-behavior: smooth;
    white-space: nowrap;
}

.tb-scroll-items::-webkit-scrollbar {
    display: none;
}

.tb-scroll-list {
    display: flex;
    gap: 8px;
    list-style: none;
}

.tb-scroll-list li a {
    display: inline-block;
    padding: 6px 20px;
    background: rgba(255,255,255,0.15);
    color: white;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
}

.tb-scroll-list li a:hover {
    background: white;
    color: var(--primary);
}

.tb-scroll-arrow {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
}

/* Mobile Menu */
.tb-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100%;
    background: var(--bg-white);
    z-index: 2000;
    transition: right 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.tb-mobile-menu.active {
    right: 0;
}

.tb-mobile-header {
    display: flex;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-light);
}

.tb-mobile-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.tb-mobile-nav {
    list-style: none;
}

.tb-mobile-nav li {
    border-bottom: 1px solid var(--border-light);
}

.tb-mobile-nav a {
    display: block;
    padding: 14px 20px;
    color: var(--text-dark);
}

.tb-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tb-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Search Overlay */
.tb-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tb-search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.tb-search-container {
    width: 90%;
    max-width: 550px;
}

.tb-search-container form {
    display: flex;
    gap: 10px;
}

.tb-search-container input {
    flex: 1;
    height: 55px;
    padding: 0 20px;
    border: none;
    border-radius: 50px;
    outline: none;
}

.tb-search-container button {
    width: 55px;
    height: 55px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    cursor: pointer;
}

.tb-search-close {
    position: absolute;
    top: -60px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

/* Hero Section */
.tb-hero {
    background: var(--bg-white);
    padding: 35px 0;
    margin-bottom: 30px;
}

.tb-hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 35px;
    align-items: center;
}

.tb-hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.tb-hero-category {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 12px;
}

.tb-hero-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.tb-hero-meta {
    display: flex;
    gap: 15px;
    color: var(--text-lighter);
    font-size: 13px;
    margin-bottom: 15px;
}

.tb-read-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

/* Section Headers */
.tb-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 35px 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}

.tb-section-title {
    font-size: 22px;
    font-weight: 700;
}

.tb-view-all {
    font-size: 13px;
    font-weight: 600;
}

/* Posts Grid */
.tb-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin: 25px 0;
}

.tb-post-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease;
}

.tb-post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.tb-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.tb-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.tb-card-content {
    padding: 18px;
}

.tb-card-category {
    font-size: 10px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.tb-card-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
}

.tb-card-meta {
    font-size: 12px;
    color: var(--text-lighter);
    margin-bottom: 12px;
}

.tb-card-excerpt {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Trending Section */
.tb-trending-section {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px 25px;
    margin: 25px 0;
}

.tb-trending-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.tb-trending-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.tb-trending-rank {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    width: 45px;
}

.tb-trending-title {
    font-size: 15px;
    font-weight: 500;
}

/* Category Sections */
.tb-category-section {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    margin: 30px 0;
    border-left: 4px solid;
}

.tb-category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.tb-cat-card {
    display: flex;
    gap: 12px;
    align-items: center;
}

.tb-cat-image {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
}

.tb-cat-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tb-cat-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 5px;
}

.tb-cat-date {
    font-size: 11px;
    color: var(--text-lighter);
}

/* Two Columns */
.tb-two-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.tb-more-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.tb-more-number {
    font-size: 20px;
    font-weight: 700;
    color: #ccc;
    width: 40px;
}

/* Single Post */
.tb-single-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    margin: 30px 0;
}

.tb-single-main {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.tb-post-title {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
}

.tb-post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tb-category-badge {
    background: var(--bg-light);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
}

.tb-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.tb-meta-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tb-meta-author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.tb-post-featured {
    margin-bottom: 25px;
}

.tb-post-featured img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.tb-post-content {
    font-size: 17px;
    line-height: 1.7;
}

.tb-post-content p {
    margin-bottom: 1.4em;
}

.tb-post-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

/* Breadcrumbs */
.tb-breadcrumbs {
    font-size: 13px;
    color: var(--text-lighter);
    margin-bottom: 20px;
    padding: 10px 0;
}

.tb-breadcrumbs .tb-sep {
    margin: 0 8px;
}

/* Related Posts */
.tb-related-posts {
    margin: 35px 0;
    padding: 25px;
    background: var(--bg-light);
    border-radius: var(--radius);
}

.tb-related-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.tb-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.tb-related-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
}

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

.tb-related-content {
    padding: 12px;
}

.tb-related-content h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
}

/* Sidebar */
.tb-sidebar {
    position: sticky;
    top: 80px;
}

.tb-widget {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
}

.tb-widget-title {
    font-size: 18px;
    font-weight: 700;
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary);
}

.tb-popular-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.tb-popular-rank {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    width: 30px;
}

.tb-recent-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.tb-recent-image {
    flex-shrink: 0;
    width: 55px;
    height: 55px;
    border-radius: 6px;
    overflow: hidden;
}

/* Footer */
.tb-footer {
    background: var(--footer-bg);
    color: #888;
    padding: 45px 0 25px;
    margin-top: 50px;
}

.tb-footer-inner {
    text-align: center;
}

.tb-footer-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    list-style: none;
    margin-bottom: 25px;
}

.tb-footer-menu a {
    color: #ccc;
    font-size: 14px;
}

.tb-footer-menu a:hover {
    color: var(--primary);
}

.tb-footer-copyright p {
    font-size: 13px;
    margin: 5px 0;
}

/* Pagination */
.tb-pagination {
    margin: 45px 0;
    text-align: center;
}

.tb-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    background: var(--bg-white);
    border-radius: 6px;
    color: var(--text-dark);
}

.tb-pagination .page-numbers.current {
    background: var(--primary);
    color: white;
}

/* Ads */
.tb-ad-container {
    text-align: center;
    margin: 15px 0;
}

.tb-sticky-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 999999;
    text-align: center;
    padding: 5px 0;
    border-top: 1px solid #eee;
}

body {
    padding-bottom: 110px !important;
}

@media (min-width: 769px) {
    .tb-sticky-ad {
        display: none;
    }
    body {
        padding-bottom: 0 !important;
    }
}

/* Article Summary */
.tb-article-summary {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.tb-summary-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 15px;
}

.tb-summary-list {
    list-style: none;
}

.tb-summary-list li {
    padding: 8px 0;
    display: flex;
    gap: 10px;
    border-bottom: 1px solid rgba(231,76,60,0.2);
}

.tb-summary-marker {
    color: var(--primary);
    font-weight: 700;
}

/* Listen Button */
.tb-listen-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #2c3e50;
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 40px;
    cursor: pointer;
    margin: 10px 0;
}

.tb-listen-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: var(--shadow-lg);
    width: 280px;
    z-index: 10000;
}

.tb-listen-progress {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-bottom: 10px;
    overflow: hidden;
}

.tb-listen-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--primary);
    transition: width 0.1s linear;
}

.tb-listen-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* EEAT Box */
.tb-eeat-box {
    background: #f0f7ff;
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
}

.tb-eeat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #0066cc;
}

.tb-eeat-content {
    display: flex;
    gap: 15px;
}

.tb-eeat-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

/* Responsive */
@media (max-width: 1100px) {
    .tb-posts-grid, .tb-category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .tb-single-layout {
        grid-template-columns: 1fr;
    }
    .tb-sidebar {
        display: none;
    }
    .tb-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tb-nav-desktop {
        display: none;
    }
    .tb-mobile-toggle {
        display: flex;
    }
    .tb-hero-inner {
        grid-template-columns: 1fr;
    }
    .tb-posts-grid, .tb-category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tb-trending-grid {
        grid-template-columns: 1fr;
    }
    .tb-post-title {
        font-size: 28px;
    }
}

@media (max-width: 576px) {
    .tb-posts-grid, .tb-category-grid, .tb-related-grid, .tb-two-columns {
        grid-template-columns: 1fr;
    }
    .tb-single-main {
        padding: 20px;
    }
    .tb-eeat-content {
        flex-direction: column;
        text-align: center;
    }
    .tb-listen-player {
        left: 20px;
        right: 20px;
        width: auto;
    }
}