.layout-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header Styles */
.header {
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 100;
  border-left: none;
  border-right: none;
  border-top: none;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 0;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: var(--transition);
  border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Main Content Styles */
.main-content {
  flex: 1;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

/* Footer Styles */
.footer {
  margin-top: auto;
  padding: 4rem 0 0 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

/* Remove text-gradient since user asked for white main color for logo */
.footer-brand h3.text-gradient {
  background: none;
  -webkit-text-fill-color: var(--text-primary);
  color: var(--text-primary);
}

.footer-brand p {
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--accent-hover);
}

.footer-bottom {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none; /* Needs a mobile menu implementation for real app */
  }
}
.blog-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
  height: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

.blog-image-wrapper {
  position: relative;
  display: block;
  overflow: hidden;
  /* Enforcing the 16:9 aspect ratio */
  aspect-ratio: 16 / 9;
  width: 100%;
}

.blog-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.blog-category {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: #333333; /* Dark rounded pill */
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  border: none;
}

.blog-content {
  padding: 2rem 2rem 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: #64748b; /* slate-500 */
  margin-bottom: 1rem;
}

.dot {
  font-size: 0.5rem;
}

.blog-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0;
  line-height: 1.3;
  color: #334155; /* slate-700 */
  transition: color 0.3s ease;
}

.blog-card:hover .blog-title {
  color: #0f172a; /* darker on hover */
}

.blog-excerpt {
  color: #cbd5e1;
  margin-bottom: 2rem;
  line-height: 1.6;
  flex: 1;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: auto;
  align-self: flex-start;
}

.read-more svg {
  transition: transform 0.3s ease;
}

.read-more:hover svg {
  transform: translateX(4px);
  color: var(--accent-color);
}
.breadcrumbs {
  margin-bottom: 2rem;
  width: 100%;
}

.breadcrumbs ol {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
}

.breadcrumb-home {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.3s ease;
}

.breadcrumb-home:hover {
  color: var(--accent-color);
}

.separator {
  color: #475569;
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}
.sidebar-toc {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  max-height: calc(100vh - var(--header-height) - 4rem);
  overflow-y: auto;
}

.toc-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.toc-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toc-item a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
  transition: all 0.2s ease;
  position: relative;
}

.toc-item.level-3 {
  padding-left: 1rem;
  font-size: 0.85rem;
}

.toc-item a:hover {
  color: var(--text-primary);
}

.toc-item.active a {
  color: var(--accent-color);
  font-weight: 500;
}

/* Custom indicator for active state */
.toc-item.active a::before {
  content: '';
  position: absolute;
  left: -1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--accent-color);
}

.toc-item.level-3.active a::before {
  left: -0.75rem;
}

/* Scrollbar styling for TOC */
.sidebar-toc::-webkit-scrollbar {
  width: 4px;
}
.sidebar-toc::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-toc::-webkit-scrollbar-thumb {
  background: var(--surface-light);
  border-radius: 4px;
}
.related-posts {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--glass-border);
}

.related-title {
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* Since the main BlogCard is meant for larger display often, 
   we might need to ensure the related grid scales it nicely */
.related-grid-item .blog-title {
  font-size: 1.125rem;
}

.related-grid-item .blog-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.related-grid-item .blog-content {
  padding: 1.5rem;
}

@media (max-width: 1024px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}
.home-page {
  animation: page-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-hero {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 5rem auto;
  padding: 4rem 0;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-top: 1.5rem;
  line-height: 1.6;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem 2rem;
  margin-bottom: 4rem;
}

@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .home-hero {
    padding: 2rem 0;
    margin-bottom: 3rem;
  }
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 0;
  color: var(--accent-color);
}

.spinner-icon {
  animation: spin 1s linear infinite;
  width: 32px;
  height: 32px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.end-message {
  text-align: center;
  padding: 2rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto;
}
.single-blog-page {
  animation: page-enter 0.5s ease;
  padding-bottom: 5rem;
}

.top-nav-area {
  margin-bottom: 2rem;
}

.blog-head {
  max-width: 900px;
  margin: 0 auto 3rem;
  text-align: center;
}

.blog-meta-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.category-badge {
  color: var(--accent-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.title-large {
  line-height: 1.2;
}

.featured-wrapper {
  margin-bottom: 4rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  /* Limit the height for ultra-widescreens but keep it impressive */
  max-height: 70vh;
}

.featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-body-layout {
  display: block;
  max-width: 800px;
  margin: 0 auto;
}

.blog-main-content {
  min-width: 0; 
}

@media (max-width: 768px) {
  .title-large {
    font-size: 2.5rem;
  }
}
.static-page {
  animation: page-enter 0.5s ease;
  padding-bottom: 5rem;
}

.static-header {
  text-align: center;
  margin: 4rem 0 3rem;
}

.static-content-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.static-glass-card {
  padding: 3rem 4rem;
  border-radius: var(--radius-lg);
}

@media (max-width: 768px) {
  .static-glass-card {
    padding: 2rem 1.5rem;
  }
}
