/* Blog-Specific Styles for PDF Trim Blogs */
/* Import Roboto font for consistency */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700;900&display=swap');

/* Root variables matching style.css */
:root {
  --primary: #ff007a; /* Neon pink */
  --secondary: #00ffea; /* Neon cyan */
  --background: #f5f5f5; /* Light gray */
  --card-bg: #ffffff; /* White for cards */
  --text-heading: #1a1a1a; /* Dark gray for headings */
  --text-body: #555555; /* Medium gray for body */
  --btn-green: #4CAF50; /* Green for buttons */
  --gradient-bg: linear-gradient(135deg, #ff007a, #00ffea); /* Gradient */
}

/* Reset and base styles */
.blog-page * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.blog-page {
  font-family: 'Roboto', sans-serif;
  color: var(--text-heading);
  line-height: 1.8;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  position: relative;
  z-index: 1; /* Below header (z-index: 1000) */
}

/* Blog Content Wrapper */
.blog-content-wrapper {
  display: flex;
  gap: 2rem;
  width: 100%;
  max-width: 1000px;
  margin: 80px auto 0; /* Clear fixed header (60px + padding) */
}

/* Table of Contents */
.toc {
  width: 250px;
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 80px; /* Below fixed header */
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--card-bg);
  z-index: 10; /* Above content, below header */
}

.toc::-webkit-scrollbar {
  width: 6px;
}

.toc::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

.toc-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.toc ul {
  list-style: none;
  padding: 0;
}

.toc ul li {
  margin-bottom: 0.75rem;
}

.toc ul li a {
  color: var(--text-body);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s, padding-left 0.2s;
}

.toc ul li a:hover {
  color: var(--primary);
  padding-left: 0.5rem;
}

/* Blog Content */
.blog-content {
  flex: 1;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 5; /* Above background, below TOC */
}

/* Blog Header */
.blog-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 5;
  width: 100%;
}

.blog-header-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  background: rgba(0, 0, 0, 0.6); /* Semi-transparent background for readability */
  padding: 1.5rem 2rem;
  border-radius: 8px;
  color: white;
  width: 90%;
  max-width: 800px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Subtle shadow for depth */
}

.blog-header-overlay h1 {
  font-size: 2.5rem;
  font-weight: 900;
  margin: 0;
  color: white; /* Override gradient for readability */
  -webkit-text-fill-color: white;
  background: none; /* Remove gradient */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); /* Add text shadow for contrast */
}

.blog-header-image {
  width: 100%;
  max-width: 800px;
  height: 420px; /* Fixed height for consistency (1200x630 ratio) */
  object-fit: cover; /* Ensure image scales properly */
  border-radius: 8px;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: block;
}

.blog-meta {
  font-size: 0.9rem;
  color: var(--text-body);
  margin: 1rem 0; /* Spacing below image */
  font-style: italic;
  width: 100%; /* Ensure it takes full width */
  text-align: center; /* Center the text */
}

/* Blog Sections */
.blog-section {
  margin: 2rem 0;
}

.blog-section h2 {
  font-size: 1.75rem;
  font-weight: 900;
  margin-bottom: 1rem;
  color: var(--text-heading);
  position: relative;
}

.blog-section h2::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 50px;
  height: 3px;
  background: var(--gradient-bg);
}

.blog-section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-heading);
}

.blog-section p {
  color: var(--text-body);
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.blog-section ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.blog-section ul li {
  margin-bottom: 0.75rem;
  color: var(--text-body);
}

/* Blog Images */
.blog-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem auto;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.blog-image:hover {
  transform: scale(1.02);
}

/* Video Container */
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 600px;
  margin: 1.5rem auto;
  background: #000;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* FAQ Section */
.faq-item {
  margin: 1.5rem 0;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 8px;
  transition: background 0.2s;
}

.faq-item:hover {
  background: rgba(255, 0, 122, 0.05);
}

.faq-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.faq-item p {
  margin-bottom: 0;
}

/* Related Posts */
.related-posts {
  margin: 2rem 0;
}

.related-posts h2 {
  text-align: center;
}

.related-posts .blog-grid {
  margin-top: 1.5rem;
}

/* Blog Grid (Used in blog.html and individual blog pages) */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

.blog-card {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.blog-thumbnail {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
  transition: transform 0.3s;
}

.blog-thumbnail:hover {
  transform: scale(1.02);
}

.blog-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.5rem 0;
  color: var(--text-heading);
}

.blog-link {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  margin-top: 0.75rem;
  transition: color 0.2s, text-decoration 0.2s;
}

.blog-link:hover {
  color: var(--secondary);
  text-decoration: underline;
}

/* Class to replace text-gray-600 */
.blog-card-description {
  color: var(--text-body); /* Matches --text-body: #555555 */
  margin-bottom: 1rem;
}

/* Class to replace mb-6 */
.margin-bottom-1-5rem {
  margin-bottom: 1.5rem;
}

/* CTA Section */
.cta-section {
  background: var(--gradient-bg);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  margin: 2rem 0;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-section h2 {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cta-section p {
  color: white;
  margin-bottom: 1.25rem;
}

.cta-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--btn-green);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.3s, background 0.3s;
}

.cta-button:hover {
  background: #45A049;
  transform: scale(1.05);
}

/* Animation for Scroll Effects */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .blog-content-wrapper {
    flex-direction: column;
    margin-top: 100px; /* Adjust for header on tablets */
  }
  .toc {
    width: 100%;
    position: static;
    max-height: none;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 768px) {
  .blog-page {
    padding: 0.5rem;
  }
  .blog-content-wrapper {
    margin-top: 80px; /* Adjust for mobile header */
  }
  .blog-content {
    padding: 1rem;
  }
  .blog-header-overlay {
    padding: 1rem 1.5rem;
  }
  .blog-header-overlay h1 {
    font-size: 2rem;
  }
  .blog-header-image {
    height: 300px; /* Reduce height on mobile */
  }
  .blog-meta {
    font-size: 0.85rem;
  }
  .blog-image {
    max-width: 100%;
  }
  .blog-section h2 {
    font-size: 1.5rem;
  }
  .blog-section h3 {
    font-size: 1.1rem;
  }
  .blog-section p {
    font-size: 0.95rem;
  }
  .video-container {
    max-width: 100%;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .cta-section {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .blog-header-overlay h1 {
    font-size: 1.75rem;
  }
  .blog-header-overlay {
    padding: 0.75rem 1rem;
  }
  .blog-header-image {
    height: 250px;
  }
  .blog-meta {
    font-size: 0.8rem;
  }
  .blog-section h2 {
    font-size: 1.25rem;
  }
  .blog-section p {
    font-size: 0.9rem;
  }
  .cta-button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .blog-image:hover, .blog-thumbnail:hover, .blog-card:hover, .cta-button:hover {
    transform: none;
  }
  .animate-on-scroll {
    transition: none;
    opacity: 1;
    transform: none;
  }
}