/* ========== BLOG SECTION ========== */
.blog-section {
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

/* When archive is set full-width (no sidebar) ensure content uses full container */
@media (min-width: 768px) {
  .full-width-archive {
    display: block !important;
    width: 100%;
  }
}

/* Page header for archives */
.page-header {
  padding: 2rem 0;
  text-align: center;
}

.page-header .page-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  line-height: 1.2;
  color: #1c1917;
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 300;
  position: relative;
  display: inline-block;
}

.page-header .page-title::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, #d4af37 0%, #f4d03f 100%);
  border-radius: 2px;
}

.page-header .page-title span {
  color: #d4af37;
  font-weight: 500;
}

.archive-description {
  color: #78716c;
  font-size: 1.0625rem;
  margin-top: 1.5rem;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Category Detailed Description from ACF */
.category-detailed-wrapper {
  margin-top: 2rem;
  margin-bottom: 5rem;
  position: relative;
}

.category-detailed-description {
  padding: 2rem;
  background: linear-gradient(135deg, #fafaf9 0%, #f5f5f4 100%);
  border-left: 4px solid #d4af37;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.category-detailed-description.collapsed {
  max-height: 200px;
}

.category-detailed-description.collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, transparent, #f5f5f4);
  pointer-events: none;
}

.category-detailed-description.expanded {
  max-height: 5000px;
}

.category-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem auto 0;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    z-index: 9999999;
    display: block;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.category-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.category-toggle-btn .toggle-text-less {
  display: none;
}

.category-toggle-btn[aria-expanded="true"] .toggle-text-more {
  display: none;
}

.category-toggle-btn[aria-expanded="true"] .toggle-text-less {
  display: inline;
}

.category-toggle-btn .toggle-icon {
  transition: transform 0.3s ease;
}

.category-toggle-btn[aria-expanded="true"] .toggle-icon {
  transform: rotate(180deg);
}

.category-detailed-description h2,
.category-detailed-description h3,
.category-detailed-description h4 {
  color: #1c1917;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}

.category-detailed-description h2 {
  font-size: 1.5rem;
}

.category-detailed-description h3 {
  font-size: 1.25rem;
}

.category-detailed-description h4 {
  font-size: 1.125rem;
}

.category-detailed-description p {
  color: #44403c;
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.category-detailed-description ul,
.category-detailed-description ol {
  margin: 1rem 0 1rem 1.5rem;
  color: #44403c;
}

.category-detailed-description li {
  margin: 0.5rem 0;
  line-height: 1.7;
}

.category-detailed-description a {
  color: #d4af37;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.3s ease;
}

.category-detailed-description a:hover {
  color: #b8941f;
}

.category-detailed-description blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid #d4af37;
  background: #ffffff;
  font-style: italic;
  color: #57534e;
}

.category-detailed-description img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

.category-detailed-description strong {
  color: #1c1917;
  font-weight: 600;
}

/* Small gold overline or category label */
.page-header .archive-overline {
  display: inline-block;
  font-size: 0.875rem;
  color: #b88719;
  background: rgba(212, 175, 55, 0.06);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

@media (max-width: 640px) {
  .page-header {
    margin-bottom: 2rem;
    padding: 1.5rem 0;
  }
  
  .page-header .page-title {
    font-size: 1.75rem;
  }
  
  .page-header .page-title::after {
    width: 60px;
    height: 2px;
    bottom: -0.75rem;
  }
  
  .archive-description {
    font-size: 0.9375rem;
    margin-top: 1rem;
  }
  
  .category-detailed-description {
    padding: 1.25rem;
    margin-top: 1.5rem;
  }
  
  .category-detailed-description.collapsed {
    max-height: 150px;
  }
  
  .category-toggle-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }
  
  .category-detailed-description h2 {
    font-size: 1.25rem;
  }
  
  .category-detailed-description h3 {
    font-size: 1.125rem;
  }
  
  .category-detailed-description h4 {
    font-size: 1rem;
  }
  
  .category-detailed-description p {
    font-size: 0.9375rem;
  }
}

/* Pagination styling for archive pages */
.navigation.pagination {
  margin-top: 2rem;
  text-align: center;
}

.navigation.pagination .nav-links {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.navigation.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  color: var(--color-stone-800);
  min-width: 36px;
  height: 36px;
  text-align: center;
  font-weight: 600;
  transition: all 0.15s ease;
}

.navigation.pagination .page-numbers:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(12, 10, 8, 0.06);
}

.navigation.pagination .page-numbers.current,
.navigation.pagination .page-numbers.current:hover {
  background: linear-gradient(90deg, #d4af37 0%, #b8941f 100%);
  color: #fff;
  border-color: rgba(212, 175, 55, 0.18);
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 999px;
}

.navigation.pagination .page-numbers.next,
.navigation.pagination .page-numbers.prev,
.navigation.pagination a.next,
.navigation.pagination a.prev {
  font-weight: 700;
}

@media (max-width: 420px) {
  .navigation.pagination .nav-links {
    gap: 0.35rem;
  }
  .navigation.pagination .page-numbers {
    padding: 0.35rem 0.6rem;
    min-width: 32px;
  }
}

.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--color-stone-200);
  background: var(--color-white);
  transition: box-shadow var(--transition-slow);
}

.blog-card:hover {
  box-shadow: 0 5px 15px -12px rgba(0, 0, 0, 0.25);
}

.blog-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.blog-card:hover .blog-image img {
  transform: scale(1.03);
}

.blog-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

@media (max-width: 768px) {
  .blog-content {
    padding: 0.25rem;
  }
}

.blog-title {
  font-weight: 500;
  color: var(--color-stone-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .blog-title {
    font-size: 1rem;
  }
}

.blog-link {
  display: inline-block;
  margin-top: auto;
  color: var(--color-amber-700);
  width: fit-content;
}

.blog-link:hover {
  text-decoration: underline;
}

/* Archive card meta and excerpt styling */
.blog-card .entry-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.9rem;
  color: var(--color-stone-600);
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .blog-card .entry-meta {
    flex-direction: column;
  }
}

.blog-card .entry-meta .posted-on time {
  color: #b88719;
  font-weight: 600;
}

.blog-card .entry-meta .cat-links a {
  color: #b88719; /* muted gold */
  background: rgba(212, 175, 55, 0.06);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.7rem;
  font-weight: normal;
}

.blog-excerpt {
  color: var(--color-stone-800);
  margin-top: 0.5rem;
  font-size: 0.975rem;
  line-height: 1.65;
  max-height: 5.25rem; /* limit lines visually (~3 lines) */
  overflow: hidden;
  -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    display: -webkit-box;
    overflow: hidden;
}

@media (max-width: 768px) {
  .blog-excerpt {
    max-height: 5rem;
  }
}

/* Old blog-link styles - replaced with read-more
.blog-link {
  display: inline-block;
  margin-top: 0.9rem;
  padding: 0.25rem 0;
  border-radius: 999px;
  color: #6b4f05;
}

.blog-link:hover {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.12), rgba(212, 175, 55, 0.06));
  transform: translateY(-2px);
}
@media (max-width: 768px) {
  .blog-link {
    margin: 1rem auto 0;
    display: flex;
    justify-content: center;
    padding: 0.2rem 0.5rem;
  }
}
*/

/* Read More Link Styling */
.blog-card .read-more {
  font-size: 0.875rem;
  font-weight: 600;
  color: #d4af37;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.3s ease;
}

.blog-card:hover .read-more {
  gap: 0.75rem;
}

.blog-card .read-more i {
  transition: transform 0.3s ease;
  font-size: 0.75rem;
}

.blog-card:hover .read-more i {
  transform: translateX(4px);
}

/* Override all blog-link styles */
.blog-card .blog-link {
  text-decoration: none !important;
  margin-top: auto;
  display: block !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  color: inherit !important;
  width: auto !important;
  align-self: auto !important;
}

.blog-card .blog-link:hover {
  background: none !important;
  transform: none !important;
}
