/*======================================================
 * MMRISK HOME PAGE BLOG SECTION REDESIGN
 * Asymmetric grid layout with featured post emphasis.
 * Premium Tesla/Apple-inspired dark aesthetic.
 *======================================================*/

.home-blog-section {
    position: relative;
    padding: 120px 0;
    background-color: #0d0d0d;
    color: #fff;
    overflow: hidden;
}

/* Background effects */
.home-blog-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(253, 199, 22, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(253, 199, 22, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

/* Grain texture overlay */
.home-blog-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.5;
    z-index: 1;
}

.home-blog-section > div {
    position: relative;
    z-index: 2;
}

/* ---- Header ---- */
.home-blog-section .section-header {
    text-align: left;
    margin-bottom: 64px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px;
}

.home-blog-section .section-subtitle {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #fdc716;
    margin-bottom: 20px;
}

.home-blog-section .section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
    font-weight: 800;
    color: #fff;
}

/* ---- Asymmetric Grid ---- */
.home-blog-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(200px, auto);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.home-blog-card {
    grid-column: span 4;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Featured Post (First Child) */
.home-blog-card:first-child {
    grid-column: span 8;
    grid-row: span 2;
}

.home-blog-card:first-child .blog-card-inner {
    display: flex;
    height: 100%;
}

.home-blog-card:first-child .home-blog-card-img {
    flex: 1.2;
    height: auto;
}

.home-blog-card:first-child .home-blog-card-content {
    flex: 1;
    padding: 48px;
    justify-content: center;
}

.home-blog-card:first-child .home-blog-card-title {
    font-size: 1.75rem;
}

/* Card Inner */
.blog-card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.home-blog-card-img {
    position: relative;
    height: 240px;
    overflow: hidden;
}

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

.home-blog-card:hover .home-blog-card-img img {
    transform: scale(1.05);
}

.home-blog-card-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
}

.home-blog-card-category {
    position: absolute;
    top: 24px;
    left: 24px;
    padding: 6px 14px;
    background: rgba(253, 199, 22, 0.9);
    backdrop-filter: blur(8px);
    color: #000;
    font-size: 11px;
    font-weight: 700;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Content */
.home-blog-card-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.home-blog-card-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 12px;
    font-weight: 500;
}

.home-blog-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
    color: #fff;
    transition: color 0.3s ease;
}

.home-blog-card:hover .home-blog-card-title {
    color: #fdc716;
}

.home-blog-card-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-footer {
    margin-top: auto;
}

.home-blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #fdc716;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.home-blog-card-link:hover {
    gap: 12px;
}

/* Spotlight Effect */
.blog-card-spotlight {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        600px circle at var(--card-glow-x, 50%) var(--card-glow-y, 50%),
        rgba(253, 199, 22, 0.06),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
    pointer-events: none;
}

.home-blog-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(253, 199, 22, 0.2);
    transform: translateY(-4px);
}

.home-blog-card:hover .blog-card-spotlight {
    opacity: 1;
}

/* View All Link */
.home-blog-section .text-center {
    margin-top: 64px;
}

.home-blog-section .btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 16px 40px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.home-blog-section .btn-primary:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1024px) {
    .home-blog-card:first-child {
        grid-column: span 12;
    }
    
    .home-blog-card {
        grid-column: span 6;
    }
}

@media (max-width: 768px) {
    .home-blog-card:first-child .blog-card-inner {
        flex-direction: column;
    }
    
    .home-blog-card:first-child .home-blog-card-content {
        padding: 32px;
    }
    
    .home-blog-card {
        grid-column: span 12;
    }

    .home-blog-section {
        padding: 80px 0;
    }
}
