/* =============================================
   BLOG POST PAGE STYLES
   Single article view with SEO-optimized layout
   ============================================= */

/* ==================== POST HEADER ==================== */
.blog-post {
    background: var(--white);
}

.post-header {
    background: linear-gradient(180deg, #f8f7ff 0%, var(--white) 100%);
    padding: 120px 0 60px;
}

.post-header-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 48px;
    text-align: center;
}

.post-meta-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.post-category-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: rgba(129, 103, 234, 0.1);
    color: var(--violet);
    font-size: 13px;
    font-weight: 600;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-category-badge:hover {
    background: var(--violet);
    color: var(--white);
}

.post-date {
    color: var(--text-secondary);
    font-size: 14px;
}

.post-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--navy);
    margin-bottom: 20px;
}

.post-excerpt {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* ==================== AUTHOR INFO ==================== */
.post-author-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.author-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--violet) 0%, var(--accent-cyan) 100%);
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.author-name {
    font-weight: 600;
    color: var(--navy);
    font-size: 15px;
}

.author-title {
    font-size: 13px;
    color: var(--text-secondary);
}

.post-read-time {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(14, 14, 68, 0.05);
    border-radius: 100px;
    font-size: 13px;
    color: var(--text-secondary);
}

.post-read-time svg {
    width: 16px;
    height: 16px;
    stroke: var(--violet);
}

/* ==================== FEATURED IMAGE ==================== */
.post-featured-image {
    max-width: 1200px;
    margin: 48px auto 0;
    padding: 0 24px;
}

.post-featured-image picture {
    display: block;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(14, 14, 68, 0.12);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ==================== POST CONTENT ==================== */
.post-content {
    max-width: 840px;
    margin: 0 auto;
    padding: 80px 48px;
    font-size: 19px;
    line-height: 1.85;
    color: var(--dark-text);
}

.post-content h2 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--navy);
    margin: 48px 0 20px;
    line-height: 1.3;
}

.post-content h3 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--navy);
    margin: 36px 0 16px;
    line-height: 1.4;
}

.post-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--navy);
    margin: 28px 0 12px;
}

.post-content p {
    margin-bottom: 24px;
}

.post-content a {
    color: var(--violet);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

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

.post-content ul,
.post-content ol {
    margin: 24px 0;
    padding-left: 28px;
}

.post-content li {
    margin-bottom: 12px;
}

.post-content blockquote {
    margin: 36px 0;
    padding: 24px 32px;
    border-left: 4px solid var(--violet);
    background: rgba(129, 103, 234, 0.05);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--navy);
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

.post-content pre {
    margin: 32px 0;
    padding: 24px;
    background: var(--navy);
    border-radius: 12px;
    overflow-x: auto;
}

.post-content code {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
}

.post-content pre code {
    color: #e6e6e6;
}

.post-content p code {
    background: rgba(129, 103, 234, 0.1);
    color: var(--violet);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 15px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 32px 0;
}

.post-content hr {
    border: none;
    height: 1px;
    background: rgba(14, 14, 68, 0.1);
    margin: 48px 0;
}

.post-content table {
    width: 100%;
    margin: 32px 0;
    border-collapse: collapse;
}

.post-content th,
.post-content td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(14, 14, 68, 0.1);
}

.post-content th {
    font-weight: 600;
    background: rgba(14, 14, 68, 0.03);
}

/* ==================== POST FOOTER ==================== */
.post-footer {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 48px 80px;
    background:#ffffff;
}

/* Tags */
.post-tags {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(14, 14, 68, 0.1);
    margin-bottom: 40px;
}

.tags-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-pill {
    display: inline-flex;
    padding: 6px 14px;
    background: rgba(14, 14, 68, 0.05);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag-pill:hover {
    background: var(--violet);
    color: var(--white);
}

/* Author Bio Card */
.author-bio-card {
    display: flex;
    gap: 20px;
    padding: 28px;
    background: rgba(129, 103, 234, 0.05);
    border-radius: 16px;
    margin-bottom: 40px;
}

.author-bio-card .author-avatar-large {
    width: 64px;
    height: 64px;
    font-size: 20px;
    flex-shrink: 0;
}

.author-bio-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 8px;
}

.author-bio-content p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

/* Share Section */
.post-share {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(14, 14, 68, 0.1);
    margin-bottom: 48px;
}

.share-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(14, 14, 68, 0.1);
    background: var(--white);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn svg {
    width: 18px;
    height: 18px;
}

.share-btn:hover {
    border-color: var(--violet);
    color: var(--violet);
}

.share-btn.twitter:hover {
    background: #1DA1F2;
    border-color: #1DA1F2;
    color: var(--white);
}

.share-btn.linkedin:hover {
    background: #0077B5;
    border-color: #0077B5;
    color: var(--white);
}

.share-btn.copy-link.copied {
    background: var(--violet);
    border-color: var(--violet);
    color: var(--white);
}

/* ==================== RELATED POSTS ==================== */
.related-posts h3 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 28px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.related-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid rgba(14, 14, 68, 0.08);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(14, 14, 68, 0.1);
}

.related-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-card:hover .related-image img {
    transform: scale(1.05);
}

.related-content {
    padding: 20px;
}

.related-category {
    font-size: 12px;
    font-weight: 600;
    color: var(--violet);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.related-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-read-time {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ==================== POST NEWSLETTER ==================== */
.post-newsletter {
    background: var(--navy);
    padding: 80px 24px;
}

.newsletter-inner {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.post-newsletter h3 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
}

.post-newsletter h3 em {
    font-style: italic;
    color: var(--violet);
}

.post-newsletter p {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
}

.newsletter-form-inline {
    display: flex;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto;
}

.newsletter-form-inline input {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 15px;
}

.newsletter-form-inline input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-form-inline input:focus {
    outline: none;
    border-color: var(--violet);
    background: rgba(255, 255, 255, 0.15);
}

.newsletter-form-inline .btn {
    white-space: nowrap;
}

/* Newsletter Success Message */
.newsletter-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(129, 103, 234, 0.15);
    border: 1px solid rgba(129, 103, 234, 0.3);
    border-radius: 12px;
    color: var(--white);
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.newsletter-success.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.newsletter-success svg {
    color: var(--violet);
    flex-shrink: 0;
}

/* ==================== RESPONSIVE ==================== */

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .post-content {
        max-width: 900px;
        padding: 100px 60px;
        font-size: 20px;
    }

    .post-content h2 {
        font-size: 32px;
    }

    .post-content h3 {
        font-size: 26px;
    }

    .post-header-container {
        max-width: 960px;
    }

    .post-footer {
        max-width: 960px;
    }
}

/* Desktop (1024px-1439px) */
@media (max-width: 1024px) {
    .post-content {
        max-width: 780px;
        padding: 60px 40px;
        font-size: 18px;
    }

    .post-header-container {
        max-width: 840px;
        padding: 0 40px;
    }

    .post-footer {
        max-width: 840px;
        padding: 0 40px 80px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet (768px) */
@media (max-width: 768px) {
    .post-header {
        padding: 100px 0 40px;
    }

    .post-header-container {
        max-width: 100%;
        padding: 0 24px;
    }

    .post-meta-top {
        flex-direction: column;
        gap: 12px;
    }

    .post-author-info {
        flex-direction: column;
        gap: 12px;
    }

    .author-details {
        align-items: center;
        text-align: center;
    }

    .post-featured-image {
        margin-top: 32px;
        padding: 0 24px;
    }

    .post-featured-image picture {
        border-radius: 16px;
    }

    .post-content {
        max-width: 100%;
        padding: 48px 24px;
        font-size: 17px;
        line-height: 1.8;
    }

    .post-content h2 {
        font-size: 24px;
        margin: 36px 0 16px;
    }

    .post-content h3 {
        font-size: 20px;
        margin: 28px 0 14px;
    }

    .post-content blockquote {
        padding: 20px 24px;
        margin: 28px 0;
    }

    .post-footer {
        max-width: 100%;
        padding: 0 24px 60px;
    }

    .post-tags {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .author-bio-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .post-share {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .post-newsletter {
        padding: 60px 24px;
    }

    .post-newsletter h3 {
        font-size: 26px;
    }

    .newsletter-form-inline {
        flex-direction: column;
    }
}

/* Mobile (480px) */
@media (max-width: 480px) {
    .post-header {
        padding: 90px 0 32px;
    }

    .post-header-container {
        padding: 0 16px;
    }

    .post-title {
        font-size: 26px;
    }

    .post-excerpt {
        font-size: 15px;
    }

    .post-featured-image {
        padding: 0 16px;
        margin-top: 24px;
    }

    .post-featured-image picture {
        border-radius: 12px;
    }

    .post-content {
        padding: 32px 16px;
        font-size: 16px;
        line-height: 1.75;
    }

    .post-content h2 {
        font-size: 21px;
        margin: 28px 0 12px;
    }

    .post-content h3 {
        font-size: 18px;
        margin: 24px 0 10px;
    }

    .post-content p {
        margin-bottom: 20px;
    }

    .post-content blockquote {
        padding: 16px 20px;
        margin: 24px 0;
        border-radius: 0 8px 8px 0;
    }

    .post-content pre {
        padding: 16px;
        margin: 24px 0;
        border-radius: 8px;
    }

    .post-content code {
        font-size: 13px;
    }

    .post-footer {
        padding: 0 16px 48px;
    }

    .post-tags {
        padding-bottom: 32px;
        margin-bottom: 32px;
    }

    .author-bio-card {
        padding: 20px;
    }

    .post-share {
        padding-bottom: 32px;
        margin-bottom: 32px;
    }

    .related-posts h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .related-content {
        padding: 16px;
    }

    .post-newsletter {
        padding: 48px 16px;
    }

    .post-newsletter h3 {
        font-size: 22px;
    }

    .post-newsletter p {
        font-size: 15px;
    }
}
