/*
Theme Name: Kaensista
Description: Custom WordPress theme dengan layout 70/30, hero section, dan sidebar lengkap
Version: 2.0
Author: Rent Kaendara
*/

/* RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

a {
    color: #007cba;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #005a87;
}

img {
    max-width: 100%;
    height: auto;
}

/* MAIN CONTAINER */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* HERO SECTION */
.hero-section {
    margin-bottom: 40px;
}

.hero-post {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    display: block;
}

.hero-image .no-image-placeholder {
    height: 600px;
    font-size: 4rem;
}

.hero-image .fallback-thumbnail {
    height: 600px;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 60px 40px 40px;
}

.hero-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255,255,255,0.9);
}

.hero-category {
    background: #007cba;
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 600;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-title a {
    color: white;
    text-decoration: none;
}

.hero-title a:hover {
    color: #00bcd4;
}

.hero-excerpt {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 20px;
    color: rgba(255,255,255,0.9);
}

.hero-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #007cba;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hero-read-more:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,124,186,0.3);
}

/* CONTENT WRAPPER - 70/30 LAYOUT */
.content-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.content-area {
    flex: 0 0 70%;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sidebar {
    flex: 0 0 30%;
    position: sticky;
    top: 20px;
}

/* POST LIST LAYOUT */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 40px;
}

.post-item {
    display: flex;
    gap: 20px;
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-color: #007cba;
}

.post-thumbnail {
    flex: 0 0 200px;
    position: relative;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-item:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-thumbnail .no-image-placeholder {
    width: 200px;
    height: 150px;
    font-size: 2rem;
}

.post-thumbnail .fallback-thumbnail {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.post-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #007cba;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.post-item:hover .post-category {
    background: #00bcd4;
    transform: scale(1.05);
}

.post-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
}

.post-title a {
    color: #333;
    text-decoration: none;
}

.post-title a:hover {
    color: #007cba;
}

.post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #666;
    flex-wrap: wrap;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 1; /* Cuma 1 baris */
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #007cba;
    font-weight: 600;
    font-size: 14px;
    align-self: flex-start;
}

.read-more:hover {
    color: #005a87;
}

/* VIDEO EMBED SECTION */
.video-embed-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    border: 2px dashed #007cba;
}

.video-embed-section h3 {
    color: #007cba;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.video-embed-section h3::before {
    content: '🎥';
    font-size: 1.5rem;
}

.featured-video {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

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

/* NO IMAGE PLACEHOLDER */
.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f2f5 0%, #e8ebf0 100%);
    color: #8a9ba8;
    border: 2px dashed #d1d9e0;
    border-radius: 8px;
}

.no-image-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
    opacity: 0.6;
}

.no-image-placeholder span {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* SINGLE POST LAYOUT */
.single-post {
    max-width: 100%;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 10px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #007cba;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb i {
    font-size: 12px;
    color: #999;
}

.breadcrumb span {
    color: #333;
    font-weight: 600;
}

.single-header {
    margin-bottom: 30px;
    text-align: center;
}

.single-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
}

.single-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.single-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
    color: #333;
}

.single-featured-image {
    margin: 30px 0;
    text-align: center;
}

.single-featured-image img {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.single-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    margin: 40px 0;
}

.single-content p {
    margin-bottom: 20px;
}

.single-content h1,
.single-content h2,
.single-content h3,
.single-content h4 {
    margin: 30px 0 15px;
    color: #333;
}

/* Single post video integration */
.single-content .video-embed {
    margin: 30px 0;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.single-content .video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.single-footer {
    border-top: 1px solid #eee;
    padding-top: 30px;
    margin-top: 40px;
}

.single-tags {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.single-tags i {
    color: #666;
}

.single-tags a {
    background: #f8f9fa;
    color: #666;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 14px;
    border: 1px solid #eee;
}

.single-tags a:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.single-share {
    display: flex;
    align-items: center;
    gap: 15px;
}

.single-share a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-facebook { background: #1877F2; }
.share-twitter { background: #1DA1F2; }
.share-whatsapp { background: #25D366; }

.single-share a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ARCHIVE PAGES */
.archive-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #007cba, #00bcd4);
    color: white;
    border-radius: 12px;
}

.archive-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.archive-description {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* PAGINATION */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.pagination {
    display: flex;
    list-style: none;
    gap: 8px;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination li a:hover,
.pagination li.active a {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.pagination li span {
    color: #999;
    border-color: transparent;
}

/* SIDEBAR STYLING */
.widget {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #007cba;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #00bcd4;
}

/* INFO MENARIK - POPULAR TAGS */
.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8f9fa;
    color: #666;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #eee;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tag-item:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
    transform: translateY(-2px);
}

.tag-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.tag-item:hover::before {
    left: 100%;
}

.tag-count {
    background: rgba(0,0,0,0.1);
    color: inherit;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.tag-item:hover .tag-count {
    background: rgba(255,255,255,0.2);
}

/* TRENDING POSTS */
.trending-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.trending-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 8px;
}

.trending-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.trending-number {
    width: 30px;
    height: 30px;
    background: #007cba;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.trending-content {
    flex: 1;
}

.trending-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
}

.trending-title a {
    color: #333;
}

.trending-title a:hover {
    color: #007cba;
}

.trending-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #666;
}

.trending-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* NO POSTS MESSAGE */
.no-posts-found {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

.no-posts-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #ccc;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .content-wrapper {
        flex-direction: column;
        gap: 30px;
    }
    
    .content-area {
        flex: none;
        width: 100%;
    }
    
    .sidebar {
        flex: none;
        width: 100%;
        position: static;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .single-title {
        font-size: 2rem;
    }
    
    .post-thumbnail {
        flex: 0 0 180px;
    }
    
    .post-thumbnail img,
    .post-thumbnail .no-image-placeholder,
    .post-thumbnail .fallback-thumbnail {
        height: 120px;
    }
    
    .video-embed-section {
        margin: 20px 0;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 15px;
    }
    
    .post-item {
        flex-direction: column;
    }
    
    .post-thumbnail {
        flex: none;
        width: 100%;
    }
    
    .post-thumbnail img,
    .post-thumbnail .no-image-placeholder,
    .post-thumbnail .fallback-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .hero-overlay {
        padding: 40px 20px 20px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .single-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .single-title {
        font-size: 1.8rem;
    }
    
    .content-area {
        padding: 20px;
    }
    
    .widget {
        padding: 20px;
    }
    
    .trending-item {
        gap: 12px;
    }
    
    .video-embed-section {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .hero-image img,
    .hero-image .no-image-placeholder,
    .hero-image .fallback-thumbnail {
        height: 300px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .single-title {
        font-size: 1.5rem;
    }
    
    .post-content {
        padding: 15px;
    }
    
    .single-share {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .post-thumbnail img,
    .post-thumbnail .no-image-placeholder,
    .post-thumbnail .fallback-thumbnail {
        height: 180px;
    }
}
@media (max-width: 768px) {
  /* Semua sub-menu dan sub-sub-menu jadi turun ke bawah, bukan ke kanan */
  .nav-menu,
  .nav-menu .sub-menu,
  .nav-menu .sub-sub-menu {
    position: static !important;
    top: auto !important;
    left: auto !important;
    min-width: 0 !important;
    box-shadow: none !important;
    border: none !important;
    padding-left: 0 !important;
    background: transparent !important;
    width: 100% !important;
  }
  .nav-menu .sub-menu,
  .nav-menu .sub-sub-menu {
    display: none;
    padding-left: 20px !important;
    background: transparent !important;
  }
  .menu-item-has-children.submenu-open > .sub-menu,
  .menu-item-has-children.submenu-open > .sub-sub-menu {
    display: block !important;
  }
  .menu-item-has-children > a,
  .menu-item-has-children .menu-item-has-children > a {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  /* Hilangkan animasi slide desktop */
  .nav-menu .sub-menu,
  .nav-menu .sub-sub-menu {
    animation: none !important;
  }
}
/* Simple Comment Styling */
#comments {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

#comments h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
    display: flex;
    gap: 15px;
}

.comment:last-child {
    border-bottom: none;
}

.comment .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.comment-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.comment-text p {
    margin: 0;
    line-height: 1.6;
    color: #444;
}

.reply {
    margin-left: 65px;
    border-left: 2px solid #f0f0f0;
    padding-left: 20px;
}

/* ==============================================
   SIMPLE COMMENT SYSTEM STYLING
   ============================================== */

#comments {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin: 40px 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    border-top: 3px solid #007cba;
}

#comments h3 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.4rem;
    font-weight: 700;
}

.commentlist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment {
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 0;
    display: flex;
    gap: 15px;
}

.comment:last-child {
    border-bottom: none;
}

.comment .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid #f0f0f0;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
    font-size: 1rem;
}

.comment-author a {
    color: #007cba;
    text-decoration: none;
}

.comment-author a:hover {
    text-decoration: underline;
}

.comment-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.comment-meta a {
    color: #007cba;
    text-decoration: none;
    margin-left: 10px;
}

.comment-text p {
    margin: 0;
    line-height: 1.6;
    color: #444;
}

/* Nested Comments */
.children {
    margin-left: 65px;
    border-left: 2px solid #f0f0f0;
    padding-left: 20px;
    margin-top: 15px;
}

/* Comment Form */
#respond {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
    border: 1px solid #e9ecef;
}

#reply-title {
    margin-top: 0;
    color: #333;
    font-size: 1.3rem;
    font-weight: 700;
}

.comment-form p {
    margin-bottom: 15px;
}

.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,124,186,0.1);
}

.comment-form textarea {
    height: 100px;
    resize: vertical;
}

.comment-form input[type="submit"] {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s ease;
}

.comment-form input[type="submit"]:hover {
    background: #005a87;
}

/* Comments Navigation */
.comment-navigation {
    margin: 20px 0;
    text-align: center;
}

.comment-navigation a {
    color: #007cba;
    text-decoration: none;
    padding: 8px 15px;
    border: 1px solid #007cba;
    border-radius: 4px;
    margin: 0 5px;
}

.comment-navigation a:hover {
    background: #007cba;
    color: white;
}

/* No Comments */
.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #comments {
        padding: 20px;
        margin: 20px 0;
    }
    
    .comment {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    
    .comment-content {
        text-align: left;
        width: 100%;
    }
    
    .children {
        margin-left: 20px;
        padding-left: 15px;
    }
    
    #respond {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .children {
        margin-left: 10px;
        padding-left: 10px;
    }
}

/* Force show YouTube iframes */
.video-wrapper iframe,
.video-responsive iframe,
.videoyoutube iframe {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 315px !important;
}

/* Remove any potential blocking styles */
.video-wrapper {
    display: block !important;
    visibility: visible !important;
}