/**
 * Single Post Premium Styles - Jory News Theme
 * CSS variables are set dynamically from Panel settings via frontend.php
 * 
 * @package jory-news-theme
 */

/* =========================================
   Reading Progress Bar
   ========================================= */
.reading-progress-bar {
    position: fixed;
    top: 0;
    right: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--jooeri-secondary, #e53e3e), var(--jooeri-primary, #1e3a5f));
    z-index: 10000;
    transition: width 0.1s linear;
    border-radius: 0 0 0 2px;
}

/* =========================================
   Premium Article Container
   ========================================= */
.premium-article {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0,0,0,0.04);
}

.premium-article .entry-header {
    padding: 48px 48px 0;
}

/* =========================================
   Categories
   ========================================= */
.premium-article .post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.premium-article .category-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--jooeri-secondary, #e74c3c) 0%, rgba(var(--jooeri-secondary-rgb, 231, 76, 60), 0.85) 100%);
    color: #fff;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(var(--jooeri-secondary-rgb, 231, 76, 60), 0.25);
    text-decoration: none;
}

.premium-article .category-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--jooeri-secondary-rgb, 231, 76, 60), 0.35);
    color: #fff;
}

.premium-article .category-label svg {
    opacity: 0.9;
}

/* =========================================
   Title
   ========================================= */
.premium-article .entry-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--jooeri-heading, #1e293b);
    margin-bottom: 30px;
    letter-spacing: -0.01em;
}

/* =========================================
   Meta Box — Editorial Strip
   ========================================= */
.post-meta-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    margin: 0 -48px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    gap: 20px;
}

.meta-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

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

.author-avatar-small::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--jooeri-primary, #1e3a5f), var(--jooeri-secondary, #e53e3e));
    z-index: 0;
}

.author-avatar-small img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #fff;
    position: relative;
    z-index: 1;
    object-fit: cover;
}

.author-info-small {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.author-info-small .author-name a {
    font-weight: 700;
    color: var(--jooeri-heading, #1e293b);
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.3s;
}

.author-info-small .author-name a:hover {
    color: var(--jooeri-secondary, #e53e3e);
}

.author-info-small .publish-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #94a3b8;
}

.publish-date svg {
    color: var(--jooeri-accent, #f39c12);
    width: 13px;
    height: 13px;
}

/* Stats chips */
.meta-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
    background: #fff;
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.stat-item:hover {
    background: var(--jooeri-primary, #1e3a5f);
    color: #fff;
    border-color: var(--jooeri-primary, #1e3a5f);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-item:hover svg {
    color: #fff !important;
}

.stat-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: color 0.3s;
}

.stat-item.views svg {
    color: var(--jooeri-secondary, #e74c3c);
}

.stat-item.comments svg {
    color: var(--jooeri-primary, #1e3a5f);
}

.stat-item.reading-time svg {
    color: var(--jooeri-accent, #f39c12);
}

/* =========================================
   Featured Image
   ========================================= */
.premium-article .post-thumbnail-wrapper {
    margin: 35px 0;
}

.thumbnail-container {
    position: relative;
    overflow: hidden;
}

.premium-article .featured-image {
    width: 100%;
    max-height: 550px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.premium-article:hover .featured-image {
    transform: scale(1.02);
}

.thumbnail-caption {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: rgba(255,255,255,0.9);
    padding: 15px 25px;
    font-size: 0.9rem;
}

.thumbnail-caption svg {
    color: var(--jooeri-accent, #f39c12);
}


/* =========================================
   Content
   ========================================= */
.premium-article .entry-content {
    padding: 48px;
    font-size: var(--jooeri-article-size, 1.15rem);
    line-height: 2;
    color: var(--jooeri-text, #334155);
}

.premium-article .entry-content p {
    margin-bottom: 1.8em;
}

.premium-article .entry-content h2,
.premium-article .entry-content h3 {
    color: var(--jooeri-primary, #1e3a5f);
    margin-top: 2em;
    margin-bottom: 0.8em;
    padding-right: 25px;
    border-right: 5px solid var(--jooeri-secondary, #e74c3c);
}

.premium-article .entry-content blockquote {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-right: 5px solid var(--jooeri-secondary, #e74c3c);
    border-left: none;
    padding: 35px;
    margin: 35px 0;
    border-radius: 0 16px 16px 0;
    font-style: italic;
    font-size: 1.2rem;
    position: relative;
}

.premium-article .entry-content blockquote::before {
    content: '"';
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 4rem;
    color: var(--jooeri-secondary, #e74c3c);
    opacity: 0.2;
    font-family: Georgia, serif;
}

.premium-article .entry-content img {
    border-radius: 12px;
    margin: 1.5em 0;
}

.premium-article .entry-content a {
    color: var(--jooeri-secondary, #e74c3c);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.premium-article .entry-content a:hover {
    border-bottom-color: var(--jooeri-secondary, #e74c3c);
}

/* =========================================
   Entry Footer
   ========================================= */
.premium-article .entry-footer {
    padding: 35px 48px 48px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.post-tags .tags-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--jooeri-heading, #1e293b);
}

.post-tags .tags-label svg {
    color: var(--jooeri-secondary, #e74c3c);
}

.post-tags .tag-link {
    background: #fff;
    color: #475569;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    text-decoration: none;
}

.post-tags .tag-link:hover {
    background: var(--jooeri-primary, #1e3a5f);
    color: #fff;
    border-color: var(--jooeri-primary, #1e3a5f);
    transform: translateY(-2px);
}

/* Bottom Share */
.bottom-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding-top: 25px;
    border-top: 1px solid #e2e8f0;
}

.bottom-share .share-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--jooeri-heading, #1e293b);
}

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

.bottom-share .share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 50px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.bottom-share .share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    color: #fff;
}

.bottom-share .facebook  { background: linear-gradient(135deg, #1877f2, #0d5fc9); }
.bottom-share .twitter   { background: linear-gradient(135deg, #1da1f2, #0d8de0); }
.bottom-share .whatsapp  { background: linear-gradient(135deg, #25d366, #128c4e); }
.bottom-share .telegram  { background: linear-gradient(135deg, #0088cc, #006699); }

/* =========================================
   Related Posts Section
   ========================================= */
.related-posts-section {
    margin-top: 50px;
}

.related-posts-section .section-title {
    font-size: 1.4rem;
    margin-bottom: 30px;
    border-bottom: 3px solid #e2e8f0;
    padding-bottom: 15px;
    position: relative;
}

.related-posts-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    right: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(135deg, var(--jooeri-primary, #1e3a5f) 0%, rgba(var(--jooeri-primary-rgb, 30, 58, 95), 0.7) 100%);
}

.related-posts-section .section-title span {
    background: linear-gradient(135deg, var(--jooeri-primary, #1e3a5f) 0%, rgba(var(--jooeri-primary-rgb, 30, 58, 95), 0.85) 100%);
    color: #fff;
    padding: 12px 28px;
    border-radius: 8px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.related-post-item {
    background: #fff;
    border-radius: var(--jooeri-card-radius, 16px);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.related-post-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.related-thumbnail {
    position: relative;
    overflow: hidden;
}

.related-thumbnail .related-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-post-item:hover .related-img {
    transform: scale(1.08);
}

.related-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--jooeri-secondary, #e74c3c) 0%, rgba(var(--jooeri-secondary-rgb, 231, 76, 60), 0.85) 100%);
    color: #fff;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.related-content {
    padding: 20px;
}

.related-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 0 0 12px;
}

.related-title a {
    color: var(--jooeri-heading, #1e293b);
    transition: color 0.3s;
    text-decoration: none;
}

.related-post-item:hover .related-title a {
    color: var(--jooeri-primary, #1e3a5f);
}

.related-meta .related-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.related-date svg {
    color: var(--jooeri-accent, #f39c12);
}

/* =========================================
   Post Navigation — Premium Slider Cards
   ========================================= */
.post-navigation-premium {
    margin: 50px 0;
}

.post-navigation-premium .nav-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.post-navigation-premium a {
    display: flex;
    align-items: stretch;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-decoration: none;
    border: 1px solid #e2e8f0;
    position: relative;
}

.post-navigation-premium a:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
    border-color: transparent;
}

/* Thumbnail with gradient overlay */
.post-navigation-premium .nav-thumb {
    position: relative;
    width: 140px;
    min-height: 130px;
    flex-shrink: 0;
    overflow: hidden;
}

.post-navigation-premium .nav-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-navigation-premium a:hover .nav-thumb img {
    transform: scale(1.1);
}

.post-navigation-premium .nav-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.05), transparent);
    pointer-events: none;
}

/* Arrow */
.post-navigation-premium .nav-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--jooeri-primary, #1e3a5f);
    color: #fff;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.3s ease;
    margin: auto 0;
}

.post-navigation-premium a:hover .nav-arrow {
    background: var(--jooeri-secondary, #e74c3c);
    transform: scale(1.1);
}

/* Content area */
.post-navigation-premium .nav-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    flex: 1;
    min-width: 0;
    gap: 6px;
}

.post-navigation-premium .nav-subtitle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--jooeri-secondary, #e74c3c);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-navigation-premium .nav-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 700;
    color: var(--jooeri-heading, #1e293b);
    font-size: 0.95rem;
    line-height: 1.6;
    transition: color 0.3s;
}

.post-navigation-premium a:hover .nav-title {
    color: var(--jooeri-primary, #1e3a5f);
}

/* Previous: thumb first, then content, then arrow */
.post-navigation-premium .nav-previous {
    flex-direction: row;
}

.post-navigation-premium .nav-previous .nav-arrow {
    margin-right: 15px;
}

/* Next: arrow first, then content, then thumb */
.post-navigation-premium .nav-next {
    flex-direction: row-reverse;
}

.post-navigation-premium .nav-next .nav-content {
    text-align: left;
}

.post-navigation-premium .nav-next .nav-arrow {
    margin-left: 15px;
}

.post-navigation-premium .nav-next .nav-thumb::after {
    background: linear-gradient(to right, rgba(0,0,0,0.05), transparent);
}

/* =========================================
   Copy Success Tooltip
   ========================================= */
.copy-success {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    z-index: 9999;
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.3);
    animation: slideDown 0.3s ease, fadeOut 0.3s ease 2s forwards;
}

@keyframes slideDown {
    from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
    to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

/* =========================================
   Dark Mode
   ========================================= */
[data-theme="dark"] .premium-article {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .premium-article .entry-title {
    color: #f1f5f9;
}

[data-theme="dark"] .premium-article .entry-content {
    color: #cbd5e1;
}

[data-theme="dark"] .post-meta-box {
    background: linear-gradient(135deg, #1a2332 0%, #0f172a 100%);
    border-color: #334155;
}

[data-theme="dark"] .author-info-small .author-name a {
    color: #f1f5f9;
}

[data-theme="dark"] .author-info-small .publish-date {
    color: #64748b;
}

[data-theme="dark"] .stat-item {
    background: #334155;
    color: #94a3b8;
    border-color: #475569;
    box-shadow: none;
}

[data-theme="dark"] .stat-item:hover {
    background: var(--jooeri-primary, #1e3a5f);
    color: #fff;
    border-color: var(--jooeri-primary, #1e3a5f);
}

[data-theme="dark"] .premium-article .entry-footer {
    background: #1a2332;
    border-color: #334155;
}

[data-theme="dark"] .post-tags .tag-link {
    background: #334155;
    color: #cbd5e1;
    border-color: #475569;
}

[data-theme="dark"] .related-post-item {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .related-title a {
    color: #e2e8f0;
}

[data-theme="dark"] .post-navigation-premium a {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .post-navigation-premium .nav-title {
    color: #e2e8f0;
}

[data-theme="dark"] .premium-article .entry-content blockquote {
    background: linear-gradient(135deg, #1e293b 0%, #1a2332 100%);
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 992px) {
    .premium-article .entry-header,
    .premium-article .entry-content,
    .premium-article .entry-footer {
        padding-left: 30px;
        padding-right: 30px;
    }
    
    .premium-article .entry-title {
        font-size: 2rem;
    }
    
    .post-navigation-premium .nav-thumb {
        width: 110px;
        min-height: 110px;
    }
}

@media (max-width: 768px) {
    .premium-article .entry-header,
    .premium-article .entry-content,
    .premium-article .entry-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .premium-article .entry-title {
        font-size: 1.6rem;
    }
    
    .post-meta-box {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        margin: 0 -20px;
    }
    
    .meta-stats {
        width: 100%;
        justify-content: flex-start;
    }
    
    .stat-item {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    /* Navigation: single column with horizontal cards */
    .post-navigation-premium .nav-links {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .post-navigation-premium .nav-thumb {
        width: 100px;
        min-height: 100px;
    }
    
    .post-navigation-premium .nav-content {
        padding: 14px;
    }
    
    .post-navigation-premium .nav-arrow {
        width: 34px;
        height: 34px;
    }
    
    .post-navigation-premium .nav-title {
        font-size: 0.85rem;
    }
    
    .bottom-share .share-btn span {
        display: none;
    }
    
    .bottom-share .share-btn {
        padding: 12px 15px;
    }
    
    .related-posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}
