/**
 * Single Post Template Styles
 * Modern single post layout with full-width header
 */

/* Post Hero Header */
.post-hero-header {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Featured Image Background */
.post-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.post-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.post-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    z-index: 2;
}

/* Fallback for posts without featured image */
.post-hero-header:not(:has(.post-hero-background)) {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    min-height: 40vh;
}

/* Header Content */
.post-hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Breadcrumbs */
.post-breadcrumbs {
    margin-bottom: 1.5rem;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-link {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.breadcrumb-separator {
    display: flex;
    align-items: center;
    opacity: 0.6;
}

.breadcrumb-current {
    opacity: 0.8;
    font-weight: 500;
}

/* Post Title */
.post-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    max-width: 4xl;
    margin-left: auto;
    margin-right: auto;
}

/* Post Meta */
.post-hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.post-meta-item {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.post-meta-item svg {
    flex-shrink: 0;
}

/* Main Content */
.post-content-wrapper {
    padding: 4rem 0;
    background: white;
}

.post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #374151;
}

/* Content Typography */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    color: #1f2937;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-content h1 { font-size: 2.25rem; }
.post-content h2 { font-size: 1.875rem; }
.post-content h3 { font-size: 1.5rem; }
.post-content h4 { font-size: 1.25rem; }
.post-content h5 { font-size: 1.125rem; }
.post-content h6 { font-size: 1rem; }

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.25rem;
    color: #6b7280;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 2rem 0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.post-content a {
    color: #3b82f6;
    text-decoration: underline;
    text-decoration-color: rgba(59, 130, 246, 0.3);
    text-underline-offset: 2px;
    transition: all 0.3s ease;
}

.post-content a:hover {
    color: #1d4ed8;
    text-decoration-color: #1d4ed8;
}

/* Post Footer */
.post-footer {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid #e5e7eb;
}

/* Tags */
.post-tags {
    margin-bottom: 3rem;
}

.post-tags-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    color: #6b7280;
    text-decoration: none;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag-link:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-1px);
}

/* Author Bio */
.author-bio {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 1rem;
    margin-bottom: 3rem;
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.author-description {
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* Post Navigation */
.post-navigation {
    margin-top: 3rem;
}

.nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.nav-link {
    display: block;
    padding: 1.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
    color: inherit;
}

.nav-link:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.nav-direction {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.nav-next .nav-direction {
    justify-content: flex-end;
}

.nav-title {
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
}

.nav-previous .nav-title {
    text-align: left;
}

.nav-next .nav-title {
    text-align: right;
}



/* Responsive Design */
@media (max-width: 1024px) {
    .post-hero-header {
        min-height: 50vh;
    }
    
    .post-hero-title {
        font-size: 2rem;
    }
    
    .post-hero-meta {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .post-hero-header {
        min-height: 40vh;
    }
    
    .post-hero-title {
        font-size: 1.75rem;
    }
    
    .post-hero-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .breadcrumb-list {
        justify-content: flex-start;
        font-size: 0.8125rem;
    }
    
    .post-content-wrapper {
        padding: 2rem 0;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .nav-links {
        grid-template-columns: 1fr;
    }
    
    .nav-next .nav-direction,
    .nav-next .nav-title {
        text-align: left;
        justify-content: flex-start;
    }
}

/* Print Styles */
@media print {
    .post-hero-header {
        background: white !important;
        color: black !important;
        min-height: auto;
        padding: 2rem 0;
    }
    
    .post-hero-background,
    .post-hero-overlay {
        display: none;
    }
    
    .post-navigation {
        display: none;
    }
    
    .post-content a {
        color: black;
        text-decoration: underline;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .nav-link,
    .tag-link {
        transition: none;
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .post-hero-overlay {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .breadcrumb-link:hover {
        background: white;
        color: black;
    }
}