/*
Theme Name: The X Factors Magazine
Theme URI: https://thexfactors.com
Author: The X Factors Editorial Team
Author URI: https://thexfactors.com
Description: High-performance, modern bespoke digital magazine and news theme for The X Factors. Engineered with zero external dependencies, native dark mode, Bento editorial grids, breaking news ticker, reading progress, and instant mobile responsiveness.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thexfactors
Tags: news, magazine, grid-layout, dark-mode, custom-menu, featured-images, responsive-layout
*/

/* ==============================================================
   1. DESIGN SYSTEM & ROOT VARIABLES
   ============================================================== */
:root {
  /* Palette - Light Theme */
  --txf-bg: #f8fafc;
  --txf-bg-alt: #f1f5f9;
  --txf-card-bg: #ffffff;
  --txf-card-subtle: #f8fafc;
  --txf-text: #0f172a;
  --txf-text-muted: #64748b;
  --txf-text-light: #94a3b8;
  --txf-border: #e2e8f0;
  --txf-border-hover: #cbd5e1;

  /* Accents */
  --txf-accent: #e11d48;         /* Editorial Rose/Red */
  --txf-accent-hover: #be123c;
  --txf-accent-blue: #2563eb;    /* Tech / World */
  --txf-accent-emerald: #059669; /* Business */
  --txf-accent-amber: #d97706;   /* Politics / Culture */
  --txf-accent-purple: #7c3aed;  /* Science / Lifestyle */

  /* Typography */
  --txf-font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --txf-font-serif: 'Playfair Display', Georgia, Cambria, 'Times New Roman', serif;

  /* Elevation */
  --txf-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --txf-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --txf-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --txf-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  /* Dimensions */
  --txf-container: 1240px;
  --txf-radius-sm: 6px;
  --txf-radius-md: 10px;
  --txf-radius-lg: 16px;
  --txf-radius-pill: 9999px;
  --txf-header-height: 72px;
}

/* Dark Theme Variables */
[data-theme="dark"], body.txf-dark {
  --txf-bg: #090d16;
  --txf-bg-alt: #0f172a;
  --txf-card-bg: #111827;
  --txf-card-subtle: #1e293b;
  --txf-text: #f1f5f9;
  --txf-text-muted: #94a3b8;
  --txf-text-light: #64748b;
  --txf-border: #1e293b;
  --txf-border-hover: #334155;
  --txf-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
  --txf-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --txf-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --txf-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* ==============================================================
   2. GLOBAL RESETS & BASE STYLES
   ============================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--txf-bg);
  color: var(--txf-text);
  font-family: var(--txf-font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

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

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

.txf-container {
  max-width: var(--txf-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ==============================================================
   3. READING PROGRESS BAR
   ============================================================== */
#txf-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--txf-accent), #f43f5e);
  z-index: 99999;
  transition: width 0.1s linear;
}

/* ==============================================================
   4. HEADER & NAVIGATION
   ============================================================== */
/* Top Utility Bar */
.txf-topbar {
  background-color: var(--txf-bg-alt);
  border-bottom: 1px solid var(--txf-border);
  font-size: 13px;
  color: var(--txf-text-muted);
  padding: 8px 0;
}
.txf-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.txf-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.txf-topbar-date {
  font-weight: 500;
}
.txf-topbar-badge {
  background: var(--txf-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
}
.txf-topbar-socials {
  display: flex;
  align-items: center;
  gap: 12px;
}
.txf-topbar-socials a:hover {
  color: var(--txf-accent);
}

/* Main Navbar */
.txf-navbar {
  background-color: var(--txf-card-bg);
  border-bottom: 1px solid var(--txf-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--txf-shadow-sm);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.txf-navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--txf-header-height);
}

/* Logo */
.txf-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--txf-text);
}
.txf-logo span.accent {
  color: var(--txf-accent);
}

/* Navigation Links */
.txf-nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}
.txf-nav-item {
  position: relative;
}
.txf-nav-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--txf-text);
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.txf-nav-link:hover, .txf-nav-item.current-menu-item > .txf-nav-link {
  color: var(--txf-accent);
}

/* Dropdown Sub-menu */
.txf-nav-item:hover > .txf-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.txf-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background-color: var(--txf-card-bg);
  border: 1px solid var(--txf-border);
  border-radius: var(--txf-radius-md);
  box-shadow: var(--txf-shadow-lg);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 100;
}
.txf-submenu a {
  display: block;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--txf-text);
}
.txf-submenu a:hover {
  background-color: var(--txf-bg-alt);
  color: var(--txf-accent);
}

/* Header Actions (Search, Dark Mode, Mobile Toggle) */
.txf-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.txf-icon-btn {
  background: var(--txf-bg-alt);
  border: 1px solid var(--txf-border);
  color: var(--txf-text);
  width: 40px;
  height: 40px;
  border-radius: var(--txf-radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.txf-icon-btn:hover {
  background: var(--txf-border);
  color: var(--txf-accent);
}
.txf-mobile-toggle {
  display: none;
}

/* ==============================================================
   5. BREAKING NEWS TICKER
   ============================================================== */
.txf-ticker-wrap {
  background: var(--txf-card-bg);
  border-bottom: 1px solid var(--txf-border);
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 44px;
  font-size: 13.5px;
}
.txf-ticker-badge {
  background: var(--txf-accent);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}
.txf-ticker-pulse {
  width: 8px;
  height: 8px;
  background-color: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  animation: txf-pulse 1.8s infinite;
}
@keyframes txf-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
.txf-ticker-marquee {
  white-space: nowrap;
  overflow: hidden;
  flex-grow: 1;
  padding-left: 18px;
  display: flex;
  align-items: center;
}
.txf-ticker-items {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  animation: txf-ticker 40s linear infinite;
}
.txf-ticker-items:hover {
  animation-play-state: paused;
}
.txf-ticker-items a {
  font-weight: 600;
}
.txf-ticker-items a:hover {
  color: var(--txf-accent);
}
.txf-ticker-sep {
  color: var(--txf-accent);
}
@keyframes txf-ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==============================================================
   6. BENTO HERO EDITORIAL SECTION
   ============================================================== */
.txf-hero-section {
  padding: 32px 0 24px;
}
.txf-hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
}

/* Lead Big Hero Card */
.txf-card-lead {
  position: relative;
  border-radius: var(--txf-radius-lg);
  overflow: hidden;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--txf-shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.txf-card-lead:hover {
  transform: translateY(-4px);
  box-shadow: var(--txf-shadow-hover);
}
.txf-lead-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  z-index: 1;
}
.txf-card-lead:hover .txf-lead-bg {
  transform: scale(1.04);
}
.txf-lead-overlay {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 20%, rgba(15, 23, 42, 0.95) 85%);
  padding: 36px 32px;
  color: #fff;
}
.txf-lead-title {
  font-family: var(--txf-font-serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  margin: 12px 0 10px;
  color: #fff;
}
.txf-lead-title a:hover {
  color: #fda4af;
}
.txf-lead-excerpt {
  font-size: 15px;
  color: #e2e8f0;
  line-height: 1.55;
  margin-bottom: 14px;
}

/* Hero Side Column (Stack of 3 Cards) */
.txf-hero-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.txf-card-side {
  display: flex;
  gap: 16px;
  background: var(--txf-card-bg);
  border: 1px solid var(--txf-border);
  border-radius: var(--txf-radius-md);
  padding: 14px;
  box-shadow: var(--txf-shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.txf-card-side:hover {
  transform: translateY(-2px);
  border-color: var(--txf-border-hover);
  box-shadow: var(--txf-shadow-md);
}
.txf-side-thumb {
  width: 120px;
  height: 90px;
  flex-shrink: 0;
  border-radius: var(--txf-radius-sm);
  overflow: hidden;
}
.txf-side-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.txf-card-side:hover .txf-side-thumb img {
  transform: scale(1.08);
}
.txf-side-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.txf-side-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 6px;
}
.txf-side-title a:hover {
  color: var(--txf-accent);
}

/* Badges */
.txf-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: var(--txf-radius-sm);
  width: fit-content;
}
.txf-badge-rose { background: #ffe4e6; color: #be123c; }
.txf-badge-blue { background: #dbeafe; color: #1d4ed8; }
.txf-badge-emerald { background: #d1fae5; color: #047857; }
.txf-badge-amber { background: #fef3c7; color: #b45309; }
.txf-badge-purple { background: #ede9fe; color: #6d28d9; }

[data-theme="dark"] .txf-badge-rose { background: rgba(225, 29, 72, 0.2); color: #fb7185; }
[data-theme="dark"] .txf-badge-blue { background: rgba(37, 99, 235, 0.2); color: #60a5fa; }
[data-theme="dark"] .txf-badge-emerald { background: rgba(5, 150, 105, 0.2); color: #34d399; }
[data-theme="dark"] .txf-badge-amber { background: rgba(217, 119, 6, 0.2); color: #fbbf24; }
[data-theme="dark"] .txf-badge-purple { background: rgba(124, 58, 237, 0.2); color: #a78bfa; }

/* Meta info */
.txf-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--txf-text-muted);
  margin-top: 8px;
}
.txf-meta-sep {
  opacity: 0.5;
}

/* ==============================================================
   7. MAIN CONTENT & SIDEBAR GRID
   ============================================================== */
.txf-main-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  padding-bottom: 60px;
}

/* Section Headers */
.txf-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--txf-border);
  padding-bottom: 10px;
  margin-bottom: 24px;
}
.txf-section-title {
  font-family: var(--txf-font-serif);
  font-size: 22px;
  font-weight: 700;
  position: relative;
  display: inline-block;
}
.txf-section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--txf-accent);
}
.txf-view-all {
  font-size: 13px;
  font-weight: 700;
  color: var(--txf-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.txf-view-all:hover {
  text-decoration: underline;
}

/* Category Grid (2 Column Cards) */
.txf-card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-bottom: 36px;
}
.txf-card {
  background: var(--txf-card-bg);
  border: 1px solid var(--txf-border);
  border-radius: var(--txf-radius-md);
  overflow: hidden;
  box-shadow: var(--txf-shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}
.txf-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--txf-shadow-md);
  border-color: var(--txf-border-hover);
}
.txf-card-thumb {
  height: 200px;
  overflow: hidden;
  position: relative;
}
.txf-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.txf-card:hover .txf-card-thumb img {
  transform: scale(1.06);
}
.txf-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.txf-card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  margin: 10px 0 8px;
}
.txf-card-title a:hover {
  color: var(--txf-accent);
}
.txf-card-excerpt {
  font-size: 13.5px;
  color: var(--txf-text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

/* ==============================================================
   8. SIDEBAR WIDGETS
   ============================================================== */
.txf-sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.txf-widget {
  background: var(--txf-card-bg);
  border: 1px solid var(--txf-border);
  border-radius: var(--txf-radius-md);
  padding: 24px;
  box-shadow: var(--txf-shadow-sm);
}
.txf-widget-title {
  font-family: var(--txf-font-serif);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--txf-border);
  padding-bottom: 10px;
}

/* Trending List (Numbered 01 to 05) */
.txf-trending-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--txf-border);
}
.txf-trending-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.txf-trending-rank {
  font-size: 24px;
  font-weight: 800;
  color: var(--txf-text-light);
  line-height: 1;
  font-family: var(--txf-font-serif);
  min-width: 30px;
}
.txf-trending-item:hover .txf-trending-rank {
  color: var(--txf-accent);
}
.txf-trending-title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
}
.txf-trending-title a:hover {
  color: var(--txf-accent);
}

/* Newsletter Widget Card */
.txf-newsletter-card {
  background: linear-gradient(135deg, var(--txf-accent), #9f1239);
  color: #fff;
  border-radius: var(--txf-radius-md);
  padding: 28px 24px;
  box-shadow: var(--txf-shadow-md);
}
.txf-newsletter-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 10px;
  border-radius: var(--txf-radius-pill);
  display: inline-block;
  margin-bottom: 10px;
}
.txf-newsletter-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.txf-newsletter-desc {
  font-size: 13.5px;
  color: #ffe4e6;
  margin-bottom: 18px;
  line-height: 1.5;
}
.txf-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.txf-newsletter-input {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #0f172a;
  padding: 12px 16px;
  border-radius: var(--txf-radius-sm);
  outline: none;
}
.txf-newsletter-btn {
  background: #0f172a;
  color: #fff;
  border: none;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: var(--txf-radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}
.txf-newsletter-btn:hover {
  background: #1e293b;
}

/* ==============================================================
   9. SINGLE ARTICLE TEMPLATE
   ============================================================== */
.txf-single-wrapper {
  max-width: 860px;
  margin: 36px auto 60px;
  background: var(--txf-card-bg);
  border: 1px solid var(--txf-border);
  border-radius: var(--txf-radius-lg);
  padding: 44px 48px;
  box-shadow: var(--txf-shadow-sm);
}
.txf-single-header {
  margin-bottom: 28px;
}
.txf-single-title {
  font-family: var(--txf-font-serif);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.25;
  margin: 14px 0 16px;
  color: var(--txf-text);
}
.txf-single-excerpt {
  font-size: 18px;
  line-height: 1.6;
  color: var(--txf-text-muted);
  margin-bottom: 20px;
}
.txf-single-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--txf-border);
  font-size: 13.5px;
  color: var(--txf-text-muted);
}
.txf-author-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--txf-text);
}
.txf-author-chip img {
  border-radius: 50%;
}

/* Social Share Bar */
.txf-share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  margin: 20px 0;
  border-top: 1px solid var(--txf-border);
  border-bottom: 1px solid var(--txf-border);
}
.txf-share-label {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--txf-text-muted);
  margin-right: 6px;
}
.txf-share-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--txf-radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--txf-border);
  background: var(--txf-bg-alt);
  color: var(--txf-text);
  cursor: pointer;
  transition: all 0.2s ease;
}
.txf-share-btn:hover {
  transform: translateY(-2px);
}
.txf-share-wa:hover { background: #25d366; color: #fff; border-color: #25d366; }
.txf-share-x:hover { background: #000; color: #fff; border-color: #000; }
.txf-share-in:hover { background: #0a66c2; color: #fff; border-color: #0a66c2; }
.txf-share-fb:hover { background: #1877f2; color: #fff; border-color: #1877f2; }

/* Featured Image */
.txf-single-featured {
  margin: 24px 0 32px;
  border-radius: var(--txf-radius-md);
  overflow: hidden;
}
.txf-single-featured img {
  width: 100%;
  height: auto;
}
.txf-single-caption {
  font-size: 12px;
  color: var(--txf-text-muted);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

/* Article Content Typography */
.txf-article-body {
  font-size: 18px;
  line-height: 1.8;
  color: var(--txf-text);
}
.txf-article-body p {
  margin-bottom: 22px;
}
.txf-article-body h2, .txf-article-body h3, .txf-article-body h4 {
  font-family: var(--txf-font-serif);
  font-weight: 700;
  margin: 36px 0 16px;
  line-height: 1.3;
}
.txf-article-body blockquote {
  border-left: 4px solid var(--txf-accent);
  padding: 12px 24px;
  margin: 28px 0;
  font-family: var(--txf-font-serif);
  font-style: italic;
  font-size: 20px;
  background: var(--txf-bg-alt);
  border-radius: 0 var(--txf-radius-md) var(--txf-radius-md) 0;
}
.txf-article-body ul, .txf-article-body ol {
  margin: 18px 0 24px 28px;
  list-style: disc;
}
.txf-article-body li {
  margin-bottom: 8px;
}

/* Author Box */
.txf-author-box {
  display: flex;
  gap: 20px;
  align-items: center;
  background: var(--txf-bg-alt);
  border: 1px solid var(--txf-border);
  border-radius: var(--txf-radius-md);
  padding: 24px;
  margin: 40px 0;
}
.txf-author-box img {
  border-radius: 50%;
  width: 72px;
  height: 72px;
}
.txf-author-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.txf-author-bio {
  font-size: 14px;
  color: var(--txf-text-muted);
}

/* Related Posts */
.txf-related-section {
  margin-top: 48px;
}
.txf-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* ==============================================================
   9B. DISCUSSION & COMMENTS SYSTEM (PREMIUM EDITORIAL)
   ============================================================== */
.txf-comments-area {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid var(--txf-border);
}

.txf-comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.txf-comments-title {
  font-family: var(--txf-font-serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--txf-text);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.txf-comments-count {
  font-family: var(--txf-font-sans);
  font-size: 13px;
  font-weight: 800;
  background: var(--txf-accent);
  color: #ffffff;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

/* Comments List */
.txf-comment-list,
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
}

.txf-comment-item {
  margin-bottom: 20px;
}

.txf-comment-body {
  display: flex;
  gap: 18px;
  background: var(--txf-bg-alt);
  border: 1px solid var(--txf-border);
  border-radius: var(--txf-radius-md);
  padding: 22px 24px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.txf-comment-body:hover {
  border-color: var(--txf-accent);
  box-shadow: var(--txf-shadow-sm);
}

.txf-comment-avatar img {
  border-radius: 50%;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 2px solid var(--txf-card-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.txf-comment-content-wrap {
  flex: 1;
  min-width: 0;
}

.txf-comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.txf-comment-author-name .author-fn,
.txf-comment-author-name .author-fn a {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--txf-text);
  text-decoration: none;
}

.txf-badge-author {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--txf-accent);
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 6px;
  letter-spacing: 0.5px;
}

.txf-comment-time {
  font-size: 12.5px;
  color: var(--txf-text-muted);
}

.txf-comment-awaiting-moderation {
  font-size: 13px;
  color: #d97706;
  font-style: italic;
  margin-bottom: 8px;
}

.txf-comment-text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--txf-text);
  margin-bottom: 12px;
}

.txf-comment-text p:last-child {
  margin-bottom: 0;
}

.comment-reply-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--txf-text);
  background: var(--txf-card-bg);
  border: 1px solid var(--txf-border);
  padding: 4px 12px;
  border-radius: var(--txf-radius-sm);
  text-decoration: none;
  transition: all 0.2s ease;
}

.comment-reply-link:hover {
  background: var(--txf-accent);
  border-color: var(--txf-accent);
  color: #ffffff;
}

/* Nested replies */
.txf-comment-list .children {
  list-style: none;
  margin-left: 36px;
  margin-top: 16px;
  padding: 0;
  border-left: 2px solid var(--txf-border);
  padding-left: 16px;
}

/* Comment Navigation */
.txf-comment-nav {
  display: flex;
  justify-content: space-between;
  margin: 24px 0;
  font-size: 14px;
  font-weight: 600;
}
.txf-comment-nav a {
  color: var(--txf-accent);
  text-decoration: none;
}

/* ==============================================================
   9C. COMMENT FORM & INPUT STYLES (MATCHING USER SCREENSHOT)
   ============================================================== */
.comment-respond,
#respond {
  margin-top: 40px;
  padding: 32px 36px;
  background: var(--txf-bg-alt);
  border: 1px solid var(--txf-border);
  border-radius: var(--txf-radius-lg);
  box-shadow: var(--txf-shadow-sm);
}

.txf-reply-title,
.comment-reply-title {
  font-family: var(--txf-font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--txf-text);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.txf-cancel-reply a,
#cancel-comment-reply-link {
  font-family: var(--txf-font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--txf-accent);
  text-decoration: none;
  padding: 3px 10px;
  border-radius: var(--txf-radius-sm);
  background: var(--txf-card-bg);
  border: 1px solid var(--txf-border);
}

.txf-comment-notes,
.comment-notes {
  font-size: 13.5px;
  color: var(--txf-text-muted);
  margin-bottom: 22px;
}

.logged-in-as {
  font-size: 13.5px;
  color: var(--txf-text-muted);
  margin-bottom: 22px;
  padding: 10px 16px;
  background: var(--txf-card-bg);
  border: 1px solid var(--txf-border);
  border-radius: var(--txf-radius-md);
  display: block;
}

.logged-in-as a {
  color: var(--txf-accent);
  font-weight: 600;
  text-decoration: none;
}
.logged-in-as a:hover {
  text-decoration: underline;
}

/* Form Groups & Inputs */
.txf-comment-field-group,
.comment-form p:not(.logged-in-as):not(.comment-notes):not(.form-submit):not(.comment-form-cookies-consent) {
  margin-bottom: 18px;
}

.txf-field-label,
.comment-form label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--txf-text);
  margin-bottom: 8px;
}

.txf-field-label .required,
.comment-form .required {
  color: var(--txf-accent);
  font-weight: 700;
}

.txf-field-label .optional {
  font-weight: 400;
  color: var(--txf-text-muted);
  font-size: 12px;
}

/* Global input styling */
.txf-input,
.txf-textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 13px 16px;
  font-family: var(--txf-font-sans);
  font-size: 15px;
  color: var(--txf-text);
  background: var(--txf-card-bg);
  border: 1.5px solid var(--txf-border);
  border-radius: var(--txf-radius-md);
  outline: none;
  transition: all 0.2s ease;
  line-height: 1.5;
}

.txf-input:focus,
.txf-textarea:focus,
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
  border-color: var(--txf-accent);
  background: var(--txf-card-bg);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}

.txf-textarea,
.comment-form textarea {
  min-height: 140px;
  resize: vertical;
}

@media (min-width: 640px) {
  .comment-form-author,
  .comment-form-email {
    width: 48.5%;
    display: inline-block;
  }
  .comment-form-email {
    margin-left: 2.5%;
  }
}

/* Cookies Checkbox */
.txf-cookies-consent,
.comment-form-cookies-consent {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0 24px !important;
}

.txf-cookies-consent input[type="checkbox"],
.comment-form-cookies-consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--txf-accent);
  cursor: pointer;
  flex-shrink: 0;
}

.txf-cookies-consent label,
.comment-form-cookies-consent label {
  font-size: 13px;
  color: var(--txf-text-muted);
  font-weight: 400;
  line-height: 1.5;
  margin: 0;
  cursor: pointer;
}

/* Submit Button */
.txf-form-submit,
.form-submit {
  margin-top: 24px;
  margin-bottom: 0;
}

.txf-btn-submit,
.form-submit input[type="submit"],
.form-submit #submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 32px;
  font-family: var(--txf-font-sans);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff !important;
  background: linear-gradient(135deg, #e11d48, #be123c) !important;
  border: none !important;
  border-radius: var(--txf-radius-md) !important;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.3);
  text-decoration: none;
}

.txf-btn-submit:hover,
.form-submit input[type="submit"]:hover,
.form-submit #submit:hover {
  background: linear-gradient(135deg, #be123c, #9f1239) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.45);
}

.txf-btn-submit:active,
.form-submit input[type="submit"]:active,
.form-submit #submit:active {
  transform: translateY(0);
}


/* ==============================================================
   10. SEARCH MODAL POPUP
   ============================================================== */
.txf-search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}
.txf-search-modal.active {
  opacity: 1;
  visibility: visible;
}
.txf-search-box {
  width: 90%;
  max-width: 620px;
  position: relative;
}
.txf-search-input {
  width: 100%;
  background: var(--txf-card-bg);
  border: 2px solid var(--txf-border);
  color: var(--txf-text);
  font-size: 20px;
  padding: 18px 60px 18px 24px;
  border-radius: var(--txf-radius-lg);
  outline: none;
  box-shadow: var(--txf-shadow-lg);
}
.txf-search-close {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--txf-text-muted);
  font-size: 24px;
  cursor: pointer;
}

/* ==============================================================
   11. MOBILE DRAWER MENU
   ============================================================== */
.txf-drawer {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100%;
  background: var(--txf-card-bg);
  box-shadow: var(--txf-shadow-lg);
  z-index: 10001;
  transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.txf-drawer.open {
  left: 0;
}
.txf-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}
.txf-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}
.txf-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--txf-border);
}
.txf-drawer-menu {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}
.txf-drawer-menu a {
  font-size: 16px;
  font-weight: 600;
  padding: 6px 0;
}

/* ==============================================================
   12. FOOTER
   ============================================================== */
.txf-footer {
  background-color: #0b0f19;
  color: #f1f5f9;
  border-top: 1px solid #1e293b;
  padding-top: 54px;
}
.txf-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 36px;
  padding-bottom: 48px;
}
.txf-footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  color: #fff;
}
.txf-footer-links li {
  margin-bottom: 10px;
}
.txf-footer-links a {
  font-size: 14px;
  color: #94a3b8;
}
.txf-footer-links a:hover {
  color: var(--txf-accent);
}
.txf-footer-desc {
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.6;
  margin-top: 12px;
}
.txf-footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 22px 0;
  font-size: 13px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Back to Top Floating Button */
.txf-back-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--txf-accent);
  color: #fff;
  border: none;
  box-shadow: var(--txf-shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  z-index: 999;
}
.txf-back-top.show {
  opacity: 1;
  visibility: visible;
}
.txf-back-top:hover {
  background: var(--txf-accent-hover);
  transform: translateY(-3px);
}

/* ==============================================================
   13. RESPONSIVE MEDIA QUERIES
   ============================================================== */
@media (max-width: 1024px) {
  .txf-hero-grid {
    grid-template-columns: 1fr;
  }
  .txf-main-layout {
    grid-template-columns: 1fr;
  }
  .txf-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .txf-nav-menu, .txf-topbar {
    display: none;
  }
  .txf-mobile-toggle {
    display: flex;
  }
  .txf-card-grid-2 {
    grid-template-columns: 1fr;
  }
  .txf-related-grid {
    grid-template-columns: 1fr;
  }
  .txf-footer-grid {
    grid-template-columns: 1fr;
  }
  .txf-single-wrapper {
    padding: 24px 20px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .txf-single-title {
    font-size: 28px;
  }
  .txf-footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}
