/* Filename: style/single.css
   Description: Styling khusus halaman Single Post (Detail Artikel) Premium
   Dependencies: style.css (Root)
*/

/* ==========================================================================
   1. SINGLE HERO SECTION (Dark Theme)
   ========================================================================== */
.single-hero-section {
    background-color: var(--surau-dark-bg); /* Menyatu dengan Dark Header */
    color: var(--surau-white);
    padding: 120px 0 80px; /* Padding atas besar kompensasi fixed header */
    position: relative;
    overflow: hidden;
    margin-top: -80px; /* Tarik ke atas agar di belakang header transparan */
}

/* Background Pattern Abstrak */
.hero-bg-pattern {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(230, 0, 2, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255, 214, 0, 0.05) 0%, transparent 20%);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Breadcrumb Styling */
.hero-breadcrumb {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.hero-breadcrumb a { color: rgba(255,255,255,0.8); transition: 0.2s; }
.hero-breadcrumb a:hover { color: var(--surau-yellow); }
.hero-breadcrumb i { font-size: 0.6rem; opacity: 0.5; }

/* Category Badge */
.hero-cat-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--surau-yellow);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
    transition: 0.3s;
}

.hero-cat-badge:hover {
    background: var(--surau-yellow);
    color: var(--surau-black);
    border-color: var(--surau-yellow);
}

/* Main Title */
.entry-title {
    font-size: 2.5rem; /* Besar & Bold */
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 30px;
    color: var(--surau-white);
}

/* Meta Data (Author, Date) */
.entry-meta-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    margin-top: 25px;
}

.meta-item { display: flex; align-items: center; gap: 8px; }
.meta-item i { color: var(--surau-red); }

.author-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    border: 2px solid var(--surau-white);
}

/* ==========================================================================
   2. CONTENT LAYOUT (Grid System)
   ========================================================================== */
.single-layout-grid {
    display: grid;
    grid-template-columns: 1fr 350px; /* Kiri Flex, Kanan Fixed 350px */
    gap: 60px;
    margin-top: -60px; /* Overlap Hero sedikit agar dinamis */
    position: relative;
    z-index: 5;
    padding-bottom: 80px;
}

/* ==========================================================================
   3. ARTICLE CONTENT (Left Side)
   ========================================================================== */
.single-content-wrapper {
    background: var(--surau-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    padding: 0; /* Padding dihandle child */
}

/* Featured Image */
.entry-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 500px;
    object-fit: cover;
}

/* Body Content Typography */
.entry-content-body {
    padding: 50px;
    font-size: 1.1rem; /* 17-18px enak dibaca */
    line-height: 1.8;
    color: var(--surau-black);
}

.entry-content-body p { margin-bottom: 1.8em; }

.entry-content-body h2 {
    font-size: 1.8rem;
    margin-top: 2em; margin-bottom: 0.8em;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--surau-yellow);
    display: inline-block;
}

.entry-content-body h3 {
    font-size: 1.4rem;
    margin-top: 1.5em; margin-bottom: 0.6em;
    color: var(--surau-red);
}

.entry-content-body ul, 
.entry-content-body ol {
    margin-bottom: 1.8em;
    padding-left: 20px;
}

.entry-content-body li { margin-bottom: 0.5em; }

.entry-content-body blockquote {
    border-left: 5px solid var(--surau-red);
    background: var(--surau-gray-light);
    padding: 20px 30px;
    margin: 2em 0;
    font-style: italic;
    font-size: 1.2rem;
    color: #555;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Article Footer (Share & Tags) */
.entry-footer-box {
    padding: 30px 50px;
    background: #FAFAFA;
    border-top: 1px solid var(--surau-gray-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-tags .tag-link {
    display: inline-block;
    background: var(--surau-white);
    border: 1px solid #ddd;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: #666;
    margin-right: 8px;
    margin-bottom: 5px;
}

.footer-tags .tag-link:hover {
    background: var(--surau-black);
    color: white;
    border-color: var(--surau-black);
}

.footer-share {
    display: flex; align-items: center; gap: 10px;
}

.share-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: white;
    transition: 0.3s;
}
.share-btn:hover { transform: translateY(-3px); }
.share-btn.fb { background: #3b5998; }
.share-btn.tw { background: #1da1f2; }
.share-btn.wa { background: #25D366; }

/* Author Box */
.author-box {
    margin: 40px 50px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 30px;
    border: 1px solid var(--surau-gray-border);
    border-radius: var(--radius-md);
    background: var(--surau-white);
}

.author-img img {
    width: 80px; height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 { margin: 0 0 10px; font-size: 1.1rem; }
.author-info p { margin: 0; font-size: 0.95rem; color: #666; }

/* ==========================================================================
   4. SIDEBAR STYLES (Right Side)
   ========================================================================== */
.single-sidebar {
    padding-top: 60px; /* Agar sejajar visual dengan konten */
}

/* Sticky Logic */
.sticky-sidebar {
    position: sticky;
    top: 100px; /* Jarak dari header sticky */
}

.widget {
    background: var(--surau-white);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    margin-bottom: 30px;
    border: 1px solid var(--surau-gray-border);
}

.widget-title {
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--surau-gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Widget Search */
.widget-search .search-form {
    display: flex; position: relative;
}
.widget-search .search-field {
    width: 100%; padding: 12px 40px 12px 15px;
    border: 1px solid #ddd; border-radius: 50px;
}
.widget-search .search-submit {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: #999; cursor: pointer;
}

/* Widget List (Categories) */
.widget-categories ul li {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    font-size: 0.95rem;
    display: flex; justify-content: space-between;
}
.widget-categories ul li:last-child { border: none; }
.widget-categories a:hover { color: var(--surau-red); padding-left: 5px; }

/* CTA Banner Widget */
.widget-cta-banner {
    background: var(--surau-dark-bg);
    color: white;
    text-align: center;
    border: none;
    position: relative; overflow: hidden;
}

.widget-cta-banner::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
}

.cta-banner-content { position: relative; z-index: 2; }
.cta-banner-content h4 { color: var(--surau-yellow); margin-bottom: 10px; }
.cta-banner-content p { color: #ccc; margin-bottom: 20px; font-size: 0.9rem; }

/* ==========================================================================
   5. RELATED POSTS SECTION
   ========================================================================== */
.related-posts-section {
    padding: 60px 0 80px;
    background: var(--surau-gray-light);
    border-top: 1px solid rgba(0,0,0,0.05);
}

.related-title {
    font-size: 1.5rem; margin-bottom: 30px;
    border-left: 5px solid var(--surau-red);
    padding-left: 15px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.related-card {
    background: var(--surau-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: block; /* Link wrapper */
    transition: 0.3s;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.related-thumb {
    height: 180px; overflow: hidden; background: #eee;
}

.related-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s;
}

.related-card:hover .related-thumb img { transform: scale(1.1); }

.related-info { padding: 20px; }
.related-info h4 { font-size: 1rem; margin-bottom: 10px; line-height: 1.4; color: var(--surau-black); }
.related-info .date { font-size: 0.8rem; color: #888; }

/* ==========================================================================
   6. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
    .single-layout-grid {
        grid-template-columns: 1fr; /* Stack Sidebar di bawah */
        margin-top: 0;
    }
    .single-sidebar { padding-top: 0; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .entry-title { font-size: 1.8rem; }
    .entry-meta-header { flex-direction: column; gap: 10px; align-items: flex-start; }
    
    .entry-content-body { padding: 30px 20px; }
    .entry-footer-box { flex-direction: column; align-items: flex-start; }
    .author-box { margin: 20px; flex-direction: column; text-align: center; }
    .author-img { margin: 0 auto; }
    
    .related-grid { grid-template-columns: 1fr; }
}