/**
 * Single Post Page Styles
 * Styles specific to single.php (single post view)
 */

/* ==========================================================================
   Single Post Hero
   ========================================================================== */
.single-post {
    padding-bottom: 4rem;
}

.single-hero {
    padding: 3rem 0 2rem;
    background: linear-gradient(180deg, var(--slate-50) 0%, var(--white) 100%);
}

.single-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.single-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--text-xs);
    color: var(--slate-500);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.single-breadcrumb a {
    color: var(--slate-500);
    transition: color var(--transition);
}

.single-breadcrumb a:hover {
    color: var(--primary-600);
}

.single-breadcrumb .separator {
    color: var(--slate-300);
}

.single-breadcrumb .current {
    color: var(--slate-800);
    font-weight: 500;
}

.single-meta {
    margin-bottom: 1rem;
}

.single-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.single-tags a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary-light);
    border: 1px solid var(--primary-200);
    color: var(--primary-600);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition);
}

.single-tags a:hover {
    background-color: var(--primary-600);
    color: var(--white);
}

.single-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--slate-900);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.single-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.single-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: var(--slate-900);
    font-size: var(--text-sm);
}

.post-date {
    font-size: var(--text-xs);
    color: var(--slate-500);
}

.single-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: var(--text-xs);
    color: var(--slate-500);
}

.stat-item svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Featured Image
   ========================================================================== */
.single-featured-image {
    padding: 2rem 0;
}

.featured-image-wrapper {
    max-width: 900px;
    margin: 0 auto;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.featured-image {
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Post Content
   ========================================================================== */
.single-content {
    padding: 2rem 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr 320px;
    }
}

.single-main-content {
    min-width: 0;
}

.post-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--slate-700);
}

.post-content h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--slate-900);
}

.post-content h3 {
    font-size: 1.375rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--slate-900);
}

.post-content h4 {
    font-size: 1.125rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--slate-900);
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content a {
    color: var(--primary-600);
    text-decoration: underline;
    text-decoration-color: var(--primary-300);
    text-underline-offset: 2px;
}

.post-content a:hover {
    text-decoration-color: var(--primary-600);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-600);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--slate-600);
    background-color: var(--slate-50);
    padding: 1.5rem;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content code {
    background-color: var(--slate-100);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.875em;
}

.post-content pre {
    background-color: var(--slate-900);
    color: var(--slate-100);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: 2rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ==========================================================================
   Post Navigation
   ========================================================================== */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--slate-200);
}

.post-navigation .nav-link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    background-color: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

.post-navigation .nav-link:hover {
    border-color: var(--primary-300);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.post-navigation .nav-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-navigation .nav-title {
    font-weight: 600;
    color: var(--slate-900);
    font-size: var(--text-sm);
}

.post-navigation .nav-next {
    text-align: right;
}

/* ==========================================================================
   Author Bio
   ========================================================================== */
.author-bio {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 1.5rem;
    background-color: var(--slate-50);
    border-radius: var(--radius-xl);
}

@media (max-width: 640px) {
    .author-bio {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.author-bio-avatar {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.author-bio-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-bio-content {
    flex: 1;
}

.author-bio-name {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
}

.author-bio-description {
    font-size: var(--text-sm);
    color: var(--slate-600);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.author-bio-links a {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--primary-600);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.single-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

@media (max-width: 1023px) {
    .single-sidebar {
        position: static;
    }
}
