/**
 * Blog Styles
 * Integrates with main site theme (Green template)
 */

/* Blog Hero Section */
.blog-hero {
  padding: 60px 0 40px 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.blog-hero .section-title h1 {
  font-size: 36px;
  font-weight: 700;
  color: #2c4d3e;
  margin-bottom: 15px;
}

.blog-hero .section-title p {
  font-size: 18px;
  color: #666;
}

/* Blog Filters */
.blog-filters {
  padding: 30px 0;
  background: #fff;
  border-bottom: 1px solid #eee;
}

/* Blog Posts Section */
.blog-posts {
  padding: 60px 0;
}

/* Blog Card */
.blog-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.blog-card-image {
  position: relative;
  overflow: hidden;
  height: 250px;
  background: linear-gradient(135deg, rgba(244, 247, 245, 0.95), rgba(226, 237, 231, 0.95)),
    url('/assets/img/blog-placeholder.jpg') center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card-image-link {
  display: block;
  width: 100%;
  height: 100%;
}

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

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

.blog-card-image .blog-card-category {
  position: absolute;
  top: 16px;
  left: 16px;
  background: #59b36f;
  color: #fff;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  z-index: 2;
  margin: 0;
  pointer-events: none;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.blog-category-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #5cb874;
  color: #fff;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 1;
}

.blog-card-content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 13px;
  color: #999;
}

.blog-card-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.blog-card-meta i {
  font-size: 16px;
}

.blog-card-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
}

.blog-card-title a {
  color: #2c4d3e;
  transition: color 0.3s ease;
  text-decoration: none;
}

.blog-card-title a:hover {
  color: #5cb874;
}

.blog-card-excerpt {
  color: #666;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.blog-card-link {
  color: #5cb874;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.3s ease;
  margin-top: auto;
}

.blog-card-link:hover {
  gap: 10px;
}

/* Blog Skeleton Loading */
.blog-skeleton {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.blog-skeleton-image {
  width: 100%;
  height: 250px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

.blog-skeleton-content {
  padding: 25px;
}

.blog-skeleton-category,
.blog-skeleton-title,
.blog-skeleton-excerpt,
.blog-skeleton-meta {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
  margin-bottom: 12px;
}

.blog-skeleton-category {
  width: 80px;
  height: 20px;
}

.blog-skeleton-title {
  height: 24px;
  width: 90%;
  margin-bottom: 8px;
}

.blog-skeleton-title:last-of-type {
  width: 60%;
}

.blog-skeleton-excerpt {
  height: 16px;
  width: 100%;
  margin-bottom: 8px;
}

.blog-skeleton-excerpt:nth-of-type(4) {
  width: 85%;
}

.blog-skeleton-excerpt:last-of-type {
  width: 70%;
}

.blog-skeleton-meta {
  width: 150px;
  height: 14px;
  margin-top: 15px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  padding-left: 0;
  gap: 6px;
  margin-top: 40px;
}

.pagination .page-link {
  color: #5cb874;
  border: 1px solid #ddd;
  margin: 0 3px;
  border-radius: 5px;
  padding: 10px 15px;
  transition: all 0.3s ease;
}

.pagination .page-link:hover {
  background: #5cb874;
  color: #fff;
  border-color: #5cb874;
}

.pagination .page-item.active .page-link {
  background: #5cb874;
  border-color: #5cb874;
  color: #fff;
}

.pagination .page-item.disabled .page-link {
  color: #ccc;
  cursor: not-allowed;
}

/* Blog Categories Section */
.blog-categories {
  padding: 60px 0;
  background: #f8f9fa;
}

.category-box {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
}

.category-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  background: #5cb874;
  color: #fff;
}

.category-box i {
  font-size: 48px;
  color: #5cb874;
  margin-bottom: 15px;
  transition: color 0.3s ease;
}

.category-box:hover i {
  color: #fff;
}

.category-box h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

.category-box:hover h4 {
  color: #fff;
}

.category-box p {
  margin: 0;
  color: #999;
  transition: color 0.3s ease;
}

.category-box:hover p {
  color: rgba(255, 255, 255, 0.9);
}

/* Newsletter Signup */
.newsletter-signup {
  padding: 60px 0;
}

.newsletter-signup h3 {
  font-size: 28px;
  font-weight: 700;
  color: #2c4d3e;
  margin-bottom: 15px;
}

.newsletter-signup p {
  font-size: 16px;
  color: #666;
  margin-bottom: 30px;
}

.newsletter-form input {
  height: 50px;
  border: 2px solid #e0e0e0;
  border-radius: 5px;
  transition: border-color 0.3s ease;
}

.newsletter-form input:focus {
  border-color: #5cb874;
  outline: none;
}

/* Single Blog Post Styles */
.blog-post-content {
  padding: 60px 0;
}

.blog-post {
  background: #fff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.blog-post-image {
  margin-bottom: 30px;
  border-radius: 8px;
  overflow: hidden;
}

.blog-post-image img {
  width: 100%;
  height: auto;
}

.blog-post-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.blog-post-title {
  font-size: 36px;
  font-weight: 700;
  color: #2c4d3e;
  line-height: 1.3;
  margin-bottom: 20px;
}

.blog-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 15px;
  font-size: 14px;
  color: #666;
}

.blog-post-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.blog-post-meta i {
  color: #5cb874;
  font-size: 18px;
}

.blog-post-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-tag {
  background: #f0f9f4;
  color: #5cb874;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.category-tag:hover {
  background: #5cb874;
  color: #fff;
}

/* Blog Post Body Content */
.blog-post-body {
  font-size: 17px;
  line-height: 1.8;
  color: #444;
}

.blog-post-body h2 {
  font-size: 28px;
  font-weight: 700;
  color: #2c4d3e;
  margin-top: 40px;
  margin-bottom: 20px;
}

.blog-post-body h3 {
  font-size: 22px;
  font-weight: 700;
  color: #2c4d3e;
  margin-top: 30px;
  margin-bottom: 15px;
}

.blog-post-body h4 {
  font-size: 18px;
  font-weight: 700;
  color: #2c4d3e;
  margin-top: 25px;
  margin-bottom: 12px;
}

.blog-post-body p {
  margin-bottom: 20px;
}

.blog-post-body ul,
.blog-post-body ol {
  margin-bottom: 25px;
  padding-left: 25px;
}

.blog-post-body li {
  margin-bottom: 10px;
}

.blog-post-body strong {
  font-weight: 700;
  color: #2c4d3e;
}

.blog-post-body a {
  color: #5cb874;
  text-decoration: underline;
}

.blog-post-body a:hover {
  color: #2c4d3e;
}

.blog-post-body code {
  background: #f4f4f4;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #c7254e;
}

.blog-post-body pre {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 20px;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 25px;
}

.blog-post-body pre code {
  background: transparent;
  color: #ecf0f1;
  padding: 0;
}

.blog-post-body blockquote {
  border-left: 4px solid #5cb874;
  padding-left: 20px;
  margin: 30px 0;
  font-style: italic;
  color: #666;
}

.blog-post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 25px 0;
}

/* Tags */
.blog-post-tags {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}

.blog-post-tags h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #2c4d3e;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  background: #f8f9fa;
  color: #666;
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 13px;
}

/* Social Sharing */
.blog-post-share {
  margin-top: 40px;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 8px;
}

.blog-post-share h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #2c4d3e;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 5px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  color: #fff;
}

.share-btn.facebook {
  background: #1877f2;
}

.share-btn.twitter {
  background: #1da1f2;
}

.share-btn.linkedin {
  background: #0a66c2;
}

.share-btn.email {
  background: #666;
}

/* Author Bio */
.blog-author-bio {
  margin-top: 50px;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 8px;
  display: flex;
  gap: 25px;
  align-items: flex-start;
}

.author-image {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
}

.author-image img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.author-info h4 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #2c4d3e;
}

.author-info p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
}

.author-social {
  display: flex;
  gap: 10px;
}

.author-social a {
  width: 35px;
  height: 35px;
  background: #5cb874;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 18px;
  transition: all 0.3s ease;
}

.author-social a:hover {
  background: #2c4d3e;
  transform: scale(1.1);
}

/* Blog Post CTA */
.blog-post-cta {
  margin-top: 50px;
  padding: 40px;
  background: linear-gradient(135deg, #5cb874 0%, #2c4d3e 100%);
  border-radius: 8px;
  text-align: center;
  color: #fff;
}

.blog-post-cta h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #fff;
}

.blog-post-cta p {
  font-size: 16px;
  margin-bottom: 25px;
  opacity: 0.95;
}

/* Sidebar */
.blog-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-widget,
.blog-sidebar .widget {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

.sidebar-widget h3,
.blog-sidebar .widget-title {
  font-size: 20px;
  font-weight: 700;
  color: #2c4d3e;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #5cb874;
}

.blog-sidebar .widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-sidebar .widget li {
  border-bottom: 1px solid #f0f0f0;
  padding: 10px 0;
}

.blog-sidebar .widget li:last-child {
  border-bottom: none;
}

.blog-sidebar .widget li:empty {
  display: none;
}

.blog-sidebar .widget a {
  color: #2c4d3e;
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-sidebar .widget a:hover {
  color: #5cb874;
}

.blog-sidebar .widget_recent_entries li {
  display: block;
  font-weight: 600;
  line-height: 1.4;
}

.blog-sidebar .widget_recent_entries li span {
  display: block;
  font-size: 13px;
  color: #999;
  font-weight: 400;
  margin-top: 6px;
}

/* Search Widget */
.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 12px 45px 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 5px;
  transition: border-color 0.3s ease;
}

.search-box input:focus {
  border-color: #5cb874;
  outline: none;
}

.btn-search {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: #5cb874;
  color: #fff;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-search:hover {
  background: #2c4d3e;
}

/* Categories Widget */
.categories-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.categories-widget li {
  border-bottom: 1px solid #f0f0f0;
  padding: 10px 0;
}

.categories-widget li:last-child {
  border-bottom: none;
}

.categories-widget a {
  color: #666;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.3s ease;
}

.categories-widget a:hover {
  color: #5cb874;
}

.categories-widget span {
  background: #f8f9fa;
  color: #666;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
}

/* Recent Posts Widget */
.recent-post-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.recent-post-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.recent-post-image {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 5px;
  overflow: hidden;
}

.recent-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-post-content h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.recent-post-content h4 a {
  color: #2c4d3e;
  text-decoration: none;
  transition: color 0.3s ease;
}

.recent-post-content h4 a:hover {
  color: #5cb874;
}

.recent-post-content time {
  font-size: 13px;
  color: #999;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Newsletter Widget */
.newsletter-widget p {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

.newsletter-widget input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 5px;
  margin-bottom: 10px;
  transition: border-color 0.3s ease;
}

.newsletter-widget input:focus {
  border-color: #5cb874;
  outline: none;
}

/* Contact Widget */
.contact-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-widget li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  color: #666;
  font-size: 14px;
}

.contact-widget li i {
  color: #5cb874;
  font-size: 20px;
  flex-shrink: 0;
}

.contact-widget a {
  color: #666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-widget a:hover {
  color: #5cb874;
}

/* Responsive Styles */
@media (max-width: 991px) {
  .blog-sidebar {
    position: static;
    margin-top: 50px;
  }

  .blog-post {
    padding: 30px 20px;
  }

  .blog-post-title {
    font-size: 28px;
  }

  .blog-author-bio {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .author-social {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .blog-post-meta {
    flex-direction: column;
    gap: 10px;
  }

  .share-buttons {
    flex-direction: column;
  }

  .share-btn {
    width: 100%;
    justify-content: center;
  }

  .blog-hero .section-title h1 {
    font-size: 28px;
  }

  .blog-card-title {
    font-size: 18px;
  }
}

@media (max-width: 576px) {
  .blog-post-body {
    font-size: 16px;
  }

  .blog-post-title {
    font-size: 24px;
  }

  .blog-post-cta {
    padding: 30px 20px;
  }

  .blog-post-cta h3 {
    font-size: 22px;
  }

  .sidebar-widget {
    padding: 20px;
  }
}
