/* Fix: Always show article content and body in blog view */
.article-content, .article-body {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
/* Ensure article view and content are always visible and readable */
.article-view {
  display: none;
  flex-direction: column;
  background: var(--background, #fff);
  color: var(--text, #222);
  min-height: 300px;
  padding: 24px 0;
}
.article-content, .article-body {
  display: block !important;
  color: inherit;
  background: inherit;
  min-height: 200px;
  font-size: 1.1em;
}
.article-body h1, .article-body h2, .article-body h3, .article-body h4, .article-body h5, .article-body h6 {
  color: inherit;
}
.article-body p, .article-body ul, .article-body ol {
  color: inherit;
}
/* blog.css - Styles for blog-related elements */

/* Ensure blog elements are visible by default */
#blog-list {
  display: flex;
}

/* Blog List Styles */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
  visibility: visible;
  opacity: 1;
}

.blog-post-item {
  background: var(--eerie-black-2, #232323);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  padding: 24px 20px 20px 20px;
  transition: box-shadow 0.2s;
  border: 1px solid var(--jet, #383838);
  position: relative;
  display: block;
  visibility: visible;
}

.blog-post-item:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.95em;
  color: var(--light-gray, #d6d6d6);
  margin-bottom: 8px;
}

.post-date {
  font-weight: 500;
  color: var(--orange-yellow-crayola, #ffd166);
}

.post-author {
  font-style: italic;
  color: var(--light-gray, #d6d6d6);
}

.post-title {
  font-size: 1.4em;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--white-2, #fff);
}

.post-description {
  color: var(--light-gray, #d6d6d6);
  margin-bottom: 10px;
}

.post-tags {
  margin-bottom: 10px;
}

.tag {
  display: inline-block;
  background: var(--orange-yellow-crayola, #ffd166);
  color: #232323;
  border-radius: 6px;
  padding: 2px 10px;
  font-size: 0.85em;
  margin-right: 6px;
  margin-bottom: 2px;
  font-weight: 500;
}

.read-more-btn {
  margin-top: 8px;
  background: var(--orange-yellow-crayola, #ffd166);
  color: #232323;
  border-radius: 6px;
  padding: 7px 18px;
  font-size: 1em;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.read-more-btn:hover {
  background: #ffb700;
  color: #fff;
}

/* Article View Styles */
.article-view {
  background: var(--eerie-black-2, #232323);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  padding: 28px 24px 24px 24px;
  border: 1px solid var(--jet, #383838);
  margin-top: 24px;
  /* Ensure visibility */
  position: relative;
  z-index: 1;
  width: 100%;
  opacity: 1;
  visibility: visible;
}

#back-to-list {
  margin-bottom: 18px;
  background: none;
  color: var(--orange-yellow-crayola, #ffd166);
  font-size: 1em;
  font-weight: 500;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

#back-to-list:hover {
  color: #ffb700;
}

.article-header {
  margin-bottom: 18px;
}

.article-title {
  font-size: 2em;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--white-2, #fff);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1em;
  color: var(--light-gray, #d6d6d6);
  margin-bottom: 8px;
}

.article-date {
  font-weight: 500;
  color: var(--orange-yellow-crayola, #ffd166);
}

.article-author {
  font-style: italic;
  color: var(--light-gray, #d6d6d6);
}

.article-tags {
  margin-bottom: 10px;
}

.article-tags .tag {
  background: var(--orange-yellow-crayola, #ffd166);
  color: #232323;
}

.article-body {
  color: var(--light-gray, #d6d6d6);
  line-height: 1.7;
  font-size: 1.08em;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
  color: var(--orange-yellow-crayola, #ffd166);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.article-body pre,
.article-body code {
  background: #181818;
  color: #ffd166;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.98em;
  font-family: 'Fira Mono', 'Consolas', monospace;
}

.article-body pre {
  padding: 12px;
  overflow-x: auto;
  margin-bottom: 1em;
}

/* Loading Indicator */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 40px 0;
  color: var(--orange-yellow-crayola, #ffd166);
  font-size: 1.2em;
}

.loading-indicator i {
  font-size: 2em;
}

/* No Posts Message */
.no-posts {
  text-align: center;
  margin: 40px 0;
  color: var(--light-gray, #d6d6d6);
}

.no-posts h3 {
  color: var(--orange-yellow-crayola, #ffd166);
  margin-bottom: 8px;
}

/* Light Theme Support */
body.light-theme .blog-post-item {
  background: var(--light-eerie-black-2, #f5f5f5);
  border: 1px solid var(--light-jet, #d0d0d0);
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

body.light-theme .blog-post-item:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

body.light-theme .post-meta,
body.light-theme .post-author,
body.light-theme .post-description {
  color: var(--light-text-color, #333);
}

body.light-theme .post-date {
  color: var(--dark-orange-yellow-crayola, #e6b800);
}

body.light-theme .post-title {
  color: var(--light-text-color, #333);
}

body.light-theme .tag {
  background: var(--dark-orange-yellow-crayola, #e6b800);
  color: #ffffff;
}

body.light-theme .read-more-btn {
  background: var(--dark-orange-yellow-crayola, #e6b800);
  color: #ffffff;
}

body.light-theme .read-more-btn:hover {
  background: #cc9900;
}

body.light-theme .article-view {
  background: var(--light-eerie-black-2, #f5f5f5);
  border: 1px solid var(--light-jet, #d0d0d0);
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

body.light-theme #back-to-list {
  color: var(--dark-orange-yellow-crayola, #e6b800);
}

body.light-theme #back-to-list:hover {
  color: #cc9900;
}

body.light-theme .article-title {
  color: var(--light-text-color, #333);
}

body.light-theme .article-meta,
body.light-theme .article-author {
  color: var(--light-text-color, #333);
}

body.light-theme .article-date {
  color: var(--dark-orange-yellow-crayola, #e6b800);
}

body.light-theme .article-body {
  color: var(--light-text-color, #333);
}

body.light-theme .article-body h1,
body.light-theme .article-body h2,
body.light-theme .article-body h3,
body.light-theme .article-body h4 {
  color: var(--dark-orange-yellow-crayola, #e6b800);
}

body.light-theme .article-body pre,
body.light-theme .article-body code {
  background: #f0f0f0;
  color: #e6b800;
}

body.light-theme .loading-indicator {
  color: var(--dark-orange-yellow-crayola, #e6b800);
}

body.light-theme .no-posts {
  color: var(--light-text-color, #333);
}

body.light-theme .no-posts h3 {
  color: var(--dark-orange-yellow-crayola, #e6b800);
}

/* Responsive Styles */
@media (max-width: 700px) {
  .blog-list, .article-view {
    padding: 10px 2vw;
  }
  .blog-post-item, .article-view {
    padding: 14px 6px 12px 6px;
  }
  .article-title {
    font-size: 1.3em;
  }
  
  }

/* Responsive Styles - for blog related items when screen width is more than 576px */
@media (min-width: 576px) {
  .blog-post-item {
    max-width: 450px;
    width: 100%;
    padding: 20px;
  }
}

/* Ensure blog post items don't overflow on medium screens */
@media (min-width: 576px) and (max-width: 1250px) {
  .blog-post-item {
    max-width: calc(100% - 40px);
    margin: 0 auto;
  }
}

/* Ensure article content don't overflow on medium screens */
@media (min-width: 580px) and (max-width: 1250px) {
  .article-content {
    max-width: calc(100% - 50px);
    margin: 0 auto;
  }
}

/* Remove max-width restriction for blog-post-item on large screens */
@media (min-width: 1251px) {
  .blog-post-item {
    max-width: none;
  }
}
