/* public/assets/css/blog.css */
.blog-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.blog-head .sec-h2 {
    margin-bottom: 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.blog-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: var(--teal-border);
    box-shadow: var(--shadow);
}

.bc-media {
    display: block;
    aspect-ratio: 16 / 10;
    background: var(--card2);
    overflow: hidden;
}

.bc-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.blog-card:hover .bc-media img {
    transform: scale(1.04);
}

.bc-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 2rem;
    color: var(--teal-text);
    background: radial-gradient(circle at 30% 30%, var(--teal-glow), transparent 70%), var(--card2);
}

.bc-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.bc-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    color: var(--muted);
}

.bc-cat {
    display: inline-block;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--teal-text);
    background: var(--teal-glow);
    border: 1px solid var(--teal-border);
    padding: 3px 10px;
    border-radius: 99px;
    text-decoration: none;
}

.bc-cat:hover {
    background: var(--teal-border);
}

.bc-title {
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.bc-title a {
    color: var(--white);
    text-decoration: none;
}

.bc-title a:hover {
    color: var(--teal-text);
}

.bc-excerpt {
    font-size: 0.84rem;
    color: var(--muted);
    line-height: 1.7;
}

.bc-link {
    margin-top: auto;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--teal-text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bc-link i {
    transition: transform 0.2s;
}

.bc-link:hover i {
    transform: translateX(4px);
}

.blog-hero {
    position: relative;
    padding: 140px 24px 56px;
    background: radial-gradient(ellipse 70% 80% at 50% 0%, rgba(146, 64, 14, 0.12) 0%, transparent 60%), var(--bg);
}

.blog-hero-inner {
    max-width: 760px;
    margin: 0 auto;
}

.blog-search {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 520px;
    margin: 28px auto 0;
    background: var(--card);
    border: 1px solid var(--border2);
    border-radius: 99px;
    padding: 6px 6px 6px 18px;
}

.blog-search i {
    color: var(--muted);
}

.blog-search input {
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    outline: none;
    color: var(--ink);
    font-family: inherit;
    font-size: 0.88rem;
}

.blog-search .btn {
    border-radius: 99px;
}

.blog-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 36px;
}

.blog-cat {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink2);
    background: var(--card);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 99px;
    text-decoration: none;
    transition: all 0.2s;
}

.blog-cat span {
    color: var(--muted);
    font-weight: 500;
    margin-left: 4px;
}

.blog-cat:hover {
    border-color: var(--teal-border);
    color: var(--white);
}

.blog-cat.active {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}

.blog-cat.active span {
    color: rgba(255, 255, 255, 0.8);
}

.blog-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
    border: 1px dashed var(--border2);
    border-radius: var(--radius);
}

.blog-empty i {
    font-size: 2.2rem;
    margin-bottom: 12px;
    display: block;
}

.blog-empty p {
    margin-bottom: 16px;
}

.blog-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 48px;
    font-size: 0.84rem;
}

.blog-pager .is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.post-hero {
    position: relative;
    padding: 130px 52px 64px;
    background: radial-gradient(ellipse 70% 90% at 50% 0%, var(--teal-glow) 0%, transparent 65%), var(--dark);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.post-hero.has-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--post-cover);
    background-size: cover;
    background-position: center;
    filter: blur(24px) saturate(1.1);
    opacity: 0.22;
    transform: scale(1.1);
}

.post-hero.has-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, var(--dark) 100%);
}

.post-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
}

.post-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 22px;
}

.post-crumbs a {
    color: var(--muted);
    text-decoration: none;
}

.post-crumbs a:hover {
    color: var(--teal-text);
}

.post-crumbs i {
    font-size: 0.6rem;
    opacity: 0.6;
}

.post-title {
    font-size: clamp(2rem, 4.4vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.08;
    color: var(--white);
    margin: 18px 0 18px;
    max-width: 1000px;
}

.post-lead {
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    line-height: 1.7;
    color: var(--ink2);
    max-width: 820px;
    margin-bottom: 24px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    font-size: 0.84rem;
    color: var(--muted);
}

.post-meta i {
    margin-right: 5px;
    color: var(--teal-text);
}

.post-layout {
    max-width: 1384px;
    margin: 0 auto;
    padding: 56px 52px 80px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 56px;
    align-items: start;
}

.post-cover {
    width: 100%;
    aspect-ratio: 16 / 8;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 44px;
    border: 1px solid var(--border);
}

.post-content {
    font-size: 1.04rem;
    line-height: 1.9;
    color: var(--ink2);
}

.post-content > * + * {
    margin-top: 1.15em;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    color: var(--white);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-top: 1.9em;
}

.post-content h2 {
    font-size: 1.7rem;
}

.post-content h3 {
    font-size: 1.32rem;
}

.post-content a {
    color: var(--teal-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content strong {
    color: var(--white);
}

.post-content ul,
.post-content ol {
    padding-left: 1.4em;
}

.post-content li + li {
    margin-top: 0.45em;
}

.post-content li[data-list="bullet"] {
    list-style: disc;
}

.post-content li[data-list="ordered"] {
    list-style: decimal;
}

.post-content li::marker {
    color: var(--teal-text);
}

.post-content blockquote {
    border-left: 4px solid var(--teal);
    background: var(--card);
    padding: 20px 26px;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--white);
    font-size: 1.12rem;
    font-style: italic;
    line-height: 1.7;
}

.post-content img {
    border-radius: var(--radius);
    margin: 1.6em 0;
    height: auto;
}

.post-content pre {
    background: var(--dark);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-size: 0.85rem;
}

.post-content .ql-ui {
    display: none;
}

.post-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 52px;
    padding-top: 26px;
    border-top: 1px solid var(--border);
    font-size: 0.84rem;
    color: var(--muted);
}

.post-share a {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--ink2);
    text-decoration: none;
    transition: all 0.2s;
}

.post-share a:hover {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}

.post-nav a {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.4;
    transition: border-color 0.2s;
}

.post-nav a.is-next {
    text-align: right;
}

.post-nav a:hover {
    border-color: var(--teal-border);
}

.post-nav small {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.post-aside {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.aside-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
}

.aside-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--teal-text);
    margin-bottom: 16px;
}

.aside-cta {
    background: linear-gradient(160deg, var(--teal-glow), transparent 70%), var(--card);
    border-color: var(--teal-border);
}

.aside-cta .aside-title {
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--white);
    margin-bottom: 8px;
}

.aside-cta p {
    font-size: 0.84rem;
    color: var(--muted);
    line-height: 1.65;
    margin-bottom: 16px;
}

.aside-recent,
.aside-cats {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.aside-recent li + li {
    border-top: 1px solid var(--border);
}

.aside-recent a {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    text-decoration: none;
}

.aside-recent li:first-child a {
    padding-top: 0;
}

.aside-recent li:last-child a {
    padding-bottom: 0;
}

.ar-thumb {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--card2);
    display: grid;
    place-items: center;
    color: var(--teal-text);
}

.ar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ar-title {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink);
}

.aside-recent a:hover .ar-title {
    color: var(--teal-text);
}

.ar-date {
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
    margin-top: 3px;
}

.aside-cats {
    gap: 6px;
}

.aside-cats a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    color: var(--ink2);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.aside-cats a span {
    font-size: 0.72rem;
    color: var(--muted);
    background: var(--card2);
    padding: 2px 8px;
    border-radius: 99px;
}

.aside-cats a:hover,
.aside-cats a.active {
    background: var(--teal-glow);
    color: var(--white);
}

.aside-cats a.active span {
    background: var(--teal);
    color: #fff;
}

.nav-link.active {
    color: var(--teal-text);
}

@media (max-width: 1100px) {
    .post-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .post-aside {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }

    .post-hero {
        padding-left: 24px;
        padding-right: 24px;
    }

    .post-layout {
        padding-left: 24px;
        padding-right: 24px;
    }

    .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-hero {
        padding: 110px 16px 40px;
    }

    .post-hero {
        padding: 104px 16px 40px;
    }

    .post-layout {
        padding: 36px 16px 56px;
    }

    .post-nav {
        grid-template-columns: 1fr;
    }

    .post-nav a.is-next {
        text-align: left;
    }
}


.post-body-wrap {
    border-top: 1px solid var(--border);
}

.theme-light .blog-search {
    box-shadow: var(--shadow-sm);
}

.theme-light .blog-card {
    box-shadow: var(--shadow-sm);
}

.theme-light .blog-card:hover {
    box-shadow: var(--shadow);
}

.theme-light .blog-cat.active,
.theme-light .aside-cats a.active span {
    color: #fff;
}

.theme-light .aside-cta {
    background: #0a0a0a;
    border-color: #0a0a0a;
}

.theme-light .aside-cta .aside-title {
    color: #fff;
}

.theme-light .aside-cta p {
    color: #b5b5b5;
}

.theme-light .post-content blockquote {
    background: var(--card2);
}


/* ===== Large screens ===== */
@media (min-width: 1800px) {
    .post-hero {
        padding-left: 72px;
        padding-right: 72px;
    }

    .post-hero-inner {
        max-width: 1520px;
    }

    .post-layout {
        max-width: 1624px;
        grid-template-columns: minmax(0, 1fr) 380px;
        gap: 72px;
    }

    .blog-hero-inner {
        max-width: 900px;
    }

    .blog-grid {
        gap: 32px;
    }
}

@media (min-width: 2300px) {
    .post-hero {
        padding-left: 96px;
        padding-right: 96px;
    }

    .post-hero-inner {
        max-width: 1800px;
    }

    .post-layout {
        max-width: 1904px;
        grid-template-columns: minmax(0, 1fr) 440px;
        gap: 88px;
    }

    .blog-hero-inner {
        max-width: 1040px;
    }
}
