/* Blog Page Specific Styles */

/* Hero Section Enhancements */
.hero-page {
  padding: 11.75rem 0 2rem 0;
}

/* Blog Banner Section - Remove extra spacing */
.section.banner {
  padding-bottom: 0;
}

.max-width-lg {
  max-width: 700px;
  margin: 0 auto;
}

/* Remove extra height on mobile for blog banner */
@media (max-width: 768px) {
  .section.banner {
    height: 100vh !important;
    min-height: 100vh !important;
    display: flex;
    align-items: center;
  }
  
  .section.banner .container-default {
    width: 100%;
  }
  
  .section.banner .inner-container {
    text-align: center;
  }
  
  .section.banner h1 {
    text-align: center;
  }
  
  .section.banner .b1-body-regular {
    text-align: center !important;
  }
}

/* Blog Controls */
.blog-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 2rem;
}

.badge-wrapper {
  display: flex;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #2d5016;
  border: 1px solid #4a7c59;
  color: #a3d977;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.view-toggle {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.25rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.view-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.view-btn.active {
  background: rgba(123, 92, 255, 0.2);
  color: #7b5cff;
}

/* Make list view button wider */
#list-view-btn {
  min-width: 50px;
  width: 50px;
}

/* Blog Posts Grid - Card View */
.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 400px));
  gap: 2rem;
  transition: all 0.3s ease;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}

/* When there are few items, limit the card width */
.blog-posts-grid .blog-post-card {
  max-width: 400px;
}

.blog-posts-grid.list-view {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Blog Post Card */
.blog-post-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.blog-post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(123, 92, 255, 0.3);
  box-shadow: 0 20px 40px rgba(123, 92, 255, 0.1);
}

.blog-post-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, rgba(123, 92, 255, 0.2), rgba(123, 92, 255, 0.1));
  border-radius: 12px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.blog-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.blog-post-content {
  padding: 1.5rem;
}

.blog-post-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

/* Blog cards - move meta to left side */
.blog-post-card .blog-post-meta {
  align-items: flex-start;
}

.blog-post-card .blog-post-date,
.blog-post-card .blog-post-author {
  justify-content: flex-start;
}

.blog-post-date,
.blog-post-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

.blog-post-date {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.blog-post-author {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.blog-post-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.blog-post-summary {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.blog-post-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.blog-post-tag {
  background: rgba(123, 92, 255, 0.1);
  border: 1px solid rgba(123, 92, 255, 0.2);
  color: #7b5cff;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.blog-post-read-more {
  color: #7b5cff;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

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

/* List View Specific Styles */
.blog-posts-grid.list-view .blog-post-card {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  border-radius: 12px;
}

.blog-posts-grid.list-view .blog-post-image {
  display: none;
}

.blog-posts-grid.list-view .blog-post-content {
  padding: 0;
  flex: 1;
  text-align: left;
}

.blog-posts-grid.list-view .blog-post-tags {
  justify-content: flex-start;
}

.blog-posts-grid.list-view .blog-post-meta {
  display: none;
}

.blog-posts-grid.list-view .blog-post-title {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.blog-posts-grid.list-view .blog-post-summary {
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-posts-grid.list-view .blog-post-meta {
  margin-bottom: 0.5rem;
}

/* Loading and Error States */
.blog-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem 0;
  color: rgba(255, 255, 255, 0.6);
}

.blog-error {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem 0;
  color: #ff6b6b;
  text-align: center;
}

.blog-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 4rem 0;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.blog-empty h3 {
  color: white;
  margin-bottom: 0.5rem;
}

/* Loading Spinner */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(123, 92, 255, 0.1);
  border-top: 3px solid #7b5cff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .blog-controls {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .view-toggle {
    align-self: center;
  }

  .blog-posts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .blog-posts-grid.list-view .blog-post-card {
    flex-direction: column;
    text-align: center;
  }

  .blog-posts-grid.list-view .blog-post-image {
    display: none;
  }

  .blog-post-meta {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }

  .blog-posts-grid.list-view .blog-post-meta {
    align-items: center;
  }
}

@media (max-width: 480px) {
  .blog-post-content {
    padding: 1rem;
  }

  .blog-post-title {
    font-size: 1.125rem;
  }

  .blog-post-tags {
    justify-content: center;
  }

  .blog-posts-grid.list-view .blog-post-card {
    padding: 1rem;
  }
}

/* Individual Blog Post Styles */
.blog-header {
  padding: 2rem 0 1rem 0;
}

.blog-breadcrumb {
  margin-bottom: 1rem;
}

.breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.breadcrumb-link:hover {
  color: #7b5cff;
}

.breadcrumb-link svg {
  width: 16px;
  height: 16px;
}

.blog-post-section {
  padding: 2.8125rem 0 4rem 0;
}

.blog-post-article {
  max-width: 800px;
  margin: 0 auto;
}

.blog-post-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-post-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.blog-post-date,
.blog-post-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
}

.blog-post-title-main {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
  margin: 1rem 0 1.5rem 0;
}

.blog-post-content-main {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  font-size: 1.125rem;
}

.blog-post-content-main h1,
.blog-post-content-main h2,
.blog-post-content-main h3,
.blog-post-content-main h4,
.blog-post-content-main h5,
.blog-post-content-main h6 {
  color: white;
  margin: 2rem 0 1rem 0;
  font-weight: 600;
}

.blog-post-content-main h1 {
  font-size: 2rem;
  border-bottom: 2px solid #7b5cff;
  padding-bottom: 0.5rem;
}

.blog-post-content-main h2 {
  font-size: 1.75rem;
}

.blog-post-content-main h3 {
  font-size: 1.5rem;
}

.blog-post-content-main h4 {
  font-size: 1.25rem;
}

.blog-post-content-main p {
  margin: 1.5rem 0;
}

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

.blog-post-content-main li {
  margin: 0.5rem 0;
}

.blog-post-content-main blockquote {
  border-left: 4px solid #7b5cff;
  background: rgba(123, 92, 255, 0.1);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
}

.blog-post-content-main code {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
}

.blog-post-content-main pre {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
}

.blog-post-content-main pre code {
  background: none;
  padding: 0;
}

.blog-post-content-main a {
  color: #7b5cff;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.blog-post-content-main a:hover {
  border-bottom-color: #7b5cff;
}

.blog-post-content-main strong {
  color: white;
  font-weight: 600;
}

.blog-post-content-main em {
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
}

.blog-post-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.blog-post-navigation {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.button-outlined {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.button-outlined:hover {
  border-color: #7b5cff;
  color: #7b5cff;
  background: rgba(123, 92, 255, 0.1);
}

/* Mobile Responsive for Blog Post */
@media (max-width: 768px) {
  .blog-post-title-main {
    font-size: 2rem;
  }
  
  .blog-post-content-main {
    font-size: 1rem;
  }
  
  .blog-post-content-main h1 {
    font-size: 1.75rem;
  }
  
  .blog-post-content-main h2 {
    font-size: 1.5rem;
  }
  
  .blog-post-content-main h3 {
    font-size: 1.25rem;
  }
  
  .blog-post-header {
    margin-bottom: 2rem;
  }
  
  .blog-post-footer {
    margin-top: 3rem;
  }
}

@media (max-width: 480px) {
  .blog-post-title-main {
    font-size: 1.75rem;
  }
  
  .blog-post-content-main ul,
  .blog-post-content-main ol {
    padding-left: 1.5rem;
  }
  
  .blog-post-content-main blockquote {
    padding: 0.75rem 1rem;
    margin: 1.5rem 0;
  }
  
  .blog-post-content-main pre {
    padding: 1rem;
  }
}