body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", sans-serif;
  background: #f9f9f9;
  color: #222;
}


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

.blog-list-container h2 {
  font-size: 28px;
  margin-bottom: 24px;
  color: #222;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.blog-card {
  max-width: 100%;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}

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

.blog-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
}

/* Constrain all images */
.blog-image {
  max-width: 100%;
  height: auto;
  width: 100%;
  display: block;
  margin: 20px 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.blog-card h3 {
  padding: 16px 16px 0;
  margin: 0;
  font-size: 18px;
}

.blog-card p {
  padding: 0 16px 16px;
  color: #555;
  font-size: 14px;
}

a {
  text-decoration: none;
}

/* Optional: change link color */
a:link, a:visited {
  color: inherit; /* or set to a custom color like #000 */
  text-decoration: none;
}

/* If you want underline only on hover */
a:hover {
  text-decoration: underline;
}

.view-all-btn {
  display: inline-block;
  margin-top: 10px;
  color: #007BFF;
  text-decoration: none;
  font-weight: bold;
  padding-left: 4px;
}

.view-all-btn:hover {
  text-decoration: underline;
}


/* Blog page */

.blog-post {
  max-width: 800px;
  margin: 40px auto;
  padding: 40px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.blog-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a1a1a;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 24px;
}

.blog-date {
  font-size: 14px;
  color: #777;
  margin-bottom: 20px;
}

.blog-banner {
  width: 100%;
  max-width: 700px;
  height: auto;
  display: block;
  margin: 0 auto 30px auto;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}


.blog-content p {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.blog-content h2 {
  font-size: 24px;
  margin-top: 30px;
  color: #333;
}

.blog-content ul {
  padding-left: 20px;
  margin-bottom: 20px;
}

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

blockquote {
  font-style: italic;
  border-left: 4px solid #007BFF;
  padding-left: 16px;
  color: #444;
  margin: 20px 0;
}

.hashtags {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hashtags span {
  background: #eef2f7;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  color: #333;
}

.blog-footer {
  margin-top: 40px;
  text-align: center;
}

.back-link {
  color: #007BFF;
  text-decoration: none;
  font-weight: bold;
}

.back-link:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
  .blog-title {
    font-size: 26px;
  }

  .blog-content p,
  .blog-content li {
    font-size: 16px;
  }

  .hashtags span {
    font-size: 12px;
    padding: 5px 10px;
  }
}

.blog-author {
  font-size: 14px;
  color: #555;
  margin: 4px 0 16px;
}
.blog-date {
  font-size: 13px;
  color: #777;
}


/* ===== Comment Section ===== */
#commentSection {
  max-width: 700px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

#commentSection h3 {
  margin-bottom: 15px;
  font-size: 1.3rem;
  color: #333;
  font-weight: 600;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border 0.3s;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: #007bff;
  outline: none;
}

.comment-form button {
  background: #007bff;
  color: #fff;
  padding: 12px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

.comment-form button:hover {
  background: #0056b3;
}

/* ===== Comments List ===== */
#commentsList {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.comment-box {
  background: #f9f9f9;
  padding: 15px 18px;
  margin-bottom: 12px;
  border-radius: 8px;
  border-left: 4px solid #007bff;
}

.comment-box p {
  margin: 4px 0;
  color: #444;
}

.comment-box .time {
  font-size: 0.8rem;
  color: #888;
  margin-left: 8px;
}

.delete-btn {
  margin-top: 8px;
  padding: 6px 12px;
  font-size: 0.85rem;
  background: #dc3545;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

.delete-btn:hover {
  background: #a71d2a;
}

/* ===== Admin Controls ===== */
.admin-controls {
  text-align: center;
  margin-top: 25px;
}

.btn-admin {
  background: #222;
  color: #fff;
  padding: 10px 18px;
  margin: 5px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-admin:hover {
  background: #007bff;
}

.btn-admin.logout {
  background: #444;
}

.btn-admin.logout:hover {
  background: #e63946;
}

/* ===== Modal Popup ===== */
.modal {
  display: none; 
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
}

.modal-content {
  background: #fff;
  margin: 10% auto;
  padding: 25px;
  border-radius: 10px;
  max-width: 400px;
  text-align: center;
  position: relative;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.modal-content h2 {
  margin-bottom: 15px;
  font-size: 1.3rem;
  color: #333;
}

.modal-content input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.9rem;
}

.modal-content .btn-admin {
  width: 100%;
}

.close {
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #888;
}

.close:hover {
  color: #000;
}

/* Toast Notification */
.toast {
  visibility: hidden;
  min-width: 250px;
  margin-left: -125px;
  background: #28a745;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 14px;
  position: fixed;
  z-index: 10000;
  left: 50%;
  bottom: 30px;
  font-size: 16px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.5s, bottom 0.5s;
}

.toast.show {
  visibility: visible;
  opacity: 1;
  bottom: 50px;
}




