/* =============================================
   Blog Archive & Detail – Tezprise Blog Styles
   Separate file – does NOT touch layout.css
   ============================================= */

/* ── Page Hero Banner – sticky bg, content scrolls over ── */
.page-hero-wrap {
    position: relative;
    z-index: 0;
}

/* The dark bg layer sits fixed behind content */
.page-hero-bg {
    position: sticky;
    top: 0;
    z-index: 0;
    height: 420px;
    margin-bottom: -420px;
    /* pull next sibling up over it */
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, #162340 0%, #1e2f52 55%, #162340 100%);
}

.page-hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent);
    pointer-events: none;
}

.page-hero-bg__glow {
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(66, 48, 211, 0.32) 0%, transparent 70%);
    top: -120px;
    right: -80px;
    pointer-events: none;
}

.page-hero-bg__glow2 {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 104, 61, 0.14) 0%, transparent 70%);
    bottom: -60px;
    left: -40px;
    pointer-events: none;
}

/* The hero content sits on top of the sticky bg */
.page-hero {
    position: relative;
    z-index: 1;
    padding: 72px 0 80px;
    background: transparent;
    border-radius: 10px;
    margin-bottom: 0;
}

.page-hero__glow {
    display: none;
}

.page-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    opacity: 0;
    transform: translateY(32px);
}

.page-hero__content.is-visible {
    animation: heroContentIn 0.85s cubic-bezier(0.16, 0.84, 0.44, 1) both;
}

.page-hero__pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 22px;
}

.page-hero__pill i {
    font-size: 15px;
}

.page-hero__title {
    font-size: clamp(32px, 4vw, 58px);
    font-weight: 800;
    line-height: 1.1;
    color: #ffffff;
    margin-bottom: 18px;
}

.page-hero__desc {
    font-size: 18px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.72);
    max-width: 560px;
    margin: 0 auto 32px;
}

.page-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
}

.page-breadcrumb a {
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.25s ease;
}

.page-breadcrumb a:hover {
    color: #ffffff;
}

.page-breadcrumb i {
    font-size: 12px;
}

@keyframes heroContentIn {
    from {
        opacity: 0;
        transform: translateY(32px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Blog Archive Layout ── */
/* This section slides up over the sticky hero bg */
.blog-archive-section {
    position: relative;
    z-index: 2;
    padding: 60px 0 100px;
    background: #ffffff;
    border-radius: 18px 18px 0 0;
    opacity: 0;
    transform: translateY(54px) scale(0.98);
    transition: opacity 0.9s cubic-bezier(0.16, 0.84, 0.44, 1),
        transform 0.9s cubic-bezier(0.16, 0.84, 0.44, 1);
}

/* Detail page content section (article area) scrolls over hero bg */
.blog-detail-layout {
    position: relative;
    z-index: 2;
    padding: 52px 0 100px;
    background: #ffffff;
    border-radius: 18px 18px 0 0;
}

.blog-archive-section.is-visible {
    animation: archiveReveal 0.9s cubic-bezier(0.16, 0.84, 0.44, 1) both;
}

@keyframes archiveReveal {
    from {
        opacity: 0;
        transform: translateY(54px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Filter bar */
.blog-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 48px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(24px);
}

.blog-archive-section.is-visible .blog-filter-bar {
    animation: sectionItemStrong 0.85s cubic-bezier(0.16, 0.84, 0.44, 1) 0.08s both;
}

.blog-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tag {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--dark-gray);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-tag:hover,
.filter-tag.is-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(66, 48, 211, 0.22);
}

.blog-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #fafbff;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.blog-search:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(66, 48, 211, 0.12);
}

.blog-search i {
    color: var(--medium-gray);
    font-size: 16px;
}

.blog-search input {
    border: 0;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--dark-gray);
    width: 180px;
}

.blog-search input::placeholder {
    color: var(--medium-gray);
}

/* ── Archive grid ── */
.blog-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

/* Featured top card */
.archive-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(36, 48, 78, 0.08);
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    cursor: pointer;
    transition: box-shadow 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.archive-card--featured {
    grid-column: 1 / -1;
    flex-direction: row;
}

.blog-archive-section.is-visible .archive-card {
    animation: archiveCardIn 0.9s cubic-bezier(0.16, 0.84, 0.44, 1) both;
}

.blog-archive-section.is-visible .archive-card:nth-child(1) {
    animation-delay: 0.06s;
}

.blog-archive-section.is-visible .archive-card:nth-child(2) {
    animation-delay: 0.14s;
}

.blog-archive-section.is-visible .archive-card:nth-child(3) {
    animation-delay: 0.22s;
}

.blog-archive-section.is-visible .archive-card:nth-child(4) {
    animation-delay: 0.30s;
}

.blog-archive-section.is-visible .archive-card:nth-child(5) {
    animation-delay: 0.38s;
}

.blog-archive-section.is-visible .archive-card:nth-child(6) {
    animation-delay: 0.46s;
}

.blog-archive-section.is-visible .archive-card:nth-child(7) {
    animation-delay: 0.54s;
}

@keyframes archiveCardIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.archive-card:hover {
    box-shadow: 0 8px 24px rgba(28, 41, 73, 0.10);
    transform: none;
    border-color: rgba(36, 48, 78, 0.14);
}

.archive-card__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1.55;
    flex-shrink: 0;
}

.archive-card--featured .archive-card__media {
    width: 52%;
    aspect-ratio: auto;
    min-height: 360px;
}

.archive-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1);
    transition: transform 0.55s ease;
}

.archive-card:hover .archive-card__image {
    transform: scale(1.03);
}

.archive-card__tag {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    padding: 7px 14px;
    border-radius: 4px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.archive-card--featured .archive-card__tag {
    background: var(--secondary-color);
}

.archive-card__body {
    padding: 26px 28px 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.archive-card__meta-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--medium-gray);
    font-weight: 500;
}

.archive-card__meta-top i {
    font-size: 14px;
}

.archive-card__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-gray);
    line-height: 1.4;
    margin-bottom: 12px;
    transition: color 0.25s ease;
}

.archive-card--featured .archive-card__title {
    font-size: 28px;
    line-height: 1.3;
}

.archive-card:hover .archive-card__title {
    color: var(--primary-color);
}

.archive-card__excerpt {
    font-size: 15px;
    line-height: 1.7;
    color: var(--medium-gray);
    margin-bottom: 22px;
    flex: 1;
}

.archive-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.archive-card__author {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-gray);
}

.archive-card__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.archive-card__read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-gray);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 7px 16px 7px 18px;
    background: transparent;
    letter-spacing: 0.3px;
    line-height: 1.4;
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Text-flip — same mechanism as theme .btn .text-switch */
.archive-card__read-more .text-switch {
    display: inline-block;
    position: relative;
    line-height: 1;
    transform-style: preserve-3d;
}

.archive-card__read-more .text-switch::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    white-space: nowrap;
    color: #ffffff;
    transform: translateY(120%);
    transition: transform 0.35s ease;
}

.archive-card__read-more i {
    font-size: 15px;
    -webkit-text-stroke: 0.5px currentColor;
}

.archive-card:hover .archive-card__read-more {
    background-color: var(--dark-gray);
    border-color: var(--dark-gray);
    color: #ffffff;
}

.archive-card:hover .archive-card__read-more .text-switch {
    color: transparent;
    transform: translateY(-120%);
}

.archive-card:hover .archive-card__read-more .text-switch::after {
    transform: translateY(2px);
}

/* Pagination */
.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 60px;
    opacity: 0;
    transform: translateY(24px);
}

.blog-archive-section.is-visible .blog-pagination {
    animation: sectionItemStrong 0.85s cubic-bezier(0.16, 0.84, 0.44, 1) 0.55s both;
}

.page-btn {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--dark-gray);
    font-size: 15px;
    font-weight: 600;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.page-btn:hover,
.page-btn.is-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(66, 48, 211, 0.25);
}

.page-btn--arrow {
    border-radius: 50%;
    color: var(--medium-gray);
}

/* =============================================
   Blog Detail Page Styles
   ============================================= */

/* ── Detail inner grid ── */
.blog-detail-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 56px;
    align-items: start;
}

/* ── Article ── */
.blog-article {
    opacity: 0;
    transform: translateY(48px);
}

.blog-article.is-visible {
    animation: archiveCardIn 0.9s cubic-bezier(0.16, 0.84, 0.44, 1) both;
}

.article-header {
    margin-bottom: 36px;
}

.article-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.article-tag {
    padding: 7px 16px;
    border-radius: 4px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.article-date,
.article-readtime {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--medium-gray);
    font-weight: 500;
}

.article-date i,
.article-readtime i {
    font-size: 15px;
}

.article-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--dark-gray);
    margin-bottom: 22px;
}

/* Author strip — redesigned, more visual */
.article-author-strip {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 10px;
    background: linear-gradient(135deg, #162340 0%, #1e2f52 100%);
    border: 1px solid rgba(66, 48, 211, 0.3);
    position: relative;
    overflow: hidden;
}

.article-author-strip::before {
    content: "";
    position: absolute;
    top: -30px;
    right: -30px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(66, 48, 211, 0.35) 0%, transparent 70%);
    pointer-events: none;
}

.article-author-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 6px 18px rgba(66, 48, 211, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.article-author-info strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}

.article-author-info span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.article-author-strip__divider {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.article-author-strip__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.article-author-strip__stat strong {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
}

.article-author-strip__stat span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Featured image */
.article-cover {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 44px;
    aspect-ratio: 2;
    box-shadow: 0 24px 56px rgba(28, 41, 73, 0.14);
    opacity: 0;
    transform: translateY(32px) scale(0.98);
}

.article-cover.is-visible {
    animation: archiveCardIn 0.85s cubic-bezier(0.16, 0.84, 0.44, 1) 0.12s both;
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-cover__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 22px;
    background: linear-gradient(0deg, rgba(22, 35, 64, 0.8), transparent);
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

/* Article body rich content */
.article-body {
    font-size: 17px;
    line-height: 1.85;
    color: #596174;
    opacity: 0;
    transform: translateY(32px);
}

.article-body.is-visible {
    animation: archiveCardIn 0.85s cubic-bezier(0.16, 0.84, 0.44, 1) 0.18s both;
}

.article-body h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark-gray);
    margin: 42px 0 18px;
    line-height: 1.25;
}

.article-body h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark-gray);
    margin: 32px 0 14px;
}

.article-body p {
    margin: 0 0 22px;
}

.article-body ul,
.article-body ol {
    margin: 0 0 22px 24px;
    padding: 0;
    list-style: disc;
}

.article-body ol {
    list-style: decimal;
}

.article-body ul li,
.article-body ol li {
    margin-bottom: 10px;
    line-height: 1.75;
}

.article-body blockquote {
    margin: 36px 0;
    padding: 24px 32px;
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(66, 48, 211, 0.04), rgba(245, 104, 61, 0.03));
    border-radius: 0 8px 8px 0;
    font-size: 19px;
    font-style: italic;
    color: var(--dark-gray);
    position: relative;
}

.article-body blockquote::before {
    content: "\201C";
    position: absolute;
    top: -8px;
    left: 24px;
    font-size: 72px;
    color: var(--primary-color);
    opacity: 0.3;
    line-height: 1;
    font-style: normal;
}

.article-body .highlight-box {
    padding: 24px 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(66, 48, 211, 0.06), rgba(245, 104, 61, 0.04));
    border: 1px solid rgba(66, 48, 211, 0.12);
    margin: 28px 0;
}

.article-body .highlight-box p {
    margin: 0;
    color: var(--dark-gray);
    font-weight: 500;
}

/* Article footer */
.article-footer {
    margin-top: 52px;
    padding-top: 36px;
    border-top: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(24px);
}

.article-footer.is-visible {
    animation: archiveCardIn 0.8s cubic-bezier(0.16, 0.84, 0.44, 1) 0.24s both;
}

.article-tags-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.article-tags-row span {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-gray);
}

.article-tag-chip {
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-gray);
    transition: all 0.25s ease;
    cursor: pointer;
}

.article-tag-chip:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.article-share span {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-gray);
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--dark-gray);
    display: grid;
    place-items: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.share-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(66, 48, 211, 0.22);
}

/* ── Related posts – redesigned card style ── */
.related-posts {
    margin-top: 72px;
    opacity: 0;
    transform: translateY(48px);
}

.related-posts.is-visible {
    animation: archiveCardIn 0.85s cubic-bezier(0.16, 0.84, 0.44, 1) both;
}

.section-heading-inline {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.section-heading-inline h2 {
    font-size: 22px;
    margin-bottom: 0;
    white-space: nowrap;
}

.section-heading-inline::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-color), transparent);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.related-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid rgba(36, 48, 78, 0.08);
    box-shadow: 0 6px 20px rgba(28, 41, 73, 0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    box-shadow: 0 8px 24px rgba(28, 41, 73, 0.10);
    transform: none;
    border-color: rgba(66, 48, 211, 0.14);
}

.related-card__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2;
}

.related-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.related-card:hover .related-card__media img {
    transform: scale(1.04);
}

.related-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(22, 35, 64, 0.65) 100%);
}

.related-card__tag {
    position: absolute;
    top: 10px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 3px;
    background: var(--primary-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.related-card__body {
    padding: 16px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related-card__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark-gray);
    line-height: 1.45;
    /* max 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.25s ease;
    margin: 0;
}

.related-card:hover .related-card__title {
    color: var(--primary-color);
}

.related-card__date {
    font-size: 12px;
    color: var(--medium-gray);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
}

.related-card__date i {
    font-size: 12px;
}

/* ── Sidebar ── */
.blog-sidebar {
    position: sticky;
    top: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    opacity: 0;
    transform: translateY(48px);
}

.blog-sidebar.is-visible {
    animation: archiveCardIn 0.9s cubic-bezier(0.16, 0.84, 0.44, 1) 0.22s both;
}

.sidebar-widget {
    background: #fafbff;
    border: 1px solid rgba(36, 48, 78, 0.08);
    border-radius: 10px;
    padding: 28px 24px;
}

.sidebar-widget__title {
    font-size: 16px;
    font-weight: 800;
    color: var(--dark-gray);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-widget__title::after {
    content: "";
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    border-radius: 2px;
}

/* About widget */
.sidebar-about__img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 14px;
}

.sidebar-about p {
    font-size: 14px;
    line-height: 1.75;
    color: var(--medium-gray);
}

/* Recent posts widget */
.sidebar-posts {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sidebar-post {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
}

.sidebar-post__thumb {
    width: 64px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-post__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.sidebar-post:hover .sidebar-post__thumb img {
    transform: scale(1.08);
}

.sidebar-post__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark-gray);
    line-height: 1.4;
    transition: color 0.25s ease;
}

.sidebar-post:hover .sidebar-post__title {
    color: var(--primary-color);
}

.sidebar-post__date {
    font-size: 12px;
    color: var(--medium-gray);
    margin-top: 4px;
}

/* Category widget */
.sidebar-cats {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--dark-gray);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.sidebar-cat:hover {
    background: rgba(66, 48, 211, 0.07);
    color: var(--primary-color);
    padding-left: 18px;
}

.sidebar-cat__count {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--border-color);
    font-size: 12px;
    font-weight: 700;
    color: var(--medium-gray);
}

/* Tag cloud widget */
.sidebar-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sidebar-tag {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-gray);
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.sidebar-tag:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Newsletter widget */
.sidebar-newsletter p {
    font-size: 14px;
    color: var(--medium-gray);
    margin-bottom: 16px;
    line-height: 1.65;
}

.sidebar-newsletter__form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-newsletter__form input {
    padding: 11px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    color: var(--dark-gray);
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    background: #fff;
}

.sidebar-newsletter__form input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(66, 48, 211, 0.1);
}

.sidebar-newsletter__form button {
    padding: 12px;
    border: 0;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--primary-color), #7f35a4);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.sidebar-newsletter__form button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(66, 48, 211, 0.25);
}

/* ── Comments Section ── */
.comments-section {
    margin-top: 64px;
    opacity: 0;
    transform: translateY(40px);
}

.comments-section.is-visible {
    animation: archiveCardIn 0.85s cubic-bezier(0.16, 0.84, 0.44, 1) both;
}

/* Comment list */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 52px;
}

.comment-item {
    display: flex;
    gap: 16px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-item:first-child {
    padding-top: 0;
}

.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary-color), #7f35a4);
}

.comment-avatar.alt {
    background: linear-gradient(135deg, #1e8f76, #2a6ab5);
}

.comment-avatar.alt2 {
    background: linear-gradient(135deg, #c74e45, #f7693c);
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-author {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark-gray);
}

.comment-date {
    font-size: 12px;
    color: var(--medium-gray);
}

.comment-badge {
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(66, 48, 211, 0.1);
    color: var(--primary-color);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.comment-text {
    font-size: 15px;
    line-height: 1.75;
    color: #596174;
    margin: 0 0 10px;
}

.comment-reply-btn {
    background: none;
    border: 0;
    padding: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.2s ease, opacity 0.2s ease;
}

.comment-reply-btn:hover {
    gap: 8px;
    opacity: 0.8;
}

/* Nested reply */
.comment-item--reply {
    margin-left: 60px;
    padding-left: 18px;
    border-left: 2px solid rgba(66, 48, 211, 0.15);
    border-bottom-color: transparent;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Comment form */
.comment-form-wrap {
    background: linear-gradient(135deg, #f7f8ff 0%, #fafbfe 100%);
    border: 1px solid rgba(66, 48, 211, 0.1);
    border-radius: 12px;
    padding: 32px 30px;
}

.comment-form-wrap h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--dark-gray);
    margin-bottom: 6px;
}

.comment-form-wrap>p {
    font-size: 14px;
    color: var(--medium-gray);
    margin-bottom: 24px;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comment-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-gray);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-field input,
.form-field textarea {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    color: var(--dark-gray);
    background: #ffffff;
    outline: none;
    font-family: inherit;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(66, 48, 211, 0.1);
}

.form-field textarea {
    min-height: 130px;
}

.comment-submit {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 28px;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(to right, #f7693c, #c74e45, #7d3785, #4230d3, #7d3785, #c74e45, #f7693c);
    background-size: 200% 100%;
    background-position: left center;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background-position 0.55s ease, box-shadow 0.3s ease, transform 0.3s ease;
    box-shadow: 0 10px 24px rgba(66, 48, 211, 0.25);
}

.comment-submit:hover {
    background-position: right center;
    box-shadow: 0 16px 32px rgba(66, 48, 211, 0.35);
    transform: translateY(-2px);
}

.comment-submit i {
    font-size: 17px;
}

/* ── Reading progress bar ── */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 9999;
    transition: width 0.1s linear;
    border-radius: 0 3px 3px 0;
}

/* ── Back to top ── */
.back-to-top {
    position: fixed;
    bottom: 36px;
    right: 36px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    border: 0;
    display: grid;
    place-items: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(66, 48, 211, 0.3);
    opacity: 0;
    transform: translateY(16px) scale(0.85);
    transition: opacity 0.35s ease, transform 0.35s ease, box-shadow 0.25s ease;
    z-index: 200;
    pointer-events: none;
}

.back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--dark-gray);
    box-shadow: 0 16px 34px rgba(36, 46, 69, 0.3);
    transform: translateY(-3px) scale(1);
}

/* =============================================
   Responsive – Blog specific
   ============================================= */
@media (max-width: 1024px) {
    .blog-detail-inner {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: static;
    }

    .archive-card--featured {
        flex-direction: column;
    }

    .archive-card--featured .archive-card__media {
        width: 100%;
        min-height: 260px;
    }

    .page-hero-bg {
        height: 360px;
        margin-bottom: -360px;
    }
}

@media (max-width: 768px) {
    .blog-archive-grid {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .blog-filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-hero-bg {
        height: 320px;
        margin-bottom: -320px;
    }

    .page-hero {
        padding: 50px 0 52px;
    }

    .blog-detail-layout {
        padding: 36px 0 72px;
    }

    .article-title {
        font-size: clamp(24px, 5vw, 34px);
    }

    .article-body {
        font-size: 16px;
    }

    .back-to-top {
        bottom: 22px;
        right: 18px;
    }

    .comment-form__row {
        grid-template-columns: 1fr;
    }

    .comment-form-wrap {
        padding: 24px 20px;
    }

    .comment-item--reply {
        margin-left: 28px;
    }

    .page-hero__title {
        font-weight: 700;
    }

    .page-hero__content {
        padding: 20px;
    }

    .page-hero__desc {
        font-size: 16px;
        line-height: 1.3;
    }

    .archive-card--featured .archive-card__title {
        font-size: 20px;
    }

    .blog-search {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .blog-filter-tags {
        gap: 8px;
    }

    .filter-tag {
        padding: 7px 14px;
        font-size: 13px;
    }

    .archive-card__body {
        padding: 18px 18px 22px;
    }

    .archive-card__title {
        font-size: 17px;
    }

    .article-body h2 {
        font-size: 22px;
    }

    .article-body h3 {
        font-size: 18px;
    }

    .page-hero-bg {
        height: 290px;
        margin-bottom: -290px;
    }

    .comment-submit {
        width: 100%;
        justify-content: center;
    }

    .article-author-strip__divider,
    .article-author-strip__stat {
        display: none;
    }
}