/*
Theme Name: Nive
Description: KH-speed logistics theme.
Version: 2.0
Text Domain: nive
*/

:root {
	--nive-primary: #a3232e;
	--nive-white: #ffffff;
	--nive-width: 1200px;
	--nive-gap: 1.5rem;
}

* { box-sizing: border-box; }
body {
	margin: 0;
	font-family: "Open Sans", system-ui, -apple-system, sans-serif;
	font-weight: 300;
	line-height: 1.5;
	color: #333;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
#page { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }

.nive-inner {
	max-width: var(--nive-width);
	margin: 0 auto;
	padding-left: var(--nive-gap);
	padding-right: var(--nive-gap);
}

/* Top bar: text only, right-aligned (no menu) */
.nive-top-bar {
	background: var(--nive-primary);
	color: var(--nive-white);
	font-size: 0.875rem;
}
.nive-top-bar .nive-inner {
	display: flex;
	justify-content: flex-end;
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
}
.nive-top-bar-text {
	text-align: right;
}
.nive-top-bar a { color: inherit; text-decoration: none; }
.nive-top-bar a:hover { text-decoration: underline; }
.nive-top-bar .sep { opacity: 0.8; margin: 0 0.5em; }

/* Site header */
.nive-site-header {
	background: var(--nive-white);
	box-shadow: 0 1px 0 rgba(0,0,0,.08);
}
.nive-site-header .nive-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 1rem;
	padding-bottom: 1rem;
	gap: var(--nive-gap);
}
.nive-site-header .nive-logo-link,
.nive-site-header .site-branding a,
.nive-site-header .custom-logo-link { display: block; }
.nive-site-header .nive-logo,
.nive-site-header .site-branding img,
.nive-site-header .custom-logo { max-height: 48px; width: auto; display: block; }
.nive-site-header .nive-nav { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.nive-site-header .nav-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1rem; }
.nive-site-header .nav-menu li { margin: 0; }
.nive-site-header .nive-nav a { color: #333; text-decoration: none; }
.nive-site-header .nive-nav a:hover { color: var(--nive-primary); }
.nive-btn {
	display: inline-block;
	background: var(--nive-primary);
	color: var(--nive-white) !important;
	padding: 0.6rem 1.2rem;
	text-decoration: none;
	border: none;
	cursor: pointer;
	font-size: 1rem;
	border-radius: 16px;
}
.nive-btn:hover { opacity: 0.9; }
.nive-btn-block { width: 100%; text-align: center; }

/* Hero: only the large image in a rounded container; cards outside */
.nive-hero-wrap {
	background: var(--nive-white);
	padding: 2rem var(--nive-gap) 0;
}
.nive-hero-outer {
	max-width: var(--nive-width);
	margin: 0 auto;
}
.nive-hero-container {
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0 8px 32px rgba(0,0,0,.12);
	min-height: 60vh;
	background-size: cover;
	background-position: center;
	background-color: #333;
}
.nive-hero {
	position: relative;
	min-height: 75vh;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	color: var(--nive-white);
	text-align: left;
}
.nive-hero .nive-inner { padding: 3rem 2.75rem; max-width: 800px; margin: 0; }
.nive-hero h1,
.nive-hero .nive-hero-title { font-size: 2.25rem; margin-bottom: 0.5rem; }
.nive-hero .nive-hero-sub { font-size: 1.125rem; margin-bottom: 1.5rem; opacity: 0.95; }
.nive-hero .nive-btn { margin-top: 0.5rem; }

/* Hero cards (outside rounded box, overlap bottom of image) */
.nive-hero-wrap .nive-cards-wrap {
	margin-top: -80px;
	position: relative;
	z-index: 2;
	padding-bottom: 1.5rem;
}
.nive-hero-wrap .nive-cards-wrap .nive-inner {
	padding-left: 2.75rem;
	padding-right: 2.75rem;
}
.nive-hero-wrap .nive-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 2rem;
}
.nive-hero-wrap .nive-card {
	background: var(--nive-white);
	padding: 1.35rem 1.5rem;
	box-shadow: 0 4px 12px rgba(0,0,0,.1);
	border-radius: 20px;
	border: none;
}
.nive-hero-wrap .nive-card .nive-card-title { margin: 0 0 0.35rem; font-size: 1rem; }
.nive-hero-wrap .nive-card .nive-card-desc { margin: 0; font-size: 0.875rem; color: #555; }
.nive-hero-wrap .nive-card .nive-card-icon {
	display: block;
	margin-bottom: 0.35rem;
	color: var(--nive-primary);
}
.nive-hero-wrap .nive-card .nive-card-icon i {
	font-size: 2rem;
	color: var(--nive-primary);
}
.nive-hero-wrap .nive-card .nive-card-icon svg {
	vertical-align: middle;
	width: 2rem;
	height: auto;
	color: var(--nive-primary);
}

/* Sections */
.nive-section {
	padding: 3rem 0;
	background: var(--nive-white);
}
.nive-section-alt { background: #f5f5f5; }
.nive-section-label {
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--nive-primary) !important;
	margin-bottom: 0.25rem;
}
.nive-section-label,
.nive-section-label * {
	color: var(--nive-primary) !important;
}
.nive-section-label::before { content: "→ "; }
.nive-section-title {
	margin: 0 0 1rem;
	font-size: 2rem;
	font-weight: 700;
	color: #1a1a1a;
}

.nive-section-title a { color: inherit; text-decoration: none; }
.nive-section-title a:hover { color: var(--nive-primary); }

/* Split (text + image or form) */
.nive-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2.5rem;
	align-items: center;
}
/* Mezinárodní: visual left, text right */
.nive-split-reverse .nive-split-text { order: 2; }
.nive-split-reverse .nive-split-visual { order: 1; }
@media (max-width: 768px) {
	.nive-split { grid-template-columns: 1fr; }
	.nive-split-reverse .nive-split-text,
	.nive-split-reverse .nive-split-visual { order: unset; }
}
.nive-split-text p {
	color: #1a1a1a;
	line-height: 1.6;
	margin: 0 0 1rem;
}
.nive-split-text .nive-btn { margin-top: 0.5rem; }
.nive-split-img,
.nive-split-visual img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 4px;
}
.nive-split-visual {
	min-height: 0;
}
.nive-split-visual-placeholder {
	min-height: 280px;
	background: #f0f0f0;
	border-radius: 4px;
}

/* Cards row */
.nive-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--nive-gap); }
.nive-card { padding: 1rem; border: 1px solid #eee; }
.nive-card h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.nive-card p { margin: 0; font-size: 0.875rem; color: #555; }

/* News grid */
.nive-news-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem;
}
.nive-news-card {
	background: var(--nive-white);
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,.08);
	border-radius: 16px;
}
.nive-news-card-img {
	display: block;
	aspect-ratio: 16/10;
	background: #eee;
	border-radius: 16px 16px 0 0;
}
.nive-news-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nive-news-card-img-placeholder { display: block; width: 100%; height: 100%; min-height: 100%; background: #eee; }
.nive-news-card-body { padding: 1.25rem; }
.nive-news-card-title { margin: 0 0 0.5rem; font-size: 1.125rem; }
.nive-news-card-title a { color: inherit; text-decoration: none; }
.nive-news-card-title a:hover { color: var(--nive-primary); }
.nive-news-card-body p { margin: 0 0 0.75rem; font-size: 0.9375rem; }

/* Contact form box */
.nive-form-box {
	background: #f5f5f5;
	padding: 2.25rem;
	box-shadow: 0 4px 16px rgba(0,0,0,.08);
	border-radius: 16px;
}
.nive-form-title {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
	font-weight: 700;
	color: #1a1a1a;
}
.nive-form-intro {
	margin: 0 0 1.75rem;
	font-size: 0.9375rem;
	color: #1a1a1a;
	line-height: 1.5;
}
.nive-contact-form .nive-fieldset {
	border: none;
	margin: 0 0 1.75rem;
	padding: 0;
}
.nive-contact-form .nive-legend {
	display: block;
	padding: 0 0 0.75rem;
	font-size: 1rem;
	font-weight: 700;
	color: #1a1a1a;
}
.nive-form-options {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 2rem;
}
.nive-form-radio {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	cursor: pointer;
	font-size: 0.9375rem;
	color: #1a1a1a;
}
.nive-form-radio input[type="radio"] {
	appearance: none;
	width: 1.2rem;
	height: 1.2rem;
	border: 2px solid var(--nive-primary);
	border-radius: 6px;
	background: var(--nive-white);
	cursor: pointer;
	position: relative;
	flex-shrink: 0;
}
.nive-form-radio input[type="radio"]:checked {
	background: var(--nive-white);
}
.nive-form-radio input[type="radio"]:checked::after {
	content: "";
	position: absolute;
	inset: 0;
	background: center / 0.9rem 0.9rem no-repeat;
	/* inline SVG checkmark, uses the primary color */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23a3232e' d='M9.0 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E");
}

/* Checkbox style (like design: red border + red check) */
.nive-contact-form input[type="checkbox"] {
	appearance: none;
	width: 1.6rem;
	height: 1.6rem;
	border: 2px solid var(--nive-primary);
	border-radius: 6px;
	background: var(--nive-white);
	cursor: pointer;
	display: inline-block;
	vertical-align: middle;
	position: relative;
	flex-shrink: 0;
}
.nive-contact-form input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	inset: 0;
	background: center / 1.2rem 1.2rem no-repeat;
	/* inline SVG checkmark, uses the primary color */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23a3232e' d='M9.0 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E");
}
.nive-contact-form input[type="checkbox"]:focus-visible {
	outline: 2px solid rgba(163, 35, 46, 0.35);
	outline-offset: 2px;
}
.nive-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.nive-form-field { margin-bottom: 1rem; }
.nive-form-field:last-of-type { margin-bottom: 0; }
.nive-contact-form .nive-form-field input[type="text"],
.nive-contact-form .nive-form-field input[type="email"],
.nive-contact-form .nive-form-field textarea {
	width: 100%;
	padding: 0.8rem 1rem;
	border: 1px solid #ddd;
	border-radius: 16px;
	box-sizing: border-box;
	background: var(--nive-white);
	font-size: 1rem;
	color: #1a1a1a;
}
.nive-contact-form .nive-form-field input::placeholder,
.nive-contact-form .nive-form-field textarea::placeholder {
	color: #888;
}
.nive-contact-form .nive-btn { margin-top: 1.25rem; padding-top: 0.85rem; padding-bottom: 0.85rem; font-weight: 600; }

/* Partners row */
.nive-partners-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 2rem;
}
.nive-partner-logo { max-height: 60px; width: auto; display: block; filter: grayscale(100%); opacity: 0.8; }
.nive-partner-logo:hover { filter: none; opacity: 1; }
.nive-partner-placeholder { padding: 1rem 2rem; background: #eee; color: #666; font-size: 0.875rem; }

/* Footer */
.nive-footer {
	background: var(--nive-primary);
	color: var(--nive-white);
	padding: 2rem 0;
}
.nive-footer .nive-inner {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}
@media (max-width: 768px) {
	.nive-footer .nive-inner { grid-template-columns: 1fr; }
}
.nive-footer h3,
.nive-footer h4 { margin: 0 0 0.75rem; font-size: 1rem; }
.nive-footer a { color: inherit; text-decoration: none; }
.nive-footer a:hover { text-decoration: underline; }
.nive-footer ul { list-style: none; margin: 0; padding: 0; }
.nive-footer li { margin: 0.25rem 0; }

/* Scroll-triggered animations */
/* Hero cards: stagger fade-in-up when cards wrap enters view */
.nive-js .nive-hero-wrap .nive-cards-wrap .nive-card {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.nive-js .nive-hero-wrap .nive-cards-wrap .nive-card:nth-child(1) { transition-delay: 0.05s; }
.nive-js .nive-hero-wrap .nive-cards-wrap .nive-card:nth-child(2) { transition-delay: 0.15s; }
.nive-js .nive-hero-wrap .nive-cards-wrap .nive-card:nth-child(3) { transition-delay: 0.25s; }
.nive-js .nive-hero-wrap .nive-cards-wrap.nive-in-view .nive-card {
	opacity: 1;
	transform: translateY(0);
}

/* Sections: label, title, split content, form, grid */
.nive-js .nive-section .nive-section-label,
.nive-js .nive-section .nive-section-title,
.nive-js .nive-section .nive-split-text,
.nive-js .nive-section .nive-split-visual,
.nive-js .nive-section .nive-form-box,
.nive-js .nive-section .nive-news-grid,
.nive-js .nive-section .nive-partners-row {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.nive-js .nive-section .nive-section-label { transition-delay: 0s; }
.nive-js .nive-section .nive-section-title { transition-delay: 0.08s; }
.nive-js .nive-section .nive-split-text { transition-delay: 0.16s; }
.nive-js .nive-section .nive-split-visual { transition-delay: 0.2s; }
.nive-js .nive-section .nive-form-box { transition-delay: 0.16s; }
.nive-js .nive-section .nive-partners-row { transition-delay: 0.16s; }

.nive-js .nive-section.nive-in-view .nive-section-label,
.nive-js .nive-section.nive-in-view .nive-section-title,
.nive-js .nive-section.nive-in-view .nive-split-text,
.nive-js .nive-section.nive-in-view .nive-split-visual,
.nive-js .nive-section.nive-in-view .nive-form-box,
.nive-js .nive-section.nive-in-view .nive-partners-row {
	opacity: 1;
	transform: translateY(0);
}

/* News section: stagger cards */
.nive-js .nive-section .nive-news-grid { transition-delay: 0.12s; }
.nive-js .nive-section .nive-news-grid .nive-news-card {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.nive-js .nive-section .nive-news-grid .nive-news-card:nth-child(1) { transition-delay: 0.18s; }
.nive-js .nive-section .nive-news-grid .nive-news-card:nth-child(2) { transition-delay: 0.26s; }
.nive-js .nive-section .nive-news-grid .nive-news-card:nth-child(3) { transition-delay: 0.34s; }
.nive-js .nive-section.nive-in-view .nive-news-grid {
	opacity: 1;
	transform: translateY(0);
}
.nive-js .nive-section.nive-in-view .nive-news-grid .nive-news-card {
	opacity: 1;
	transform: translateY(0);
}
