/*
Theme Name: Astra DIY Electronics
Theme URI: https://duwiarsana.com
Author: Duwi Arsana
Author URI: https://duwiarsana.com
Description: Child theme Astra untuk blog DIY elektronika & IoT - dark header, tech colors, code-friendly.
Template: astra
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astra-diy-electronics
*/

/* ===== ROOT VARIABLES - TECH COLOR SCHEME ===== */
:root {
	--diy-primary: #00a8e8;
	--diy-primary-dark: #0077b6;
	--diy-accent: #ff6b35;
	--diy-dark: #0d1b2a;
	--diy-dark-2: #1b263b;
	--diy-dark-3: #2d3e5f;
	--diy-green: #06d6a0;
	--diy-bg: #f8f9fa;
	--diy-text: #2d3436;
	--diy-text-light: #636e72;
	--diy-border: #e1e8ed;
	--diy-code-bg: #1e1e2e;
	--diy-code-text: #cdd6f4;
}

/* ===== GLOBAL ===== */
body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--diy-text);
	background-color: var(--diy-bg);
}

a {
	color: var(--diy-primary);
	transition: color 0.2s ease;
}

a:hover {
	color: var(--diy-accent);
}

h1, h2, h3, h4, h5, h6 {
	font-weight: 700;
	color: var(--diy-dark);
	letter-spacing: -0.02em;
}

/* ===== HEADER - DARK TECH BAR ===== */
.site-header,
.ast-site-header,
.ast-primary-header-bar,
.main-header-bar,
.ast-desktop-header-content {
	background: var(--diy-dark) !important;
	background-color: var(--diy-dark) !important;
	border-bottom: 3px solid var(--diy-primary) !important;
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.site-header a,
.ast-site-header a,
.main-header-menu a,
.main-header-menu .menu-link,
.site-branding .site-title a,
.site-branding .site-title,
.ast-site-header .site-title,
.ast-site-header .site-title a {
	color: #fff !important;
}

.site-header a:hover,
.main-header-menu a:hover,
.main-header-menu .menu-link:hover,
.main-header-menu .current-menu-item > a,
.main-header-menu .current-menu-item > .menu-link {
	color: var(--diy-primary) !important;
}

.main-header-menu .sub-menu,
.main-header-menu .sub-menu .menu-link {
	background: var(--diy-dark-2) !important;
	color: #cbd5e0 !important;
}

.main-header-menu .sub-menu a:hover,
.main-header-menu .sub-menu .menu-link:hover {
	background: var(--diy-dark-3) !important;
	color: var(--diy-primary) !important;
}

/* Mobile header */
.ast-mobile-header-wrap,
.ast-mobile-header-content,
.ast-mobile-popup-drawer.active .ast-mobile-popup-inner {
	background: var(--diy-dark) !important;
	background-color: var(--diy-dark) !important;
}

.ast-mobile-header-wrap .menu-link,
.ast-mobile-header-content .menu-link,
.ast-mobile-menu-trigger-minimal,
.ast-menu-toggle {
	color: #fff !important;
}

/* Header search */
.ast-header-search .astra-search-icon:hover,
.ast-search-menu-icon:hover .search-icon {
	color: var(--diy-accent) !important;
}

.ast-header-search .search-field,
.ast-search-menu .search-field {
	background: var(--diy-dark-2) !important;
	border-color: var(--diy-dark-3) !important;
	color: #fff !important;
}

/* ===== BLOG POSTS - CARD STYLE ===== */
.ast-article-post {
	background: #fff;
	border-radius: 12px;
	border: 1px solid var(--diy-border);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	overflow: hidden;
	margin-bottom: 24px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ast-article-post:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.ast-article-post .ast-blog-featured-section {
	margin-bottom: 0;
}

.ast-article-post .post-thumb-img-content img {
	width: 100%;
	height: 220px;
	object-fit: cover;
}

.ast-article-post .entry-header {
	padding: 20px 20px 0;
}

.ast-article-post .entry-content {
	padding: 0 20px 20px;
}

.ast-article-post .entry-meta {
	padding: 12px 20px;
	background: var(--diy-bg);
	border-top: 1px solid var(--diy-border);
	margin: 0;
}

.entry-title,
.entry-title a {
	color: var(--diy-dark) !important;
	font-weight: 700;
	line-height: 1.3;
}

.entry-title a:hover {
	color: var(--diy-primary) !important;
}

/* Category badge */
.entry-meta .cat-links a {
	display: inline-block;
	background: var(--diy-primary);
	color: #fff !important;
	padding: 3px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	text-decoration: none;
}

.entry-meta .cat-links a:hover {
	background: var(--diy-accent);
}

/* Read more button */
.ast-read-more-button {
	background: var(--diy-primary) !important;
	color: #fff !important;
	padding: 8px 20px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 14px;
	border: none;
	transition: background 0.2s ease, transform 0.2s ease;
}

.ast-read-more-button:hover {
	background: var(--diy-accent) !important;
	transform: translateX(4px);
}

/* ===== SINGLE POST ===== */
.single .ast-article-single {
	background: #fff;
	border-radius: 12px;
	border: 1px solid var(--diy-border);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	padding: 32px;
}

.single .entry-header {
	margin-bottom: 24px;
	padding-bottom: 20px;
	border-bottom: 2px solid var(--diy-border);
}

.single .entry-title {
	font-size: 2rem;
	line-height: 1.2;
}

.single .post-thumb-img-content {
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 24px;
}

/* Featured image in single */
.single .post-thumb-img-content img {
	width: 100%;
	max-height: 400px;
	object-fit: cover;
	border-radius: 8px;
}

/* ===== CODE BLOCKS - DARK THEME ===== */
pre,
.wp-block-code,
.highlighting-code-block,
.hcb-wrap {
	background: var(--diy-code-bg) !important;
	border-radius: 8px !important;
	border: 1px solid var(--diy-dark-3) !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

pre code,
.wp-block-code code,
.hcb-wrap code {
	font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace !important;
	font-size: 14px !important;
	color: var(--diy-code-text) !important;
	line-height: 1.6 !important;
}

/* Inline code */
:not(pre) > code,
:not(pre) > code[class*="language-"] {
	background: var(--diy-dark-2);
	color: var(--diy-green);
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.9em;
	font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ===== BLOCKQUOTES ===== */
blockquote,
.wp-block-quote {
	border-left: 4px solid var(--diy-primary);
	background: #f0f7ff;
	padding: 16px 20px;
	border-radius: 0 8px 8px 0;
	font-style: italic;
	color: var(--diy-text-light);
}

blockquote p {
	margin: 0;
}

/* ===== BUTTONS ===== */
.wp-block-button .wp-block-button__link,
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
	background: var(--diy-primary);
	color: #fff;
	border: none;
	padding: 10px 24px;
	border-radius: 6px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.wp-block-button .wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover {
	background: var(--diy-primary-dark);
	transform: translateY(-2px);
}

/* ===== SIDEBAR WIDGETS ===== */
#secondary .widget {
	background: #fff;
	border-radius: 10px;
	border: 1px solid var(--diy-border);
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

#secondary .widget-title {
	font-size: 1.1rem;
	color: var(--diy-dark);
	border-bottom: 2px solid var(--diy-primary);
	padding-bottom: 10px;
	margin-bottom: 16px;
}

#secondary .widget ul li {
	border-bottom: 1px solid var(--diy-border);
	padding: 8px 0;
}

#secondary .widget ul li:last-child {
	border-bottom: none;
}

#secondary .widget ul li a {
	color: var(--diy-text);
}

#secondary .widget ul li a:hover {
	color: var(--diy-primary);
}

/* ===== FOOTER - DARK ===== */
.site-footer,
.ast-footer,
.ast-footer-copyright,
.site-footer .ast-container,
#colophon,
.ast-hfb-header .site-footer {
	background: var(--diy-dark) !important;
	background-color: var(--diy-dark) !important;
	color: #a0aec0 !important;
	border-top: 3px solid var(--diy-primary);
}

.site-footer a,
.ast-footer a,
.ast-footer-copyright a,
.site-footer .widget a {
	color: #cbd5e0 !important;
}

.site-footer a:hover,
.ast-footer a:hover,
.ast-footer-copyright a:hover {
	color: var(--diy-primary) !important;
}

.site-footer .widget-title,
.site-footer h1,
.site-footer h2,
.site-footer h3 {
	color: #fff;
}

.ast-footer-advance,
.ast-builder-grid-row-container.site-footer-focus-item {
	background: var(--diy-dark-2) !important;
	background-color: var(--diy-dark-2) !important;
}

/* Copyright bar */
.ast-footer-copyright,
.ast-hfb-header .ast-footer-copyright {
	background: var(--diy-dark) !important;
	background-color: var(--diy-dark) !important;
	border-top: 1px solid var(--diy-dark-3);
	padding: 12px 0;
}

.ast-footer-copyright,
.ast-footer-copyright .ast-footer-copyright-text {
	color: #a0aec0 !important;
	font-size: 14px;
}

/* ===== PAGINATION ===== */
.ast-pagination,
.pagination {
	margin-top: 32px;
}

.ast-pagination .page-numbers,
.pagination .page-numbers {
	background: #fff;
	border: 1px solid var(--diy-border);
	padding: 8px 14px;
	border-radius: 6px;
	color: var(--diy-text);
	transition: all 0.2s ease;
}

.ast-pagination .page-numbers.current,
.ast-pagination .page-numbers:hover {
	background: var(--diy-primary);
	color: #fff;
	border-color: var(--diy-primary);
}

/* ===== SEARCH FORM ===== */
.search-form .search-field,
.ast-search-menu .search-field {
	border: 2px solid var(--diy-border);
	border-radius: 6px;
	padding: 8px 12px;
	transition: border 0.2s ease;
}

.search-form .search-field:focus {
	border-color: var(--diy-primary);
	outline: none;
}

/* ===== SCROLL TO TOP ===== */
#scroll-up,
.ast-scroll-to-top {
	background: var(--diy-primary) !important;
	border-radius: 50% !important;
	width: 44px !important;
	height: 44px !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	bottom: 24px !important;
	right: 24px !important;
	box-shadow: 0 4px 12px rgba(0, 168, 232, 0.4) !important;
}

#scroll-up:hover,
.ast-scroll-to-top:hover {
	background: var(--diy-accent) !important;
}

/* ===== IMAGES - RESPONSIVE ===== */
.wp-post-image,
.entry-content img {
	border-radius: 8px;
	max-width: 100%;
	height: auto;
}

.entry-content img {
	margin: 16px 0;
}

/* ===== TABLES ===== */
.entry-content table {
	border-collapse: collapse;
	width: 100%;
	border-radius: 8px;
	overflow: hidden;
}

.entry-content table th {
	background: var(--diy-dark);
	color: #fff;
	padding: 12px;
	text-align: left;
}

.entry-content table td {
	padding: 12px;
	border-bottom: 1px solid var(--diy-border);
}

.entry-content table tr:nth-child(even) {
	background: var(--diy-bg);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
	.single .entry-title {
		font-size: 1.5rem;
	}

	.ast-article-post .post-thumb-img-content img {
		height: 180px;
	}

	.ast-article-post .entry-header,
	.ast-article-post .entry-content,
	.ast-article-post .entry-meta {
		padding-left: 16px;
		padding-right: 16px;
	}
}

/* ===== UTILITY ===== */
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }

/* ===== FRONT PAGE HERO SECTION ===== */
.diy-hero-section {
	background-color: var(--diy-dark);
	background-image: radial-gradient(circle at 80% 20%, var(--diy-dark-3) 0%, transparent 40%),
					  radial-gradient(circle at 20% 80%, rgba(0, 168, 232, 0.15) 0%, transparent 40%);
	padding: 80px 0 100px;
	border-bottom: 4px solid var(--diy-primary);
	color: #fff;
	overflow: hidden;
	position: relative;
}

.diy-hero-section .ast-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
}

.diy-hero-content {
	flex: 1;
	max-width: 600px;
}

.diy-hero-title {
	font-size: 3.5rem;
	font-weight: 800;
	color: #fff;
	margin-bottom: 10px;
	line-height: 1.2;
}

.diy-hero-title .text-neon {
	color: var(--diy-primary);
	text-shadow: 0 0 15px rgba(0, 168, 232, 0.5);
}

.diy-hero-subtitle {
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--diy-green);
	margin-bottom: 20px;
	text-transform: uppercase;
	letter-spacing: 2px;
}

.diy-hero-desc {
	font-size: 1.125rem;
	color: #cbd5e0;
	margin-bottom: 32px;
	line-height: 1.7;
}

.diy-hero-cta {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.diy-btn {
	display: inline-block;
	padding: 12px 28px;
	border-radius: 8px;
	font-weight: 700;
	font-size: 1rem;
	text-decoration: none !important;
	transition: all 0.3s ease;
	text-align: center;
}

.diy-btn-primary {
	background: var(--diy-primary);
	color: #fff !important;
	box-shadow: 0 4px 15px rgba(0, 168, 232, 0.4);
}

.diy-btn-primary:hover {
	background: #008fcc;
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(0, 168, 232, 0.6);
}

.diy-btn-outline {
	background: transparent;
	color: #fff !important;
	border: 2px solid var(--diy-primary);
}

.diy-btn-outline:hover {
	background: rgba(0, 168, 232, 0.1);
	transform: translateY(-3px);
}

/* Hero Image Graphic (CSS Art Placeholder) */
.diy-hero-image {
	flex: 1;
	display: flex;
	justify-content: center;
	align-items: center;
}

.diy-hero-graphic {
	width: 250px;
	height: 250px;
	background: var(--diy-dark-2);
	border: 2px solid var(--diy-primary);
	border-radius: 20px;
	position: relative;
	box-shadow: 0 0 40px rgba(0, 168, 232, 0.2);
	display: flex;
	justify-content: center;
	align-items: center;
	transform: perspective(1000px) rotateY(-15deg) rotateX(10deg);
	transition: transform 0.5s ease;
}

.diy-hero-graphic:hover {
	transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.diy-hero-graphic .chip {
	width: 100px;
	height: 100px;
	background: #111;
	border: 2px solid #333;
	border-radius: 8px;
	color: #fff;
	display: flex;
	justify-content: center;
	align-items: center;
	font-family: monospace;
	font-size: 1.5rem;
	font-weight: bold;
	box-shadow: inset 0 0 10px rgba(255,255,255,0.1);
}

/* Projects Section */
.diy-projects-section {
	padding: 80px 0;
	background: var(--diy-bg);
}

.diy-section-title {
	font-size: 2.5rem;
	color: var(--diy-dark);
	margin-bottom: 10px;
}

.diy-section-desc {
	color: var(--diy-text-light);
	font-size: 1.125rem;
	max-width: 600px;
	margin: 0 auto 40px;
}

@media (max-width: 921px) {
	.diy-hero-section .ast-container {
		flex-direction: column;
		text-align: center;
	}
	
	.diy-hero-cta {
		justify-content: center;
	}
	
	.diy-hero-title {
		font-size: 2.5rem;
	}
}
