/* Blog Post Page */
.blog-container {
  width: 95%;
  max-width: 1200px;
  margin: 0 auto;
}

.blog-post {
  padding: 50px 0;
}

.blog-post article {
  background: white;
  padding: 10px 2%;
  border-radius: 8px;
  -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.blog-post h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.blog-post .meta {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 20px;
}

.blog-post img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  margin-bottom: 20px;
}

.blog-post .content {
  line-height: 1.8;
  font-size: 1.1rem;
}

.blog-post .content h3 {
  font-size: 1.8rem;
  margin-top: 30px;
  margin-bottom: 15px;
}

.blog-post .content p {
  margin-bottom: 20px;
}

.blog-post .content blockquote {
  border-left: 5px solid #4caf50;
  padding-left: 15px;
  margin: 20px 0;
  font-style: italic;
  color: #555;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 16px;
  text-align: left;
}

th,
td {
  border: 1px solid #ddd;
  padding: 10px;
}

th {
  background-color: #f4f4f4;
  font-weight: bold;
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}

tr:hover {
  background-color: #e9e9e9;
}

td strong {
  color: #333;
}
.post-table__page-controls th,
.post-table__page-controls td{
border:none !important;
}
.overflow-x-auto.contain-inline-size {
    overflow-x: auto;
}
.comment-section {
    width: 95%;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
    background: #fff;
    border-radius: 8px;
    margin-top: 60px;
    webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
textarea.edit-input {
    width: 100%;
    height: 100px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}
.comment-form {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 10px;
}

.comment-form textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
}
.reply-form textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    margin: 20px 0;
}
.comment-options {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 10px;
}

.comment-btn {
    background: #007BFF;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

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

.comments-container {
    margin-top: 20px;
}

.comment-card {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    box-sizing:border-box;
}

.comment-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 10px;
}

.comment-header .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.comment-author {
    font-weight: bold;
}

.comment-date {
    font-size: 12px;
    color: #777;
}

.comment-text {
    margin: 10px 0;
}

.comment-actions {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 10px;
}
.post-share__button {
    background: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}
.post-share__button:hover {
background: var(--grey-color);
}
.reply-btn, .like-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
}
button.delete-btn {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    margin-left: auto;
    border: none;
    background: none;
    cursor:pointer;
    border-radius:4px;
}
button.edit-btn,button.save-edit {
    cursor: pointer;
    border: none;
    background: none;
    border-radius:4px;
}
button.delete-btn:hover,button.edit-btn:hover,button.save-edit:hover{
background: var(--grey-color);
}
.reply-btn:hover {
    color: #007BFF;
}

.like-btn {
    color: #000;
    -webkit-transition:0.3s;
    -o-transition:0.3s;
    transition:0.3s;
}
.like-btn:hover {
    -webkit-transform: scale(1.1);
        -ms-transform: scale(1.1);
            transform: scale(1.1);
}
.heart-icon {
    -webkit-transition: fill 0.3s ease-in-out, stroke 0.3s ease-in-out;
    -o-transition: fill 0.3s ease-in-out, stroke 0.3s ease-in-out;
    transition: fill 0.3s ease-in-out, stroke 0.3s ease-in-out;
}

.filled-heart path {
    fill: var(--primary-color) !important;
    stroke: var(--primary-color) !important;
}

/* General comment card styles */
.comment-card {
    max-width: 100%;  /* Ensure comments don’t shrink too much */
    box-sizing:border-box;
    border-left: 1px solid #ddd;
    padding: 10px 0 20px 10px;
    border-radius: 0px;
    background: #fff;
    -webkit-transition:0.1s;
    -o-transition:0.1s;
    transition:0.1s;
}
/* Ensure text wraps properly */
.comment-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
/* Style nested replies */
.reply-section {
    margin-left: 40px; /* Indentation for replies */
    max-width: calc(100% - 40px); /* Prevents replies from getting too small */
}

/* Limit excessive nesting */
.reply-section .reply-section .reply-section .reply-section {
    margin-left: 0px !important;  /* Stops excessive indentation */
    max-width: 100%; /* Prevents text from being squished */
 
}

/* Generic: Remove padding for 4th level and deeper comment-cards */
.reply-section:nth-of-type(n+4) .comment-card,
.reply-section .reply-section:nth-of-type(n+3) .comment-card,
.reply-section .reply-section .reply-section:nth-of-type(n+2) .comment-card,
.reply-section .reply-section .reply-section .reply-section .comment-card {
    padding-left: 2px !important;
    border-left:1px solid #eee;
}


.iframe-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}


/* Mobile-friendly adjustments */
@media (max-width: 768px) {
    .reply-section {
        margin-left: 0px; /* Reduce indentation on mobile */
        max-width: calc(100% - 0px);
    }
    .reply-section .comment-card:nth-child(n+3) {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
}

/* Responsive Adjustments */

@media (max-width: 400px) {
  .blog-post h2 {
    font-size: 1.5rem;
  }
  .blog-post article {
    padding: 20px 5px;
}
}