/* * LAYOUT: Single Post Typography & Structure
 * File: viralgrid/assets/css/layout-single.css
 */

/* --- Post Header --- */
.viralgrid-breadcrumbs {
    font-size: 0.85rem; font-weight: 600; color: #94a3b8; 
    margin-bottom: 15px; display: flex; flex-wrap: wrap; align-items: center; line-height: 1.4;
}
.viralgrid-breadcrumbs a { color: var(--accent-color); }
.viralgrid-breadcrumbs .sep { margin: 0 8px; color: #cbd5e1; }

h1.entry-title {
    font-size: 2.6rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em;
    color: var(--heading-color); margin-top: 0; margin-bottom: 15px; 
}

.entry-meta-header {
    font-size: 0.95rem; color: #64748b; font-weight: 500;
    margin-bottom: 30px; display: flex; align-items: center; flex-wrap: wrap;
}
.entry-meta-header .meta-sep { margin: 0 5px; }

/* --- Featured Image Wrapper --- */
.post-thumbnail { margin-bottom: 30px; display: block; }

/* Light Mode Default Skeleton */
.single-hero-wrapper {
    position: relative; width: 100%; border-radius: 8px; overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    height: 0; padding-top: 56.25%;
    
    /* LIGHT COLORS */
    background-color: #e2e8f0; 
    background-image: linear-gradient(90deg, #e2e8f0 0px, #f8fafc 60px, #e2e8f0 120px);
    background-size: 600px;
    animation: shimmer-wave 2s infinite linear;
}

/* --- Content Area --- */
.post-content { 
    word-wrap: break-word; font-size: 1.1rem; color: var(--text-color); 
}
.post-content p { margin-bottom: 1.5em; }

/* --- APP-LIKE LAZY LOAD STYLES --- */

/* 1. Content Images Wrapper (Light Mode Default) */
.viral-skeleton-box {
    display: block;
    position: relative;
    width: 100%;
    height: auto;
    min-height: 100px; 
    border-radius: 8px;
    overflow: hidden;
    margin: 30px auto;
    
    /* LIGHT COLORS */
    background-color: #e2e8f0;
    background-image: linear-gradient(90deg, #e2e8f0 0px, #f8fafc 60px, #e2e8f0 120px);
    background-size: 600px;
    animation: shimmer-wave 2s infinite linear;
}

/* Shared Animation */
@keyframes shimmer-wave {
    0% { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}

/* 2. The Image */
.post-content img.app-lazy {
    opacity: 0; transition: opacity 0.5s ease-in-out;
    display: block; width: 100%; height: auto;
}

.post-thumbnail img.app-lazy {
    opacity: 0; transition: opacity 0.5s ease-in-out;
}

/* 3. Loaded State */
.post-content img.app-lazy.is-loaded,
.post-thumbnail img.app-lazy.is-loaded {
    opacity: 1;
}

.viral-skeleton-box.finished,
.single-hero-wrapper.finished {
    animation: none;
    background-image: none;
    background-color: transparent;
    min-height: 0;
}

/* --- Mobile Single Post Layout --- */
@media (max-width: 600px) {
    article { padding-top: 25px; }
    .viralgrid-breadcrumbs, h1.entry-title, .entry-meta-header, .post-content { 
        padding-left: 20px; padding-right: 20px; 
    }
    h1.entry-title { font-size: 2rem; margin-bottom: 12px; }
    .post-thumbnail { margin-left: 0; margin-right: 0; margin-bottom: 25px; width: 100%; }
    .single-hero-wrapper { border-radius: 0; }
}

/* --- DARK MODE OVERRIDES --- */
body.dark-mode .viral-skeleton-box,
body.dark-mode .single-hero-wrapper {
    background-color: #1e293b;
    background-image: linear-gradient(90deg, #1e293b 0px, #334155 60px, #1e293b 120px);
}