/* =============================================
   BLOG STYLES - Bolsi Landing
   ============================================= */

/* Blog Hero Section */
.blog-hero {
  padding: 8rem 0 4rem;
  background: linear-gradient(135deg, #0b80bd 0%, #065a8c 100%);
  color: white;
  text-align: center;
}

.blog-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.blog-hero .lead {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Blog Section */
.blog-section {
  padding: 4rem 0;
  background: var(--bg-secondary, #f8f9fa);
  min-height: 50vh;
}

/* Category Filter */
.blog-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.category-btn {
  padding: 0.5rem 1.25rem;
  border: 2px solid #0b80bd;
  border-radius: 999px;
  background: transparent;
  color: #0b80bd;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-btn:hover {
  background: rgba(11, 128, 189, 0.1);
}

.category-btn.active {
  background: #0b80bd;
  color: white;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.blog-grid-related {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Blog Card */
.blog-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(11, 128, 189, 0.15);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, #e0e7ee 0%, #c8d4de 100%);
}

.blog-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.blog-card-date {
  font-size: 0.85rem;
  color: #6c757d;
}

.blog-card-category {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(11, 128, 189, 0.1);
  color: #0b80bd;
  font-weight: 500;
}

.blog-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.blog-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-card-title a:hover {
  color: #0b80bd;
}

.blog-card-excerpt {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}

.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #0b80bd;
  font-weight: 500;
  text-decoration: none;
  transition: gap 0.2s ease;
}

.blog-card-link:hover {
  gap: 0.75rem;
}

/* Loading State */
.blog-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: #6c757d;
}

.blog-loading p {
  margin-top: 1rem;
}

/* Empty State */
.blog-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: #6c757d;
}

.blog-empty i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Blog CTA */
.blog-cta {
  padding: 4rem 0;
  background: linear-gradient(135deg, #0b80bd 0%, #065a8c 100%);
}

.blog-cta-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 3rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.blog-cta-content h2 {
  color: white;
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 0.75rem;
}

.blog-cta-content p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.blog-cta-content .btn-primary {
  background: white;
  color: #0b80bd;
  border: none;
  padding: 1rem 2rem;
  font-weight: 600;
}

.blog-cta-content .btn-primary:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

/* =============================================
   BLOG POST STYLES
   ============================================= */

.blog-post-loading,
.blog-post-not-found {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: #6c757d;
}

.blog-post-loading .spinner-border {
  width: 3rem;
  height: 3rem;
}

.blog-post-not-found i {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  opacity: 0.4;
}

.blog-post-not-found h2 {
  color: #1a1a2e;
  margin-bottom: 0.5rem;
}

/* Post Header */
.blog-post-header {
  padding: 8rem 0 3rem;
  background: linear-gradient(135deg, #0b80bd 0%, #065a8c 100%);
  color: white;
}

.blog-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.95rem;
  margin-bottom: 2rem;
  transition: color 0.2s ease;
}

.blog-back-link:hover {
  color: white;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.blog-post-date {
  font-size: 0.9rem;
  opacity: 0.85;
}

.blog-post-categories {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.blog-post-categories .blog-card-category {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.blog-post-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  max-width: 900px;
}

.blog-post-excerpt {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 700px;
  line-height: 1.6;
}

/* Post Image */
.blog-post-image-container {
  margin-top: -2rem;
  margin-bottom: 3rem;
}

.blog-post-image {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: block;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Post Body */
.blog-post-body {
  padding: 3rem 0 4rem;
}

.blog-post-content {
  max-width: 750px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
}

.blog-post-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 2.5rem 0 1rem;
}

.blog-post-content h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1a1a2e;
  margin: 2rem 0 0.75rem;
}

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

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

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

.blog-post-content blockquote {
  border-left: 4px solid #0b80bd;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #555;
}

.blog-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2rem 0;
}

.blog-post-content a {
  color: #0b80bd;
  text-decoration: underline;
}

.blog-post-content code {
  background: #f1f3f5;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.blog-post-content pre {
  background: #1a1a2e;
  color: #e0e0e0;
  padding: 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 2rem 0;
}

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

/* Author */
.blog-post-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 2rem 0;
  margin-top: 3rem;
  border-top: 1px solid #e9ecef;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-label {
  font-size: 0.85rem;
  color: #6c757d;
}

.author-name {
  font-weight: 600;
  color: #1a1a2e;
}

/* Related Posts */
.blog-related {
  padding: 4rem 0;
  background: #f8f9fa;
}

.blog-related h3 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: #1a1a2e;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
  .blog-hero {
    padding: 7rem 0 3rem;
  }

  .blog-section {
    padding: 3rem 0;
  }

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

  .blog-cta-card {
    padding: 2rem 1.5rem;
  }

  .blog-post-header {
    padding: 7rem 0 2rem;
  }

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

  .blog-post-author {
    flex-direction: column;
    text-align: center;
  }
}

/* Animation */
@keyframes blogCardIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blog-card {
  animation: blogCardIn 0.4s ease forwards;
  opacity: 0;
}

.blog-card:nth-child(1) {
  animation-delay: 0.1s;
}
.blog-card:nth-child(2) {
  animation-delay: 0.2s;
}
.blog-card:nth-child(3) {
  animation-delay: 0.3s;
}
.blog-card:nth-child(4) {
  animation-delay: 0.4s;
}
.blog-card:nth-child(5) {
  animation-delay: 0.5s;
}
.blog-card:nth-child(6) {
  animation-delay: 0.6s;
}
