/*
Theme Name: digitalisa Custom Theme
Theme URI: https://digitalisa.id
Author: Fajru | @suratduka
Author URI: https://suratduka.cloud
Description: Custom theme optimized for n8n automation workflow with company profiles and blog posts
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dev-automation
Tags: automation, blog, custom-post-types, rest-api, responsive

This theme is designed for automation-first WordPress sites with n8n integration.
*/

/* ═══════════════════════════════════════════
   GLOBAL RESET & BASE STYLES
   ═══════════════════════════════════════════ */

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	--primary-color: #047857;
	--primary-hover: #059669;
	--primary-light: #ecfdf5;
	--secondary-color: #10b981;

	--dark: #1f2937;
	--gray: #6b7280;
	--light-gray: #f3f4f6;
	--border: #e5e7eb;
	--white: #ffffff;

	--container-width: 1200px;
	--content-width: 800px;

	--font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-heading: "Inter", -apple-system, system-ui, sans-serif;
}

body {
	font-family: var(--font-base);
	font-size: 16px;
	line-height: 1.7;
	color: var(--dark);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body.sidebar-active {
	overflow: hidden;
}

/* ═══════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════ */

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-heading);
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 1rem;
	color: var(--dark);
}

h1 {
	font-size: 2.5rem;
}
h2 {
	font-size: 2rem;
}
h3 {
	font-size: 1.75rem;
}
h4 {
	font-size: 1.5rem;
}
h5 {
	font-size: 1.25rem;
}
h6 {
	font-size: 1rem;
}

p {
	margin-bottom: 1.5rem;
}

a {
	color: var(--primary-color);
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: var(--primary-hover);
}

/* ═══════════════════════════════════════════
   LAYOUT STRUCTURE
   ═══════════════════════════════════════════ */

.site-wrapper {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.site-content {
	flex: 1;
	padding: 40px 20px;
}

.container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 20px;
}

.content-area {
	max-width: var(--content-width);
	margin: 0 auto;
}

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */

.site-header {
	background: var(--white);
	border-bottom: 1px solid var(--border);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	position: sticky;
	top: 0;
	z-index: 1000;
}

.header-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px 20px;
	max-width: var(--container-width);
	margin: 0 auto;
	position: sticky;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 15px;
}

.site-logo {
	display: flex;
	align-items: center;
}

.site-logo img,
.custom-logo {
	max-height: 50px;
	width: auto;
	display: block;
}

.site-title-group {
	display: flex;
	flex-direction: column;
}

.site-title {
	font-size: 1.5rem;
	font-weight: 800;
	margin: 0;
	line-height: 1.2;
}

.site-title a {
	color: var(--dark);
	text-decoration: none;
}

.site-title a:hover {
	color: var(--primary-color);
}

.site-description {
	font-size: 0.875rem;
	color: var(--gray);
	margin: 0;
	line-height: 1.2;
}

.main-navigation {
	display: flex;
	align-items: center;
}

.main-navigation ul {
	list-style: none;
	display: flex;
	gap: 10px;
	margin: 0;
	padding: 0;
}

.main-navigation li {
	margin: 0;
}

.main-navigation a {
	color: var(--dark);
	font-weight: 500;
	padding: 10px 16px;
	border-radius: 6px;
	transition: all 0.2s;
	display: block;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a,
.main-navigation .current_page_item a {
	background: var(--primary-light);
	color: var(--primary-color);
}

.menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: space-around;
	width: 30px;
	height: 25px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	z-index: 1001;
}

.menu-toggle:focus {
	outline: 2px solid var(--primary-color);
	outline-offset: 4px;
}

.menu-toggle .bar {
	width: 100%;
	height: 3px;
	background: var(--dark);
	border-radius: 3px;
	transition: all 0.3s ease;
	transform-origin: center;
}

.menu-toggle.is-active .bar:nth-child(1) {
	transform: translateY(9px) rotate(45deg);
}

.menu-toggle.is-active .bar:nth-child(2) {
	opacity: 0;
}

.menu-toggle.is-active .bar:nth-child(3) {
	transform: translateY(-9px) rotate(-45deg);
}

/* ═══════════════════════════════════════════
   MOBILE SIDEBAR
   ═══════════════════════════════════════════ */

.mobile-sidebar {
	position: fixed;
	top: 0;
	right: 0;
	width: 300px;
	max-width: 85%;
	height: 100%;
	background-color: var(--white);
	box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
	z-index: 1002;
	transform: translateX(100%);
	transition: transform 0.3s ease-in-out;
	overflow-y: auto;
}

.mobile-sidebar.is-open {
	transform: translateX(0);
}

.mobile-sidebar-content {
	padding: 20px;
}

.mobile-menu-title {
	font-size: 1.5rem;
	margin-bottom: 20px;
	color: var(--dark);
	padding-right: 40px;
}

.close-sidebar-btn {
	position: absolute;
	top: 20px;
	right: 20px;
	background: none;
	border: none;
	font-size: 32px;
	cursor: pointer;
	color: var(--dark);
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	padding: 0;
	transition: color 0.2s;
}

.close-sidebar-btn:hover {
	color: var(--primary-color);
}

.close-sidebar-btn:focus {
	outline: 2px solid var(--primary-color);
	outline-offset: 2px;
}

.mobile-menu-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.mobile-menu-list li {
	margin-bottom: 5px;
}

.mobile-menu-list a {
	display: block;
	padding: 12px 16px;
	color: var(--dark);
	font-weight: 500;
	border-radius: 6px;
	transition: all 0.2s;
}

.mobile-menu-list a:hover,
.mobile-menu-list .current-menu-item a,
.mobile-menu-list .current_page_item a {
	background: var(--primary-light);
	color: var(--primary-color);
}

.sidebar-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 1001;
	visibility: hidden;
	opacity: 0;
	transition:
		opacity 0.3s,
		visibility 0s 0.3s;
}

.sidebar-overlay.is-active {
	visibility: visible;
	opacity: 1;
	transition-delay: 0s;
}

/* ═══════════════════════════════════════════
	FOOTER
   ═══════════════════════════════════════════ */

footer.site-footer {
	background: var(--dark) !important;
	color: var(--white) !important;
	padding: 60px 20px 20px !important;
	margin-top: 60px;
	clear: both;
}

footer.site-footer .footer-content {
	max-width: var(--container-width);
	margin: 0 auto;
	width: 100%;
}

footer.site-footer .footer-columns {
	display: flex !important;
	flex-wrap: wrap;
	gap: 60px;
	margin-bottom: 40px;
	align-items: flex-start;
}

footer.site-footer .footer-left {
	flex: 1 1 auto;
	min-width: 300px;
	max-width: 700px;
}

footer.site-footer .footer-right {
	flex: 0 0 auto;
	width: 250px;
	min-width: 250px;
}

footer.site-footer .footer-logo {
	margin-bottom: 20px;
}

footer.site-footer .footer-logo a {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--white) !important;
	text-decoration: none;
	display: inline-block;
}

footer.site-footer .footer-logo a:hover {
	color: var(--secondary-color) !important;
}

footer.site-footer .footer-description {
	color: rgba(255, 255, 255, 0.8) !important;
	line-height: 1.6;
	margin-bottom: 25px;
	text-align: left;
	font-size: 0.95rem;
}

footer.site-footer .footer-social {
	display: flex !important;
	flex-direction: row !important;
	gap: 15px;
	align-items: center;
}

footer.site-footer .social-icon {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: rgba(255, 255, 255, 0.1) !important;
	border-radius: 50% !important;
	color: var(--white) !important;
	transition: all 0.3s ease;
	flex-shrink: 0;
}

footer.site-footer .social-icon:hover {
	background: var(--secondary-color) !important;
	color: var(--dark) !important;
	transform: translateY(-3px);
}

footer.site-footer .footer-right nav {
	display: block;
}

footer.site-footer .footer-menu {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 12px;
}

footer.site-footer .footer-menu li {
	text-align: left !important;
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

footer.site-footer .footer-menu li::before {
	display: none !important;
}

footer.site-footer .footer-menu li a {
	color: rgba(255, 255, 255, 0.8) !important;
	text-decoration: none !important;
	transition: color 0.3s ease;
	font-size: 0.95rem;
	display: inline-block;
}

footer.site-footer .footer-menu li a:hover {
	color: var(--secondary-color) !important;
}

footer.site-footer .footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 25px;
	text-align: center;
	margin-top: 20px;
}

footer.site-footer .footer-bottom p {
	color: rgba(255, 255, 255, 0.6) !important;
	margin: 0 !important;
	font-size: 0.9rem;
}

@media (max-width: 768px) {
	footer.site-footer .footer-columns {
		flex-direction: column !important;
		gap: 40px;
	}

	footer.site-footer .footer-left {
		max-width: 100%;
	}

	footer.site-footer .footer-right {
		width: 100%;
		min-width: auto;
	}
}

/* ═══════════════════════════════════════════
	BUTTONS
   ═══════════════════════════════════════════ */

.btn {
	display: inline-block;
	padding: 12px 24px;
	font-weight: 600;
	border-radius: 8px;
	transition: all 0.3s;
	text-align: center;
	border: none;
	cursor: pointer;
}

.btn-primary {
	background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
	color: var(--white);
	box-shadow: 0 2px 8px rgba(4, 120, 87, 0.25);
}

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(4, 120, 87, 0.35);
}

/* ═══════════════════════════════════════════
	CARDS
   ═══════════════════════════════════════════ */

.card {
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	transition: all 0.3s;
}

.card:hover {
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

/* ═══════════════════════════════════════════
	RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {
	h1 {
		font-size: 2rem;
	}
	h2 {
		font-size: 1.75rem;
	}
	h3 {
		font-size: 1.5rem;
	}

	.site-content {
		padding: 20px 15px;
	}

	.menu-toggle {
		display: flex;
	}

	.main-navigation {
		display: none;
	}

	.header-container {
		padding: 12px 15px;
	}

	.site-branding {
		gap: 10px;
	}

	.site-logo img,
	.custom-logo {
		max-height: 40px;
	}

	.site-title {
		font-size: 1.25rem;
	}

	.site-description {
		font-size: 0.75rem;
	}
}

@media (max-width: 480px) {
	body {
		font-size: 14px;
	}

	.container {
		padding: 0 15px;
	}

	.site-title {
		font-size: 1.1rem;
	}

	.site-description {
		display: none;
	}
}

@media (min-width: 769px) {
	.mobile-sidebar {
		display: none;
	}

	.sidebar-overlay {
		display: none;
	}
}
