/*
Theme Name: NTX Tuning Blog
Theme URI: https://blog.ntx-tuning.com
Author: NTX Tuning
Author URI: https://ntx-tuning.com
Description: Premium performance blog theme for NTX Tuning — Car tuning & performance articles
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: ntx-tuning
Tags: dark, automotive, performance, blog, soro-seo
*/

/* ============================================================
   CSS VARIABLES — NTX TUNING IDENTITY
   ============================================================ */
:root {
  --ntx-black:       #0a0a0a;
  --ntx-dark:        #111111;
  --ntx-card:        #161616;
  --ntx-border:      #222222;
  --ntx-red:         #cc0000;
  --ntx-red-bright:  #ff1a1a;
  --ntx-red-glow:    rgba(204, 0, 0, 0.25);
  --ntx-silver:      #c0c0c0;
  --ntx-silver-dim:  #888888;
  --ntx-white:       #f0f0f0;
  --ntx-font-title:  'Barlow Condensed', sans-serif;
  --ntx-font-body:   'Exo 2', sans-serif;
  --ntx-radius:      4px;
  --ntx-transition:  0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--ntx-black);
  color: var(--ntx-white);
  font-family: var(--ntx-font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ntx-red-bright); text-decoration: none; transition: color var(--ntx-transition); }
a:hover { color: var(--ntx-silver); }

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

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.site-content { flex: 1; padding: 60px 0; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: #0a0a0a;
  border-bottom: 2px solid var(--ntx-red);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 40px rgba(204,0,0,0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
  height: 80px;
}

.site-logo img {
  height: 56px;
  width: auto;
  filter: drop-shadow(0 0 8px rgba(204,0,0,0.4));
  transition: filter var(--ntx-transition);
}
.site-logo:hover img {
  filter: drop-shadow(0 0 16px rgba(255,26,26,0.7));
}

/* Blog badge */
.header-blog-badge {
  font-family: var(--ntx-font-title);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ntx-red);
  border: 1px solid var(--ntx-red);
  padding: 3px 10px;
  margin-left: 14px;
  vertical-align: middle;
}

/* Navigation */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
  align-items: center;
}

.main-nav a {
  font-family: var(--ntx-font-title);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ntx-silver);
  padding: 8px 14px;
  border-bottom: 2px solid transparent;
  transition: all var(--ntx-transition);
}

.main-nav a:hover,
.main-nav .current-menu-item a {
  color: var(--ntx-white);
  border-bottom-color: var(--ntx-red);
}

.nav-cta a {
  background: var(--ntx-red);
  color: var(--ntx-white) !important;
  padding: 8px 18px;
  border: none !important;
  font-weight: 700;
}
.nav-cta a:hover { background: var(--ntx-red-bright); }

/* Hamburger (mobile) */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ntx-border);
  color: var(--ntx-white);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 20px;
}

/* ============================================================
   HERO BANNER
   ============================================================ */
.blog-hero {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0505 50%, #0a0a0a 100%);
  border-bottom: 1px solid var(--ntx-border);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 120px,
    rgba(204,0,0,0.03) 120px,
    rgba(204,0,0,0.03) 121px
  );
}

.blog-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--ntx-red), transparent);
}

.hero-content { position: relative; z-index: 1; }

.hero-eyebrow {
  font-family: var(--ntx-font-title);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ntx-red);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-eyebrow::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--ntx-red);
}

.hero-title {
  font-family: var(--ntx-font-title);
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.0;
  text-transform: uppercase;
  letter-spacing: -1px;
  color: var(--ntx-white);
  margin-bottom: 20px;
}

.hero-title span {
  color: var(--ntx-red);
  display: block;
}

.hero-desc {
  font-size: 17px;
  color: var(--ntx-silver-dim);
  max-width: 560px;
  line-height: 1.8;
}

/* ============================================================
   POST GRID — HOME / ARCHIVE
   ============================================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.posts-grid.has-featured {
  grid-template-columns: repeat(3, 1fr);
}

.posts-grid.has-featured .post-card:first-child {
  grid-column: span 2;
}

/* ============================================================
   POST CARD
   ============================================================ */
.post-card {
  background: var(--ntx-card);
  border: 1px solid var(--ntx-border);
  border-radius: var(--ntx-radius);
  overflow: hidden;
  transition: transform var(--ntx-transition), border-color var(--ntx-transition), box-shadow var(--ntx-transition);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--ntx-red);
  box-shadow: 0 12px 48px rgba(204,0,0,0.18);
}

.post-card__thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
  background: #1a1a1a;
}

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

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

.post-card__thumb::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(10,10,10,0.8), transparent);
  pointer-events: none;
}

.post-card__cat {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-family: var(--ntx-font-title);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--ntx-red);
  color: white;
  padding: 4px 10px;
}

.post-card__body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card__meta {
  font-size: 12px;
  color: var(--ntx-silver-dim);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--ntx-font-title);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.post-card__meta span::before {
  content: '//';
  margin-right: 6px;
  color: var(--ntx-red);
  font-size: 10px;
}

.post-card__title {
  font-family: var(--ntx-font-title);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ntx-white);
  margin-bottom: 12px;
  flex: 1;
}

.post-card__title a {
  color: inherit;
  transition: color var(--ntx-transition);
}

.post-card__title a:hover { color: var(--ntx-red-bright); }

.post-card__excerpt {
  font-size: 14px;
  color: var(--ntx-silver-dim);
  line-height: 1.7;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--ntx-border);
  padding-top: 16px;
  margin-top: auto;
}

.read-more {
  font-family: var(--ntx-font-title);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ntx-red);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: gap var(--ntx-transition), color var(--ntx-transition);
}

.read-more:hover {
  color: var(--ntx-red-bright);
  gap: 14px;
}

.read-more::after {
  content: '→';
  font-size: 14px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

.sidebar { position: sticky; top: 100px; }

.widget {
  background: var(--ntx-card);
  border: 1px solid var(--ntx-border);
  border-top: 2px solid var(--ntx-red);
  padding: 28px;
  margin-bottom: 28px;
  border-radius: var(--ntx-radius);
}

.widget-title {
  font-family: var(--ntx-font-title);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ntx-silver);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ntx-border);
}

/* Category widget */
.widget-categories ul { list-style: none; }
.widget-categories li {
  padding: 8px 0;
  border-bottom: 1px solid var(--ntx-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.widget-categories li:last-child { border-bottom: none; }
.widget-categories a {
  font-size: 14px;
  color: var(--ntx-silver-dim);
  transition: color var(--ntx-transition);
}
.widget-categories a:hover { color: var(--ntx-red-bright); }
.cat-count {
  font-size: 11px;
  background: var(--ntx-border);
  color: var(--ntx-silver-dim);
  padding: 2px 7px;
  border-radius: 2px;
}

/* Back to main site widget */
.widget-cta {
  background: linear-gradient(135deg, #1a0505, #0d0d0d);
  border: 1px solid var(--ntx-red);
  text-align: center;
}

.widget-cta .cta-logo img { height: 48px; margin: 0 auto 16px; }

.widget-cta p {
  font-size: 13px;
  color: var(--ntx-silver-dim);
  margin-bottom: 20px;
  line-height: 1.6;
}

.btn-red {
  display: inline-block;
  background: var(--ntx-red);
  color: white !important;
  font-family: var(--ntx-font-title);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 12px 24px;
  transition: background var(--ntx-transition), box-shadow var(--ntx-transition);
}
.btn-red:hover {
  background: var(--ntx-red-bright);
  box-shadow: 0 0 20px var(--ntx-red-glow);
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.post-header {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--ntx-border);
  margin-bottom: 48px;
}

.post-breadcrumb {
  font-family: var(--ntx-font-title);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ntx-silver-dim);
  margin-bottom: 20px;
}

.post-breadcrumb a { color: var(--ntx-red); }
.post-breadcrumb span { margin: 0 8px; }

.post-title {
  font-family: var(--ntx-font-title);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 24px;
  color: var(--ntx-white);
}

.post-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  font-family: var(--ntx-font-title);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ntx-silver-dim);
}

.post-meta-bar .cat-badge {
  background: var(--ntx-red);
  color: white;
  padding: 4px 12px;
  font-weight: 700;
}

/* Featured image */
.post-featured-img {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  border-radius: var(--ntx-radius);
  margin-bottom: 48px;
  border: 1px solid var(--ntx-border);
}

/* Post content typography */
.post-content {
  font-size: 17px;
  line-height: 1.85;
  color: #d0d0d0;
}

.post-content h2 {
  font-family: var(--ntx-font-title);
  font-size: 30px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--ntx-white);
  margin: 48px 0 20px;
  padding-left: 18px;
  border-left: 4px solid var(--ntx-red);
}

.post-content h3 {
  font-family: var(--ntx-font-title);
  font-size: 22px;
  font-weight: 700;
  color: var(--ntx-silver);
  margin: 36px 0 14px;
}

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

.post-content ul, .post-content ol {
  margin: 0 0 22px 24px;
}

.post-content li { margin-bottom: 8px; }

.post-content strong { color: var(--ntx-white); font-weight: 700; }

.post-content a {
  color: var(--ntx-red-bright);
  border-bottom: 1px solid rgba(255,26,26,0.3);
  transition: border-color var(--ntx-transition);
}
.post-content a:hover { border-bottom-color: var(--ntx-red-bright); }

.post-content blockquote {
  margin: 32px 0;
  padding: 24px 32px;
  background: var(--ntx-card);
  border-left: 4px solid var(--ntx-red);
  font-style: italic;
  color: var(--ntx-silver);
  font-size: 18px;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 28px;
  font-size: 15px;
}
.post-content th {
  background: var(--ntx-red);
  color: white;
  font-family: var(--ntx-font-title);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 16px;
  text-align: left;
}
.post-content td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--ntx-border);
  color: var(--ntx-silver-dim);
}
.post-content tr:hover td { background: var(--ntx-card); }

.post-content img {
  border-radius: var(--ntx-radius);
  margin: 28px 0;
  border: 1px solid var(--ntx-border);
}

/* ============================================================
   RELATED POSTS
   ============================================================ */
.related-posts {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--ntx-border);
}

.section-title {
  font-family: var(--ntx-font-title);
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--ntx-white);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--ntx-red), transparent);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  margin-top: 60px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pagination a,
.pagination span {
  font-family: var(--ntx-font-title);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 18px;
  background: var(--ntx-card);
  border: 1px solid var(--ntx-border);
  color: var(--ntx-silver-dim);
  transition: all var(--ntx-transition);
  letter-spacing: 1px;
}

.pagination a:hover,
.pagination .current {
  background: var(--ntx-red);
  border-color: var(--ntx-red);
  color: white;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #070707;
  border-top: 2px solid var(--ntx-red);
  margin-top: auto;
}

.footer-top {
  padding: 56px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}

.footer-brand .footer-logo img {
  height: 52px;
  margin-bottom: 18px;
  filter: drop-shadow(0 0 6px rgba(204,0,0,0.3));
}

.footer-brand p {
  font-size: 14px;
  color: var(--ntx-silver-dim);
  line-height: 1.8;
  max-width: 300px;
}

.footer-heading {
  font-family: var(--ntx-font-title);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ntx-red);
  margin-bottom: 20px;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  font-size: 14px;
  color: var(--ntx-silver-dim);
  transition: color var(--ntx-transition), padding-left var(--ntx-transition);
  display: inline-block;
}
.footer-links a:hover {
  color: var(--ntx-white);
  padding-left: 8px;
}

.footer-bottom {
  border-top: 1px solid var(--ntx-border);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-bottom p {
  font-size: 12px;
  color: var(--ntx-silver-dim);
  font-family: var(--ntx-font-title);
  letter-spacing: 1px;
}

.footer-bottom a { color: var(--ntx-red); }

/* ============================================================
   RED ACCENT LINE (top of page scroll indicator)
   ============================================================ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--ntx-red);
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px var(--ntx-red);
}

/* ============================================================
   NO FEATURED IMAGE PLACEHOLDER
   ============================================================ */
.thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #111 0%, #1a0505 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.3;
}

/* ============================================================
   SEARCH FORM
   ============================================================ */
.search-form {
  display: flex;
  gap: 0;
}

.search-form input {
  flex: 1;
  background: var(--ntx-black);
  border: 1px solid var(--ntx-border);
  border-right: none;
  color: var(--ntx-white);
  padding: 11px 16px;
  font-family: var(--ntx-font-body);
  font-size: 14px;
  outline: none;
  transition: border-color var(--ntx-transition);
}

.search-form input:focus { border-color: var(--ntx-red); }
.search-form input::placeholder { color: var(--ntx-silver-dim); }

.search-form button {
  background: var(--ntx-red);
  border: none;
  color: white;
  padding: 11px 18px;
  cursor: pointer;
  font-size: 16px;
  transition: background var(--ntx-transition);
}

.search-form button:hover { background: var(--ntx-red-bright); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .content-sidebar-wrap {
    grid-template-columns: 1fr;
  }
  .sidebar { position: static; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid.has-featured .post-card:first-child { grid-column: span 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .posts-grid,
  .posts-grid.has-featured { grid-template-columns: 1fr; }
  .posts-grid.has-featured .post-card:first-child { grid-column: span 1; }
  .main-nav { display: none; }
  .main-nav.open { display: block; position: absolute; top: 80px; left: 0; right: 0; background: var(--ntx-dark); border-bottom: 2px solid var(--ntx-red); padding: 20px; }
  .main-nav.open ul { flex-direction: column; }
  .menu-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}
