body {
  background: #f9fafb;
  font-family: 'Inter', sans-serif;
  color: #1f2937;
}

.post-wrapper {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  max-width: 1200px;
  gap: 2rem;
  margin: 3rem auto;
  padding: 0 2rem;
}

.post-main {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.post-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* Container for the entire section */
.post-info-container {
    display: flex; /* Use flexbox for horizontal layout */
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
    justify-content: space-between; /* Push details to left, actions to right */
    align-items: center; /* Vertically align items in the middle */
    padding: 15px 20px; /* Add some internal padding */
    margin-top: 20px; /* Space from the title */
    margin-bottom: 20px; /* Space before the main content */
    border-bottom: 1px solid #eee; /* Subtle separator line at the bottom */
    color: #666; /* Softer text color for metadata */
    font-size: 0.95em; /* Slightly smaller font size */
}

/* Grouping the metadata items (author, date, read time) */
.post-meta-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Space between each metadata item */
    align-items: center;
}

.meta-item {
    display: flex; /* Use flex for icon and text alignment */
    align-items: center;
    gap: 5px; /* Space between icon and text */
}

/* Optional: Make icons slightly larger or specific font */
.meta-item span:first-child { /* Targets the emoji/icon part */
    font-size: 1.1em;
}

/* Grouping the action buttons */
.post-actions {
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap if screen is too narrow */
    gap: 10px; /* Space between action buttons */
    align-items: center;
    margin-top: 10px; /* For when it wraps below meta details on small screens */
}

/* Basic button styling for consistency */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px; /* Slightly rounded corners */
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease; /* Smooth transitions */
    text-decoration: none; /* Remove underline from anchor buttons */
    display: inline-flex; /* Align icon and text properly */
    align-items: center;
    gap: 5px; /* Space between button icon and text */
}

.btn-read-later {
    background-color: #007bff; /* Primary blue for 'Read Later' */
    color: white;
}
.btn-publish {
    background-color: #013a15; /* Primary blue for 'Read Later' */
    color: white;
}


.btn-read-later:hover {
    background-color: #0056b3;
}

.btn-secondary { /* For Edit button */
    background-color: #6c757d; /* Grey for secondary action */
    color: white;
}
.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger { /* For Delete button */
    background-color: #dc3545; /* Red for destructive action */
    color: white;
}
.btn-danger:hover {
    background-color: #bd2130;
}

/* To make forms display inline with buttons/links */
.inline-form {
    display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .post-info-container {
        flex-direction: column; /* Stack details and actions vertically */
        align-items: flex-start; /* Align everything to the left */
        gap: 15px; /* Space between stacked sections */
    }
    .post-actions {
        margin-top: 0; /* Reset margin for stacking */
    }
}

/* Responsive styles for post detail page */
@media (max-width: 1024px) {
  .post-wrapper {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }
  .post-sidebar {
    flex-direction: row;
    gap: 1rem;
    flex-wrap: wrap;
  }
  .sidebar-box {
    flex: 1 1 300px;
    min-width: 220px;
  }
}

@media (max-width: 700px) {
  .post-main {
    padding: 1rem;
    border-radius: 8px;
  }
  .post-title {
    font-size: 1.5rem;
  }
  .post-info-container {
    padding: 10px 5px;
    font-size: 0.95em;
  }
  .comment-form {
    padding: 1rem;
    border-radius: 8px;
  }
  .end-of-blog {
    padding: 1rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .post-wrapper {
    padding: 0 0.2rem;
    gap: 0.7rem;
  }
  .post-main {
    padding: 0.5rem;
  }
  .post-title {
    font-size: 1.1rem;
  }
  .sidebar-box {
    padding: 0.7rem;
    font-size: 0.95rem;
  }
  .comment-form {
    padding: 0.5rem;
  }
  .form-group input,
  .form-group textarea {
    font-size: 0.95rem;
    padding: 0.5rem;
  }
  .submit-btn {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
  }
  .end-of-blog {
    font-size: 0.9rem;
    padding: 0.7rem;
  }
}

@media (max-width: 350px) {
  .post-title {
    font-size: 0.9rem;
  }
  .sidebar-box {
    font-size: 0.85rem;
  }
}

.post-image img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.post-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #374151;
}

.post-tags {
  margin-top: 1.5rem;
}

.tag {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  padding: 0.4rem 0.8rem;
  margin: 0.2rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

/* Sidebar */
.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-box {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.sidebar-box h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.4rem;
}

.popular-list {
  padding-left: 1rem;
  list-style: disc;
}

.popular-list a {
  text-decoration: none;
  color: #2563eb;
  font-size: 0.95rem;
}

/* Comments */
.comments {
  margin-top: 3rem;
}

.comment-list {
  list-style: none;
  padding: 0;
}

.comment-list li {
  background: #f3f4f6;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.comment-name {
  font-weight: 600;
}

.comment-text {
  margin-top: 0.3rem;
}

/* Comment Form */
.comment-form {
  margin-top: 3rem;
  background: #FFFDD0;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: 1rem;
}

.invalid input,
.invalid textarea {
  border-color: #dc2626;
  background: #fee2e2;
}

.submit-btn {
  background: #2563eb;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.submit-btn:hover {
  background: #1e40af;
}


.end-of-blog {
  text-align: center;
  margin: 3rem auto 2rem;
  color: #374151;
  font-size: 1.05rem;
  font-style: italic;
  background: #f1f5f9;
  padding: 1.5rem;
  border-radius: 8px;
  max-width: 800px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.03);
}

.end-of-blog hr {
  margin-bottom: 1rem;
  border: none;
  border-top: 2px solid #e5e7eb;
  width: 50%;
  margin-left: auto;
  margin-right: auto;
}

