/*
Theme Name: GeneratePress Child
Theme URI: https://generatepress.com
Description: Child theme for GeneratePress dengan fitur lengkap
Author: Your Name
Author URI: https://yourwebsite.com
Template: generatepress
Version: 1.0
*/

/* Import CSS utama */
@import url("../generatepress/style.css");

/* Base Styles */
:root {
    --primary-color: #3a7bd5;
    --secondary-color: #00d2ff;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --medium-gray: #ddd;
    --dark-gray: #666;
}

/* Reading Time */
.reading-time {
    display: flex;
    align-items: center;
    color: var(--dark-gray);
    font-size: 0.9em;
    margin-bottom: 1em;
    padding: 8px 12px;
    background: var(--light-gray);
    border-radius: 20px;
    display: inline-flex;
    border-left: 3px solid var(--primary-color);
}

.reading-time i {
    margin-right: 8px;
    color: var(--primary-color);
    font-size: 1em;
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 9999;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 0 2px 2px 0;
}

/* Table of Contents */
.toc-wrapper {
    background: var(--light-gray);
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 10px;
}

.toc-title {
    font-weight: bold;
    margin: 0;
    color: var(--text-color);
}

.toc-toggle {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: var(--primary-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.toc-toggle:hover {
    background-color: rgba(58, 123, 213, 0.1);
}

.toc-list {
    list-style: none;
    padding-left: 15px;
    margin: 0;
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.toc-list.collapsed {
    max-height: 0;
}

.toc-list li {
    margin-bottom: 8px;
    line-height: 1.4;
    position: relative;
}

.toc-list li[data-level="2"] {
    padding-left: 0;
}

.toc-list li[data-level="3"] {
    padding-left: 15px;
}

.toc-list li[data-level="4"] {
    padding-left: 30px;
}

.toc-list li[data-level="5"] {
    padding-left: 45px;
}

.toc-list li[data-level="6"] {
    padding-left: 60px;
}

.toc-list li a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    padding: 2px 0;
}

.toc-list li a:hover {
    color: var(--primary-color);
}

.toc-list li.active > a {
    color: var(--primary-color);
    font-weight: bold;
    background-color: rgba(58, 123, 213, 0.1);
    border-radius: 3px;
    padding: 2px 8px;
    margin: 0 -8px;
}

/* Related Posts */
.related-posts {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--medium-gray);
}

.related-posts-title {
    margin-bottom: 20px;
    font-size: 1.5em;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-posts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.related-posts-list .related-post {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.related-posts-list .related-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.related-posts-list .related-post-image {
    flex: 0 0 120px;
    height: 80px;
}

.related-posts-list .related-post-content {
    flex: 1;
    padding: 15px;
}

.related-posts-list .related-post-content h3 {
    margin: 0 0 8px 0;
    font-size: 1em;
}

.related-post {
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.related-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.related-post-image {
    height: 180px;
    overflow: hidden;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.related-post:hover .related-post-image img {
    transform: scale(1.05);
}

.related-post-content {
    padding: 15px;
}

.related-post-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    line-height: 1.3;
}

.related-post-content h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.related-post-content h3 a:hover {
    color: var(--primary-color);
}

.related-post-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: var(--dark-gray);
    margin-bottom: 10px;
}

.related-posts-list .related-post-meta {
    margin-bottom: 8px;
    font-size: 0.75em;
}

.related-posts-list .related-post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.related-posts-list .related-post-meta span:first-child {
    flex: 1;
}

.related-posts-list .related-post-meta span:last-child {
    text-align: right;
}

.related-post-excerpt {
    color: var(--dark-gray);
    font-size: 0.9em;
    line-height: 1.4;
    margin-top: 10px;
}

.related-posts-list .related-post-excerpt {
    margin-top: 8px;
    font-size: 0.85em;
}



/* Copyright */
.site-footer .copyright {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 0.9em;
    color: var(--dark-gray);
    text-align: center;
    line-height: 1.5;
}

/* Hide default GeneratePress copyright if custom copyright is disabled */
.site-footer .copyright:empty {
    display: none;
}



/* Hide default GeneratePress footer text */
.site-info {
    display: none;
}

/* Ensure custom copyright displays properly */
.site-footer .copyright {
    margin: 0;
}

.site-footer .copyright a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer .copyright a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.copyright span {
    display: inline-block;
}

/* Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin: 20px 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .related-posts-list .related-post {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .related-posts-list .related-post-image {
        flex: 0 0 auto;
        width: 100%;
        height: 180px;
    }
    
    .related-posts-list .related-post-content {
        padding: 15px;
    }
    
    .toc-wrapper {
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0;
    }
    
    .site-footer .copyright {
        flex-direction: column;
        gap: 10px;
    }
    
    .reading-time {
        font-size: 0.8em;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .related-posts-title {
        font-size: 1.3em;
    }
    
    .toc-title {
        font-size: 1.1em;
    }
    

}