/**
 * Kamasa Blog Enhancements
 * Final polished design for 'K-Blog' module.
 */

/* Force clean transition from header */
header+* {
    margin-top: 0 !important;
}

/* =========================================================
   ARTICLE HERO (Single Article)
   ========================================================= */
.k-blog-hero {
    background: #000;
    text-align: center;
    padding: 80px 20px 20px !important;
    margin-bottom: 0 !important;
}

.k-blog-title {
    color: #ffed00 !important;
    /* Kamasa Yellow */
    font-size: clamp(2rem, 5vw, 48px) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    max-width: 900px;
    margin: 0 auto 15px !important;
    font-family: var(--k-font-heading);
}

.k-blog-subtitle {
    color: #FF8C00 !important;
    /* Kamasa Orange Accent */
    font-size: clamp(1.1rem, 3vw, 22px) !important;
    font-weight: 500 !important;
    margin-bottom: 10px !important;
    opacity: 1 !important;
    font-family: var(--k-font-body);
}

.k-blog-divider {
    width: 80px;
    height: 4px;
    background: #ffed00;
    margin: 0 auto 15px !important;
    border-radius: 2px;
}

/* =========================================================
   SINGLE BLOG - CONTENT & IMAGES
   ========================================================= */

/* All images in blog details */
.k-blog-detail-page img {
    border-radius: 12px !important;
}

/* Featured Image (Reduced 50%) */
.k-blog-featured-image {
    max-width: 500px !important;
    /* Reduced to focus on content */
    margin: 0 auto 40px auto !important;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Content Text (FORCE WHITE) */
.k-blog-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    color: #ffffff !important;
    opacity: 1 !important;
    filter: none !important;
}

.k-blog-content p,
.k-blog-content li,
.k-blog-content span {
    color: #ffffff !important;
    line-height: 1.8;
}

/* Internal Images (-30%) */
.k-blog-image,
.k-blog-content img {
    max-width: 65% !important;
    height: auto;
    display: block;
    margin: 30px auto !important;
    border-radius: 10px !important;
}

/* =========================================================
   BLOG MAIN LANDING (Hero) - COMPACT REFINEMENT
   ========================================================= */
.k-blog-main-hero {
    background: #000;
    text-align: center;
    padding: 30px 20px 35px 20px !important;
    /* Ultra compact padding */
    margin-top: 0 !important;
}

.k-blog-main-hero * {
    margin-top: 0;
}

.k-blog-main-hero h1 {
    color: #ffed00;
    font-size: clamp(3rem, 10vw, 72px);
    font-weight: 800;
    text-transform: uppercase;
    margin: 0 0 8px 0 !important;
    line-height: 1.1;
    font-family: var(--k-font-heading);
}

.k-blog-main-hero p {
    color: #fff;
    font-size: 18px !important;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto !important;
    font-family: var(--k-font-body);
}

.k-blog-main-hero .k-blog-divider {
    width: 100px;
    height: 5px;
    background: #ffed00;
    margin: 8px auto 10px auto !important;
}

/* =========================================================
   GENERAL LAYOUT AND BACKGROUND (PREMIUM DARK)
   ========================================================= */
body.k-blog-page-active,
.blog,
.post-type-archive-kam_blog {
    background-color: #000 !important;
}

.k-blog-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 320px)) !important;
    justify-content: center !important;
    gap: 30px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px 30px 20px !important;
    /* Spacing added below cards */
    overflow: visible !important;
}

.k-blog-list,
.k-blog-page,
.k-blog-container {
    overflow: visible !important;
    padding-top: 20px;
}

/* =========================================================
   BLOG CARDS - PREMIUM ILLUMINATION DESIGN (ULTRA VISIBLE)
   ========================================================= */
.k-blog-card {
    background: #1f1f1f !important;
    border-radius: 14px !important;
    overflow: visible !important;
    /* Critical to show glow */
    position: relative !important;
    border: none !important;
    transition: all 0.3s ease !important;
    z-index: 10;
    max-width: 320px !important;
    margin: 0 auto !important;

    /* Box Shadow Layers for base glow */
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 8px 24px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 255, 255, 0.12),
        0 0 45px rgba(255, 255, 255, 0.08) !important;
}

.k-blog-card:hover {
    transform: translateY(-8px) !important;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.10),
        0 12px 32px rgba(0, 0, 0, 0.6),
        0 0 28px rgba(255, 255, 255, 0.22),
        0 0 55px rgba(255, 255, 255, 0.15) !important;
}

/* Elegant Back-Lighting Effect (Visible Pseudo-element) */
.k-blog-card::after {
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: 20px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.06) 40%, transparent 75%);
    filter: blur(20px);
    z-index: -1;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.k-blog-card-content {
    position: relative;
    z-index: 2;
    padding: 24px;
}

.k-blog-card__title a {
    color: #ffed00 !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    text-decoration: none;
    line-height: 1.35 !important;
}

.k-blog-card__date {
    color: #ccc !important;
    margin-top: 15px !important;
    font-size: 0.95rem !important;
    opacity: 0.8;
}

/* Redesigned Image Container (Full Width Style) */
.k-blog-card__image {
    width: 100%;
    height: 200px !important;
    background: #111 !important;
    display: block !important;
    overflow: hidden !important;
    padding: 0 !important;
    /* Full width images */
    position: relative;
    border-radius: 14px 14px 0 0;
}

.k-blog-card__image::after {
    display: none !important;
}

.k-blog-card__image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    /* Commercial full fill */
    object-position: center !important;
    transition: transform 0.6s ease !important;
}

.k-blog-card:hover .k-blog-card__image img {
    transform: scale(1.10) !important;
}

.k-blog-card__category {
    all: unset !important;
    /* Total reset to restore original proportion */
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    background: #000000 !important;
    color: #ffffff !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    border-radius: 6px !important;
    /* Slightly rounded for premium technical look */
    display: inline-block !important;
    white-space: nowrap !important;
    z-index: 5 !important;
    transition: background 0.25s ease, color 0.25s ease !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5) !important;
    line-height: 1.2 !important;
    /* Better text centering */
}

.k-blog-card:hover .k-blog-card__category {
    background: #ffed00 !important;
    color: #000000 !important;
}

/* Fix product cards in single-blog */
.k-blog-product-simple {
    background: #f8f8f8 !important;
    border-left: 5px solid #ffed00 !important;
}

/* Footer navigation in single post */
.k-blog-footer {
    padding: 60px 0 100px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle link to dark bg */
    margin-top: 80px;
}

.k-blog-back-link {
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--k-font-heading);
    display: inline-block;
    transition: all 0.25s ease;
}

.k-blog-back-link:hover {
    color: #ffed00 !important;
    transform: translateX(5px);
}

/* =========================================================
   RESPONSIVE OVERRIDES
   ========================================================= */
@media (max-width: 768px) {
    .k-blog-hero {
        padding: 50px 15px;
    }

    .k-blog-title {
        font-size: 30px !important;
    }

    .k-blog-subtitle {
        font-size: 18px !important;
    }

    .k-blog-main-hero {
        padding: 60px 15px;
    }

    .k-blog-main-hero h1 {
        font-size: 42px;
    }

    .k-blog-main-hero p {
        font-size: 1rem;
    }
}