/* Critical CSS - Inline this in production */
:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --secondary: #10b981;
  --text: #1f2937;
  --text-light: #6b7280;
  --bg: #ffffff;
  --bg-light: #f9fafb;
  --border: #e5e7eb;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Header */
.header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav a {
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s;
}

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

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .nav.active {
    display: flex;
  }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4rem 1.5rem;
  text-align: center;
}

.hero h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: white;
  color: var(--primary);
}

.btn-secondary:hover {
  background: var(--bg-light);
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Grid */
.grid {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Card */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card h3 {
  margin-top: 0;
  color: var(--primary);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
}

/* Section */
.section {
  padding: 3rem 0;
}

.section-alt {
  background: var(--bg-light);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 1rem 0;
  color: var(--text-light);
  font-size: 0.875rem;
}

.breadcrumbs a {
  color: var(--text-light);
}

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

/* Sidebar */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

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

.sidebar-card {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-card h3 {
  font-size: 1.125rem;
  margin-top: 0;
}

.sidebar-card ul {
  list-style: none;
  padding: 0;
}

.sidebar-card li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-card li:last-child {
  border-bottom: none;
}

@media (max-width: 968px) {
  .content-with-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

/* Article Content */
.article-content {
  line-height: 1.8;
}

.article-content h2 {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.article-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

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

.article-content li {
  margin-bottom: 0.5rem;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--bg);
  border: 1px solid var(--border);
}

thead {
  background: var(--bg-light);
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  color: var(--text);
}

tr:last-child td {
  border-bottom: none;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.badge-green {
  background: #d1fae5;
  color: #065f46;
}

.badge-yellow {
  background: #fef3c7;
  color: #92400e;
}

.badge-red {
  background: #fee2e2;
  color: #991b1b;
}

.badge-blue {
  background: #dbeafe;
  color: #1e40af;
}

/* Audio Player */
.audio-player {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.audio-player audio {
  width: 100%;
  margin: 1rem 0;
}

.audio-controls {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.transcript-toggle {
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-weight: 600;
}

.transcript-toggle:hover {
  background: var(--primary-dark);
}

.transcript {
  display: none;
  background: white;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  padding: 1rem;
  margin-top: 1rem;
  white-space: pre-wrap;
  font-family: "Courier New", monospace;
  font-size: 0.875rem;
  line-height: 1.6;
}

.transcript.active {
  display: block;
}

/* Job Card */
.job-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.job-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
}

.job-card h3 {
  margin: 0;
  color: var(--primary);
}

.job-card-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 0.375rem;
}

.job-card-meta-item {
  display: flex;
  flex-direction: column;
}

.job-card-meta-label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.job-card-meta-value {
  font-weight: 600;
  color: var(--text);
}

/* Gear Review */
.gear-review {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

.gear-review-header {
  display: flex;
  gap: 2rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.gear-review-image {
  width: 150px;
  height: 150px;
  background: var(--bg-light);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gear-review-title h3 {
  margin: 0;
  color: var(--primary);
}

.gear-review-rating {
  color: #fbbf24;
  font-size: 1.25rem;
  margin: 0.5rem 0;
}

.gear-pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 1.5rem 0;
}

.pros, .cons {
  padding: 1rem;
  border-radius: 0.375rem;
}

.pros {
  background: #d1fae5;
}

.cons {
  background: #fee2e2;
}

.pros h4, .cons h4 {
  margin-top: 0;
  font-size: 1rem;
}

.pros ul, .cons ul {
  margin-left: 1.25rem;
}

@media (max-width: 768px) {
  .gear-review-header {
    flex-direction: column;
  }

  .gear-pros-cons {
    grid-template-columns: 1fr;
  }
}

/* Value Prop */
.value-prop {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3rem 1.5rem;
  border-radius: 0.5rem;
  text-align: center;
  margin: 3rem 0;
}

.value-prop h2 {
  color: white;
  margin-top: 0;
}

/* Footer */
.footer {
  background: var(--text);
  color: white;
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 4rem;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer h4 {
  color: white;
  margin-top: 0;
}

.footer ul {
  list-style: none;
  padding: 0;
}

.footer li {
  margin-bottom: 0.5rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
}

.footer a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  .header, .footer, .sidebar, .breadcrumbs {
    display: none;
  }

  .container {
    max-width: 100%;
  }
}
