/*
Theme Name: Black White Theme
Description: Template WordPress dengan background hitam, tulisan putih, ringan, SEO friendly, dan mobile friendly
Version: 1.0
Author: Your Name
*/

/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base Styles */
body {
    background-color: #000000 !important;
    color: #ffffff;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* HEADER - Background hitam polos TIDAK MELAYANG */
.site-header {
    background-color: #000000 !important;
    border-bottom: none;
    padding: 0;
    position: relative;
    width: 100%;
    top: 0;
    z-index: 1000;
}

/* Header Inner - SEJAJAR KIRI dan KANAN */
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    max-width: 720px;
    margin: 0 auto;
}

/* Site Title - SEJAJAR KIRI */
.site-title {
    text-align: left;
}

.site-title a {
    color: #ffffff;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

.site-title a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Navigation - SEJAJAR KANAN */
.main-navigation {
    text-align: right;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
}

.main-navigation li {
    margin-left: 30px;
}

.main-navigation a {
    color: #ffffff;
    text-decoration: none;
    padding: 8px 15px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    font-size: 16px;
    text-align: center;
}

.main-navigation a:hover {
    border: 1px solid #ffff00;
    background-color: rgba(255, 255, 0, 0.1);
    color: #ffff00;
}

/* Current Menu Item */
.main-navigation .current-menu-item a {
    border: 1px solid #ffff00;
    background-color: rgba(255, 255, 0, 0.05);
    color: #ffff00;
}

/* Main Content - DIUBAH: padding lebih kecil untuk naik ke atas */
.site-main {
    margin-top: 0;
    min-height: calc(100vh - 120px);
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 0;
    position: relative;
    z-index: 1;
}

/* Blog Content - DIUBAH: padding top dikurangi dan margin-top negatif */
.blog-content {
    max-width: 750px;
    margin: 0 auto;
    padding: 20px 20px 40px 20px;
    width: 100%;
    text-align: center;
    margin-top: -10px;
    position: relative;
    z-index: 1;
}

.blog-content .post {
    margin-bottom: 50px;
    padding: 40px;
    border: 1px solid #333;
    border-radius: 15px;
    background-color: #000000;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Outline halaman dengan sudut melengkung */
.blog-content,
.site-main,
.container {
    border-radius: 10px;
}

/* JUSTIFY TEXT FOR ALL CONTENT */
.blog-content .post-content {
    text-align: justify;
    font-size: 16px;
    line-height: 1.8;
    text-justify: inter-word;
    width: 100%;
    overflow-wrap: break-word;
}

.blog-content .post-content p {
    text-align: justify;
    margin-bottom: 15px;
    text-justify: inter-word;
    width: 100%;
}

.blog-content .post-content ul,
.blog-content .post-content ol {
    text-align: left;
    margin-left: 20px;
    margin-bottom: 15px;
    width: 100%;
}

.blog-content .post-content li {
    text-align: left;
    margin-bottom: 5px;
}

/* Breadcrumb Styles */
.breadcrumb {
    color: #cccccc;
    font-size: 14px;
    margin: 15px 0 25px 0;
    text-align: center;
    padding: 10px 0;
}

.breadcrumb a {
    color: #ffff00;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #666666;
}

.breadcrumb .current {
    color: #ffffff;
    font-weight: bold;
}

/* Pagination - CENTERED */
.pagination {
    text-align: center;
    margin: 40px 0;
}

.pagination .nav-links {
    display: inline-flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination .page-numbers {
    color: #ffffff;
    text-decoration: none;
    padding: 8px 15px;
    border: 1px solid #333;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: #000000;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    border-color: #ffff00;
    background-color: #ffff00;
    color: #000000;
}

/* FOOTER - Background hitam polos DENGAN MENU */
.site-footer {
    background-color: #000000 !important;
    border-top: none;
    padding: 40px 0 30px;
    text-align: center;
    margin-top: auto;
    border-radius: 10px 10px 0 0;
    position: relative;
    z-index: 2;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Footer Menu */
.footer-menu {
    margin-bottom: 25px;
}

.footer-menu-list {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.footer-menu-list li {
    margin: 0;
}

.footer-menu-list a {
    color: #ffffff;
    text-decoration: none;
    padding: 8px 15px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    font-size: 15px;
}

.footer-menu-list a:hover {
    border: 1px solid #ffff00;
    background-color: rgba(255, 255, 0, 0.1);
    color: #ffff00;
}

/* Footer Copyright */
.footer-copyright {
    border-top: 1px solid #333;
    padding-top: 20px;
    margin-top: 20px;
}

.footer-copyright p {
    margin: 5px 0;
    color: #cccccc;
    font-size: 14px;
}

/* TOMBOL - WARNA FFFF00 dengan HOVER OUTLINE KUNING */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border: 1px solid #ffff00;
    color: #000000 !important;
    text-decoration: none;
    background: #ffff00 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    margin: 20px auto 0;
    border-radius: 8px;
    font-weight: bold;
}

.btn:hover {
    background-color: transparent !important;
    color: #ffff00 !important;
    border-color: #ffff00;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 0, 0.3);
}

/* Tombol Read More - HOVER OUTLINE KUNING */
.read-more-btn {
    background: #ffff00 !important;
    color: #000000 !important;
    border: 1px solid #ffff00;
}

.read-more-btn:hover {
    background: transparent !important;
    color: #ffff00 !important;
    border-color: #ffff00;
}

/* Tombol Form - HOVER OUTLINE KUNING */
input[type="submit"],
button[type="submit"],
.wp-block-button__link {
    background: #ffff00 !important;
    color: #000000 !important;
    border: 1px solid #ffff00 !important;
    border-radius: 8px !important;
    padding: 12px 25px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-weight: bold !important;
}

input[type="submit"]:hover,
button[type="submit"]:hover,
.wp-block-button__link:hover {
    background: transparent !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
    transform: translateY(-2px);
}

/* Tombol Navigation - HOVER OUTLINE KUNING */
.comments-pagination a {
    background: #ffff00 !important;
    color: #000000 !important;
    border: 1px solid #ffff00 !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.comments-pagination a:hover {
    background: transparent !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
}

/* POST NAVIGATION - Previous & Next dengan Judul Post Only */
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    gap: 20px;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
}

.post-navigation .nav-previous {
    text-align: left;
}

.post-navigation .nav-next {
    text-align: right;
}

.post-navigation a {
    display: block;
    color: #ffff00 !important;
    text-decoration: none;
    font-weight: normal;
    padding: 0;
    border: none !important;
    background: transparent !important;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.post-navigation a:hover {
    color: #ffffff !important;
    transform: none;
    box-shadow: none;
    background: transparent !important;
}

/* Hanya judul postingan yang ditampilkan */
.post-navigation .post-title {
    display: block;
    font-size: 16px;
    font-weight: normal;
    color: #ffff00;
    line-height: 1.4;
    margin: 0;
    padding: 0;
}

.post-navigation a:hover .post-title {
    color: #ffffff;
}

/* Hilangkan label "Previous Post" dan "Next Post" */
.post-navigation .nav-label {
    display: none;
}

/* Mobile Responsive untuk Post Navigation */
@media (max-width: 768px) {
    .post-navigation {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .post-navigation .nav-previous,
    .post-navigation .nav-next {
        text-align: center;
        width: 100%;
    }
    
    .post-navigation .post-title {
        font-size: 15px;
    }
}

/* Pastikan tidak ada style tombol */
.post-navigation .btn,
.post-navigation input[type="submit"],
.post-navigation button {
    display: none !important;
}

/* Forms - CENTERED */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

input, textarea, select {
    background-color: #111111;
    border: 1px solid #333;
    color: #ffffff;
    padding: 12px;
    width: 100%;
    margin-bottom: 15px;
    text-align: left;
    border-radius: 8px;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #ffff00;
}

/* No Content Message - CENTERED */
.no-content {
    text-align: center;
    padding: 60px 20px;
}

.no-content h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.no-content p {
    text-align: center;
}

/* Comments - CENTERED */
.comments-area {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.comment-list {
    text-align: left;
}

.comment-form {
    text-align: left;
}

/* Widgets - CENTERED */
.widget-area {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.widget {
    margin-bottom: 30px;
}

.widget ul {
    text-align: left;
    display: inline-block;
}

/* GAMBAR FULL WIDTH 100% - FIXED */
.post-thumbnail img,
.wp-caption img,
.entry-content img,
.aligncenter img,
.alignleft img,
.alignright img,
.size-full img,
.size-large img,
.wp-post-image,
.attachment-post-thumbnail {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 20px 0;
    border-radius: 10px;
}

/* Container gambar full width */
.full-width-image {
    width: 100% !important;
    margin: 20px 0 !important;
    float: none !important;
}

/* Override alignment WordPress */
.alignleft,
.alignright,
.aligncenter {
    float: none !important;
    display: block !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: center !important;
    width: 100% !important;
}

/* Pastikan gambar di post content full width */
.entry-content img,
.post-content img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
}

/* Figure element untuk gambar */
figure {
    margin: 20px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

figure img {
    width: 100% !important;
    height: auto !important;
}

.wp-caption {
    width: 100% !important;
    max-width: 100% !important;
}

.wp-caption-text {
    text-align: center;
    font-style: italic;
    margin-top: 10px;
    color: #cccccc;
}

/* YouTube Video Styling - PERKECIL dan POSISI DI KIRI - FIXED */
.wp-block-embed-youtube,
.entry-content iframe[src*="youtube"],
.entry-content iframe[src*="youtu.be"],
.post-content iframe[src*="youtube"],
.post-content iframe[src*="youtu.be"] {
    width: 50% !important;
    max-width: 500px !important;
    height: 300px !important;
    float: left !important;
    margin: 10px 20px 20px 0 !important;
    border-radius: 10px;
    display: block;
    clear: both;
}

/* Container untuk YouTube video */
.youtube-container {
    width: 50% !important;
    max-width: 500px !important;
    float: left !important;
    margin: 10px 20px 20px 0 !important;
    clear: both;
}

.youtube-container iframe {
    width: 100% !important;
    height: 300px !important;
    border-radius: 10px;
}

/* Clear float setelah YouTube video */
.entry-content::after,
.post-content::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive untuk YouTube video */
@media (max-width: 768px) {
    .wp-block-embed-youtube,
    .entry-content iframe[src*="youtube"],
    .entry-content iframe[src*="youtu.be"],
    .post-content iframe[src*="youtube"],
    .post-content iframe[src*="youtu.be"],
    .youtube-container {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        margin: 10px 0 20px 0 !important;
        height: 250px !important;
    }
    
    .youtube-container iframe {
        height: 250px !important;
    }
}

@media (max-width: 480px) {
    .wp-block-embed-youtube,
    .entry-content iframe[src*="youtube"],
    .entry-content iframe[src*="youtu.be"],
    .post-content iframe[src*="youtube"],
    .post-content iframe[src*="youtu.be"],
    .youtube-container {
        height: 200px !important;
    }
    
    .youtube-container iframe {
        height: 200px !important;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-justify {
    text-align: justify;
    text-justify: inter-word;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.center-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: white;
    padding: 8px;
    z-index: 1000;
    text-decoration: none;
}

.skip-link:focus {
    top: 6px;
}

/* Ensure all text in main content is justified */
.entry-content {
    text-align: justify;
    width: 100%;
    overflow-wrap: break-word;
}

.entry-content p {
    text-align: justify;
    margin-bottom: 1.5em;
    width: 100%;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    text-align: center;
    margin: 30px 0 20px;
    width: 100%;
}

/* Link Styles */
a {
    color: #ffff00;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #ffffff;
}

/* Selection Color */
::selection {
    background: #ffff00;
    color: #000000;
}

::-moz-selection {
    background: #ffff00;
    color: #000000;
}

/* Performance Optimization Classes */
.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy.loaded {
    opacity: 1;
}

.focused {
    outline: 2px solid #ffff00;
    outline-offset: 2px;
}

/* FIX UNTUK MASALAH LAYOUT MENEMBUS */
/* Clearfix untuk mencegah float issues */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Container untuk mencegah konten menembus */
.content-container {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* STYLE TAMBAHAN UNTUK POSTINGAN LEBIH KE ATAS */
/* Untuk halaman single post */
.single-post .blog-content {
    padding: 15px 20px 40px 20px;
    margin-top: -15px;
}

/* Untuk halaman archive/daftar postingan */
.blog .blog-content,
.archive .blog-content {
    padding: 15px 20px 40px 20px;
    margin-top: -15px;
}

/* Untuk halaman home */
.home .blog-content {
    padding: 15px 20px 40px 20px;
    margin-top: -15px;
}

/* FIX UNTUK ELEMEN YANG MENEMBUS LAYOUT */
/* Pastikan semua elemen konten memiliki position relative */
.blog-content .post,
.entry-content,
.post-content {
    position: relative;
    z-index: 1;
}

/* Pastikan tidak ada overflow yang tidak diinginkan */
.blog-content,
.site-main,
.container {
    overflow: visible;
}

/* Fix untuk konten yang mungkin keluar dari container */
.post-content * {
    max-width: 100%;
}

/* Fix khusus untuk embed content */
.wp-embedded-content,
iframe {
    max-width: 100%;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        text-align: center;
        padding: 10px 0;
    }
    
    .site-title {
        text-align: center;
        margin-bottom: 15px;
    }
    
    .main-navigation {
        text-align: center;
        width: 100%;
    }
    
    .main-navigation ul {
        justify-content: center;
    }
    
    .main-navigation li {
        margin: 0 10px;
    }
    
    .main-navigation a {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .main-navigation a:hover {
        border-color: #ffff00;
        background-color: rgba(255, 255, 0, 0.1);
        color: #ffff00;
    }
    
    .site-main {
        margin-top: 0;
    }
    
    .blog-content {
        padding: 15px 15px 30px 15px;
        margin-top: -5px;
    }
    
    .blog-content .post {
        padding: 25px;
        border-radius: 12px;
    }
    
    .blog-content .post-title {
        font-size: 24px;
    }
    
    .blog-content .post-content {
        font-size: 15px;
        text-align: justify;
    }
    
    /* Breadcrumb Mobile */
    .breadcrumb {
        font-size: 13px;
        margin: 10px 0 20px 0;
    }
    
    /* Footer Menu Mobile */
    .footer-menu-list {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-menu-list a {
        display: block;
        padding: 10px;
    }
    
    /* Gambar tetap full width di mobile */
    .entry-content img,
    .post-content img,
    .post-thumbnail img {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Tombol mobile */
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .btn:hover {
        background: transparent !important;
        color: #ffff00 !important;
        border-color: #ffff00;
    }
    
    /* Style tambahan untuk mobile - postingan lebih ke atas */
    .single-post .blog-content,
    .blog .blog-content,
    .archive .blog-content,
    .home .blog-content {
        padding: 10px 15px 30px 15px;
        margin-top: -5px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .site-main {
        margin-top: 0;
    }
    
    .blog-content .post {
        padding: 20px;
        border-radius: 10px;
    }
    
    .blog-content .post-title {
        font-size: 20px;
    }
    
    .blog-content .post-content {
        font-size: 14px;
        text-align: justify;
    }
    
    .blog-content .post-content p {
        text-align: justify;
    }
    
    /* Breadcrumb Mobile Small */
    .breadcrumb {
        font-size: 12px;
    }
    
    /* Menu mobile */
    .main-navigation li {
        margin: 0 5px;
    }
    
    .main-navigation a {
        padding: 5px 8px;
        font-size: 13px;
    }
    
    .main-navigation a:hover {
        border-color: #ffff00;
        background-color: rgba(255, 255, 0, 0.1);
        color: #ffff00;
    }
    
    /* Footer Mobile */
    .footer-menu-list {
        gap: 10px;
    }
    
    .footer-menu-list a {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    /* Gambar mobile */
    .post-thumbnail img,
    .entry-content img {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Tombol mobile */
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .btn:hover {
        background: transparent !important;
        color: #ffff00 !important;
        border-color: #ffff00;
    }
    
    /* Style tambahan untuk mobile kecil - postingan lebih ke atas */
    .blog-content {
        padding: 10px 15px 25px 15px;
        margin-top: 0;
    }
    
    .single-post .blog-content,
    .blog .blog-content,
    .archive .blog-content,
    .home .blog-content {
        padding: 8px 15px 25px 15px;
        margin-top: 0;
    }
}

/* ADDITIONAL FIXES FOR LAYOUT ISSUES */
/* Pastikan konten tidak menembus footer */
.site-main {
    position: relative;
    z-index: 1;
}

/* Fix untuk elemen yang mungkin overlap */
.blog-content .post {
    position: relative;
    z-index: 1;
}

/* Clear float secara konsisten */
.post-content:after,
.entry-content:after {
    content: "";
    display: table;
    clear: both;
}

/* Pastikan YouTube embed tidak menembus */
.wp-block-embed-youtube {
    position: relative;
    z-index: 1;
}