/* ==========================================================================
   Theta HVAC - Blog & Single Post Styles
   ========================================================================== */

/* --- Container Utility --- */
.th-blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Hero Banner (Archive & Single) --- */
.th-blog-hero {
  background: linear-gradient(135deg, #071527 0%, #0b2546 60%, #00386b 100%);
  color: #ffffff;
  padding: 70px 20px 60px;
  position: relative;
  overflow: hidden;
}

.th-blog-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(56, 189, 248, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.th-blog-hero .th-blog-container {
  position: relative;
  z-index: 2;
}

.th-blog-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 18px;
  font-weight: 500;
}

.th-blog-breadcrumb a {
  color: #38bdf8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.th-blog-breadcrumb a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.th-blog-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
}

.th-blog-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin: 0 0 14px;
  max-width: 880px;
}

.th-blog-desc {
  font-size: 16px;
  line-height: 1.65;
  color: #cbd5e1;
  max-width: 740px;
  margin: 0;
}

/* --- Single Post Meta Row --- */
.th-single-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  color: #cbd5e1;
}

.th-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.th-meta-item i {
  color: #38bdf8;
}

.th-meta-author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #38bdf8;
}

/* --- Category Filter Bar (Archive) --- */
.th-category-bar-wrap {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.th-category-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.th-category-bar::-webkit-scrollbar {
  display: none;
}

.th-cat-pill {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.th-cat-pill:hover,
.th-cat-pill.is-active {
  background: #005b9f;
  color: #ffffff;
}

/* --- Main Blog Content Section & Layout --- */
.th-blog-section {
  padding: 60px 0 80px;
  background: #f8fafc;
}

.th-blog-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

/* --- Featured Big Card --- */
.th-featured-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: 0 6px 20px rgba(11, 31, 58, 0.05);
  transition: all 0.3s ease;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

.th-featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(11, 31, 58, 0.1);
  border-color: #cbd5e1;
}

.th-featured-img-wrap {
  position: relative;
  overflow: hidden;
}

.th-featured-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.th-featured-card:hover .th-featured-img-wrap img {
  transform: scale(1.05);
}

.th-featured-body {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.th-card-category-tag {
  display: inline-block;
  background: rgba(0, 91, 159, 0.1);
  color: #005b9f;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  align-self: flex-start;
  text-decoration: none;
}

.th-featured-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 12px;
}

.th-featured-title a {
  color: #0b1f3a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.th-featured-title a:hover {
  color: #005b9f;
}

.th-featured-excerpt {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 20px;
}

.th-featured-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  color: #94a3b8;
}

.th-read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #005b9f;
  font-weight: 700;
  text-decoration: none;
  font-size: 13px;
  transition: gap 0.2s ease;
}

.th-read-more-btn:hover {
  gap: 10px;
  color: #00386b;
}

/* --- Regular Post Grid (2-columns) --- */
.th-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.th-post-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.th-post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(11, 31, 58, 0.09);
  border-color: #cbd5e1;
}

.th-card-img-wrap {
  position: relative;
  padding-top: 56.25%; /* 16:9 ratio */
  overflow: hidden;
  background: #0b1f3a;
}

.th-card-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.th-post-card:hover .th-card-img-wrap img {
  transform: scale(1.06);
}

.th-card-img-wrap .th-card-category-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(11, 31, 58, 0.85);
  color: #ffffff;
  backdrop-filter: blur(4px);
  z-index: 2;
}

.th-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.th-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 10px;
}

.th-card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 10px;
}

.th-card-title a {
  color: #0b1f3a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.th-card-title a:hover {
  color: #005b9f;
}

.th-card-excerpt {
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 18px;
  flex-grow: 1;
}

.th-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  color: #94a3b8;
}

/* --- Pagination --- */
.th-pagination {
  margin-top: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.th-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0b1f3a;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.th-pagination .page-numbers:hover,
.th-pagination .page-numbers.current {
  background: #005b9f;
  color: #ffffff;
  border-color: #005b9f;
}

/* --- Sidebar Styling --- */
.th-sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.th-widget {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 26px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.th-widget-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #0b1f3a;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f5f9;
  position: relative;
}

.th-widget-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 40px;
  height: 2px;
  background: #005b9f;
}

/* CTA Widget */
.th-widget-cta {
  background: linear-gradient(135deg, #071527 0%, #0b2546 60%, #00386b 100%);
  color: #ffffff;
  border: none;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.th-widget-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(56, 189, 248, 0.12) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}

.th-widget-cta-content {
  position: relative;
  z-index: 2;
}

.th-widget-cta-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 16px;
}

.th-widget-cta-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 10px;
}

.th-widget-cta-desc {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.55;
  margin: 0 0 20px;
}

.th-btn-wa-sidebar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #25d366;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
  transition: all 0.2s ease;
}

.th-btn-wa-sidebar:hover {
  background: #1eb857;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.45);
}

/* Search Widget */
.th-search-form {
  display: flex;
  position: relative;
}

.th-search-input {
  width: 100%;
  padding: 12px 45px 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.th-search-input:focus {
  border-color: #005b9f;
  box-shadow: 0 0 0 3px rgba(0, 91, 159, 0.1);
}

.th-search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 16px;
  padding: 8px 10px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.th-search-btn:hover {
  color: #005b9f;
}

/* Category List Widget */
.th-cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.th-cat-list li {
  margin-bottom: 10px;
}

.th-cat-list li:last-child {
  margin-bottom: 0;
}

.th-cat-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: #475569;
  text-decoration: none;
  transition: all 0.2s ease;
}

.th-cat-list a:hover {
  background: #f1f5f9;
  color: #005b9f;
  padding-left: 16px;
}

.th-cat-count {
  font-size: 11px;
  background: #e2e8f0;
  color: #64748b;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

/* Mini Post List Widget */
.th-mini-posts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.th-mini-post-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.th-mini-post-thumb {
  width: 72px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.th-mini-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.th-mini-post-info h5 {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 4px;
}

.th-mini-post-info h5 a {
  color: #0b1f3a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.th-mini-post-info h5 a:hover {
  color: #005b9f;
}

.th-mini-post-date {
  font-size: 11px;
  color: #94a3b8;
}

/* --- Single Post Main Content --- */
.th-single-article {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  margin-bottom: 40px;
}

.th-single-featured-img {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 36px;
  box-shadow: 0 10px 25px rgba(11, 31, 58, 0.08);
}

.th-single-featured-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* Single Article Body Typography */
.th-single-body {
  font-size: 16px;
  line-height: 1.8;
  color: #334155;
}

.th-single-body p {
  margin: 0 0 20px;
}

.th-single-body p.lead {
  font-size: 18px;
  line-height: 1.7;
  color: #1e293b;
  font-weight: 500;
}

.th-single-body h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #0b1f3a;
  margin: 40px 0 16px;
  padding-left: 14px;
  border-left: 4px solid #005b9f;
  line-height: 1.3;
}

.th-single-body h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #0b1f3a;
  margin: 30px 0 14px;
  line-height: 1.35;
}

.th-single-body ul, 
.th-single-body ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.th-single-body li {
  margin-bottom: 10px;
  line-height: 1.65;
}

/* Pro Tip Callout Box */
.th-callout-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-left: 4px solid #0284c7;
  border-radius: 8px;
  padding: 20px 24px;
  margin: 30px 0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.th-callout-icon {
  font-size: 24px;
  color: #0284c7;
  flex-shrink: 0;
  margin-top: 2px;
}

.th-callout-content h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #0369a1;
  margin: 0 0 6px;
}

.th-callout-content p {
  font-size: 14px;
  color: #0f172a;
  margin: 0;
  line-height: 1.6;
}

/* Styled Blockquote */
.th-single-body blockquote {
  background: #f8fafc;
  border-left: 4px solid #005b9f;
  margin: 30px 0;
  padding: 20px 26px;
  font-style: italic;
  font-size: 17px;
  color: #1e293b;
  border-radius: 0 8px 8px 0;
}

/* Share Buttons & Tags */
.th-post-footer-wrap {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.th-share-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.th-share-label {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.th-share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.th-share-btn:hover {
  transform: translateY(-2px);
}

.th-share-wa { background: #25d366; }
.th-share-fb { background: #1877f2; }
.th-share-tw { background: #1da1f2; }

/* Author Box */
.th-author-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 26px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}

.th-author-box-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #005b9f;
}

.th-author-box-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #0b1f3a;
  margin: 0 0 6px;
}

.th-author-box-bio {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* Post Navigation (Prev/Next) */
.th-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 50px;
}

.th-nav-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.th-nav-card:hover {
  border-color: #005b9f;
  box-shadow: 0 6px 18px rgba(0, 91, 159, 0.08);
  transform: translateY(-2px);
}

.th-nav-label {
  font-size: 11px;
  font-weight: 700;
  color: #005b9f;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.th-nav-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #0b1f3a;
  margin: 0;
  line-height: 1.4;
}

/* Related Posts Section */
.th-related-section {
  margin-top: 50px;
}

.th-related-header {
  margin-bottom: 24px;
}

.th-related-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #0b1f3a;
  margin: 0 0 6px;
}

.th-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* --- Responsive Rules --- */
@media (max-width: 991px) {
  .th-blog-title {
    font-size: 30px;
  }
  .th-blog-layout {
    grid-template-columns: 1fr;
  }
  .th-featured-card {
    grid-template-columns: 1fr;
  }
  .th-featured-img-wrap {
    height: 240px;
  }
  .th-related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .th-blog-hero {
    padding: 50px 15px 40px;
  }
  .th-blog-title {
    font-size: 24px;
  }
  .th-posts-grid {
    grid-template-columns: 1fr;
  }
  .th-single-article {
    padding: 24px 18px;
  }
  .th-post-nav {
    grid-template-columns: 1fr;
  }
  .th-author-box {
    flex-direction: column;
    text-align: center;
  }
}
