.blog-page {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 420px at 0% 0%, rgba(13, 110, 253, 0.08), transparent 60%),
        radial-gradient(900px 420px at 100% 0%, rgba(32, 201, 151, 0.08), transparent 60%),
        var(--bs-body-bg);
}

.blog-page::before,
.blog-page::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(1px);
    pointer-events: none;
    z-index: 0;
}

.blog-page::before {
    width: 360px;
    height: 360px;
    top: -110px;
    left: -90px;
    background: radial-gradient(circle at 30% 30%, rgba(13, 110, 253, 0.22), rgba(13, 110, 253, 0));
    animation: blog-float-1 14s ease-in-out infinite;
}

.blog-page::after {
    width: 420px;
    height: 420px;
    right: -140px;
    bottom: -150px;
    background: radial-gradient(circle at 40% 40%, rgba(32, 201, 151, 0.18), rgba(32, 201, 151, 0));
    animation: blog-float-2 18s ease-in-out infinite;
}

.blog-page > .container,
.blog-post-page .row {
    position: relative;
    z-index: 1;
}

.blog-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: #fff;
    border-radius: 1rem;
    padding: 1.5rem 1.25rem;
    box-shadow: 0 18px 35px rgba(10, 88, 202, 0.22);
}

.blog-hero::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    top: -90px;
    right: -70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
    animation: blog-pulse 5.8s ease-in-out infinite;
}

.blog-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.92;
}

.blog-hero__title {
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    line-height: 1.2;
}

.blog-hero__lead {
    max-width: 60ch;
    color: rgba(255, 255, 255, 0.94);
}

.blog-hero__meta .badge {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 0.4rem 0.75rem;
    font-weight: 500;
}

.blog-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    transform-style: preserve-3d;
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
    border: 1px solid rgba(13, 110, 253, 0.07);
}

.blog-card:hover {
    transform: translateY(-7px) rotateX(2.2deg) rotateY(-1.2deg);
    box-shadow: 0 22px 42px rgba(16, 24, 40, 0.16);
    border-color: rgba(13, 110, 253, 0.22);
}

.blog-card__media img {
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card__media img {
    transform: scale(1.04);
}

.blog-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.22) 48%, rgba(255, 255, 255, 0) 62%);
    transform: translateX(-120%);
    transition: transform 0.85s ease;
}

.blog-card:hover .blog-card__media::after {
    transform: translateX(120%);
}

.blog-card__date {
    color: #667085;
}

.blog-card__meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}

.blog-card__date i {
    margin-right: 0.35rem;
}

.blog-card__title a {
    color: #101828;
}

.blog-card__excerpt {
    color: #475467;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #0d6efd;
    font-weight: 600;
    font-size: 0.9rem;
}

.blog-pagination .page-link {
    border-radius: 0.65rem;
    margin: 0 0.2rem;
}

.blog-empty-state {
    border: 1px dashed #d0d5dd;
    border-radius: 1rem;
    padding: 2rem 1rem;
    text-align: center;
    color: #667085;
}

.blog-empty-state i {
    color: #0d6efd;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.blog-side-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid #eaecf0;
    background: #ffffff;
    border-radius: 0.9rem;
    padding: 1rem;
    box-shadow: 0 10px 22px rgba(16, 24, 40, 0.06);
}

.blog-side-panel::before {
    content: "";
    position: absolute;
    inset: -1px -1px auto -1px;
    height: 3px;
    border-radius: 0.9rem 0.9rem 0 0;
    background: linear-gradient(90deg, #0d6efd, #20c997, #0d6efd);
    background-size: 180% 100%;
    animation: blog-gradient-shift 6s linear infinite;
}

.blog-side-panel--sticky {
    position: sticky;
    top: 90px;
}

.blog-side-list {
    display: grid;
    gap: 0.55rem;
}

.blog-side-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    border: 1px solid #eaecf0;
    border-radius: 0.7rem;
    padding: 0.5rem;
    transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.blog-side-item:hover {
    border-color: #bcd2ff;
    background: #f8fbff;
    transform: translateY(-1px);
}

.blog-side-item__title {
    display: -webkit-box;
    font-size: 0.92rem;
    line-height: 1.35;
    color: #101828;
    margin-bottom: 0.15rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-side-item__meta {
    display: block;
    font-size: 0.76rem;
    color: #667085;
}

.blog-side-item__thumb {
    width: 56px;
    min-width: 56px;
    border-radius: 0.45rem;
    overflow: hidden;
    background: #eef2f6;
}

.blog-side-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-side-item__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.blog-side-note {
    color: #475467;
    font-size: 0.9rem;
}

.blog-post-page .breadcrumb {
    background: #f8f9fc;
    border: 1px solid #eaecf0;
    border-radius: 0.6rem;
    padding: 0.5rem 0.75rem;
}

.blog-post-title {
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    line-height: 1.2;
    color: #101828;
}

.blog-post-date {
    color: #667085;
}

.blog-post-dot {
    margin: 0 0.35rem;
}

.blog-post-media {
    position: relative;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(16, 24, 40, 0.14);
}

.blog-post-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(16, 24, 40, 0) 45%, rgba(16, 24, 40, 0.16) 100%);
    pointer-events: none;
}

.blog-inline-toc {
    border: 1px solid #d0dffb;
    background: #f7faff;
    border-radius: 0.8rem;
    padding: 0.9rem 1rem;
}

.blog-inline-toc__title {
    color: #0a58ca;
    font-weight: 700;
}

.blog-inline-toc__list {
    padding-left: 1.1rem;
}

.blog-inline-toc__item {
    margin-bottom: 0.3rem;
}

.blog-inline-toc__item a {
    color: #344054;
    text-decoration: none;
}

.blog-inline-toc__item a:hover {
    color: #0a58ca;
    text-decoration: underline;
}

.blog-inline-toc__item--h3 {
    margin-left: 1rem;
    list-style-type: circle;
}

.blog-post-body {
    font-size: 1.04rem;
    line-height: 1.8;
    color: #101828;
}

.blog-post-body h2,
.blog-post-body h3,
.blog-post-body h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    line-height: 1.35;
}

.blog-post-body p,
.blog-post-body ul,
.blog-post-body ol {
    margin-bottom: 1rem;
}

.blog-post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
}

.blog-prev-next {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.blog-prev-next__link {
    display: block;
    text-decoration: none;
    border: 1px solid #eaecf0;
    border-radius: 0.75rem;
    padding: 0.8rem;
    background: #fff;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.blog-prev-next__link:hover {
    border-color: #bcd2ff;
    box-shadow: 0 10px 20px rgba(16, 24, 40, 0.08);
    transform: translateY(-1px);
}

.blog-prev-next__link--next {
    text-align: right;
}

.blog-prev-next__label {
    display: block;
    font-size: 0.74rem;
    color: #667085;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.blog-prev-next__title {
    display: block;
    color: #101828;
    font-weight: 600;
    line-height: 1.3;
}

.blog-related {
    border-top: 1px solid #eaecf0;
    padding-top: 1.2rem;
}

.blog-related-card {
    display: block;
    text-decoration: none;
    border: 1px solid #eaecf0;
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.8rem;
    height: 100%;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.blog-related-card:hover {
    border-color: #bcd2ff;
    box-shadow: 0 12px 24px rgba(16, 24, 40, 0.08);
    transform: translateY(-2px);
}

.blog-related-card__title {
    display: block;
    color: #101828;
    font-size: 0.92rem;
    line-height: 1.35;
    margin-bottom: 0.25rem;
}

.blog-related-card__meta {
    display: block;
    font-size: 0.78rem;
    color: #667085;
}

.blog-related-card__thumb {
    display: block;
    overflow: hidden;
    border-radius: 0.55rem;
    margin-bottom: 0.6rem;
    background: #eef2f6;
}

.blog-related-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-recommended {
    border-top: 1px solid #eaecf0;
    padding-top: 1.2rem;
}

.blog-product-card {
    display: block;
    text-decoration: none;
    border: 1px solid #eaecf0;
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.8rem;
    height: 100%;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.blog-product-card:hover {
    border-color: #bcd2ff;
    box-shadow: 0 12px 24px rgba(16, 24, 40, 0.08);
    transform: translateY(-2px) rotateX(1.8deg);
}

.blog-product-card__thumb {
    display: block;
    overflow: hidden;
    border-radius: 0.55rem;
    margin-bottom: 0.6rem;
    background: #eef2f6;
}

.blog-product-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-product-card__title {
    display: block;
    color: #101828;
    font-size: 0.92rem;
    line-height: 1.35;
    margin-bottom: 0.2rem;
}

.blog-product-card__meta {
    display: block;
    font-size: 0.8rem;
    color: #667085;
}

.blog-page .row > [class*="col-"] {
    animation: blog-fade-up 0.55s ease both;
}

.blog-page .row > [class*="col-"]:nth-child(2) {
    animation-delay: 0.06s;
}

.blog-page .row > [class*="col-"]:nth-child(3) {
    animation-delay: 0.12s;
}

@keyframes blog-float-1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(18px, 24px); }
}

@keyframes blog-float-2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-24px, -18px); }
}

@keyframes blog-pulse {
    0%, 100% { transform: scale(1); opacity: 0.95; }
    50% { transform: scale(1.08); opacity: 0.78; }
}

@keyframes blog-gradient-shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 180% 50%; }
}

@keyframes blog-fade-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .blog-page::before,
    .blog-page::after,
    .blog-hero::after,
    .blog-side-panel::before,
    .blog-page .row > [class*="col-"] {
        animation: none !important;
    }

    .blog-card,
    .blog-card__media img,
    .blog-card__media::after,
    .blog-product-card,
    .blog-side-item {
        transition: none !important;
        transform: none !important;
    }
}

@media (max-width: 575.98px) {
    .blog-hero {
        padding: 1.2rem 1rem;
    }

    .blog-prev-next {
        grid-template-columns: 1fr;
    }

    .blog-prev-next__link--next {
        text-align: left;
    }
}
