/* Posts CSS */

/* Posts Section */
.posts-section {
    padding: 30px 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

@media (max-width: 992px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

.posts-header {
    margin-bottom: 25px;
}

.posts-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.posts-subtitle {
    color: rgba(255, 255, 255, 0.7) !important;
    /* Light for dark theme */
    font-size: 1.2rem;
}

/* Post Cards */
.posts-list {
    display: grid;
    gap: 20px;
}

.post-card {
    display: flex;
    gap: 20px;
    padding: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.post-card__image-link {
    flex-shrink: 0;
    position: relative;
}

.post-card__image {
    width: 180px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
}

.post-card__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea20, #764ba220);
    font-size: 2rem;
    color: #667eea;
}

.post-card__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #f6d365, #fda085);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
}

.post-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card__title-link {
    text-decoration: none;
}

.post-card__title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #ffffff !important;
    /* Light for dark theme */
    transition: color 0.2s;
    line-height: 1.4;
}

.post-card__title:hover {
    color: #667eea;
}

.post-card__excerpt {
    flex: 1;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8) !important;
    /* Light for dark theme */
    line-height: 1.6;
    margin-bottom: 12px;
}

.post-card__meta {
    display: flex;
    gap: 20px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6) !important;
    /* Light muted for dark theme */
}

.post-card__meta i {
    margin-right: 4px;
}

@media (max-width: 576px) {
    .post-card {
        flex-direction: column;
    }

    .post-card__image {
        width: 100%;
        height: 180px;
    }
}

/* Posts Empty */
.posts-empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.posts-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Pagination */
.posts-pagination {
    margin-top: 30px;
}

/* Sidebar */
.posts-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    padding: 20px;
}

.sidebar-widget__title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
    color: #ffffff !important;
    /* Light for dark theme */
}

.sidebar-widget__list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-widget__empty {
    color: #888;
    font-size: 1.1rem;
    text-align: center;
    padding: 20px;
}

.sidebar-post {
    display: flex;
    gap: 12px;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.sidebar-post:hover {
    background: rgba(102, 126, 234, 0.1);
}

.sidebar-post__thumb {
    width: 70px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.sidebar-post__info {
    flex: 1;
}

.sidebar-post__title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff !important;
    /* Light for dark theme */
    margin-bottom: 4px;
    line-height: 1.3;
}

.sidebar-post__date {
    font-size: 1.1rem;
    color: #888;
}

/* Post Detail */
.post-detail {
    padding: 30px 0;
}

.post-breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #888;
}

.post-breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.post-breadcrumb a:hover {
    text-decoration: underline;
}

.post-breadcrumb span {
    margin: 0 8px;
}

.post-detail__grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

@media (max-width: 992px) {
    .post-detail__grid {
        grid-template-columns: 1fr;
    }
}

.post-detail__card {
    padding: 30px;
}

.post-detail__header {
    margin-bottom: 25px;
}

.post-detail__title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 20px;
    color: #ffffff !important;
    /* Light for dark theme */
}

.post-detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #888;
    font-size: 1.1rem;
}

.post-detail__meta i {
    margin-right: 5px;
}

.post-detail__thumbnail {
    margin-bottom: 25px;
    border-radius: 12px;
    overflow: hidden;
}

.post-detail__thumbnail img {
    width: 100%;
    height: auto;
}

.post-detail__content {
    font-size: 1.4rem;
    line-height: 2.1;
    color: rgba(255, 255, 255, 0.9) !important;
    /* Light for dark theme */
}

.post-detail__content h2,
.post-detail__content h3 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: #ffffff;
}

.post-detail__content p {
    margin-bottom: 15px;
}

.post-detail__content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

.post-detail__content ul,
.post-detail__content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.post-detail__content li {
    margin-bottom: 8px;
}

/* Actions */
.post-detail__actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.post-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.post-action-btn:hover {
    background: #667eea;
    color: #fff;
}

.post-action-btn--liked {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
}

.post-action-btn--liked:hover {
    background: linear-gradient(135deg, #ee5a24, #ff6b6b);
}

/* Comments */
.post-comments {
    margin-top: 30px;
    padding: 30px;
}

.post-comments__title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #ffffff;
}

/* Comment Form */
.comment-form {
    margin-bottom: 30px;
}

.comment-form__input-wrapper {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.comment-form__avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-form__avatar-fallback {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.comment-form__input {
    flex: 1;
    padding: 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 1.3rem !important;
    /* Increased size for readability */
    color: #222 !important;
    /* Dark text for visibility */
    resize: vertical;
    min-height: 100px;
    /* Increased height */
    transition: border-color 0.2s;
}

.comment-form__input:focus {
    outline: none;
    border-color: #667eea;
}

.comment-form__input::placeholder {
    color: #666 !important;
    /* Visible placeholder */
    font-size: 1.3rem !important;
}

.comment-form__btn {
    padding: 14px 30px;
    /* Larger button */
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 1.2rem !important;
    /* Increased size */
    font-weight: 600;
    /* Bolder */
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.comment-form__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.comment-form__btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Comment Notice */
.comment-notice {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    margin-bottom: 25px;
    color: #667eea;
}

.comment-notice--warning {
    background: rgba(255, 193, 7, 0.15);
    color: #856404;
}

.comment-notice i {
    font-size: 1.5rem;
}

.comment-notice a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

/* Comments List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comments-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.comments-empty i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.comment-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
}

.comment-item--new {
    animation: fadeIn 0.5s ease;
    background: rgba(102, 126, 234, 0.05);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-item__avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-item__avatar-fallback {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.comment-item__content {
    flex: 1;
}

.comment-item__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-item__username {
    font-weight: 700;
    /* Bolder */
    font-size: 1.3rem !important;
    /* Larger */
    color: #ffffff !important;
    /* Light for dark theme */
}

.comment-item__time {
    font-size: 1.1rem !important;
    /* Increased from 0.8rem */
    color: rgba(255, 255, 255, 0.5) !important;
    /* Light muted for dark theme */
}

.comment-item__text {
    font-size: 1.3rem !important;
    /* Increased from 0.95rem */
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9) !important;
    /* Light for dark theme */
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {

    .post-card__title,
    .post-detail__title,
    .sidebar-post__title,
    .sidebar-widget__title,
    .post-comments__title,
    .comment-item__username {
        color: #eee;
    }

    .post-card__excerpt,
    .post-detail__content,
    .comment-item__text {
        color: #bbb;
    }

    .comment-form__input {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
        color: #eee;
    }

    .comment-item {
        background: rgba(255, 255, 255, 0.03);
    }
}