
/* Combined posts.css */
/* Base Styles */
body {
    font-family: Arial, sans-serif;
    padding: 20px;
    background: #f2f2f2;
    line-height: 1.6;
    color: #333;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    background: #333;
    color: white;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #fff;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    color: #ccc;
}

.post-meta .author {
    font-weight: 600;
}

.post-meta .date {
    color: #aaa;
}

.pinned-badge {
    background-color: #f0f7ff;
    color: #0066cc;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pinned-badge i {
    font-size: 0.7rem;
}

main {
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Post Content Styles */
.post-content {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.post-content p {
    margin-bottom: 1.2em;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* Image Wrapper Styles - Preserved from original */
#img {
    margin: 25px 0;
}

.image-wrapper {
    margin: 20px 0;
    display: inline-block;
    background: #f8f8f8;
    line-height: 0;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* Specific Aspect Ratios with Fixed Sizes - Preserved from original */
.ratio-1-1 {
    width: 300px;
    height: 300px;
}

.ratio-16-9 {
    width: 320px;
    height: 180px;
}

.ratio-4-3 {
    width: 400px;
    height: 300px;
}

.ratio-9-16 {
    width: 270px;
    height: 480px;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
}

/* Image Alignment Styles - Preserved from original */
.align-left {
    display: block;
    margin-left: 0;
    margin-right: auto;
    text-align: left;
}

.align-center {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.align-right {
    display: block;
    margin-left: auto;
    margin-right: 0;
    text-align: right;
}

/* Post Actions Styles */
.post-actions {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.like-section {
    margin-bottom: 20px;
}

.like-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    transition: all 0.2s;
}

.like-btn:hover {
    background-color: #f5f5f5;
}

.like-btn.liked {
    color: #e74c3c;
}

.like-btn.liked:hover {
    background-color: #fde8e6;
}

.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 80px;
    margin-bottom: 10px;
    font-family: inherit;
    resize: vertical;
}

.comment-form button {
    background-color: #4a6fa5;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.comment-form button:hover {
    background-color: #3a5a8a;
}

/* Comments Section Styles */
.comments-section {
    margin: 30px 0;
}

.comments-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #444;
}

.comment {
    padding: 15px;
    margin-bottom: 15px;
    background-color: #fafafa;
    border-radius: 6px;
    border-left: 3px solid #ddd;
}

.comment.flagged {
    border-left-color: #ff6b6b;
    background-color: #fff5f5;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.comment-author {
    font-weight: 600;
    color: #444;
}

.comment-date {
    color: #888;
    font-size: 0.8rem;
}

.flagged-label {
    background-color: #ff6b6b;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
}

.comment-content {
    font-size: 0.95rem;
    line-height: 1.5;
}

.comment-actions {
    margin-top: 10px;
    text-align: right;
}

.delete-comment {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 5px;
}

.delete-comment:hover {
    text-decoration: underline;
}

/* Navigation Styles */
.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.back-link {
    color: #007bff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: bold;
}

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

.edit-link {
    color: #666;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-weight: bold;
}

.edit-link:hover {
    background-color: #f5f5f5;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .post-meta {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .navigation {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    /* Preserved responsive image ratios */
    .ratio-1-1 {
        width: 250px;
        height: 250px;
    }
    .ratio-16-9 {
        width: 100%;
        height: auto;
        max-width: 320px;
    }
    .ratio-4-3 {
        width: 100%;
        height: auto;
        max-width: 400px;
    }
    .ratio-9-16 {
        width: 180px;
        height: 320px;
    }
}

@media (max-width: 600px) {
    body{
        padding: 5px;
        margin: 0px;        
    }
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .post-meta {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .navigation {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    /* Preserved responsive image ratios */
    .ratio-1-1 {
    width: 180px;
    height: 180px;
  }

  .ratio-16-9 {
    width: 240px;
    height: 135px; /* 16:9 aspect ratio */
  }

  .ratio-4-3 {
    width: 240px;
    height: 180px; /* 4:3 aspect ratio */
  }

  .ratio-9-16 {
    width: 135px;
    height: 240px; /* 9:16 aspect ratio */
  }


}


/* Add this to your existing CSS, or replace the comment-form section */

.comment-form {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.comment-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    min-height: 100px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.15s ease-in-out;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.comment-form button[type="submit"] {
    align-self: flex-start;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.15s ease-in-out;
}

.comment-form button[type="submit"]:hover {
    background-color: #0069d9;
}

/* If the form is still not showing, add this to force display */
.comment-form {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
}