/*
Theme Name: DCD Engine Lab
Author: AI Designer
Description: A high-tech, engineering-focused theme for automotive diagnostics and technical analysis.
Version: 4.1
*/

:root {
  /* Colors - Technical/Engineering */
  --c-dark: #1F2937; /* Dark Slate */
  --c-darker: #111827; /* Near Black */
  --c-primary: #3B82F6; /* Tech Blue */
  --c-accent: #F59E0B; /* Warning/Diagnostic Orange */
  --c-bg: #F3F4F6; /* Cool Grey Light */
  --c-surface: #FFFFFF;
  --c-text-main: #1F2937;
  --c-text-muted: #6B7280;
  --c-border: #E5E7EB;
  
  /* Typography */
  --f-mono: 'JetBrains Mono', monospace; /* Code/Tech vibe */
  --f-sans: 'Inter', sans-serif; /* Clean UI */
  
  /* Spacing & Layout */
  --s-container: 1400px;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-hover: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

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

body {
  background-color: var(--c-bg);
  color: var(--c-text-main);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-sans);
  font-weight: 700;
  color: var(--c-darker);
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
}

/* Technical Mono Headers */
.tech-header {
  font-family: var(--f-mono);
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--c-primary);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  display: block;
}

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

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

ul { list-style: none; }

.container {
  max-width: var(--s-container);
  margin: 0 auto;
  padding: 0 24px;
}

/* BUTTONS - Technical Style */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background-color: var(--c-primary);
  color: #fff;
  font-family: var(--f-sans);
  font-weight: 600;
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn:hover {
  background-color: #2563EB;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--c-border);
  color: var(--c-text-main);
}
.btn-outline:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}

/* HEADER - Lab Dashboard Style */
.site-header {
  background-color: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  height: 80px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--c-darker);
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: var(--c-primary);
  color: #fff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--c-text-muted);
}
.nav-links a:hover { color: var(--c-primary); }

/* HERO - Blueprint Grid */
.hero-section {
  background-color: var(--c-surface);
  background-image: radial-gradient(var(--c-border) 1px, transparent 1px);
  background-size: 20px 20px;
  padding: 80px 0;
  border-bottom: 1px solid var(--c-border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--c-darker);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--c-text-muted);
  margin-bottom: 40px;
  max-width: 500px;
}

/* TOPIC CARDS (New) */
.topic-card:hover {
    border-color: var(--c-primary) !important;
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

/* DIAGNOSTIC CARDS (Grid) */
.diag-section {
  padding: 80px 0;
}

.section-head {
  margin-bottom: 40px;
}

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

.diag-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.diag-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--c-primary);
}

.diag-img {
  height: 200px;
  background: var(--c-bg);
  position: relative;
  overflow: hidden;
}

.diag-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.diag-body {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.diag-meta {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--c-text-muted);
  margin-bottom: 12px;
  font-family: var(--f-mono);
}

.diag-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
}

.diag-excerpt {
  color: var(--c-text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.diag-footer {
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--c-primary);
  font-weight: 600;
  text-transform: uppercase;
  font-family: var(--f-mono);
}

/* CONTENT STYLES */
.entry-content {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 40px;
}
.entry-content h2 { 
  font-family: var(--f-mono); 
  color: var(--c-primary); 
  border-bottom: 2px solid var(--c-bg); 
  padding-bottom: 10px;
  margin-top: 2.5rem;
}
.entry-content p { margin-bottom: 1.5rem; color: #374151; }
.entry-content ul { 
  list-style: none; 
  padding-left: 0; 
  margin-bottom: 2rem;
  display: grid;
  gap: 10px;
}
.entry-content li {
  padding-left: 24px;
  position: relative;
}
.entry-content li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--c-accent);
  font-family: var(--f-mono);
  font-weight: 700;
}

/* FOOTER */
.site-footer {
  background: var(--c-darker);
  color: #9CA3AF;
  padding: 60px 0 24px;
  font-size: 0.9rem;
}

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

.footer-brand {
  color: #fff;
  font-family: var(--f-mono);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: block;
}

.footer-col h4 {
  color: #fff;
  font-family: var(--f-mono);
  font-size: 1rem;
  margin-bottom: 20px;
}

.footer-links li { margin-bottom: 12px; }
.footer-links a:hover { color: var(--c-primary); }

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 0.8rem;
}

/* PAGINATION */
.pagination {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.page-numbers {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-family: var(--f-mono);
  font-weight: 700;
}
.page-numbers.current {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-stats { justify-content: center; }
  .diag-grid { grid-template-columns: repeat(2, 1fr); }
  
  section[style*="display: flex;"] {
      flex-direction: column;
      text-align: center;
  }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-title { font-size: 2.5rem; }
  
  #topics .container > div {
      grid-template-columns: 1fr 1fr !important;
  }
  
  .diag-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}
