/* ============================================================
   YTMP3 BLOG STYLES
   ============================================================ */
:root {
    --primary: #0055b9;
    --primary-dark: #004fab;
    --soft: #eef4fa;
    --heading: #0d0d1a;
    --text: #1a1a2e;
    --muted: #6b7280;
    --border: #e8e8ef;
    --surface: #fff;
    --bg: #f8f9fb;
    --green-bg: #e9f7ef;
    --green-border: #b9e6cb;
    --green-text: #04763b;
    --radius: 14px;
    --shadow: 0 2px 16px rgba(0, 0, 0, .06);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font: 15px/1.6 Poppins, system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
}
img { max-width: 100%; }
a { color: var(--primary); }

/* ---------- Header ---------- */
.header { background: var(--primary); padding: 20px 0; }
.header-inner {
    width: 92%; max-width: 928px; margin: auto;
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.logo { color: #fff; font-size: 20px; font-weight: 700; text-decoration: none; }
.nav { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.nav a { color: #cfe0f6; text-decoration: none; font-weight: 600; font-size: 14px; }
.nav a:hover { color: #fff; }
.nav a.nav-blog { background: #fff; color: var(--primary); padding: 6px 16px; border-radius: 999px; }
.nav a.nav-blog:hover { background: #eaf2fd; color: var(--primary-dark); }

/* ---------- Blog hero ---------- */
.blog-hero { background: linear-gradient(180deg, var(--primary), var(--primary-dark)); padding: 30px 0 44px; }
.blog-hero-inner { width: 100%; max-width: 928px; margin: auto; color: #fff; }
.blog-hero h1 { margin: 0 0 6px; font-size: 30px; line-height: 1.2; }
.blog-hero p { margin: 0 auto 18px; max-width: 920px; color: #dbe8fa; font-size: 15px; }
/* Short variant: category pills only (used on article pages) */
.blog-hero--sub { padding: 14px 0 18px; background: var(--primary); }
.cat-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
    padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14);
    color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.pill:hover { background: rgba(255, 255, 255, .26); }
.pill.active { background: #fff; color: var(--primary); }

/* ---------- Main ---------- */
.blog-main { width: 92%; max-width: 928px; margin: 28px auto 56px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Cards (2-column listing, blog style) ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.card {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(0, 85, 185, .35); box-shadow: 0 6px 20px rgba(0, 85, 185, .14); }

/* ---------- Cards and media ---------- */
.card-thumb {
    display: flex; align-items: center; justify-content: center;
    aspect-ratio: 16 / 9; font-size: 42px; text-decoration: none; overflow: hidden;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.card:hover .card-thumb img { transform: scale(1.03); }
.post-hero { margin: 18px -32px 0; }
.post-hero img {
    width: 100%; height: auto; display: block;
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.card-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }

.grid-card-badges { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.grid-card-title { margin: 0 0 10px; font-size: 17px; font-weight: 800; line-height: 1.35; }
.grid-card-title a {
    color: var(--heading); text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.grid-card-title a:hover { color: var(--primary); }
.grid-card-excerpt {
    margin: 0 0 16px; color: var(--muted); font-size: 13.5px; line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    flex: 1;
}
.grid-card-btn-wrap { margin-top: auto; }
.btn-read-more {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff !important; font-size: 13.5px; font-weight: 700;
    padding: 10px 20px; border-radius: 6px; text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 85, 185, .24);
    transition: transform .2s ease, box-shadow .2s ease;
}
.btn-read-more:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 85, 185, .36); }
.btn-read-more i { font-size: 12px; }

/* Category backgrounds */
.cat-guides     { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.cat-devices    { background: linear-gradient(135deg, #e6e4fd, #cfcaf9); }
.cat-quality    { background: linear-gradient(135deg, #d9fbfa, #b5f4f1); }
.cat-tips       { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.cat-legal      { background: linear-gradient(135deg, #d9f2e4, #bfe6cf); }

/* ---------- Metadata ---------- */
.meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
    color: var(--muted); font-size: 12px; line-height: 1.4;
}
.meta .avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }

/* Card meta with icons (date · author · views) */
.grid-card-meta {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 4px 12px; margin-bottom: 4px;
    color: var(--muted); font-size: 12.5px; line-height: 1.4;
}
.grid-card-meta .meta-item { display: inline-flex; align-items: center; gap: 4px; }
.grid-card-meta .meta-item i { color: var(--primary); font-size: 12px; }
.grid-card-readtime { margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.grid-card-readtime i { color: var(--primary); margin-right: 3px; }
.badge-cat {
    align-self: flex-start; padding: 4px 10px; border-radius: 4px;
    background: var(--soft); color: var(--primary); border: 1px solid var(--border);
    font-size: 11.5px; font-weight: 800; letter-spacing: .5px;
    text-transform: uppercase; text-decoration: none;
}
.badge-verified {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    background: var(--green-bg); border: 1px solid var(--green-border); color: var(--green-text);
    font-size: 12px; font-weight: 600; white-space: nowrap;
}

/* ---------- Featured (image on top, text below, snaptik style) ---------- */
.featured-card {
    display: block; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); margin-bottom: 24px;
}
.featured-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; max-height: 440px; overflow: hidden; background: var(--soft); font-size: 72px; text-decoration: none; }
.featured-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.featured-card:hover .featured-thumb img { transform: scale(1.02); }
.featured-body { padding: 24px 28px 28px; }
.featured-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.featured-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.featured-meta .meta-item { display: inline-flex; align-items: center; gap: 5px; }
.featured-meta .meta-item i { color: var(--primary); font-size: 12px; }
.featured-body h2 { margin: 0 0 12px; font-size: clamp(20px, 2.4vw, 26px); font-weight: 800; line-height: 1.3; }
.featured-body h2 a { color: var(--heading); text-decoration: none; }
.featured-body h2 a:hover { color: var(--primary); }
.featured-body > p {
    margin: 0 0 20px; color: var(--text); font-size: 14.5px; line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 32px; flex-wrap: wrap; }
.page-link { padding: 9px 16px; border-radius: 9px; background: var(--primary); color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; }
.page-link:hover { background: var(--primary-dark); }
.page-link.num { background: var(--surface); color: var(--heading); border: 1px solid var(--border); }
.page-link.num:hover { background: var(--soft); color: var(--primary); }
.page-num { color: var(--muted); font-size: 14px; }
.page-num.current { padding: 9px 16px; border-radius: 9px; background: var(--primary); color: #fff; font-weight: 600; }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.post-layout, .blog-layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
.post-single {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 28px 32px 32px; min-width: 0;
}
.blog-content { min-width: 0; }
/* Breadcrumbs (outside the card, in the content column) */
.breadcrumb-nav { margin: 0 0 16px; }
.breadcrumb-list {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    list-style: none; margin: 0; padding: 0;
    font-size: 13px; color: var(--muted); line-height: 1.4;
}
.breadcrumb-list a { color: var(--muted); text-decoration: none; }
.breadcrumb-list a:hover { color: var(--primary); }
.breadcrumb-list a i { font-size: 11px; margin-right: 4px; }
.bc-sep { color: var(--muted); opacity: .7; }
.bc-current { color: var(--heading); font-weight: 600; min-width: 0; }
.post-badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.post-header h1 { margin: 0 0 18px; color: var(--heading); font-size: 28px; line-height: 1.25; }

/* Author with large avatar */
/* Author bar + article meta (snaptik style) */
.article-meta-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
    margin-bottom: 28px; flex-wrap: wrap;
}
.author-meta-block { display: flex; align-items: center; gap: 12px; }
.author-avatar-lg { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 44px; }
.author-details { display: flex; flex-direction: column; }
.author-name-text { font-size: 15px; font-weight: 800; color: var(--heading); }
.author-role-sub { font-size: 12.5px; color: var(--muted); }
.article-info-chips { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.info-chip { display: inline-flex; align-items: center; font-size: 13px; color: var(--muted); font-weight: 500; }
.text-green { color: #009638; }
.me-1 { margin-right: 4px; }
.ms-1 { margin-left: 4px; }

/* Article content */
.post-content { margin-top: 22px; font-size: 15.5px; line-height: 1.75; overflow-wrap: break-word; }
.post-content h2 { margin: 32px 0 10px; color: var(--heading); font-size: 22px; line-height: 1.3; }
.post-content h3 { margin: 24px 0 8px; color: var(--heading); font-size: 17px; }
.post-content p { margin: 14px 0; }
.post-content ul, .post-content ol { padding-left: 24px; margin: 14px 0; }
.post-content li + li { margin-top: 6px; }
.post-content img { border-radius: 10px; margin: 10px 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.post-content th, .post-content td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.post-content th { background: var(--soft); color: var(--heading); }
.post-content blockquote {
    margin: 18px 0; padding: 14px 18px; border-left: 3px solid var(--primary);
    background: var(--soft); border-radius: 0 10px 10px 0; color: var(--text);
}
.post-content .tip {
    margin: 18px 0; padding: 14px 18px; border-left: 3px solid #f59e0b;
    background: #fffbeb; border-radius: 0 10px 10px 0;
}
.post-content .steps { counter-reset: step; list-style: none; padding-left: 0; }
.post-content .steps li {
    counter-increment: step; position: relative; padding: 4px 0 4px 44px; margin: 12px 0;
}
.post-content .steps li::before {
    content: counter(step); position: absolute; left: 0; top: 4px;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--primary); color: #fff; font-weight: 700; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
}
.post-content a { font-weight: 500; }

/* FAQ */
.post-faq { margin-top: 34px; }
.post-faq h2 { color: var(--heading); font-size: 22px; }
.faq-item { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 9px; background: var(--surface); overflow: hidden; }
.faq-item summary {
    position: relative; padding: 15px 46px 15px 16px; cursor: pointer;
    font-weight: 600; color: var(--heading); font-size: 15px; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
    color: var(--primary); font-size: 20px; font-weight: 400;
}
.faq-item[open] summary::after { content: '−'; }
.faq-answer { padding: 0 16px 15px; color: var(--text); font-size: 14.5px; }
.faq-answer p { margin: 0; }

/* CTA */
.cta-box {
    margin-top: 34px; padding: 26px; text-align: center;
    background: linear-gradient(135deg, var(--soft), #dfeafc);
    border: 1px solid #cfe0f6; border-radius: var(--radius);
}
.cta-box h2 { margin: 0 0 6px; color: var(--heading); font-size: 20px; }
.cta-box p { margin: 0 auto 16px; max-width: 460px; color: var(--muted); font-size: 14px; }
.btn-primary {
    display: inline-block; padding: 12px 24px; border-radius: 999px;
    background: var(--primary); color: #fff; text-decoration: none; font-weight: 600; font-size: 14px;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline {
    display: inline-block; padding: 9px 18px; border-radius: 999px;
    border: 1px solid var(--primary); color: var(--primary); text-decoration: none; font-weight: 600; font-size: 13px;
}
.btn-outline:hover { background: var(--primary); color: #fff; }

/* Related */
.post-related { margin-top: 34px; }
.post-related h2 { color: var(--heading); font-size: 22px; margin-bottom: 14px; }
.post-related .grid { grid-template-columns: repeat(2, 1fr); }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 20px; }
.widget {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 18px;
}
.widget h3 { margin: 0 0 12px; color: var(--heading); font-size: 15px; text-transform: uppercase; letter-spacing: .03em; }
.recent-link {
    display: flex; flex-direction: column; gap: 2px; padding: 9px 0;
    border-bottom: 1px solid var(--border); text-decoration: none;
}
.widget .recent-link:last-child { border-bottom: 0; }
.recent-title { color: var(--heading); font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.recent-link:hover .recent-title { color: var(--primary); }
.recent-meta { color: var(--muted); font-size: 12px; }
.widget-cats { display: flex; flex-direction: column; gap: 8px; }
.widget-cats a { text-decoration: none; color: var(--text); font-size: 14px; font-weight: 500; }
.widget-cats a:hover { color: var(--primary); }
.widget-cta p { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; }

/* 404 */
.post-notfound { text-align: center; padding: 70px 0; }
.post-notfound h1 { color: var(--heading); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--surface); padding: 22px 0; }
.footer-inner {
    width: 92%; max-width: 928px; margin: auto;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.copyright { color: var(--muted); font-size: 13px; }
.footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer nav a { color: var(--text); text-decoration: none; font-size: 13px; }
.footer nav a:hover { color: var(--primary); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .post-layout, .blog-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
}
@media (max-width: 620px) {
    .header { padding: 14px 0; }
    .logo { font-size: 18px; }
    .nav { gap: 10px 16px; }
    .nav a { font-size: 13px; }
    .blog-hero { padding: 22px 12px 26px; }
    .blog-hero h1 { font-size: 24px; }
    .blog-hero p { font-size: 14px; margin-bottom: 14px; }
    .pill { padding: 6px 12px; font-size: 12.5px; }
    .grid, .post-related .grid { grid-template-columns: 1fr; }
    .post-single { padding: 20px 18px 26px; }
    .post-hero { margin-left: -18px; margin-right: -18px; }
    .featured-body { padding: 18px; }
    .post-header h1 { font-size: 23px; }
    .article-meta-bar { align-items: flex-start; }
    .post-content table { display: block; overflow-x: auto; }
    .footer-inner { flex-direction: column; text-align: center; }
}

/* ---------- Active filter bar (author / category, snaptik style) ---------- */
.blog-active-filter-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    flex-wrap: wrap; margin: 0 0 20px; padding: 12px 16px;
    background: var(--surface); border: 1px solid var(--border);
    border-left: 4px solid var(--primary); border-radius: 10px;
    box-shadow: var(--shadow);
}
.blog-active-filter-bar .filter-tab-pill {
    display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
    font-size: 13.5px; color: var(--text);
}
.blog-active-filter-bar .filter-tab-pill i { color: var(--primary); }
.blog-active-filter-bar .filter-tab-pill strong { color: var(--heading); }
.filter-count-chip {
    display: inline-block; margin-left: 4px; padding: 2px 9px; border-radius: 999px;
    background: var(--soft); color: var(--primary); border: 1px solid #cfe0f6;
    font-size: 11.5px; font-weight: 800;
}
.filter-clear-btn {
    display: inline-flex; align-items: center; gap: 5px; text-decoration: none;
    padding: 7px 14px; border-radius: 999px; background: var(--primary);
    color: #fff; font-size: 12.5px; font-weight: 700;
}
.filter-clear-btn:hover { background: var(--primary-dark); }

/* ---------- Author block (icon based, no image) ---------- */
.author-icon {
    width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; font-size: 17px;
}
a.author-meta-block { text-decoration: none; }
a.author-meta-block:hover .author-name-text { color: var(--primary); }
.author-count { color: var(--primary); font-weight: 600; }
.author-list-pill {
    display: inline-flex; align-items: center; gap: 5px;
    margin-left: 8px; padding: 2px 9px; border-radius: 999px;
    background: var(--soft); border: 1px solid #cfe0f6;
    color: var(--primary); font-size: 11.5px; font-weight: 700; text-decoration: none;
}
.author-list-pill:hover { background: var(--primary); color: #fff; }

@media (max-width: 620px) {
    .blog-active-filter-bar { flex-direction: column; align-items: flex-start; }
}