















/********html css ends********/






body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f4f4f4;
  color: #333;
}

header {
  color: #fff;
  padding: 15px;
  display: flex;
  justify-content: space-between;     
  align-items: center;
}

header h1 {
  margin: 0;
}

.btn {
  background: #007BFF;
  color: #fff;
  padding: 10px 15px;
  text-decoration: none;
  border-radius: 5px;
}



form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}



input[type="text"], textarea {
  padding: 10px;
  width: 100%;
  font-size: 16px;
}

#blog-list .blog-preview {
  display: flex;
  background: white;
  margin-bottom: 15px;
  border-radius: 6px;
  gap: 15px;
  cursor: pointer;
  transition: background 0.2s;
}
/*
#blog-list .blog-preview:hover {
  background: #f0f0f0;
}*/

.blog-preview-image {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 5px;
}

.blog-image {
  max-width: 100%;
  margin: 20px 0;
  border-radius: 10px;
}



.blog-preview {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}



.blog-preview-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
}




.blog-full-view {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}


.blog-full-view img.blog-image {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  border-radius: 8px;
}


.delete-btn {
  margin-top: 20px;
  background: #dc3545;
  color: white;
  border: none;
}

.delete-btn:hover {
  background: #c82333;
}









body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background: #fff;
  color: #1a1a1a;
}

main {
  /* padding: 30px 65px 30px 65px; */
}

/* Place this at the very end of style.css */
@media (max-width: 768px) {
  main {
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box;
  }
}


.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  padding-left: 6%;
  padding-right: 6%;
  
}

.blog-preview {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s ease;
  cursor: pointer;
}
/*
.blog-preview:hover {
  transform: translateY(-5px);
}*/

.blog-preview-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.blog-preview div {
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

/* Category */
.blog-preview .category {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  margin-bottom: 10px;
  text-transform: uppercase;
}

/* Title */
.blog-preview h2 {
  font-size: 18px;
  font-weight: bold;
  margin: 0 0 10px;
}

/* Description */
.blog-preview p {
  font-size: 15px;
  color: #555;
  line-height: 1.5;
  margin: 0 0 15px;
}

/* Author section */
.author {
  display: flex;
  align-items: center;
  margin-top: auto;
}

.author img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 10px;
}

.author-name {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}



/* for the imag of the blog. */


input[type="file"] {
  width: 93%;
  padding: 10px 12px;
  font-size: 16px;
  margin-top: 5px;
  margin-bottom: 20px;
  border: 2px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

/* Label style */
.custom-file-wrapper label {
  font-weight: bold;
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

@media (max-width: 768px){
  input[type="text"], textarea {
    padding: 10px;
    width: 93%;
    font-size: 16px;
    }
}








/*+++++++++++++++++++++++++++++++ CATEGORY HEADER +++++++++++++++++++++++++*/

.category-section {
  margin-bottom: 40px  ;
  margin-top: 10%;
}

.category-title {
  font-size: 24px;
  margin: 10px 10px;
  color: #333;
  /* border-left: 4px solid #007BFF;
  padding-left: 10px; */
}

/* BLOG ROW = FLEX GRID */
.blog-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
  padding: 0 10px;
}

/* BLOG PREVIEW CARD */
.blog-preview {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  width: calc(25% - 20px); /* 4 per row with 20px gap */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease-in-out;
}

.blog-preview:hover {
  transform: scale(1.02);
}

/* BLOG IMAGE */
.blog-preview-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid #ddd;
}

/* BLOG TEXT */
/* .blog-content {
  padding: 10px 15px;
} */

.blog-content h3 {
  font-size: 18px;
  margin: 10px 0 5px;
  color: #222;
}

.blog-content p {
  font-size: 14px;
  margin: 4px 0;
  color: #555;
}


/* RESPONSIVE (2 per row on small screens) */
@media (max-width: 992px) {
  .blog-preview {
    width: calc(50% - 20px);
  }
}

/* RESPONSIVE (1 per row on mobile) */
@media (max-width: 600px) {
  .blog-preview {
    width: 100%;
  }
}





.blog-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  gap: 10px;
}

.like-btn, .share-btn {
  background: rgba(0, 0, 0, 0.557);
  border: 1px solid rgba(0, 0, 0, 0.2);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.like-btn:hover, .share-btn:hover {
  background: #00bcd4;
}

.comments-section {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

#commentForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

#commentForm input, #commentForm textarea {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 10px;
  border-radius: 6px;
}

#commentForm button {
  background: #00bcd4;
  border: none;
  padding: 10px;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
}

.comment-item {
  background: rgba(255,255,255,0.05);
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}
