/*
 * FrugalIndians - Blog Stylesheet
 * World-class blog design matching website aesthetic
 */

/* ==========================================================================
   Blog Post Content Typography
   ========================================================================== */
.blog-post-content {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.125rem;
  line-height: 1.8;
  color: #2c3e50;
  max-width: 100%;
}

.blog-post-content > * {
  margin-bottom: 1.5rem;
}

/* Headings with hierarchy */
.blog-post-content h2 {
  font-family: 'Inter', 'Arial', 'Helvetica', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e9ecef;
  letter-spacing: -0.5px;
}

.blog-post-content h3 {
  font-family: 'Inter', 'Arial', 'Helvetica', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.3px;
}

.blog-post-content h4 {
  font-family: 'Inter', 'Arial', 'Helvetica', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #34495e;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* Paragraph styling */
.blog-post-content p {
  margin-bottom: 1.5rem;
  color: #2c3e50;
  font-size: 1.125rem;
  line-height: 1.8;
}

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

.blog-post-content p em {
  font-style: italic;
  color: #34495e;
}

/* Lists */
.blog-post-content ul,
.blog-post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.blog-post-content li {
  margin-bottom: 0.75rem;
  line-height: 1.8;
  color: #2c3e50;
}

.blog-post-content li strong {
  font-weight: 600;
  color: #1a1a1a;
}

/* Blockquotes */
.blog-post-content blockquote {
  border-left: 4px solid #0d6efd;
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  background-color: #f8f9fa;
  border-radius: 0.375rem;
  font-style: italic;
  color: #34495e;
}

.blog-post-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Code blocks */
.blog-post-content pre {
  background-color: #2c3e50;
  color: #ecf0f1;
  padding: 1.5rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 2rem 0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.blog-post-content code {
  background-color: #f8f9fa;
  color: #d32f2f;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: 'Monaco', 'Courier New', monospace;
}

.blog-post-content pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
}

/* Links within content */
.blog-post-content a {
  color: #0d6efd;
  text-decoration: underline;
  text-decoration-color: rgba(13, 110, 253, 0.3);
  text-underline-offset: 3px;
  transition: all 0.2s ease-in-out;
}

.blog-post-content a:hover {
  color: #0a58ca;
  text-decoration-color: #0a58ca;
}

/* Images within content */
.blog-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 2rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Blog Post Header
   ========================================================================== */
.blog-post-header {
  margin-bottom: 3rem;
}

.blog-post-header .badge {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-post-header h1 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.2;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.blog-post-header .lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: #5a6c7d;
  margin-bottom: 2rem;
  font-weight: 400;
}

.blog-post-header .author-avatar img {
  border: 2px solid #e9ecef;
  transition: transform 0.2s ease-in-out;
}

.blog-post-header .author-avatar img:hover {
  transform: scale(1.05);
}

/* ==========================================================================
   Blog Post Image
   ========================================================================== */
.blog-post-image {
  margin-bottom: 2.5rem;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.blog-post-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease-in-out;
}

.blog-post-image:hover img {
  transform: scale(1.02);
}

/* ==========================================================================
   Blog Post Footer
   ========================================================================== */
.blog-post-footer {
  margin-top: 4rem;
  padding-top: 0;
}

/* Share Post Container - Clean, Modern Design */
.share-post-container {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid #e9ecef;
}

.share-post-header h5 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
  letter-spacing: -0.3px;
}

.share-post-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.share-btn i {
  font-size: 1.125rem;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.share-btn-twitter {
  color: #1DA1F2;
  border-color: #1DA1F2;
}

.share-btn-twitter:hover {
  background: #1DA1F2;
  color: white;
}

.share-btn-facebook {
  color: #1877F2;
  border-color: #1877F2;
}

.share-btn-facebook:hover {
  background: #1877F2;
  color: white;
}

.share-btn-linkedin {
  color: #0A66C2;
  border-color: #0A66C2;
}

.share-btn-linkedin:hover {
  background: #0A66C2;
  color: white;
}

.share-btn-email {
  color: #6c757d;
  border-color: #6c757d;
}

.share-btn-email:hover {
  background: #6c757d;
  color: white;
}

/* Author Bio Card */
.author-bio-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.author-bio h5 {
  font-weight: 600;
  color: #1a1a1a;
}

.author-bio img {
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.author-social a {
  font-size: 1.25rem;
  color: #6c757d;
  transition: color 0.2s ease-in-out;
}

.author-social a:hover {
  color: #0d6efd;
}

/* ==========================================================================
   Sidebar Styles
   ========================================================================== */
.sidebar .card {
  border: none;
  border-radius: 0.75rem;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.sidebar .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.sidebar .card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1a1a;
  border-bottom: 2px solid #0d6efd;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.sidebar .list-unstyled a {
  color: #2c3e50;
  transition: all 0.2s ease-in-out;
  padding: 0.5rem 0;
  display: inline-block;
}

.sidebar .list-unstyled a:hover {
  color: #0d6efd;
  padding-left: 0.5rem;
}

.sidebar .badge {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
}

/* Newsletter form */
#sidebar-newsletter-form input {
  border: 2px solid #e9ecef;
  border-radius: 0.5rem;
  padding: 0.75rem;
  transition: border-color 0.2s ease-in-out;
}

#sidebar-newsletter-form input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.1);
  outline: none;
}

#sidebar-newsletter-form button {
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
}

#sidebar-newsletter-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* Popular posts thumbnails */
.sidebar .list-unstyled img {
  border-radius: 0.375rem;
  object-fit: cover;
  transition: transform 0.2s ease-in-out;
}

.sidebar .list-unstyled img:hover {
  transform: scale(1.05);
}

/* Featured tools icons */
.featured-tool-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(13, 110, 253, 0.1);
  border-radius: 0.5rem;
  transition: all 0.2s ease-in-out;
}

.featured-tool-item:hover .featured-tool-icon {
  background-color: #0d6efd;
  color: white !important;
}

/* ==========================================================================
   Related Posts
   ========================================================================== */
.related-posts h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #1a1a1a;
}

.related-posts .card {
  border: none;
  border-radius: 0.75rem;
  transition: all 0.3s ease-in-out;
  height: 100%;
}

.related-posts .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
}

.related-posts .card-img-top {
  border-radius: 0.75rem 0.75rem 0 0;
  height: 200px;
  object-fit: cover;
}

.related-posts .card-title a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.related-posts .card-title a:hover {
  color: #0d6efd;
}

/* ==========================================================================
   Category Archive Pages
   ========================================================================== */
.category-header {
  border-bottom: 3px solid #0d6efd;
  padding-bottom: 2rem;
}

.category-header h1 {
  font-size: 3rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.category-header .lead {
  font-size: 1.25rem;
  color: #5a6c7d;
}

.breadcrumb {
  background-color: transparent;
  padding: 0;
  margin-bottom: 2rem;
}

.breadcrumb-item a {
  color: #0d6efd;
  text-decoration: none;
}

.breadcrumb-item.active {
  color: #6c757d;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 991.98px) {
  .blog-post-header h1 {
    font-size: 2rem;
  }

  .blog-post-content {
    font-size: 1rem;
  }

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

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

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

  .sidebar {
    margin-top: 3rem;
  }
}

@media (max-width: 767.98px) {
  .blog-post-header h1 {
    font-size: 1.75rem;
  }

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

  .blog-post-content {
    font-size: 1rem;
    line-height: 1.7;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  .sidebar,
  .blog-post-footer,
  .share-post,
  .related-posts {
    display: none;
  }

  .blog-post-content {
    font-size: 12pt;
    line-height: 1.6;
  }

  .blog-post-header h1 {
    font-size: 24pt;
  }
}

/* ==========================================================================
   Animation & Loading States
   ========================================================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blog-post {
  animation: fadeIn 0.6s ease-in-out;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}
