
/* Card Style Breadcrumb */
.blog-view-page{
  position: relative;
  top: -50px;
}
.breadcrumb-card {
  background: white;
  border: 1px solid #e0e0e0;
  padding: 20px 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  margin-bottom: 15px;
  position: relative;
  top: -100px;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-link {
  color: var(--primary-red);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-link:hover {
  background: var(--light-red);
  color: var(--dark-red);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(212, 0, 26, 0.2);
}

.breadcrumb-current {
  color: var(--dark-gray);
  padding: 8px 14px;
  font-weight: 600;
  background: var(--light-red);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-separator {
  color: #999;
  font-size: 14px;
  margin: 0 4px;
}

.breadcrumb-icon {
  font-size: 14px;
}

/* Multiple card examples */


.demo-title {
  color: var(--dark-gray);
  margin-bottom: 15px;
  font-size: 1.3rem;
  font-weight: 600;
}

/* Variant: Compact card */
.breadcrumb-card-compact {
  padding: 16px 20px;
  font-size: 14px;
}

.breadcrumb-card-compact .breadcrumb-link,
.breadcrumb-card-compact .breadcrumb-current {
  padding: 6px 12px;
}

/* Variant: Elevated card */
.breadcrumb-card-elevated {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .breadcrumb-card {
    padding: 16px 18px;
    font-size: 14px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .breadcrumb-link,
  .breadcrumb-current {
    padding: 6px 10px;
    font-size: 13px;
  }

  .breadcrumb-icon {
    font-size: 12px;
  }
}


/* Navigation */
.blog-nav {
  background: white;
  padding: 20px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-red);
}

.search-box {
  position: relative;
  max-width: 400px;
  flex: 1;
  margin: 0 30px;
}

.search-box input {
  width: 100%;
  padding: 12px 50px 12px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-red);
}

.search-box button {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-red);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-box button:hover {
  background: var(--dark-red);
}

.back-btn {
  background: var(--primary-red);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 25px;
  cursor: pointer;
  transition: background 0.3s ease;
  font-weight: 600;
}

.back-btn:hover {
  background: var(--dark-red);
}

/* Blog List Page */
.blog-list-page {
  display: block;
}

.blog-list-page.hidden {
  display: none;
}

.categories {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.category-btn {
  padding: 10px 20px;
  border: 2px solid var(--primary-red);
  background: white;
  color: var(--primary-red);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.category-btn:hover,
.category-btn.active {
  background: var(--primary-red);
  color: white;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.blog-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(212, 0, 26, 0.2);
}

.blog-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
  background: #f2f2f2;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.blog-content {
  padding: 25px;
}

.blog-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: #666;
}

.blog-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.blog-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark-gray);
  margin-bottom: 10px;
  line-height: 1.4;
}

.blog-excerpt {
  color: #666;
  margin-bottom: 15px;
  line-height: 1.6;
}


/* Blog View Page */


.blog-header {
  background: white;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.blog-header-image {
  width: 100%;
  border-radius: 15px;
  overflow: hidden; /* สำคัญ: ให้รูปไม่ล้นมุมโค้ง */
  margin-bottom: 30px;
  background-color: #f8dede; /* fallback background */
  position: relative;
}

.blog-header-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* ทำให้รูปไม่บีบ/ยืด */
  display: block;
}


.blog-header-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dark-gray);
  margin-bottom: 20px;
  line-height: 1.3;
}

.blog-header-meta {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
  font-size: 1rem;
  color: #666;
  flex-wrap: wrap;
}

.blog-header-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-actions {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.action-btn {
  background: var(--primary-red);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-btn:hover {
  background: var(--dark-red);
  transform: translateY(-2px);
}

.action-btn.secondary {
  background: transparent;
  border: 2px solid var(--primary-red);
  color: var(--primary-red);
}

.action-btn.secondary:hover {
  background: var(--primary-red);
  color: white;
}

.blog-body {
  background: white;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.blog-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #444;
}

.blog-text h3 {
  color: var(--primary-red);
  margin: 30px 0 15px 0;
  font-size: 1.5rem;
}

.blog-text p {
  margin-bottom: 20px;
}

.blog-text blockquote {
  background: var(--light-gray);
  border-left: 4px solid var(--primary-red);
  padding: 20px;
  margin: 25px 0;
  font-style: italic;
}

/* Comments Section */
.comments-section {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.comments-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-red);
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-form {
  background: var(--light-gray);
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 30px;
}

.comment-form textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 15px;
}

.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary-red);
}

.comment-form button {
  background: var(--primary-red);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.comment-form button:hover {
  background: var(--dark-red);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.comment {
  padding: 20px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background: #fafafa;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.comment-author {
  font-weight: 600;
  color: var(--primary-red);
}

.comment-date {
  color: #666;
  font-size: 0.9rem;
}

.comment-text {
  color: #444;
  line-height: 1.6;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.page-btn {
  padding: 10px 15px;
  border: 2px solid var(--primary-red);
  background: white;
  color: var(--primary-red);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.page-btn:hover,
.page-btn.active {
  background: var(--primary-red);
  color: white;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Related Posts */
.related-posts {
  background: white;
  border-radius: 20px;
  padding: 40px;
  margin-top: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.related-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-red);
  margin-bottom: 25px;
  text-align: center;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.related-card {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.related-card:hover {
  border-color: var(--primary-red);
  box-shadow: 0 5px 15px rgba(212, 0, 26, 0.1);
}

.related-card h4 {
  color: var(--dark-gray);
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.related-card p {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-content {
    flex-direction: column;
    gap: 20px;
  }

  .search-box {
    margin: 0;
    max-width: 100%;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-header,
  .blog-body,
  .comments-section,
  .related-posts {
    padding: 25px;
  }

  .blog-header-title {
    font-size: 2rem;
  }

  .blog-header-meta {
    flex-direction: column;
    gap: 15px;
  }

  .blog-actions {
    flex-wrap: wrap;
  }

  .categories {
    justify-content: flex-start;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
