/* ==========================================================================
   TrendBite News Portal — Custom Theme Styles
   Standalone theme (no GeneratePress dependency).
   Brand: #FF6B35 (orange), #1A1A2E (dark), #F79315 (coral)
   Font: Inter (headings, UI, body)
   ========================================================================== */

/* --- CSS Custom Properties --- */
:root {
    --tb-primary: #FF6B35;
    --tb-primary-dark: #E55A25;
    --tb-secondary: #1A1A2E;
    --tb-secondary-light: #252542;
    --tb-coral: #F79315;
    --tb-text: #2D3436;
    --tb-text-light: #636E72;
    --tb-light: #F5F5F5;
    --tb-white: #FFFFFF;
    --tb-border: #E0E0E0;
    --tb-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --tb-card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    --tb-radius: 6px;
    --tb-font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --tb-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --tb-font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --tb-container: 1200px;
    --tb-transition: 0.2s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--tb-light);
    font-family: var(--tb-font-ui);
    color: var(--tb-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

a {
    color: var(--tb-primary);
    transition: color var(--tb-transition);
}

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

.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;
}

.screen-reader-text:focus {
    background: var(--tb-white);
    clip: auto;
    clip-path: none;
    color: var(--tb-text);
    display: block;
    font-size: 1rem;
    height: auto;
    left: 5px;
    padding: 15px 23px;
    top: 5px;
    width: auto;
    z-index: 100000;
}

.skip-link:focus {
    background: var(--tb-primary);
    color: var(--tb-white);
    padding: 8px 16px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100001;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 var(--tb-radius) 0;
}

/* --- Top Bar (Breaking News / Date) --- */
.tb-topbar {
    background: var(--tb-secondary);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-family: var(--tb-font-ui);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tb-topbar .tb-topbar-inner {
    max-width: var(--tb-container);
    margin: 0 auto;
    padding: 6px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.tb-topbar .tb-date {
    white-space: nowrap;
    font-weight: 500;
}

.tb-ticker {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-width: 0;
    display: flex;
    align-items: center;
}

.tb-ticker-label {
    display: inline-block;
    background: var(--tb-primary);
    color: var(--tb-white);
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 10px;
    border-radius: 2px;
    margin-right: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.tb-ticker-track {
    display: inline-block;
    white-space: nowrap;
    animation: tb-ticker-scroll 30s linear infinite;
}

.tb-ticker-track a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-right: 40px;
}

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

.tb-ticker-track span.tb-ticker-sep {
    color: var(--tb-primary);
    margin: 0 12px;
}

@keyframes tb-ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Header / Masthead --- */
.site-header {
    background: var(--tb-secondary);
    color: var(--tb-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.site-header a {
    color: var(--tb-white);
}

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

.inside-header {
    max-width: var(--tb-container);
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo {
    flex-shrink: 0;
}

.site-logo a {
    display: flex;
    align-items: center;
}

.site-logo img,
.custom-logo {
    max-height: 46px;
    width: auto;
    border-radius: 6px;
}

.site-title-wrap {
    display: flex;
    flex-direction: column;
}

.main-title {
    margin: 0;
    line-height: 1;
}

.main-title a {
    font-family: var(--tb-font-heading);
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--tb-white);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0;
}

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

.main-title .tb-title-trend {
    color: var(--tb-white);
}

.main-title .tb-title-bite {
    color: var(--tb-primary);
}

.site-description {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin: 2px 0 0;
    font-family: var(--tb-font-ui);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- Header Search --- */
.tb-header-search *:focus {
    outline: none;
}

.tb-header-search {
    margin-left: auto;
    position: relative;
    flex-shrink: 0;
}

.tb-header-search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--tb-radius);
    transition: all var(--tb-transition);
    overflow: hidden;
}

.tb-header-search-form:focus-within {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--tb-primary);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.15);
}

.tb-header-search-input {
    background: transparent;
    border: none;
    color: var(--tb-white);
    font-family: var(--tb-font-ui);
    font-size: 0.85rem;
    padding: 7px 12px;
    width: 200px;
    outline: none;
    box-shadow: none;
}

.tb-header-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.tb-header-search-input:focus {
    box-shadow: none;
    border: none;
}

.tb-header-search-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 7px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--tb-transition);
    box-shadow: none;
}

.tb-header-search-btn:hover {
    color: var(--tb-primary);
    background: transparent;
    transform: none;
    box-shadow: none;
}

.tb-header-search-btn svg {
    stroke: currentColor;
}

/* Search dropdown */
.tb-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 380px;
    background: var(--tb-white);
    border-radius: var(--tb-radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    overflow: hidden;
}

.tb-search-status {
    font-family: var(--tb-font-ui);
    font-size: 0.8rem;
    color: var(--tb-text-light);
    padding: 10px 16px;
    border-bottom: 1px solid var(--tb-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tb-search-status:empty {
    display: none;
}

/* Loading spinner */
.tb-search-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--tb-border);
    border-top-color: var(--tb-primary);
    border-radius: 50%;
    animation: tb-spin 0.6s linear infinite;
    flex-shrink: 0;
}

@keyframes tb-spin {
    to { transform: rotate(360deg); }
}

/* Result items */
.tb-search-results {
    max-height: 360px;
    overflow-y: auto;
}

.tb-search-result {
    display: flex;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--tb-text);
    transition: background var(--tb-transition);
    border-bottom: 1px solid var(--tb-border);
}

.tb-search-result:last-child {
    border-bottom: none;
}

.tb-search-result:hover,
.tb-search-result.tb-search-active {
    background: var(--tb-light);
}

.tb-search-result-thumb {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--tb-light);
}

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

.tb-search-result-info {
    flex: 1;
    min-width: 0;
}

.tb-search-result-title {
    font-family: var(--tb-font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--tb-secondary);
    line-height: 1.3;
    margin: 0 0 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tb-search-result-meta {
    font-family: var(--tb-font-ui);
    font-size: 0.75rem;
    color: var(--tb-text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tb-search-result-cat {
    color: var(--tb-primary);
    font-weight: 600;
}

.tb-search-no-results {
    padding: 20px 16px;
    text-align: center;
    color: var(--tb-text-light);
    font-family: var(--tb-font-ui);
    font-size: 0.88rem;
}

.tb-search-all-link {
    display: block;
    text-align: center;
    padding: 10px 16px;
    font-family: var(--tb-font-ui);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--tb-primary);
    text-decoration: none;
    border-top: 1px solid var(--tb-border);
    transition: background var(--tb-transition);
}

.tb-search-all-link:hover {
    background: var(--tb-light);
    color: var(--tb-primary-dark);
}

/* --- Primary Navigation --- */
.main-navigation {
    background: var(--tb-secondary-light);
    border-top: 3px solid var(--tb-primary);
}

.main-navigation .inside-navigation {
    max-width: var(--tb-container);
    margin: 0 auto;
    padding: 0 20px;
}

.main-navigation .tb-nav-menu,
.main-navigation .menu {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation .tb-nav-menu li a,
.main-navigation .menu li a {
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--tb-font-ui);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 8px 10px;
    display: block;
    text-decoration: none;
    transition: all var(--tb-transition);
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
}

.main-navigation .tb-nav-menu li a:hover,
.main-navigation .menu li a:hover {
    color: var(--tb-white);
    background: rgba(255, 107, 53, 0.1);
    border-bottom-color: var(--tb-primary);
}

.main-navigation .tb-nav-menu li.current-menu-item > a,
.main-navigation .menu li.current-menu-item > a,
.main-navigation .tb-nav-menu li.current-menu-ancestor > a,
.main-navigation .menu li.current-menu-ancestor > a {
    color: var(--tb-white);
    background: var(--tb-primary-dark);
    border-bottom-color: var(--tb-primary);
}

/* Sub-menu dropdown */
.main-navigation .sub-menu {
    display: none;
    position: absolute;
    background: var(--tb-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 0 var(--tb-radius) var(--tb-radius);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 200px;
    z-index: 1000;
}

.main-navigation li:hover > .sub-menu {
    display: block;
}

.main-navigation .sub-menu li a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    text-transform: none;
    padding: 10px 18px;
    border-bottom: none;
    margin-bottom: 0;
}

.main-navigation .sub-menu li a:hover {
    color: var(--tb-white);
    background: rgba(255, 107, 53, 0.15);
}

/* Nav items: relative for dropdown positioning */
.main-navigation .tb-nav-menu > li,
.main-navigation .menu > li {
    position: relative;
}

/* Mobile menu toggle — hidden on desktop */
.menu-toggle {
    display: none;
    border: none;
    background: transparent;
    color: var(--tb-primary);
    padding: 10px;
    box-shadow: none;
    cursor: pointer;
    align-items: center;
    gap: 8px;
    font-family: var(--tb-font-ui);
}

.menu-toggle svg {
    stroke: var(--tb-primary);
}

.mobile-menu {
    color: var(--tb-white);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* --- Site Layout --- */
.site-container {
    max-width: var(--tb-container);
    margin: 0 auto;
    flex: 1 0 auto;
    width: 100%;
}

.site-content {
    padding: 24px 0 0;
}

/* Homepage: full width, no sidebar */
.home .content-area {
    width: 100%;
}

.home .site-main {
    padding: 0 40px;
}

/* Single post: content + sidebar */
.content-with-sidebar {
    display: flex;
    gap: 30px;
    padding: 0 40px;
}

.content-with-sidebar .site-main {
    flex: 1;
    min-width: 0;
}

.content-with-sidebar .sidebar {
    width: 320px;
    flex-shrink: 0;
}

/* Page: full width */
.page .content-area .site-main {
    padding: 0 40px;
}

/* Archive/search: full width */
.archive .site-main,
.search .site-main {
    padding: 0 40px;
}

/* Article wrapper */
.tb-single-article,
.tb-page-article {
    background: var(--tb-white);
    border-radius: var(--tb-radius);
    box-shadow: var(--tb-card-shadow);
    padding: 30px 40px;
    margin-bottom: 24px;
}

/* --- Homepage News Grid --- */
.tb-news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
    max-width: var(--tb-container);
    margin-left: auto;
    margin-right: auto;
}

/* When the last regular card is alone (odd count), span full width */
.tb-news-grid > :last-child:nth-child(even) {
    grid-column: 1 / -1;
}

.tb-hero-card {
    position: relative;
    border-radius: var(--tb-radius);
    overflow: hidden;
    min-height: 420px;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(135deg, var(--tb-secondary) 0%, var(--tb-secondary-light) 100%);
}

.tb-news-grid .tb-hero-card {
    grid-column: 1 / -1;
}

.tb-hero-card .tb-hero-image {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

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

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

.tb-hero-card .tb-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.60) 60%, rgba(0, 0, 0, 0.15) 100%);
    z-index: 1;
    display: block;
}

.tb-hero-card .tb-hero-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    width: 100%;
    pointer-events: none;
}

.tb-hero-card .tb-hero-content .tb-category-badge {
    display: inline-block;
    background: var(--tb-primary);
    color: var(--tb-white);
    font-family: var(--tb-font-ui);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 2px;
    margin-bottom: 12px;
    text-decoration: none;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.tb-hero-card .tb-hero-content h2 {
    font-family: var(--tb-font-heading);
    font-weight: 800;
    font-size: 2rem;
    line-height: 1.2;
    color: var(--tb-white);
    margin: 0 0 10px;
}

.tb-hero-card .tb-hero-content h2 a {
    color: var(--tb-white);
    text-decoration: none;
    pointer-events: auto;
}

.tb-hero-card .tb-hero-content h2 a:hover {
    color: var(--tb-white);
    text-decoration: underline;
}

.tb-hero-card .tb-hero-excerpt {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.5;
    margin: 0 0 12px;
    max-width: 600px;
}

.tb-hero-card .tb-hero-meta {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-family: var(--tb-font-ui);
}

/* --- Article Cards (Archive/Index) --- */
.tb-article-card {
    background: var(--tb-white);
    border-radius: var(--tb-radius);
    overflow: hidden;
    box-shadow: var(--tb-card-shadow);
    transition: all var(--tb-transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.tb-article-card:hover {
    box-shadow: var(--tb-card-shadow-hover);
    transform: translateY(-3px);
}

.tb-article-card .tb-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    z-index: 2;
}

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

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

.tb-article-card .tb-card-image .tb-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-block;
    background: var(--tb-primary);
    color: var(--tb-white);
    font-family: var(--tb-font-ui);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 2px;
    z-index: 1;
    text-decoration: none;
}

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

.tb-article-card .tb-card-body h3 {
    font-family: var(--tb-font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.35;
    margin: 0 0 8px;
    color: var(--tb-secondary);
}

.tb-article-card .tb-card-body h3 a {
    color: var(--tb-secondary);
    text-decoration: none;
}

.tb-article-card .tb-card-body h3 a:hover {
    color: var(--tb-primary);
}

/* Stretch link to cover entire card for full-tile clickability */
.tb-article-card .tb-card-body h3 a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.tb-article-card:hover .tb-card-body h3 a {
    color: var(--tb-primary);
}

.tb-article-card .tb-card-excerpt {
    font-family: var(--tb-font-ui);
    font-size: 0.9rem;
    color: var(--tb-text-light);
    line-height: 1.5;
    margin-bottom: 12px;
    flex: 1;
}

.tb-card-meta {
    font-family: var(--tb-font-ui);
    font-size: 0.8rem;
    color: var(--tb-text-light);
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--tb-border);
}

.tb-card-meta .tb-author {
    color: var(--tb-primary);
    font-weight: 600;
}

/* Horizontal card variant (for compact lists) */
.tb-article-card.tb-card-horizontal {
    flex-direction: row;
}

.tb-article-card.tb-card-horizontal .tb-card-image {
    width: 260px;
    flex-shrink: 0;
    aspect-ratio: auto;
}

.tb-article-card.tb-card-horizontal .tb-card-body {
    padding: 16px 20px;
}

.tb-article-card.tb-card-horizontal .tb-card-body h3 {
    font-size: 1rem;
}

/* --- Entry Header / Meta / Content --- */
.entry-header .entry-title {
    font-family: var(--tb-font-heading);
    font-weight: 800;
    color: var(--tb-secondary);
    line-height: 1.2;
    letter-spacing: -0.3px;
    margin: 0 0 12px;
}

.single .entry-header .entry-title {
    font-size: 2.2rem;
}

.entry-header .entry-title a {
    color: var(--tb-secondary);
    text-decoration: none;
}

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

.entry-meta {
    font-family: var(--tb-font-ui);
    font-size: 0.85rem;
    color: var(--tb-text-light);
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.entry-meta a {
    color: var(--tb-primary);
    font-weight: 500;
    text-decoration: none;
}

.entry-meta a:hover {
    text-decoration: underline;
}

.entry-meta .cat-links a {
    background: var(--tb-primary);
    color: var(--tb-white);
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-decoration: none;
}

.entry-meta .cat-links a:hover {
    background: var(--tb-primary-dark);
    text-decoration: none;
}

.entry-content {
    font-family: var(--tb-font-body);
    font-size: 1.05rem;
    line-height: 1.8;
    letter-spacing: 0.01em;
    color: var(--tb-text);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    font-family: var(--tb-font-heading);
    color: var(--tb-secondary);
    font-weight: 700;
}

.entry-content h2 {
    font-size: 1.6rem;
    margin-top: 2em;
    margin-bottom: 0.8em;
    padding-bottom: 0.3em;
    border-bottom: 2px solid var(--tb-primary);
}

.entry-content h3 {
    font-size: 1.3rem;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
}

.entry-content a {
    color: var(--tb-primary);
    text-decoration: underline;
    text-decoration-color: rgba(255, 107, 53, 0.3);
    text-underline-offset: 2px;
}

.entry-content a:hover {
    text-decoration-color: var(--tb-primary);
}

.entry-content img {
    border-radius: var(--tb-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 1.5em 0;
}

.entry-content blockquote {
    border-left: 4px solid var(--tb-primary);
    background: rgba(255, 107, 53, 0.04);
    padding: 16px 24px;
    margin: 1.5em 0;
    border-radius: 0 var(--tb-radius) var(--tb-radius) 0;
    font-style: italic;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.5em;
}

.entry-content li {
    margin-bottom: 0.5em;
}

/* Entry footer (tags) */
.entry-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--tb-border);
}

.tags-links a {
    display: inline-block;
    background: var(--tb-light);
    color: var(--tb-text-light);
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all var(--tb-transition);
    margin: 2px 0;
}

.tags-links a:hover {
    background: var(--tb-primary);
    color: var(--tb-white);
}

/* Featured image */
.featured-image {
    margin: 0 0 24px;
    border-radius: var(--tb-radius);
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- Reading Progress Bar --- */
.tb-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--tb-primary);
    z-index: 99999;
    transition: width 0.15s ease;
    width: 0;
}

/* --- Archive / Category Pages --- */
.page-header {
    background: var(--tb-secondary);
    color: var(--tb-white);
    padding: 30px 40px;
    border-radius: var(--tb-radius);
    margin-bottom: 24px;
}

.page-header .page-title {
    font-family: var(--tb-font-heading);
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--tb-white);
    margin: 0;
}

.page-header .page-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 0.9em;
    background: var(--tb-primary);
    margin-right: 12px;
    border-radius: 2px;
    vertical-align: baseline;
}

.taxonomy-description {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
    font-size: 0.95rem;
}

.taxonomy-description a {
    color: var(--tb-primary);
}

.tb-archive-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.tb-no-posts {
    text-align: center;
    padding: 60px 20px;
    background: var(--tb-white);
    border-radius: var(--tb-radius);
    box-shadow: var(--tb-card-shadow);
}

.tb-no-posts h2 {
    font-family: var(--tb-font-heading);
    color: var(--tb-secondary);
}

/* --- Sidebar --- */
.sidebar .widget {
    background: var(--tb-white);
    border-radius: var(--tb-radius);
    box-shadow: var(--tb-card-shadow);
    padding: 24px;
    margin-bottom: 20px;
}

.widget-title {
    font-family: var(--tb-font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--tb-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--tb-primary);
}

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

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--tb-border);
    font-size: 0.9rem;
}

.widget ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.widget ul li a {
    color: var(--tb-text);
    text-decoration: none;
    font-weight: 500;
}

.widget ul li a:hover {
    color: var(--tb-primary);
}

/* Sidebar: Latest Posts with Thumbnails */
.tb-latest-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.tb-latest-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tb-latest-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
}

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

.tb-latest-info {
    flex: 1;
    min-width: 0;
}

.tb-latest-title {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--tb-text);
    text-decoration: none;
    line-height: 1.3;
    margin-bottom: 4px;
}

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

.tb-latest-date {
    font-size: 0.75rem;
    color: var(--tb-text-light);
}

/* --- Footer --- */
.site-footer {
    background: var(--tb-secondary);
    color: rgba(255, 255, 255, 0.8);
    margin-top: 40px;
    padding: 0;
    flex-shrink: 0;
}

.footer-widgets {
    background: var(--tb-secondary);
    border-top: 3px solid var(--tb-primary);
    padding: 0;
    margin: 0;
}

.footer-widgets .inside-footer-widgets {
    max-width: var(--tb-container);
    margin: 0 auto;
    padding: 40px;
}

.tb-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
}

.tb-footer-col .widget-title {
    color: var(--tb-white);
    border-bottom-color: var(--tb-primary);
    font-size: 1rem;
    margin-bottom: 16px;
    padding-bottom: 10px;
}

.tb-footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.tb-footer-logo {
    border-radius: 6px;
}

.tb-footer-brand-text {
    font-family: var(--tb-font-heading);
    font-weight: 800;
    font-size: 1.2rem;
}

.tb-footer-brand-text .tb-title-trend {
    color: var(--tb-white);
}

.tb-footer-brand-text .tb-title-bite {
    color: var(--tb-primary);
}

.tb-footer-about {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.tb-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tb-footer-links li {
    padding: 5px 0;
}

.tb-footer-links li a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--tb-transition);
}

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

.site-info {
    background: var(--tb-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.inside-site-info {
    max-width: var(--tb-container);
    margin: 0 auto;
    padding: 20px 40px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.inside-site-info a {
    color: var(--tb-primary);
    text-decoration: none;
}

/* --- Buttons --- */
.wp-block-button__link,
button:not(.menu-toggle):not(.search-submit),
input[type="submit"] {
    background: var(--tb-primary);
    color: var(--tb-white);
    border: none;
    border-radius: var(--tb-radius);
    font-family: var(--tb-font-ui);
    font-weight: 600;
    padding: 12px 24px;
    cursor: pointer;
    transition: all var(--tb-transition);
}

.wp-block-button__link:hover,
button:not(.menu-toggle):not(.search-submit):hover,
input[type="submit"]:hover {
    background: var(--tb-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* --- Forms --- */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea,
select {
    border: 0px solid var(--tb-border);
    border-radius: var(--tb-radius);
    padding: 10px 14px;
    font-family: var(--tb-font-ui);
    transition: border-color var(--tb-transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus {
    border-color: var(--tb-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Search form */
.search-form {
    display: flex;
    gap: 8px;
}

.search-form .search-field {
    flex: 1;
}

.search-form .search-submit {
    background: var(--tb-primary);
    color: var(--tb-white);
    border: none;
    padding: 10px 16px;
    border-radius: var(--tb-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-form .search-submit:hover {
    background: var(--tb-primary-dark);
}

.search-form .search-submit svg {
    stroke: var(--tb-white);
}

/* --- Comments --- */
.comments-area {
    background: var(--tb-white);
    border-radius: var(--tb-radius);
    box-shadow: var(--tb-card-shadow);
    margin-top: 24px;
    margin-bottom: 32px;
    overflow: hidden;
    padding: 0;
}

/* Dark header bar — mirrors .tb-archive-header style */
.tb-comments-header {
    background: var(--tb-secondary);
    padding: 16px 28px;
    display: flex;
    align-items: center;
}

.comments-title,
.comment-reply-title {
    font-family: var(--tb-font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--tb-white);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comments-title::before,
.comment-reply-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 0.9em;
    background: var(--tb-primary);
    border-radius: 2px;
    flex-shrink: 0;
}

/* Strip the WP default small cancel-reply link */
.comment-reply-title small {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
    margin-left: 8px;
}

.comment-reply-title small a {
    color: var(--tb-primary);
}

/* Padding around the comment list */
.tb-comments-list-wrap {
    padding: 20px 28px 0;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Nested replies: indent + subtle left border */
.comment-list .children {
    list-style: none;
    padding-left: 24px;
    margin: 0;
    border-left: 2px solid var(--tb-border);
}

/* --- Individual comment card --- */
.tb-comment {
    padding: 16px 0;
    border-bottom: 1px solid var(--tb-border);
}

.comment-list > li:last-child > .tb-comment,
.children > li:last-child > .tb-comment {
    border-bottom: none;
}

/* Header row: avatar | author+date | edit button */
.tb-comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.tb-comment-avatar {
    flex-shrink: 0;
}

.tb-avatar-img {
    border-radius: 50%;
    display: block;
}

.tb-comment-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tb-comment-author-name {
    font-family: var(--tb-font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--tb-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tb-comment-date {
    font-size: 0.75rem;
    color: var(--tb-text-light);
    text-decoration: none;
    transition: color var(--tb-transition);
}

.tb-comment-date:hover {
    color: var(--tb-primary);
}

/* Edit button — pushed to the far right, admin-only */
.tb-comment-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
    font-family: var(--tb-font-ui);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--tb-text-light);
    text-decoration: none;
    padding: 3px 10px;
    border-radius: 3px;
    border: 1px solid var(--tb-border);
    background: var(--tb-light);
    transition: all var(--tb-transition);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tb-comment-edit-btn:hover {
    color: var(--tb-primary);
    border-color: var(--tb-primary);
    background: rgba(255, 107, 53, 0.06);
}

.tb-comment-edit-btn svg {
    stroke: currentColor;
    flex-shrink: 0;
}

/* Comment body text */
.tb-comment-content {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--tb-text);
    overflow-wrap: break-word;
    word-break: break-word;
    margin-bottom: 10px;
}

.tb-comment-content p {
    margin: 0 0 8px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.tb-comment-content p:last-child {
    margin-bottom: 0;
}

/* "Awaiting moderation" notice */
.tb-comment-moderation {
    font-size: 0.82rem;
    color: var(--tb-coral);
    font-style: italic;
    margin: 0 0 8px;
}

/* Footer row: reply button right-aligned */
.tb-comment-footer {
    display: flex;
    justify-content: flex-end;
}

/* Reply button */
a.comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--tb-font-ui);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--tb-primary);
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 3px;
    border: 1.5px solid var(--tb-primary);
    background: transparent;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    transition: all var(--tb-transition);
}

a.comment-reply-link svg {
    stroke: currentColor;
    flex-shrink: 0;
}

a.comment-reply-link:hover {
    background: var(--tb-primary);
    color: var(--tb-white);
}

/* --- Comment Form (styled like header search area) --- */
.comment-respond {
    overflow: hidden;
}

/* WP wraps form in #respond — push that header bar up to the card edge */
#respond > .tb-comments-header {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tb-comment-form {
    padding: 20px 28px 24px;
}

.tb-comment-form label {
    display: block;
    font-family: var(--tb-font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tb-text);
    margin-bottom: 6px;
}

.tb-field-optional {
    font-weight: 400;
    color: var(--tb-text-light);
}

.comment-form-author,
.comment-form-comment {
    margin-bottom: 14px;
}

/* Save-nickname checkbox row */
.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.comment-form-cookies-consent input[type="checkbox"] {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin: 0;
    accent-color: var(--tb-primary);
    cursor: pointer;
}

.comment-form-cookies-consent label {
    display: inline;
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--tb-text-light);
    cursor: pointer;
    margin-bottom: 0;
}

.comment-form-author input[type="text"],
.comment-form-comment textarea {
    width: 100%;
    background: rgba(26, 26, 46, 0.04);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius);
    padding: 10px 14px;
    font-family: var(--tb-font-ui);
    font-size: 0.95rem;
    color: var(--tb-text);
    transition: border-color var(--tb-transition), box-shadow var(--tb-transition), background var(--tb-transition);
    box-sizing: border-box;
}

.comment-form-author input[type="text"]:focus,
.comment-form-comment textarea:focus {
    border-color: var(--tb-primary);
    background: rgba(255, 107, 53, 0.03);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    outline: none;
}

.comment-form-comment textarea {
    resize: vertical;
    min-height: 110px;
}

/* Character counter */
.tb-comment-counter {
    display: block;
    text-align: right;
    font-family: var(--tb-font-ui);
    font-size: 0.78rem;
    color: var(--tb-text-light);
    margin-top: 4px;
    transition: color var(--tb-transition);
}

.tb-comment-counter.tb-counter-warning {
    color: var(--tb-coral);
}

.tb-comment-counter.tb-counter-over {
    color: #e53935;
    font-weight: 600;
}

/* Submit button row */
.form-submit {
    margin: 0;
}

/* --- Category Strip (archive/category pages) --- */
.tb-category-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tb-cat-strip-link {
    display: inline-block;
    background: var(--tb-white);
    color: var(--tb-text);
    padding: 6px 14px;
    border-radius: var(--tb-radius);
    font-family: var(--tb-font-ui);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--tb-border);
    box-shadow: var(--tb-card-shadow);
    transition: all var(--tb-transition);
    white-space: nowrap;
}

.tb-cat-strip-link:hover {
    background: var(--tb-primary);
    color: var(--tb-white);
    border-color: var(--tb-primary);
}

.tb-cat-strip-link--active {
    background: var(--tb-primary);
    color: var(--tb-white);
    border-color: var(--tb-primary);
}

/* --- Pagination --- */
.nav-links {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    font-family: var(--tb-font-ui);
}

.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--tb-radius);
    background: var(--tb-white);
    color: var(--tb-text);
    text-decoration: none;
    font-weight: 600;
    box-shadow: var(--tb-card-shadow);
    transition: all var(--tb-transition);
}

.nav-links .page-numbers:hover {
    background: var(--tb-primary);
    color: var(--tb-white);
}

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

/* Single post navigation */
.post-navigation {
    display: flex;
    gap: 20px;
    margin: 30px 0;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
    background: var(--tb-white);
    border-radius: var(--tb-radius);
    padding: 16px 20px;
    box-shadow: var(--tb-card-shadow);
    transition: all var(--tb-transition);
}

.post-navigation .nav-previous:hover,
.post-navigation .nav-next:hover {
    box-shadow: var(--tb-card-shadow-hover);
    transform: translateY(-2px);
}

.post-navigation a {
    color: var(--tb-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

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

.post-navigation .nav-label {
    display: block;
    font-size: 0.75rem;
    color: var(--tb-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

/* --- 404 Page --- */
.tb-404-container {
    text-align: center;
    padding: 60px 20px;
    background: var(--tb-white);
    border-radius: var(--tb-radius);
    box-shadow: var(--tb-card-shadow);
}

.tb-404-container .tb-404-code {
    font-family: var(--tb-font-heading);
    font-size: 8rem;
    font-weight: 900;
    color: var(--tb-primary);
    line-height: 1;
    margin-bottom: 16px;
    opacity: 0.8;
}

.tb-404-container h1 {
    font-family: var(--tb-font-heading);
    font-size: 1.8rem;
    color: var(--tb-secondary);
    margin-bottom: 12px;
}

.tb-404-container p {
    color: var(--tb-text-light);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.tb-404-container .search-form {
    max-width: 500px;
    margin: 0 auto;
}

/* --- YouTube Embeds --- */
.youtube-embed,
.youtube-short {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 2em 0;
    border-radius: var(--tb-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.youtube-embed iframe,
.youtube-short iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--tb-radius);
}

/* --- Back to Top --- */
.tb-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--tb-secondary);
    color: var(--tb-white);
    border: none;
    border-radius: var(--tb-radius);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all var(--tb-transition);
    cursor: pointer;
    z-index: 9999;
    padding: 0 !important;
}

.tb-back-to-top:hover {
    background: var(--tb-primary);
    transform: translateY(-2px);
}

.tb-back-to-top svg {
    color: var(--tb-white);
}

/* --- Image Captions --- */
.wp-caption-text {
    font-family: var(--tb-font-ui);
    font-size: 0.85rem;
    color: var(--tb-text-light);
    text-align: center;
    font-style: italic;
    margin-top: 8px;
}

/* ==========================================================================
   Full-width content sections (related, latest, category highlights)
   ========================================================================== */

.tb-section {
    background: var(--tb-white);
    padding: 40px 0;
    border-top: 1px solid var(--tb-border);
}

.tb-section-inner {
    max-width: var(--tb-container);
    margin: 0 auto;
    padding: 0 40px;
}

.tb-section-title {
    display: block;
    border-bottom: 1px solid var(--tb-border);
    border-left: 4px solid var(--tb-primary);
    padding: 0 0 14px 16px;
    font-size: 1.1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--tb-secondary);
}

.tb-related-section {
    background: var(--tb-light);
}

.tb-latest-section {
    background: var(--tb-white);
}

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

/* --- Category Highlights (homepage) --- */
.tb-category-highlights {
    margin-top: 40px;
    padding: 40px 0 40px;
    border-top: 1px solid var(--tb-border);
}

.tb-category-highlights .tb-section-title {
    margin-bottom: 24px;
}

.tb-cat-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.tb-cat-column {
    background: var(--tb-white);
    border-radius: var(--tb-radius);
    box-shadow: var(--tb-card-shadow);
    padding: 24px;
}

.tb-cat-column-title {
    font-family: var(--tb-font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--tb-primary);
}

.tb-cat-column-title a {
    color: var(--tb-secondary);
    text-decoration: none;
}

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

.tb-cat-column-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tb-cat-column-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--tb-border);
    position: relative;
}

.tb-cat-column-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tb-cat-column-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

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

.tb-cat-column-info {
    flex: 1;
    min-width: 0;
}

.tb-cat-column-link {
    display: block;
    font-family: var(--tb-font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--tb-secondary);
    text-decoration: none;
    line-height: 1.3;
    margin-bottom: 4px;
}

.tb-cat-column-link:hover {
    color: var(--tb-primary);
}

/* Stretch link for full-item clickability */
.tb-cat-column-link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.tb-cat-column-item:hover .tb-cat-column-link {
    color: var(--tb-primary);
}

.tb-cat-column-date {
    font-size: 0.75rem;
    color: var(--tb-text-light);
}

.tb-cat-column-more {
    display: inline-block;
    margin-top: 14px;
    font-family: var(--tb-font-ui);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--tb-primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tb-cat-column-more:hover {
    color: var(--tb-primary-dark);
}

/* --- Category Archive: Compact Dark Header --- */
.tb-archive-header {
    background: var(--tb-secondary);
    border-radius: var(--tb-radius);
    padding: 16px 28px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.tb-archive-title {
    font-family: var(--tb-font-heading);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--tb-white);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.tb-archive-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 0.9em;
    background: var(--tb-primary);
    border-radius: 2px;
    flex-shrink: 0;
}

.tb-archive-desc {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin: 0;
    font-family: var(--tb-font-ui);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.tb-archive-count {
    margin-left: auto;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--tb-font-ui);
    white-space: nowrap;
}

.tb-archive-hero {
    min-height: 350px;
    margin-bottom: 24px;
}

/* --- Editorial Category Sections (homepage) --- */
.tb-editorial-sections {
    margin-top: 40px;
    padding: 40px 0;
    border-top: 1px solid var(--tb-border);
}

.tb-editorial-section {
    margin-bottom: 40px;
}

.tb-editorial-section:last-child {
    margin-bottom: 0;
}

.tb-editorial-header {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 14px 24px;
    background: var(--tb-secondary);
    border-radius: var(--tb-radius);
}

.tb-editorial-cat-title {
    font-family: var(--tb-font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.tb-editorial-cat-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 0.9em;
    background: var(--tb-primary);
    border-radius: 2px;
    flex-shrink: 0;
}

.tb-editorial-cat-title a {
    color: var(--tb-white);
    text-decoration: none;
}

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

.tb-editorial-cat-desc {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    font-family: var(--tb-font-ui);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.tb-editorial-cat-count {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    font-family: var(--tb-font-ui);
    white-space: nowrap;
}

.tb-editorial-more {
    margin-left: auto;
    font-family: var(--tb-font-ui);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--tb-primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.tb-editorial-more:hover {
    color: var(--tb-primary-light, #ff9540);
}

.tb-editorial-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
}

.tb-editorial-featured {
    background: var(--tb-white);
    border-radius: var(--tb-radius);
    overflow: hidden;
    box-shadow: var(--tb-card-shadow);
    transition: all var(--tb-transition);
    position: relative;
}

.tb-editorial-featured:hover {
    box-shadow: var(--tb-card-shadow-hover);
    transform: translateY(-2px);
}

.tb-editorial-featured .tb-card-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

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

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

.tb-editorial-featured .tb-card-body {
    padding: 20px;
}

.tb-editorial-featured .tb-card-body h4 {
    font-family: var(--tb-font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.35;
    margin: 0 0 8px;
    color: var(--tb-secondary);
}

.tb-editorial-featured .tb-card-body h4 a {
    color: var(--tb-secondary);
    text-decoration: none;
}

.tb-editorial-featured .tb-card-body h4 a:hover {
    color: var(--tb-primary);
}

/* Stretch link for full-card clickability */
.tb-editorial-featured .tb-card-body h4 a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.tb-editorial-featured:hover .tb-card-body h4 a {
    color: var(--tb-primary);
}

.tb-editorial-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-self: start;
}

.tb-editorial-side-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: var(--tb-white);
    border-radius: var(--tb-radius);
    box-shadow: var(--tb-card-shadow);
    text-decoration: none;
    color: var(--tb-text);
    transition: all var(--tb-transition);
    align-items: center;
}

.tb-editorial-side-item:hover {
    box-shadow: var(--tb-card-shadow-hover);
    transform: translateY(-2px);
}

.tb-editorial-side-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
}

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

.tb-editorial-side-info {
    flex: 1;
    min-width: 0;
}

.tb-editorial-side-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--tb-font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--tb-secondary);
    line-height: 1.3;
    margin-bottom: 6px;
}

.tb-editorial-side-item:hover .tb-editorial-side-title {
    color: var(--tb-primary);
}

.tb-editorial-side-date {
    font-size: 0.8rem;
    color: var(--tb-text-light);
}

/* --- Breadcrumbs --- */
.tb-breadcrumbs {
    margin-bottom: 16px;
}

.tb-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: var(--tb-font-ui);
    font-size: 0.8rem;
    color: var(--tb-text-light);
}

.tb-breadcrumb-item + .tb-breadcrumb-item::before {
    content: '/';
    padding: 0 8px;
    color: var(--tb-border);
}

.tb-breadcrumb-item a {
    color: var(--tb-text-light);
    text-decoration: none;
}

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

.tb-breadcrumb-current {
    color: var(--tb-text);
    font-weight: 500;
}

/* --- Article Body Images (injected by pipeline) --- */
.article-body-image {
    margin: 2em 0;
    padding: 0;
}

.article-body-image img {
    width: 100%;
    height: auto;
    border-radius: var(--tb-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-body-image figcaption {
    font-family: var(--tb-font-ui);
    font-size: 0.85rem;
    color: var(--tb-text-light);
    text-align: center;
    font-style: italic;
    margin-top: 8px;
    padding: 0 16px;
}

/* --- AI Disclosure (injected by pipeline) --- */
.ai-disclosure {
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid var(--tb-border);
    font-family: var(--tb-font-ui);
    font-size: 0.85em;
    color: var(--tb-text-light);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .tb-news-grid {
        grid-template-columns: 1fr;
    }

    .tb-article-card.tb-card-horizontal {
        flex-direction: column;
    }

    .tb-article-card.tb-card-horizontal .tb-card-image {
        width: 100%;
        aspect-ratio: 16 / 10;
    }

    .inside-header {
        padding: 12px 20px;
    }

    .tb-header-search-input {
        width: 160px;
    }

    .tb-search-dropdown {
        width: 340px;
    }

    .main-navigation .inside-navigation {
        padding: 0 20px;
    }

    .tb-topbar .tb-topbar-inner {
        padding: 6px 20px;
    }

    .content-with-sidebar {
        flex-direction: column;
        padding: 0 20px;
    }

    .content-with-sidebar .sidebar {
        width: 100%;
    }

    .tb-card-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .tb-cat-columns {
        grid-template-columns: 1fr;
    }

    .tb-footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Editorial sections: stack on tablet */
    .tb-editorial-header {
        padding: 12px 18px;
        gap: 8px 14px;
    }

    .tb-editorial-cat-desc {
        display: none;
    }

    .tb-editorial-grid {
        grid-template-columns: 1fr;
    }

    .tb-editorial-sidebar {
        flex-direction: row;
    }
}

@media (max-width: 768px) {
    .tb-topbar {
        display: none;
    }

    /* Mobile header */
    .inside-header {
        padding: 10px 16px;
        gap: 10px;
    }

    .site-branding {
        gap: 10px;
    }

    .site-logo img,
    .custom-logo {
        max-height: 36px;
    }

    .main-title a {
        font-size: 1.2rem;
        gap: 6px;
    }

    .site-description {
        display: none;
    }

    /* Mobile header search */
    .tb-header-search-input {
        width: 120px;
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    .tb-header-search-btn {
        padding: 6px 8px;
    }

    .tb-search-dropdown {
        position: fixed;
        top: auto;
        right: 8px;
        left: 8px;
        width: auto;
    }

    /* Mobile navigation: toggle */
    .menu-toggle {
        display: flex;
    }

    .main-navigation .main-nav {
        display: none;
    }

    .main-navigation .main-nav.toggled {
        display: block;
    }

    .main-navigation .main-nav.toggled .tb-nav-menu,
    .main-navigation .main-nav.toggled .menu {
        flex-direction: column;
    }

    .main-navigation .inside-navigation {
        padding: 0 16px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    .main-navigation .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: rgba(255, 255, 255, 0.05);
    }

    .single .entry-header .entry-title {
        font-size: 1.6rem;
    }

    .tb-hero-card {
        min-height: 300px;
    }

    .tb-hero-card .tb-hero-content h2 {
        font-size: 1.4rem;
    }

    .tb-archive-hero {
        min-height: 260px;
    }

    .tb-archive-header {
        padding: 14px 20px;
        gap: 8px 16px;
    }

    .tb-archive-count {
        margin-left: 0;
    }

    .tb-single-article,
    .tb-page-article {
        padding: 20px;
    }

    .page-header {
        padding: 20px;
    }

    .footer-widgets .inside-footer-widgets {
        padding: 24px 20px;
    }

    .inside-site-info {
        padding: 12px 20px;
    }

    .entry-content {
        font-size: 1rem;
    }

    .post-navigation {
        flex-direction: column;
    }

    .tb-404-container .tb-404-code {
        font-size: 5rem;
    }

    .home .site-main {
        padding: 0 20px;
    }

    .archive .site-main,
    .search .site-main {
        padding: 0 20px;
    }

    .page .content-area .site-main {
        padding: 0 20px;
    }

    .content-with-sidebar {
        padding: 0 20px;
    }

    .tb-section {
        padding: 24px 0;
    }

    .tb-section-inner {
        padding: 0 20px;
    }

    .tb-footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .tb-comments-header,
    .tb-comments-list-wrap,
    .tb-comment-form {
        padding-left: 16px;
        padding-right: 16px;
    }

    .tb-category-strip {
        gap: 6px;
    }

    /* Editorial sections: stack sidebar items */
    .tb-editorial-sidebar {
        flex-direction: column;
    }

    .tb-editorial-sections {
        padding: 24px 0;
    }
}

@media (max-width: 600px) {
    .tb-card-row {
        grid-template-columns: 1fr;
    }

    .tb-footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tb-news-grid {
        gap: 16px;
    }

    .tb-article-card .tb-card-body {
        padding: 14px;
    }

    .tb-article-card .tb-card-body h3 {
        font-size: 1rem;
    }
}

/* --- Print Styles --- */
@media print {
    .tb-topbar,
    .tb-reading-progress,
    .main-navigation,
    .site-footer,
    .tb-back-to-top,
    .sidebar {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .tb-single-article,
    .tb-page-article {
        box-shadow: none;
        border: none;
    }
}
