/*
Theme Name: Tahseen News
Theme URI: https://tahseennews.com
Author: Tahseen
Author URI: https://tahseennews.com
Description: A modern MSN-style news magazine WordPress theme. Made by Tahseen with Love & Allah ❤️
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.6
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: tahseen-news
Tags: news, magazine, blog, grid, responsive, dark-mode, custom-colors, custom-logo, custom-menu, featured-images, two-columns, three-columns, widgets
*/

/* =============================================
   CSS CUSTOM PROPERTIES (EASY CUSTOMIZATION)
   ============================================= */
:root {
  /* Brand Colors - Change here to restyle everything */
  --color-primary: #0067b8;
  --color-primary-dark: #004e8c;
  --color-primary-light: #e8f2fc;
  --color-accent: #d83b01;
  --color-accent2: #107c10;

  /* Dark Mode Colors */
  --color-bg: #f5f5f5;
  --color-bg-card: #ffffff;
  --color-bg-nav: #0067b8;
  --color-bg-footer: #1a1a2e;
  --color-text: #1a1a1a;
  --color-text-muted: #555;
  --color-text-light: #888;
  --color-border: #e0e0e0;
  --color-breaking: #d83b01;
  --color-shadow: rgba(0,0,0,0.08);
  --color-overlay: rgba(0,0,0,0.45);

  /* Typography */
  --font-heading: 'Noto Serif', 'Georgia', serif;
  --font-body: 'Noto Sans', 'Segoe UI', sans-serif;
  --font-ui: 'Segoe UI', 'Noto Sans', sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Container */
  --container-max: 1320px;
  --sidebar-width: 320px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --color-bg: #121212;
  --color-bg-card: #1e1e1e;
  --color-bg-nav: #0a0a0a;
  --color-text: #e8e8e8;
  --color-text-muted: #aaa;
  --color-text-light: #777;
  --color-border: #333;
  --color-shadow: rgba(0,0,0,0.3);
  --color-primary-light: #1a2a3a;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-primary); }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* =============================================
   LAYOUT CONTAINERS
   ============================================= */
.tn-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.tn-site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.tn-main-content-area {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
}

@media (max-width: 1024px) {
  .tn-main-content-area { grid-template-columns: 1fr; }
}

/* =============================================
   TOP BAR
   ============================================= */
.tn-topbar {
  background: #1a1a2e;
  color: #ccc;
  font-size: 12px;
  font-family: var(--font-ui);
  padding: 6px 0;
  border-bottom: 1px solid #333;
}

.tn-topbar .tn-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

.tn-topbar-date { color: #aaa; letter-spacing: 0.03em; }

.tn-topbar-links { display: flex; gap: var(--space-md); align-items: center; }

.tn-topbar-links a {
  color: #ccc;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.tn-topbar-links a:hover { color: #fff; }

.tn-topbar-social { display: flex; gap: 10px; }
.tn-topbar-social a { color: #999; font-size: 13px; transition: color 0.2s; }
.tn-topbar-social a:hover { color: var(--color-primary); }

/* =============================================
   HEADER
   ============================================= */
.tn-header {
  background: var(--color-bg-card);
  border-bottom: 3px solid var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px var(--color-shadow);
  transition: background 0.3s;
}

.tn-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: var(--space-md);
}

/* Logo */
.tn-logo a {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tn-logo-text {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.5px;
  line-height: 1;
}

.tn-logo-tagline {
  font-size: 11px;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  margin-top: 3px;
}

.tn-logo img {
  max-height: 50px;
  width: auto;
}

/* Search */
.tn-header-search { display: flex; align-items: center; gap: 8px; }

.tn-search-form {
  display: flex;
  align-items: center;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: 6px 14px;
  gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tn-search-form:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0,103,184,0.12);
}

.tn-search-form input {
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text);
  width: 200px;
  outline: none;
}

.tn-search-form input::placeholder { color: var(--color-text-light); }

.tn-search-btn {
  color: var(--color-text-muted);
  font-size: 15px;
  transition: color 0.2s;
}
.tn-search-btn:hover { color: var(--color-primary); }

/* Dark Mode Toggle */
.tn-darkmode-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
  color: var(--color-text);
}
.tn-darkmode-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* Hamburger */
.tn-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
}
.tn-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* =============================================
   NAVIGATION
   ============================================= */
.tn-nav {
  background: var(--color-bg-nav);
  position: relative;
}

.tn-nav-inner { display: flex; align-items: center; }

.tn-nav-menu {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.tn-nav-menu::-webkit-scrollbar { display: none; }

.tn-nav-menu > li { position: relative; }

.tn-nav-menu > li > a {
  display: block;
  padding: 13px 16px;
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-ui);
  white-space: nowrap;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
}

.tn-nav-menu > li > a:hover,
.tn-nav-menu > li.current-menu-item > a {
  color: #fff;
  background: rgba(255,255,255,0.1);
  border-bottom-color: #fff;
}

/* Dropdown */
.tn-nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
  min-width: 200px;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  box-shadow: 0 8px 24px var(--color-shadow);
}

.tn-nav-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tn-nav-menu .sub-menu li a {
  display: block;
  padding: 10px 16px;
  color: var(--color-text);
  font-size: 13px;
  font-family: var(--font-ui);
  border-left: 3px solid transparent;
  transition: all 0.2s;
}
.tn-nav-menu .sub-menu li a:hover {
  background: var(--color-primary-light);
  border-left-color: var(--color-primary);
  color: var(--color-primary);
}

/* =============================================
   BREAKING NEWS TICKER
   ============================================= */
.tn-breaking-news {
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 38px;
}

.tn-breaking-label {
  background: var(--color-breaking);
  color: #fff;
  padding: 0 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-family: var(--font-ui);
}

.tn-breaking-label::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-top: 19px solid transparent;
  border-bottom: 19px solid transparent;
  border-left: 10px solid var(--color-breaking);
  position: absolute;
  left: 0;
  margin-left: 80px;
}

.tn-breaking-wrapper {
  flex: 1;
  overflow: hidden;
  padding: 0 var(--space-md);
}

.tn-breaking-track {
  display: flex;
  animation: tn-ticker 40s linear infinite;
  white-space: nowrap;
}

.tn-breaking-track:hover { animation-play-state: paused; }

@keyframes tn-ticker {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}

.tn-breaking-item {
  font-size: 13px;
  color: var(--color-text);
  padding: 0 28px;
  font-family: var(--font-ui);
}

.tn-breaking-item a { color: inherit; }
.tn-breaking-item a:hover { color: var(--color-primary); }
.tn-breaking-item::before { content: '•'; margin-right: 8px; color: var(--color-breaking); }

/* =============================================
   HERO SECTION (MSN Style Grid)
   ============================================= */
.tn-hero {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

/* Big featured post */
.tn-hero-main {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 420px;
}

.tn-hero-main .tn-post-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tn-hero-main:hover .tn-post-img { transform: scale(1.03); }

.tn-hero-main .tn-post-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-lg);
}

.tn-hero-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.tn-hero-side-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex: 1;
  min-height: 190px;
}

.tn-hero-side-item .tn-post-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.tn-hero-side-item:hover .tn-post-img { transform: scale(1.04); }

.tn-hero-side-item .tn-post-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-md);
}

@media (max-width: 768px) {
  .tn-hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .tn-hero-main { grid-column: 1; grid-row: auto; min-height: 260px; }
  .tn-hero-side { flex-direction: row; }
  .tn-hero-side-item { min-height: 160px; }
}

/* =============================================
   POST CARD COMPONENTS
   ============================================= */
.tn-cat-badge {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  margin-bottom: 6px;
}

.tn-cat-badge.cat-sports { background: #107c10; }
.tn-cat-badge.cat-tech { background: #5c2d91; }
.tn-cat-badge.cat-entertainment { background: #d83b01; }
.tn-cat-badge.cat-business { background: #004e8c; }
.tn-cat-badge.cat-health { background: #e74c3c; }
.tn-cat-badge.cat-world { background: #2c3e50; }

/* Overlay post styles */
.tn-post-overlay-title {
  font-family: var(--font-heading);
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.tn-hero-main .tn-post-overlay-title { font-size: 24px; margin-bottom: 8px; }
.tn-hero-side-item .tn-post-overlay-title { font-size: 15px; }

.tn-post-overlay-meta {
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  font-family: var(--font-ui);
  margin-top: 4px;
}

/* Card post (for grids) */
.tn-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 8px var(--color-shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}

.tn-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}

.tn-card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.tn-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}
.tn-card:hover .tn-card-img-wrap img { transform: scale(1.05); }

.tn-card-body { padding: var(--space-md); flex: 1; display: flex; flex-direction: column; }

.tn-card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}
.tn-card:hover .tn-card-title { color: var(--color-primary); }

.tn-card-excerpt {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.tn-card-meta {
  margin-top: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tn-card-meta-item {
  font-size: 12px;
  color: var(--color-text-light);
  font-family: var(--font-ui);
  display: flex;
  align-items: center;
  gap: 4px;
}

.tn-card-meta-item .dashicon { font-size: 11px; }

/* Horizontal card */
.tn-card-horizontal {
  flex-direction: row;
  align-items: stretch;
}

.tn-card-horizontal .tn-card-img-wrap {
  width: 120px;
  flex-shrink: 0;
  aspect-ratio: unset;
  border-radius: 0;
}

.tn-card-horizontal .tn-card-body { padding: 12px; }
.tn-card-horizontal .tn-card-title { font-size: 14px; -webkit-line-clamp: 3; }

/* =============================================
   SECTION HEADINGS
   ============================================= */
.tn-section-heading {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-border);
}

.tn-section-heading-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  position: relative;
  padding-left: 14px;
}

.tn-section-heading-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--color-primary);
  border-radius: 2px;
}

.tn-section-heading-link {
  margin-left: auto;
  font-size: 12px;
  color: var(--color-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-ui);
  transition: opacity 0.2s;
}
.tn-section-heading-link:hover { opacity: 0.75; }

/* =============================================
   NEWS GRIDS
   ============================================= */
.tn-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.tn-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.tn-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

@media (max-width: 1024px) {
  .tn-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .tn-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .tn-grid-4, .tn-grid-3, .tn-grid-2 { grid-template-columns: 1fr; }
}

/* =============================================
   SECTION WITH ACCENT BG
   ============================================= */
.tn-section { margin-bottom: var(--space-xl); }

.tn-section-accented {
  background: var(--color-primary-light);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
}

/* =============================================
   VIDEO / MEDIA SECTION
   ============================================= */
.tn-video-card { position: relative; }

.tn-video-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-ui);
  z-index: 2;
}

.tn-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
  transition: transform 0.2s;
}
.tn-video-card:hover .tn-play-btn { transform: scale(1.1); }

/* =============================================
   WEATHER WIDGET
   ============================================= */
.tn-weather {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.tn-weather-city { font-size: 14px; opacity: 0.85; font-family: var(--font-ui); }
.tn-weather-temp { font-size: 48px; font-weight: 700; line-height: 1; margin: 8px 0; }
.tn-weather-desc { font-size: 14px; opacity: 0.9; }
.tn-weather-details { display: flex; gap: var(--space-md); margin-top: var(--space-sm); font-size: 13px; opacity: 0.8; }

/* =============================================
   SIDEBAR
   ============================================= */
.tn-sidebar { min-width: 0; }

.tn-sidebar-widget {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  box-shadow: 0 2px 8px var(--color-shadow);
}

.tn-widget-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-md);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-primary);
  position: relative;
}

/* Trending list */
.tn-trending-list { display: flex; flex-direction: column; gap: 12px; }

.tn-trending-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.tn-trending-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-border);
  font-family: var(--font-heading);
  line-height: 1;
  min-width: 28px;
  flex-shrink: 0;
}

.tn-trending-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
  transition: color 0.2s;
}
.tn-trending-item:hover .tn-trending-title { color: var(--color-primary); }
.tn-trending-meta { font-size: 12px; color: var(--color-text-light); font-family: var(--font-ui); }

/* Tags cloud */
.tn-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tn-tag {
  display: inline-block;
  padding: 5px 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  font-size: 12px;
  color: var(--color-text-muted);
  font-family: var(--font-ui);
  transition: all 0.2s;
}
.tn-tag:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* Newsletter */
.tn-newsletter { text-align: center; }
.tn-newsletter p { font-size: 13px; color: var(--color-text-muted); margin-bottom: var(--space-md); }

.tn-newsletter-form { display: flex; flex-direction: column; gap: 8px; }

.tn-newsletter-form input {
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--color-bg);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s;
}
.tn-newsletter-form input:focus { border-color: var(--color-primary); }

.tn-btn-primary {
  padding: 10px 20px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  font-family: var(--font-ui);
  transition: background 0.2s;
  width: 100%;
}
.tn-btn-primary:hover { background: var(--color-primary-dark); }

/* =============================================
   AD SLOTS (Easy to customize/hide)
   ============================================= */
.tn-ad-slot {
  background: var(--color-bg);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 12px;
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}

.tn-ad-slot-728 { height: 90px; }
.tn-ad-slot-300 { height: 250px; }

/* =============================================
   PAGINATION
   ============================================= */
.tn-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: var(--space-xl) 0;
}

.tn-page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-ui);
  color: var(--color-text);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  transition: all 0.2s;
}

.tn-page-link:hover,
.tn-page-link.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* =============================================
   FOOTER
   ============================================= */
.tn-footer {
  background: var(--color-bg-footer);
  color: #ccc;
  padding: var(--space-xl) 0 0;
  margin-top: auto;
}

.tn-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

@media (max-width: 900px) { .tn-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .tn-footer-grid { grid-template-columns: 1fr; } }

.tn-footer-logo { font-family: var(--font-heading); font-size: 24px; font-weight: 700; color: #fff; margin-bottom: var(--space-sm); }
.tn-footer-desc { font-size: 13px; color: #888; line-height: 1.7; }

.tn-footer-heading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: var(--space-md);
  font-family: var(--font-ui);
}

.tn-footer-links li { margin-bottom: 8px; }
.tn-footer-links a { color: #888; font-size: 13px; transition: color 0.2s; }
.tn-footer-links a:hover { color: var(--color-primary); }

.tn-footer-social { display: flex; gap: 10px; margin-top: var(--space-md); }
.tn-footer-social a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #333;
  color: #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all 0.2s;
}
.tn-footer-social a:hover { background: var(--color-primary); color: #fff; }

.tn-footer-bottom {
  border-top: 1px solid #333;
  padding: var(--space-md) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tn-footer-copyright { font-size: 12px; color: #666; font-family: var(--font-ui); }
.tn-footer-copyright a { color: var(--color-primary); }
.tn-footer-bottom-links { display: flex; gap: var(--space-md); }
.tn-footer-bottom-links a { font-size: 12px; color: #666; transition: color 0.2s; }
.tn-footer-bottom-links a:hover { color: #ccc; }

/* =============================================
   SINGLE POST
   ============================================= */
.tn-single-header { margin-bottom: var(--space-lg); }

.tn-single-title {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: var(--space-md);
}

.tn-single-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-lg);
}

.tn-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-border);
}

.tn-author-name { font-weight: 700; font-size: 14px; color: var(--color-text); }
.tn-author-date { font-size: 12px; color: var(--color-text-light); }

.tn-share-btns { display: flex; gap: 8px; margin-left: auto; }

.tn-share-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  font-family: var(--font-ui);
  transition: opacity 0.2s;
}
.tn-share-btn:hover { opacity: 0.85; color: #fff; }
.tn-share-fb { background: #1877f2; }
.tn-share-tw { background: #1da1f2; }
.tn-share-wa { background: #25d366; }

.tn-single-content {
  font-size: 17px;
  line-height: 1.8;
  color: var(--color-text);
}

.tn-single-content h2 { font-family: var(--font-heading); font-size: 24px; margin: var(--space-lg) 0 var(--space-sm); }
.tn-single-content h3 { font-family: var(--font-heading); font-size: 20px; margin: var(--space-md) 0 var(--space-sm); }
.tn-single-content p { margin-bottom: var(--space-md); }
.tn-single-content img { border-radius: var(--radius-md); margin: var(--space-md) 0; }
.tn-single-content blockquote {
  border-left: 4px solid var(--color-primary);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-text-muted);
  margin: var(--space-md) 0;
}

/* =============================================
   MOBILE MENU
   ============================================= */
.tn-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
}

.tn-mobile-menu.active { display: block; }

.tn-mobile-menu-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: var(--color-bg-card);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s;
  padding-bottom: 40px;
}

.tn-mobile-menu.active .tn-mobile-menu-inner { transform: translateX(0); }

.tn-mobile-menu-header {
  background: var(--color-primary);
  padding: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tn-mobile-menu-header span { color: #fff; font-weight: 700; font-size: 16px; font-family: var(--font-heading); }

.tn-mobile-menu-close { color: rgba(255,255,255,0.7); font-size: 22px; line-height: 1; }

.tn-mobile-nav a {
  display: block;
  padding: 13px var(--space-md);
  color: var(--color-text);
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-ui);
  transition: all 0.2s;
}
.tn-mobile-nav a:hover { background: var(--color-primary-light); color: var(--color-primary); padding-left: 24px; }

/* =============================================
   SCROLL TO TOP
   ============================================= */
.tn-scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 16px rgba(0,103,184,0.35);
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  z-index: 500;
  border: none;
}
.tn-scroll-top.visible { opacity: 1; transform: translateY(0); }
.tn-scroll-top:hover { background: var(--color-primary-dark); }

/* =============================================
   UTILITIES
   ============================================= */
.tn-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.tn-text-primary { color: var(--color-primary); }
.tn-mt-lg { margin-top: var(--space-lg); }
.tn-mb-lg { margin-bottom: var(--space-lg); }

/* =============================================
   RESPONSIVE MOBILE HAMBURGER
   ============================================= */
@media (max-width: 768px) {
  .tn-hamburger { display: flex; }
  .tn-nav-menu { display: none; }
  .tn-search-form input { width: 130px; }
  .tn-single-title { font-size: 24px; }
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes tn-fadein {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.tn-animate { animation: tn-fadein 0.4s ease forwards; }

/* Skeleton loader */
.tn-skeleton {
  background: linear-gradient(90deg, var(--color-border) 25%, var(--color-bg) 50%, var(--color-border) 75%);
  background-size: 200% 100%;
  animation: tn-skeleton 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes tn-skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
