/* Breadcrumb Navigation */
.breadcrumb {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: #4b5563;
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}

.breadcrumb a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #CE6134;
  transition: width 0.2s ease;
}

.breadcrumb a:hover {
  color: #CE6134;
}

.breadcrumb a:hover::after {
  width: 100%;
}

/* Blog Listing Styles */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.blog-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  border-color: #CE6134;
}

.blog-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.blog-card-content {
  padding: 2rem;
}

.blog-card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: #1a1a1a;
  line-height: 1.3;
  font-weight: 600;
  transition: color 0.2s ease;
}

.blog-card:hover h3 {
  color: #CE6134;
}

.blog-card p {
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: #6b7280;
}

.blog-category {
  background: #FFF0EB;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  color: #CE6134;
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-read-time {
  color: #9ca3af;
  font-size: 0.8rem;
}

/* Blog listing specific styles */
.blog-grid {
  margin-top: 3rem;
  margin-bottom: 4rem;
}

/* Blog header improvements */
.blog-post-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.blog-post-header .subtitle {
  font-size: 1.25rem;
  color: #6b7280;
  font-weight: 400;
  margin-bottom: 1rem;
}

/* Blog Post Typography */
.blog-post-content {
  color: #333;
  font-size: 1.1rem;
  line-height: 1.8;
}

.blog-post-content a {
  color: #CE6134;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.blog-post-content a:hover {
  color: #B04F28;
  border-bottom-color: #B04F28;
}

.blog-post-content a:visited {
  color: #A04028;
}

/* Blog Post Styles */
.blog-post-header {
  text-align: center;
  margin-bottom: 3rem;
}

.blog-post-meta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.blog-post-meta span {
  background: rgba(255, 255, 255, 0.9);
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.blog-post-meta .blog-category {
  background: #FFF0EB;
  color: #CE6134;
}

/* Tables in blog posts */
.blog-post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.blog-post-content th,
.blog-post-content td {
  border: 1px solid #e5e7eb;
  padding: 0.75rem;
  text-align: left;
}

.blog-post-content th {
  background-color: #f9fafb;
  font-weight: 600;
  color: #1a1a1a;
}

.blog-post-content tr:nth-child(even) {
  background-color: #f9fafb;
}

/* Horizontal rule */
.blog-post-content hr {
  border: none;
  height: 1px;
  background-color: #e5e7eb;
  margin: 3rem 0;
}

.blog-post-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.blog-post-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.3;
}

.blog-post-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: #2e2e2e;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.4;
}

.blog-post-content h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: #333;
  font-size: 1.2rem;
  font-weight: 600;
}

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

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

.blog-post-content li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.blog-post-content li strong {
  color: #1a1a1a;
}

.blog-post-content blockquote {
  border-left: 4px solid #CE6134;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background-color: #FFF8F5;
  font-style: italic;
  color: #8B3A1F;
  border-radius: 0 8px 8px 0;
}

.blog-post-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Code blocks */
.blog-post-content code {
  background-color: #f3f4f6;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
  color: #e11d48;
}

.blog-post-content pre {
  background-color: #1f2937;
  color: #e5e7eb;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.blog-post-content pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
  font-size: 0.95rem;
}

/* Featured Series Section */
.featured-series-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid #e5e7eb;
}

.featured-series-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: #1a1a1a;
}

.featured-series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.featured-series-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  box-shadow: 
    0 1px 2px rgba(0,0,0,0.04),
    0 2px 4px rgba(0,0,0,0.04),
    0 4px 8px rgba(0,0,0,0.04),
    0 8px 16px rgba(0,0,0,0.04),
    0 16px 32px rgba(0,0,0,0.04),
    0 32px 64px rgba(0,0,0,0.04),
    0 64px 128px rgba(0,0,0,0.04);
}

.featured-series-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 1px 2px rgba(0,0,0,0.07),
    0 2px 4px rgba(0,0,0,0.07),
    0 4px 8px rgba(0,0,0,0.07),
    0 8px 16px rgba(0,0,0,0.07),
    0 16px 32px rgba(0,0,0,0.07),
    0 32px 64px rgba(0,0,0,0.07),
    0 64px 128px rgba(0,0,0,0.07);
  border-color: #CE6134;
}

.featured-series-cover {
  border-radius: 2px 8px 8px 2px;
  height: 192px;
  width: 128px;
  display: flex;
  position: relative;
  margin-bottom: 1rem;
  box-shadow: 2px 3px 2px #0000000a, 7px 8px 5.5px #0000000f, 10px 15px 10px #00000012, 14px 26px 18px #00000014, 20px 49px 33px #0000001a, 20px 119px 80px #00000024;
}

.featured-series-spine {
  background-position: 2px 0, 0 0;
  background-repeat: no-repeat, no-repeat;
  background-size: auto 100%, cover;
  border-radius: 4px 2px 2px 4px;
  width: 100%;
  height: 100%;
  position: relative;
}

.featured-series-pages {
  position: absolute;
  right: -5px;
  top: 0;
  bottom: 0;
  width: 5px;
}

.featured-series-info {
  text-align: center;
  width: 100%;
}

.featured-series-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  color: #1a1a1a;
  line-height: 1.2;
}

.featured-series-author {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.featured-series-books {
  font-size: 0.75rem;
  color: #999;
  margin-bottom: 0.5rem;
}

.featured-series-action {
  background-color: #CE6134;
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background-color 0.3s ease;
  display: inline-block;
  margin-top: 0.5rem;
}

.featured-series-action:hover {
  background-color: #B04F28;
}

/* Responsive YouTube embeds */
.blog-post-content iframe[src*="youtube.com"],
.blog-post-content iframe[src*="youtu.be"] {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-width: 100%;
}

/* Fallback for direct iframe embeds without wrapper */
.blog-post-content iframe {
  max-width: 100%;
  width: 100%;
}

/* Responsive video wrapper for all embeds */
.blog-post-content .video-wrapper,
.blog-post-content .embed-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 1.5rem 0;
}

.blog-post-content .video-wrapper iframe,
.blog-post-content .embed-container iframe,
.blog-post-content .video-wrapper object,
.blog-post-content .embed-container object,
.blog-post-content .video-wrapper embed,
.blog-post-content .embed-container embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Responsive tables with horizontal scroll */
.blog-post-content .table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}

.blog-post-content table {
  min-width: 100%;
  white-space: nowrap;
}

/* Add scroll indicator for tables on mobile */
@media (max-width: 768px) {
  .blog-post-content .table-wrapper {
    position: relative;
    box-shadow: inset -10px 0 10px -10px rgba(0,0,0,0.1);
  }
  
  .blog-post-content .table-wrapper:after {
    content: '→';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.5rem;
    pointer-events: none;
    opacity: 0.7;
  }
  
  .blog-post-content .table-wrapper.scrolled:after {
    display: none;
  }
}

/* Responsive content */
@media (max-width: 768px) {
  .blog-post-content {
    padding: 0 1rem;
    font-size: 1rem;
    line-height: 1.7;
    overflow-x: hidden;
    word-wrap: break-word;
  }
  
  .blog-post-content h2 {
    font-size: 1.5rem;
  }
  
  .blog-post-content h3 {
    font-size: 1.25rem;
  }
  
  .blog-post-content img {
    max-width: 100%;
    height: auto;
  }
  
  .blog-post-content pre {
    padding: 1rem;
    font-size: 0.875rem;
  }
  
  .blog-post-content blockquote {
    padding: 0.75rem 1rem;
    margin: 1.5rem 0;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .blog-card-content {
    padding: 1.5rem;
  }
  
  .blog-post-meta {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .blog-post-meta span {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
  }
  
  .featured-series-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }
  
  .featured-series-section {
    margin-top: 3rem;
    padding-top: 2rem;
  }
  
  .featured-series-cover {
    height: 160px;
    width: 107px;
  }
}