/* ══════════════════════════════════════════════════════════════════════
   BLOGS & ACADEMY - WORLD CLASS SAAS STYLING
   ══════════════════════════════════════════════════════════════════════ */

.blogs-page-root {
    position: relative;
    overflow: hidden;
}

/* Blog Hero */
.blog-hero {
    position: relative;
    padding: 130px 0 60px;
    background: radial-gradient(circle at 50% 15%, rgba(99, 102, 241, 0.2) 0%, rgba(11, 15, 25, 0.98) 75%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    overflow: hidden;
}

.blog-hero-glow {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 450px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.22) 0%, rgba(59, 130, 246, 0.1) 45%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.blog-search-box {
    max-width: 580px;
    margin: 30px auto 0;
    position: relative;
}

.blog-search-input {
    width: 100%;
    padding: 14px 24px 14px 50px;
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.95rem;
    backdrop-filter: blur(14px);
    outline: none;
    transition: all 0.25s ease;
}

.blog-search-input:focus {
    border-color: #818cf8;
    background: rgba(17, 24, 39, 0.95);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.blog-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
}

/* Category Filter Tabs */
.blog-category-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 25px;
}

.blog-cat-pill {
    appearance: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.blog-cat-pill:hover {
    color: #ffffff;
    border-color: rgba(99, 102, 241, 0.35);
}

.blog-cat-pill.active {
    background: #4f46e5;
    color: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

/* Featured Top Post */
.featured-blog-card {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(16px);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 50px;
}

.featured-blog-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.5), 0 0 35px rgba(99, 102, 241, 0.2);
}

.featured-img-wrap {
    height: 100%;
    min-height: 320px;
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

.featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.featured-blog-card:hover .featured-img {
    transform: scale(1.05);
}

/* Regular Blog Grid Card */
.blog-ultra-card {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.75) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(14px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.blog-ultra-card:hover {
    transform: translateY(-6px);
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 25px rgba(99, 102, 241, 0.15);
}

.blog-thumb-wrap {
    height: 220px;
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

.blog-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-ultra-card:hover .blog-thumb-img {
    transform: scale(1.06);
}

.blog-tag-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 12px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 999px;
    color: #a5b4fc;
    font-size: 0.74rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.blog-read-time {
    position: absolute;
    bottom: 14px;
    right: 14px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 999px;
    color: #e2e8f0;
    font-size: 0.72rem;
    font-weight: 600;
    backdrop-filter: blur(6px);
}

.blog-card-body-custom {
    padding: 26px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.4;
    margin-bottom: 12px;
    transition: color 0.2s ease;
}

.blog-ultra-card:hover .blog-card-title {
    color: #a5b4fc;
}

.blog-card-excerpt {
    color: #94a3b8;
    font-size: 0.88rem;
    line-height: 1.65;
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
}

.btn-blog-read {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #818cf8;
    font-weight: 600;
    font-size: 0.86rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-blog-read:hover {
    color: #a5b4fc;
    transform: translateX(3px);
}

/* Newsletter Box */
.newsletter-saas-card {
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.2) 0%, rgba(17, 24, 39, 0.9) 80%);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 24px;
    padding: 48px 32px;
    text-align: center;
    backdrop-filter: blur(16px);
    margin-top: 60px;
}

/* Light Theme Overrides */
[data-theme="light"] .blog-hero {
    background: radial-gradient(circle at 50% 15%, rgba(99, 102, 241, 0.12) 0%, #f8fafc 80%);
}

[data-theme="light"] .featured-blog-card,
[data-theme="light"] .blog-ultra-card,
[data-theme="light"] .newsletter-saas-card {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .blog-card-title,
[data-theme="light"] .newsletter-saas-card h3 {
    color: #0f172a !important;
}

[data-theme="light"] .blog-card-excerpt,
[data-theme="light"] .newsletter-saas-card p {
    color: #475569 !important;
}

[data-theme="light"] .blog-search-input {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}

[data-theme="light"] .blog-cat-pill {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

[data-theme="light"] .blog-cat-pill.active {
    background: #4f46e5;
    color: #ffffff;
}
