/* ==========================================
   3D & Premium Styles for Springedge Blogs
   ========================================== */

/* Variables & Theme */
:root {
    --blog-primary: #101827;
    --blog-secondary: #4f46e5;
    --blog-accent: #06b6d4;
    --blog-card-bg: rgba(255, 255, 255, 0.85);
    --blog-card-border: rgba(243, 244, 246, 0.6);
    --blog-shadow-color: rgba(79, 70, 229, 0.08);
    --blog-text-dark: #1f2937;
    --blog-text-light: #4b5563;
    --font-heading: 'Inter', sans-serif;
}

/* Base Enhancements */
.blog-section {
    position: relative;
    overflow: hidden;
    padding: 80px 0;
    background: radial-gradient(circle at 10% 20%, rgba(248, 250, 252, 1) 0%, rgba(241, 245, 249, 0.8) 90%);
}

/* Floating Particles Background */
.blog-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

/* Hero Section */
.blog-hero {
    position: relative;
    padding: 100px 0 60px;
    z-index: 2;
    text-align: center;
}

.blog-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--blog-primary);
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.blog-hero h1 span {
    background: linear-gradient(135deg, var(--blog-secondary) 0%, var(--blog-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.blog-hero p {
    font-size: 1.15rem;
    color: var(--blog-text-light);
    max-width: 650px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* Filter Controls */
.blog-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.filter-btn {
    padding: 10px 24px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: #ffffff;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--blog-text-light);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--blog-secondary);
    color: #ffffff;
    border-color: var(--blog-secondary);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.2);
}

/* Search Bar Wrapper */
.blog-search-container {
    max-width: 480px;
    margin: 0 auto 50px;
    position: relative;
    z-index: 2;
}

.blog-search-input {
    width: 100%;
    padding: 14px 24px;
    padding-right: 50px;
    border-radius: 30px;
    border: 1px solid rgba(226, 232, 240, 1);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.blog-search-input:focus {
    border-color: var(--blog-secondary);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.1);
}

.blog-search-btn {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--blog-text-light);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.blog-search-btn:hover {
    color: var(--blog-secondary);
}

/* 3D Glassmorphic Cards Grid */
.blog-grid {
    position: relative;
    z-index: 2;
}

.blog-3d-card {
    background: var(--blog-card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--blog-card-border);
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px -10px var(--blog-shadow-color);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.blog-3d-card:hover {
    border-color: rgba(79, 70, 229, 0.25);
    box-shadow: 0 20px 40px -15px rgba(79, 70, 229, 0.18);
}

.blog-card-image {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    transform: translateZ(20px);
}

.blog-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-3d-card:hover .blog-card-image img {
    transform: scale(1.08);
}

.blog-card-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, var(--blog-secondary) 0%, var(--blog-accent) 100%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 14px;
    border-radius: 30px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.blog-card-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    transform: translateZ(30px);
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--blog-text-light);
    margin-bottom: 15px;
}

.blog-card-meta i {
    color: var(--blog-secondary);
}

.blog-card-title {
    font-size: 1.35rem;
    font-weight: 750;
    color: var(--blog-primary);
    line-height: 1.4;
    margin-bottom: 12px;
    transition: color 0.2s ease;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
}

.blog-card-title a:hover {
    color: var(--blog-secondary);
}

.blog-card-excerpt {
    font-size: 0.95rem;
    color: var(--blog-text-light);
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    transform: translateZ(25px);
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-card-author img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.blog-card-author-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--blog-primary);
}

.blog-card-link {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--blog-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s ease;
}

.blog-card-link i {
    transition: transform 0.2s ease;
}

.blog-card-link:hover {
    color: var(--blog-accent);
}

.blog-card-link:hover i {
    transform: translateX(4px);
}

/* ==========================================
   Blog Detail Styles
   ========================================== */

/* Reading Scroll Progress */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(to right, var(--blog-secondary), var(--blog-accent));
    width: 0%;
    z-index: 9999;
    transition: width 0.1s ease;
}

.blog-detail-header {
    padding: 120px 0 60px;
    position: relative;
    z-index: 2;
    background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.05), transparent 60%);
}

.blog-detail-category {
    display: inline-block;
    background: rgba(79, 70, 229, 0.08);
    color: var(--blog-secondary);
    padding: 6px 16px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.blog-detail-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--blog-primary);
    line-height: 1.2;
    margin-bottom: 25px;
    letter-spacing: -0.02em;
}

.blog-detail-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: var(--blog-text-light);
    margin-bottom: 40px;
}

.blog-detail-meta img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.blog-detail-meta .author-info {
    display: flex;
    flex-direction: column;
}

.blog-detail-meta .author-name {
    font-weight: 700;
    color: var(--blog-primary);
}

/* Feature Image */
.blog-detail-hero-img-wrap {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    margin-bottom: 50px;
    transform: translateY(0px);
    transition: transform 0.5s ease;
}

.blog-detail-hero-img-wrap img {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 600px;
}

/* Content Layout */
.blog-detail-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--blog-text-dark);
}

.blog-detail-content p {
    margin-bottom: 30px;
    color: #374151;
}

.blog-detail-content h2, .blog-detail-content h3 {
    color: var(--blog-primary);
    font-weight: 800;
    margin-top: 50px;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.blog-detail-content h2 {
    font-size: 1.85rem;
    border-left: 4px solid var(--blog-secondary);
    padding-left: 15px;
}

.blog-detail-content h3 {
    font-size: 1.45rem;
}

.blog-detail-content blockquote {
    background: rgba(79, 70, 229, 0.03);
    border-left: 4px solid var(--blog-accent);
    padding: 25px 35px;
    border-radius: 0 16px 16px 0;
    margin: 40px 0;
    font-style: italic;
    font-size: 1.25rem;
    color: #4b5563;
    line-height: 1.7;
}

.blog-detail-content ul, .blog-detail-content ol {
    margin-bottom: 30px;
    padding-left: 20px;
}

.blog-detail-content li {
    margin-bottom: 10px;
    position: relative;
}

.blog-detail-content strong {
    color: var(--blog-primary);
}

/* Sidebar Info Card */
.blog-sidebar-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    position: sticky;
    top: 100px;
}

.blog-sidebar-title {
    font-size: 1.2rem;
    font-weight: 750;
    color: var(--blog-primary);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.blog-sidebar-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--blog-secondary);
    border-radius: 2px;
}

/* Share Buttons */
.blog-share-btns {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: var(--blog-text-light);
    transition: all 0.3s ease;
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    color: #ffffff;
}

.share-btn.fb { background: #1877f2; }
.share-btn.tw { background: #1da1f2; }
.share-btn.ln { background: #0a66c2; }
.share-btn.wa { background: #25d366; }

/* Responsive adjustments */
@media (max-width: 991px) {
    .blog-sidebar-card {
        position: static;
        margin-top: 50px;
    }
}
@media (max-width: 767px) {
    .blog-hero {
        padding: 60px 0 40px;
    }
    .blog-detail-header {
        padding: 80px 0 40px;
    }
    .blog-detail-title {
        font-size: 2rem;
    }
}
