/* Single Post Specific Styles */

/* Ensure navbar stays fixed on post pages */
.navbar {
    position: fixed !important;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Post Hero */
.post-hero {
    padding: 8rem 0 4rem;
    margin-top: 70px; /* Account for fixed navbar */
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-light) 100%);
    position: relative;
    overflow: hidden;
}

.post-hero::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--orange);
    opacity: 0.05;
    border-radius: 50%;
    top: -200px;
    left: -100px;
    animation: pulse 10s ease-in-out infinite;
}

.post-hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.post-category {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--blue);
    color: var(--white);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.post-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 2rem;
    line-height: 1.2;
    color: var(--black);
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.1s forwards;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    color: #666;
    font-size: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.2s forwards;
}

.post-meta-divider {
    width: 4px;
    height: 4px;
    background: #999;
    border-radius: 50%;
}

/* Featured Image */
.post-featured-image {
    margin-bottom: 4rem;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease 0.3s forwards;
}

/* Post Content */
.post-content-section {
    padding-bottom: 4rem;
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #333;
}

.post-content h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 3rem 0 1.5rem;
    color: var(--black);
    position: relative;
    padding-left: 1.5rem;
}

.post-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 80%;
    background: var(--blue);
    border-radius: 2px;
}

.post-content h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
    color: var(--black);
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-left: 2.5rem;
}

.post-content li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

.post-content li strong {
    color: var(--black);
    font-weight: 600;
}

.post-content code {
    background: var(--gray-light);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
    color: var(--black);
}

.post-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--gray-light);
    border-left: 4px solid var(--blue);
    font-style: italic;
    color: #555;
    border-radius: 0 10px 10px 0;
}

.post-content a {
    color: var(--blue);
    text-decoration: underline;
    transition: var(--transition);
}

.post-content a:hover {
    color: var(--orange);
}

/* Post Tags */
.post-tags {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-medium);
}

.post-tags h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--black);
}

.post-tags-list {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.post-tag {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--gray-light);
    color: var(--black);
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.post-tag:hover {
    background: var(--black);
    color: var(--white);
    transform: translateY(-2px);
}

/* Post Marketplaces Section */
.post-marketplaces {
    /* Usa gli stili della sezione marketplaces dal file principale */
    /* Solo aggiustamenti specifici per il contesto del post */
    margin-top: 4rem;
}

/* About Creator in Post */
.post-about-creator {
    background: var(--white);
}

/* Related Posts */
.related-posts {
    padding: 5rem 0;
    background: var(--gray-light);
}

.related-posts .blog-posts-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    max-width: 1200px;
    margin: 0 auto;
}

/* Animations for content */
.post-content > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.post-content > *:nth-child(1) { animation-delay: 0.4s; }
.post-content > *:nth-child(2) { animation-delay: 0.5s; }
.post-content > *:nth-child(3) { animation-delay: 0.6s; }
.post-content > *:nth-child(4) { animation-delay: 0.7s; }
.post-content > *:nth-child(5) { animation-delay: 0.8s; }
.post-content > *:nth-child(n+6) { 
    animation-delay: 0.9s;
    opacity: 1;
    transform: none;
}

/* Share Buttons (future feature) */
.post-share {
    position: fixed;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 100;
}

.share-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
    color: var(--black);
}

.share-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Progress Bar */
.reading-progress {
    position: fixed;
    top: 70px; /* Position below the fixed navbar */
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gray-medium);
    z-index: 999; /* Just below navbar */
}

.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--blue), var(--orange));
    width: 0%;
    transition: width 0.1s ease;
}

/* Media Queries */
@media (max-width: 1200px) {
    .post-share {
        display: none;
    }
}

@media (max-width: 768px) {
    .post-hero {
        padding: 6rem 0 3rem;
    }
    
    .post-title {
        font-size: 2rem;
    }
    
    .post-content h2 {
        font-size: 1.75rem;
    }
    
    .post-content h3 {
        font-size: 1.5rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .cta-marketplaces-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .post-featured-image img {
        border-radius: 10px;
    }
}