/* Blog page */

.blog-page {
    position: relative;
    min-height: 100vh;
    padding-top: 92px;
    background:
        radial-gradient(circle at 10% 8%, rgba(37, 99, 235, 0.12), transparent 28%),
        radial-gradient(circle at 90% 18%, rgba(14, 165, 233, 0.14), transparent 30%),
        linear-gradient(180deg, #eef6ff 0%, #f8fafc 42%, #ffffff 100%);
    color: #0f172a;
}

.blog-section-kicker,
.ad-label {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    /* font-weight: 800; */
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.blog-section {
    min-width: 0;
}

.blog-summary-panel {
    display: grid;
    grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.blog-summary-card,
.blog-filter-card {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
}

.blog-summary-card {
    padding: 1.35rem;
}

.blog-summary-card h2 {
    margin: 0 0 1.25rem;
    color: #0f172a;
    font-size: 1.7rem;
    /* font-weight: 900; */
    font-weight: 700;
}

.blog-summary-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.blog-summary-stats div {
    min-width: 0;
    padding: 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.blog-summary-stats strong {
    display: block;
    overflow: hidden;
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 600;
    /* font-weight: 900; */
    text-overflow: ellipsis;
    white-space: nowrap;
}

.blog-summary-stats span {
    display: block;
    margin-top: 0.25rem;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
}

.blog-filter-card {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
}

.blog-summary-search {
    display: grid;
    grid-template-columns: auto minmax(140px, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.blog-summary-search i {
    padding-left: 0.45rem;
    color: #2563eb;
}

.blog-summary-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0f172a;
}

.blog-summary-search button {
    border: 0;
    border-radius: 10px;
    padding: 0.62rem 0.95rem;
    background: #0f172a;
    color: #ffffff;
    font-weight: 500;
    /* font-weight: 800; */
}

.blog-filter-group {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
    scrollbar-width: none;
}

.blog-filter-group::-webkit-scrollbar {
    display: none;
}

.blog-filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0.52rem 0.85rem;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.86rem;
    font-weight: 600;
    /* font-weight: 800; */
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.blog-filter-chip.tag {
    background: #eff6ff;
    color: #2563eb;
}

.blog-filter-chip:hover,
.blog-filter-chip.active {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.blog-section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.35rem;
}

.blog-section-kicker {
    margin-bottom: 0.4rem;
    color: #2563eb;
}

.blog-section-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.85rem;
    font-weight: 700;
    /* font-weight: 900; */
}

.blog-count {
    flex: 0 0 auto;
    padding: 0.4rem 0.75rem;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #ffffff;
    color: #2563eb;
    font-size: 0.85rem;
    font-weight: 700;
}

.blog-post-card,
.blog-sidebar-card,
.ad-slot {
    border: 1px solid rgba(203, 213, 225, 0.7);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
}

.blog-post-media {
    display: block;
    overflow: hidden;
    background: #e2e8f0;
}

.blog-post-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.blog-post-card:hover img {
    transform: scale(1.04);
}

.blog-post-body p {
    color: #64748b;
    line-height: 1.75;
}

.blog-post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.1);
}

.blog-post-media {
    aspect-ratio: 16 / 10;
    height: auto;
}

.blog-post-body {
    display: flex;
    min-height: 280px;
    flex: 1;
    flex-direction: column;
    padding: 1.35rem;
}

.blog-post-body h4 {
    margin: 0 0 0.8rem;
    font-size: 1.12rem;
    font-weight: 600;
    line-height: 1.35;
    min-height: 3.05rem;
}

.blog-post-body h4 a {
    color: #0f172a;
    text-decoration: none;
}

.blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.9rem;
    margin-bottom: 1rem;
    color: #64748b;
    font-size: 0.85rem;
}

.blog-post-body p {
    display: -webkit-box;
    min-height: 5.25rem;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.blog-read-more {
    margin-top: auto;
    color: #2563eb;
    font-weight: 800;
    text-decoration: none;
}

.blog-empty-state {
    padding: 4rem 2rem;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    background: #ffffff;
    text-align: center;
}

.blog-empty-state i {
    color: #2563eb;
    font-size: 2.25rem;
}

.blog-empty-state h3 {
    margin: 1rem 0 0.4rem;
    font-size: 1.35rem;
    font-weight: 800;
}

.blog-empty-state p {
    margin: 0;
    color: #64748b;
}

.blog-sidebar {
    top: 2rem;
    z-index: 900 !important;
}

.blog-sidebar-card {
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.blog-sidebar-card h4 {
    margin-bottom: 1.1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 900;
}

.blog-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-category-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
}

.blog-category-list span {
    min-width: 2rem;
    padding: 0.25rem 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
}

.blog-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.ad-rail {
    position: fixed;
    top: 140px;
    z-index: 50;
    display: block;
    width: 160px;
}

.ad-rail.is-hidden {
    display: none !important;
}

.ad-rail-left {
    left: 12px;
}

.ad-rail-right {
    right: 12px;
}

.ad-slot-rail {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.15rem;
    overflow: hidden;
    width: 100%;
    min-height: 600px;
    padding: 1rem;
    border: 0;
    border-radius: 18px;
    color: #ffffff;
    text-align: left;
    writing-mode: horizontal-tb;
}

.ad-slot-rail::before,
.ad-slot-rail::after {
    position: absolute;
    z-index: -1;
    content: "";
}

.ad-slot-rail::before {
    inset: 0;
    background:
        radial-gradient(circle at 20% 14%, rgba(255, 255, 255, 0.32), transparent 24%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.18), transparent 34%);
}

.ad-slot-rail::after {
    right: -3.5rem;
    bottom: 4.75rem;
    width: 8.5rem;
    height: 8.5rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.ad-slot-blue {
    background: linear-gradient(180deg, #0f172a 0%, #1d4ed8 58%, #06b6d4 100%);
    box-shadow: 0 24px 60px rgba(29, 78, 216, 0.28);
}

.ad-slot-green {
    background: linear-gradient(180deg, #10231e 0%, #047857 56%, #84cc16 100%);
    box-shadow: 0 24px 60px rgba(4, 120, 87, 0.24);
}

.ad-label {
    align-self: flex-start;
    max-width: calc(100% - 2.45rem);
    margin: 0;
    padding: 0.38rem 0.58rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.64rem;
    line-height: 1;
    backdrop-filter: blur(10px);
}

.ad-brand-mark {
    display: grid;
    place-items: center;
    width: 4.25rem;
    height: 4.25rem;
    margin-top: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
    color: #ffffff;
    font-size: 2rem;
}

.ad-copy {
    display: grid;
    gap: 0.55rem;
}

.ad-eyebrow {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ad-copy strong {
    display: block;
    color: #ffffff;
    font-size: 1.28rem;
    /* font-weight: 900; */
    font-weight: 700;
    line-height: 1.28;
}

.ad-copy p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.58;
}

.ad-cta {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    width: 100%;
    min-height: 42px;
    padding: 0.68rem 0.78rem;
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.88rem;
    /* font-weight: 900; */
    font-weight: 500;
    line-height: 1.1;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.ad-cta i {
    flex: 0 0 auto;
    font-size: 1.2rem;
}

.ad-cta:hover,
.ad-cta:focus {
    color: #1d4ed8;
}

.ad-close-btn {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #475569;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ad-close-btn:hover,
.ad-close-btn:focus {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.transition-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.transition-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg) !important;
}

.read-more-link i {
    transition: transform 0.2s ease;
}

.read-more-link:hover i {
    transform: translateX(5px);
}

.category-link:hover {
    color: var(--primary) !important;
    padding-left: 5px;
    transition: var(--transition-fast);
}

@media (max-width: 991.98px) {
    .blog-page {
        padding-top: 78px;
    }

    .blog-sidebar {
        position: static !important;
    }
}

@media (max-width: 575.98px) {
    .blog-section-header {
        align-items: start;
        flex-direction: column;
    }

    .blog-sidebar-card {
        padding: 1.25rem;
    }
}

@media (max-width: 991.98px) {
    .blog-summary-panel {
        grid-template-columns: 1fr;
    }

    .blog-summary-stats {
        grid-template-columns: 1fr;
    }

    .ad-rail {
        position: static;
        display: block;
        width: min(100% - 2rem, 720px);
        margin: 0 auto 1rem;
    }

    .ad-rail-left {
        margin-top: 1rem;
    }

    .ad-rail-left,
    .ad-rail-right {
        left: auto;
        right: auto;
    }

    .ad-slot-rail {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        min-height: 0;
        gap: 0.9rem 1rem;
        padding: 1rem;
    }

    .ad-label,
    .ad-cta {
        grid-column: 1 / -1;
    }

    .ad-brand-mark {
        width: 3.75rem;
        height: 3.75rem;
        margin-top: 0;
        border-radius: 0.9rem;
        font-size: 1.7rem;
    }

    .ad-copy strong {
        font-size: 1.1rem;
    }

    .ad-copy p {
        font-size: 0.82rem;
    }
}
