/* Blog & Service Detail/List Pages - Enhancement & Consistency Styles
   Aligned with existing style.css patterns and design system */

/* ===== Layout Helpers ===== */
.container-narrow {
  max-width: 1200px;
  margin: 0 auto;
}

.row-gap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.blog-main, .service-main {
  flex: 1;
  min-width: 300px;
}

.blog-aside, .service-aside {
  flex: 0 0 auto;
  width: 100%;
  max-width: 300px;
}

/* ===== Detail Page Main Content ===== */
.blog-card, .service-card {
  background: #fff;
  overflow: hidden;
}

.blog-hero, .service-hero {
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 24px;
}

.blog-hero img, .service-hero img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-hero img, .service-card:hover .service-hero img {
  transform: scale(1.07);
}

.blog-title, .service-title {
  font-size: 30px;
  font-weight: 700;
  color: #1C2539;
  margin-bottom: 16px;
  line-height: 1.3;
}

.blog-content, .service-content {
  font-size: 1rem;
  color: #5D666F;
  line-height: 1.8;
}

.blog-content p, .service-content p {
  margin-bottom: 16px;
}

.blog-content img, .service-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 16px 0;
}

/* Reference/Gallery */
.reference-gallery {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid #E9ECF1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ref-thumb {
  overflow: hidden;
  border-radius: 8px;
  margin: 0;
}

.ref-thumb img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.ref-thumb:hover img {
  transform: scale(1.07);
}

/* ===== Aside Boxes (Detail Pages) ===== */
.other-services-box, .related-services-box {
  background: #f8fafd;
  border: 1px solid #EDEFF3;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.aside-title {
  font-size: 14px;
  font-weight: 700;
  color: #001a59;
  margin-bottom: 16px;
  padding-bottom: 0;
  border: none;
}

.other-services-list, .related-services-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.other-service-card, .service-link-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: none;
  border-bottom: 1px solid #EDEFF3;
  border-radius: 0;
  padding: 12px 0;
  text-decoration: none;
  color: #1C2539;
  transition: all 0.3s ease;
}

.other-service-card:last-child, .service-link-card:last-child {
  border-bottom: none;
}

.other-service-card:hover, .service-link-card:hover {
  border: none;
  box-shadow: none;
  transform: none;
  color: #0b4df5;
}

.other-thumb, .service-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  flex-shrink: 0;
}

.other-title, .service-link-title {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.3;
}

/* ===== List Page Cards ===== */
.blog-card-featured, .service-card-featured {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #EDEFF3;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card-featured:hover, .service-card-featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(20,25,40,0.08);
  border-color: #EDEFF3;
}

.blog-card-image, .service-card-image {
  overflow: hidden;
  height: 220px;
  background: #f5f5f5;
  position: relative;
}

.blog-image-link, .service-image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.blog-card-image img, .service-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card-featured:hover .blog-card-image img,
.service-card-featured:hover .service-card-image img {
  transform: scale(1.1);
}

.blog-card-body, .service-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-category, .service-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #0b4df5;
  background: transparent;
  padding: 0;
  border-radius: 0;
  margin-bottom: 8px;
  width: fit-content;
  letter-spacing: 0.5px;
}

.blog-card-title, .service-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1C2539;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.blog-card-featured a:hover .blog-card-title,
.service-card-featured a:hover .service-card-title {
  color: #0b4df5;
}

.blog-read-more, .service-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #0b4df5;
  text-decoration: none;
  transition: color 0.2s ease;
  margin-top: auto;
}

.blog-read-more:hover, .service-read-more:hover {
  color: #001a59;
}

/* ===== Sidebar Widgets (using existing .rts-single-wized structure) ===== */
.sidebar-widget {
  background: #f8fafd;
  border: 1px solid #EDEFF3;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 18px;
  display: block;
}

.widget-title {
  font-size: 14px;
  font-weight: 700;
  color: #001a59;
  margin: 0 0 14px 0;
  padding: 0;
  border: none;
}

/* Search Widget */
.search-input-wrapper { display: flex; align-items: center; background: #fff; border: 1px solid #EDEFF3; border-radius: 4px; overflow: hidden;}
.search-input-wrapper:focus-within { border-color: #0b4df5;}


.search-input {
  flex: 1 !important;
  border: none !important;
  padding: 0px 12px !important;
  font-size: 0.9rem !important;
  color: #1C2539 !important;
  background: transparent !important;
}

.search-input::placeholder {
  color: #99A3AF !important;
}

.search-input:focus {
  outline: none !important;
}

.search-btn {
  border: none !important;
  background: transparent !important;
  padding: 0px 12px !important;
  cursor: pointer !important;
  color: #5D666F !important;
  transition: color 0.2s ease !important;
  font-size: 0.95rem !important;
  width: fit-content;
  height: 100%;
}

.search-btn:hover {
  color: #0b4df5 !important;
}

/* Categories Widget */
.categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-item {
  padding: 8px 0;
  border-bottom: 1px solid #EDEFF3;
}

.category-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.category-item a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #5D666F;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: color 0.2s ease;
}

.category-item a:hover {
  color: #0b4df5;
}

.category-item a i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.category-item a:hover i {
  transform: translateX(2px);
}

/* Recent Posts Widget */
.recent-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-post-item {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #EDEFF3;
}

.recent-post-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.recent-post-link {
  display: flex;
  gap: 10px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.recent-post-link:hover {
  opacity: 0.8;
}

.post-thumbnail {
  width: 64px;
  height: 56px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 6px;
  margin: 0;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.recent-post-link:hover .post-thumbnail img {
  transform: scale(1.1);
}

.post-info {
  flex: 1;
  min-width: 0;
}

.post-date {
  display: block;
  font-size: 12px;
  color: #99A3AF;
  margin-bottom: 3px;
}

.post-date i {
  margin-right: 3px;
  font-size: 11px;
}

.post-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  color: #1C2539;
  line-height: 1.3;
}

.recent-post-link:hover .post-title {
  color: #0b4df5;
}

/* Tags Widget */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-link {
  display: inline-block;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid #EDEFF3;
  border-radius: 4px;
  font-size: 12px;
  color: #5D666F;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tag-link:hover {
  background: #0b4df5;
  border-color: #0b4df5;
  color: #fff;
}

/* CTA Widget */
.cta-widget {
  background: #f8fafd;
  border: 1px solid #EDEFF3;
  text-align: center;
  padding: 20px !important;
}

.cta-widget-header {
  margin-bottom: 12px;
}

.cta-widget-header img {
  max-width: 54px;
  height: auto;
}

.cta-widget-title {
  font-size: 14px;
  font-weight: 700;
  color: #1C2539;
  margin: 12px 0 8px 0;
}

.cta-widget-text {
  font-size: 12px;
  color: #5D666F;
  margin-bottom: 12px;
  line-height: 1.5;
}

.cta-widget .rts-btn {
  margin-top: 8px;
  padding: 10px 16px;
  font-size: 13px;
}

/* ===== Responsive Design ===== */
@media (max-width: 1199px) {
  .blog-hero img, .service-hero img { height: 280px; }
  .blog-title, .service-title { font-size: 26px; }
}

@media (max-width: 991px) {
  .row-gap {
    flex-direction: column;
  }
  
  .blog-aside, .service-aside {
    width: 100%;
    max-width: 100%;
  }

  .blog-hero img, .service-hero img { height: 240px; }
  .blog-title, .service-title { font-size: 22px; }
}

@media (max-width: 767px) {
  .blog-hero img, .service-hero img { height: 200px; }
  .blog-title, .service-title { font-size: 20px; }
  .blog-card-title, .service-card-title { font-size: 1rem; }
  .blog-card-image, .service-card-image { height: 180px; }
}

@media (max-width: 575px) {
  .blog-title, .service-title { font-size: 18px; margin-bottom: 12px; }
  .blog-hero img, .service-hero img { height: 160px; }
  .reference-gallery { gap: 8px; }
  .ref-thumb img { width: 100px; height: 75px; }
}
