/* ============================================================
   KARST TREE SERVICE - SUB-PAGE STYLES
   (Blog, Archive, Single Post, Comments, Sidebar)
   ============================================================ */

/* Archive Hero */
.page-hero--blog {
  position: relative;
  padding: 140px 0 100px;
  background: var(--kts-dark);
  overflow: hidden;
  color: #ffffff;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.page-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--kts-dark) 0%, transparent 100%);
}
.page-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.1;
}
.page-hero-desc {
  font-size: 1.125rem;
  opacity: 0.85;
  max-width: 600px;
  margin-inline: auto;
}

/* Layout */
.blog-listing-section,
.post-content-section {
  padding: 100px 0;
  background: #ffffff;
}
.blog-layout,
.post-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 60px;
  align-items: start;
}

/* Post Cards */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.posts-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.post-card {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--kts-gray-100);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  border-color: var(--kts-primary);
}
.post-card-thumb {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.post-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.post-card:hover .post-card-img {
  transform: scale(1.08);
}
.post-card-cat-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--kts-primary);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
  letter-spacing: 0.05em;
}
.post-card-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--kts-gray-400);
  margin-bottom: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.post-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.3;
}
.post-card-title a {
  color: var(--kts-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}
.post-card-title a:hover {
  color: var(--kts-primary);
}
.post-card-excerpt {
  font-size: 0.9375rem;
  color: var(--kts-gray-600);
  line-height: 1.6;
  margin-bottom: 24px;
  flex: 1;
}

/* Sidebar Widgets */
.sidebar-widget {
  background: var(--kts-cream);
  padding: 32px;
  border-radius: 20px;
  margin-bottom: 30px;
  border: 1px solid var(--kts-gray-100);
}
.widget-title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--kts-dark);
  position: relative;
  padding-bottom: 12px;
}
.widget-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--kts-primary);
}

/* Sidebar Search */
.search-field-wrap {
  position: relative;
}
.search-field {
  width: 100%;
  padding: 14px 50px 14px 20px;
  border-radius: 50px;
  border: 1px solid var(--kts-gray-200);
  background: #ffffff;
  font-size: 0.9375rem;
  transition: border-color 0.3s ease;
}
.search-field:focus {
  border-color: var(--kts-primary);
  outline: none;
}
.search-submit {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--kts-primary);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease;
}
.search-submit svg {
  width: 18px;
  height: 18px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2.5;
}

/* Single Post Hero */
.post-hero {
  position: relative;
  padding: 180px 0 100px;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
  color: #ffffff;
  background: var(--kts-dark);
}
.post-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.post-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}
.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17, 17, 17, 0.9) 0%, transparent 100%);
}
.post-cats a {
  background: var(--kts-primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 50px;
  text-decoration: none;
}

/* Content Typography */
.entry-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--kts-gray-800);
}
.entry-content h2, .entry-content h3 {
  font-family: var(--font-heading);
  color: var(--kts-dark);
  margin: 40px 0 20px;
}
.entry-content p {
  margin-bottom: 28px;
}
.entry-content blockquote {
  padding: 40px;
  background: var(--kts-cream);
  border-left: 4px solid var(--kts-primary);
  border-radius: 0 20px 20px 0;
  font-style: italic;
  font-size: 1.25rem;
  margin: 40px 0;
  color: var(--kts-dark);
}

/* Pagination */
.kts-pagination {
  margin-top: 48px;
}
.kts-pagination ul {
  display: flex;
  gap: 8px;
  list-style: none;
  justify-content: center;
}
.kts-pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--kts-gray-200);
  transition: all 0.3s ease;
}
.kts-pagination .page-numbers.current {
  background: var(--kts-primary);
  color: #fff;
  border-color: var(--kts-primary);
}

/* Comments Section */
.comments-area {
  margin-top: 80px;
  padding-top: 60px;
  border-top: 1px solid var(--kts-gray-200);
}
.comment-list {
  list-style: none;
  padding: 0;
}
.comment-body {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 16px;
  margin-bottom: 30px;
}
.comment-form input, .comment-form textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--kts-gray-200);
  border-radius: 8px;
  margin-bottom: 20px;
}
.submit {
  background: var(--kts-primary);
  color: #fff;
  padding: 15px 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}
