/* ============================================================
   PREMIUM HANDYMAN SERVICES — BLOG SPECIFIC STYLESHEET
   ============================================================ */

/* ─── Search Bar ─── */
.search-container {
  max-width: 580px;
  margin: 0 auto 36px;
  position: relative;
}
.search-wrapper {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 4px 6px 4px 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.search-wrapper:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(191,161,105,0.15);
}
.search-icon {
  font-size: 1.1rem;
  color: var(--muted);
  margin-right: 12px;
  flex-shrink: 0;
}
.search-input {
  border: none;
  outline: none;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--dark);
  width: 100%;
  padding: 10px 0;
  background: transparent;
}
.search-clear-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 8px;
  font-size: 0.95rem;
  display: none;
  transition: color 0.2s ease;
  margin-right: 8px;
  flex-shrink: 0;
}
.search-clear-btn:hover {
  color: var(--dark);
}

/* ─── Blog Grid & Cards ─── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}
.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  height: 100%;
  border-bottom: 3px solid transparent;
}
.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-bottom-color: var(--gold);
}
.blog-card .card-img {
  height: 230px;
  overflow: hidden;
  position: relative;
  background: var(--canvas);
}
.blog-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.blog-card:hover .card-img img {
  transform: scale(1.05);
}
.blog-card .card-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.blog-card .card-category {
  margin-bottom: 12px;
}
.blog-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--dark);
  transition: color 0.2s ease;
}
.blog-card h3 a:hover {
  color: var(--gold);
}
.blog-card p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 24px;
  flex-grow: 1;
}
.blog-card .card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: auto;
}
.blog-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.blog-author .avatar {
  width: 32px;
  height: 32px;
  background: var(--canvas);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  border: 1px solid var(--border);
}
.blog-author .author-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dark);
}
.blog-card .card-date {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 500;
}

/* ─── No Results Fallback ─── */
.no-results {
  text-align: center;
  padding: 60px 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  max-width: 580px;
  margin: 40px auto 0;
}
.no-results .icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}
.no-results h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
}
.no-results p {
  font-size: 0.95rem;
  margin-bottom: 24px;
}

/* ─── Pagination ─── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 56px;
}
.page-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--dark);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.page-btn:hover:not(.disabled) {
  border-color: var(--gold);
  color: var(--gold);
}
.page-btn.active {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.page-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: var(--border);
}

/* ─── Blog Detail Template ─── */
.blog-detail-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 60px;
  align-items: start;
}
.blog-article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}
.blog-article-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.blog-article-meta .dot {
  width: 4px;
  height: 4px;
  background: var(--border);
  border-radius: 50%;
}
.blog-hero-image-wrap {
  width: 100%;
  height: 480px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 44px;
  background: var(--canvas);
}
.blog-hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Article content typography styling */
.blog-article-body {
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
}
.blog-article-body p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #4a4a4a;
  margin-bottom: 24px;
}
.blog-article-body h2 {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--dark);
  margin: 44px 0 20px;
}
.blog-article-body h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark);
  margin: 36px 0 16px;
}
.blog-article-body ul, 
.blog-article-body ol {
  margin: 0 0 28px 24px;
}
.blog-article-body li {
  margin-bottom: 12px;
  color: #4a4a4a;
}
.blog-article-body blockquote {
  border-left: 4px solid var(--gold);
  padding: 16px 24px;
  background: var(--canvas);
  margin: 32px 0;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--dark);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.blog-article-body blockquote p {
  margin-bottom: 0;
  font-style: italic;
}
.blog-article-body strong {
  font-weight: 700;
  color: var(--dark);
}
.blog-article-body a {
  color: var(--emerald);
  font-weight: 600;
  text-decoration: underline;
}
.blog-article-body a:hover {
  color: var(--emerald-d);
}

/* Author Info Box */
.author-info-box {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--canvas);
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
  margin-top: 48px;
}
.author-info-box .author-avatar-large {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.author-info-box h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.author-info-box p {
  font-size: 0.8rem;
  margin-bottom: 0;
}

/* Sidebar Widgets */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.sidebar-cta-card {
  background: linear-gradient(135deg, var(--dark) 0%, #1c1d1f 100%);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
  box-shadow: var(--shadow-md);
  color: var(--white);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
}
.sidebar-cta-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(191,161,105,0.04);
}
.sidebar-cta-card h3 {
  color: var(--white);
  margin-bottom: 12px;
  font-size: 1.4rem;
}
.sidebar-cta-card p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.sidebar-popular-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border);
}
.sidebar-popular-card h3 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.sidebar-popular-card h3::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--gold);
}
.popular-posts-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.popular-post-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.popular-post-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--canvas);
  flex-shrink: 0;
}
.popular-post-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.popular-post-info h4 {
  font-size: 0.88rem;
  line-height: 1.4;
  font-weight: 600;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.popular-post-info h4 a {
  color: var(--dark);
  transition: color 0.2s ease;
}
.popular-post-info h4 a:hover {
  color: var(--gold);
}
.popular-post-info .post-date {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}

/* Related Posts Section */
.related-posts-section {
  border-top: 1px solid var(--border);
  padding-top: 60px;
  margin-top: 80px;
}

/* ─── Responsive Media Queries ─── */
@media (max-width: 1100px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
  .blog-detail-layout {
    grid-template-columns: 1.4fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 900px) {
  .blog-detail-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .blog-hero-image-wrap {
    height: 360px;
    margin-bottom: 30px;
  }
}

@media (max-width: 680px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .blog-hero-image-wrap {
    height: 260px;
  }
  .blog-article-body h2 {
    font-size: 1.45rem;
    margin: 32px 0 16px;
  }
  .blog-article-body h3 {
    font-size: 1.2rem;
    margin: 28px 0 12px;
  }
}
