/*----------------------------------------------------------------
 * Стил за блог-а
 ----------------------------------------------------------------*/
:root {
    --primary-color: #00a33a;
    --secondary-color: #62ef99;
    --text-color: #2d3436;
    --light-bg: #f8f9fa;
    --card-shadow: 0 6px 9px rgba(0, 0, 0, 0.1);
}

/* Hero Styles */
.blog-hero {
    background-color: var(--light-bg);
    padding: 4rem 0;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Sidebar Styles */
.sidebar-widget {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    color: var(--text-color);
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 0.5rem;
}

.category-item a {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.category-item a:hover,
.category-item.active a {
    background-color: var(--primary-color);
    color: white;
}

.popular-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-post-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.popular-post-item .post-image {
    width: 60px;
    height: 60px;
    border-radius: 5px;
    overflow: hidden;
    margin-right: 10px;
}

.popular-post-item img {
    width: 100%;
    height: auto;
}

.post-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;

}

.post-card:hover {
    transform: translateY(-5px);
}

.post-image {
    position: relative;
}

.post-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-size: 0.8rem;
}

.post-content {
    padding: 1rem;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.post-excerpt {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #999;
}

.meta-item {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.pagination-wrapper {
    margin: 2rem 0;
}

.pagination {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 0;
}

.page-item {
    margin: 0 5px;
}

.page-link {
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    color: var(--primary-color);
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.page-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.5rem 1rem;
    background: var(--light-bg);
    border-radius: 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.3s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
}
.post-image img {
    max-width: 85%; /* Ограничаване на ширината до 100% от родителския елемент */
    height: auto; /* Автоматично регулиране на височината */
    object-fit: cover; /* Запазване на пропорциите на изображението */
}
.meta-button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.meta-button:hover {
    background: var(--secondary-color);
}

.toggle-comments {
    margin-left: auto;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.toggle-comments:hover {
    background: var(--secondary-color);
}

.comments-section {
    margin-top: 1rem;
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.comment {
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.comment:hover {
    transform: translateY(-2px);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author, .comment-time {
    font-weight: bold;
    color: #333;
}

.comment-time {
    color: #999;
    font-size: 0.9rem;
}

.comment-header i {
    margin-right: 0.3rem;
}

.comment-text {
    margin: 0;
}

.reply-button {
    margin-top: 0.5rem;
    padding: 0.2rem 0.4rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s;
}
.save-button {
    margin-top: 0.5rem;
    padding: 0.2rem 0.4rem;
    background: rgba(53, 159, 53, 0.75);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s;
}
.cancel-button {
    margin-left: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.2rem 0.4rem;
    background: rgba(248, 85, 85, 0.63);

    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s;
}

.reply-button:hover {
    background: var(--secondary-color);
}

.comment-form {
    display: flex;
    flex-direction: column;
    margin-top: 1rem;
}

.comment-form textarea {
    resize: none;
    height: 100px;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 1px solid var(--text-color);
    border-radius: 5px;
    font-size: 0.9rem;
}

.comment-form button {
    padding: 0.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.comment-form button:hover {
    background: var(--secondary-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeIn 0.5s ease forwards;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .blog-hero {
        padding: 3rem 0;
    }

    .sidebar-widget {
        margin-bottom: 1.5rem;
    }

    .post-card {
        margin-bottom: 1.5rem;
    }
}

.post-meta {
    display: flex;
    align-items: center;
    margin-top: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.meta-item i {
    margin-right: 0.3rem;
}
.post-card {
    position: relative; /* Позволява позициониране на дъщерни елементи */
}

.post-likes {
    display: flex; /* Използваме Flexbox за подравняване */
    align-items: center; /* Центрираме вертикално бутоните */
    margin-top: 1rem; /* Разстояние от съдържанието на поста */
}

.like-button, .dislike-button {
    background: none; /* Без фон */
    border: none; /* Без рамка */
    color: #999; /* Сив цвят по подразбиране */
    cursor: pointer; /* Курсор при задържане */
    font-size: 1rem; /* Размер на шрифта */
    display: flex; /* Използваме Flexbox за подравняване */
    align-items: center; /* Центрираме вертикално */
    margin-left: 1rem; /* Разстояние между бутоните */
}

.like-button.active {
    color: var(--primary-color); /* Основен цвят при активиране */
}

.dislike-button.active {
    color: red; /* Червен цвят при активиране */
}

.like-count, .dislike-count {
    margin-left: 0.3rem; /* Разстояние между иконката и числото */
}
.comment-login-message {
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
}
.comment-login-message p {
    margin: 5px 0;
}

.comment-login-message a {
    color: #00a33a; /* Основният цвят на сайта */
    font-weight: bold;
    text-decoration: none;
}

.comment-login-message a:hover {
    text-decoration: underline;
}

.comment-warning-message {
    padding: 15px;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
    color: #856404;
}

.comment-actions {
    display: flex;
    align-items: center; /* Центрираме елементите по вертикала */
    margin-top: 10px;
}

.reply-button {
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-button:hover {
    opacity: 0.8;
}

.edit-delete-buttons {
    display: flex;
    gap: 10px; /* Разстояние между бутоните за редактиране и изтриване */
    margin-left: auto; /* Премества бутоните в дясно */
}

.edit-form {
    margin-top: 10px;
}

.edit-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.edit-form-buttons {
    display: flex;
    gap: 10px;
}
.comments-section {
    margin-top: 20px;
}

.comment {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.comment.reply {
    margin-left: 40px;
    border-left: 3px solid var(--primary-color);
    background: #f1f3f5;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #6c757d;
}

.comment-author {
    font-weight: 500;
}

.comment-time {
    font-size: 0.9em;
}

.comment-text {
    margin-bottom: 10px;
}

.comment-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.show-replies-button {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.show-replies-button:hover {
    background-color: #e9ecef;
    color: var(--secondary-color );
}

.replies-container {
    margin-top: 10px;
    padding-left: 20px;
    border-left: 2px solid #dee2e6;
}

.reply-form-container {
    margin-top: 10px;
    padding: 15px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.reply-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-bottom: 10px;
    resize: vertical;
}

.reply-form-buttons {
    display: flex;
    gap: 10px;
}

.action-button {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.action-button:hover {
    opacity: 0.8;
}

/* Анимации */
.replies-container {
    transition: all 0.3s ease-in-out;
}

.comment.reply {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}





/*----------------------------------------------------------------
 * Стил за Пост НАЧАЛО
 ----------------------------------------------------------------*/
.post-container .post {
    background: white;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}



.post-container .post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.post-container .post-title {
    font-size: 2rem;
    color: var(--text-color);
    margin: 0;
}

.post-container .post-meta-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.post-container .post-date,
.post-container .post-author {
    font-size: 0.9rem;
    color: #6c757d;
}

.post-container .post-content {
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.6;
}

.post-container .post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.post-container .post-likes {
    display: flex;
    align-items: center;
}

.post-container .like-button,
.post-container .dislike-button
{
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.post-container .like-button:hover,
.post-container .dislike-button:hover
{
    color: var(--secondary-color);
}

.post-container .comments-section {
    margin-top: 2rem;
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.post-container .comment-form {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.post-container .comment-form textarea {
    resize: none;
    height: 100px;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 1px solid var(--text-color);
    border-radius: 5px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}
.edit-textarea {
    resize: none;
    height: 100px;
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 1px solid var(--text-color);
    border-radius: 5px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.post-container .comment-form textarea:focus {
    border-color: var(--primary-color);
}

.post-container .comment-form button {
    padding: 0.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.post-container .comment-form button:hover {
    background: var(--secondary-color);
}

.post-container .comment {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.post-container .comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #6c757d;
}

.post-container .comment-author {
    font-weight: 500;
}

.post-container .comment-time {
    font-size: 0.9em;
}

.post-container .comment-text {
    margin-bottom: 10px;
}
.post-container .post-meta-info {
    display: flex;
    align-items: flex-start;
    font-size: 0.9rem; /* Размер на шрифта */
    color: #6c757d; /* Цвета на текста */
}

.post-container .post-date,
.post-container .post-author {
    display: flex;
    align-items: center; /* Центрира текста и иконата по вертикала */
}

.post-container .post-date i,
.post-container .post-author i {
    margin-right: 0.3rem; /* Разстояние между иконата и текста */
}
.post-container .post-meta {
    display: flex;
    justify-content: space-between; /* Разделя бутоните за лайк и споделяне */
    align-items: center;
    margin-top: 1rem;
}

.post-container .post-likes {
    display: flex;
    align-items: center;
}

.post-container .like-button,
.post-container .dislike-button {
    background: none;
    border: none;
    color: #999999;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease;
    margin-right: 0.5rem; /* Разстояние между бутоните */
}
.post-container .like-button.active {
    color: var(--primary-color); /* Цвят при натискане */
}
.post-container .dislike-button.active {
    color: red;
}

.post-container .like-button:hover {
    color: var(--secondary-color);
}
.post-container .dislike-button:hover {
    color: red;
}

.post-container .share-button {
    width: 20%;
    padding: 12px;
    margin-top: 10px;
    background-color: #00a33a;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.post-container .share-button:hover {
    background-color: #007f2a;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.post-container .share-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.6s;
}

.post-container .share-button:hover::before {
    left: 100%;
}


.post-container .comment-form button {
    width: 10%;
    padding: 8px;
    margin-top: 5px;
    background-color: #00a33a;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.post-container .comment-form button:hover {
    background-color: #007f2a;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.post-container .comment-form button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.6s;
}

.post-container .comment-form button:hover::before {
    left: 100%;
}
.delete-confirmation {
    text-align: center;

}
.confirm-yes {
    background: none;
    color: green;
    border: none;

    font-size: 1.7rem;
    cursor: pointer;
    transition: color 0.3s ease;
    margin-right: 0.5rem; /* Разстояние между бутоните */
}

.confirm-no {
    background: none;
    border: none;
    color:red;
    font-size: 1.7rem;
    cursor: pointer;
    transition: color 0.3s ease;
    margin-right: 0.5rem; /* Разстояние между бутоните */

}