/*
 * Fablocks Theme Main CSS
 * Use CSS Variables and Modular SCSS-like structure (in vanilla CSS)
 */

:root {
	/* These are fallbacks if wp_head doesn't inject correctly */
	--fablocks-primary-color: #000000;
	--fablocks-bg-color: #ffffff;
	--fablocks-text-color: #333333;
	--fablocks-spacing: 1.5rem;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--fablocks-text-color);
	background-color: var(--fablocks-bg-color);
	line-height: var(--fablocks-spacing);
	margin: 0;
	padding: 0;
	overflow-x: hidden;
}

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

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
	width: 100%;
	box-sizing: border-box;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
	font-weight: 700;
	margin-bottom: 1rem;
}

/* Forms & Buttons */
.button, button, input[type="submit"] {
	background-color: var(--fablocks-primary-color);
	color: #fff;
	border: none;
	padding: 0.75rem 1.5rem;
	cursor: pointer;
	border-radius: 4px;
	transition: opacity 0.3s ease;
	min-height: 44px; /* Touch target minimum */
	min-width: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.button:hover {
	opacity: 0.9;
}

/* Header & Top Bar */
.fablocks-top-bar {
	background: #f8f8f8;
	padding: 0.5rem 0;
}

.fablocks-top-bar .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap; /* Allows wrapping on small screens */
}

.social-icons, .header-actions {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 1rem;
	align-items: center;
}

.header-actions a, .social-icons a {
	min-height: 44px;
	display: flex;
	align-items: center;
	text-decoration: none;
	color: var(--fablocks-text-color);
}

.site-branding .site-title {
	margin: 0;
	font-size: 1.5rem;
}

.main-navigation {
	background: #fff;
	border-bottom: 1px solid #eaeaea;
	position: relative;
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: center;
	gap: 2rem;
}

.main-navigation a {
	text-decoration: none;
	color: var(--fablocks-text-color);
	padding: 1rem;
	display: block;
}

.menu-toggle {
	display: none;
	width: 100%;
	text-align: center;
	background: #eee;
	color: var(--fablocks-text-color);
	border: none;
	padding: 1rem;
	font-weight: bold;
	cursor: pointer;
}

/* Hero Section */
.fablocks-hero-section {
	background-color: #f2f2f2;
	padding: 4rem 1rem;
	text-align: center;
}

/* Product Tabs */
.fablocks-product-tabs {
	padding: 4rem 0;
}

.tabs-nav {
	list-style: none;
	display: flex;
	justify-content: center;
	gap: 2rem;
	margin-bottom: 2rem;
	padding: 0;
	flex-wrap: wrap;
}

.tabs-nav a {
	text-decoration: none;
	color: #666;
	font-weight: 600;
	padding: 0.5rem 1rem;
	display: inline-block;
	min-height: 44px;
	box-sizing: border-box;
}

.tabs-nav a.active {
	color: var(--fablocks-primary-color);
	border-bottom: 2px solid var(--fablocks-primary-color);
}

/* Newsletter Section */
.fablocks-newsletter-section {
	background-color: var(--fablocks-primary-color);
	color: #fff;
	padding: 3rem 0;
}

.newsletter-wrapper {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 2rem;
}

.newsletter-form-container form {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.newsletter-form-container input[type="email"] {
	padding: 0.75rem;
	border: none;
	border-radius: 4px;
	width: 250px;
	max-width: 100%;
	min-height: 44px;
	box-sizing: border-box;
}

/* -------------------------------------------
 * Responsive Media Queries
 * ------------------------------------------- */

/* Tablet & Mobile (max 768px) */
@media screen and (max-width: 768px) {
	.fablocks-top-bar .container {
		flex-direction: column;
		gap: 1rem;
		text-align: center;
	}
	
	.social-icons, .header-actions {
		justify-content: center;
		width: 100%;
	}
	
	.newsletter-wrapper {
		flex-direction: column;
		text-align: center;
	}
	
	.newsletter-form-container form {
		justify-content: center;
		width: 100%;
	}
	
	.newsletter-form-container input[type="email"] {
		width: 100%; /* Full width form input on mobile */
		margin-bottom: 0.5rem;
	}
	
	.newsletter-form-container button {
		width: 100%;
	}
	
	/* Mobile Menu Navigation */
	.menu-toggle {
		display: block;
	}
	
	.main-navigation ul {
		display: none;
		flex-direction: column;
		gap: 0;
		width: 100%;
		position: absolute;
		top: 100%;
		left: 0;
		background: #fff;
		z-index: 999;
		border-top: 1px solid #eaeaea;
		box-shadow: 0 4px 6px rgba(0,0,0,0.1);
	}
	
	.main-navigation ul.toggled {
		display: flex;
	}
	
	.main-navigation a {
		border-bottom: 1px solid #f1f1f1;
		padding: 1rem;
		text-align: center;
	}
	
	.fablocks-hero-section {
		padding: 3rem 1rem;
	}
	
	/* Typography scaling on smaller screens */
	h1 {
		font-size: 2rem;
	}
	
	h2 {
		font-size: 1.5rem;
	}
}

/* Small Mobile Devices (max 480px) */
@media screen and (max-width: 480px) {
	.tabs-nav {
		flex-direction: column;
		gap: 0.5rem;
	}
	
	.tabs-nav a {
		width: 100%;
		text-align: center;
		border-bottom: 1px solid #eee;
	}
	
	.tabs-nav a.active {
		border-bottom: 2px solid var(--fablocks-primary-color);
	}
}
