
:root {
  --dark-bg: #121212;
  --dark-secondary: #1e1e1e;
  --dark-tertiary: #2d2d2d;
  --green-primary: #4caf50;
  --green-light: #6fbf73;
  --green-dark: #3b8c3e;
  --purple-accent: #9c27b0;
  --purple-light: #bb48cd;
  --purple-dark: #7b1fa2;
  --text-primary: #f5f5f5;
  --text-secondary: #b3b3b3;
  --text-muted: #8a8a8a;
  --card-bg: #1e1e1e;
  --border-color: #333333;
  --shadow-color: rgba(0, 0, 0, 0.3);
}

body {
  background-color: var(--dark-bg);
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  line-height: 1.8;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
}

a {
  color: var(--green-light);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--purple-light);
  text-decoration: none;
}

.main-color {
  color: var(--green-primary);
}

.section-padding {
  padding: 80px 0;
}

.pt-80 {
  padding-top: 80px;
}

/* Loader */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--dark-bg);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loading-icon {
  width: 60px;
  height: 60px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--green-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Cursor */
.cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(76, 175, 80, 0.5);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: all 0.1s ease;
  display: none;
}

@media (min-width: 992px) {
  .cursor {
    display: block;
  }
}

/* Progress Scroll Button */
.progress-wrap {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 46px;
  height: 46px;
  background-color: var(--dark-tertiary);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--shadow-color);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  transform: translateY(20px);
  transition: all 0.3s ease;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.progress-wrap.active-progress {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.progress-wrap::after {
  content: '↑';
  position: absolute;
  color: var(--green-primary);
  font-size: 20px;
  font-weight: bold;
}

.progress-wrap svg.progress-circle path {
  fill: none;
  stroke: var(--purple-accent);
  stroke-width: 4;
  transition: all 0.3s ease;
}

/* Blog Header Section */
.blog-header {
  text-align: center;
  position: relative;
}

.blog-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(156, 39, 176, 0.1));
  z-index: -1;
}

.main-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.header-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

/* Blog Content Section */
.blog-content {
  position: relative;
}

/* Blog Card */
.blog-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px var(--shadow-color);
  margin-bottom: 30px;
  transition: all 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px var(--shadow-color);
}

.blog-image {
  position: relative;
  overflow: hidden;
  height: 220px;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
}

.blog-card:hover .blog-image img {
  transform: scale(1.05);
}

.blog-category {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: var(--green-primary);
  color: #fff;
  padding: 5px 15px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 500;
  z-index: 1;
}

.blog-details {
  padding: 20px;
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.blog-date, .blog-views {
  display: flex;
  align-items: center;
}

.blog-date i, .blog-views i {
  margin-right: 5px;
  color: var(--purple-accent);
}

.blog-title {
  font-size: 1.25rem;
  margin-bottom: 15px;
  line-height: 1.4;
}

.blog-title a {
  color: var(--text-primary);
}

.blog-title a:hover {
  color: var(--green-primary);
}

.blog-excerpt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
  line-height: 1.6;
}

.read-more {
  display: inline-flex;
  align-items: center;
  color: var(--green-primary);
  font-weight: 500;
  font-size: 0.9rem;
}

.read-more i {
  margin-left: 5px;
  transition: all 0.3s ease;
}

.read-more:hover i {
  transform: translateX(5px);
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 50px;
}

.pagination {
  display: flex;
  padding: 0;
  margin: 0;
  list-style: none;
}

.pagination li {
  margin: 0 5px;
}

.pagination li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--dark-tertiary);
  color: var(--text-primary);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.pagination li.active a {
  background-color: var(--green-primary);
  color: #fff;
}

.pagination li a:hover:not(.active) {
  background-color: var(--purple-dark);
}

.pagination-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text-muted);
}

/* Sidebar Styles */
.blog-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px var(--shadow-color);
}

.widget-title {
  font-size: 1.25rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--green-primary);
  position: relative;
  display: inline-block;
}

/* Search Widget */
.search-input {
  position: relative;
}

.search-input input {
  width: 100%;
  padding: 12px 45px 12px 15px;
  background-color: var(--dark-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.search-input input:focus {
  outline: none;
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.search-input button {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--green-primary);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-input button:hover {
  color: var(--purple-accent);
}

/* Categories Widget */
.categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.categories-list li {
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  transition: all 0.3s ease;
}

.categories-list li:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.categories-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.categories-list li a:hover, .categories-list li.active a {
  color: var(--green-primary);
  padding-left: 5px;
}

.post-count {
  background-color: var(--dark-tertiary);
  color: var(--text-muted);
  border-radius: 30px;
  padding: 2px 10px;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.categories-list li a:hover .post-count, .categories-list li.active a .post-count {
  background-color: var(--green-primary);
  color: #fff;
}

/* Recent Posts Widget */
.recent-post-item {
  display: flex;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.recent-post-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.recent-post-image {
  width: 80px;
  height: 60px;
  margin-right: 15px;
  overflow: hidden;
  border-radius: 5px;
}

.recent-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.recent-post-item:hover .recent-post-image img {
  transform: scale(1.05);
}

.recent-post-info {
  flex: 1;
}

.recent-post-info h5 {
  font-size: 0.95rem;
  margin-bottom: 5px;
  line-height: 1.4;
}

.recent-post-info h5 a {
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.recent-post-info h5 a:hover {
  color: var(--green-primary);
}

.recent-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Tags Widget */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-link {
  display: inline-block;
  padding: 6px 15px;
  background-color: var(--dark-tertiary);
  color: var(--text-secondary);
  border-radius: 30px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.tag-link:hover, .tag-link.active {
  background-color: var(--green-primary);
  color: #fff;
}

/* No Posts/Content Styles */
.no-posts, .no-recent-posts {
  padding: 20px;
  background-color: var(--dark-tertiary);
  border-radius: 8px;
  text-align: center;
  color: var(--text-muted);
}

/* Blog Detail Styles */
.blog-detail-header {
  padding: 40px 0;
  text-align: center;
}

.blog-header-content {
  max-width: 800px;
  margin: 0 auto;
}

.blog-detail-header .blog-category {
  position: relative;
  display: inline-block;
  top: initial;
  left: initial;
  margin-bottom: 20px;
}

.blog-detail-header .blog-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.blog-detail-header .blog-meta {
  justify-content: center;
  gap: 20px;
}

.blog-featured-image {
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow-color);
}

.blog-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.blog-detail-wrapper .blog-content {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 40px;
}

.blog-detail-wrapper .blog-content p {
  margin-bottom: 20px;
}

.blog-detail-wrapper .blog-content h2,
.blog-detail-wrapper .blog-content h3,
.blog-detail-wrapper .blog-content h4 {
  margin-top: 30px;
  margin-bottom: 15px;
}

.blog-detail-wrapper .blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
}

.blog-detail-wrapper .blog-content ul,
.blog-detail-wrapper .blog-content ol {
  margin-bottom: 20px;
  padding-left: 20px;
}

.blog-detail-wrapper .blog-content li {
  margin-bottom: 10px;
}

.blog-detail-wrapper .blog-content blockquote {
  padding: 20px 30px;
  margin: 30px 0;
  background-color: var(--dark-tertiary);
  border-left: 4px solid var(--green-primary);
  font-style: italic;
  color: var(--text-secondary);
}

.blog-detail-wrapper .blog-content pre {
  background-color: var(--dark-tertiary);
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
}

.blog-detail-wrapper .blog-content code {
  font-family: 'Courier New', monospace;
  background-color: var(--dark-tertiary);
  padding: 2px 5px;
  border-radius: 4px;
}

/* Blog Tags */
.blog-tags {
  margin-bottom: 30px;
}

.blog-tags h4 {
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.blog-tags .tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Blog Share */
.blog-share {
  margin-bottom: 40px;
}

.blog-share h4 {
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-button {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  border-radius: 30px;
  font-size: 0.9rem;
  color: #fff;
  transition: all 0.3s ease;
}

.share-button i {
  margin-right: 5px;
}

.share-button.facebook {
  background-color: #3b5998;
}

.share-button.twitter {
  background-color: #1da1f2;
}

.share-button.linkedin {
  background-color: #0077b5;
}

.share-button.whatsapp {
  background-color: #25d366;
}

.share-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  color: #fff;
}

/* Related Posts */
.related-posts {
  margin-top: 50px;
}

.section-title {
  margin-bottom: 30px;
  position: relative;
  font-size: 1.5rem;
  padding-bottom: 10px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--green-primary);
}

.related-post-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  height: 100%;
  box-shadow: 0 5px 15px var(--shadow-color);
  transition: all 0.3s ease;
}

.related-post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px var(--shadow-color);
}

.related-post-image {
  height: 180px;
  overflow: hidden;
}

.related-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.related-post-card:hover .related-post-image img {
  transform: scale(1.05);
}

.related-post-content {
  padding: 15px;
}

.related-post-date {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.related-post-title {
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 0;
}

.related-post-title a {
  color: var(--text-primary);
}

.related-post-title a:hover {
  color: var(--green-primary);
}

/* Search Results Page */
.search-results-header {
  text-align: center;
  margin-bottom: 40px;
}

.search-query {
  color: var(--green-primary);
}

.search-count {
  margin-top: 10px;
  color: var(--text-secondary);
}

/* Responsive Styles */
@media (max-width: 991px) {
  .blog-sidebar {
    margin-top: 50px;
    position: static;
  }
  
  .main-title {
    font-size: 2rem;
  }
  
  .blog-detail-header .blog-title {
    font-size: 2rem;
  }
}

@media (max-width: 767px) {
  .section-padding {
    padding: 50px 0;
  }
  
  .main-title {
    font-size: 1.8rem;
  }
  
  .blog-detail-header .blog-title {
    font-size: 1.8rem;
  }
  
  .share-buttons {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .share-button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 575px) {
  .blog-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .blog-date {
    margin-bottom: 5px;
  }
  
  .blog-detail-header .blog-meta {
    flex-direction: row;
  }
  
  .pagination li a {
    width: 35px;
    height: 35px;
  }
}
