/* Blog Page Styling */

.blog-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
  padding: 100px 20px 50px;
  margin-top: 60px;
}

.blog-hero h1 {
  font-size: 48px;
  margin: 0 0 10px 0;
  font-weight: 700;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.blog-hero p {
  font-size: 18px;
  margin: 0;
  opacity: 0.95;
}

.blog-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

.blog-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.blog-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-card-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 12px 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-excerpt {
  font-size: 15px;
  color: #4a5568;
  margin: 0 0 16px 0;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #718096;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

/* Legacy styles for compatibility */
.blog-card-overlay,
.blog-card-overlay h2 {
  display: none;
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.blog-author {
  color: #6b46c1;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s;
}

.blog-author:hover {
  color: #553c9a;
  text-decoration: underline;
}

.blog-date {
  color: #718096;
  font-size: 13px;
}

.blog-comments {
  color: #718096;
  font-size: 13px;
}

.no-blogs {
  text-align: center;
  padding: 60px 20px;
  color: #718096;
}

.no-blogs h2 {
  font-size: 28px;
  color: #2d3748;
  margin-bottom: 10px;
}

/* Individual Blog Post Page */
.blog-post-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 20px 40px;
}

.blog-post-banner {
  height: 400px;
  background-size: cover;
  background-position: center;
  border-radius: 15px;
  margin-bottom: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.blog-post-header {
  margin-bottom: 30px;
}

.blog-post-title {
  font-size: 42px;
  color: #2d3748;
  margin: 0 0 20px 0;
  line-height: 1.2;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #f7fafc;
  border-radius: 10px;
  flex-wrap: wrap;
}

.blog-post-author {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.blog-post-author[style*="cursor: pointer"]:hover {
  transform: translateX(5px);
  opacity: 0.8;
}

.blog-post-author[style*="cursor: pointer"] .author-name {
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.3s ease;
}

.blog-post-author[style*="cursor: pointer"]:hover .author-name {
  text-decoration-color: #6b46c1;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #6b46c1;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
}

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

.author-name {
  font-weight: 600;
  color: #2d3748;
  font-size: 16px;
}

.author-email {
  font-size: 14px;
  color: #718096;
}

.blog-post-date {
  margin-left: auto;
  color: #718096;
  font-size: 15px;
}

.blog-post-content {
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 40px;
  line-height: 1.8;
  color: #2d3748;
}

.blog-post-content p {
  margin-bottom: 20px;
  font-size: 17px;
}

.blog-post-content h2 {
  color: #6b46c1;
  margin: 30px 0 15px 0;
  font-size: 28px;
}

.blog-post-content h3 {
  color: #553c9a;
  margin: 25px 0 12px 0;
  font-size: 22px;
}

.blog-post-content ul, .blog-post-content ol {
  margin: 20px 0;
  padding-left: 30px;
}

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

/* Comments Section */
.comments-section {
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
}

.comments-header h2 {
  margin: 0;
  color: #2d3748;
  font-size: 28px;
}

.comment-form {
  margin-bottom: 40px;
  padding: 25px;
  background: #f7fafc;
  border-radius: 10px;
}

.comment-form textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
  box-sizing: border-box;
}

.comment-form textarea:focus {
  outline: none;
  border-color: #6b46c1;
  box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.1);
}

.comment-submit {
  margin-top: 15px;
  padding: 12px 30px;
  background: #6b46c1;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.comment-submit:hover {
  background: #553c9a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(107, 70, 193, 0.3);
}

.comment-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.comment {
  padding: 20px;
  background: #f7fafc;
  border-radius: 10px;
  border-left: 4px solid #6b46c1;
  transition: all 0.3s ease;
}

.comment:hover {
  background: #edf2f7;
  transform: translateX(5px);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #6b46c1;
}

.comment-author {
  font-weight: 600;
  color: #2d3748;
  font-size: 15px;
}

.comment-time {
  margin-left: auto;
  color: #a0aec0;
  font-size: 13px;
}

.comment-content {
  color: #4a5568;
  line-height: 1.6;
  font-size: 15px;
}

.login-prompt {
  text-align: center;
  padding: 30px;
  background: #fff5e6;
  border-radius: 10px;
  border: 2px solid #f6ad55;
}

.login-prompt p {
  margin: 0 0 15px 0;
  color: #744210;
  font-size: 16px;
}

.login-link {
  display: inline-block;
  padding: 10px 25px;
  background: #6b46c1;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.login-link:hover {
  background: #553c9a;
  transform: translateY(-2px);
}

.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 30px;
  color: #6b46c1;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.back-to-blog:hover {
  color: #553c9a;
  transform: translateX(-5px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .blog-hero {
    padding: 100px 20px 40px;
  }

  .blog-hero h1 {
    font-size: 36px;
  }

  .blog-hero p {
    font-size: 16px;
  }

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

  .blog-post-title {
    font-size: 32px;
  }

  .blog-post-banner {
    height: 250px;
  }

  .blog-post-content {
    padding: 25px;
  }

  .comments-section {
    padding: 25px;
  }

  .blog-post-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-post-date {
    margin-left: 0;
  }

  /* Horizontal blog cards - stack on mobile */
  .blog-card {
    flex-direction: column;
  }

  .blog-card-image {
    width: 100%;
    min-width: 100%;
    height: 200px;
  }

  .blog-card-content {
    padding: 20px;
  }

  .blog-card:hover {
    transform: translateY(-5px);
  }
}
