/* Blog Detail Page - Optimized Image Styles */
.blog-detail-page {
  background-color: #f8f9fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

/* Loading and Error States */
.blog-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
}

.blog-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(243, 243, 243, 0.3);
  border-top-color: #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.blog-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  text-align: center;
}

.blog-error h2 {
  color: #e74c3c;
  font-size: 2rem;
  margin-bottom: 15px;
}

.blog-error p {
  font-size: 1.2rem;
  color: #333;
}

/* Main Content Container */
.blog-main-container {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  flex: 1;
}

/* Article Card */
.blog-article-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-bottom: 30px;
}

/* Article Header */
.blog-article-header {
  padding: 25px;
  background: linear-gradient(135deg, #3498db, #2c3e50);
  color: white;
}

.blog-meta-info {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

.blog-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.meta-icon {
  font-size: 0.9rem;
}

.blog-title {
  font-size: 2rem;
  margin: 0;
  line-height: 1.3;
  font-weight: 700;
}

/* Featured Image - Fixed Size */
.blog-featured-image-wrapper {
  width: 100%;
  height: 400px;
  overflow: hidden;
  position: relative;
  background-color: #f1f1f1;
  margin-bottom: 30px;
}

.blog-featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}

.blog-featured-image:hover {
  transform: scale(1.03);
}

/* Content Styles */
.blog-content {
  padding: 0 25px 25px;
  font-size: 1.1rem;
  color: #333;
}

.blog-content p {
  margin-bottom: 1.5em;
}

/* Content Images - Fixed Size */
.blog-content img {
  max-width: 100%;
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 6px;
  margin: 25px auto;
  display: block;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/* Image Alignment Options */
.blog-content .img-left {
  float: left;
  width: 45%;
  height: 250px;
  margin: 0 25px 15px 0;
}

.blog-content .img-right {
  float: right;
  width: 45%;
  height: 250px;
  margin: 0 0 15px 25px;
}

.blog-content .img-center {
  width: 80%;
  height: 350px;
  margin-left: auto;
  margin-right: auto;
}

/* Image Grid Layout */
.blog-content .img-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin: 25px 0;
}

.blog-content .img-grid img {
  width: 100%;
  height: 200px;
  margin: 0;
}

/* Image with Caption */
.blog-content .img-container {
  margin: 25px 0;
}

.blog-content .img-caption {
  font-size: 0.9rem;
  color: #666;
  margin-top: 8px;
  font-style: italic;
  text-align: center;
}

/* Tags Footer */
.blog-tags-footer {
  padding: 15px 25px;
  border-top: 1px solid #eee;
}

.blog-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blog-tag {
  background-color: #f1f1f1;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #555;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .blog-main-container {
    padding: 15px;
  }
  
  .blog-article-header {
    padding: 20px;
  }
  
  .blog-title {
    font-size: 1.8rem;
  }
  
  .blog-featured-image-wrapper {
    height: 300px;
  }
  
  .blog-content {
    padding: 0 20px 20px;
  }
  
  .blog-content img {
    height: 250px;
    margin: 20px auto;
  }
  
  .blog-content .img-left,
  .blog-content .img-right {
    width: 100%;
    height: 250px;
    float: none;
    margin: 20px auto;
  }
  
  .blog-content .img-center {
    width: 100%;
    height: 300px;
  }
  
  .blog-content .img-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .blog-title {
    font-size: 1.5rem;
  }
  
  .blog-featured-image-wrapper {
    height: 250px;
  }
  
  .blog-content img {
    height: 200px;
  }
  
  .blog-content .img-center {
    height: 250px;
  }
}

/* Clear floats */
.blog-content::after {
  content: "";
  display: table;
  clear: both;
}

