/* Blog Page Styles */

/* Blog Header */
.blog-header {
    padding: 120px 20px 60px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1) 0%, rgba(79, 70, 229, 0.1) 100%);
    text-align: center;
}

.blog-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #A78BFA 0%, #818CF8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Content */
.blog-content {
    padding: 60px 20px;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.post-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(167, 139, 250, 0.15);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.post-card:hover {
    border-color: rgba(167, 139, 250, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(147, 51, 234, 0.15);
}

.post-image {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    padding: 25px;
}

.post-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #A78BFA;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.post-category:hover {
    color: #C4B5FD;
}

.post-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
}

.post-content h2 a {
    color: #fff;
    text-decoration: none;
}

.post-content h2 a:hover {
    color: #A78BFA;
}

.post-excerpt {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 15px;
}

.post-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.btn-link {
    display: inline-block;
    margin-top: 15px;
    color: #A78BFA;
}

/* Blog Sidebar */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(167, 139, 250, 0.15);
    border-radius: 12px;
    padding: 25px;
}

.sidebar-widget h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #A78BFA;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.category-list,
.links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li,
.links-list li {
    margin-bottom: 12px;
}

.category-list a,
.links-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.category-list a:hover,
.links-list a:hover {
    color: #A78BFA;
}

.category-list li.active a {
    color: #A78BFA;
    font-weight: 500;
}

.category-list span {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.page-link {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.page-link:hover {
    background: rgba(167, 139, 250, 0.1);
    border-color: rgba(167, 139, 250, 0.4);
    color: #A78BFA;
}

.page-link.active {
    background: linear-gradient(135deg, #9333EA 0%, #4F46E5 100%);
    border-color: transparent;
    color: #fff;
}

/* Single Post Styles */
.blog-post .post-header {
    padding: 120px 20px 40px;
    text-align: center;
}

.post-category-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(167, 139, 250, 0.15);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #A78BFA;
    margin-bottom: 20px;
}

.blog-post .post-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.post-meta-header {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
}

.post-featured-image {
    padding: 0 20px 40px;
}

.post-featured-image img {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: block;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.post-body {
    padding: 40px 20px 60px;
}

.post-content-wrapper {
    max-width: 750px;
    margin: 0 auto;
}

.post-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.post-text h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #fff;
    margin: 40px 0 20px;
}

.post-text h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    margin: 35px 0 15px;
}

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

/* Custom styled lists */
.post-text ul,
.post-text ol {
    margin: 20px 0;
    padding-left: 0;
    list-style: none;
}

.post-text ul li,
.post-text ol li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    line-height: 1.7;
}

/* Маркированный список - пурпурные точки */
.post-text ul li::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 10px;
    width: 8px;
    height: 8px;
    background: #A78BFA;
    border-radius: 50%;
}

/* Нумерованный список - пурпурные номера */
.post-text ol {
    counter-reset: list-counter;
}

.post-text ol li {
    counter-increment: list-counter;
    padding-left: 32px;
}

.post-text ol li::before {
    content: counter(list-counter) ".";
    position: absolute;
    left: 0;
    top: 0;
    color: #A78BFA;
    font-weight: 600;
    font-size: 1rem;
}

/* Вложенные списки */
.post-text ul ul,
.post-text ol ol,
.post-text ul ol,
.post-text ol ul {
    margin: 10px 0;
}

.post-text ul ul li::before {
    width: 6px;
    height: 6px;
    background: transparent;
    border: 2px solid #A78BFA;
}

.post-text a {
    color: #A78BFA;
    text-decoration: underline;
}

.post-text blockquote {
    border-left: 4px solid #A78BFA;
    padding: 15px 25px;
    margin: 30px 0;
    background: rgba(167, 139, 250, 0.08);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.post-text blockquote p {
    margin: 0;
    white-space: normal;
}

.post-text img {
    max-width: 100%;
    border-radius: 12px;
    margin: 30px 0;
}

.post-text code {
    background: rgba(167, 139, 250, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
}

.post-text pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 25px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.post-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
}

.post-text th,
.post-text td {
    border: 1px solid rgba(167, 139, 250, 0.2);
    padding: 12px 15px;
    text-align: left;
}

.post-text th {
    background: rgba(167, 139, 250, 0.1);
    font-weight: 600;
    color: #A78BFA;
}

.post-text tr:hover td {
    background: rgba(167, 139, 250, 0.05);
}

/* Share Buttons */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.share-buttons span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.share-btn {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.share-btn.twitter {
    background: rgba(29, 161, 242, 0.15);
    color: #1DA1F2;
}

.share-btn.facebook {
    background: rgba(66, 103, 178, 0.15);
    color: #4267B2;
}

.share-btn:hover {
    transform: translateY(-2px);
}

/* Related Posts */
.related-posts {
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.02);
}

.related-posts h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #A78BFA;
    margin-bottom: 30px;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
}

.related-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(167, 139, 250, 0.15);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-card:hover {
    border-color: rgba(167, 139, 250, 0.3);
}

.related-image {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
}

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

.related-card h3 {
    padding: 15px;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
}

.related-card h3 a {
    color: #fff;
}

.related-card h3 a:hover {
    color: #A78BFA;
}

/* Back to Blog */
.back-to-blog {
    padding: 40px 20px 60px;
    text-align: center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 8px;
    color: #A78BFA;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-link:hover {
    background: rgba(167, 139, 250, 0.2);
    transform: translateX(-5px);
}

/* Author Card in Post */
.post-author-card {
    margin-bottom: 35px;
}

.post-author-card .author-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(167, 139, 250, 0.08);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.post-author-card .author-link:hover {
    background: rgba(167, 139, 250, 0.12);
    border-color: rgba(167, 139, 250, 0.35);
}

.post-author-card .author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(167, 139, 250, 0.3);
    flex-shrink: 0;
}

.post-author-card .author-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.post-author-card .author-name {
    font-weight: 600;
    font-size: 1rem;
    color: #A78BFA;
}

.post-author-card .author-bio {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-widget {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .blog-header {
        padding: 100px 15px 50px;
    }

    .blog-content {
        padding: 40px 15px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        flex-direction: column;
    }

    .blog-post .post-header {
        padding: 100px 15px 30px;
    }

    .blog-post .post-header h1 {
        font-size: 1.75rem;
    }

    .post-text {
        font-size: 1rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}
