/* Filename: style/blog.css
   Description: Style khusus Halaman Blog Popular
*/

/* --- HERO SECTION --- */
.blog-hero {
    background: var(--surau-black); /* Mengambil variable global */
    color: var(--surau-white);
    padding: 140px 0 80px; /* Padding atas besar utk kompensasi header fixed */
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.hero-pattern {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(circle at 10% 20%, rgba(230,0,2,0.1) 0%, transparent 20%);
    z-index: 1;
    pointer-events: none;
}

.hero-content { position: relative; z-index: 2; text-align: center; max-width: 700px; margin: 0 auto; }

.hero-badge {
    display: inline-block; background: rgba(255,255,255,0.1); 
    color: var(--surau-red); font-weight: 700; padding: 6px 16px; 
    border-radius: 50px; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; font-size: 0.8rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.blog-hero h1 { font-size: 3rem; font-weight: 800; margin-bottom: 15px; color: white; }
.blog-hero p { font-size: 1.15rem; color: #9CA3AF; }

/* --- MAIN LAYOUT --- */
.blog-content-area { padding: 60px 0 100px; }
.blog-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr; /* Kiri 70%, Kanan 30% */
    gap: 50px;
    align-items: start;
}

/* --- FEATURED CARD (Rank 1) --- */
.blog-card-featured {
    background: white; border-radius: 16px; overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08); margin-bottom: 50px;
    border: 1px solid rgba(0,0,0,0.03); transition: transform 0.3s;
}
.blog-card-featured:hover { transform: translateY(-5px); }

.feat-img-wrap { position: relative; height: 400px; overflow: hidden; }
.feat-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.blog-card-featured:hover .feat-img-wrap img { transform: scale(1.05); }

.feat-badge {
    position: absolute; top: 20px; left: 20px;
    background: var(--surau-red); color: white;
    padding: 6px 14px; border-radius: 6px; font-weight: 700; font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.feat-content { padding: 35px; }
.post-meta { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; font-size: 0.9rem; }
.cat-pill { 
    background: #FEF2F2; color: var(--surau-red); 
    padding: 4px 12px; border-radius: 50px; font-weight: 600; text-transform: uppercase; font-size: 0.75rem; 
}
.post-date { color: #6B7280; }

.feat-title { font-size: 2rem; font-weight: 800; margin-bottom: 15px; line-height: 1.3; }
.feat-title a { color: var(--surau-black); transition: 0.2s; }
.feat-title a:hover { color: var(--surau-red); }

.feat-excerpt { color: #4B5563; line-height: 1.7; margin-bottom: 25px; font-size: 1.05rem; }

.read-more-btn {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--surau-black); font-weight: 700; border-bottom: 2px solid var(--surau-red);
    padding-bottom: 2px; transition: 0.3s;
}
.read-more-btn:hover { color: var(--surau-red); gap: 12px; }


/* --- LIST CARD (Rank 2-10) --- */
.blog-feed { display: flex; flex-direction: column; gap: 30px; }

.blog-card-list {
    background: white; border-radius: 12px;
    display: flex; gap: 25px; padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid #F3F4F6; transition: 0.3s;
    align-items: center;
}
.blog-card-list:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.08); border-color: rgba(230,0,2,0.1); }

.list-img-wrap { flex-shrink: 0; width: 180px; height: 130px; border-radius: 8px; overflow: hidden; }
.list-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.blog-card-list:hover .list-img-wrap img { transform: scale(1.1); }

.list-content { flex-grow: 1; }
.post-meta-small { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rank-num { font-family: 'Inter', sans-serif; font-weight: 900; color: #E5E7EB; font-size: 1.5rem; line-height: 1; }
.cat-text { color: var(--surau-red); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; }

.list-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.list-title a { color: var(--surau-black); }
.list-title a:hover { color: var(--surau-red); }

.list-excerpt { font-size: 0.9rem; color: #6B7280; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.text-link { font-size: 0.85rem; font-weight: 700; color: var(--surau-black); display: inline-flex; align-items: center; gap: 5px; }
.text-link:hover { color: var(--surau-red); }


/* --- SIDEBAR --- */
.blog-sidebar { position: relative; }
.sidebar-sticky-wrapper { position: sticky; top: 100px; }

.sidebar-widget {
    background: white; padding: 30px; border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.04); margin-bottom: 30px;
    border: 1px solid #F3F4F6;
}
.sidebar-widget.no-pad { padding: 0; overflow: hidden; border: none; }

.widget-title { font-size: 1.1rem; font-weight: 800; color: var(--surau-black); margin-bottom: 20px; border-left: 4px solid var(--surau-red); padding-left: 15px; }

/* Search Form */
.sidebar-search-form { display: flex; position: relative; }
.search-field { width: 100%; padding: 12px 15px; border: 1px solid #E5E7EB; border-radius: 8px; font-size: 0.9rem; transition: 0.3s; outline: none; }
.search-field:focus { border-color: var(--surau-red); }
.search-submit { position: absolute; right: 5px; top: 5px; background: var(--surau-red); color: white; border: none; width: 34px; height: 34px; border-radius: 6px; cursor: pointer; transition: 0.3s; }
.search-submit:hover { background: #cc0002; }

/* Category List */
.custom-cat-list li { margin-bottom: 10px; }
.cat-item-link {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 15px; background: #F9FAFB; border-radius: 8px;
    color: #4B5563; font-weight: 600; font-size: 0.95rem; transition: 0.2s;
}
.cat-item-link:hover { background: var(--surau-red); color: white; transform: translateX(5px); }
.cat-count { background: rgba(0,0,0,0.05); padding: 2px 8px; border-radius: 10px; font-size: 0.75rem; }
.cat-item-link:hover .cat-count { background: rgba(255,255,255,0.2); color: white; }

/* CTA Banner */
.sidebar-cta-card {
    background: var(--surau-red); color: white; padding: 40px 30px;
    text-align: center; background-image: url('https://www.transparenttextures.com/patterns/cubes.png');
}
.sidebar-cta-card h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 10px; color: white; }
.sidebar-cta-card p { font-size: 0.95rem; margin-bottom: 25px; opacity: 0.9; }
.btn-white-outline { background: transparent; border: 2px solid white; color: white; padding: 10px 24px; border-radius: 50px; font-weight: 700; transition: 0.3s; display: inline-block; }
.btn-white-outline:hover { background: white; color: var(--surau-red); }

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .blog-layout { grid-template-columns: 1fr; gap: 40px; }
    .feat-img-wrap { height: 300px; }
    .blog-sidebar { margin-top: 30px; }
    .sidebar-sticky-wrapper { position: static; }
}

@media (max-width: 600px) {
    .blog-hero { padding: 100px 0 60px; }
    .blog-hero h1 { font-size: 2rem; }
    
    .blog-card-list { flex-direction: column; gap: 15px; }
    .list-img-wrap { width: 100%; height: 200px; }
    .rank-num { font-size: 1rem; }
    
    .feat-content { padding: 20px; }
    .feat-title { font-size: 1.5rem; }
}