/**
 * Dharma Blog Styles
 * Styles for blog list and detail views matching site aesthetics
 */

/* ===================================
   Blog Wrapper & Container
   =================================== */

.dharma-blog-wrapper {
  background-color: #f9f9f9;
  padding: 4rem 0;
  min-height: 60vh;
}

.dharma-blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===================================
   Archive Header
   =================================== */

.dharma-blog-archive-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #e3d9d9;
}

.dharma-blog-archive-title {
  font-size: 2.5rem;
  color: rgb(25, 69, 96);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.dharma-blog-archive-description {
  font-size: 1.1rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===================================
   Blog Grid
   =================================== */

.dharma-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .dharma-blog-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ===================================
   Blog Card
   =================================== */

.dharma-blog-card {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.dharma-blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.dharma-blog-card-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
  position: relative;
}

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

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

.dharma-blog-card-content {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.dharma-blog-card-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.dharma-blog-category {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: linear-gradient(180deg, #FFB347 0%, #FF8C00 100%);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.dharma-blog-category:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 140, 0, 0.3);
  color: #ffffff;
}

.dharma-blog-card-title {
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
  line-height: 1.3;
}

.dharma-blog-card-title a {
  color: rgb(25, 69, 96);
  text-decoration: none;
  transition: color 0.2s ease;
}

.dharma-blog-card-title a:hover {
  color: #FF8C00;
}

.dharma-blog-card-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #666;
}

.dharma-blog-date,
.dharma-blog-author {
  display: inline-block;
}

.dharma-blog-card-excerpt {
  color: #555;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.dharma-blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #FF8C00;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  margin-top: auto;
}

.dharma-blog-read-more:hover {
  color: #FFB347;
  transform: translateX(3px);
}

/* ===================================
   Single Post
   =================================== */

.dharma-single-post-wrapper {
  background-color: #ffffff;
  padding: 0;
}

.dharma-single-post-container {
  max-width: 900px;
  padding: 3rem 2rem;
}

.dharma-single-post {
  background: #ffffff;
}

.dharma-single-post-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.dharma-single-post-categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.dharma-single-post-title {
  font-size: 2.75rem;
  color: rgb(25, 69, 96);
  margin: 0 0 1.5rem 0;
  line-height: 1.2;
  font-weight: 700;
}

@media (max-width: 768px) {
  .dharma-single-post-title {
    font-size: 2rem;
  }
}

.dharma-single-post-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  color: #666;
  font-size: 1rem;
  margin-bottom: 2rem;
}

.dharma-blog-separator {
  color: #FF8C00;
}

.dharma-single-post-featured-image {
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

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

.dharma-single-post-content {
  color: #333;
  font-size: 1.125rem;
  line-height: 1.8;
  margin-bottom: 3rem;
}

.dharma-single-post-content h2,
.dharma-single-post-content h3,
.dharma-single-post-content h4 {
  color: rgb(25, 69, 96);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.dharma-single-post-content h2 {
  font-size: 2rem;
  border-bottom: 2px solid #FFB347;
  padding-bottom: 0.5rem;
}

.dharma-single-post-content h3 {
  font-size: 1.5rem;
}

.dharma-single-post-content h4 {
  font-size: 1.25rem;
}

.dharma-single-post-content p {
  margin-bottom: 1.5rem;
  padding: 0;
}

.dharma-single-post-content a {
  color: #FF8C00;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.dharma-single-post-content a:hover {
  color: #FFB347;
}

.dharma-single-post-content ul,
.dharma-single-post-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.dharma-single-post-content li {
  margin-bottom: 0.75rem;
}

.dharma-single-post-content blockquote {
  border-left: 4px solid #FFB347;
  padding: 1.5rem;
  margin: 2rem 0;
  background: #f9f9f9;
  font-style: italic;
  color: #555;
}

.dharma-single-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
}

/* ===================================
   Post Footer (Tags)
   =================================== */

.dharma-single-post-footer {
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid #e3d9d9;
}

.dharma-single-post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.dharma-tags-label {
  font-weight: 600;
  color: rgb(25, 69, 96);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.dharma-tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: transparent;
  color: #FF8C00;
  font-size: 0.875rem;
  border: 2px solid #FFB347;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.dharma-tag:hover {
  background: linear-gradient(180deg, #FFB347 0%, #FF8C00 100%);
  color: #ffffff;
  border-color: #FF8C00;
}

/* ===================================
   Post Navigation
   =================================== */

.dharma-post-navigation {
  margin: 3rem 0;
  padding: 2rem 0;
  border-top: 2px solid #e3d9d9;
  border-bottom: 2px solid #e3d9d9;
}

.dharma-post-nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .dharma-post-nav-links {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.dharma-post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dharma-post-nav-prev {
  text-align: left;
}

.dharma-post-nav-next {
  text-align: right;
}

.dharma-post-nav-label {
  font-size: 0.85rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.dharma-post-nav-title {
  color: rgb(25, 69, 96);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.dharma-post-nav-title:hover {
  color: #FF8C00;
}

/* ===================================
   Related Posts
   =================================== */

.dharma-related-posts {
  margin: 3rem 0;
  padding: 2.5rem;
  background: #f9f9f9;
  border-radius: 8px;
}

.dharma-related-posts-title {
  font-size: 1.75rem;
  color: rgb(25, 69, 96);
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  font-weight: 700;
}

.dharma-related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .dharma-related-posts-grid {
    grid-template-columns: 1fr;
  }
}

.dharma-related-post-card {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.dharma-related-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.dharma-related-post-image {
  display: block;
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.dharma-related-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.dharma-related-post-card:hover .dharma-related-post-image img {
  transform: scale(1.05);
}

.dharma-related-post-content {
  padding: 1.25rem;
}

.dharma-related-post-title {
  font-size: 1.1rem;
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
}

.dharma-related-post-title a {
  color: rgb(25, 69, 96);
  text-decoration: none;
  transition: color 0.2s ease;
}

.dharma-related-post-title a:hover {
  color: #FF8C00;
}

.dharma-related-post-date {
  font-size: 0.85rem;
  color: #666;
}

/* ===================================
   Pagination
   =================================== */

.dharma-blog-pagination,
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.dharma-blog-pagination .page-numbers,
.pagination .page-numbers {
  display: inline-block;
  padding: 0.6rem 1rem;
  background: #ffffff;
  color: rgb(25, 69, 96);
  text-decoration: none;
  border: 2px solid #e3d9d9;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.dharma-blog-pagination .page-numbers:hover,
.pagination .page-numbers:hover {
  background: #f9f9f9;
  border-color: #FFB347;
  color: #FF8C00;
}

.dharma-blog-pagination .page-numbers.current,
.pagination .page-numbers.current {
  background: linear-gradient(180deg, #FFB347 0%, #FF8C00 100%);
  color: #ffffff;
  border-color: #FF8C00;
}

.dharma-blog-pagination .page-numbers.dots,
.pagination .page-numbers.dots {
  border: none;
  background: transparent;
  pointer-events: none;
}

/* ===================================
   No Posts Found
   =================================== */

.dharma-blog-no-posts {
  text-align: center;
  padding: 4rem 2rem;
}

.dharma-blog-no-posts p {
  font-size: 1.25rem;
  color: #666;
  margin-bottom: 2rem;
}

/* ===================================
   Page Links (Multi-page posts)
   =================================== */

.dharma-page-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f9f9f9;
  border-radius: 8px;
}

.dharma-page-links a {
  padding: 0.5rem 0.85rem;
  background: #ffffff;
  color: rgb(25, 69, 96);
  text-decoration: none;
  border: 2px solid #e3d9d9;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.dharma-page-links a:hover {
  background: #FFB347;
  color: #ffffff;
  border-color: #FF8C00;
}

.dharma-page-links .post-page-numbers.current {
  padding: 0.5rem 0.85rem;
  background: linear-gradient(180deg, #FFB347 0%, #FF8C00 100%);
  color: #ffffff;
  border-radius: 8px;
  font-weight: 600;
}

/* ===================================
   Related Resources
   =================================== */

.dharma-related-resources {
  margin: 3rem 0;
  padding: 2.5rem;
  background: rgb(25, 69, 96);
  border-radius: 8px;
}

.dharma-related-resources .dharma-related-posts-title {
  color: #ffffff;
}

.dharma-related-resources .dharma-related-post-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dharma-related-resources .dharma-related-post-card:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #FFB347;
}

.dharma-related-resources .dharma-related-post-title {
  color: rgba(255, 255, 255, 0.9);
}

.dharma-related-resources .dharma-related-post-title a {
  color: rgba(255, 255, 255, 0.9);
}

.dharma-related-resources .dharma-related-post-title a:hover {
  color: #FFB347;
}

.dharma-related-resource-author {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.5rem;
}

.dharma-related-resource-excerpt {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0.75rem;
  line-height: 1.5;
}

/* ===================================
   Responsive Adjustments
   =================================== */

@media (max-width: 768px) {
  .dharma-blog-wrapper {
    padding: 2rem 0;
  }

  .dharma-blog-container {
    padding: 0 1rem;
  }

  .dharma-blog-archive-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
  }

  .dharma-blog-archive-title {
    font-size: 2rem;
  }

  .dharma-single-post-container {
    padding: 2rem 1rem;
  }

  .dharma-single-post-content {
    font-size: 1rem;
  }
}
