/*
Theme Name: Tehnomag Teco
Theme URI: https://tehnomag-teco.rs
Author: Tehnomag Teco d.o.o.
Description: Custom tema za Tehnomag Teco d.o.o. - rashladni sistemi, klimatizacija i toplotne pumpe.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: tehnomag-teco
*/

:root {
	--color-primary: #2098d1;
	--color-primary-light: #2ea3f2;
	--color-navy: #006799;
	--color-navy-dark: #1f4098;
	--color-text: #333333;
	--color-text-light: #666666;
	--color-border: #e1e1e1;
	--color-bg-light: #f4f4f4;
	--color-white: #ffffff;
	--font-heading: 'Duru Sans', Helvetica, Arial, sans-serif;
	--font-body: Helvetica, Arial, sans-serif;
	--container-width: 1200px;
}

* {
	box-sizing: border-box;
}

html {
	background: var(--color-white);
}

body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--color-text);
	background: var(--color-white);
	font-size: 16px;
	line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	color: var(--color-navy);
	line-height: 1.3;
	margin-top: 0;
}

a {
	color: var(--color-primary);
	text-decoration: none;
}

a:hover {
	color: var(--color-navy);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

.container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 20px;
}

.btn {
	display: inline-block;
	background: var(--color-primary);
	color: var(--color-white);
	padding: 12px 28px;
	border-radius: 4px;
	font-weight: 600;
	transition: background 0.2s ease;
}

.btn:hover {
	background: var(--color-navy);
	color: var(--color-white);
}

/* Header */
.site-header {
	background: linear-gradient(135deg, var(--color-navy-dark), var(--color-navy));
	border-bottom: 1px solid rgba(255,255,255,0.1);
	position: sticky;
	top: 0;
	z-index: 100;
}

.site-header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding-top: 14px;
	padding-bottom: 14px;
}

.site-logo img {
	max-height: 56px;
	filter: brightness(0) invert(1);
}

.main-nav {
	flex: 1;
	display: flex;
	justify-content: flex-end;
}

.main-nav ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	row-gap: 6px;
	column-gap: 20px;
	margin: 0;
	padding: 0;
	position: relative;
}

.main-nav li {
	position: relative;
}

.main-nav > ul > li > a {
	display: block;
	color: var(--color-white);
	font-weight: 600;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	white-space: nowrap;
}

.main-nav > ul > li > a:hover,
.main-nav li.current-menu-item > a {
	color: var(--color-primary-light);
}

.main-nav ul ul {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--color-white);
	border: 1px solid var(--color-border);
	min-width: 240px;
	flex-direction: column;
	gap: 0;
	box-shadow: 0 8px 20px rgba(0,0,0,0.16);
	padding: 8px 0;
}

.main-nav li:hover > ul {
	display: flex;
}

.main-nav ul ul li a {
	display: block;
	padding: 10px 18px;
	text-transform: none;
	font-weight: 400;
	font-size: 14px;
	color: var(--color-text);
	white-space: normal;
}

.main-nav ul ul li a:hover {
	background: var(--color-bg-light);
	color: var(--color-primary);
}

.menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 32px;
	height: 32px;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	flex-shrink: 0;
}

.menu-toggle-bar {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--color-white);
	border-radius: 2px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-open .menu-toggle-bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open .menu-toggle-bar:nth-child(2) {
	opacity: 0;
}

.menu-toggle.is-open .menu-toggle-bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
	background: linear-gradient(135deg, var(--color-navy-dark), var(--color-primary));
	color: var(--color-white);
	padding: 90px 0;
	text-align: center;
}

.hero h1 {
	color: var(--color-white);
	font-size: 2.6rem;
	margin-bottom: 16px;
}

.hero p {
	font-size: 1.2rem;
	max-width: 700px;
	margin: 0 auto 28px;
	opacity: 0.95;
}

/* Sections */
.section {
	padding: 70px 0;
}

.section-alt {
	background: var(--color-bg-light);
}

.section-title {
	text-align: center;
	margin-bottom: 44px;
}

.section-title h2 {
	font-size: 2rem;
}

.section-title p {
	color: var(--color-text-light);
	max-width: 640px;
	margin: 10px auto 0;
}

/* Cards grid */
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 28px;
}

.card {
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
	box-shadow: 0 10px 24px rgba(0,0,0,0.08);
	transform: translateY(-3px);
}

.card img {
	width: 100%;
	aspect-ratio: 4/3;
	object-fit: cover;
}

.card-body {
	padding: 20px;
}

.card-body h3 {
	font-size: 1.15rem;
	margin-bottom: 8px;
}

.card-body p {
	color: var(--color-text-light);
	font-size: 0.95rem;
	margin: 0;
}

/* WP classic gallery shortcode - horizontal scrolling thumbnail strip */
.gallery-scroll-wrap {
	position: relative;
	margin: 28px 0;
}

.gallery {
	display: flex;
	flex-wrap: nowrap;
	gap: 10px;
	margin: 0;
	padding: 4px 2px;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
}

.gallery-columns-1, .gallery-columns-2, .gallery-columns-4, .gallery-columns-5, .gallery-columns-6 {
	grid-template-columns: none;
}

.gallery-item {
	flex: 0 0 auto;
	margin: 0;
	scroll-snap-align: start;
}

.gallery-icon {
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid var(--color-border);
	width: 110px;
	height: 110px;
}

.gallery-icon a {
	display: block;
	cursor: zoom-in;
	width: 100%;
	height: 100%;
}

.gallery-icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.25s ease;
}

.gallery-icon a:hover img {
	transform: scale(1.05);
}

.gallery-caption {
	display: none;
}

.gallery-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid var(--color-border);
	background: var(--color-white);
	color: var(--color-navy);
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	cursor: pointer;
	z-index: 2;
	transition: opacity 0.15s ease, visibility 0.15s ease;
}

.gallery-nav:hover {
	color: var(--color-primary);
}

.gallery-nav-prev {
	left: -14px;
}

.gallery-nav-next {
	right: -14px;
}

.gallery-nav[hidden] {
	display: none;
}

@media (max-width: 640px) {
	.gallery-nav {
		display: none;
	}

	.gallery-icon {
		width: 92px;
		height: 92px;
	}
}

/* Footer */
.site-footer {
	background: var(--color-navy-dark);
	color: #cfe3ff;
	padding: 50px 0 24px;
}

.site-footer a {
	color: #cfe3ff;
}

.site-footer a:hover {
	color: var(--color-white);
}

.footer-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 30px;
	margin-bottom: 30px;
}

.footer-grid h4 {
	color: var(--color-white);
	font-size: 1rem;
	margin-bottom: 14px;
}

.footer-bottom {
	border-top: 1px solid rgba(255,255,255,0.15);
	padding-top: 18px;
	text-align: center;
	font-size: 0.85rem;
	opacity: 0.8;
}

/* Responsive */
@media (max-width: 960px) {
	.main-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--color-navy-dark);
		border-top: 1px solid rgba(255,255,255,0.12);
		max-height: calc(100vh - 85px);
		overflow-y: auto;
	}

	.main-nav.is-open {
		display: block;
	}

	.main-nav > ul {
		flex-direction: column;
		flex-wrap: nowrap;
		gap: 0;
	}

	.main-nav > ul > li > a {
		display: block;
		padding: 14px 20px;
	}

	.main-nav ul ul {
		position: static;
		background: rgba(0,0,0,0.15);
		border: none;
		box-shadow: none;
		padding: 0 0 0 20px;
	}

	.main-nav ul ul li a {
		color: var(--color-white);
	}

	.main-nav ul ul li a:hover {
		background: rgba(255,255,255,0.08);
		color: var(--color-primary-light);
	}

	.menu-toggle {
		display: flex;
	}

	.hero h1 {
		font-size: 1.9rem;
	}
}
