/* Blog Post Styles */

.blog-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 2px solid #2D3748;
}

.blog-meta {
  color: #9CA3AF;
  font-size: 0.95em;
  margin-top: 15px;
}

.blog-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding: 0 20px;
}

/* Shift content right on large screens to avoid TOC overlap */
@media (min-width: 1400px) {
  .container {
    padding-left: 350px;
  }
}

/* Table of Contents */
.blog-toc {
  position: fixed;
  left: max(20px, calc((100vw - 1400px) / 2 + 20px));
  top: 120px;
  width: 300px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  padding: 18px;
  background: linear-gradient(135deg, #1A202C 0%, #121821 100%);
  border-radius: 8px;
  border: 1px solid #2D3748;
  transition: all 0.3s ease;
  z-index: 1000;
}

/* Custom Scrollbar for TOC */
.blog-toc::-webkit-scrollbar {
  width: 6px;
}

.blog-toc::-webkit-scrollbar-track {
  background: #1A202C;
  border-radius: 3px;
}

.blog-toc::-webkit-scrollbar-thumb {
  background: #3B82F6;
  border-radius: 3px;
  transition: background 0.3s ease;
}

.blog-toc::-webkit-scrollbar-thumb:hover {
  background: #60A5FA;
}

.blog-toc-title {
  color: #FDB750;
  font-size: 0.85em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2D3748;
}

.blog-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-toc-item {
  margin-bottom: 4px;
}

.blog-toc-link {
  color: #9CA3AF;
  text-decoration: none;
  font-size: 0.88em;
  line-height: 1.35;
  display: block;
  padding: 6px 10px;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}

.blog-toc-link:hover {
  color: #60A5FA;
  border-left-color: #60A5FA;
  padding-left: 15px;
}

.blog-toc-link.active {
  color: #FDB750;
  border-left-color: #FDB750;
  font-weight: 600;
  padding-left: 15px;
}

.blog-toc-item-h3 .blog-toc-link {
  font-size: 0.85em;
  padding-left: 20px;
}

.blog-toc-item-h3 .blog-toc-link:hover,
.blog-toc-item-h3 .blog-toc-link.active {
  padding-left: 25px;
}

/* Mobile/Tablet TOC Toggle Button */
.toc-toggle-btn {
  display: none;
  position: fixed;
  top: 100px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #FDB750 0%, #F59E0B 100%);
  border: none;
  border-radius: 50%;
  color: #1A202C;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(253, 183, 80, 0.3);
  z-index: 1001;
  transition: all 0.3s ease;
}

.toc-toggle-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(253, 183, 80, 0.4);
}

.toc-toggle-btn:active {
  transform: scale(0.95);
}

/* Responsive TOC for tablet and mobile */
@media (max-width: 1400px) {
  .toc-toggle-btn {
    display: block;
  }
  
  .blog-toc {
    left: auto;
    right: 20px;
    top: 160px;
    width: 320px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 240px);
    transform: translateX(calc(100% + 40px));
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }
  
  .blog-toc.toc-visible {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }
}

/* Blog Hero Image */
.blog-hero-image {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 30px;
}

/* Blog Content Typography */
.blog-content h2 {
  color: #FDB750;
  margin-top: 45px;
  margin-bottom: 20px;
  font-size: 1.75em;
}

.blog-content h3 {
  color: #60A5FA;
  margin-top: 30px;
  margin-bottom: 15px;
  font-size: 1.4em;
}

.blog-content p {
  color: #D1D5DB;
  font-size: 1.1em;
  line-height: 1.8;
  margin-bottom: 20px;
}

.blog-content ul, .blog-content ol {
  color: #D1D5DB;
  font-size: 1.1em;
  line-height: 1.8;
  margin-bottom: 25px;
  padding-left: 30px;
}

.blog-content li {
  margin-bottom: 12px;
}

.blog-content strong {
  color: #E5E7EB;
}

/* Content Boxes */
.warning-box {
  background: linear-gradient(135deg, #7C2D12 0%, #991B1B 100%);
  padding: 25px 30px;
  border-radius: 8px;
  margin: 30px 0;
}

.warning-box p {
  margin-bottom: 0;
}

.tip-box {
  background: linear-gradient(135deg, #065F46 0%, #047857 100%);
  padding: 25px 30px;
  border-radius: 8px;
  margin: 30px 0;
}

.tip-box p {
  margin-bottom: 0;
}

.cta-box {
  background: linear-gradient(135deg, #1E3A8A 0%, #1E40AF 100%);
  padding: 35px 40px;
  border-radius: 8px;
  margin: 50px 0;
  text-align: center;
  border: 2px solid #3B82F6;
}

.cta-box h3 {
  color: #60A5FA;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.8em;
}

.cta-box p {
  margin-bottom: 25px;
}

/* Loading and Error States */
.loading {
  text-align: center;
  padding: 100px 20px;
  color: #9CA3AF;
}

.error {
  text-align: center;
  padding: 100px 20px;
  color: #FCA5A5;
}

/* FAQ Section */
.faq-section {
  margin: 50px 0;
  padding: 40px;
  background: linear-gradient(135deg, #1A202C 0%, #121821 100%);
  border-radius: 8px;
  border: 1px solid #2D3748;
}

.faq-section h2 {
  color: #FDB750;
  margin-top: 0;
  margin-bottom: 30px;
  text-align: center;
  font-size: 2em;
}

.faq-item {
  margin-bottom: 15px;
  border: 1px solid #2D3748;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.faq-item:hover {
  border-color: #3B82F6;
}

.faq-question {
  background: #1A202C;
  padding: 20px 25px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s ease;
}

.faq-question:hover {
  background: #252F3F;
}

.faq-question-text {
  color: #E5E7EB;
  font-size: 1.1em;
  font-weight: 600;
  flex-grow: 1;
  padding-right: 20px;
}

.faq-toggle {
  color: #60A5FA;
  font-size: 1.5em;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background: #0F1419;
}

.faq-item.active .faq-answer {
  max-height: 2000px;
  padding: 20px 25px;
}

.faq-answer p {
  color: #D1D5DB;
  margin: 0;
  line-height: 1.7;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .toc-toggle-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
    right: 15px;
    top: 90px;
  }
  
  .blog-toc {
    right: 15px;
    top: 145px;
    width: calc(100vw - 30px);
    max-height: calc(100vh - 200px);
  }
  
  .faq-section {
    padding: 20px 15px;
    margin: 30px 0;
  }
  
  .faq-section h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
  }
  
  .faq-question {
    padding: 15px 18px;
  }
  
  .faq-question-text {
    font-size: 1em;
    padding-right: 15px;
  }
  
  .faq-toggle {
    font-size: 1.3em;
  }
  
  .faq-item.active .faq-answer {
    padding: 15px 18px;
  }
}
