/**
 * Shared responsive styles for blog content (shortText + fullText).
 * Applied to .blog-content on client blog pages. Keeps one h1 from template;
 * content should use h2, h3, etc.
 * Unified typography overrides inline styles from the editor so all blogs look consistent.
 */

/* Base container + unified typography (override inline font-size/color from editor) */
.blog-content {
  overflow-wrap: break-word;
  word-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 1rem;
  line-height: 1.6;
  color: #1a1a1a;
  font-family: inherit;
}

/* Force consistent body text in full article (overrides inline styles from editor) */
.blog-content .blog-full-text p,
.blog-content .blog-full-text li,
.blog-content .blog-full-text td,
.blog-content .blog-full-text th {
  font-size: 1rem !important;
  line-height: 1.6 !important;
  color: #1a1a1a !important;
  font-family: inherit !important;
}

.blog-content strong,
.blog-content b {
  font-weight: 600;
  color: inherit;
}

.blog-content a {
  color: #c56a3e;
}

.blog-content a:hover {
  text-decoration: underline;
}

/* Unified spacing (override inline margins where needed) */
.blog-content p {
  margin: 0.75rem 0 !important;
}

.blog-content p:last-child {
  margin-bottom: 0 !important;
}

.blog-content ul,
.blog-content ol {
  margin: 0.75rem 0 !important;
  padding-left: 1.5rem !important;
}

.blog-content li {
  margin: 0.25rem 0 !important;
}

/* Long URLs and words break instead of causing horizontal scroll */
.blog-content a,
.blog-content .break-word {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Images: scale down on narrow viewports */
.blog-content img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Tables: use .table-wrapper when editing to avoid horizontal page scroll */
.blog-content table {
  border-collapse: collapse;
  max-width: 100%;
}

.blog-content .table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
}

.blog-content .table-wrapper table {
  min-width: 280px;
}

/* Blockquote and lists: prevent overflow + unified style */
.blog-content blockquote,
.blog-content ul,
.blog-content ol {
  max-width: 100%;
  padding-left: 1.5rem;
}

.blog-content blockquote {
  font-size: 1rem !important;
  line-height: 1.6 !important;
  color: #444 !important;
  font-family: inherit !important;
  margin: 1rem 0 !important;
  padding: 1rem 1rem 1rem 1.25rem !important;
  border-left: 4px solid #c56a3e;
  background: #faf8f6;
  border-radius: 0 6px 6px 0;
}

@media (max-width: 768px) {
  .blog-content blockquote,
  .blog-content ul,
  .blog-content ol {
    padding-left: 1.25rem;
  }

  .blog-content blockquote {
    padding-left: 1rem !important;
  }
}

/* Headings: no h1 in content (page has one); unified size and color (override inline) */
.blog-content h2 {
  font-size: 1.5rem !important;
  line-height: 1.3 !important;
  margin: 1.5rem 0 0.75rem 0 !important;
  color: #1a1a1a !important;
  font-family: inherit !important;
}

.blog-content h3 {
  font-size: 1.25rem !important;
  line-height: 1.35 !important;
  margin: 1.25rem 0 0.5rem 0 !important;
  color: #1a1a1a !important;
  font-family: inherit !important;
}

.blog-content h4 {
  font-size: 1.1rem !important;
  line-height: 1.4 !important;
  margin: 1rem 0 0.5rem 0 !important;
  color: #1a1a1a !important;
  font-family: inherit !important;
}

@media (max-width: 768px) {
  .blog-content h2 {
    font-size: 1.35rem !important;
  }

  .blog-content h3 {
    font-size: 1.15rem !important;
  }

  .blog-content h4 {
    font-size: 1.05rem !important;
  }
}

/* Subsection cards (replacement for tables on mobile-friendly blogs) */
.blog-content .blog-request-card,
.blog-content .blog-method-card {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fafafa;
  max-width: 100%;
  box-sizing: border-box;
}

.blog-content .blog-request-card h3,
.blog-content .blog-method-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
}

.blog-content .blog-request-card p,
.blog-content .blog-method-card p {
  margin: 0.25rem 0;
  font-size: 1rem;
}

.blog-content .blog-guide .note,
.blog-content .blog-methods-list .note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #666;
}

/* FAQ section: collapsible details/summary */
.blog-content .blog-faq {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
  max-width: 100%;
}

.blog-content .blog-faq h2 {
  margin-bottom: 1rem;
}

.blog-content .blog-faq details {
  margin: 0.75rem 0;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fafafa;
  overflow: hidden;
}

.blog-content .blog-faq details[open] {
  background: #fff;
}

.blog-content .blog-faq summary {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.blog-content .blog-faq summary::-webkit-details-marker {
  display: none;
}

.blog-content .blog-faq summary::before {
  content: "▶ ";
  font-size: 0.75em;
  margin-right: 0.25rem;
}

.blog-content .blog-faq details[open] summary::before {
  content: "▼ ";
}

.blog-content .blog-faq details p {
  margin: 0;
  padding: 0 1rem 1rem 1rem;
  padding-top: 0;
}
