/*
 * FifoZone Premium Blog Layout
 * Modern, readable, magazine-style CSS
 */

:root {
    --blog-font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --blog-font-secondary: 'Merriweather', Georgia, serif;
    --blog-accent: #f07021; /* FifoZone Orange */
    --blog-accent-light: #fff7ed;
    --blog-accent-alt: #7c3aed; /* FifoZone Purple */
    --blog-text-main: #1f2937;
    --blog-text-muted: #6b7280;
    --blog-border: #e5e7eb;
    --blog-bg: #ffffff;
    --blog-bg-muted: #f9fafb;
    --blog-radius: 12px;
    --blog-max-width: 740px;
}

/* =========================================
   1. Base & Reading Container
   ========================================= */
.single-article-shell {
    background-color: var(--blog-bg);
    color: var(--blog-text-main);
    font-family: var(--blog-font-primary);
    line-height: 1.8;
    padding-bottom: 60px;
}

.fifo-article-wrap {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 0 20px;
    position: relative;
}

.fifo-article-main {
    width: 100%;
    max-width: var(--blog-max-width);
}

/* =========================================
   2. Breadcrumbs
   ========================================= */
.fifo-breadcrumbs {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    font-size: 13px;
    color: var(--blog-text-muted);
}
.fifo-breadcrumbs a {
    color: var(--blog-accent);
    text-decoration: none;
    font-weight: 600;
}
.fifo-breadcrumbs a:hover {
    text-decoration: underline;
}
#breadcrumbs { margin: 0; }

/* =========================================
   3. Hero Section
   ========================================= */
.fifo-hero {
    max-width: 1200px;
    margin: 0 auto 40px;
    border-radius: var(--blog-radius);
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 480px;
    display: flex;
    align-items: flex-end;
}

.fifo-hero-inner {
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.4) 60%, transparent 100%);
    width: 100%;
    padding: 60px 40px 40px;
    color: #fff;
}

.fifo-cat-badge {
    display: inline-block;
    background: var(--blog-accent);
    color: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    text-decoration: none;
}
.fifo-cat-badge:hover { background: #e06015; color: #fff; }

.fifo-hero-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 20px;
    color: #fff;
}

.fifo-hero-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

.fifo-meta-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fifo-dot { margin: 0 4px; }

.fifo-author {
    display: flex;
    align-items: center;
    gap: 12px;
}
.fifo-author img {
    border-radius: 50%;
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}
.fifo-author-info {
    display: flex;
    flex-direction: column;
}
.fifo-author-name {
    font-weight: 700;
    color: #fff;
    font-size: 15px;
}
.fifo-author-role {
    font-size: 12px;
    color: #a7f3d0;
}

/* =========================================
   4. Content Typography
   ========================================= */
.fifo-article-content {
    font-size: 18px;
    color: #374151;
    margin-bottom: 50px;
}
.fifo-article-content p {
    margin-bottom: 1.5em;
}
.fifo-article-content h2, 
.fifo-article-content h3, 
.fifo-article-content h4 {
    color: var(--blog-text-main);
    font-weight: 800;
    margin: 1.8em 0 0.8em;
    line-height: 1.3;
}
.fifo-article-content h2 { font-size: 28px; }
.fifo-article-content h3 { font-size: 22px; }
.fifo-article-content h4 { font-size: 18px; }

.fifo-article-content img {
    border-radius: var(--blog-radius);
    max-width: 100%;
    height: auto;
    margin: 24px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.fifo-article-content blockquote {
    font-family: var(--blog-font-secondary);
    font-size: 22px;
    font-style: italic;
    color: var(--blog-accent-alt);
    border-left: 4px solid var(--blog-accent);
    padding: 24px 32px;
    margin: 40px 0;
    background: var(--blog-accent-light);
    border-radius: 0 var(--blog-radius) var(--blog-radius) 0;
}
.fifo-article-content blockquote p { margin: 0; }

.fifo-article-content ul, 
.fifo-article-content ol {
    margin: 0 0 1.5em 20px;
    padding-left: 20px;
}
.fifo-article-content li {
    margin-bottom: 8px;
}

/* Callout Box (Tips) */
.fifo-callout {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 20px 24px;
    border-radius: var(--blog-radius);
    margin: 32px 0;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.fifo-callout-icon {
    font-size: 24px;
}
.fifo-callout-text h4 {
    margin: 0 0 8px;
    color: #166534;
}
.fifo-callout-text p {
    margin: 0;
    color: #15803d;
    font-size: 16px;
}

/* =========================================
   5. Sticky Elements (Progress & Share)
   ========================================= */
#fifo-reading-progress {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: transparent;
    z-index: 9999;
}
#fifo-reading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--blog-accent), var(--blog-accent-alt));
    transition: width 0.1s ease-out;
}

.fifo-sticky-share {
    position: sticky;
    top: 100px;
    width: 48px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-self: flex-start;
    padding-top: 20px;
}
.fifo-sticky-share .share-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid var(--blog-border);
    background: var(--blog-bg);
    color: var(--blog-text-muted);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.fifo-sticky-share .share-btn:hover {
    background: var(--blog-accent);
    color: #fff;
    border-color: var(--blog-accent);
    transform: translateY(-2px);
}

/* =========================================
   6. Table of Contents (TOC)
   ========================================= */
.fifo-toc {
    background: var(--blog-bg-muted);
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius);
    padding: 24px;
    margin: 40px 0;
}
.fifo-toc-title {
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.fifo-toc ul {
    list-style: none;
    margin: 0; padding: 0;
}
.fifo-toc ul li { margin-bottom: 12px; }
.fifo-toc ul li a {
    color: var(--blog-text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease;
}
.fifo-toc ul li a:hover {
    color: var(--blog-accent);
}
.fifo-toc ul li.toc-h3 { padding-left: 20px; font-size: 14px; }

/* =========================================
   7. Author Box
   ========================================= */
.fifo-author-box {
    display: flex;
    gap: 24px;
    background: var(--blog-bg-muted);
    padding: 32px;
    border-radius: var(--blog-radius);
    margin: 50px 0;
    border: 1px solid var(--blog-border);
}
.fifo-author-box img {
    width: 80px; height: 80px;
    border-radius: 50%;
    object-fit: cover;
}
.author-right h3 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 800;
}
.author-bio {
    font-size: 15px;
    color: var(--blog-text-muted);
    margin-bottom: 16px;
    line-height: 1.6;
}
.author-cred {
    display: flex; gap: 8px; flex-wrap: wrap;
}
.author-cred .badge {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    background: #e0e7ff;
    color: #4f46e5;
}
.author-cred .badge.vet-approved {
    background: #dcfce7;
    color: #166534;
}

/* =========================================
   8. Related Products & Posts
   ========================================= */
.fifo-related-products, .fifo-related-posts {
    margin: 50px 0;
}
.fifo-related-products h2, .fifo-related-posts h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 24px;
}
.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.product-card {
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius);
    padding: 16px;
    background: var(--blog-bg);
    transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
}
.product-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.product-image img {
    width: 100%; height: 180px; object-fit: contain;
    margin-bottom: 16px;
}
.product-title {
    font-size: 14px; font-weight: 700; margin: 0 0 12px;
    line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-meta {
    margin-top: auto;
    display: flex; justify-content: space-between; align-items: center;
}
.product-meta .price { font-weight: 800; color: var(--blog-text-main); font-size: 15px; }
.btn-primary {
    background: var(--blog-accent); color: #fff;
    border: none; border-radius: 6px;
    padding: 6px 12px; font-size: 13px; font-weight: 700;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.related-card a { text-decoration: none; color: inherit; display: block; }
.related-image img {
    width: 100%; height: 160px; object-fit: cover;
    border-radius: 8px; margin-bottom: 12px;
}
.related-cat { font-size: 11px; font-weight: 700; color: var(--blog-accent-alt); text-transform: uppercase; }
.related-body h3 { font-size: 16px; font-weight: 800; margin: 4px 0 8px; line-height: 1.3; }
.related-body .excerpt { font-size: 13px; color: var(--blog-text-muted); margin: 0; line-height: 1.5; }

/* =========================================
   9. Newsletter
   ========================================= */
.fifo-newsletter {
    background: linear-gradient(135deg, var(--blog-accent-alt), #4c1d95);
    color: #fff;
    padding: 40px;
    border-radius: var(--blog-radius);
    text-align: center;
    margin: 50px 0;
}
.fifo-newsletter h2 { margin: 0 0 10px; font-size: 26px; color: #fff; }
.newsletter-benefits { font-size: 16px; opacity: 0.9; margin-bottom: 24px; }
.newsletter-form {
    display: flex; gap: 8px; max-width: 400px; margin: 0 auto;
}
.newsletter-form input {
    flex: 1; padding: 12px 16px; border-radius: 8px; border: none; font-size: 15px; outline: none;
}
.newsletter-form .btn-cta {
    background: var(--blog-accent); color: #fff; padding: 12px 24px;
    border: none; border-radius: 8px; font-weight: 700; cursor: pointer;
}

/* =========================================
   10. Comments & Post Nav
   ========================================= */
.fifo-comments {
    margin: 50px 0;
}
.fifo-comments h2 { font-size: 24px; font-weight: 800; margin-bottom: 24px; }
.comment-list { list-style: none; padding: 0; }
.comment-body {
    display: flex; gap: 16px; margin-bottom: 24px;
    background: var(--blog-bg-muted); padding: 20px; border-radius: var(--blog-radius);
}
.comment-author img { border-radius: 50%; width: 48px; height: 48px; }
.comment-meta { font-size: 12px; color: var(--blog-text-muted); margin-bottom: 8px; }
.comment-content { font-size: 15px; }

.fifo-post-nav {
    display: flex; justify-content: space-between; gap: 20px;
    padding-top: 32px; border-top: 1px solid var(--blog-border);
}
.fifo-post-nav a {
    text-decoration: none; color: var(--blog-accent); font-weight: 700; font-size: 15px;
}
.fifo-post-nav a:hover { text-decoration: underline; }

/* =========================================
   11. Responsive
   ========================================= */
@media (max-width: 1024px) {
    .fifo-sticky-share { display: none; }
}

@media (max-width: 768px) {
    .fifo-hero {
        border-radius: 0;
        margin: 0 calc(-1 * 20px) 32px;
        min-height: 400px;
    }
    .fifo-hero-inner { padding: 40px 20px 20px; }
    .fifo-hero-title { font-size: 28px; }
    
    .fifo-author-box { flex-direction: column; text-align: center; align-items: center; }
    .author-cred { justify-content: center; }
    
    .newsletter-form { flex-direction: column; }
    .related-products-grid, .related-posts-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .related-products-grid, .related-posts-grid { grid-template-columns: 1fr; }
}
