/* ======================================================
   Autoservis Kraus — frontend styles
   ====================================================== */

:root {
	--dark:         #27241d;
	--dark-sec:     #423d33;
	--accent:       #dd6b20;
	--accent-dark:  #b8560f;
	--accent-2:     #cf3033;
	--bg:           #faf9f7;
	--white:        #ffffff;
	--text:         #423d33;
	--text-light:   #7a7267;
	--border:       #e8e6e1;
	--shadow-sm:    0 1px 3px rgba(0,0,0,.08);
	--shadow:       0 4px 12px rgba(0,0,0,.10);
	--shadow-lg:    0 8px 24px rgba(0,0,0,.14);
	--radius:       8px;
	--transition:   0.2s ease;
	--font-body:    'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--font-heading: 'Playfair Display', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--text);
	background: var(--bg);
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

/* ── Typography ── */
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.25; color: var(--dark); font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }

/* ── Layout ── */
.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

section { padding: 5rem 0; }

.section-header {
	text-align: center;
	margin-bottom: 3rem;
}
.section-header p {
	color: var(--text-light);
	font-size: 1.1rem;
	margin-top: .5rem;
}
.section-label {
	display: inline-block;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: .5rem;
}

/* ── Header / Nav ── */
.site-header {
	background: var(--white);
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 2px 12px rgba(39,36,29,.1);
	border-bottom: 3px solid var(--accent);
}

.nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 78px;
}

.nav-logo {
	display: flex;
	align-items: center;
	letter-spacing: -.02em;
}
.nav-logo-img {
	height: 68px;
	width: auto;
}

.nav-links {
	display: flex;
	list-style: none;
	gap: 0;
}
.nav-links a {
	display: block;
	color: var(--dark-sec);
	font-size: .85rem;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
	padding: .5rem .9rem;
	border-bottom: 2px solid transparent;
	transition: color var(--transition), border-color var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
	color: var(--accent);
	border-bottom-color: var(--accent);
}

.nav-toggle {
	display: none;
	background: none;
	border: none;
	color: var(--dark);
	cursor: pointer;
	padding: .5rem;
}

/* ── Buttons ── */
.btn {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .75rem 1.75rem;
	border-radius: var(--radius);
	font-size: .9rem;
	font-weight: 600;
	cursor: pointer;
	transition: all var(--transition);
	border: 2px solid transparent;
	text-decoration: none;
}
.btn-primary {
	background: var(--accent);
	color: var(--white);
}
.btn-primary:hover {
	background: var(--accent-dark);
	color: var(--white);
	transform: translateY(-1px);
	box-shadow: var(--shadow);
}
.btn-outline {
	background: transparent;
	color: var(--white);
	border-color: rgba(255,255,255,.5);
}
.btn-outline:hover {
	border-color: var(--white);
	color: var(--white);
	background: rgba(255,255,255,.1);
}
.btn-dark {
	background: var(--dark);
	color: var(--white);
}
.btn-dark:hover {
	background: var(--dark-sec);
	color: var(--white);
}

/* ── Hero ── */
.hero {
	background-image: linear-gradient(100deg, rgba(39,36,29,.92) 0%, rgba(39,36,29,.78) 45%, rgba(39,36,29,.45) 100%), url("../img/hero-1.jpg");
	background-size: cover;
	background-position: center;
	color: var(--white);
	padding: 7rem 0 6rem;
	position: relative;
	overflow: hidden;
}
.hero-inner {
	position: relative;
	max-width: 700px;
}
.hero-badge {
	display: inline-block;
	background: rgba(221,107,32,.25);
	color: #ffb27a;
	border: 1px solid rgba(221,107,32,.5);
	padding: .3rem .9rem;
	border-radius: 100px;
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .05em;
	text-transform: uppercase;
	margin-bottom: 1.25rem;
}
.hero h1 { margin-bottom: 1.25rem; color: var(--white); }
.hero p {
	font-size: 1.15rem;
	color: rgba(255,255,255,.75);
	margin-bottom: 2rem;
	max-width: 560px;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-stats {
	display: flex;
	gap: 3rem;
	margin-top: 4rem;
	padding-top: 2.5rem;
	border-top: 1px solid rgba(255,255,255,.1);
}
.stat-value {
	font-size: 2rem;
	font-weight: 800;
	color: var(--accent);
	line-height: 1;
}
.stat-label {
	font-size: .85rem;
	color: rgba(255,255,255,.6);
	margin-top: .25rem;
}

/* ── Services grid ── */
.services-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.5rem;
}

.service-card {
	background: var(--white);
	border-radius: var(--radius);
	padding: 1.75rem;
	box-shadow: var(--shadow-sm);
	border: 1px solid var(--border);
	transition: transform var(--transition), box-shadow var(--transition);
}
.service-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
}
.service-icon {
	width: 52px;
	height: 52px;
	background: #fdf0e2;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--accent);
	margin-bottom: 1.1rem;
}
.service-card h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.service-card p { font-size: .9rem; color: var(--text-light); }

/* ── News cards ── */
.news-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.75rem;
}

.news-card {
	background: var(--white);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	border: 1px solid var(--border);
	transition: transform var(--transition), box-shadow var(--transition);
	display: flex;
	flex-direction: column;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.news-card-img {
	aspect-ratio: 16/9;
	overflow: hidden;
	background: var(--dark-sec);
}
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-card:hover .news-card-img img { transform: scale(1.04); }
.news-card-img-placeholder {
	aspect-ratio: 16/9;
	background: linear-gradient(135deg, var(--dark) 0%, var(--dark-sec) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255,255,255,.2);
}
.news-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.news-date { font-size: .8rem; color: var(--text-light); margin-bottom: .5rem; }
.news-card h3 { margin-bottom: .5rem; font-size: 1.05rem; }
.news-card h3 a { color: var(--dark); }
.news-card h3 a:hover { color: var(--accent); }
.news-excerpt { font-size: .9rem; color: var(--text-light); flex: 1; }
.news-read-more {
	display: inline-flex;
	align-items: center;
	gap: .3rem;
	font-size: .85rem;
	font-weight: 600;
	color: var(--accent);
	margin-top: 1rem;
}
.news-read-more:hover { color: var(--accent-dark); gap: .5rem; }

/* ── Gallery ── */
.gallery-filter {
	display: flex;
	gap: .5rem;
	flex-wrap: wrap;
	margin-bottom: 2rem;
}
.gallery-filter a {
	display: inline-block;
	padding: .4rem 1.1rem;
	border-radius: 100px;
	font-size: .85rem;
	font-weight: 600;
	color: var(--text-light);
	border: 1.5px solid var(--border);
	background: var(--white);
	transition: all var(--transition);
}
.gallery-filter a:hover,
.gallery-filter a.active {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--white);
}

.gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 1rem;
}
.gallery-item {
	position: relative;
	aspect-ratio: 4/3;
	overflow: hidden;
	border-radius: var(--radius);
	cursor: pointer;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0);
	transition: background var(--transition);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--white);
}
.gallery-item:hover .gallery-item-overlay { background: rgba(0,0,0,.35); }

/* ── Two-column split (About history, homepage location) ── */
.split-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 4rem;
	align-items: start;
}
.split-grid--center { align-items: center; }

.stat-grid-2x2 {
	background: #faf9f7;
	border-radius: 8px;
	padding: 2rem;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1.5rem;
}
.stat-grid-2x2-item { text-align: center; }
.stat-grid-2x2-value { font-size: 2.5rem; font-weight: 800; color: var(--accent); }
.stat-grid-2x2-label { font-size: .85rem; color: var(--text-light); margin-top: .25rem; }

/* ── Contact section ── */
.contact-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
	gap: 3rem;
	align-items: start;
}
.contact-info h3 { margin-bottom: 1.5rem; }
.contact-item {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	margin-bottom: 1.5rem;
}
.contact-item-icon {
	width: 44px;
	height: 44px;
	background: #fdf0e2;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--accent);
	flex-shrink: 0;
}
.contact-item-label { font-size: .8rem; color: var(--text-light); }
.contact-item-value { font-weight: 600; color: var(--dark); }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
	display: block;
	font-size: .875rem;
	font-weight: 600;
	margin-bottom: .4rem;
	color: var(--dark);
}
.form-group input:not([type=submit]):not([type=checkbox]):not([type=radio]),
.form-group textarea,
.form-group select {
	width: 100%;
	padding: .7rem 1rem;
	border: 1.5px solid var(--border);
	border-radius: var(--radius);
	font-size: .95rem;
	font-family: inherit;
	color: var(--text);
	background: var(--white);
	transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:not([type=submit]):not([type=checkbox]):not([type=radio]):focus,
.form-group textarea:focus,
.form-group select:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px rgba(221,107,32,.12);
}
.form-group textarea { resize: vertical; min-height: 130px; }

/* Nette form errors */
.form-group .error { color: #e53e3e; font-size: .82rem; margin-top: .3rem; }
input.error, textarea.error { border-color: #e53e3e; }

/* ── Flash messages ── */
.flash {
	padding: .85rem 1.25rem;
	border-radius: var(--radius);
	margin-bottom: 1rem;
	font-weight: 500;
	font-size: .9rem;
}
.flash-success { background: #f0fff4; color: #276749; border: 1px solid #9ae6b4; }
.flash-error, .flash-danger { background: #fff5f5; color: #c53030; border: 1px solid #feb2b2; }
.flash-info { background: #ebf8ff; color: #2b6cb0; border: 1px solid #90cdf4; }

/* ── Page header ── */
.page-header {
	background: var(--dark);
	color: var(--white);
	padding: 3.5rem 0;
	position: relative;
}
.page-header::after {
	content: '';
	position: absolute;
	bottom: 0; left: 0; right: 0;
	height: 3px;
	background: var(--accent);
}
.page-header h1 { color: var(--white); }
.page-header p { color: rgba(255,255,255,.65); margin-top: .5rem; font-size: 1.05rem; }

/* ── Article detail ── */
.article-content {
	max-width: 760px;
	margin: 0 auto;
}
.article-header { margin-bottom: 2rem; }
.article-meta { color: var(--text-light); font-size: .875rem; margin-top: .5rem; }
.article-image {
	border-radius: var(--radius);
	overflow: hidden;
	margin-bottom: 2rem;
	aspect-ratio: 16/7;
}
.article-image img { width: 100%; height: 100%; object-fit: cover; }
.article-body { font-size: 1.05rem; line-height: 1.8; }
.article-body p { margin-bottom: 1.25rem; }
.article-body h2 { margin: 2rem 0 1rem; }
.article-body ul, .article-body ol { margin: 0 0 1.25rem 1.25rem; padding-left: 1rem; }
.article-body li { margin-bottom: .5rem; }
.article-body li:last-child { margin-bottom: 0; }

/* ── Lightbox ── */
#lightbox {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.92);
	z-index: 9999;
	align-items: center;
	justify-content: center;
	gap: 1rem;
}
#lightbox.open { display: flex; }
.lb-inner {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .5rem;
	max-width: min(90vw, calc(100vw - 120px));
	max-height: 90vh;
}
.lb-inner img {
	max-width: min(90vw, calc(100vw - 120px));
	max-height: 80vh;
	object-fit: contain;
	border-radius: 4px;
	display: block;
}
.lb-close {
	position: absolute;
	top: -2.5rem;
	right: 0;
	background: none;
	border: none;
	color: #fff;
	font-size: 2.5rem;
	cursor: pointer;
	line-height: 1;
	padding: 0;
}
.lb-caption {
	color: rgba(255,255,255,.8);
	font-size: .9rem;
	text-align: center;
	margin: 0;
	max-width: 600px;
}
.lb-nav {
	flex-shrink: 0;
	background: rgba(255,255,255,.15);
	border: none;
	color: #fff;
	font-size: 3rem;
	line-height: 1;
	cursor: pointer;
	padding: .1rem .7rem;
	border-radius: 6px;
	transition: background .15s;
}
.lb-nav:hover { background: rgba(255,255,255,.28); }
.lb-nav.is-hidden { visibility: hidden; }

@media (max-width: 700px) {
	.lb-nav { font-size: 2rem; padding: .3rem .55rem; }
	.lb-close { top: -2.2rem; right: .25rem; font-size: 2rem; }
}

/* ── Map ── */
.map-wrapper {
	border-radius: var(--radius);
	overflow: hidden;
	height: 380px;
	margin-top: 3rem;
	border: 1px solid var(--border);
}
.map-wrapper iframe { width: 100%; height: 100%; border: 0; }

/* ── Footer ── */
.site-footer {
	background: var(--dark);
	color: rgba(255,255,255,.7);
	padding: 4rem 0 2rem;
}
.footer-grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: 3rem;
	margin-bottom: 3rem;
}
.footer-brand .nav-logo { display: block; margin-bottom: 1rem; }
.footer-logo-img { height: 44px; filter: brightness(0) invert(1); }
.footer-brand p { font-size: .9rem; line-height: 1.7; }
.footer-col h4 {
	color: var(--white);
	font-size: .9rem;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	margin-bottom: 1.25rem;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: rgba(255,255,255,.65); font-size: .9rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
	border-top: 1px solid rgba(255,255,255,.1);
	padding-top: 1.5rem;
	text-align: center;
	font-size: .85rem;
}

/* ── Breadcrumb ── */
.breadcrumb {
	display: flex;
	align-items: center;
	gap: .5rem;
	font-size: .85rem;
	color: var(--text-light);
	margin-bottom: 2rem;
}
.breadcrumb a { color: var(--accent); }
.breadcrumb-sep { color: var(--border); }

/* ── Responsive ── */
@media (max-width: 900px) {
	.contact-grid { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.hero-stats { gap: 2rem; }
	.split-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 700px) {
	section { padding: 3.5rem 0; }
	.nav-links { display: none; flex-direction: column; position: absolute; top: 78px; left: 0; right: 0; background: var(--dark); padding: 1rem 1.5rem; gap: 0; }
	.nav-links.open { display: flex; }
	.nav-links a { padding: .75rem 0; color: rgba(255,255,255,.85); border-bottom: 1px solid rgba(255,255,255,.08); }
	.nav-links a:last-child { border-bottom: none; }
	.nav-toggle { display: block; }
	.site-header { position: relative; }
	.hero-stats { flex-wrap: wrap; gap: 1.5rem; }
	.footer-grid { grid-template-columns: 1fr; gap: 2rem; }
	.stat-grid-2x2 { padding: 1.5rem; gap: 1rem; }
	.stat-grid-2x2-value { font-size: 2rem; }
}

@media (max-width: 480px) {
	.stat-grid-2x2 { grid-template-columns: 1fr 1fr; }
	.hero { padding: 5rem 0 4rem; }
	.container { padding: 0 1rem; }
}
