.blog-detail-layout {
  font-family: inherit;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.blog-detail-layout > * {
  min-width: 0;
  max-width: 100%;
}

.blog-detail-layout .card {
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
}

.blog-detail-layout h1 {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.blog-detail-layout code,
.blog-detail-layout pre {
  font-family: 'Courier New', monospace !important;
}

.blog-detail-content {
  font-family: inherit;
  max-width: 100%;
  overflow-x: auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.blog-detail-content p,
.blog-detail-content li,
.blog-detail-content span,
.blog-detail-content div {
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* FAQ Section Styling */
.blog-faqs {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 2px solid #e9ecef;
}

.blog-faqs h2 {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.blog-faqs h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 44px;
  height: 2px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

/* Accordion Custom Styling */
#blogFaqAccordion {
  border: none;
}

#blogFaqAccordion .accordion-item {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 1rem;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  overflow: hidden;
}

#blogFaqAccordion .accordion-item:hover {
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
  border-color: #667eea;
}

#blogFaqAccordion .accordion-item:last-child {
  margin-bottom: 0;
}

#blogFaqAccordion .accordion-header {
  margin-bottom: 0;
}

#blogFaqAccordion .accordion-button {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  background-color: #ffffff;
  border: none;
  padding: 1.25rem 1.5rem;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: none;
}

#blogFaqAccordion .accordion-button:not(.collapsed) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

#blogFaqAccordion .accordion-button:not(.collapsed)::after {
  filter: brightness(0) invert(1);
  transform: rotate(180deg);
}

#blogFaqAccordion .accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%232c3e50'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.3s ease;
}

#blogFaqAccordion .accordion-button:hover {
  background-color: #f8f9fa;
  color: #667eea;
}

#blogFaqAccordion .accordion-button:not(.collapsed):hover {
  background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
  color: #ffffff;
}

#blogFaqAccordion .accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
  border-color: #667eea;
}

#blogFaqAccordion .accordion-collapse {
  border-top: 1px solid #e9ecef;
}

/* Answer font smaller than question */
#blogFaqAccordion .accordion-body {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 0.875rem;
  line-height: 1.7;
  color: #495057;
  padding: 1.5rem;
  background: #f8f9fa;
}

#blogFaqAccordion .accordion-body p {
  margin-bottom: 0.75rem;
  color: #495057;
  font-size: 0.875rem;
}

#blogFaqAccordion .accordion-body p:last-child {
  margin-bottom: 0;
}

#blogFaqAccordion .accordion-body ul,
#blogFaqAccordion .accordion-body ol {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  font-size: 0.875rem;
}

#blogFaqAccordion .accordion-body li {
  margin-bottom: 0.5rem;
  color: #495057;
  font-size: 0.875rem;
}

#blogFaqAccordion .accordion-body strong {
  color: #2c3e50;
  font-weight: 600;
}

#blogFaqAccordion .accordion-body a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

#blogFaqAccordion .accordion-body a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Override any inline styles from rich text editor */
/* Keep code elements as monospace */
.blog-detail-content code,
.blog-detail-content pre,
.blog-detail-content pre code {
  font-family: 'Courier New', monospace !important;
}

/* Blog title styling */
.blog-detail-layout h1 {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  color: #2c3e50;
  margin-bottom: 0.875rem;
}

/* Rich text editor content styling */
.blog-detail-content {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #495057;
}

/* Headings in rich text */
.blog-detail-content h1,
.blog-detail-content h2,
.blog-detail-content h3,
.blog-detail-content h4,
.blog-detail-content h5,
.blog-detail-content h6 {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-weight: 600;
  color: #2c3e50;
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.blog-detail-content h1 {
  font-size: 1.625rem;
}

.blog-detail-content h2 {
  font-size: 1.375rem;
}

.blog-detail-content h3 {
  font-size: 1.1875rem;
}

.blog-detail-content h4 {
  font-size: 1.0625rem;
}

.blog-detail-content h5 {
  font-size: 0.9375rem;
}

.blog-detail-content h6 {
  font-size: 0.875rem;
}

/* Paragraphs */
.blog-detail-content p {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #495057;
  margin-bottom: 0.875rem;
}

/* Lists */
.blog-detail-content ul,
.blog-detail-content ol {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #495057;
  margin-bottom: 0.875rem;
  padding-left: 1.5rem;
}

.blog-detail-content li {
  margin-bottom: 0.4rem;
}

/* Links */
.blog-detail-content a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.blog-detail-content a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Strong and bold */
.blog-detail-content strong,
.blog-detail-content b {
  font-weight: 600;
  color: #2c3e50;
}

/* Emphasis and italic */
.blog-detail-content em,
.blog-detail-content i {
  font-style: italic;
}

/* Blockquotes */
.blog-detail-content blockquote {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 0.9375rem;
  border-left: 4px solid #667eea;
  padding-left: 1rem;
  margin: 1.25rem 0;
  color: #6c757d;
  font-style: italic;
}

/* Code */
.blog-detail-content code {
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  background: #f3f4f6;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: #e83e8c;
}

.blog-detail-content pre {
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  background: #f3f4f6;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0;
}

.blog-detail-content pre code {
  background: none;
  padding: 0;
  color: #495057;
}

/* Tables */
.blog-detail-content table {
  width: 100% !important;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 0.9375rem;
  table-layout: fixed;
}

.blog-detail-content table th,
.blog-detail-content table td {
  padding: 0.75rem;
  border: 1px solid #e9ecef;
  text-align: left;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
}

.blog-detail-content table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
}

/* Images */
.blog-detail-content img {
  max-width: 100% !important;
  width: auto;
  height: auto !important;
  border-radius: 8px;
  margin: 1.25rem 0;
}

.blog-detail-content [style*="width"],
.blog-detail-content [width] {
  max-width: 100% !important;
}

/* Horizontal rule */
.blog-detail-content hr {
  border: none;
  border-top: 1px solid #e9ecef;
  margin: 1.5rem 0;
}

/* Sidebar headings */
.blog-detail-layout .card h3 {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: #2c3e50;
}

.blog-detail-layout .card h4 {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
}

/* Featured image styling */
.blog-detail-featured-image {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 2rem;
}

/* Excerpt styling */
.blog-detail-excerpt {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background-color: #f8f9fa;
  border-left: 4px solid #667eea;
  border-radius: 4px;
}

.blog-detail-excerpt p {
  font-size: 1rem;
  color: #495057;
  font-style: italic;
  margin: 0;
  line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .blog-detail-layout {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .blog-faqs {
    margin-top: 2rem;
    padding-top: 2rem;
  }

  .blog-faqs h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  #blogFaqAccordion .accordion-button {
    font-size: 0.9375rem;
    padding: 1rem 1.25rem;
  }

  #blogFaqAccordion .accordion-body {
    padding: 1.25rem;
    font-size: 0.8125rem;
  }

  #blogFaqAccordion .accordion-body p,
  #blogFaqAccordion .accordion-body li {
    font-size: 0.8125rem;
  }
  
  .blog-detail-layout .card {
    margin-bottom: 1rem;
    padding: 1.15rem !important;
  }
  
  .blog-detail-layout h1 {
    font-size: 1.35rem !important;
    line-height: 1.35 !important;
  }
  
  .blog-detail-content {
    font-size: 0.875rem;
  }

  .blog-detail-content table th,
  .blog-detail-content table td {
    padding: 0.5rem 0.55rem;
    font-size: 0.8125rem;
  }
  
  .blog-detail-content h1 {
    font-size: 1.375rem;
  }
  
  .blog-detail-content h2 {
    font-size: 1.1875rem;
  }
  
  .blog-detail-content h3 {
    font-size: 1.0625rem;
  }
  
  .blog-detail-excerpt {
    padding: 1rem;
  }
  
  .blog-detail-excerpt p {
    font-size: 0.9375rem;
  }
}

@media (max-width: 480px) {
  .blog-detail-layout h1 {
    font-size: 1.5rem !important;
  }

  .blog-faqs h2 {
    font-size: 1.1rem;
    margin-bottom: 0.875rem;
  }

  #blogFaqAccordion .accordion-button {
    font-size: 0.875rem;
    padding: 0.875rem 1rem;
  }

  #blogFaqAccordion .accordion-body {
    padding: 1rem;
    font-size: 0.75rem;
  }

  #blogFaqAccordion .accordion-body p,
  #blogFaqAccordion .accordion-body li {
    font-size: 0.75rem;
  }
  
  .blog-detail-layout .tag {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
  }
  
  .blog-detail-content {
    font-size: 0.8125rem;
  }
  
  .blog-detail-content h1 {
    font-size: 1.25rem;
  }
  
  .blog-detail-content h2 {
    font-size: 1.125rem;
  }
  
  .blog-detail-content h3 {
    font-size: 1rem;
  }
  
  .blog-detail-excerpt {
    padding: 0.875rem;
  }
  
  .blog-detail-excerpt p {
    font-size: 0.875rem;
  }
}
