/* ===== Tech Hub Services Custom CSS ===== */

/* ===== Blog Image Fixes ===== */

/* Blog listing featured images */
.post-thumb {
  width: 100%;
  max-height: 220px;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

/* Blog detail featured image */
.blog-details-thumb {
  max-width: 100%;
  width: 100%;
  max-height: 350px;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 30px;
}

.blog-details-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Content body images - responsive */
.blog-content-body img {
  max-width: 100% !important;
  height: auto !important;
  display: block;
  margin: 1em 0;
  border-radius: 8px;
}

/* Sidebar latest post thumbnails */
.lastest-post-item .thumb {
  width: 80px;
  height: 80px;
  min-width: 80px;
  overflow: hidden;
  border-radius: 8px;
}

.lastest-post-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ===== Blog Mobile Responsive Fixes ===== */

/* Blog listing - card spacing on mobile */
@media (max-width: 575px) {
  .post-item {
    margin-bottom: 20px;
  }
  
  .post-thumb {
    max-height: 180px;
  }
  
  .post-content {
    padding: 15px;
  }
  
  .post-content .post-title {
    font-size: 1.1rem;
    line-height: 1.4;
  }
  
  .post-content p {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  
  .meta-post {
    flex-wrap: wrap;
    gap: 5px;
  }
  
  .meta-post li {
    font-size: 0.8rem;
  }
}

/* Blog detail - content area on mobile */
@media (max-width: 767px) {
  .blog-details {
    padding: 0;
  }
  
  .blog-details-thumb {
  max-width: 100%;
    max-height: 220px;
    margin-bottom: 20px;
  }
  
  .blog-details-thumb img {
    max-height: 220px;
  }
  
  .blog-details-content .title {
    font-size: 1.3rem;
    line-height: 1.4;
  }
  
  .blog-content-body {
    font-size: 0.95rem;
    line-height: 1.7;
  }
  
  .blog-content-body img {
    max-width: 100% !important;
    height: auto !important;
  }
  
  .blog-content-body table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .blog-content-body pre,
  .blog-content-body code {
    white-space: pre-wrap;
    word-break: break-word;
  }
  
  .blog-content-body iframe {
    max-width: 100%;
  }
}

@media (max-width: 575px) {
  .blog-details-thumb {
  max-width: 100%;
    max-height: 180px;
  }
  
  .blog-details-thumb img {
    max-height: 180px;
  }
}

/* Blog sidebar on mobile */
@media (max-width: 991px) {
  .blog-sidebar {
    margin-top: 30px;
  }
  
  .sidebar-item {
    margin-bottom: 20px;
  }
  
  .lastest-post-item {
    flex-direction: row;
    align-items: center;
  }
  
  .lastest-post-item .thumb {
    width: 60px;
    height: 60px;
    min-width: 60px;
  }
  
  .lastest-post-item .content h6 {
    font-size: 0.85rem;
  }
}

/* Pagination on mobile */
@media (max-width: 575px) {
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
  }
  
  .page-item .page-link {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
}

/* Blog content body - general readability */
.blog-content-body h2,
.blog-content-body h3,
.blog-content-body h4 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.blog-content-body p {
  margin-bottom: 1em;
}

.blog-content-body ul,
.blog-content-body ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
}

.blog-content-body blockquote {
  margin: 1.5em 0;
  padding: 1em 1.5em;
  border-left: 4px solid #4425f1;
  background: #f8f9ff;
  border-radius: 0 8px 8px 0;
}
