/* Blog Styles */
.blog-post-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.blog-post-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.blog-placeholder {
    width: 100%;
    height: 200px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.blog-category a {
    background: #059669;
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-category a:hover {
    background: #047857;
    transform: translateY(-1px);
}

.blog-date {
    color: #6c757d;
    font-size: 0.9rem;
}

.blog-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-title a:hover {
    color: #059669;
}

/* Compact Blog Title for Homepage */
.blog-title-compact {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6rem;
}

.blog-title-compact a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-title-compact a:hover {
    color: #059669;
}

.blog-excerpt {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Compact Blog Excerpt for Homepage */
.blog-excerpt-compact {
    color: #6b7280;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.4rem;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.blog-stats {
    display: flex;
    gap: 1rem;
}

.blog-views,
.blog-reading-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #6b7280;
    font-size: 0.85rem;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-tag:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

/* Blog Detail Styles */
.blog-post-detail {
    background: #ffffff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-post-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1.5rem;
}

.blog-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.blog-excerpt {
    font-size: 1.1rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.blog-author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    color: #059669;
}

.author-name {
    font-weight: 600;
    color: #1f2937;
}

.blog-featured-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
}

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

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    color: #1f2937;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.blog-tags-section h5 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.blog-share h5 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-btn.facebook {
    background: #1877f2;
    color: #ffffff;
}

.share-btn.twitter {
    background: #1da1f2;
    color: #ffffff;
}

.share-btn.linkedin {
    background: #0077b5;
    color: #ffffff;
}

.share-btn.telegram {
    background: #0088cc;
    color: #ffffff;
}

.share-btn.copy {
    background: #6c757d;
    color: #ffffff;
    border: none;
    cursor: pointer;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: #ffffff;
    text-decoration: none;
}

/* Comments Styles */
.blog-comments {
    background: #ffffff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.comment-item {
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1f2937;
}

.comment-date {
    color: #6b7280;
    font-size: 0.9rem;
}

.comment-content {
    color: #374151;
    line-height: 1.6;
}

.comment-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 2rem;
}

.comment-login-required {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    margin-top: 2rem;
}

/* Sidebar Styles */
.blog-sidebar {
    position: sticky;
    top: 2rem;
}

.sidebar-widget {
    background: #ffffff;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #059669;
}

.featured-post-item,
.related-post-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.featured-post-item:last-child,
.related-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.featured-post-image,
.related-post-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.featured-post-image img,
.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-placeholder,
.related-placeholder {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.featured-post-content h6,
.related-post-content h6 {
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.featured-post-content a,
.related-post-content a {
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.featured-post-content a:hover,
.related-post-content a:hover {
    color: #059669;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    transition: all 0.3s ease;
}

.category-item:hover {
    background: #059669;
    color: #ffffff;
    text-decoration: none;
    transform: translateX(5px);
}

.category-item.active {
    background: #059669;
    color: #ffffff;
}

.category-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tag-item:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

/* Blog Horizontal Scroll */
.blog-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 1rem 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
    -webkit-overflow-scrolling: touch;
}

.blog-scroll-container::-webkit-scrollbar {
    display: none; /* WebKit */
}

.blog-scroll {
    display: flex;
    gap: 1.5rem;
    padding: 0 0.5rem;
    min-width: max-content;
}

.blog-item {
    flex-shrink: 0;
    width: 320px;
}

.blog-item .blog-post-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.blog-item .blog-post-image {
    height: 180px;
    overflow: hidden;
}

.blog-item .blog-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-item .blog-placeholder {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-item .blog-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-item .blog-excerpt {
    flex: 1;
}

/* Blog Toast Notifications */
.toast-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: toastFadeIn 0.3s ease;
    max-width: 350px;
    backdrop-filter: blur(10px);
}

.toast-notification.success {
    border-left: 4px solid #28a745;
}

.toast-notification.error {
    border-left: 4px solid #dc3545;
}

.toast-content {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 0.75rem;
}

.toast-icon {
    color: #ffffff;
    font-size: 1.2rem;
}

.toast-notification.error .toast-icon {
    color: #ff6b6b;
}

.toast-message {
    flex: 1;
    color: #ffffff;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f3f4f6;
}

@keyframes toastFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@media (max-width: 768px) {
    .toast-notification {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        right: auto;
        left: 50%;
        max-width: 90%;
        margin: 0 5%;
    }
}
