/* ============================================
   AUTOREPT - Automotive Finance & Insurance
   High-RPM Editorial Platform Stylesheet
   ============================================ */

/* ---- CSS Variables ---- */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f3f3f3;
  --bg-inverse: #000000;
  --text-primary: #000000;
  --text-inverse: #ffffff;
  --text-muted: #666666;
  --accent: #ff0000;
  --border: #e5e5e5;
  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Oswald', 'Inter', sans-serif;
  --spacing-section: 6rem;
  --spacing-ui: 1rem;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); margin-bottom: 1rem; }

p {
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
  color: #333;
}

/* ---- Navigation ---- */
.main-nav {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-primary);
}

.nav-logo:hover {
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-cta {
  background: var(--bg-inverse);
  color: var(--text-inverse);
  padding: 12px 28px;
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-cta:hover {
  background: var(--accent);
  color: var(--text-inverse);
  transform: translateY(-1px);
}

/* ---- Hero Section ---- */
.hero {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
  color: var(--text-inverse);
  padding: 6rem 2rem;
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255,0,0,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,0,0,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero-overline {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  margin-bottom: 1.5rem;
  max-width: 900px;
  line-height: 1.05;
}

.hero-subhead {
  font-size: 1.15rem;
  line-height: 1.7;
  max-width: 560px;
  opacity: 0.8;
  margin-bottom: 2.5rem;
  font-family: var(--font-primary);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.hero-cta {
  display: inline-block;
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 16px 40px;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-cta:hover {
  background: var(--accent);
  color: var(--text-inverse);
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(255,0,0,0.3);
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  background: var(--bg-secondary);
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
}

.breadcrumb-container {
  max-width: 1200px;
  margin: 0 auto;
}

.breadcrumb a {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--text-primary);
}

.breadcrumb span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin: 0 0.5rem;
}

/* ---- Content Layout ---- */
.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
}

.content-main {
  min-width: 0;
}

.content-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

/* ---- Article Sections ---- */
.article-section {
  margin-bottom: 4rem;
  scroll-margin-top: 80px;
}

.article-section h2 {
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--bg-inverse);
  margin-bottom: 2rem;
}

.article-section h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #222;
}

.article-section ul,
.article-section ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.article-section li {
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 0.75rem;
  color: #333;
}

.article-section strong {
  color: var(--text-primary);
}

/* ---- Quick Nav ---- */
.quick-nav {
  background: var(--bg-secondary);
  padding: 1.5rem 2rem;
  border-left: 4px solid var(--bg-inverse);
  margin-bottom: 3rem;
}

.quick-nav h3 {
  font-size: 14px;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.quick-nav ul {
  list-style: none;
  margin: 0;
  columns: 2;
  column-gap: 2rem;
}

.quick-nav li {
  margin-bottom: 0.5rem;
  font-size: 14px;
}

.quick-nav a {
  color: #555;
  font-size: 14px;
}

.quick-nav a:hover {
  color: var(--accent);
}

/* ---- Sidebar ---- */
.sidebar-widget {
  background: var(--bg-secondary);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.sidebar-widget h3 {
  font-size: 13px;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--bg-inverse);
}

.sidebar-widget ul {
  list-style: none;
  margin: 0;
}

.sidebar-widget li {
  font-size: 14px;
  margin-bottom: 0.75rem;
}

.sidebar-widget a {
  font-size: 14px;
  color: #444;
}

.sidebar-widget a:hover {
  color: var(--accent);
}

.ad-placeholder {
  background: linear-gradient(135deg, #e0e0e0, #f0f0f0);
  border: 1px dashed #ccc;
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---- FAQ Accordion ---- */
.faq-section {
  margin-bottom: 4rem;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.faq-question {
  width: 100%;
  padding: 1.25rem 0;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-primary);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
  transition: color 0.2s;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding-bottom: 1.5rem;
}

.faq-answer p {
  font-size: 1rem;
  line-height: 1.7;
  color: #555;
}

/* ---- Related Articles ---- */
.related-section {
  background: var(--bg-secondary);
  padding: 4rem 2rem;
}

.related-container {
  max-width: 1200px;
  margin: 0 auto;
}

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

.related-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s ease;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.related-card-image {
  height: 180px;
  background: linear-gradient(135deg, #333, #111);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.3);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.related-card-content {
  padding: 1.5rem;
}

.related-card h3 {
  font-size: 16px;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.related-card p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.related-card a {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-primary);
}

.related-card a:hover {
  color: var(--accent);
}

/* ---- CTA Footer ---- */
.cta-footer {
  background: var(--bg-inverse);
  color: var(--text-inverse);
  padding: 5rem 2rem;
  text-align: center;
}

.cta-footer h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.cta-footer p {
  color: rgba(255,255,255,0.7);
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
}

.cta-footer .hero-cta {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.cta-footer .hero-cta:hover {
  background: var(--accent);
  color: var(--text-inverse);
}

/* ---- Main Footer ---- */
.main-footer {
  background: var(--bg-inverse);
  color: rgba(255,255,255,0.5);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 3rem 2rem 2rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-inverse);
  margin-bottom: 1rem;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1.5rem;
}

.footer-col h4 {
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-inverse);
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.75rem;
}

.footer-col a {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
}

.footer-col a:hover {
  color: var(--text-inverse);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* ---- In-Content Ad ---- */
.inline-ad {
  background: linear-gradient(135deg, #f8f8f8, #f0f0f0);
  border: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  margin: 2rem 0;
  border-radius: 0;
}

.inline-ad-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #aaa;
  margin-bottom: 0.5rem;
}

/* ---- Table Styles ---- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.data-table thead {
  background: var(--bg-inverse);
  color: var(--text-inverse);
}

.data-table th {
  padding: 1rem;
  text-align: left;
  font-family: var(--font-primary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.data-table tbody tr:nth-child(even) {
  background: var(--bg-secondary);
}

.data-table tbody tr:hover {
  background: #e8e8e8;
}

/* ---- Highlight Box ---- */
.highlight-box {
  background: var(--bg-secondary);
  border-left: 4px solid var(--accent);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
}

.highlight-box p {
  margin: 0;
  font-size: 1rem;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: #ccc;
}

::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* ---- Mobile Menu Toggle ---- */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-primary);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }
  
  .content-sidebar {
    position: static;
    order: 2;
  }
  
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .hero {
    padding: 4rem 1.5rem;
    min-height: 50vh;
  }
  
  .content-wrapper {
    padding: 2rem 1.5rem;
  }
  
  .related-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .quick-nav ul {
    columns: 1;
  }
  
  .cta-footer {
    padding: 3rem 1.5rem;
  }
}

/* ---- Animations ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* ---- Print Styles ---- */
@media print {
  .main-nav,
  .content-sidebar,
  .cta-footer,
  .inline-ad,
  .ad-placeholder {
    display: none !important;
  }
  
  .content-wrapper {
    grid-template-columns: 1fr;
  }
}
