/* ==========================================================================
   LeadKong Blog Styles
   Design: Clean, minimal, white background, black text
   Inspired by modern tech blogs (OpenAI, Anthropic)
   ========================================================================== */

/* Base Reset & Typography */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Urbanist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #ffffff;
  color: #000000;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #000000;
  transition: color 0.2s ease;
  text-decoration: none;
}

.article-full a {
  text-decoration: underline;
}

a:hover {
  color: #555555;
}



img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Layout: Blog Grid
   ========================================================================== */

.blog-layout {
  display: flex;
  min-height: 100vh;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.blog-sidebar {
  width: 280px;
  flex-shrink: 0;
  background-color: #fafafa;

  padding: 2rem 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo img {
  height: 32px;
  width: auto;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  color: #333333;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover {
  background-color: #f0f0f0;
  color: #000000;
}

.sidebar-link.active {
  background-color: #000000;
  color: #ffffff;
}

.sidebar-link.active:hover {
  background-color: #222222;
  color: #ffffff;
}

.sidebar-link svg {
  flex-shrink: 0;
}

.sidebar-section {
  border-top: 1px solid #eeeeee;
  padding-top: 1.5rem;
}

.sidebar-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888888;
  margin-bottom: 1rem;
}

.sidebar-categories {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-categories li {
  margin-bottom: 0.5rem;
}

.sidebar-categories a {
  display: block;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: #555555;
  border-bottom: 1px solid transparent;
}

.sidebar-categories a:hover {
  color: #000000;
}

.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background-color: #f0f0f0;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #555555;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.tag:hover {
  background-color: #000000;
  color: #ffffff;
}

/* ==========================================================================
   Mobile Header
   ========================================================================== */

.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: #ffffff;
  border-bottom: 1px solid #eeeeee;
  z-index: 1050;
  padding: 0 1rem;
  align-items: center;
  justify-content: space-between;
}

.mobile-header-logo img {
  height: 28px;
  width: auto;
}

.sidebar-toggle {
  background-color: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-toggle:hover {
  background-color: #f5f5f5;
  border-radius: 8px;
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */

.blog-main {
  flex: 1;
  padding: 3rem 4rem;
  max-width: 1200px;
}

.blog-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #eeeeee;
}

.blog-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
}

.blog-subtitle {
  font-size: 1.1rem;
  color: #666666;
  margin: 0;
}

/* ==========================================================================
   Articles Grid (blog.html)
   ========================================================================== */

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

.article-card {
  display: flex;
  flex-direction: column;
  border-bottom: none;
  padding-bottom: 0;
}

.article-image-link {
  display: block;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
}

.article-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background-color: #f5f5f5;
  transition: transform 0.3s ease;
}

.article-image figcaption {
    font-weight: 400;
    color: #555f6d;
    font-style: italic;
    font-size: 14px;
    background-color: #fff;
    padding-bottom: 5px;
    border-top: 1px #eee solid;
    padding-top: 5px;
    margin-top: 5px;
}

.article-image-link:hover .article-image {
  transform: scale(1.02);
}

.article-content {
  flex: 1;
}

.article-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888888;
  margin-bottom: 0.75rem;
}

.article-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  line-height: 1.3;
}

.article-title a {
  color: #000000;
}

.article-title a:hover {
  color: #333333;
}

.article-excerpt {
  font-size: 1rem;
  color: #555555;
  margin: 0 0 1.25rem 0;
  line-height: 1.7;
}

.article-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: #000000;
  padding-bottom: 2px;
  border-bottom: 2px solid #000000;
  transition: border-color 0.2s ease;
}

.article-link:hover {
  border-color: #888888;
  color: #333333;
}

/* ==========================================================================
   Article Page (article.html)
   ========================================================================== */

.article-main {
  max-width: 900px;
  margin: 0 auto;
}

.article-full {
  max-width: 800px;
}

.article-header {
  margin-bottom: 2rem;
  text-align: center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    background-color: #f5f5f5;
    padding: 5px 15px;
    margin-right: 15px;
    border-radius: 25px;
}

.back-link:hover {
  color: #000000;
}

.article-header .article-category {
  margin-bottom: 1rem;
}

.article-header h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin: 0 0 1rem 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-align: center;
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: #888888;
  text-align: center;
  justify-content: center;
}

.article-hero {
  margin: 0 0 2.5rem 0;
  border-radius: 12px;
  overflow: hidden;
}

.article-hero img {
  width: 100%;

  object-fit: cover;
  background-color: #f5f5f5;
}

/* Article Body Typography */
.article-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #222222;
}

.article-body p {
  margin: 0 0 1.5rem 0;
}

.article-body .article-intro {
  font-size: 1.25rem;
  color: #444444;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem 0;
  letter-spacing: -0.01em;
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem 0;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.5rem 0;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body .alert {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-size: 1rem;
}

.article-body .alert strong {
  display: block;
  margin-bottom: 0.5rem;
  color: #000000;
}

/* Related Articles */
.related-articles {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid #eeeeee;
}

.related-articles h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.related-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background-color: #f8f9fa;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.related-card:hover {
  background-color: #f0f0f0;
}

.related-category {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888888;
  margin-bottom: 0.5rem;
}

.related-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #000000;
  line-height: 1.4;
}

/* Article Footer */
.article-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #eeeeee;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: #000000;
  color: #ffffff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

.btn-back:hover {
  background-color: #333333;
  color: #ffffff;
}

/* ==========================================================================
   Blog Footer
   ========================================================================== */

.blog-footer {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid #eeeeee;
}

.footer-categories {
  margin-bottom: 2rem;
}

.footer-categories h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-nav a {
  font-size: 0.9rem;
  color: #666666;
}

.footer-nav a:hover {
  color: #000000;
}

.footer-copy {
  font-size: 0.85rem;
  color: #888888;
  margin: 0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet */
@media (max-width: 992px) {
  .mobile-header {
    display: flex;
  }

  .blog-sidebar {
    position: fixed;
    left: -280px;
    z-index: 1040;
    transition: left 0.3s ease;
  }

  .blog-sidebar.show {
    left: 0;
  }

  .blog-main {
    padding: 2rem;
    padding-top: 80px;
    margin-left: 0;
  }

  .blog-header h1 {
    font-size: 2rem;
  }

  .article-header h1 {
    font-size: 2rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .blog-main {
    padding: 1.5rem;
    padding-top: 4rem;
  }

  .blog-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
  }

  .blog-header h1 {
    font-size: 1.75rem;
  }

  .blog-subtitle {
    font-size: 1rem;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .article-card {
    padding-bottom: 0;
  }

  .article-title {
    font-size: 1.25rem;
  }

  .article-excerpt {
    font-size: 0.95rem;
  }

  /* Article page mobile */
  .article-header h1 {
    font-size: 1.75rem;
  }

  .article-meta {
    flex-direction: column;
    gap: 0.25rem;
  }

  .article-body {
    font-size: 1rem;
  }

  .article-body .article-intro {
    font-size: 1.1rem;
  }

  .article-body h2 {
    font-size: 1.3rem;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .blog-main {
    padding: 1rem;
    padding-top: 4rem;
  }

  .blog-header h1 {
    font-size: 1.5rem;
  }

  .article-header h1 {
    font-size: 1.5rem;
  }
}

/* ==========================================================================
   Bootstrap Offcanvas Overrides for Sidebar
   ========================================================================== */

@media (min-width: 992px) {
  .offcanvas-lg {
    visibility: visible;
    position: sticky;
    background-color: transparent;

    transform: none;
  }

  .offcanvas-lg .offcanvas-body {
    padding: 0;
    overflow-y: visible;
  }
}

.offcanvas-start {
  width: 280px;
  background-color: #fafafa;
  z-index: 1051;
}

.offcanvas-header {
  border-bottom: 1px solid #eeeeee;
}

.offcanvas-title {
  font-weight: 700;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

.sidebar-link:focus-visible,
.tag:focus-visible,
.btn-back:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000000;
  color: #ffffff;
  padding: 8px 16px;
  z-index: 9999;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* ==========================================================================
   Placeholder Images Styling
   ========================================================================== */

.article-image[src*="placeholder"],
.article-hero img[src*="placeholder"] {
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

/* ==========================================================================
   Dynamic Content Styles
   ========================================================================== */

/* Image placeholder for articles without images */
.article-image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #f0f0f0 0%, #e5e5e5 50%, #f0f0f0 100%);
  border-radius: 12px;
  position: relative;
}

.article-image-placeholder::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='%23ccc' viewBox='0 0 16 16'%3E%3Cpath d='M6.002 5.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z'/%3E%3Cpath d='M2.002 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2h-12zm12 1a1 1 0 0 1 1 1v6.5l-3.777-1.947a.5.5 0 0 0-.577.093l-3.71 3.71-2.66-1.772a.5.5 0 0 0-.63.062L1.002 12V3a1 1 0 0 1 1-1h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.5;
}

/* Pagination */
.blog-pagination {
  margin-top: 3rem;
}

.blog-pagination .pagination {
  gap: 0.25rem;
}

.blog-pagination .page-link {
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  color: #000;
  padding: 0.5rem 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.blog-pagination .page-link:hover {
  background-color: #f5f5f5;
  border-color: #ddd;
}

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

/* Sidebar category active state */
.sidebar-categories a.active {
  color: #000;
  font-weight: 600;
}

/* Article body blockquote styling */
.article-body blockquote {
  background-color: #f8f9fa;
  border-left: 4px solid #000;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-style: normal;
  border-radius: 0 8px 8px 0;
}

.article-body blockquote p {
  margin-bottom: 0;
}

/* Article body table styling */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}

.article-body table th,
.article-body table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e5e5e5;
}

.article-body table th {
  background-color: #f8f9fa;
  font-weight: 600;
}

.article-body table tr:hover {
  background-color: #fafafa;
}

/* Code blocks */
.article-body code {
  background-color: #f5f5f5;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.9em;
}

.article-body pre {
  background-color: #1a1a1a;
  color: #f5f5f5;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 2rem 0;
}

.article-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}


/* ================================================
   SITE FOOTER
   ================================================ */
.site-footer {
  background: #f8f9fa;
  color: #333;
  padding: 60px 0 0;
  margin-top: 80px;
}

.footer-logo img {
  height: auto;
}

.footer-description {
  color: #666;
  font-size: 14px;
  line-height: 1.7;
  max-width: 280px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  color: #666;
  transition: color 0.2s;
}

.footer-social a:hover {
  color: #000;
}

.footer-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  color: #000;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #555;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #000;
}

.footer-links-2col {
  columns: 2;
  column-gap: 20px;
}

.footer-cta-text {
  color: #666;
  font-size: 14px;
  margin-bottom: 16px;
}

.btn-footer-cta {
  background: #000;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
}

.btn-footer-cta:hover {
  background: #333;
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px 0;
  margin-top: 40px;
  border-top: 1px solid #e0e0e0;
  font-size: 13px;
  color: #888;
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  color: #888;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-bottom-links a:hover {
  color: #333;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 40px 0 0;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-links-2col {
    columns: 1;
  }
}