/*
Theme Name: Kaweruh Jawa
Author: KJ
Author URI: 
Theme URI: 
Tags: full-site-editing, block-patterns
Text Domain: kaweruh-jawa
Requires at least: 6.4
Requires PHP: 7.4
Tested up to: 6.4
Version: 100.0

License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
/* Reset default styling untuk tabel di dalam .kw-post-content */
/* Styling untuk tabel */
.kw-post-content>table {
	width: 100%;
	border-collapse: collapse;
	font-family: Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.5;
	margin: 0;
}

/* Styling untuk header tabel */
.kw-post-content>table th {
	background: linear-gradient(to top, var(--wp--preset--color--contrast), var(--wp--preset--color--primary));
	color: #111;
	/* Teks hitam untuk kontras */
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 12px 15px;
	text-align: left;
	border-bottom: 1px solid #000;
	/* Garis batas tipis */
}

/* Styling untuk sel tabel */
.kw-post-content>table td {
	padding: 12px 15px;
	text-align: left;
	border-bottom: 1px solid #333;
	/* Garis batas lebih gelap */
}

/* Alternating row colors */
.kw-post-content>table tr:nth-child(even) {
	background-color: #222;
	/* Latar belakang abu-abu gelap untuk baris genap */
}

/* Hover effect */
.kw-post-content>table tr:hover {
	background-color: #333;
	/* Latar belakang sedikit lebih terang saat hover */
}

/* Responsive design */
@media (max-width: 768px) {
	.kw-post-content>table {
		display: block;
		overflow-x: auto;
	}

	.kw-post-content>table th,
	.kw-post-content>table td {
		white-space: nowrap;
	}
}

.kw-post-content h1,
.kw-post-content h2,
.kw-post-content h3,
.kw-post-content h4,
.kw-post-content h5,
.kw-post-content h6 {
	color: var(--wp--preset--color--contrast);
	margin: 0 0 0.5em;
	font-weight: 700;
	line-height: 1.2;
}

.kw-post-content h1 {
	font-size: 2.5rem;
}

.kw-post-content h2 {
	font-size: 2rem;
}

.kw-post-content h3 {
	font-size: 1.75rem;
}

.kw-post-content h4 {
	font-size: 1.5rem;
}

.kw-post-content h5 {
	font-size: 1.25rem;
}

.kw-post-content h6 {
	font-size: 1rem;
}

.kw-post-content p {
	font-size: 18px;
	margin: 0 0 1em;
	max-width: 65ch;
	/* Optimal line length for readability */
}
/* Lists */
.kw-post-content ul,
.kw-post-content ol {
    margin: 0 0 1em;
    padding-left: 1.5em;
}

.kw-post-content li {
    font-size: 18px;
    margin-bottom: 0.5em;
}

/* Styling untuk numbered list - main questions */
.kw-post-content ol {
    list-style: none;
    counter-reset: item;
    padding-left: 20px;
}

.kw-post-content ol > li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 8px;
    counter-increment: item;
}

.kw-post-content ol > li::before {
    content: counter(item) ".";
    position: absolute;
    left: 0;
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(to right, #ffd700, #ff8c00);
    -webkit-background-clip: text;
    color: transparent;
}

/* Styling untuk bullet list - answers */
.kw-post-content ul {
    list-style: none;
    padding-left: 20px;
    margin-top: 5px;
    margin-bottom: 15px;
}

.kw-post-content li ul {
    margin-top: 5px;
    padding-left: 0; /* Remove extra padding for nested lists */
}

.kw-post-content ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
}

.kw-post-content ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    font-size: 24px;
    line-height: 1;
    background: linear-gradient(to right, #ffd700, #ff8c00);
    -webkit-background-clip: text;
    color: transparent;
}

/* Fix for nested lists - prevent counter incrementation for nested ul */
.kw-post-content ol ol {
    counter-reset: nested-item;
}

.kw-post-content ol ul {
    counter-reset: none;
}

.kw-post-content ol > li > ul > li {
    counter-increment: none;
}

.kw-post-content ol > li > ul > li::before {
    content: "•"; /* Ensure bullets for nested ul */
}

/* Code blocks */
.kw-post-content>pre,
.kw-post-content>code {
	font-family: var(--font-mono);
	font-size: 0.9em;
}

.kw-post-content>pre {
	overflow-x: auto;
	padding: 1em;
	background: #f5f5f5;
	border-radius: 4px;
}

/* Text elements */
.kw-post-content>strong {
	font-weight: 700;
}

.kw-post-content>em {
	font-style: italic;
}

.kw-post-content>small {
	font-size: 0.8em;
}

.kw-post-content>blockquote {
	font-size: 20px;
	font-weight: 500;
	margin: 0 0 0em;
	padding: 0.6em;
	/* Menambahkan padding agar konten tidak terlalu dekat dengan border */
	font-style: italic;
	color: var(--wp--preset--color--contrast);
	position: relative;
}

.kw-post-content>blockquote::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: 6px;
	/* Lebar dari border gradient */
	background: linear-gradient(to right, var(--wp--preset--color--contrast), #111);
	/* Gradient emas */
	border-radius: 8px;
	/* Radius hanya pada sisi kiri */
}
hr {
    margin-bottom: 1.5em;
}

.kw-post-content {
	margin: 0.5em;
	max-width: 65ch;
	/* Optimal line length for readability */
}

html {
	scroll-behavior: smooth;
}

@media screen and (prefers-reduced-motion: reduce) {

	html {
		scroll-behavior: auto;
		background-color: var(--wp--preset--color--base);
	}

	* {
		background-color: var(--wp--preset--color--base);
	}
}

html {
	position: relative;
	max-width: 1400px;
	margin: 0 auto;
	border: 2.5px solid #000;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	background-color: #fff;
	z-index: 0;
}

html::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background-image: url('assets/patterns/circle-wave.svg?v=1');
	background-position: top right;
	background-size: 2820px;
	background-repeat: no-repeat;
	pointer-events: none;
	z-index: -1;
	background-color: var(--wp--preset--color--base);
}

body {

	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
	background-image: url('assets/patterns/batik-desktop.png');
	background-repeat: repeat-y;
	background-size: 100% auto;
	background-position: top center;

	/* Biar transparan, supaya bg di html tetap kelihatan */
	background-color: transparent;
}

@media screen and (max-width: 768px) {
	body {
		background-image: url('assets/patterns/batik-mobile.png');
	}
}

.container {
	/* max-width: 1000px; */
	margin: 0 auto;
}

.space-y-16 {
	display: flex;
	flex-direction: column;
	gap: 64px;
	padding: 32px 0;
}

.p-2 {
	padding: 8px;
}

.p-3 {
	padding: 10px;
}

.p-6 {
	padding: 24px;
}

.max-w-4xl {
	max-width: 896px;
}

.mx-auto {
	margin-left: auto;
	margin-right: auto;
}

.mb-8 {
	margin-bottom: 16px;
}

.mt-8 {
	margin-top: 32px;
}

.flex {
	display: flex;
}

.justify-between {
	justify-content: space-between;
}

.justify-center {
	justify-content: center;
}

.items-center {
	align-items: center;
}

.w-full {
	width: 100%;
}

.flex-1 {
	flex: 1;
}

.ml-4 {
	margin-left: 16px;
}

.px-6 {
	padding-left: 18px;
	padding-right: 18px;
}

.py-4 {
	padding-top: 10px;
	padding-bottom: 10px;
}

.py-3 {
	padding-top: 7px;
	padding-bottom: 7px;
}

.px-4 {
	padding-left: 12px;
	padding-right: 12px;
}

.px-3 {
	padding-left: 8px;
	padding-right: 8px;
}

.p-4 {
	padding: 16px;
}

.bg-gold {
	background-color: #D4AF37;
}

.bg-dark {
	background-color: #111;
}

.border-gold {
	border: 1.8px solid #D4AF37;
}

.border-l-0 {
	border-left: 0;
}

.rounded-lg {
	border-radius: 8px;
}

.rounded-l-lg {
	border-top-left-radius: 8px;
	border-bottom-left-radius: 8px;
}

.rounded-r-lg {
	border-top-right-radius: 8px;
	border-bottom-right-radius: 8px;
}

.text-gold {
	color: #D4AF37;
}

.text-black {
	color: #000 !important;
}

.text-4xl {
	font-size: 18px;
}

.text-2xl {
	font-size: 12px;
}

.text-xl {
	font-size: 10px;
}

.font-extrabold {
	font-weight: 800;
}

.font-bold {
	font-weight: 700;
}

.shadow-lg {
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.title {
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.overflow-hidden {
	overflow: hidden;
}

/* Custom select styling */
.select-wrapper {
	position: relative;
	display: flex;
	align-items: center;
}

select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-color: transparent;
	border: none;
	color: #D4AF37;
	font-size: 10px;
	font-weight: 700;
	padding-left: 12px;
	cursor: pointer;
	outline: none;
}

select option {
	background-color: #111;
	color: #D4AF37;
}

.chevron-down {
	width: 12px !important;
	position: absolute;
	pointer-events: none;
}

.check-button {
	cursor: pointer;
	background-image: url('assets/patterns/texture-active-tab.svg');
	background-size: cover;
	/* atau contain tergantung kebutuhan */
	background-repeat: no-repeat;
	background-position: center;
}

.check-button>span {
	color: #000;
}

.check-button:hover {
	opacity: 0.9;
}

#svg-container {
	width: 100%;
	position: relative;
}

#main-svg,
#main-svg-mobile {
	width: 100%;
	height: auto;
	display: block;
}

/* Tampilkan hanya SVG desktop */
#main-svg-mobile {
	display: none;
}

@media screen and (max-width: 768px) {

	/* Untuk mobile */
	#main-svg {
		display: none;
	}

	#main-svg-mobile {
		display: block;
	}
}

.truncate {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.truncate-tgl {
	width: max-content;
}

@media screen and (max-width: 768px) {
	.truncate-tgl {
		width: 70px;
	}
}




.kaweruh-footer {
	background-image: url('assets/patterns/circle-wave.svg?v=1');
	background-position: center center;
	background-attachment: inherit;
	background-size: 2820px;
	background-repeat: no-repeat;

	background-color: var(--wp--preset--color--base);
	padding: 20px;
	text-align: center;
	border-top: 5px solid var(--wp--preset--color--primary);
}

@media screen and (max-width: 768px) {
	.kaweruh-footer {
		background-position: left center;
	}
}

.footer-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	max-width: 90%;
	margin: 0 auto;
}

.footer-main {
	color: var(--wp--preset--color--contrast);
	font-weight: bold;
	font-size: 20px;
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	justify-content: center;
}

.footer-links a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	font-size: 14px;
	transition: color 0.3s ease;
}

.footer-links a:hover {
	text-decoration: underline;
	color: var(--wp--preset--color--primary);
}

/* Responsif untuk layar lebih besar */
@media (min-width: 600px) {
	.footer-content {
		flex-direction: row;
		justify-content: space-between;
		width: 80%;
	}

	.footer-links {
		justify-content: flex-end;
	}
}


/* Update the menu-pages positioning for better desktop display */
.menu-pagesz {
	font-size: 14px;
	display: none;
	position: absolute;
	top: 50px;
	right: 20px;
	background: #333;
	padding: 10px;
	border-radius: 5px;
	z-index: 10;
	min-width: 170px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.menu-pagesz ul {
	list-style: none;
}

.menu-pagesz ul li {
	padding: 6px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-pagesz ul li:last-child {
	border-bottom: none;
}

.menu-pagesz a {
	color: white;
	text-decoration: none;
	display: block;
	transition: color 0.3s;
}

.menu-pagesz a:hover {
	color: #b8860b;
}

.menu-pagesz.active {
	display: block;
}

/* Main layout */
.content-with-sidebar {
	margin-top: 12px;
}

/* Post grid styling */
.kaweruh-post-grid-container {
	padding: 25px 0;
}

.kaweruh-post-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0px;
}

@media (min-width: 600px) {
	.kaweruh-post-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 30px;
	}
}

.kaweruh-post-item {
	position: relative;
	overflow: hidden;
	background-color: transparent;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
	backdrop-filter: blur(10px);
	border: 2px solid rgba(212, 175, 55, 0.3);
	-webkit-backdrop-filter: blur(10px);
	/* Opsional: Menambahkan sudut melengkung */
	transition: all 0.3s ease;
}

.kaweruh-post-item:hover {
	transform: scale(1.05);
	/* Efek hover opsional */
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
	/* Bayangan lebih tebal saat hover */
}


.kaweruh-post-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
	border-color: rgba(212, 175, 55, 0.8);
}



.post-category {
	position: absolute;
	top: 15px;
	left: 15px;
	z-index: 10;
}

.post-category-badge a {
	display: inline-block;
	background-color: #d4af37;
	color: #000;
	padding: 5px 10px;
	font-size: 12px;
	font-weight: bold;
	text-transform: uppercase;
	border-radius: 4px;
	text-decoration: none;
}

.post-featured-image {
	height: 200px;
	overflow: hidden;
}

.post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.kaweruh-post-item:hover .post-featured-image img {
	transform: scale(1.05);
}

.post-content {
	padding: 20px;
	background: transparent;
	color: #e0e0e0;
}

.post-title {
	margin-top: 0;
	margin-bottom: 10px;
}

.post-title a {
	color: #d4af37;
	text-decoration: none;
	font-size: 20px;
	font-weight: bold;
	transition: color 0.3s ease;
}

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

.post-excerpt {
	font-size: 14px;
	line-height: 1.5;
	margin-bottom: 15px;
	color: #ccc;
}

.post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	font-size: 12px;
	color: #999;
	border-top: 1px solid rgba(212, 175, 55, 0.2);
	padding-top: 15px;
}

.post-author,
.post-date,
.post-comments {
	display: flex;
	align-items: center;
}


.kaweruh-pagination {
	display: flex !important;
	justify-content: center !important;
	align-items: center !important;
	gap: 8px !important;
	font-family: 'Poppins', sans-serif !important;
	flex-wrap: wrap !important;
	margin: 2rem auto !important;
	padding: 0 !important;
}

.kaweruh-pagination .page-numbers,
.kaweruh-pagination .pagination-prev,
.kaweruh-pagination .pagination-next {
	font-weight: bold !important;
	background-color: #111 !important;
	padding: 8px 12px !important;
	border-radius: 6px !important;
	font-size: 15px !important;
	border: 1.5px solid #000 !important;
	color: var(--wp--preset--color--primary) !important;
	text-decoration: none !important;
	transition: all 0.3s ease !important;
}

.kaweruh-pagination .page-numbers:hover,
.kaweruh-pagination .pagination-prev:hover,
.kaweruh-pagination .pagination-next:hover {
	background-image: url('/wp-content/themes/kaweruh-jawa/assets/patterns/texture-active-tab.svg') !important;
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center;
	color: #111 !important;
	border-color: var(--wp--preset--color--primary) !important;
}

.kaweruh-pagination .page-numbers.current {
	background-image: url('/wp-content/themes/kaweruh-jawa/assets/patterns/texture-active-tab.svg') !important;
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center;
	color: #111 !important;
	font-weight: bold !important;
	cursor: default !important;
	border-color: var(--wp--preset--color--primary) !important;
}

.kaweruh-pagination .pagination-numbers {
	display: flex !important;
	gap: 6px !important;
}

.kaweruh-pagination .wp-block-query-pagination-next,
.kaweruh-pagination .wp-block-query-pagination-previous {
	display: flex !important;
	align-items: center !important;
}

.kaweruh-pagination .wp-block-query-pagination-next-arrow,
.kaweruh-pagination .wp-block-query-pagination-previous-arrow {
	margin-left: 6px !important;
}


/* No results styling */
.no-results {
	text-align: center;
	padding: 30px;
	background-color: #111;
	border: 1px solid rgba(212, 175, 55, 0.3);
	color: #d4af37;
	border-radius: 8px;
}

/* Sidebar Styling */
.kaweruh-sidebar {
	max-width: 95% !important;
	margin: 0 auto !important;

}

.sidebar-search {
	margin-bottom: 30px;
}

.sidebar-search-form input[type="search"] {
	background-color: #111;
	border: 1.5px solid #000;
	border-radius: 4px;
	padding: 10px;
	color: #e0e0e0;
	width: 100%;
	font-size: 16px !important;
}

.sidebar-search-form button {
	background-image: url('/wp-content/themes/kaweruh-jawa/assets/patterns/texture-active-tab.svg');
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center;
	color: #000;
	border: none;
	padding: 8px 15px;
	border-radius: 4px;
	font-weight: bold;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.sidebar-search-form button:hover {
	background-color: #e8c353;
}

.popular-posts {
	margin-top: 30px;
}

.popular-posts-list {
	margin-top: 0px !important;
}

.popular-post-item {
	display: flex;
	align-items: baseline;
	margin-bottom: 15px;
	padding-bottom: 15px;
	border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.popular-post-bullet {
	color: #d4af37;
	font-size: 24px;
	margin-right: 10px;
	line-height: 1;
}

.popular-post-title {
	margin: 0;
	font-size: 12px !important;
	font-weight: normal;
}

.popular-post-title a {
	color: #e0e0e0;
	text-decoration: none;
	transition: color 0.3s ease;
}

.popular-post-title a:hover {
	color: #d4af37;
}

/* Responsive adjustments */
@media (max-width: 781px) {
	.content-with-sidebar {
		flex-direction: column;
	}

	.main-content,
	.kaweruh-sidebar {
		flex-basis: 100% !important;
	}

	.kaweruh-sidebar {
		margin-top: 30px !important;
	}
}

/* Kaweruh Theme Responsive Media Styles */
.kw-main-container {
	width: 100% !important;
	/* overflow-x: hidden !important; */
}

/* Make all images in content responsive */
.kw-media-wrapper img,
.kw-featured-image img,
.kw-post-content img {
	max-width: 100% !important;
	height: auto !important;
	display: block !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* YouTube iframe containers */
.kw-post-content .wp-block-embed,
.kw-post-content .wp-embed-responsive {
	position: relative !important;
	width: 100% !important;
	max-width: 100% !important;
	margin-bottom: 1.5rem !important;
}

/* All iframes */
.kw-post-content iframe {
	max-width: 100% !important;
}

/* Make YouTube iframes responsive - use aspect ratio container */
.kw-post-content .wp-block-embed__wrapper {
	position: relative !important;
	width: 100% !important;
	height: 0 !important;
	padding-bottom: 56.25% !important;
	/* 16:9 Aspect Ratio */
	overflow: hidden !important;
}

.kw-post-content .wp-block-embed__wrapper iframe {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
}

/* Post header styling */
.kw-post-header {
	color: var(--wp--preset--color--primary);
	margin-bottom: 1rem !important;
}

.kw-post-title {
	font-weight: bold !important;
	line-height: 1.2 !important;
	margin-bottom: 0.5rem !important;
}

/* Mobile responsiveness */
@media (max-width: 781px) {
	.kw-content-with-sidebar {
		flex-direction: column !important;
	}

	.kw-main-content {
		flex-basis: 100% !important;
		width: 100% !important;
	}

	.kw-post-title {
		font-size: 1.8rem !important;
	}

	.kw-meta-container {
		flex-direction: column !important;
		align-items: flex-start !important;
	}

	.kw-post-date {
		margin-top: 0.5rem !important;
	}
}

/* Small screens */
@media (max-width: 599px) {
	.kw-post-title {
		font-size: 1.5rem !important;
	}

	.kw-post-header {
		padding: 15px !important;
	}

	.kw-featured-image {
		margin-bottom: 1rem !important;
	}
}

/* Fix for WordPress default blocks */
.kw-post-content>* {
	max-width: 100% !important;
}

/* Ensure video blocks are responsive */
.kw-post-content .wp-block-video video {
	width: 100% !important;
	height: auto !important;
}

/* Table responsiveness */
.kw-post-content table {
	width: 100% !important;
	overflow-x: auto !important;
	display: block !important;
}

/* Ensure images don't overflow */
.kw-post-content figure {
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* Audio blocks */
.kw-post-content .wp-block-audio audio {
	width: 100% !important;
}

.kw-tags-container{
	padding: 12px;
}

.share-section-post {
    display: flex;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
}

.share-title-post {
    margin: 0 15px 0 0;
    font-size: 16px;
    font-weight: bolder;
    color: var(--wp--preset--color--primary);
}

.share-buttons-post {
    display: flex;
    gap: 10px;
}

.share-button-post {
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    color: #111;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    background-image: url('/wp-content/themes/kaweruh-jawa/assets/patterns/texture-active-tab.svg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    border: 1px solid var(--wp--preset--color--primary);
}

.share-button-post:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Social media specific styles */
.facebook-share-post:hover {
    border-color: #3b5998;
}

.twitter-share-post:hover {
    border-color: #1da1f2;
}

.whatsapp-share-post:hover {
    border-color: #25d366;
}



.post-category-badge {
    margin-bottom: 10px;
    display: block;
}

.post-category-badge a {
    display: inline-block;
    background-color: var(--wp--preset--color--primary);
    color: #111;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    text-decoration: none;
    margin-right: 5px;
    margin-bottom: 5px;
}

.post-category-badge a:hover {
    opacity: 0.9;
}