/* ========================================
   BLOG PAGE CUSTOM STYLES
   Replaces Tailwind CSS utility classes
   ======================================== */

/* Blog Detail Page */
.blog-detail-container {
  max-width: 48rem; /* 768px for optimal reading length */
  margin: 0 auto;
}

.blog-header {
  margin-bottom: 2rem;
}

.blog-date-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-primary, #e31e24);
  text-transform: uppercase;
  background: #fef2f2;
  border-radius: 9999px;
}

.blog-title {
  font-size: 2.25rem;
  font-weight: 900;
  color: #111827;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .blog-title {
    font-size: 3rem;
  }
}

/* Premium Blog Featured Image Hero */
.blog-featured-image-hero {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
  margin-bottom: 3.5rem;
  width: 100%;
}

.blog-featured-image-hero img {
  width: 100%;
  height: auto;
  max-height: 550px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Drop Cap for First Paragraph */
.blog-content > p:first-of-type::first-letter {
  font-size: 4rem;
  font-weight: 900;
  float: left;
  line-height: 0.8;
  padding-right: 0.5rem;
  padding-top: 0.4rem;
  color: var(--color-primary, #e31e24);
}

/* Blog Content */
.blog-content {
  font-size: 1.125rem;
  color: #334155;
  line-height: 1.8;
  margin-bottom: 3rem;
  font-family: inherit;
}

.blog-content p {
  margin-bottom: 1.75rem;
}

.blog-content h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 3.5rem;
  margin-bottom: 1.25rem;
  line-height: 1.3;
}

.blog-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.blog-content h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-content h5, .blog-content h6 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #334155;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-content ul {
  list-style-type: none;
  margin-bottom: 1.75rem;
  padding-left: 0.5rem;
}

.blog-content ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.blog-content ul li::before {
  content: "•";
  color: var(--color-primary, #e31e24);
  font-weight: bold;
  font-size: 1.5rem;
  position: absolute;
  left: 0;
  top: -6px;
}

.blog-content ol {
  list-style-type: decimal;
  margin-bottom: 1.75rem;
  padding-left: 1.5rem;
  font-weight: 600;
}

.blog-content ol li {
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

.blog-content ol li span, .blog-content ol li p {
    font-weight: 400; /* Reset text inside to normal */
}

.blog-content b, .blog-content strong {
  font-weight: 700;
  color: #0f172a;
}

.blog-content i,
.blog-content em {
  font-style: italic;
}

.blog-content a {
  color: var(--color-primary, #e31e24);
  text-decoration: underline;
}

.blog-content a:hover {
  color: var(--color-primary-dark, #c41e24);
}

.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
  display: block;
}

.blog-content blockquote {
  border-left: 4px solid var(--color-primary, #e31e24);
  background: #f9fafb;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #4b5563;
  border-radius: 0 8px 8px 0;
}

.blog-content table {
  width: 100%;
  margin-bottom: 2rem;
  border-collapse: collapse;
}

.blog-content table th,
.blog-content table td {
  border: 1px solid #e5e7eb;
  padding: 0.75rem;
  text-align: left;
}

.blog-content table th {
  background: #f9fafb;
  font-weight: 600;
  color: #111827;
}

/* Blog Footer */
.blog-footer {
  border-top: 1px solid #f3f4f6;
  padding-top: 2rem;
  margin-top: 2rem;
}

/* Blog List Page */
.blog-list-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .blog-list-header {
    flex-direction: row;
    align-items: flex-end;
  }
}

.blog-list-title-section {
  text-align: left;
}

.blog-section-label {
  color: var(--color-primary, #e31e24);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.875rem;
}

.blog-list-title {
  font-size: 2.25rem;
  font-weight: 900;
  color: #1f2937;
  margin-top: 0.5rem;
}

.blog-list-title .highlight {
  color: var(--color-primary, #e31e24);
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Blog Card */
.blog-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-date {
  font-size: 0.75rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.blog-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.blog-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-card-title a:hover {
  color: var(--color-primary, #e31e24);
}

.blog-card-excerpt {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.blog-read-more {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary, #e31e24);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.2s;
}

.blog-read-more:hover {
  gap: 0.75rem;
}

.blog-read-more i {
  font-size: 0.75rem;
}

/* Back Button */
.btn-back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--color-primary, #e31e24);
  border: 2px solid var(--color-primary, #e31e24);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
}

.btn-back-to-blog:hover {
  background: var(--color-primary, #e31e24);
  color: #fff;
  transform: translateY(-2px);
}

.btn-back-to-blog i {
  transition: transform 0.2s;
}

.btn-back-to-blog:hover i {
  transform: translateX(-4px);
}

/* Utility Classes */
.max-w-4xl {
  max-width: 56rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.section-padding {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  .section-padding {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}
