/* File: css/blog-post.css */
/* ============================================
   BLOG-POST.CSS - Individual Blog Post Styles
   ============================================ */

/* ============================================
   POST HEADER - Gradient like index.html
   ============================================ */
.post-hero {
    background: var(--gradient-primary);
    color: var(--text-dark);
    padding: 100px 0 70px;
    position: relative;
    overflow: hidden;
}

/* Center the header content */
.post-hero-content {
    position: relative;
    z-index: 1;
    text-align: center; /* Center all text content */
    max-width: 800px; /* Constrain width for readability */
    margin: 0 auto; /* Center the container */
}

.post-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-align: center; /* Ensure title is centered */
}

.post-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    text-align: center; /* Center subtitle */
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 1rem;
    opacity: 0.95;
    justify-content: center; /* Center the meta items */
}

/* Breadcrumb centered */
.post-breadcrumb {
    margin-bottom: 2rem;
    text-align: center; /* Center breadcrumb */
}

.post-breadcrumb a {
    color: var(--text-dark);
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.post-breadcrumb a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ============================================
   POST CONTENT
   ============================================ */
.post-content-wrapper {
    background: var(--light-bg);
    padding: 60px 0;
}

.post-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
}

/* Typography */
.post-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 2.5rem 0 1.5rem;
    color: var(--text-light);
    position: relative;
    padding-left: 1rem;
}

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

.post-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0rem 0 1rem;
    color: var(--text-light);
}

.post-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

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

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

.post-content blockquote {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-left: 4px solid var(--bridge-color);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: var(--radius-sm);
    font-style: italic;
}

/* ============================================
   FEATURED IMAGE
   ============================================ */
.post-image-container {
    margin: 2rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: var(--light-bg);
    /* Hidden by default, shown via JS if image exists */
    display: none;
}

.post-image-container.has-image {
    display: block;
}

.post-featured-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

.post-image-caption {
    padding: 1rem;
    background: rgba(0,0,0,0.03);
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================
   POST FOOTER - Redesigned
   ============================================ */
.post-footer {
    margin-top: 3rem;
    padding: 0;
    background: transparent;
}

/* Tags Section - Clearer Design */
.post-tags-section {
    margin-bottom: 3rem;
    padding: 2rem 0;
    border-top: 2px solid #e5e7eb;
}

.post-tags-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-tags-title i {
    color: var(--bridge-color);
}

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

.post-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.post-tag:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

/* ============================================
   SHARE SECTION - Redesigned to match site style
   ============================================ */
.post-share {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.post-share-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    text-align: center;
}

.share-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.share-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    background: rgba(102, 126, 234, 0.1);
    color: var(--bridge-color);
    border: 2px solid transparent;
}

.share-button:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.share-button span {
    display: none; /* Hide text, show only icons */
}

/* Copy link button */
.copy-link-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid transparent;
    color: var(--bridge-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-link-button:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-3px);
}

.copy-link-button.copied {
    background: var(--success-color);
    color: white;
}

/* ============================================
   POST NAVIGATION - Moved above author
   ============================================ */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin: 3rem 0 2rem 0;
}

/* ============================================
   AUTHOR BIO - Full Width Design
   ============================================ */
.author-section {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1a2e 100%);
    padding: 80px 0;
    margin-top: 0px;
    position: relative;
    overflow: hidden;
}

.author-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 40%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
}

.author-bio-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 3rem;
    display: flex;
    gap: 3rem;
    align-items: center;
}

.author-avatar-wrapper {
    position: relative;
}

.author-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bridge-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.author-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--gradient-success);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.author-content {
    flex: 1;
    color: white;
}

.author-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.author-title {
    font-size: 1.125rem;
    color: var(--interactive);
    margin-bottom: 1.5rem;
}

.author-bio {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.author-cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.author-cta {
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.author-cta.primary {
    background: var(--gradient-primary);
    color: white;
}

.author-cta.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.author-cta.secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.author-cta.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* ============================================
   RELATED POSTS - Full Width Modern Design
   ============================================ */
.related-posts-section {
    background: var(--light-bg);
    padding: 80px 0;
}

.related-posts-header {
    text-align: center;
    margin-bottom: 3rem;
}

.related-posts-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.related-posts-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.related-post-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    position: relative;
}

.related-post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.related-post-card:hover::before {
    transform: scaleX(1);
}

.related-post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.related-post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--gradient-primary);
}

.related-post-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-post-category {
    color: var(--bridge-color);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.related-post-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.related-post-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
}

.related-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .author-bio-card {
        flex-direction: column;
        text-align: center;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================
   FLOATING ACTION BUTTON
   ============================================ */
.back-to-blog-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(102,126,234,0.35);
    z-index: 1050;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.back-to-blog-fab:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(102,126,234,0.45);
    color: white;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .post-hero {
        padding: 80px 0 50px;
    }
    
    .post-title {
        font-size: 2rem;
    }
    
    .post-content {
        padding: 2rem 1.5rem;
    }
    
    .post-content p {
        font-size: 1rem;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .post-navigation {
        flex-direction: column;
    }
    
    .share-buttons {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .post-meta {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

/* Reuse float animation from main.css */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
