/* AV motors, versija 5 "Grafīts": grafīta un tērauda pelēkais, sarkans akcents */
:root {
  --bg: #1d2024;
  --bg-2: #24272c;
  --surface: #2b2f35;
  --surface-2: #343940;
  --line: #3e444c;
  --line-2: #4e555e;
  --text: #f1f2f4;
  --muted: #b9bfc6;
  --dim: #9aa2ab;
  --red: #f04249;
  --red-2: #d8363d;
  --steel: #e4e7ea;
  --font: "Geologica", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1240px;
  --pad: 20px;
  --radius: 6px;
  --bar-h: 80px;
  --head-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--bar-h);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dt, dd { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.08; letter-spacing: -0.015em; }
h1 { font-size: clamp(36px, 4.6vw, 62px); font-weight: 800; }
h2 { font-size: clamp(28px, 3.4vw, 44px); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.skip { position: absolute; left: 8px; top: -80px; z-index: 200; background: #fff; color: var(--bg); padding: 10px 16px; font-weight: 700; border-radius: var(--radius); }
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.label {
  display: inline-block;
  font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
  border-left: 3px solid var(--red); padding-left: 12px; line-height: 1.2;
}
.lead { color: var(--muted); font-size: clamp(17px, 1.3vw, 20px); max-width: 48ch; }

/* Pogas */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; padding: 0 24px;
  border-radius: var(--radius); border: 2px solid transparent;
  font-weight: 700; font-size: 19px; line-height: 1.1; text-decoration: none;
  transition: background-color .18s, border-color .18s, color .18s, transform .08s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--red { background: var(--red); border-color: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-2); border-color: var(--red-2); }
.btn--steel { background: var(--surface-2); border-color: var(--line-2); color: #fff; }
.btn--steel:hover { background: #3e444c; border-color: var(--steel); }
.btn--white { background: #fff; border-color: #fff; color: var(--bg); }
.btn--white:hover { background: var(--steel); border-color: var(--steel); }
.btn--xl { min-height: 66px; font-size: 21px; padding: 0 30px; }
.badge { display: inline-block; background: var(--bg); color: #fff; border-radius: 4px; padding: 2px 9px; font-size: 14px; font-weight: 700; line-height: 1.4; }

/* Galvene */
.top { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--head-h); }
.logo { display: inline-flex; align-items: center; min-height: 48px; }
.logo img { width: 132px; height: auto; }
.nav { display: none; }
.top__right { display: flex; align-items: center; gap: 14px; }
.top__phone { display: none; }
.lang { display: flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.lang button { min-width: 44px; min-height: 44px; padding: 0 10px; font-size: 14px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); background: var(--bg); border-right: 1px solid var(--line-2); transition: background-color .15s, color .15s; }
.lang button:last-child { border-right: 0; }
.lang button:hover { color: #fff; background: var(--surface); }
.lang button[aria-pressed="true"] { background: #fff; color: var(--bg); }

/* Hero: dalīts */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--bg-2); }
.hero__text { display: flex; align-items: center; padding: clamp(36px, 6vw, 80px) var(--pad); text-align: center; }
.hero__inner { width: 100%; max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.hero__inner .label { margin-bottom: 18px; }
.hero__inner h1 { max-width: 16ch; }
.hero__inner .lead { margin-top: 18px; }
.cta { display: grid; grid-template-columns: 1fr; gap: 12px; width: 100%; margin-top: 28px; }
.hero__meta { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 26px; font-size: 15px; color: var(--muted); }
.hero__meta-item { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta-item .ic { width: 18px; height: 18px; }
.hero__photo { position: relative; min-height: 240px; border-top: 3px solid var(--red); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; }

/* Statuss */
.status { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; color: var(--text); }
.status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dim); flex: none; }
.status.is-open .dot { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
.status.is-closed .dot { background: var(--red); box-shadow: 0 0 0 3px rgba(240,66,73,.22); }
.status--big { font-size: 20px; margin: 20px 0 22px; }

/* Josla ar faktiem */
.strip { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip__row { display: grid; grid-template-columns: 1fr; }
.strip__item { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 500; font-size: 15.5px; }
.strip__item:last-child { border-bottom: 0; }
.strip__item .ic { width: 20px; height: 20px; color: var(--red); stroke-width: 2.4; }

/* Sadaļas */
.sec { padding: clamp(56px, 7vw, 104px) 0; }
.sec--alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec__head { margin-bottom: clamp(28px, 4vw, 44px); }
.sec__head h2 { margin-top: 14px; max-width: 20ch; }
.sec__lead { color: var(--muted); margin-top: 12px; max-width: 52ch; }

/* Pakalpojumu flīzes */
.tiles { display: grid; grid-template-columns: 1fr; gap: 16px; }
.tile {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; min-width: 0;
  transition: border-color .2s, transform .2s;
}
.tile:hover { border-color: var(--line-2); transform: translateY(-2px); }
.tile__photo { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg); }
.tile__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover .tile__photo img { transform: scale(1.04); }
.tile__body { display: flex; flex-direction: column; gap: 18px; padding: 18px 18px 20px; flex: 1; }
.tile__text { display: block; }
.tile__h { display: block; font-size: 20px; font-weight: 700; line-height: 1.2; }
.tile__p { display: block; color: var(--muted); font-size: 15.5px; margin-top: 8px; }
.tile__cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; align-self: flex-start;
  min-height: 48px; padding: 0 18px; margin-top: auto;
  border: 2px solid var(--steel); border-radius: var(--radius);
  font-weight: 700; font-size: 16px; color: #fff;
  transition: background-color .18s, border-color .18s;
}
.tile__cta .ic { width: 18px; height: 18px; transition: transform .2s; }
.tile:hover .tile__cta { background: var(--red); border-color: var(--red); }
.tile:hover .tile__cta .ic { transform: translateX(3px); }

/* Pilnais saraksts */
.list-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.sec__head--side { margin-bottom: 0; }
.sec__head--side .btn { margin-top: 24px; }
.list-col { position: relative; }
.svc-list li {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 18px; font-weight: 500;
}
.svc-list li::before { content: ""; width: 8px; height: 8px; background: var(--red); border-radius: 2px; flex: none; }
.svc-list--more li:last-child { border-bottom: 0; }
.svc-list:first-child li:first-child { border-top: 1px solid var(--line); }
.list-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s ease; }
.list-more > ul { min-height: 0; overflow: hidden; }
.list-more.is-open { grid-template-rows: 1fr; }
.list-more.is-open > ul { overflow: visible; }
body.no-js .list-more { grid-template-rows: 1fr; }
body.no-js #listToggle { display: none; }
.peek { display: none; }

/* Par mums */
.about__grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.about__photo { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.about__text h2 { margin: 14px 0 18px; }
.about__text p + p { margin-top: 12px; }
.about__text p { color: var(--muted); }
.about__facts { margin-top: 26px; border-top: 1px solid var(--line); }
.about__facts li { display: flex; flex-direction: column; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.about__facts b { font-size: 18px; font-weight: 700; }
.about__facts span { color: var(--muted); font-size: 15.5px; }

/* Darba laiks un kontakti */
.info-grid { display: grid; grid-template-columns: 1fr; gap: 48px; }
.hours h2, .contact h2 { margin-top: 14px; }
.hours__table { width: 100%; border-collapse: collapse; font-size: 17px; }
.hours__table th, .hours__table td { text-align: left; padding: 13px 12px; border-bottom: 1px solid var(--line); }
.hours__table thead th { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); border-bottom: 2px solid var(--line-2); padding-top: 0; }
.hours__table tbody th { font-weight: 600; }
.hours__table td { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.hours__table td.closed { color: var(--muted); }
.hours__table tr.is-today th, .hours__table tr.is-today td { background: var(--surface); }
.hours__table tr.is-today th { box-shadow: inset 3px 0 0 var(--red); }
.today-tag { display: none; margin-left: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
tr.is-today .today-tag { display: inline; }

.contact__list { margin-top: 24px; }
.contact__list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact__list .ic { margin-top: 4px; color: var(--muted); }
.contact__list a { font-size: 19px; font-weight: 700; text-decoration: none; text-decoration-color: var(--red); }
.contact__list a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact__list small { display: block; color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.contact__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.req { margin-top: 26px; font-size: 14.5px; color: var(--muted); }
.req div { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.req dt { flex: 0 0 110px; color: var(--dim); }
.req dd { color: var(--text); }

/* Kājene */
.foot { padding: 32px 0 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.foot__row { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.foot img { width: 110px; height: auto; }
.foot__nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot__nav a { text-decoration: underline; text-underline-offset: 4px; }
.foot__nav a:hover { color: #fff; }

/* Apakšējā josla telefonā */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  background: rgba(29, 32, 36, .96); border-top: 1px solid var(--line);
}
.bar .btn { min-height: 56px; }

/* Dialogi */
.dlg { border: 1px solid var(--line-2); border-radius: 10px 10px 0 0; background: var(--surface); color: var(--text); padding: 0; width: 100%; max-width: none; margin: auto 0 0; max-height: 92vh; }
.dlg::backdrop { background: rgba(10, 12, 14, .7); }
.dlg__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dlg__h { font-size: 24px; line-height: 1.15; }
.dlg__x { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); border: 1px solid var(--line-2); flex: none; color: var(--text); }
.dlg__x:hover { background: var(--surface-2); }
.dlg--map { padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); }
.dlg__addr { color: var(--muted); margin-top: 8px; }
.dlg__btns { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 20px; }
.dlg--svc { overflow: auto; }
.dlg__photo { aspect-ratio: 16 / 9; overflow: hidden; }
.dlg__photo img { width: 100%; height: 100%; object-fit: cover; }
.dlg__content { padding: 20px 20px calc(24px + env(safe-area-inset-bottom)); }
.dlg__p { color: var(--muted); margin: 10px 0 20px; }
.dlg__list { margin-top: 12px; border-top: 1px solid var(--line); }
.dlg__list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.dlg__list li::before { content: ""; width: 7px; height: 7px; background: var(--red); border-radius: 2px; flex: none; }

/* Sīkdatnes */
.cookie {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--bar-h) + 10px); z-index: 70;
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 16px; font-size: 14.5px; color: var(--text);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
.cookie[hidden] { display: none; }
.cookie .btn { min-height: 48px; font-size: 16px; }

/* ≥ 600 */
@media (min-width: 600px) {
  .cta { grid-template-columns: 1fr 1fr; }
  .hero__meta { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 10px 22px; }
  .strip__row { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile--wide { grid-column: 1 / -1; }
  .cookie { left: auto; right: 20px; width: 380px; flex-direction: row; align-items: center; }
  .dlg__btns { grid-template-columns: 1fr 1fr; }
}

/* ≥ 768 */
@media (min-width: 768px) {
  :root { --pad: 28px; }
  .top__phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; font-size: 16px; }
  .top__phone:hover { color: var(--red); }
  .about__grid { grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
  .info-grid { grid-template-columns: 1fr 1fr; gap: 48px; }
  .foot__row { flex-direction: row; align-items: center; justify-content: space-between; }
  .dlg { margin: auto; border-radius: 10px; max-width: 560px; }
  .dlg--svc { max-width: 720px; }
  .dlg__photo { aspect-ratio: 21 / 8; }
}

/* ≥ 1024: dalītais hero, lielā josla paliek tikai telefonā */
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .bar { display: none; }
  .cookie { bottom: 20px; }
  .nav { display: flex; gap: 28px; }
  .nav a { text-decoration: none; font-weight: 600; font-size: 16px; color: var(--muted); padding: 6px 0; border-bottom: 2px solid transparent; }
  .nav a:hover { color: #fff; border-bottom-color: var(--red); }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100vh - var(--head-h)); max-height: 820px; }
  .hero__text { text-align: left; padding: 48px clamp(28px, 4vw, 64px) 48px max(var(--pad), calc((100vw - var(--wrap)) / 2 + var(--pad))); }
  .hero__inner { margin: 0; max-width: 560px; align-items: flex-start; }
  .hero__meta { justify-content: flex-start; }
  .cta { width: auto; grid-template-columns: auto auto; }
  .hero__photo { border-top: 0; border-left: 4px solid var(--red); min-height: 0; }
  .hero__photo img { position: absolute; inset: 0; aspect-ratio: auto; }
  .strip__row { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 28px; }
  .strip__item { border-bottom: 0; border-right: 1px solid var(--line); padding: 18px 20px 18px 0; }
  .strip__item:last-child { border-right: 0; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .tile--wide { grid-column: span 2; }
  .tile--wide .tile__photo { aspect-ratio: auto; flex: 1; min-height: 280px; }
  .tile--wide .tile__h { font-size: 24px; }
  .tile__body { flex: none; }
  .tile--wide .tile__body { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .list-grid { grid-template-columns: 1fr 1.6fr; gap: 56px; align-items: start; }
  .sec__head--side { position: sticky; top: calc(var(--head-h) + 32px); }
  .svc-list li { padding: 18px 0; font-size: 19px; }
  /* Bilde parādās blakus rindai, kad uz tās tur peli */
  .peek {
    display: block; position: absolute; right: 0; top: 50%; width: 220px; aspect-ratio: 4 / 3; z-index: 3;
    opacity: 0; pointer-events: none; overflow: hidden; border-radius: var(--radius);
    border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0,0,0,.55);
    transform: translateY(-50%) translateX(8px); transition: opacity .25s, transform .35s ease;
  }
  .peek img { width: 100%; height: 100%; object-fit: cover; }
  .svc-list li:hover { color: #fff; }
  .svc-list li:hover .peek { opacity: 1; transform: translateY(-50%) translateX(0); }
  .about__grid { gap: 64px; }
  .info-grid { gap: 72px; }
}

@media (min-width: 1280px) {
  .hero__inner h1 { font-size: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .bar, .cookie, .top, .peek { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
  .list-more { grid-template-rows: 1fr; }
}
