/* Hide Vue elements until Vue is ready */
[v-cloak] {
    display: none !important;
}

/* Blog Post Container */
.blog-post-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Hero Header Section */
.post-header-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 400px;
    margin: 0 auto 3rem auto;
    max-width: 90%;
    overflow: hidden;
}

.post-header-content {
    background: linear-gradient(135deg, #4a6fa5 0%, #3d5a8c 100%);
    color: white;
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-header-category {
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

.post-header-title {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: white;
}

.post-header-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.95;
    margin: 0;
    max-width: 500px;
}

.post-header-image {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.post-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content Section */
.post-content {
    max-width: 900px;
    margin: 0 auto 3rem auto;
    padding: 0 2rem;
}

.post-body {
    line-height: 1.8;
    font-size: 16px;
}

.post-content-text {
    max-width: 100%;
}

.post-content-text h2 {
    font-size: 22px;
    margin: 15px 0;
}

.post-content-text h3 {
    font-size: 20px;
    margin: 15px 0;
}

.post-content-text p {
    padding-bottom: 1px;
    margin-bottom: 10px;
}

/* Video Container */
.post-video-container {
    margin-bottom: 2rem;
}

.post-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.post-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Related Posts Section */
.related-posts-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.related-posts-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    max-width: 1000px;
}

/* Post Not Found */
.post-not-found {
    text-align: center;
    padding: 4rem 2rem;
}

.post-not-found h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1rem;
}

.post-not-found p {
    color: #666;
    margin-bottom: 2rem;
}

.post-not-found a {
    color: var(--dragonroads-primary, #D20158);
    text-decoration: none;
    font-weight: 500;
}

.post-not-found a:hover {
    text-decoration: underline;
}

/* Back to Hub Link */
.back-to-hub-link {
    display: none;
}

/* Article Share Section */
.article-share-section {
    display: flex;
    justify-content: flex-end;
    padding: 30px 0;
    margin-top: 40px;
    border-top: 1px solid #e9ecef;
}

.share-article-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
}

.share-article-button:hover {
    background: #f7f7f7;
    border-color: #333;
    color: #000;
}

.share-article-button:active {
    transform: scale(0.98);
}

.share-article-button svg {
    flex-shrink: 0;
}

/* Share Dialog Overlay */
.share-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.share-dialog {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.share-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.share-dialog-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #222;
}

.share-dialog-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666;
    transition: color 0.2s ease;
}

.share-dialog-close:hover {
    color: #222;
}

.share-dialog-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
}

/* Article Preview Card */
.share-preview-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: #f7f7f7;
    border-radius: 12px;
}

.preview-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.preview-image-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: linear-gradient(135deg, #e8e8e8, #d0d0d0);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #888;
}

.preview-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.preview-title {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.preview-details {
    font-size: 14px;
    color: #717171;
}

/* Share Options Grid */
.share-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: #222;
    text-align: left;
    text-decoration: none;
}

.share-option:hover {
    background: #f7f7f7;
    border-color: #222;
}

.share-option:active {
    transform: scale(0.98);
}

/* Share Icons */
.share-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-icon svg {
    width: 24px;
    height: 24px;
}

.copy-icon {
    color: #222;
}

.email-icon {
    color: #222;
}

.whatsapp-icon {
    color: #25D366;
}

.facebook-icon {
    color: #1877F2;
}

.twitter-icon {
    color: #000;
}

.messenger-icon {
    color: #0084FF;
}

/* More Options Button */
.more-options-button {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 50%;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: #222;
    text-align: left;
}

.more-options-button:hover {
    background: #f7f7f7;
    border-color: #222;
}

.more-options-button:active {
    transform: scale(0.98);
}

.more-options-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.more-options-icon svg {
    width: 24px;
    height: 24px;
    color: #222;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    padding: 12px 24px;
    background: #333;
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1100;
    animation: toast-slide-in 0.3s ease;
}

.toast-success {
    background: #28a745;
}

.toast-bottom-center {
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .post-header-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .post-header-content {
        padding: 3rem 2rem;
    }

    .post-header-title {
        font-size: 2.25rem;
    }

    .post-header-image {
        min-height: 300px;
    }

    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .blog-post-container {
        padding-top: 1rem;
    }
    
    .back-to-hub-link {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        color: #4a6fa5;
        text-decoration: none;
        font-size: 0.9375rem;
        font-weight: 500;
        transition: color 0.2s ease;
    }
    
    .back-to-hub-link:hover {
        color: #3d5a8c;
    }
    
    .back-to-hub-link svg {
        flex-shrink: 0;
    }
    
    .post-header-content {
        padding: 2rem 1.5rem;
    }

    .post-header-title {
        font-size: 1.875rem;
    }

    .post-header-excerpt {
        font-size: 0.95rem;
    }

    .post-header-image {
        min-height: 250px;
    }

    .post-content {
        padding: 0 1rem;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .article-share-section {
        padding: 20px 0;
        margin-top: 30px;
    }

    .share-article-button {
        padding: 8px 14px;
        font-size: 13px;
    }

    .share-article-button svg {
        width: 16px;
        height: 16px;
    }
    
    .share-options-grid {
        grid-template-columns: 1fr;
    }
    
    .more-options-button {
        width: 100%;
    }
    
    .share-preview-card {
        padding: 10px;
    }
    
    .preview-image,
    .preview-image-placeholder {
        width: 64px;
        height: 64px;
    }
    
    .preview-title {
        font-size: 14px;
    }
    
    .preview-details {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .share-dialog {
        border-radius: 16px 16px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
        max-height: 85vh;
    }
    
    .share-dialog-overlay {
        align-items: flex-end;
        padding: 0;
    }
}
