.nav-link {
  position: relative;
  padding-bottom: 2px;
}

.nav-link::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: white; /* Border color */
  transition: width 0.3s ease-in-out, left 0.3s ease-in-out;
}

.nav-link:hover::before {
  width: 100%;
  left: 0;
}

.navbar-brand {
  display: inline-block; /* For scaling to work */
  transition: transform 0.3s ease-in-out;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.container.mt-3 {
  margin-top: 1rem !important;
  padding-left: 1rem;
  padding-right: 1rem;
}

.card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.card-img-top {
  object-fit: cover;
  height: 150px;
  cursor: pointer;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.card-body {
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card-title {
  transform: translateY(0);
  transition: transform 0.2s ease-in-out;
}

.card:hover .card-title {
  transform: translateY(-2px); /* Slight upward movement */
  animation: text-wave 0.4s alternate infinite;
  cursor: pointer;
}

@keyframes text-wave {
  0% {
    transform: translateY(-2px);
  }
  50% {
    transform: translateY(2px);
  }
  100% {
    transform: translateY(-2px);
  }
}

.card-text {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.card-body > .btn#btnview.mt-auto {
  background-color: white;
  font-weight: 600;
  color: #212529;
  border: 1px solid black;
  margin-top: auto !important;
  transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.card-body > .btn#btnview:hover {
  color: white;
  background-color: #212529;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.card {
  border: 1px solid transparent;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: border-color 0.3s ease-in-out, transform 0.3s ease-in-out,
    box-shadow 0.3s ease-in-out;
}

.card:hover {
  border-color: #212529;
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* ========================================= */

pre {
  white-space: pre-wrap;
}

/* General container for the blog post */
.blog-container {
  max-width: 960px;
  margin: 30px auto;
  padding: 30px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Prominent blog title */
.blog-title {
  font-size: 2.75em;
  font-weight: 700;
  color: #283048;
  margin-bottom: 25px;
  line-height: 1.2;
}

/* Styled blog image */
.blog-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
}

/* Enhanced blog content */
.blog-content pre {
  font-size: 1.1em;
  line-height: 1.7;
  color: #37474f;
  margin-bottom: 20px;
  padding: 20px;
  background-color: #f5f5f5;
  border-radius: 6px;
  border-left: 5px solid #007bff;
  white-space: pre-wrap;
  overflow-x: auto; /* For potentially long code blocks */
  font-family: "Courier New", Courier, monospace; /* Monospace font for code */
}

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

.blog-content h2,
.blog-content h3 {
  font-size: 1.6em;
  color: #283048;
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: 600;
}

/* Author information */
.author-info {
  display: flex;
  align-items: center;
  margin-top: 40px;
  margin-bottom: 40px;
  color: #777;
  font-size: 0.9em;
}

.author-image {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.author-name {
  font-weight: 500;
  color: #333;
}

/* Comments section */
.comments-section {
  margin-top: 50px;
  padding: 30px;
  border-top: 1px solid #eee;
}

.comments-heading {
  font-size: 1.75em;
  color: #283048;
  margin-bottom: 25px;
  border-bottom: 2px solid #ddd;
  padding-bottom: 10px;
}

/* Individual comment styling */
.comments-list .comment {
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #f9f9f9;
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.comment-author-image {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-body {
  flex-grow: 1;
}

.comment-author-name {
  font-size: 1em;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.comment-text {
  color: #555;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Comment input area */
.comment-input-area {
  margin-bottom: 30px;
  padding: 20px;
  background-color: #f8f8f8;
  border: 1px solid #eee;
  border-radius: 8px;
}

.comment-input-area .form-control {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
  line-height: 1.6;
  box-sizing: border-box;
}

.comment-input-area .add-comment-button {
  padding: 12px 25px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1em;
  transition: background-color 0.2s ease-in-out;
}

.comment-input-area .add-comment-button:hover {
  background-color: #0056b3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .blog-container {
    padding: 20px;
    margin: 20px;
  }
  .blog-title {
    font-size: 2em;
    margin-bottom: 20px;
  }
  .blog-image {
    max-height: 300px;
    margin-bottom: 20px;
  }
  .blog-content pre {
    font-size: 0.95em;
    padding: 15px;
  }
  .comments-heading {
    font-size: 1.5em;
  }
  .comments-list .comment {
    padding: 15px;
    gap: 10px;
  }
  .comment-text {
    font-size: 0.9em;
  }
  .comment-input-area {
    padding: 15px;
  }
  .comment-input-area .form-control {
    font-size: 0.95em;
  }
  .comment-input-area .add-comment-button {
    font-size: 1em;
  }
  .author-info {
    margin-top: 30px;
    margin-bottom: 30px;
  }
  .author-image {
    width: 40px;
    height: 40px;
    margin-right: 10px;
  }
}

/* ========================================= */
/* Responsive Styles (Adjust card text/image sizes if needed) */
/* ========================================= */
@media (max-width: 768px) {
  .card-title {
    font-size: 1.1rem;
  }
  .card-text {
    font-size: 0.85rem;
  }
  .card-img-top {
    height: 130px;
  }
}

@media (max-width: 576px) {
  .card-title {
    font-size: 1rem;
  }
  .card-text {
    font-size: 0.8rem;
  }
  .card-img-top {
    height: 100px;
  }
}
