/* =========================================
   BLOG PAGE - INNOVATIVE MODERN DESIGN
   ========================================= */

/* Blog Hero */
.blog-hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl) var(--space-lg);
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1025 50%, #0f1419 100%);
    overflow: hidden;
}

.blog-hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease forwards;
}

.hero-badge {
    display: inline-block;
    padding: 8px 24px;
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 50px;
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

.blog-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.blog-hero-shapes .shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.3) 0%, transparent 70%);
    top: -15%;
    left: -10%;
}

.shape-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.25) 0%, transparent 70%);
    bottom: -10%;
    right: -5%;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
    top: 60%;
    left: 60%;
}

/* Filter Section */
.blog-filter-section {
    background: var(--bg-primary);
    padding: var(--space-xl) var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 80px;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.filter-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.filter-btn.active {
    background: var(--gradient-accent);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

/* Blog Grid Section */
.blog-grid-section {
    background: var(--bg-primary);
    padding: var(--space-2xl) var(--space-lg);
    min-height: 60vh;
}

.blog-container {
    max-width: 1400px;
    margin: 0 auto;
}

.blog-masonry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

/* Blog Post Card - Innovative Design */
.blog-post {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
    position: relative;
}

.blog-post.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-post:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 107, 53, 0.3);
}

.blog-post::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    padding: 2px;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 107, 53, 0.5) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.blog-post:hover::before {
    opacity: 1;
}

/* Post Visual - Number Display */
.post-visual {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.blog-post.featured .post-visual {
    height: 100%;
    min-height: 300px;
}

.post-gradient {
    position: absolute;
    inset: 0;
    opacity: 0.9;
}

.post-number {
    font-family: var(--font-display);
    font-size: 6rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.15);
    position: relative;
    z-index: 1;
    transition: all 0.4s ease;
}

.blog-post:hover .post-number {
    transform: scale(1.1);
    color: rgba(255, 255, 255, 0.25);
}

/* Post Content */
.post-content {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.post-category {
    padding: 6px 14px;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: var(--radius-full);
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.post-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    line-height: 1.3;
    transition: color 0.3s ease;
}

.blog-post:hover .post-title {
    color: var(--accent-secondary);
}

.blog-post.featured .post-title {
    font-size: 1.8rem;
}

.post-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--space-md);
    flex-grow: 1;
}

.post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
}

.read-time {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.read-btn {
    background: transparent;
    border: none;
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.read-btn:hover {
    color: var(--accent-secondary);
    transform: translateX(5px);
}

/* Blog Modal - Popup */
.blog-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.blog-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.modal-container {
    position: relative;
    width: 90%;
    max-width: 850px;
    max-height: 90vh;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transform: scale(0.9) translateY(30px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-subtle);
}

.blog-modal.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--accent-primary);
    transform: rotate(90deg);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-content {
    overflow-y: auto;
    max-height: 90vh;
}

.modal-header {
    height: 200px;
    position: relative;
}

.modal-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, var(--bg-secondary) 100%);
}

.modal-body {
    padding: var(--space-2xl);
    padding-top: 0;
}

.modal-body h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    line-height: 1.2;
}

.modal-body .post-date-full {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
}

.modal-body h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.modal-body p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.modal-body ul,
.modal-body ol {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}

.modal-body li {
    margin-bottom: var(--space-sm);
}

.modal-body strong {
    color: var(--text-primary);
}

/* Scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--surface-active);
    border-radius: var(--radius-full);
}

/* Responsive */
@media (max-width: 1024px) {
    .blog-masonry {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-post.featured {
        grid-column: span 2;
        grid-template-columns: 1fr;
    }

    .blog-post.featured .post-visual {
        height: 200px;
        min-height: 200px;
    }
}

@media (max-width: 768px) {
    .blog-masonry {
        grid-template-columns: 1fr;
    }

    .blog-post.featured {
        grid-column: span 1;
    }

    .blog-filter-section {
        position: relative;
        top: 0;
    }

    .filter-container {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: var(--space-sm);
    }

    .filter-btn {
        flex-shrink: 0;
    }

    .modal-container {
        width: 95%;
        max-height: 95vh;
    }

    .modal-body {
        padding: var(--space-lg);
    }
}

@media (max-width: 480px) {
    .blog-hero {
        min-height: 40vh;
        padding: var(--space-2xl) var(--space-sm);
    }

    .blog-grid-section {
        padding: var(--space-lg) var(--space-sm);
    }

    .post-title {
        font-size: 1.2rem;
    }

    .blog-post.featured .post-title {
        font-size: 1.4rem;
    }

    .modal-body h1 {
        font-size: 1.5rem;
    }
}