/*
Theme Name: UTK Times
Theme URI: https://utktimes.com
Author: UTK Times Team
Author URI: https://utktimes.com
Description: A modern, fast, SEO-optimized news magazine WordPress theme for UTK Times. Built for high traffic, AdSense optimization, mobile-first experience, and Google Discover.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: utk-times
Tags: news, magazine, blog, grid-layout, featured-images, custom-menu, custom-logo, dark-mode, rtl-language-support, translation-ready, amp, ad-support, infinite-scroll
*/

/* =====================================================
   UTK TIMES - WORDPRESS NEWS THEME
   Modern Magazine Style | Mobile-First | SEO Optimized
   ===================================================== */

/* CSS Custom Properties */
:root {
  --primary:        #c0392b;
  --primary-dark:   #962d22;
  --primary-light:  #e74c3c;
  --secondary:      #2c3e50;
  --accent:         #f39c12;
  --text:           #1a1a2e;
  --text-muted:     #6c757d;
  --bg:             #ffffff;
  --bg-alt:         #f8f9fa;
  --bg-card:        #ffffff;
  --border:         #e9ecef;
  --shadow:         0 2px 12px rgba(0,0,0,.08);
  --shadow-lg:      0 8px 32px rgba(0,0,0,.12);
  --radius:         8px;
  --radius-lg:      16px;
  --transition:     all .25s ease;
  --font-body:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading:   'Playfair Display', Georgia, serif;
  --font-mono:      'Fira Code', monospace;
  --header-height:  64px;
  --sidebar-width:  320px;
  --max-width:      1280px;
  --content-width:  860px;
}

/* Dark Mode */
[data-theme="dark"] {
  --text:       #e2e8f0;
  --text-muted: #94a3b8;
  --bg:         #0f172a;
  --bg-alt:     #1e293b;
  --bg-card:    #1e293b;
  --border:     #334155;
  --shadow:     0 2px 12px rgba(0,0,0,.4);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.5);
}

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

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: inherit; text-decoration: none; transition: var(--transition); }
ul, ol { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--text);
  font-weight: 700;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem,  3vw, 2rem);    }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem);  }
h4 { font-size: 1.2rem; }
h5 { font-size: 1rem;   }
h6 { font-size: .9rem;  }

p { margin-bottom: 1.25rem; }

/* ── Layout Utilities ── */
.container   { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.container-sm{ max-width: var(--content-width); margin: 0 auto; padding: 0 20px; }
.grid-2  { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.grid-3  { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4  { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.flex    { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-1  { gap: 8px;  }
.gap-2  { gap: 16px; }
.gap-3  { gap: 24px; }
.mb-1   { margin-bottom: 8px;  }
.mb-2   { margin-bottom: 16px; }
.mb-3   { margin-bottom: 24px; }
.mb-4   { margin-bottom: 40px; }
.mt-3   { margin-top: 24px; }
.mt-4   { margin-top: 40px; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── Breaking News Bar ── */
#utk-breaking-bar {
  background: var(--primary);
  color: #fff;
  padding: 8px 0;
  font-size: .85rem;
  font-weight: 600;
  overflow: hidden;
  position: relative;
  z-index: 200;
}
.breaking-label {
  background: var(--secondary);
  padding: 2px 12px;
  border-radius: 3px;
  margin-right: 12px;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.breaking-flash {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fff;
  margin-right: 6px;
  animation: flash 1s infinite;
}
@keyframes flash { 0%,100%{opacity:1} 50%{opacity:.2} }

.breaking-ticker-wrap {
  overflow: hidden;
  flex: 1;
}
.breaking-ticker {
  display: flex;
  gap: 80px;
  white-space: nowrap;
  animation: ticker 40s linear infinite;
}
.breaking-ticker:hover { animation-play-state: paused; }
.breaking-ticker a { color: #fff; }
.breaking-ticker a:hover { text-decoration: underline; }
@keyframes ticker { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* ── Header ── */
#utk-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
#utk-header.scrolled {
  box-shadow: var(--shadow-lg);
}
.header-inner {
  display: flex;
  align-items: center;
  height: var(--header-height);
  gap: 20px;
}
.site-logo img { height: 44px; width: auto; }
.site-logo a { display: flex; align-items: center; gap: 10px; }
.site-logo .logo-text {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -1px;
}

/* Primary Nav */
#primary-nav { margin-left: auto; }
#primary-nav ul {
  display: flex;
  gap: 4px;
  align-items: center;
}
#primary-nav > ul > li { position: relative; }
#primary-nav > ul > li > a {
  display: block;
  padding: 8px 14px;
  font-size: .875rem;
  font-weight: 600;
  border-radius: var(--radius);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .04em;
}
#primary-nav > ul > li > a:hover,
#primary-nav > ul > li.current-menu-item > a {
  color: var(--primary);
  background: rgba(192,57,43,.08);
}

/* Dropdown */
#primary-nav .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: var(--transition);
  z-index: 500;
}
#primary-nav li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#primary-nav .sub-menu a {
  display: block;
  padding: 10px 18px;
  font-size: .875rem;
  border-bottom: 1px solid var(--border);
}
#primary-nav .sub-menu a:hover { color: var(--primary); background: var(--bg-alt); }
#primary-nav .sub-menu li:last-child a { border-bottom: none; }

/* Mega Menu */
.mega-menu-wrap {
  position: absolute;
  top: calc(100% + 8px);
  left: -200px;
  width: 640px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: var(--transition);
  z-index: 500;
}
.mega-menu-parent:hover .mega-menu-wrap {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mega-col h4 {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--primary);
  margin-bottom: 10px;
  font-family: var(--font-body);
  font-weight: 700;
}
.mega-col a {
  display: block;
  padding: 6px 0;
  font-size: .875rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.mega-col a:hover { color: var(--primary); padding-left: 6px; }

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}
.btn-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: var(--transition);
  font-size: 1rem;
}
.btn-icon:hover { background: var(--bg-alt); color: var(--primary); }

/* Search Popup */
#search-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
#search-popup.active { opacity: 1; visibility: visible; }
.search-popup-inner {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 640px;
  box-shadow: var(--shadow-lg);
}
.search-popup-form { display: flex; gap: 12px; }
.search-popup-form input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1.1rem;
  background: var(--bg);
  color: var(--text);
  outline: none;
}
.search-popup-form input:focus { border-color: var(--primary); }
.btn-search {
  padding: 14px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
}
.btn-search:hover { background: var(--primary-dark); }

/* Mobile Nav */
#mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}
#mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Category Badge ── */
.cat-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--primary);
  color: #fff;
}
.cat-badge.sports     { background: #27ae60; }
.cat-badge.tech       { background: #8e44ad; }
.cat-badge.business   { background: #2980b9; }
.cat-badge.entertain  { background: #d35400; }
.cat-badge.odisha     { background: #16a085; }
.cat-badge.inter      { background: #1abc9c; }
.cat-badge.viral      { background: #e74c3c; }
.cat-badge.live       { background: var(--primary); animation: flash 1s infinite; }

/* ── Article Cards ── */
.news-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.news-card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}
.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.news-card:hover .news-card-img img { transform: scale(1.04); }
.news-card-img .cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}
.news-card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.news-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}
.news-card-title a:hover { color: var(--primary); }
.news-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: auto;
}
.news-card-meta .author { font-weight: 600; color: var(--text); }
.news-card-excerpt {
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.6;
}

/* Card Variants */
.news-card-horizontal {
  flex-direction: row;
  align-items: stretch;
}
.news-card-horizontal .news-card-img {
  width: 180px;
  flex-shrink: 0;
  aspect-ratio: unset;
}
.news-card-sm .news-card-body { padding: 12px; }
.news-card-sm .news-card-title { font-size: .9rem; }
.news-card-featured {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
}
.news-card-featured .news-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
}
.news-card-featured .news-card-body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,.9) 0%, transparent 100%);
  color: #fff;
  padding: 30px 24px 20px;
}
.news-card-featured .news-card-title a { color: #fff; }
.news-card-featured .news-card-meta { color: rgba(255,255,255,.8); }

/* ── Section Headings ── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--border);
  position: relative;
}
.section-head::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--primary);
}
.section-head h2 { font-size: 1.3rem; margin: 0; }
.section-head a { font-size: .85rem; color: var(--primary); font-weight: 600; }

/* ── Hero Slider ── */
#utk-hero {
  position: relative;
  overflow: hidden;
  background: var(--secondary);
}
.hero-slide {
  position: relative;
  height: 520px;
  display: none;
}
.hero-slide.active { display: block; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .7;
}
.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 60px 40px 36px;
  background: linear-gradient(to top, rgba(0,0,0,.9) 0%, transparent 100%);
  color: #fff;
}
.hero-content .cat-badge { margin-bottom: 12px; }
.hero-content h1 { color: #fff; margin-bottom: 14px; }
.hero-content p { color: rgba(255,255,255,.8); margin-bottom: 20px; max-width: 600px; }
.hero-dots {
  position: absolute;
  bottom: 20px;
  right: 40px;
  display: flex;
  gap: 8px;
}
.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}
.hero-dot.active { background: #fff; transform: scale(1.3); }
.hero-arrows {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
  pointer-events: none;
}
.hero-arrow {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  cursor: pointer;
  pointer-events: all;
  font-size: 1.2rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-arrow:hover { background: rgba(255,255,255,.35); }

/* ── Homepage Layout ── */
.homepage-main { padding: 40px 0; }

.main-with-sidebar {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 36px;
  align-items: start;
}

.main-content-area {}

/* Featured Grid */
.featured-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}
.featured-grid-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Category Section */
.cat-section { margin-bottom: 48px; }
.cat-section .grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ── Sidebar ── */
.sidebar { position: sticky; top: calc(var(--header-height) + 20px); }
.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 28px;
}
.widget-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
  color: var(--text);
}

/* Popular Posts Widget */
.popular-post-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.popular-post-item:last-child { border-bottom: none; }
.popular-post-num {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  min-width: 28px;
  font-family: var(--font-heading);
}
.popular-post-item:first-child .popular-post-num { color: var(--primary); }
.popular-post-title { font-size: .875rem; font-weight: 600; line-height: 1.4; }
.popular-post-title a:hover { color: var(--primary); }
.popular-post-meta { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }

/* Ad Widget */
.ad-widget { text-align: center; }
.ad-label {
  font-size: .7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 8px;
}
.ad-placeholder {
  background: var(--bg-alt);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: .85rem;
  min-height: 280px;
}

/* ── Single Post ── */
.single-post { padding: 40px 0; }
.single-post-header { margin-bottom: 32px; }
.single-post-header .cat-badge { margin-bottom: 14px; }
.single-post-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 20px;
  line-height: 1.2;
}
.single-post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: .875rem;
  color: var(--text-muted);
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.single-post-meta strong { color: var(--text); }
.single-post-meta .reading-time {
  display: flex;
  align-items: center;
  gap: 5px;
}
.featured-image-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
}
.featured-image-wrap img { width: 100%; max-height: 520px; object-fit: cover; }
.image-caption {
  font-size: .8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* Post Content */
.post-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
}
.post-content p { margin-bottom: 1.5rem; }
.post-content h2 { margin: 2rem 0 1rem; font-size: 1.6rem; }
.post-content h3 { margin: 1.75rem 0 .875rem; font-size: 1.3rem; }
.post-content h4 { margin: 1.5rem 0 .75rem; }
.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 16px 24px;
  margin: 2rem 0;
  background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  font-size: 1.1rem;
}
.post-content ul, .post-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
}
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: .5rem; }
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}
.post-content table th,
.post-content table td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
  font-size: .9rem;
}
.post-content table th { background: var(--bg-alt); font-weight: 700; }
.post-content a { color: var(--primary); text-decoration: underline; }
.post-content code {
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: .9em;
}
.post-content pre {
  background: var(--secondary);
  color: #e2e8f0;
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5rem 0;
}

/* Table of Contents */
.toc-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 28px 0;
}
.toc-box h3 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 12px;
  color: var(--primary);
  font-family: var(--font-body);
}
.toc-box ol { list-style: decimal; margin-left: 1.2rem; }
.toc-box li { margin-bottom: 6px; }
.toc-box a { color: var(--primary); font-size: .9rem; }

/* Author Box */
.author-box {
  display: flex;
  gap: 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 40px 0;
}
.author-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-name { font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }
.author-title { color: var(--primary); font-size: .8rem; font-weight: 600; margin-bottom: 8px; }
.author-bio { font-size: .9rem; color: var(--text-muted); line-height: 1.6; }

/* Social Share */
.social-share {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 32px 0;
  flex-wrap: wrap;
}
.social-share-label { font-weight: 600; font-size: .9rem; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  color: #fff;
  text-decoration: none;
}
.share-fb      { background: #1877f2; }
.share-wa      { background: #25d366; }
.share-tw      { background: #1da1f2; }
.share-tg      { background: #0088cc; }
.share-copy    { background: var(--secondary); }
.share-btn:hover { opacity: .88; transform: translateY(-1px); }

/* Reactions */
.reactions-wrap {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.reaction-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  font-size: .875rem;
  transition: var(--transition);
}
.reaction-btn:hover { border-color: var(--primary); background: rgba(192,57,43,.06); }
.reaction-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.reaction-emoji { font-size: 1.2rem; }

/* Tags */
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.post-tags .tag {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .8rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.post-tags .tag:hover { border-color: var(--primary); color: var(--primary); }

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

/* ── Footer ── */
#utk-footer {
  background: var(--secondary);
  color: rgba(255,255,255,.85);
  padding: 60px 0 0;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-about .logo-text { color: #fff; font-size: 1.8rem; margin-bottom: 16px; }
.footer-about p { font-size: .9rem; line-height: 1.7; opacity: .75; margin-bottom: 20px; }
.footer-socials { display: flex; gap: 10px; }
.footer-social-link {
  width: 38px; height: 38px;
  background: rgba(255,255,255,.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  transition: var(--transition);
}
.footer-social-link:hover { background: var(--primary); }
.footer-col h4 {
  color: #fff;
  font-size: .95rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 20px;
  font-weight: 700;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { font-size: .875rem; opacity: .75; transition: var(--transition); }
.footer-col ul a:hover { opacity: 1; color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
  opacity: .65;
}
.footer-bottom a { opacity: 1; }

/* ── Widgets ── */
/* Weather Widget */
.weather-widget {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #1a6caf, #0d4a7c);
  border-radius: var(--radius);
  color: #fff;
  margin-bottom: 20px;
}
.weather-icon { font-size: 2.5rem; }
.weather-temp { font-size: 2rem; font-weight: 700; }
.weather-info { font-size: .85rem; opacity: .85; }

/* Crypto Widget */
.crypto-widget {}
.crypto-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: .875rem;
}
.crypto-item:last-child { border-bottom: none; }
.crypto-name { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.crypto-price { font-weight: 700; }
.crypto-change { font-size: .8rem; padding: 2px 8px; border-radius: 3px; font-weight: 600; }
.crypto-change.up   { background: rgba(39,174,96,.15); color: #27ae60; }
.crypto-change.down { background: rgba(231,76,60,.15); color: #e74c3c; }

/* Newsletter */
.newsletter-widget { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
.newsletter-widget .widget-title { border-color: rgba(255,255,255,.3); color: #fff; }
.newsletter-widget p { font-size: .875rem; opacity: .85; margin-bottom: 14px; }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-form input {
  padding: 10px 14px;
  border: none;
  border-radius: var(--radius);
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: .9rem;
  outline: none;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.6); }
.newsletter-form input:focus { background: rgba(255,255,255,.25); }
.btn-newsletter {
  padding: 10px;
  background: #fff;
  color: var(--primary);
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
  font-size: .9rem;
  transition: var(--transition);
}
.btn-newsletter:hover { background: var(--accent); color: #fff; }

/* ── Ads ── */
.ad-slot {
  text-align: center;
  margin: 24px 0;
}
.ad-slot .ad-label {
  font-size: .7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  display: block;
  margin-bottom: 4px;
}
.in-article-ad {
  margin: 32px auto;
  max-width: 728px;
  text-align: center;
}
.sticky-ad-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 8px;
  text-align: center;
  z-index: 9000;
  display: none;
}
.sticky-ad-footer.visible { display: block; }
.sticky-ad-close {
  position: absolute;
  top: -12px;
  right: 16px;
  width: 24px; height: 24px;
  background: var(--secondary);
  color: #fff;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Live Blog ── */
.live-blog-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.live-blog-header {
  background: var(--primary);
  color: #fff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}
.live-pulse {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #fff;
  animation: flash 1s infinite;
}
.live-blog-entry {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.live-blog-time {
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.live-blog-entry h4 { margin-bottom: 8px; font-size: 1rem; }
.live-blog-entry p  { font-size: .9rem; margin-bottom: 0; }

/* ── Breadcrumbs ── */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { opacity: .4; }

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 40px 0;
  flex-wrap: wrap;
}
.page-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text);
  text-decoration: none;
}
.page-btn:hover, .page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── Reading Progress Bar ── */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  z-index: 9999;
  transition: width .1s;
  width: 0%;
}

/* ── Back to Top ── */
#back-to-top {
  position: fixed;
  bottom: 80px;
  right: 24px;
  width: 44px; height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 8000;
}
#back-to-top.visible { opacity: 1; transform: translateY(0); }
#back-to-top:hover { background: var(--primary-dark); }

/* ── 404 Page ── */
.error-404-wrap {
  text-align: center;
  padding: 80px 20px;
}
.error-404-wrap h1 {
  font-size: 8rem;
  color: var(--primary);
  opacity: .2;
  line-height: 1;
  margin-bottom: 0;
}
.error-404-wrap h2 { margin-bottom: 16px; }
.error-404-wrap p  { color: var(--text-muted); margin-bottom: 28px; }

/* ── Comments ── */
.comments-wrap { margin-top: 48px; }
.comment-list  { margin-bottom: 40px; }
.comment-item  {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.comment-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-meta   { font-size: .8rem; color: var(--text-muted); margin-bottom: 6px; }
.comment-meta strong { color: var(--text); font-size: .9rem; }
.comment-body p { font-size: .9rem; margin-bottom: 0; }
.comment-reply  { font-size: .8rem; color: var(--primary); font-weight: 600; cursor: pointer; margin-top: 6px; }

.comment-form h3 { margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 6px; }
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: .9rem;
  outline: none;
  transition: var(--transition);
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(192,57,43,.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.btn-comment {
  padding: 12px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn-comment:hover { background: var(--primary-dark); }

/* ── Mobile Bottom Nav ── */
#mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  z-index: 9100;
  padding: 6px 0;
}
.mobile-bottom-nav-inner {
  display: flex;
  justify-content: space-around;
}
.mob-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  font-size: .65rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
  transition: var(--transition);
}
.mob-nav-item svg { width: 22px; height: 22px; }
.mob-nav-item:hover, .mob-nav-item.active { color: var(--primary); }
.mob-nav-item.active svg { stroke: var(--primary); }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-with-sidebar { grid-template-columns: 1fr 280px; }
  :root { --sidebar-width: 280px; }
}

@media (max-width: 900px) {
  #primary-nav { display: none; }
  #mobile-menu-toggle { display: flex; }
  .main-with-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .featured-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .related-grid { grid-template-columns: repeat(2,1fr); }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .hero-slide { height: 360px; }
  .hero-content { padding: 30px 20px 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  #mobile-bottom-nav { display: block; }
  body { padding-bottom: 64px; }
  .author-box { flex-direction: column; }
  .news-card-horizontal { flex-direction: column; }
  .news-card-horizontal .news-card-img { width: 100%; aspect-ratio: 16/10; }
  .header-inner { gap: 12px; }
  .site-logo .logo-text { font-size: 1.3rem; }
}

@media (max-width: 400px) {
  :root { --header-height: 56px; }
  h1 { font-size: 1.5rem; }
}

/* Print */
@media print {
  #utk-header, #utk-breaking-bar, .sidebar, .social-share, .ad-slot, #back-to-top, #mobile-bottom-nav { display: none !important; }
  .main-with-sidebar { grid-template-columns: 1fr; }
  body { color: #000; }
}

/* ── Utility Animations ── */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .4s ease, transform .4s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Skeleton Loading ── */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-alt) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { 0%{background-position:200%} 100%{background-position:-200%} }

/* ── Notification Toast ── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--secondary);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 600;
  opacity: 0;
  transition: var(--transition);
  z-index: 9999;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Poll Widget ── */
.poll-wrap { }
.poll-question { font-weight: 700; margin-bottom: 14px; }
.poll-option {
  margin-bottom: 10px;
  cursor: pointer;
}
.poll-option-bar {
  height: 36px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: .875rem;
  font-weight: 600;
  transition: var(--transition);
}
.poll-option-bar:hover { border-color: var(--primary); }
.poll-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: rgba(192,57,43,.1);
  border-radius: var(--radius);
  transition: width .6s ease;
}
.poll-pct { margin-left: auto; color: var(--primary); font-weight: 700; }

/* ── Tooltip ── */
[data-tooltip] { position: relative; cursor: pointer; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--secondary);
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: .75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
[data-tooltip]:hover::after { opacity: 1; }
