/* ================================
   MODERN BLOG SINGLE PAGE STYLES
   ================================ */

.single-post-modern {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    padding: 2rem 0 4rem;
    min-height: 100vh;
}

.single-post-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Main Content */
.single-post-main {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

/* Post Header */
.post-header-modern {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f1f5f9;
}

.post-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.post-category-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.post-title-modern {
    font-size: clamp(1.875rem, 4vw, 2.75rem);
    font-weight: 900;
    color: #1e3a8a;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.post-meta-modern {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 0.9375rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.meta-item i {
    color: #667eea;
    font-size: 1.1rem;
}

/* Featured Image */
.post-featured-image-modern {
    margin: 2rem -3rem 2.5rem;
    border-radius: 0;
    overflow: hidden;
    position: relative;
}

.post-featured-image-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.9), transparent);
}

.post-featured-image-modern img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
}

.post-featured-image-modern:hover img {
    transform: scale(1.02);
}

/* Post Content */
.post-content-modern {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #1f2937;
}

.post-content-modern p {
    margin-bottom: 1.75rem;
}

.post-content-modern h2 {
    font-size: 2rem;
    color: #1e3a8a;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    font-weight: 800;
    position: relative;
    padding-left: 1.25rem;
}

.post-content-modern h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.post-content-modern h3 {
    font-size: 1.5rem;
    color: #334155;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.post-content-modern h4 {
    font-size: 1.25rem;
    color: #475569;
    margin-top: 2rem;
    margin-bottom: 0.875rem;
    font-weight: 700;
}

.post-content-modern img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.post-content-modern ul,
.post-content-modern ol {
    margin-bottom: 1.75rem;
    padding-left: 2rem;
}

.post-content-modern li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.post-content-modern a {
    color: #667eea;
    text-decoration: underline;
    text-decoration-color: rgba(102, 126, 234, 0.3);
    text-underline-offset: 3px;
    transition: all 0.3s ease;
}

.post-content-modern a:hover {
    color: #764ba2;
    text-decoration-color: #764ba2;
}

.post-content-modern blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-left: 5px solid #667eea;
    border-radius: 8px;
    font-style: italic;
    color: #475569;
}

/* Post Tags */
.post-footer-modern {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #f1f5f9;
}

.post-tags-modern {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.post-tags-modern i {
    color: #667eea;
    font-size: 1.25rem;
}

.post-tags-modern a {
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid transparent;
}

.post-tags-modern a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

/* Post Navigation */
.post-navigation-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.nav-previous,
.nav-next {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-previous:hover,
.nav-next:hover {
    background: #f8fafc;
}

.nav-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-previous a,
.nav-next a {
    color: #1e3a8a;
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.nav-previous a:hover,
.nav-next a:hover {
    color: #667eea;
}

.nav-next {
    text-align: right;
}

/* Related Posts */
.related-posts-modern {
    margin: 3rem 0;
    padding: 3rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.related-posts-title {
    font-size: 2rem;
    font-weight: 900;
    color: #1e3a8a;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.related-posts-title i {
    color: #667eea;
    font-size: 1.75rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.related-post-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #e5e7eb;
}

.related-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.related-post-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-post-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.related-post-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.4));
    transition: opacity 0.3s ease;
}

.related-post-card:hover .related-post-image::before {
    opacity: 0.7;
}

.related-post-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(102, 126, 234, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.related-post-content {
    padding: 1.5rem;
}

.related-post-content h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 1rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.related-post-card:hover .related-post-content h4 {
    color: #667eea;
}

.related-post-date {
    font-size: 0.875rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

/* Sidebar */
.single-post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-widget {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.sidebar-widget:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

.widget-title {
    font-size: 1.375rem;
    font-weight: 900;
    color: #1e3a8a;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.widget-title i {
    color: #667eea;
    font-size: 1.25rem;
}

/* Recent Posts Widget */
.recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.recent-post-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.recent-post-item:hover {
    background: #f8fafc;
    border-color: #e5e7eb;
}

.recent-post-thumb {
    flex-shrink: 0;
    width: 85px;
    height: 85px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.recent-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.recent-post-item:hover .recent-post-thumb img {
    transform: scale(1.1);
}

.recent-post-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
}

.recent-post-info a {
    color: #1e3a8a;
    font-weight: 700;
    font-size: 0.9375rem;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.3s ease;
}

.recent-post-info a:hover {
    color: #667eea;
}

.recent-post-date {
    font-size: 0.8125rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}

/* Categories Widget */
.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-list li {
    border-bottom: 1px solid #f1f5f9;
}

.categories-list li:last-child {
    border-bottom: none;
}

.categories-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.categories-list a:hover {
    color: #667eea;
    padding-left: 0.75rem;
}

.category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 0.75rem;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #64748b;
    border-radius: 16px;
    font-size: 0.8125rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.categories-list a:hover .category-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* CTA Widget */
.sidebar-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.sidebar-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    position: relative;
    z-index: 1;
}

.cta-content i {
    font-size: 3.5rem;
    opacity: 0.95;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.sidebar-cta .widget-title {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.cta-content h4 {
    font-size: 1.625rem;
    font-weight: 900;
    margin: 0;
    color: white;
    letter-spacing: -0.01em;
}

.cta-content p {
    margin: 0;
    opacity: 0.95;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.cta-content .btn-modern-primary {
    background: white;
    color: #667eea;
    margin-top: 0.5rem;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.cta-content .btn-modern-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .single-post-layout {
        grid-template-columns: 1fr;
    }

    .single-post-sidebar {
        order: 2;
    }
}

@media (max-width: 768px) {

    .single-post-main,
    .sidebar-widget {
        padding: 1.5rem;
    }

    .post-title-modern {
        font-size: 1.875rem;
    }

    .post-content-modern {
        font-size: 1rem;
    }

    .post-featured-image-modern {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .related-posts-modern {
        padding: 1.5rem;
    }
}

@media (max-width: 640px) {
    .post-navigation-modern {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .nav-next {
        text-align: left;
    }

    .post-meta-modern {
        gap: 1rem;
    }
}