/* ==========================================================
   Blog Content Styles — Shared across community sites
   Ported from europeantechnical.ae globals.css
   Version: 2026-04-14
   ========================================================== */

.blog-content {
  color: #374151;           /* text-gray-700 */
  line-height: 1.8;         /* leading-[1.8] */
  font-size: 1.0625rem;     /* 17px — optimal for long reads */
  padding-top: 2rem;
  padding-bottom: 2rem;
  max-width: 48rem;          /* max-w-3xl */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;        /* px-4 */
  padding-right: 1rem;       /* px-4 */
}

@media (min-width: 640px) {
  .blog-content {
    padding-left: 0;          /* sm:px-0 */
    padding-right: 0;         /* sm:px-0 */
  }
}

/* --- Headings --- */
.blog-content h2 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 700;
  color: #1e3a5f;            /* text-primary-700 */
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  scroll-margin-top: 6rem;
  margin-top: 3rem;
  margin-bottom: 1.125rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(0,0,0,0.06);
}

@media (min-width: 640px) {
  .blog-content h2 {
    font-size: 1.625rem;
    margin-top: 3.75rem;
    margin-bottom: 1.375rem;
    padding-top: 2.25rem;
  }

  .blog-content > p:first-of-type::first-letter {
    font-size: 3.5em;
  }
}

.blog-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.blog-content h3 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  color: #2a4a6f;            /* text-primary-600 */
  font-size: 1.3rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
  scroll-margin-top: 6rem;
  margin-top: 2.75rem;
  margin-bottom: 1.125rem;
}

.blog-content h4 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  color: #2a4a6f;            /* text-primary-600 */
  font-size: 1.1rem;
  line-height: 1.35;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

/* --- Paragraphs --- */
.blog-content p {
  margin-bottom: 1.5rem;
  line-height: 1.85;
}

.blog-content p + p {
  margin-top: 0;
}

/* --- Links --- */
.blog-content a {
  color: #c5a572;            /* text-accent-600 */
  font-weight: 500;
  transition: color 0.2s ease;
  text-decoration: underline;
  text-decoration-color: rgba(197, 165, 114, 0.3);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

.blog-content a:hover {
  color: #b08c55;            /* text-accent-700 */
  text-decoration-color: rgba(197, 165, 114, 0.8);
}

/* --- Strong / Bold --- */
.blog-content strong {
  color: #1e3a5f;            /* text-primary-700 */
  font-weight: 600;
}

/* --- Lists --- */
.blog-content ul {
  padding-left: 0;
  list-style: none;
  margin-top: 0.875rem;
  margin-bottom: 1.875rem;
}

.blog-content ul li {
  position: relative;
  padding-left: 1.5rem;
  color: #374151;            /* text-gray-700 */
  margin-bottom: 0.75rem;
}

.blog-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(197, 165, 114, 0.6);  /* bg-accent-500/60 */
}

.blog-content ol {
  padding-left: 0;
  counter-reset: item;
  list-style: none;
  margin-top: 0.875rem;
  margin-bottom: 1.875rem;
}

.blog-content ol li {
  position: relative;
  padding-left: 2rem;
  color: #374151;            /* text-gray-700 */
  counter-increment: item;
  margin-bottom: 0.75rem;
}

.blog-content ol li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: #1e3a5f;       /* bg-primary-500 */
  border-radius: 50%;
  line-height: 1.5rem;
  text-align: center;
}

/* Nested lists */
.blog-content li ul,
.blog-content li ol {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* --- Blockquotes --- */
.blog-content blockquote {
  padding: 1.25rem 1.5rem;
  background: rgba(30, 58, 95, 0.05);   /* bg-primary-50/60 */
  border-left: 4px solid #c5a572;       /* border-accent-500 */
  border-radius: 0 0.75rem 0.75rem 0;
  font-style: italic;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.blog-content blockquote p {
  color: #1e3a5f;            /* text-primary-700 */
  margin-bottom: 0;
  font-size: 1.05rem;
}

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

/* --- Tables --- */
.blog-content table {
  width: 100%;
  font-size: 0.875rem;
  border-collapse: collapse;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  margin-top: 1.75rem;
  margin-bottom: 2.25rem;
}

.blog-content thead {
  background: linear-gradient(135deg, #1E3A5F 0%, #182E4C 100%);
}

.blog-content thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.9);
}

.blog-content tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s ease;
}

.blog-content tbody tr:nth-child(even) {
  background: rgba(249, 250, 251, 0.6);
}

.blog-content tbody tr:hover {
  background: rgba(197, 165, 114, 0.08);
}

.blog-content tbody td {
  padding: 0.75rem 1rem;
  color: #374151;
  line-height: 1.5;
}

.blog-content tbody td:first-child {
  font-weight: 500;
  color: #1e3a5f;
}

.blog-content tbody tr:last-child {
  border-bottom: none;
}

/* Responsive table wrapper */
.blog-content .table-wrapper,
.blog-content div:has(> table) {
  overflow-x: auto;
  margin-left: -1rem;
  margin-right: -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  -webkit-overflow-scrolling: touch;
}
