/* ============================================
   Страница поста - Hero секция
   ============================================ */
.post-hero {
    position: relative;
    height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 40px;
    display: flex;
    align-items: flex-end;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.15);
}

@media (max-width: 768px) {
    .post-hero {
        height: 350px;
        border-radius: 12px;
    }
}

.post-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(15, 39, 68, 0.3) 0%, rgba(15, 39, 68, 0.8) 100%);
}

.post-hero-content {
    position: relative;
    z-index: 1;
    padding: 40px;
    color: #ffffff;
    width: 100%;
    text-align: center;
}

@media (max-width: 768px) {
    .post-hero-content {
        padding: 25px;
    }
}

.post-categories-single {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.post-categories-single .category-link {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.post-categories-single .category-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.post-title-single {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 25px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    background: none;
    -webkit-text-fill-color: #ffffff;
}

@media (max-width: 768px) {
    .post-title-single {
        font-size: 1.8rem;
    }
}

.post-meta-single {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.post-author,
.post-date,
.post-comments {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.post-author svg,
.post-date svg,
.post-comments svg {
    color: var(--primary-light);
}

/* Старые стили для поста без изображения */
.post-header-single {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
}

/* Контент поста */
.post-content-single {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-medium);
}

@media (max-width: 768px) {
    .post-content-single {
        padding: 25px;
    }
}

.post-content-single h2,
.post-content-single h3,
.post-content-single h4,
.post-content-single h5,
.post-content-single h6 {
    color: var(--text-dark);
    font-weight: 700;
    margin-top: 35px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-content-single h2 {
    font-size: 1.8rem;
    border-left: 4px solid var(--primary);
    padding-left: 15px;
}

.post-content-single h3 {
    font-size: 1.4rem;
}

.post-content-single h4 {
    font-size: 1.2rem;
}

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

.post-content-single a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}

.post-content-single a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.post-content-single img {
    border-radius: 12px;
    margin: 25px 0;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
}

.post-content-single blockquote {
    border-left: 4px solid var(--primary);
    padding: 20px 25px;
    margin: 30px 0;
    background: var(--bg-dark);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--text-dark);
}

.post-content-single blockquote p {
    margin-bottom: 0;
}

.post-content-single ul,
.post-content-single ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.post-content-single li {
    margin-bottom: 10px;
}

.post-content-single pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 25px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    border: 1px solid #334155;
}

.post-content-single code {
    background: var(--bg-dark);
    color: var(--primary-dark);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content-single pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.post-content-single hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    margin: 40px 0;
}

/* Теги */
.post-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.tag-link {
    background: var(--bg-dark);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tag-link::before {
    content: '#';
}

.tag-link:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Плавающая навигация по краям экрана */
.floating-navigation {
    position: relative;
    margin: 60px 0;
    padding: 0;
}

.floating-navigation .post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 0;
    position: relative;
}

.floating-navigation .nav-previous,
.floating-navigation .nav-next {
    background: linear-gradient(135deg, rgba(240, 247, 255, 0.9), rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(10px);
    padding: 20px 30px;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    position: absolute;
    top: 0;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.15);
}

.floating-navigation .nav-previous {
    left: 0;
    transform: translateX(-50%);
}

.floating-navigation .nav-next {
    right: 0;
    transform: translateX(50%);
}

.floating-navigation .nav-previous:hover,
.floating-navigation .nav-next:hover {
    transform: translateX(-50%) translateY(-5px);
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.25);
}

.floating-navigation .nav-next:hover {
    transform: translateX(50%) translateY(-5px);
}

.floating-navigation .float-nav-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.floating-navigation .nav-subtitle {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.floating-navigation .nav-subtitle svg {
    flex-shrink: 0;
}

.floating-navigation .nav-title {
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 1400px) {
    .floating-navigation .nav-previous {
        left: -100px;
        transform: none;
    }
    
    .floating-navigation .nav-next {
        right: -100px;
        transform: none;
    }
    
    .floating-navigation .nav-previous:hover,
    .floating-navigation .nav-next:hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 1200px) {
    .floating-navigation {
        margin: 40px 0;
    }
    
    .floating-navigation .post-navigation {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        position: static;
    }
    
    .floating-navigation .nav-previous,
    .floating-navigation .nav-next {
        position: static;
        transform: none !important;
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .floating-navigation .post-navigation {
        grid-template-columns: 1fr;
    }
}

/* Рекомендации */
.related-posts {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    position: relative;
}

.related-posts-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 35px;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.related-posts-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    right: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    margin: 0 auto;
    border-radius: 2px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

@media (max-width: 1024px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}

.related-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.related-thumbnail {
    margin: 0;
    padding: 0;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.related-card:hover .related-thumbnail img {
    transform: scale(1.08);
}

.related-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.related-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.related-title a {
    color: var(--text-dark);
    transition: color 0.2s ease;
}

.related-title a:hover {
    color: var(--primary);
}

.related-excerpt {
    color: var(--text-medium);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

.related-read-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.related-read-more:hover {
    color: var(--primary-dark);
    gap: 10px;
}

/* Анимация появления */
.post-navigation,
.related-posts {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.post-navigation {
    animation-delay: 0.2s;
}

.related-posts {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Комментарии */
.comments-area {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-top: 30px;
}

@media (max-width: 768px) {
    .comments-area {
        padding: 25px;
    }
}

.comments-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

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

.comment-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.comment-author .avatar {
    border-radius: 50%;
    border: 2px solid var(--border);
}

.comment-author .fn {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.comment-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

.comment-reply-link {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.comment-reply-link:hover {
    color: var(--primary-dark);
}

.comment-form {
    margin-top: 30px;
}

.comment-form p {
    margin-bottom: 20px;
}

.comment-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--bg-white);
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form input[type="submit"] {
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comment-form input[type="submit"]:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* Progress bar чтения */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    width: 0%;
    z-index: 9999;
    transition: width 0.1s;
}

/* Share кнопки */
.post-share {
    display: flex;
    gap: 10px;
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-dark);
    border-radius: 12px;
    align-items: center;
}

.post-share span {
    font-weight: 600;
    color: var(--text-dark);
    margin-right: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.telegram { background: #0088cc; }
.share-btn.vk { background: #0077ff; }
