/* Tesla DIY Repair - Main Stylesheet */

:root {
  --primary-color: #e31937;
  --secondary-color: #171a20;
  --accent-color: #3e6ae1;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #ffffff;
  --bg-light: #f5f5f5;
  --border-color: #e0e0e0;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --max-width: 1200px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.7;
  color: var(--text-color);
  background: var(--bg-color);
}

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

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

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

/* Header & Navigation */
.site-header {
  background: var(--secondary-color);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  font-weight: 700;
  font-size: 1.4rem;
}

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

.logo-icon {
  font-size: 1.8rem;
}

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

.nav-links a {
  color: #ccc;
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  color: white;
  border-bottom-color: var(--primary-color);
}

/* Main Content */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem;
  min-height: 60vh;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #2d3748 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  margin: -2rem -2rem 3rem -2rem;
  border-radius: 0 0 20px 20px;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

.hero p {
  font-size: 1.3rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero-cta:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(227, 25, 55, 0.4);
}

/* Featured Section */
.featured-section {
  margin-bottom: 3rem;
}

.featured-card {
  display: block;
  background: linear-gradient(135deg, #1a365d 0%, #2d3748 100%);
  border-radius: 16px;
  padding: 2rem;
  text-decoration: none;
  color: white;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  color: white;
}

.featured-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--primary-color);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.featured-icon {
  font-size: 4rem;
  flex-shrink: 0;
}

.featured-text h2 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  color: white;
}

.featured-text p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.featured-cta {
  color: #ffd700;
  font-weight: 600;
}

.featured-card:hover .featured-cta {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .featured-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .featured-icon {
    font-size: 3rem;
  }

  .featured-text h2 {
    font-size: 1.3rem;
  }

  .featured-badge {
    position: static;
    display: inline-block;
    margin-bottom: 1rem;
  }
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.1rem;
}

/* Post Cards Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.post-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid var(--border-color);
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.post-card-image {
  height: 200px;
  background: linear-gradient(135deg, var(--secondary-color) 0%, #4a5568 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

/* Category Visual Headers */
.post-card-visual {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.cat-icon {
  font-size: 2.5rem;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.cat-electrical { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); }
.cat-software { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.cat-maintenance { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.cat-interior { background: linear-gradient(135deg, #eb5757 0%, #f2994a 100%); }
.cat-suspension { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.cat-hvac { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.cat-exterior { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.cat-charging { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }
.cat-other { background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%); }

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

.post-card-category {
  display: inline-block;
  background: var(--bg-light);
  color: var(--text-light);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.post-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--secondary-color);
  line-height: 1.3;
}

.post-card h3 a {
  color: inherit;
}

.post-card h3 a:hover {
  color: var(--primary-color);
}

.post-card p {
  color: var(--text-light);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.post-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-light);
}

.read-more {
  font-weight: 600;
  color: var(--accent-color);
}

/* Single Post Styles */
.post-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.post-header h1 {
  font-size: 2.5rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.post-meta {
  display: flex;
  gap: 2rem;
  color: var(--text-light);
  flex-wrap: wrap;
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-content {
  max-width: 800px;
}

.post-content h2 {
  font-size: 1.8rem;
  color: var(--secondary-color);
  margin: 2.5rem 0 1rem;
  padding-top: 1rem;
}

.post-content h3 {
  font-size: 1.4rem;
  color: var(--secondary-color);
  margin: 2rem 0 1rem;
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content ul, .post-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.post-content li {
  margin-bottom: 0.75rem;
}

.post-content blockquote {
  background: var(--bg-light);
  border-left: 4px solid var(--primary-color);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
}

.post-content code {
  background: var(--bg-light);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Share Buttons */
.share-buttons {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.share-buttons span {
  color: var(--text-light);
  font-size: 0.9rem;
}

.share-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-light);
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.share-buttons a:hover {
  background: var(--primary-color);
  color: white;
}

/* Post Layout with TOC Sidebar */
.post-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1100px) {
  .post-layout {
    grid-template-columns: 220px 1fr;
  }
}

/* Table of Contents Sidebar */
.toc-sidebar {
  display: none;
}

@media (min-width: 1100px) {
  .toc-sidebar {
    display: block;
  }
  
  .toc {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 0.85rem;
  }
  
  .toc h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: var(--secondary-color);
  }
  
  .toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .toc li {
    margin-bottom: 0.5rem;
  }
  
  .toc a {
    color: var(--text-light);
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
    transition: all 0.2s;
  }
  
  .toc a:hover,
  .toc a.active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
  }

  /* Sidebar Promo Widget */
  .sidebar-promo {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 10px;
    color: #fff;
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
  }

  .sidebar-promo::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(62, 106, 225, 0.15) 0%, transparent 70%);
    pointer-events: none;
  }

  .promo-badge {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
  }

  .sidebar-promo h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.3;
  }

  .sidebar-promo p {
    margin: 0 0 0.75rem 0;
    color: #b0b8c8;
    line-height: 1.4;
    font-size: 0.8rem;
  }

  .promo-highlights {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
  }

  .promo-highlights li {
    padding: 0.2rem 0;
    font-size: 0.8rem;
    color: #d0d7e3;
  }

  .promo-cta {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), #c41230);
    color: #fff;
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: transform 0.2s, box-shadow 0.2s;
  }

  .promo-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(227, 25, 55, 0.4);
  }
}

/* Author Box */
.author-box {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2.5rem 0;
}

.author-box .author-img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.author-box .author-info h4 {
  margin: 0 0 0.5rem 0;
  color: var(--secondary-color);
  font-size: 1rem;
}

.author-box .author-info p {
  margin: 0 0 0.75rem 0;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.5;
}

.author-box .author-link {
  font-size: 0.9rem;
  font-weight: 500;
}

@media (max-width: 600px) {
  .author-box {
    flex-direction: column;
    text-align: center;
  }
  
  .author-box .author-img {
    width: 100%;
    height: 120px;
    margin: 0 auto;
  }
}

/* Affiliate Box - Enhanced for visibility */
.affiliate-box {
  background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
  border: 2px solid #f0ad4e;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 4px 15px rgba(240, 173, 78, 0.2);
  position: relative;
}

.affiliate-box::before {
  content: '🛒';
  position: absolute;
  top: -12px;
  right: 20px;
  background: white;
  padding: 0 8px;
  font-size: 1.2rem;
}

.affiliate-box h3 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
}

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

.affiliate-box li {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.affiliate-box li:last-child {
  border-bottom: none;
}

.affiliate-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.affiliate-link .product-name {
  font-weight: 600;
  color: var(--secondary-color);
  font-size: 1.05rem;
}

.affiliate-link .buy-btn {
  background: linear-gradient(135deg, #28a745 0%, #20963c 100%);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.affiliate-link .buy-btn::after {
  content: '→';
  transition: transform 0.2s;
}

.affiliate-link .buy-btn:hover {
  background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.affiliate-link .buy-btn:hover::after {
  transform: translateX(3px);
}

/* Multi-Affiliate Button Variants */
.affiliate-link .btn-ifixit {
  background: linear-gradient(135deg, #0071ce 0%, #005ba1 100%);
}

.affiliate-link .btn-ifixit:hover {
  background: linear-gradient(135deg, #005ba1 0%, #004a87 100%);
  box-shadow: 0 4px 12px rgba(0, 113, 206, 0.4);
}

.affiliate-link .btn-tesmanian {
  background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
}

.affiliate-link .btn-tesmanian:hover {
  background: linear-gradient(135deg, #333333 0%, #4a4a4a 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.affiliate-link .btn-lectron {
  background: linear-gradient(135deg, #00a651 0%, #008c44 100%);
}

.affiliate-link .btn-lectron:hover {
  background: linear-gradient(135deg, #008c44 0%, #007538 100%);
  box-shadow: 0 4px 12px rgba(0, 166, 81, 0.4);
}

.affiliate-link .btn-rrcarparts {
  background: linear-gradient(135deg, #c41e3a 0%, #a01830 100%);
}

.affiliate-link .btn-rrcarparts:hover {
  background: linear-gradient(135deg, #a01830 0%, #861428 100%);
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.4);
}

.affiliate-link .btn-amazon-de {
  background: linear-gradient(135deg, #ff9900 0%, #e88a00 100%);
}

.affiliate-link .btn-amazon-de:hover {
  background: linear-gradient(135deg, #e88a00 0%, #cc7a00 100%);
  box-shadow: 0 4px 12px rgba(255, 153, 0, 0.4);
}

.affiliate-link .btn-amazon-us {
  background: linear-gradient(135deg, #146eb4 0%, #0f5a8f 100%);
}

.affiliate-link .btn-amazon-us:hover {
  background: linear-gradient(135deg, #0f5a8f 0%, #0a4a75 100%);
  box-shadow: 0 4px 12px rgba(20, 110, 180, 0.4);
}

.amazon-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Warning/Tip Boxes */
.warning-box, .tip-box, .info-box {
  padding: 1.5rem;
  border-radius: 8px;
  margin: 2rem 0;
}

.warning-box {
  background: #fff3cd;
  border-left: 4px solid var(--warning-color);
}

.tip-box {
  background: #d4edda;
  border-left: 4px solid var(--success-color);
}

.info-box {
  background: #e7f1ff;
  border-left: 4px solid var(--accent-color);
}

/* Tools Page */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.tool-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  border: 1px solid var(--border-color);
  text-align: center;
}

.tool-card h3 {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.tool-card .price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 1rem 0;
}

.tool-card p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.tool-card .tool-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.tool-card .buy-btn {
  display: inline-block;
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.85rem;
}

.tool-card .btn-amazon-de {
  background: linear-gradient(135deg, #ff9900 0%, #e88a00 100%);
}

.tool-card .btn-amazon-de:hover {
  background: linear-gradient(135deg, #e88a00 0%, #cc7a00 100%);
}

.tool-card .btn-amazon-us {
  background: linear-gradient(135deg, #146eb4 0%, #0f5a8f 100%);
}

.tool-card .btn-amazon-us:hover {
  background: linear-gradient(135deg, #0f5a8f 0%, #0a4a75 100%);
}

/* About Page */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-content h1 {
  font-size: 2.5rem;
  color: var(--secondary-color);
  margin-bottom: 2rem;
}

.about-content h2 {
  font-size: 1.6rem;
  color: var(--secondary-color);
  margin: 2rem 0 1rem;
}

/* Footer */
.site-footer {
  background: var(--secondary-color);
  color: #ccc;
  padding: 3rem 2rem 1rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h3 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

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

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

.footer-section a {
  color: #aaa;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid #444;
  text-align: center;
  font-size: 0.9rem;
}

/* Newsletter Form */
.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
}

.newsletter-form button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.newsletter-form button:hover {
  background: #c41730;
}

/* Newsletter CTA Box */
.newsletter-cta {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #2d3748 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: 12px;
  text-align: center;
  margin: 3rem 0;
}

.newsletter-cta h2 {
  color: white;
  margin-bottom: 0.5rem;
}

.newsletter-cta p {
  opacity: 0.9;
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-cta .newsletter-form {
  max-width: 450px;
  margin: 0 auto;
}

.newsletter-cta .newsletter-form input[type="email"] {
  background: white;
}

/* Article Newsletter Prompt */
.article-newsletter {
  background: var(--bg-light);
  border: 2px solid var(--accent-color);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
}

.article-newsletter h3 {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.article-newsletter p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.article-newsletter .newsletter-form {
  max-width: 400px;
  margin: 0 auto;
}

.article-newsletter .newsletter-form input[type="email"] {
  border: 1px solid var(--border-color);
}

/* Mobile Navigation Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  position: relative;
  transition: background 0.2s;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: white;
  left: 0;
  transition: transform 0.3s, top 0.3s;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

/* Hamburger animation when open */
.nav-toggle.nav-open .hamburger {
  background: transparent;
}

.nav-toggle.nav-open .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle.nav-open .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--secondary-color);
    flex-direction: column;
    padding: 1rem 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  }

  .nav-links.nav-open {
    display: flex;
  }

  .nav-links li {
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 1rem 2rem;
  }

  .nav-links a:hover {
    background: rgba(255,255,255,0.1);
  }

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

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

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .post-header h1 {
    font-size: 1.8rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form button {
    width: 100%;
  }

  .product-card {
    flex-direction: column;
    text-align: center;
  }

  .product-card .product-info {
    margin-bottom: 1rem;
  }

  .comparison-table {
    font-size: 0.85rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.5rem;
  }
}

/* ===========================================
   IN-CONTENT AFFILIATE STYLES
   Use these classes in article markdown/HTML
   =========================================== */

/* Inline product link - for mentioning products in text */
.product-link {
  color: var(--accent-color);
  font-weight: 500;
  background: linear-gradient(to bottom, transparent 60%, rgba(40, 167, 69, 0.2) 60%);
  padding: 0 2px;
  transition: background 0.2s;
}

.product-link:hover {
  background: linear-gradient(to bottom, transparent 40%, rgba(40, 167, 69, 0.3) 40%);
  color: var(--secondary-color);
}

.product-link::after {
  content: ' ↗';
  font-size: 0.8em;
  opacity: 0.7;
}

/* Product card - for featuring a single product mid-article */
.product-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.product-card .product-icon {
  font-size: 3rem;
  flex-shrink: 0;
}

.product-card .product-info {
  flex: 1;
}

.product-card .product-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 0.25rem;
}

.product-card .product-desc {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.product-card .buy-btn {
  background: linear-gradient(135deg, #28a745 0%, #20963c 100%);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.product-card .buy-btn:hover {
  background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

/* Comparison table - for tool comparisons */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}

.comparison-table th {
  background: var(--secondary-color);
  color: white;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
}

.comparison-table th:first-child {
  border-radius: 8px 0 0 0;
}

.comparison-table th:last-child {
  border-radius: 0 8px 0 0;
}

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

.comparison-table tr:nth-child(even) {
  background: var(--bg-light);
}

.comparison-table tr:hover {
  background: #e8f5e9;
}

.comparison-table .table-buy-btn {
  background: var(--success-color);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
  transition: all 0.2s;
}

.comparison-table .table-buy-btn:hover {
  background: #218838;
  color: white;
  transform: scale(1.05);
}
