/* ============================================================
   Blog Page — Proper Typography & Layout
   ============================================================ */

/* ====== Blog Post Detail Page ====== */

/* Hero Section */
.blog-post-hero {
  background: linear-gradient(135deg, #184a96, #2a63b8, #133a78);
  color: #fff;
  padding: 120px 0 56px;
  position: relative;
}

.blog-post-hero-inner {
  max-width: 800px;
}

.blog-back-link {
  display: inline-block;
  color: #f4d000;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-decoration: none;
  transition: color 0.2s;
}
.blog-back-link:hover { color: #fff; }

.blog-category-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.blog-post-title {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}
@media (min-width: 768px) {
  .blog-post-title { font-size: 2.5rem; }
}

.blog-meta {
  display: flex;
  gap: 20px;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.8);
  flex-wrap: wrap;
}
.blog-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.blog-meta svg {
  width: 14px;
  height: 14px;
}

/* Featured Image — FULL WIDTH on top */
.blog-featured-image-wrap {
  background: #fff;
  padding: 32px 0 0;
  margin-top: -32px;
  position: relative;
  z-index: 10;
}

.blog-featured-image {
  max-width: 800px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  aspect-ratio: 16/9;
  background: #f3f4f6;
}

.blog-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Blog Article Body */
.blog-article {
  background: #fff;
  padding: 40px 0 64px;
}

.blog-content-wrap {
  max-width: 800px;
}

.blog-excerpt {
  font-size: 1.125rem;
  color: #6b7280;
  font-weight: 500;
  line-height: 1.7;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

/* Blog Content — Proper Typography */
.blog-content {
  font-size: 1rem;
  line-height: 1.8;
  color: #374151;
}

.blog-content > *:first-child { margin-top: 0; }
.blog-content > *:last-child { margin-bottom: 0; }

.blog-content p {
  margin-bottom: 20px;
  line-height: 1.8;
}

.blog-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #184a96;
  margin: 32px 0 16px;
  line-height: 1.3;
}
@media (min-width: 768px) {
  .blog-content h2 { font-size: 1.875rem; }
}

.blog-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #184a96;
  margin: 24px 0 12px;
  line-height: 1.3;
}

.blog-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #184a96;
  margin: 20px 0 10px;
}

.blog-content ul,
.blog-content ol {
  margin: 0 0 20px 0;
  padding-left: 24px;
}

.blog-content ul { list-style: disc; }
.blog-content ol { list-style: decimal; }

.blog-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.blog-content strong {
  font-weight: 700;
  color: #184a96;
}

.blog-content em { font-style: italic; }

.blog-content a {
  color: #184a96;
  text-decoration: underline;
  font-weight: 500;
}
.blog-content a:hover { color: #ff6600; }

.blog-content blockquote {
  border-left: 4px solid #f4d000;
  padding: 12px 20px;
  margin: 20px 0;
  background: #fff8e1;
  font-style: italic;
  color: #555;
  border-radius: 0 8px 8px 0;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 24px 0;
  display: block;
}

.blog-content hr {
  border: none;
  border-top: 2px solid #e5e7eb;
  margin: 32px 0;
}

.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}
.blog-content th,
.blog-content td {
  border: 1px solid #e5e7eb;
  padding: 10px 14px;
  text-align: left;
}
.blog-content th {
  background: #f9fafb;
  font-weight: 600;
  color: #184a96;
}

.blog-content code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.875em;
  color: #ff6600;
}

.blog-content pre {
  background: #1f2937;
  color: #f9fafb;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
}
.blog-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* Tags */
.blog-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.blog-tags-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
}

/* CTA Card */
.blog-cta-card {
  background: linear-gradient(to right, #184a96, #2a63b8);
  color: #fff;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  margin-top: 40px;
}

.blog-cta-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.blog-cta-card p {
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

/* Related Posts Section */
.blog-related-section {
  background: linear-gradient(to bottom, #fff8e1, #fff);
  padding: 64px 0;
}

.blog-related-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #184a96;
  margin-bottom: 24px;
}

/* Blog Card (used in both listing & related) */
.blog-card {
  display: block;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #f3f4f6;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
}
.blog-card:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  transform: translateY(-4px);
}

.blog-card-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #f3f4f6;
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.blog-card:hover .blog-card-img img { transform: scale(1.05); }

.blog-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff8e1;
  font-size: 2.5rem;
}

.blog-card-body { padding: 20px; }
.blog-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #184a96;
  margin-bottom: 8px;
  line-height: 1.4;
  transition: color 0.2s;
}
.blog-card:hover .blog-card-body h3 { color: #ff6600; }

.blog-card-body p {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  font-size: 0.6875rem;
  color: #9ca3af;
}

/* ====== Blog Listing Page ====== */
.blog-listing-featured {
  margin-bottom: 40px;
}

.blog-featured-link {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #f3f4f6;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
}
@media (min-width: 768px) {
  .blog-featured-link { grid-template-columns: 1fr 1fr; gap: 40px; }
}
.blog-featured-link:hover {
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.blog-featured-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #f3f4f6;
}
.blog-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.blog-featured-link:hover .blog-featured-img img { transform: scale(1.05); }

.blog-featured-body { padding: 32px; }
@media (min-width: 768px) { .blog-featured-body { padding: 40px; } }

.blog-featured-body h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #184a96;
  margin-bottom: 12px;
  line-height: 1.3;
  transition: color 0.2s;
}
@media (min-width: 768px) { .blog-featured-body h2 { font-size: 1.875rem; } }
.blog-featured-link:hover .blog-featured-body h2 { color: #ff6600; }

.blog-featured-body p {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ====== TinyMCE Editor Customization ====== */
.tox-tinymce {
  border-radius: 8px !important;
  border: 1px solid #e5e7eb !important;
}

.tox .tox-toolbar__primary {
  background: #f9fafb !important;
}

.tox .tox-edit-area {
  font-family: 'Poppins', sans-serif !important;
}

.tox .tox-edit-area__iframe {
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.9375rem !important;
  line-height: 1.7 !important;
  color: #374151 !important;
  padding: 8px !important;
}
