/* ============================================================
   YTMP3 BLOG STYLES — same design as the main site (bloom)
   Flat colors, no gradients. Light + dark theme.
   ============================================================ */
:root {
    color-scheme: light;
    --bg: #fff;
    --surface: #fff;
    --card: #fff;
    --soft: #e8f3ff;
    --heading: #182238;
    --text: #182238;
    --muted: #4c5b72;
    --primary: #0072c6;
    --primary-dark: #005fa6;
    --border: #d8e1ed;
    --success: #16a34a;
    --green-bg: #e9f7ef;
    --green-border: #b9e6cb;
    --green-text: #04763b;
    --tip-bg: #fffbeb;
    --tip-border: #f59e0b;
    --tip-text: #7c4a03;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 8px 24px rgba(0, 0, 0, .05);
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .12);
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #13192d;
    --surface: #151e34;
    --card: #151e34;
    --soft: #213b5b;
    --heading: #f3f6ff;
    --text: #f3f6ff;
    --muted: #b7c3dc;
    --primary: #69bfff;
    --primary-dark: #4aa8f0;
    --border: #344562;
    --success: #4ade80;
    --green-bg: #12291c;
    --green-border: #1f5136;
    --green-text: #6ee7a0;
    --tip-bg: #2a2410;
    --tip-border: #f59e0b;
    --tip-text: #fcd34d;
    --shadow: 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font: 15px/1.7 Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}
img { max-width: 100%; border: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ---------- Header (flat, centered logo, border under the nav) ---------- */
.header { background: var(--bg); padding: 12px 0 0; }
.header-inner {
    width: 92%; max-width: 928px; margin: auto;
    display: flex; flex-direction: column-reverse; align-items: stretch;
}
.logo {
    align-self: center; padding: 22px 0 20px; line-height: 1;
    font-size: 22px; font-weight: 800; letter-spacing: -.02em;
    color: var(--primary); text-decoration: none;
}
.logo:hover { color: var(--primary); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .logo {
        background: linear-gradient(90deg, #0072c6 0 39.1%, var(--text) 39.1% 100%);
        -webkit-background-clip: text; background-clip: text;
        -webkit-text-fill-color: transparent; color: transparent;
    }
}
.nav {
    width: 100%; display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
    min-height: 64px; padding: 0 2px; border-bottom: 1px solid var(--border);
}
.nav a {
    display: inline-flex; align-items: center; min-height: 44px;
    color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none;
}
.nav a:hover { color: var(--primary); }
.nav a.nav-blog { color: var(--primary); }
.theme-control {
    margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
    color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.theme-control a {
    min-height: auto; color: var(--primary); font-size: 13px;
    text-decoration: underline; text-underline-offset: 2px;
}
.theme-control a:hover { color: var(--primary); }

/* ---------- Blog hero (flat) ---------- */
.blog-hero { background: var(--bg); padding: 18px 0 6px; }
.blog-hero-inner { width: 92%; max-width: 928px; margin: auto; }
.blog-hero h1 { margin: 0 0 6px; color: var(--text); font-size: 30px; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; }
.blog-hero p { margin: 0; max-width: 720px; color: var(--muted); font-size: 15px; }

/* ---------- 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) ---------- */
.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: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.card:hover { border-color: var(--primary); box-shadow: 0 10px 26px rgba(0, 0, 0, .06); transform: none; }

.card-thumb {
    display: flex; align-items: center; justify-content: center;
    aspect-ratio: 16 / 9; font-size: 42px; text-decoration: none; overflow: hidden;
    background: var(--soft);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.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: var(--primary); color: #fff !important;
    font-size: 13.5px; font-weight: 700;
    padding: 10px 18px; border-radius: 8px; text-decoration: none;
    transition: background .18s ease;
}
.btn-read-more:hover { background: var(--primary-dark); }
.btn-read-more i { font-size: 12px; }

/* Category thumbnails (flat, same tint) */
.cat-guides, .cat-devices, .cat-quality, .cat-tips, .cat-legal { background: var(--soft); }

/* ---------- Metadata ---------- */
.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; }
.meta-author { color: var(--muted); }
.meta-author:hover { color: var(--primary); }
.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 card ---------- */
.featured-card {
    display: block; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: none; 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; }
.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(--muted); 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: 8px; background: var(--primary); color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; }
.page-link:hover { background: var(--primary-dark); color: #fff; }
.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: 8px; 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: none; padding: 28px 32px 32px; min-width: 0;
}
.blog-content { min-width: 0; }
.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; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }

/* Author bar + article meta */
.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-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: var(--success); }
.me-1 { margin-right: 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 var(--tip-border);
    background: var(--tip-bg); color: var(--tip-text); 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 (flat list, same as the main site) */
.post-faq { margin-top: 34px; }
.post-faq h2 { color: var(--heading); font-size: 22px; margin: 0 0 8px; }
.faq-item { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; margin: 0; background: none; }
.faq-item:first-of-type { border-top: 1px solid var(--border); }
.faq-item summary {
    position: relative; padding: 18px 34px 18px 0; cursor: pointer;
    font-weight: 700; 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: 2px; top: 50%; transform: translateY(-50%);
    color: var(--primary); font-size: 20px; font-weight: 400; line-height: 1;
}
.faq-item[open] summary::after { content: '−'; }
.faq-answer { padding: 0 0 18px; color: var(--muted); font-size: 14.5px; }
.faq-answer p { margin: 0; }

/* CTA */
.cta-box {
    margin-top: 34px; padding: 26px; text-align: center;
    background: var(--soft); border: 1px solid var(--border); 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 22px; border-radius: 8px;
    background: var(--primary); color: #fff; text-decoration: none; font-weight: 700; font-size: 14px;
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline {
    display: inline-block; padding: 9px 18px; border-radius: 8px;
    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: 0 0 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: none; 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 (centered, like the main site) ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg); padding: 22px 0 14px; }
.footer-inner {
    width: 92%; max-width: 928px; margin: auto;
    display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.copyright { color: var(--muted); font-size: 13px; }
.footer nav { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.footer nav a { color: var(--muted); text-decoration: none; font-size: 13px; }
.footer nav a:hover { color: var(--primary); }

/* ---------- Active filter bar ---------- */
.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: none;
}
.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 var(--border);
    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: 8px; background: var(--primary);
    color: #fff; font-size: 12.5px; font-weight: 700;
}
.filter-clear-btn:hover { background: var(--primary-dark); color: #fff; }

/* ---------- Author block (icon based) ---------- */
.author-icon {
    width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--primary); 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; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .post-layout, .blog-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
}
@media (max-width: 620px) {
    .header { padding: 10px 0 0; }
    .logo { font-size: 19px; padding: 18px 0 16px; }
    .nav { gap: 16px; min-height: 56px; }
    .nav a { font-size: 13px; }
    .blog-hero { padding: 14px 0 4px; }
    .blog-hero h1 { font-size: 24px; }
    .blog-hero p { font-size: 14px; }
    .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; }
    .blog-active-filter-bar { flex-direction: column; align-items: flex-start; }
}
