/*
Theme Name: Najam Stanova Zagreb
Author: Antigravity Web Builder
Description: Premium, moderni i brzi klasični PHP WordPress uvod u najam stanova u Zagrebu. Optimiziran za SEO, Customizer prilagodbu, Google Fonts i Gutenberg blokove.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: najam-stanova-zagreb
Tags: translation-ready, custom-colors, custom-menu, custom-logo, featured-images, threaded-comments, grid-layout, one-column, wide-blocks
*/

/* ------------------------------------------------------------------ *
 * CSS Variables & Design Tokens (Linked to Customizer mods)
 * ------------------------------------------------------------------ */
:root {
	/* Font Families from Google Fonts */
	--nsz--font-family--body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--nsz--font-family--heading: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

	/* Fallback Colors (Will be overridden by inline styles from Customizer in header.php) */
	--wp--preset--color--base: #f8fafc;
	--wp--preset--color--contrast: #0f172a;
	--wp--preset--color--primary: #2563eb;
	--wp--preset--color--secondary: #0f172a;
	--wp--preset--color--accent: #f59e0b;
	--wp--preset--color--surface: #ffffff;
	--wp--preset--color--border: #e2e8f0;

	/* Spacing Scale */
	--nsz--spacing--10: 0.25rem;
	--nsz--spacing--20: 0.5rem;
	--nsz--spacing--30: 1rem;
	--nsz--spacing--40: 1.5rem;
	--nsz--spacing--50: 2.5rem;
	--nsz--spacing--60: 4rem;
	--nsz--spacing--70: 6rem;
}

/* ------------------------------------------------------------------ *
 * Base Reset & Typography
 * ------------------------------------------------------------------ */
*, *::before, *::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-family: var(--nsz--font-family--body);
	font-size: 1.125rem;
	line-height: 1.7;
	margin: 0;
	padding: 0;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s ease;
}

a:hover, a:focus {
	color: var(--wp--preset--color--secondary);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--nsz--font-family--heading);
	color: var(--wp--preset--color--secondary);
	line-height: 1.25;
	margin-top: 2.5rem;
	margin-bottom: 1rem;
	font-weight: 800;
	letter-spacing: -0.02em;
}

h1 {
	font-size: 2.75rem;
	margin-top: 0;
}

h2 {
	font-size: 2.125rem;
	border-left: 5px solid var(--wp--preset--color--primary);
	padding-left: 0.85rem;
	margin-top: 3.5rem;
	margin-bottom: 1.5rem;
}

h3 {
	font-size: 1.625rem;
	font-weight: 700;
}

h4 {
	font-size: 1.375rem;
	font-weight: 700;
}

/* Paragraph styling */
p {
	margin-top: 0;
	margin-bottom: 1.5rem;
}

/* ------------------------------------------------------------------ *
 * Layout Structure
 * ------------------------------------------------------------------ */
.nsz-site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.nsz-container {
	width: 100%;
	max-width: 1240px;
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--nsz--spacing--40);
	padding-right: var(--nsz--spacing--40);
}

.nsz-content-container {
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
}

.nsz-main {
	flex: 1 0 auto;
	padding-top: var(--nsz--spacing--50);
	padding-bottom: var(--nsz--spacing--60);
}

/* ------------------------------------------------------------------ *
 * Premium Glassmorphic Header
 * ------------------------------------------------------------------ */
.nsz-header {
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding-top: var(--nsz--spacing--30);
	padding-bottom: var(--nsz--spacing--30);
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.03);
}

.nsz-header__inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
}

.nsz-logo a {
	font-family: var(--nsz--font-family--heading);
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--wp--preset--color--secondary);
	text-decoration: none;
	letter-spacing: -0.03em;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.nsz-logo a::before {
	content: "🏢";
	font-size: 1.3rem;
}

/* Navigation Links */
.nsz-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 2rem;
}

.nsz-nav a {
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
	font-size: 0.95rem;
	transition: color 0.2s ease;
	position: relative;
	padding: 0.25rem 0;
}

.nsz-nav a::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 2px;
	background-color: var(--wp--preset--color--primary);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.25s ease-out;
}

.nsz-nav a:hover {
	color: var(--wp--preset--color--primary);
}

.nsz-nav a:hover::after,
.nsz-nav .current-menu-item > a::after {
	transform: scaleX(1);
	transform-origin: left;
}

.nsz-nav .current-menu-item > a {
	color: var(--wp--preset--color--primary);
}

/* Fallback Menu Styling */
.nsz-menu-fallback {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 1.5rem;
}

/* ------------------------------------------------------------------ *
 * Premium Footer
 * ------------------------------------------------------------------ */
.nsz-footer {
	background-color: var(--wp--preset--color--secondary);
	color: #94a3b8;
	padding-top: var(--nsz--spacing--60);
	padding-bottom: var(--nsz--spacing--60);
	border-top: 1px solid var(--wp--preset--color--border);
	font-size: 0.95rem;
}

.nsz-footer a {
	color: #f8fafc;
	text-decoration: none;
	font-weight: 600;
	transition: color 0.2s ease;
}

.nsz-footer a:hover {
	color: var(--wp--preset--color--accent);
}

.nsz-footer__inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 1.5rem;
}

.nsz-footer__credit {
	margin: 0;
}

/* ------------------------------------------------------------------ *
 * Gutenberg Block styling support
 * ------------------------------------------------------------------ */
/* Columns & Premium Cards */
.wp-block-columns {
	display: flex;
	flex-wrap: wrap;
	gap: 1.75rem;
	margin-bottom: 2.5rem;
}

.wp-block-column {
	flex: 1 1 280px;
}

.wp-block-column.has-surface-background-color {
	background-color: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
	padding: var(--nsz--spacing--40);
	box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.02), 0 10px 15px -3px rgba(15, 23, 42, 0.04);
	transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.wp-block-column.has-surface-background-color:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 20px -2px rgba(15, 23, 42, 0.08);
}

/* Premium Buttons */
.nsz-button, .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.85rem 1.75rem;
	border-radius: 8px;
	background-color: var(--wp--preset--color--primary);
	color: #ffffff !important;
	text-decoration: none !important;
	font-weight: 600;
	font-family: var(--nsz--font-family--heading);
	border: none;
	cursor: pointer;
	min-height: 46px;
	box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.2);
	transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.nsz-button:hover, .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--secondary);
	transform: translateY(-1px);
	box-shadow: 0 6px 20px 0 rgba(15, 23, 42, 0.25);
}

.nsz-button:active, .wp-block-button__link:active {
	transform: translateY(0);
}

.is-style-outline .wp-block-button__link {
	background-color: transparent;
	border: 2px solid var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary) !important;
	box-shadow: none;
}

.is-style-outline .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--primary);
	color: #ffffff !important;
	box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.2);
}

/* Premium Lists */
.entry-content ul {
	list-style: none;
	padding-left: 0.5rem;
	margin-bottom: 1.5rem;
}

.entry-content ul li {
	position: relative;
	padding-left: 1.75rem;
	margin-bottom: 0.75rem;
}

.entry-content ul li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.45rem;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: var(--wp--preset--color--primary);
}

/* WP tables */
table, .wp-block-table {
	width: 100%;
	border-collapse: collapse;
	margin: 2.5rem 0;
	font-size: 1rem;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.01), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--border);
}

table th, table td {
	padding: 1rem 1.25rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
	text-align: left;
}

table th {
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--secondary);
	font-weight: 700;
	font-family: var(--nsz--font-family--heading);
}

table tr:last-child td {
	border-bottom: none;
}

/* Keyboard accessibility outline */
:where(a, button, input, select, textarea, summary, .wp-block-button__link):focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}

/* Reduced Motion Settings */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* Companion Plugin Overrides */
.nszc-hero__headline {
	color: #ffffff !important;
}
.nszc-hero__sub {
	color: #cbd5e1 !important;
}

/* ------------------------------------------------------------------ *
 * Premium Quote Form Card
 * ------------------------------------------------------------------ */
.nsz-form-card {
	background: var(--wp--preset--color--surface, #ffffff);
	border-radius: 16px;
	padding: 2rem;
	box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
	width: 100%;
	border: 1px solid var(--wp--preset--color--border, #e2e8f0);
}

.nsz-form-card h3 {
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--wp--preset--color--secondary, #0f172a);
	margin-top: 0;
	margin-bottom: 1.5rem;
	padding-bottom: 0.75rem;
	border-bottom: 3px solid var(--wp--preset--color--accent, #f59e0b);
}

.form-group {
	margin-bottom: 1.25rem;
}

.form-group label {
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--wp--preset--color--contrast, #0f172a);
	margin-bottom: 0.35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 2px solid var(--wp--preset--color--border, #e2e8f0);
	border-radius: 8px;
	font-size: 1rem;
	color: var(--wp--preset--color--contrast, #0f172a);
	background: var(--wp--preset--color--surface, #ffffff);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
	border-color: var(--wp--preset--color--primary, #2563eb);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-group select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	padding-right: 2.5rem;
	cursor: pointer;
}

.form-group textarea {
	resize: vertical;
	min-height: 100px;
}

.form-submit {
	margin-top: 1rem;
}

.form-feedback {
	margin-top: 1.25rem;
	padding: 1rem;
	border-radius: 8px;
	font-weight: 500;
	font-size: 0.95rem;
	display: none;
}

.form-feedback.success {
	background: #dcfce7;
	color: #166534;
	border: 1px solid #bbf7d0;
	display: block;
}

.form-feedback.error {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fecaca;
	display: block;
}

.spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2px solid var(--wp--preset--color--border, #e2e8f0);
	border-top-color: var(--wp--preset--color--primary, #2563eb);
	border-radius: 50%;
	animation: nsz-spin 0.7s linear infinite;
	vertical-align: middle;
	margin-right: 6px;
}

@keyframes nsz-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ *
 * App-style Mobile Customizations
 * ------------------------------------------------------------------ */

/* NSZ Logo SVG styling */
.nsz-logo-svg {
	display: inline-block;
	vertical-align: middle;
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	height: 60px;
	background: #ffffff;
	border-top: 1px solid #e2e8f0;
	box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.05);
	display: none;
	justify-content: space-around;
	align-items: center;
	z-index: 9999;
	padding-bottom: env(safe-area-inset-bottom);
}

.mobile-bottom-nav__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: #64748b;
	text-decoration: none;
	font-size: 0.75rem;
	font-weight: 600;
	flex: 1;
	height: 100%;
	transition: color 0.2s ease;
	font-family: var(--nsz--font-family--heading);
}

.mobile-bottom-nav__item svg {
	width: 22px;
	height: 22px;
	margin-bottom: 2px;
}

.mobile-bottom-nav__item.active,
.mobile-bottom-nav__item:hover {
	color: #0b1528; /* dark blue */
}

/* Responsive Header Overrides */
.nsz-header {
	background: #0b1528 !important; /* Force dark blue */
	border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
}

@media (max-width: 767px) {
	.site-topbar, 
	.header-cta-actions, 
	.main-navigation {
		display: none !important;
	}

	.nsz-header .nsz-container.header-inner {
		display: grid !important;
		grid-template-columns: 40px 1fr 40px !important;
		align-items: center !important;
		justify-content: center !important;
		padding-left: 1rem;
		padding-right: 1rem;
	}

	.nsz-header .menu-toggle {
		display: block !important;
		grid-column: 1;
		background: none;
		border: none;
		color: #ffffff;
		padding: 0;
		cursor: pointer;
		display: flex !important;
		align-items: center;
		justify-content: center;
		width: 30px;
		height: 30px;
	}

	.nsz-header .menu-toggle-icon {
		display: block;
		width: 20px;
		height: 2px;
		background: #ffffff;
		position: relative;
	}

	.nsz-header .menu-toggle-icon::before,
	.nsz-header .menu-toggle-icon::after {
		content: "";
		position: absolute;
		left: 0;
		width: 100%;
		height: 2px;
		background: #ffffff;
	}

	.nsz-header .menu-toggle-icon::before {
		top: -6px;
	}

	.nsz-header .menu-toggle-icon::after {
		bottom: -6px;
	}

	.nsz-header .site-branding {
		grid-column: 2;
		display: flex !important;
		justify-content: center !important;
		margin: 0 auto;
	}
}

