/* ============================================================
   BLOG PAGE — blog.css
   Extends home.css; load home.css before this file.
============================================================ */

/* ── Scroll progress ── */
#blog-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--btn-action);
    z-index: 9999;
    width: 0;
    transition: width .1s linear;
}

/* ============================================================
   HERO
============================================================ */
#blog-hero {
    padding: 140px 0 80px;
    background: var(--bg-1);
    position: relative;
    overflow: hidden;
}

.blh-dots {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(103, 58, 183, .11) 1.5px, transparent 1.5px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse at 60% 40%, black 30%, transparent 70%);
}

.blh-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: .38;
    pointer-events: none;
    animation: floatAnim 9s ease-in-out infinite;
}

.blh-blob-1 {
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, rgba(103, 58, 183, .22), transparent 70%);
    top: -160px;
    right: -80px;
}

.blh-blob-2 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(33, 150, 243, .18), transparent 70%);
    bottom: -100px;
    left: -60px;
    animation-delay: -4.5s;
}

.blh-blob-3 {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 31, 142, .12), transparent 70%);
    top: 40%;
    left: 38%;
    animation-delay: -2s;
}

@keyframes floatAnim {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-26px) scale(1.04);
    }
}

.blh-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(103, 58, 183, .18);
    border-radius: 50px;
    padding: 7px 18px;
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-2);
    letter-spacing: .06em;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(6px);
    box-shadow: var(--shadow-sm);
}

.blh-breadcrumb a {
    color: var(--purple);
}

.blh-breadcrumb i {
    font-size: .55rem;
    opacity: .55;
}

.blh-headline {
    font-size: clamp(1rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--text);
    line-height: 1.06;
    margin-bottom: 1.2rem;
}

.blh-sub {
    font-size: 1.05rem;
    color: var(--text-2);
    max-width: 580px;
    line-height: 1.78;
    margin-bottom: 2.2rem;
}

/* Search bar */
.blog-search-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, .92);
    border: 1.5px solid var(--border);
    border-radius: 50px;
    padding: 6px 6px 6px 22px;
    box-shadow: var(--shadow-sm);
    max-width: 520px;
    transition: var(--transition);
}

.blog-search-wrap:focus-within {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(103, 58, 183, .1);
}

.blog-search-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-family: var(--ff-body);
    font-size: .92rem;
    color: var(--text);
}

.blog-search-wrap input::placeholder {
    color: var(--muted);
}

.blog-search-btn {
    background: var(--btn-action);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 10px 22px;
    font-weight: 700;
    font-size: .88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: var(--transition);
}

.blog-search-btn:hover {
    opacity: .9;
    transform: scale(.98);
}

/* ============================================================
   FEATURED POST
============================================================ */
#blog-featured {
    padding: 60px 0 0;
    background: var(--bg-1);
}

.feat-post-card {
    border-radius: var(--r-xl);
    overflow: hidden;
    background: rgba(255, 255, 255, .92);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

@media(min-width:768px) {
    .feat-post-card {
        flex-direction: row;
    }
}

.feat-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 70px rgba(103, 58, 183, .16);
}

.fp-img-col {
    flex: 0 0 48%;
    position: relative;
    overflow: hidden;
    min-height: 320px;
}

.fp-img-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s ease;
}

.feat-post-card:hover .fp-img-col img {
    transform: scale(1.05);
}

.fp-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top right, rgba(103, 58, 183, .7) 0%, transparent 55%);
    display: flex;
    align-items: flex-end;
    padding: 26px;
}

.fp-featured-tag {
    background: rgba(255, 255, 255, .22);
    border: 1px solid rgba(255, 255, 255, .35);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    border-radius: 50px;
    padding: 5px 13px;
    backdrop-filter: blur(6px);
}

.fp-content {
    flex: 1;
    padding: 36px 38px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fp-cat {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--purple);
    margin-bottom: 10px;
}

.fp-title {
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    font-weight: 800;
    color: var(--text);
    line-height: 1.25;
    margin-bottom: 1rem;
    text-decoration: none;
    display: block;
    transition: color var(--transition);
}

.fp-title:hover {
    color: var(--purple);
}

.fp-excerpt {
    font-size: .95rem;
    color: var(--text-2);
    line-height: 1.78;
    margin-bottom: 1.5rem;
    flex: 1;
}

.fp-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: .78rem;
    color: var(--muted);
    margin-bottom: 1.6rem;
}

.fp-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.fp-read-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    font-weight: 700;
    color: var(--purple);
    text-decoration: none;
    transition: gap .25s ease;
}

.fp-read-link:hover {
    gap: 13px;
}

.fp-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.fp-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(103, 58, 183, .2);
}

.fp-author-name {
    font-size: .88rem;
    font-weight: 700;
    color: var(--text);
}

.fp-author-role {
    font-size: .74rem;
    color: var(--muted);
}

/* ============================================================
   CATEGORY FILTER
============================================================ */
.blog-filter-section {
    padding: 50px 0 10px;
    background: var(--bg-1);
}

.blog-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--border);
    border-radius: 60px;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    width: fit-content;
}

.blf-btn {
    background: transparent;
    border: none;
    border-radius: 50px;
    padding: 9px 22px;
    font-size: .84rem;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.blf-btn:hover {
    color: var(--purple);
}

.blf-btn.active {
    background: var(--btn-action);
    color: #fff;
    box-shadow: 0 6px 20px rgba(103, 58, 183, .28);
}

/* ============================================================
   BLOG GRID
============================================================ */
#blog-grid-section {
    padding: 40px 0 90px;
    background: var(--bg-1);
}

.post-card {
    background: rgba(255, 255, 255, .92);
    border: 1.5px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    height: 100%;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.post-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(103, 58, 183, .22);
    color: inherit;
}

.post-img-wrap {
    overflow: hidden;
    aspect-ratio: 16/9;
    position: relative;
}

.post-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s cubic-bezier(.4, 0, .2, 1);
}

.post-card:hover .post-img {
    transform: scale(1.07);
}

/* Reading time badge */
.post-read-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 4px 11px;
    font-size: .68rem;
    font-weight: 700;
    color: var(--text-2);
    backdrop-filter: blur(6px);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-body {
    padding: 22px 22px 26px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-cat {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--purple);
    margin-bottom: 8px;
}

.post-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .6rem;
    line-height: 1.42;
    transition: color var(--transition);
}

.post-card:hover .post-title {
    color: var(--purple);
}

.post-excerpt {
    font-size: .86rem;
    color: var(--text-2);
    line-height: 1.72;
    flex: 1;
    margin-bottom: 1rem;
}

.post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.post-author-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(103, 58, 183, .2);
}

.post-author-name {
    font-size: .76rem;
    font-weight: 700;
    color: var(--text-2);
}

.post-date {
    font-size: .72rem;
    color: var(--muted);
}

.post-read-more {
    font-size: .8rem;
    font-weight: 700;
    color: var(--purple);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap .2s ease;
}

.post-card:hover .post-read-more {
    gap: 8px;
}

/* ============================================================
   SIDEBAR
============================================================ */
.sidebar-card {
    background: rgba(255, 255, 255, .92);
    border: 1.5px solid var(--border);
    border-radius: var(--r);
    padding: 26px 24px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
}

.sidebar-title {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    margin-bottom: 1.2rem;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-title::before {
    content: '';
    width: 4px;
    height: 14px;
    border-radius: 2px;
    background: var(--btn-action);
}

/* Recent posts */
.sb-post-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.sb-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sb-post-img {
    width: 68px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.sb-post-title {
    font-size: .84rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    margin-bottom: 4px;
    text-decoration: none;
    transition: color var(--transition);
}

.sb-post-title:hover {
    color: var(--purple);
}

.sb-post-date {
    font-size: .72rem;
    color: var(--muted);
}

/* Tag cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-chip {
    background: rgba(103, 58, 183, .07);
    border: 1px solid rgba(103, 58, 183, .15);
    border-radius: 50px;
    padding: 5px 13px;
    font-size: .76rem;
    font-weight: 600;
    color: var(--purple);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.tag-chip:hover {
    background: var(--btn-action);
    border-color: transparent;
    color: #fff;
}

/* Newsletter */
.sb-nl-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sb-nl-input {
    background: #f9f7ff;
    border: 1.5px solid rgba(103, 58, 183, .14);
    border-radius: var(--r-sm);
    padding: 11px 14px;
    font-family: var(--ff-body);
    font-size: .88rem;
    color: var(--text);
    transition: var(--transition);
}

.sb-nl-input::placeholder {
    color: var(--muted);
}

.sb-nl-input:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(103, 58, 183, .1);
    background: #fff;
}

.sb-nl-btn {
    background: var(--btn-action);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 11px;
    font-weight: 700;
    font-size: .88rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.sb-nl-btn:hover {
    opacity: .9;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(103, 58, 183, .3);
}

/* Category list */
.sb-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sb-cat-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
}

.sb-cat-list li:last-child {
    border-bottom: none;
}

.sb-cat-list a {
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-2);
    text-decoration: none;
    transition: color var(--transition);
}

.sb-cat-list a:hover {
    color: var(--purple);
}

.sb-cat-count {
    font-size: .72rem;
    font-weight: 700;
    background: rgba(103, 58, 183, .1);
    color: var(--purple);
    border-radius: 50px;
    padding: 2px 9px;
}

/* ============================================================
   PAGINATION
============================================================ */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 3rem;
}

.pg-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: rgba(255, 255, 255, .9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .88rem;
    font-weight: 700;
    color: var(--text-2);
    cursor: pointer;
    transition: var(--transition);
}

.pg-btn:hover,
.pg-btn.active {
    background: var(--btn-action);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 18px rgba(103, 58, 183, .28);
}

.pg-btn.prev,
.pg-btn.next {
    width: auto;
    border-radius: 50px;
    padding: 0 18px;
    font-size: .82rem;
}

/* ============================================================
   CTA BANNER
============================================================ */
#blog-cta {
    padding: 60px 0;
    background: var(--bg-2);
}

.blc-banner {
    background: var(--btn-action);
    border-radius: var(--r-xl);
    padding: 72px 60px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.blc-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .06) 1.5px, transparent 1.5px);
    background-size: 26px 26px;
    pointer-events: none;
}

.blc-blob {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .12), transparent 65%);
    top: -200px;
    right: -120px;
    pointer-events: none;
}

.blc-inner {
    position: relative;
    z-index: 1;
}

.blc-banner h2 {
    font-size: clamp(1.8rem, 3.8vw, 2.8rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
}

.blc-banner p {
    font-size: 1rem;
    color: rgba(255, 255, 255, .78);
    max-width: 500px;
    margin: 0 auto 2.5rem;
    line-height: 1.72;
}

.blc-btn-w {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: #fff;
    color: var(--purple);
    border: none;
    border-radius: 50px;
    padding: 15px 36px;
    font-family: var(--ff-display);
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.blc-btn-w:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .22);
    color: var(--purple);
}

.blc-btn-g {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, .38);
    border-radius: 50px;
    padding: 14px 34px;
    font-family: var(--ff-display);
    font-weight: 600;
    font-size: .95rem;
    transition: var(--transition);
    cursor: pointer;
    backdrop-filter: blur(6px);
    text-decoration: none;
}

.blc-btn-g:hover {
    background: rgba(255, 255, 255, .26);
    color: #fff;
    transform: translateY(-3px);
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media(max-width:991.98px) {
    #blog-hero {
        padding: 120px 0 60px;
    }

    .blc-banner {
        padding: 50px 28px;
    }

    .fp-content {
        padding: 28px 26px;
    }
}

@media(max-width:767.98px) {
    .fp-img-col {
        min-height: 220px;
        flex: 0 0 100%;
    }

    .blog-filter-bar {
        width: 100%;
        overflow-x: auto;
    }
}

@media(max-width:575.98px) {
    .blh-headline {
        font-size: 2rem;
    }
}