/* Single Post Page Styles - Enhanced with Dark Mode */
.single-post-page {
    padding: 60px 0;
    background: #f8f9fa;
    min-height: 100vh;
}

.single-post-container {
    max-width: 950px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Post Header */
.single-post-header {
    background: white;
    border-radius: 24px;
    padding: 50px 60px;
    margin-bottom: 30px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.single-post-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.single-post-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.single-post-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.938rem;
    font-weight: 500;
}

.single-post-meta-item svg {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.single-post-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(200, 160, 85, 0.3);
}

.single-post-category:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(200, 160, 85, 0.4);
}

.single-post-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--color-dark);
    line-height: 1.3;
    margin-bottom: 0;
    letter-spacing: -0.01em;
}

/* Featured Image */
.single-post-thumbnail {
    margin-bottom: 30px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    position: relative;
}

.single-post-thumbnail::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.03) 100%);
    pointer-events: none;
}

.single-post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.single-post-thumbnail:hover img {
    transform: scale(1.05);
}

/* Post Content */
.single-post-content {
    background: white;
    border-radius: 24px;
    padding: 50px 60px;
    margin-bottom: 30px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
    font-size: 1.188rem;
    line-height: 1.9;
    color: #334155;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
    color: var(--color-dark);
    margin-top: 2.5em;
    margin-bottom: 1.2em;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.single-post-content h2 {
    font-size: 2.25rem;
    padding-bottom: 0.5em;
    border-bottom: 3px solid #e2e8f0;
}

.single-post-content h3 {
    font-size: 1.75rem;
}

.single-post-content p {
    margin-bottom: 1.8em;
}

.single-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 2.5em 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.single-post-content ul,
.single-post-content ol {
    margin: 2em 0;
    padding-right: 2em;
}

[dir="ltr"] .single-post-content ul,
[dir="ltr"] .single-post-content ol {
    padding-right: 0;
    padding-left: 2em;
}

.single-post-content li {
    margin-bottom: 1em;
}

.single-post-content blockquote {
    border-right: 5px solid var(--color-primary);
    padding: 25px 35px;
    margin: 2.5em 0;
    background: linear-gradient(135deg, rgba(200, 160, 85, 0.05), rgba(43, 155, 155, 0.05));
    border-radius: 0 16px 16px 0;
    font-style: italic;
    color: #475569;
    font-size: 1.125rem;
}

[dir="ltr"] .single-post-content blockquote {
    border-right: none;
    border-left: 5px solid var(--color-primary);
    border-radius: 16px 0 0 16px;
}

/* Share Buttons */
.single-post-share {
    background: white;
    border-radius: 24px;
    padding: 35px 45px;
    margin-bottom: 30px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
}

.single-post-share-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 25px;
}

.single-post-share-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.938rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.share-button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.share-button svg {
    width: 18px;
    height: 18px;
}

.share-facebook {
    background: #1877f2;
    color: white;
}

.share-twitter {
    background: #1da1f2;
    color: white;
}

.share-linkedin {
    background: #0a66c2;
    color: white;
}

.share-whatsapp {
    background: #25d366;
    color: white;
}

.share-copy {
    background: #64748b;
    color: white;
}

/* Author Box */
.single-post-author {
    background: linear-gradient(135deg, rgba(200, 160, 85, 0.08), rgba(43, 155, 155, 0.08));
    border-radius: 24px;
    padding: 45px;
    margin-bottom: 30px;
    border: 2px solid rgba(200, 160, 85, 0.2);
    position: relative;
    overflow: hidden;
}

.single-post-author::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(200, 160, 85, 0.1) 0%, transparent 70%);
    animation: rotate-background 20s linear infinite;
}

@keyframes rotate-background {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.single-post-author-content {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.single-post-author-avatar {
    flex-shrink: 0;
}

.single-post-author-avatar img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.single-post-author-info h3 {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 10px;
}

.single-post-author-bio {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 0;
    font-size: 1.063rem;
}

/* Post Navigation */
.single-post-navigation {
    background: white;
    border-radius: 24px;
    padding: 35px 45px;
    margin-bottom: 30px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    gap: 25px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    padding: 18px 26px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex: 1;
    min-width: 0;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link:hover {
    color: white;
    transform: translateX(0);
    box-shadow: 0 8px 24px rgba(200, 160, 85, 0.3);
}

.nav-link:hover svg,
.nav-link:hover .nav-label,
.nav-link:hover .nav-title {
    color: white !important;
}

.nav-link-prev:hover {
    transform: translateX(-8px);
}

.nav-link-next {
    flex-direction: row-reverse;
    text-align: left;
}

[dir="rtl"] .nav-link-next {
    text-align: right;
}

.nav-link-next:hover {
    transform: translateX(8px);
}

.nav-link svg {
    width: 22px;
    height: 22px;
    color: var(--color-primary);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.nav-link-text {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.nav-label {
    font-size: 0.813rem;
    color: #64748b;
    margin-bottom: 6px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.nav-title {
    font-size: 1.063rem;
    font-weight: 700;
    color: var(--color-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s ease;
}

/* Related Posts */
.single-related-posts {
    background: white;
    border-radius: 24px;
    padding: 45px;
    margin-bottom: 30px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
}

.related-posts-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 35px;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
}

.related-posts-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: 2px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.related-post-card {
    background: #f8f9fa;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.related-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.related-post-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.related-post-card:hover .related-post-thumbnail {
    transform: scale(1.1);
}

.related-post-content {
    padding: 24px;
}

.related-post-title {
    font-size: 1.188rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-date {
    font-size: 0.875rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.related-post-date svg {
    width: 14px;
    height: 14px;
}

/* Dark Mode Support */
[data-theme="dark"] .single-post-page {
    background: #0f1419;
}

[data-theme="dark"] .single-post-header,
[data-theme="dark"] .single-post-content,
[data-theme="dark"] .single-post-share,
[data-theme="dark"] .single-post-navigation,
[data-theme="dark"] .single-related-posts {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .single-post-title,
[data-theme="dark"] .single-post-content h2,
[data-theme="dark"] .single-post-content h3,
[data-theme="dark"] .single-post-content h4,
[data-theme="dark"] .single-post-share-title,
[data-theme="dark"] .single-post-author-info h3,
[data-theme="dark"] .related-posts-title,
[data-theme="dark"] .related-post-title,
[data-theme="dark"] .nav-title {
    color: #e2e8f0;
}

[data-theme="dark"] .single-post-meta-item,
[data-theme="dark"] .error-404-link-description,
[data-theme="dark"] .single-post-content,
[data-theme="dark"] .single-post-content blockquote,
[data-theme="dark"] .single-post-author-bio,
[data-theme="dark"] .nav-label {
    color: #94a3b8;
}

[data-theme="dark"] .single-post-content h2 {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .single-post-author {
    background: rgba(200, 160, 85, 0.05);
    border-color: rgba(200, 160, 85, 0.15);
}

[data-theme="dark"] .nav-link {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .related-post-card {
    background: rgba(255, 255, 255, 0.03);
}

/* Responsive */
@media (max-width: 768px) {

    .single-post-header,
    .single-post-content,
    .single-post-share,
    .single-post-author,
    .single-related-posts {
        padding: 30px 25px;
    }

    .single-post-title {
        font-size: 2rem;
    }

    .single-post-content {
        font-size: 1.063rem;
    }

    .single-post-meta {
        gap: 14px;
    }

    .single-post-author-content {
        flex-direction: column;
        text-align: center;
    }

    .single-post-navigation {
        flex-direction: column;
        gap: 15px;
    }

    .nav-link-next {
        flex-direction: row;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}