/* ============================================================
   David Servis spol. s r.o. – Hlavní stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:wght@300;400;600;700&display=swap');

:root {
  --primary:       #1b8bd9;
  --primary-dark:  #1470b0;
  --primary-light: #e8f4fd;
  --dark:          #0f172a;
  --dark-2:        #1e293b;
  --text:          #334155;
  --text-light:    #64748b;
  --bg-light:      #f8fafc;
  --border:        #e2e8f0;
  --white:         #ffffff;
  --header-h:      70px;
  --radius:        8px;
  --shadow:        0 2px 16px rgba(0,0,0,0.08);
  --shadow-lg:     0 8px 40px rgba(0,0,0,0.14);
  --ease:          0.25s ease;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Titillium Web', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}
img  { max-width: 100%; height: auto; display: block; }
ul   { list-style: none; }
a    { color: var(--primary); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--primary-dark); }

/* ── Typography ──────────────────────────────────────────── */
h1,h2,h3,h4 { font-weight: 700; line-height: 1.2; color: var(--dark); }
h1 { font-size: clamp(2rem,   5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: clamp(1.1rem, 2vw,  1.45rem); }
h4 { font-size: 1.05rem; }
p  { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ── Layout ─────────────────────────────────────────────── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

.section         { padding: 80px 0; }
.section--light  { background: var(--bg-light); }
.section--dark   { background: var(--dark); color: var(--white); }
.section--dark h2,
.section--dark h3 { color: var(--white); }

.section-title    { text-align: center; margin-bottom: 12px; }
.section-subtitle {
  text-align: center; color: var(--text-light);
  max-width: 640px; margin: 0 auto 48px;
  font-size: 1.05rem;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--dark);
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.35);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1140px; margin: 0 auto;
  padding: 0 24px; height: 100%;
}
.logo img { height: 38px; width: auto; }
.header-back {
  color: rgba(255,255,255,0.7); font-size: 0.9rem;
  display: flex; align-items: center; gap: 6px;
  transition: color var(--ease);
}
.header-back:hover { color: var(--white); }
.header-contact { color: rgba(255,255,255,0.8); font-size: 0.9rem; }
.header-contact a { color: var(--white); }
.header-contact a:hover { color: var(--primary); }

/* ── Rozcestník (main page) ─────────────────────────────── */
.rozcestnik {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: calc(50vh - var(--header-h) / 2) calc(50vh - var(--header-h) / 2);
  height: calc(100vh - var(--header-h));
  margin-top: var(--header-h);
}

.division-panel {
  position: relative; overflow: hidden;
  background-size: cover; background-position: center;
  background-color: var(--dark-2);
  display: flex; align-items: flex-end;
  text-decoration: none;
}
.division-panel::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.25) 55%, transparent 100%);
  transition: opacity var(--ease);
}
.division-panel::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(27,139,217,0);
  transition: background 0.3s ease;
}
.division-panel:hover::after { background: rgba(27,139,217,0.22); }

.division-panel-content {
  position: relative; z-index: 1;
  padding: 36px; width: 100%;
}
.division-panel-tag {
  display: inline-block;
  background: var(--primary); color: white;
  font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  padding: 3px 10px; border-radius: 3px;
  margin-bottom: 10px;
}
.division-panel-title {
  font-size: clamp(1.3rem, 2.2vw, 2rem);
  font-weight: 700; color: white; line-height: 1.1;
  margin-bottom: 7px;
}
.division-panel-claim { color: rgba(255,255,255,0.78); font-size: 0.92rem; margin-bottom: 14px; }
.division-panel-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  color: white; font-size: 0.82rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  opacity: 0; transform: translateX(-8px);
  transition: opacity var(--ease), transform var(--ease);
}
.division-panel:hover .division-panel-arrow { opacity: 1; transform: translateX(0); }

/* ── Hero (division pages) ───────────────────────────────── */
.hero {
  margin-top: var(--header-h);
  background: var(--dark); background-size: cover; background-position: center;
  position: relative; padding: 100px 0; min-height: 460px;
  display: flex; align-items: center;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(15,23,42,0.72);
}
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero-eyebrow {
  display: inline-block; color: var(--primary);
  font-size: 0.82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px; margin-bottom: 16px;
}
.hero h1 { color: white; margin-bottom: 20px; }
.hero-subtitle { color: rgba(255,255,255,0.8); font-size: 1.1rem; margin-bottom: 32px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 30px; border-radius: 6px;
  font-family: inherit; font-size: 0.92rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  cursor: pointer; border: 2px solid transparent;
  transition: all var(--ease); text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: white; }
.btn-outline { background: transparent; color: white; border-color: rgba(255,255,255,0.55); }
.btn-outline:hover { border-color: white; color: white; }

/* ── Service cards (icon style) ──────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 24px; margin-top: 40px;
}
.service-item {
  padding: 28px; background: var(--white);
  border-radius: var(--radius); box-shadow: var(--shadow);
  border-top: 3px solid var(--primary);
  transition: transform var(--ease), box-shadow var(--ease);
}
.service-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.service-icon { font-size: 2rem; margin-bottom: 14px; }
.service-item h3 { margin-bottom: 8px; font-size: 1.15rem; }
.service-item p { color: var(--text-light); font-size: 0.95rem; }

/* ── About ───────────────────────────────────────────────── */
.about-text h2 { margin-bottom: 20px; }
.about-text p  { color: var(--text-light); font-size: 1.02rem; }
.about-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px;
}
.stat-item {
  background: var(--primary-light); border-radius: var(--radius);
  padding: 20px; text-align: center;
}
.stat-number { display: block; font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-label  { font-size: 0.82rem; color: var(--text-light); }

/* ── Why-us cards ────────────────────────────────────────── */
.why-card {
  text-align: center; padding: 36px 20px;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
}
.why-number { display: block; font-size: 2.8rem; font-weight: 700; color: var(--primary); line-height: 1; margin-bottom: 8px; }
.why-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.why-card p  { color: var(--text-light); font-size: 0.88rem; }

/* ── Client tags ─────────────────────────────────────────── */
.client-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.client-tag {
  background: var(--bg-light); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 18px;
  font-size: 0.88rem; font-weight: 600; color: var(--text);
}

/* ── Job card ────────────────────────────────────────────── */
.job-card {
  background: var(--white); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}
.job-card h3 { margin-bottom: 14px; }
.job-details  { display: flex; flex-wrap: wrap; gap: 18px; margin: 20px 0; }
.job-detail   { display: flex; align-items: center; gap: 7px; font-size: 0.9rem; color: var(--text-light); }
.job-detail strong { color: var(--text); }

/* ── Contact ─────────────────────────────────────────────── */
.contact-info h3 { margin-bottom: 24px; }
.contact-detail  { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.contact-detail-icon {
  width: 40px; height: 40px; background: var(--primary-light);
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; font-size: 1.1rem;
}
.contact-detail-text strong {
  display: block; font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-light); margin-bottom: 3px;
}
.contact-detail-text a { color: var(--text); font-weight: 600; }
.contact-detail-text a:hover { color: var(--primary); }
.contact-person {
  background: var(--bg-light); border-radius: var(--radius);
  padding: 16px 20px; margin-top: 12px;
}
.contact-person strong { display: block; margin-bottom: 2px; }
.contact-person .role  { font-size: 0.82rem; color: var(--text-light); }
.contact-person .links { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.contact-person .links a { font-size: 0.88rem; color: var(--text-light); }
.contact-person .links a:hover { color: var(--primary); }

/* ── Form ────────────────────────────────────────────────── */
.form-title { margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-weight: 600; font-size: 0.88rem;
  margin-bottom: 6px; color: var(--text);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: 11px 15px;
  border: 2px solid var(--border); border-radius: 6px;
  font-family: inherit; font-size: 1rem; color: var(--text);
  background: var(--white); appearance: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,139,217,0.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-note { font-size: 0.82rem; color: var(--text-light); margin-top: 12px; }

/* ── Divider ─────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { background: var(--dark); color: rgba(255,255,255,0.55); padding: 30px 0; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
}
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: rgba(255,255,255,0.55); font-size: 0.88rem; transition: color var(--ease); }
.footer-links a:hover { color: white; }

/* ── Motor / product cards ───────────────────────────────── */
.motor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px; margin-top: 40px;
}
.motor-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease);
}
.motor-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.motor-card-img {
  background: var(--bg-light); height: 180px;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; border-bottom: 1px solid var(--border);
}
.motor-card-img img { max-height: 140px; width: auto; object-fit: contain; }
.motor-card-body { padding: 22px; }
.motor-card-serie {
  display: inline-block; background: var(--primary); color: white;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; padding: 2px 9px; border-radius: 3px;
  margin-bottom: 8px;
}
.motor-card-body h3 { font-size: 1.1rem; margin-bottom: 6px; }
.motor-card-body p  { color: var(--text-light); font-size: 0.9rem; }
.motor-card-spec {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 0.82rem; color: var(--text-light);
}
.motor-card-spec strong { color: var(--text); }

/* ── Motor grid 4-col override ───────────────────────────── */
.motor-grid--4col {
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 960px) {
  .motor-grid--4col { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .motor-grid--4col { grid-template-columns: 1fr; }
}

/* ── Motor variant table ─────────────────────────────────── */
.motor-card-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 0.82rem; }
.motor-card-table th {
  text-align: left; padding: 5px 8px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-light);
  border-bottom: 2px solid var(--border); background: var(--bg-light);
}
.motor-card-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.motor-card-table tbody tr:last-child td { border-bottom: none; }
.motor-card-table tbody tr:hover { background: var(--primary-light); }
.mv-model { font-weight: 700; font-size: 0.95rem; color: var(--dark); font-variant-numeric: tabular-nums; }
.mv-kw { font-weight: 700; color: var(--primary); white-space: nowrap; }
.mv-use { font-size: 0.75rem; color: var(--text-light); font-style: italic; margin-top: 2px; line-height: 1.3; }
.mv-badge-air   { display: inline-block; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; border-radius: 3px; padding: 1px 6px; font-size: 0.7rem; font-weight: 700; }
.mv-badge-water { display: inline-block; background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; border-radius: 3px; padding: 1px 6px; font-size: 0.7rem; font-weight: 700; }
.mv-badge-efi   { display: inline-block; background: #fefce8; color: #92400e; border: 1px solid #fde68a; border-radius: 3px; padding: 1px 6px; font-size: 0.7rem; font-weight: 700; margin-left: 3px; }

/* Motor series group row */
.motor-card-table .grp-row td {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-light);
  background: var(--bg-light); padding: 4px 8px;
  border-top: 1px solid var(--border);
}

/* Discontinued badge */
.motor-discontinued {
  display: inline-flex; align-items: center; gap: 5px;
  background: #f1f5f9; color: var(--text-light);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 4px 10px; font-size: 0.75rem; font-weight: 600;
  margin-top: 10px;
}

/* ── Reference logos ─────────────────────────────────────── */
.logos-grid {
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: center;
  margin-top: 40px;
}
.logo-item {
  width: 160px; height: 80px;
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  padding: 12px; transition: box-shadow var(--ease), transform var(--ease);
}
.logo-item:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.logo-item img {
  max-width: 120px; max-height: 52px;
  object-fit: contain;
  filter: grayscale(100%); opacity: 0.55;
  transition: filter var(--ease), opacity var(--ease);
}
.logo-item:hover img { filter: grayscale(0%); opacity: 1; }

/* ── Utilities ───────────────────────────────────────────── */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.mt-8  { margin-top:  8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-48 { margin-bottom: 48px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .rozcestnik {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 45vw);
    height: auto;
  }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .section { padding: 60px 0; }
  .hero { padding: 60px 0; min-height: 320px; }
  .division-panel-content { padding: 24px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .about-stats { grid-template-columns: 1fr; }
  .why-card { padding: 28px 16px; }
}
