/*
 Theme Name:    TIMESBULL
 Theme URI:     https://www.timesbull.com
 Description:   Complete News Layout - ENTERPRISE OPTIMIZED VERSION 14.2.0
 Author:        Times Bull
 Author URI:    https://www.timesbull.com
 Version:       14.2.0
 License:       GPL v2 or later
 Text Domain:   timesbull
*/

/* ======================================== */
/* CSS VARIABLES - EASY THEME MANAGEMENT */
/* ======================================== */
:root {
    --primary-color: #e74c3c;
    --primary-dark: #c0392b;
    --primary-light: #fee2e2;
    --text-dark: #222;
    --text-medium: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg-light: linear-gradient(135deg, #f8f9fa 0%, #fff3e0 100%);
    --bg-white: #fff;
    --border-light: #eee;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.15);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.2);
    --transition: all 0.2s ease;
    --border-radius: 8px;
    --header-height: 60px;
    --footer-height: 100px;
    --font-primary: 'Hind', 'Roboto', sans-serif;
    --font-headings: 'Roboto', sans-serif;
    --container-width: 1280px;
    --z-index-header: 1000;
    --z-index-overlay: 2000;
    --z-index-popup: 9999;
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.3s ease;
}

/* ======================================== */
/* RESET & BASE STYLES */
/* ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-light);
    color: var(--text-medium);
    line-height: 1.5;
    overflow-x: hidden;
    width: 100%;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* ======================================== */
/* PERFORMANCE OPTIMIZATIONS (v14.2.0) */
/* ======================================== */

/* Fade-in for lazy-loaded images */
img[loading="lazy"] {
    transition: opacity 0.3s ease;
}

img.loaded {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Prevent Layout Shift on Type Rendering */
.tb-post-title,
.tb-card-title,
.tb-featured-title,
.tb-widget-title {
    contain: content; 
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
.tb-share-ig { 
    background: #E4405F;
    color: #ffffff !important;
}

.tb-share-ig i,
.tb-share-ig .fab {
    color: #ffffff !important;
}

.tb-share-ig:hover {
    background: #C13584;
    transform: scale(1.1);
}
/* ======================================== */
/* ACCESSIBILITY */
/* ======================================== */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.tb-skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    z-index: 1001;
    text-decoration: none;
    border-radius: 0 0 4px 0;
}

.tb-skip-link:focus {
    top: 0;
}

/* High contrast mode support */
@media (forced-colors: active) {
    .tb-post-card,
    .tb-cat-card,
    .tb-horizontal-card,
    .tb-category-card {
        border: 2px solid CanvasText;
    }
    .tb-category-badge,
    .tb-read-more,
    .tb-share-icon,
    .tb-scroll-arrow,
    .tb-view-all {
        border: 1px solid CanvasText;
    }
}

/* ======================================== */
/* SHARE BUTTONS - SOCIAL MEDIA COLORS */
/* ======================================== */

/* Base Share Button Styles */
.tb-share-icon,
.tb-share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
    margin: 0 4px;
}

/* All icons white for visibility */
.tb-share-icon i,
.tb-share-icon .fab,
.tb-share-btn i,
.tb-share-btn .fab {
    color: #ffffff !important;
    font-size: 16px;
}

/* Platform Specific Colors */
.tb-share-fb { background: #1877F2; }  /* Facebook Blue */
.tb-share-tw { background: #1DA1F2; }  /* Twitter Blue */
.tb-share-li { background: #0077B5; }  /* LinkedIn Blue */
.tb-share-wa { background: #25D366; }  /* WhatsApp Green */
.tb-share-ig { background: #E4405F; }  /* Instagram Pink/Red */

/* Hover Effects */
.tb-share-fb:hover { background: #0D6ABF; transform: scale(1.1); }
.tb-share-tw:hover { background: #0D8BD9; transform: scale(1.1); }
.tb-share-li:hover { background: #005E93; transform: scale(1.1); }
.tb-share-wa:hover { background: #1DA15B; transform: scale(1.1); }
.tb-share-ig:hover { background: #C13584; transform: scale(1.1); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .tb-category-card:hover .tb-category-image img,
    .tb-category-card:hover .tb-cat-image img {
        transform: none;
    }
    .tb-category-card:hover,
    .tb-cat-card:hover {
        transform: translateY(-2px);
    }
}

/* ======================================== */
/* HEADER STYLES */
/* ======================================== */
.tb-header {
    position: relative;
    width: 100%;
    box-shadow: var(--shadow-sm);
    z-index: var(--z-index-header);
    background: #fff;
    transform: translateZ(0);
    contain: paint;
}

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

.tb-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.tb-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.tb-logo {
    flex: 0 0 auto;
}

.tb-logo img {
    display: block;
    max-height: 48px;
    width: auto;
}

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

.tb-site-title:hover {
    color: var(--primary-color);
}

/* Desktop Navigation */
.tb-nav-desktop {
    flex: 1;
    margin: 0 30px;
}

.tb-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 25px;
}

.tb-nav-menu li {
    position: relative;
    margin: 0;
}

.tb-nav-menu a {
    color: var(--text-medium);
    font-size: 15px;
    font-weight: 500;
    padding: 5px 0;
    display: block;
}

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

/* Dropdown Menu */
.tb-nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: var(--shadow-md);
    border-radius: 5px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
}

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

.tb-nav-menu .sub-menu li {
    display: block;
}

.tb-nav-menu .sub-menu a {
    padding: 8px 15px;
    font-size: 14px;
}

/* Header Right Icons */
.tb-header-right {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tb-search-toggle {
    background: none;
    border: none;
    font-size: 18px;
    color: #555;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.tb-search-toggle:hover {
    color: var(--primary-color);
}

/* Mobile Toggle */
.tb-menu-toggle,
.tb-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 24px;
    color: #333;
    z-index: 100;
}

.tb-menu-toggle span,
.tb-mobile-toggle span {
    width: 22px;
    height: 2px;
    background: #333;
    transition: var(--transition);
}

/* Scroll Menu */
.tb-scroll-menu {
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 999;
    transition: transform 0.3s ease;
    background: var(--primary-color);
    transform: translateZ(0);
    will-change: transform;
    list-style: none;
}

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

.tb-scroll-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.tb-scroll-items {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0;
    transform: translateZ(0);
}

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

.tb-scroll-items a,
.tb-scroll-items .menu-item a,
.tb-scroll-item {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 18px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
    border: none;
    outline: none;
    cursor: pointer;
    line-height: 1;
    background: #fff;
    color: var(--primary-color);
}

.tb-scroll-items a:hover,
.tb-scroll-item:hover {
    background: #fff5f5;
}

.tb-scroll-items .current-menu-item a,
.tb-scroll-item.active {
    background: #fee2e2;
    color: var(--primary-dark);
}

/* Scroll Arrows */
.tb-scroll-arrow {
    flex: 0 0 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.95);
    border: 1px solid #ddd;
    border-radius: 50%;
    color: #333;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    padding: 0;
}

.tb-scroll-arrow:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.tb-scroll-arrow:hover i {
    color: white;
}

.tb-scroll-arrow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Hide arrows on mobile */
@media (max-width: 768px) {
    .tb-scroll-left,
    .tb-scroll-right {
        display: none !important;
    }
}

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

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

.tb-search-container {
    width: 90%;
    max-width: 600px;
    position: relative;
}

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

.tb-search-container input {
    flex: 1;
    height: 60px;
    padding: 0 20px;
    font-size: 18px;
    border: none;
    border-radius: 30px;
    outline: none;
}

.tb-search-container button[type="submit"] {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

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

/* ======================================== */
/* MOBILE MENU */
/* ======================================== */
.tb-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    height: -webkit-fill-available;
    height: 100dvh;
    background: #fff;
    z-index: 999999;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0,0,0,0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateZ(0);
}

.tb-mobile-menu.active {
    right: 0 !important;
    z-index: 2147483647 !important;
}

.tb-mobile-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    min-height: 60px;
}

.tb-mobile-header .tb-menu-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.tb-mobile-close {
    background: #f5f5f5;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.tb-mobile-close:hover {
    background: var(--primary-color);
    color: white;
}

.tb-mobile-content {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    max-height: calc(100vh - 60px);
}

.tb-mobile-nav {
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.tb-mobile-nav li {
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
}

.tb-mobile-nav a {
    color: #333;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    display: block;
    padding: 15px 20px;
    transition: all 0.2s;
}

.tb-mobile-nav a:hover {
    background: #f8f8f8;
    color: var(--primary-color);
    padding-left: 25px;
}

.tb-mobile-nav .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fafafa;
}

.tb-mobile-nav .sub-menu li {
    border-bottom: 1px solid #eee;
}

.tb-mobile-nav .sub-menu a {
    padding: 12px 20px 12px 35px;
    font-size: 14px;
    font-weight: 400;
    color: #555;
}

.tb-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

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

body.tb-mobile-menu-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* ======================================== */
/* ROW 1: THREE COLUMN LAYOUT */
/* ======================================== */
.tb-row-1 {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.tb-col-1,
.tb-col-2,
.tb-col-3 {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.tb-col-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.tb-col-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    color: var(--primary-color) !important;
}

/* ======================================== */
/* HORIZONTAL CARD */
/* ======================================== */
.tb-horizontal-item {
    display: flex;
    gap: 15px;
    background: #fff;
    padding: 12px 0;
    transition: var(--transition);
    border-bottom: 1px solid #f0f0f0;
    align-items: flex-start;
    min-height: 90px;
}

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

.tb-horizontal-item:hover {
    background: #f9f9f9;
}

.tb-horizontal-image {
    flex: 0 0 110px;
    height: 75px;
    overflow: hidden;
    border-radius: 4px;
}

.tb-horizontal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    aspect-ratio: 16/9;
    background: #f0f0f0;
}

.tb-horizontal-content {
    flex: 1;
    display: flex;
    align-items: center;
}

.tb-horizontal-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    word-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tb-horizontal-title a {
    color: #333;
    text-decoration: none;
}

.tb-horizontal-title a:hover {
    color: var(--primary-color) !important;
}

.tb-horizontal-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ======================================== */
/* FEATURED CARD */
/* ======================================== */
.tb-featured-card {
    margin-bottom: 20px;
}

.tb-featured-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #f5f5f5;
    content-visibility: auto;
    contain-intrinsic-size: 1200px 630px;
}

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

.tb-featured-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin: 12px 0 8px;
}

.tb-featured-title a {
    color: #1a1a2e;
    text-decoration: none;
}

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

/* ======================================== */
/* POSTS GRID */
/* ======================================== */
.tb-posts-grid,
.tb-archive-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0;
}

.tb-post-card {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    contain: content;
}

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

.tb-card-img {
    width: 100%;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    aspect-ratio: 16/9;
    background: #f5f5f5;
}

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

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

.tb-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.tb-card-title a {
    color: var(--text-dark);
}

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

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

.tb-card-excerpt {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.tb-read-more {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.2s ease;
    margin-top: auto;
}

.tb-read-more:hover {
    gap: 10px;
    text-decoration: underline;
    color: var(--primary-dark) !important;
}

/* ======================================== */
/* PAGINATION */
/* ======================================== */
.tb-pagination {
    margin: 60px 0 50px;
    text-align: center;
    width: 100%;
    clear: both;
}

.tb-pagination .nav-links {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0 auto;
}

.tb-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 8px;
    background: #f5f5f5;
    color: var(--text-medium);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.tb-pagination .page-numbers:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(231,76,60,0.3);
}

.tb-pagination .page-numbers.current {
    background: var(--primary-color);
    color: #fff;
    border: none;
    box-shadow: 0 4px 10px rgba(231,76,60,0.3);
}

/* ======================================== */
/* CATEGORY SECTIONS */
/* ======================================== */
.tb-category-section {
    margin: 40px 0;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform 0.3s ease;
}

.tb-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(0,0,0,0.08);
    width: 100%;
}

.tb-section-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    color: #1a1a2e;
}

.tb-view-all {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    padding: 5px 12px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 20px;
    transition: var(--transition);
    white-space: nowrap;
}

.tb-view-all:hover {
    background: var(--primary-color);
    color: #fff;
}

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

.tb-category-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    height: 100%;
    contain: content;
}

.tb-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.tb-category-image {
    aspect-ratio: 16 / 9;
    width: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

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

.tb-category-card:hover .tb-category-image img {
    transform: scale(1.03);
}

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

.tb-category-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.tb-category-title a {
    color: #1a1a2e;
    text-decoration: none;
}

.tb-category-title a:hover {
    color: var(--primary-color) !important;
}

.tb-category-date {
    color: var(--text-lighter);
    font-size: 12px;
    display: inline-block;
    margin-top: 5px;
}

/* ======================================== */
/* SINGLE POST STYLES */
/* ======================================== */
.tb-post-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.tb-post-main {
    flex: 1;
    min-width: 0;
    background: #fff;
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.tb-post-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 10px;
    color: var(--text-dark);
    word-wrap: break-word;
}

.tb-post-content {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    width: 100%;
    overflow-x: hidden;
    max-width: 100%;
    word-wrap: break-word;
}

.tb-post-content p {
    margin-bottom: 15px;
}

.tb-post-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 20px 0 10px;
}

.tb-post-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 18px 0 8px;
}

/* ======================================== */
/* SIDEBAR */
/* ======================================== */
.tb-sidebar,
.tb-single-sidebar {
    width: 320px;
    flex-shrink: 0;
}

.tb-sidebar-widget {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    content-visibility: auto;
    contain-intrinsic-size: 400px;
}

.tb-widget-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.tb-latest-posts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tb-latest-item {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

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

.tb-latest-link {
    text-decoration: none;
    display: flex;
    gap: 12px;
    padding: 10px;
}

.tb-latest-thumb {
    flex: 0 0 70px;
    height: 70px;
    overflow: hidden;
    border-radius: 6px;
    background: #f5f5f5;
}

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

.tb-latest-content {
    flex: 1;
    display: flex;
    align-items: center;
}

.tb-latest-title {
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
    color: #333;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ======================================== */
/* FOOTER */
/* ======================================== */
.tb-site-footer {
    text-align: center;
    padding: 4px 0 3px;
    margin-top: 5px;
    border-top: 2px solid red;
    background: #000;
    color: #fff;
}

.tb-footer-nav {
    margin-bottom: 5px;
}

.tb-footer-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.tb-footer-menu a {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

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

.tb-footer-copyright {
    font-size: 13px;
    opacity: 0.8;
}

/* ======================================== */
/* RESPONSIVE DESIGN BREAKPOINTS */
/* ======================================== */
@media (max-width: 1200px) {
    .tb-container { max-width: 960px; }
    .tb-grid-4 { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

@media (max-width: 992px) {
    .tb-container { max-width: 720px; }
    .tb-row-1 { grid-template-columns: 1fr; gap: 25px; }
    .tb-posts-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .tb-nav-desktop { display: none; }
    .tb-mobile-toggle { display: flex; }
}

@media (max-width: 768px) {
    .tb-sidebar { display: none !important; }
    .tb-posts-grid { grid-template-columns: 1fr; gap: 15px; }
    .tb-grid-4 { grid-template-columns: 1fr; }
    .tb-post-title { font-size: 24px; }
}

@media (max-width: 576px) {
    .tb-container { padding: 0 12px; }
    .tb-horizontal-image { flex: 0 0 90px; height: 65px; }
    .tb-card-content { padding: 15px; }
}

@media (max-width: 480px) {
    .tb-container { padding: 0 10px; }
    .tb-horizontal-image { flex: 0 0 80px; height: 60px; }
    .tb-post-title { font-size: 20px; }
}

@media (max-width: 360px) {
    .tb-container { padding: 0 8px; }
    .tb-horizontal-image { flex: 0 0 70px; height: 55px; }
}

/* ======================================== */
/* PRINT STYLES */
/* ======================================== */
@media print {
    .tb-scroll-menu, .tb-search-overlay, .tb-mobile-toggle,
    .tb-sidebar, .tb-pagination, .tb-footer-nav,
    .tb-share-compact, .tb-author-compact, .tb-related-compact {
        display: none !important;
    }
    body { background: #fff; }
    a::after { content: " (" attr(href) ")"; font-size: 0.9em; color: #666; }
}

/* ======================================== */
/* JS INTERACTION STATES */
/* ======================================== */
body.tb-lock-scroll {
    overflow: hidden !important;
    position: relative;
}

.tb-scroll-arrow.tb-arrow-hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.tb-mobile-nav .menu-item-has-children .sub-menu {
    display: none;
    visibility: hidden;
}

.tb-mobile-nav .menu-item-has-children.tb-dropdown-open > .sub-menu {
    display: block;
    visibility: visible;
}