/* ================= BLOG PAGE - DARK THEME ================= */

/* --- Background Pattern --- */
.section.blog-section {
    position: relative;
    background-color: var(--bg-main);
    padding-top: calc(var(--header-height) + 3rem);
}

.section.blog-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/justicsimb.svg') no-repeat center center;
    background-size: 40%;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

.section.blog-section > .container {
    position: relative;
    z-index: 1;
}

/* ================= BLOG INTRO ================= */
.blog-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.blog-intro h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--heading-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.blog-intro h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-light));
    box-shadow: 0 0 15px rgba(197, 164, 126, 0.5);
}

.blog-intro p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-top: 2rem;
}

/* ================= BLOG FILTERS ================= */
.blog-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-pill);
    color: var(--text-body);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--accent-gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    z-index: -1;
}

.filter-btn:hover::before,
.filter-btn.active::before {
    width: 300px;
    height: 300px;
}

.filter-btn:hover,
.filter-btn.active {
    color: #fff;
    border-color: var(--accent-gold);
    box-shadow: 0 4px 15px rgba(197, 164, 126, 0.3);
}

/* ================= BLOG GRID ================= */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.5rem;
    margin-bottom: 5rem;
}

/* ================= BLOG CARD ================= */
.blog-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    cursor: pointer;
}

/* Animated Border Gradient */
.blog-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 2px;
    background: linear-gradient(135deg, var(--accent-gold), transparent, var(--accent-gold-light));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    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-card:hover::before {
    opacity: 1;
}

/* Inner Glow Effect */
.blog-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                rgba(197, 164, 126, 0.08) 0%, 
                transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: var(--radius-md);
}

.blog-card:hover::after {
    opacity: 1;
}

.blog-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-gold-hover);
}

/* --- Blog Image --- */
.blog-image {
    height: 220px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(34, 34, 34, 0.95) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.5) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.blog-card:hover .blog-image::before {
    opacity: 1;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

/* --- Placeholder Icon --- */
.blog-placeholder {
    font-size: 3.5rem;
    color: rgba(197, 164, 126, 0.3);
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.blog-card:hover .blog-placeholder {
    transform: scale(1.2) rotate(-5deg);
    color: var(--accent-gold);
    filter: drop-shadow(0 0 20px rgba(197, 164, 126, 0.6));
}

/* --- Blog Tag --- */
.blog-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
    color: #fff;
    padding: 5px 15px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 50px;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(197, 164, 126, 0.3);
    transition: var(--transition);
}

.blog-card:hover .blog-tag {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(197, 164, 126, 0.5);
}

/* ================= BLOG CONTENT ================= */
.blog-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
}

.blog-content h3 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    color: var(--heading-color);
    transition: color 0.3s ease;
    position: relative;
}

.blog-content h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-gold), transparent);
    transition: width 0.4s ease;
}

.blog-card:hover .blog-content h3 {
    color: var(--accent-gold);
}

.blog-card:hover .blog-content h3::after {
    width: 60px;
}

/* --- Blog Excerpt --- */
.blog-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-excerpt {
    color: var(--text-body);
}

/* --- Blog Meta --- */
.blog-meta {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.blog-card:hover .blog-meta {
    border-top-color: rgba(197, 164, 126, 0.2);
}

.blog-meta i {
    color: var(--accent-gold);
    margin-right: 5px;
    transition: var(--transition);
}

.blog-card:hover .blog-meta i {
    transform: scale(1.1);
}

/* ================= BLOG CTA BOX ================= */
.blog-cta {
    background: linear-gradient(135deg, #1A1A1A 0%, #000 100%);
    padding: 4rem 2rem;
    text-align: center;
    border-radius: var(--radius-md);
    color: #fff;
    margin-bottom: 4rem;
    box-shadow: var(--shadow-gold);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

/* Shine Effect */
.blog-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(197, 164, 126, 0.1), 
        transparent);
    transition: left 0.8s ease;
}

.blog-cta:hover::before {
    left: 100%;
}

.blog-cta h3 {
    margin-bottom: 1rem;
    font-size: 2rem;
    color: var(--heading-color);
}

.blog-cta p {
    margin-bottom: 2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.blog-cta .btn {
    display: inline-flex;
}

/* ================= LOADING STATES ================= */
.blog-card.loading {
    pointer-events: none;
}

.blog-card.loading .blog-image {
    background: linear-gradient(90deg, 
        rgba(26, 26, 26, 0.95) 0%, 
        rgba(34, 34, 34, 0.95) 50%, 
        rgba(26, 26, 26, 0.95) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ================= PAGINATION ================= */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 4rem;
}

.pagination-btn {
    padding: 10px 18px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    color: var(--text-body);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.pagination-btn:hover,
.pagination-btn.active {
    background: var(--accent-gold);
    color: #fff;
    border-color: var(--accent-gold);
    box-shadow: 0 4px 15px rgba(197, 164, 126, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .blog-cta {
        padding: 3rem 1.5rem;
    }
    
    .blog-cta h3 {
        font-size: 1.75rem;
    }
    
    .blog-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .blog-intro {
        margin-bottom: 3rem;
    }
}

@media (max-width: 480px) {
    .blog-card {
        margin: 0 -10px;
    }
    
    .blog-content {
        padding: 1.5rem;
    }
    
    .blog-image {
        height: 180px;
    }
    
    .blog-placeholder {
        font-size: 3rem;
    }
    
    .blog-tag {
        font-size: 0.7rem;
        padding: 4px 12px;
    }
}

/* ================= EMPTY STATE ================= */
.blog-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.blog-empty i {
    font-size: 4rem;
    color: rgba(197, 164, 126, 0.3);
    margin-bottom: 1.5rem;
    display: block;
}

.blog-empty h3 {
    color: var(--heading-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.blog-empty p {
    max-width: 500px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
}