/* Farby a typografia prevzaté z vykupkovovpetrzalka.sk (Avada) */
:root {
  color-scheme: light;
  --accent: #1877a9; /* web má #1a80b6, stmavené na kontrast 4,5 aj na #f6f6f6 */
  --accent-tab: #166d9b; /* lišta je priesvitná, nad tmavou pätičkou treba tmavší odtieň */
  --text: #747474;
  --heading: #333333;
  --sep: #e0dede;
  --border: #d2d3d4;
  --titlebar-bg: #f6f6f6;
  --footer-bg: #282a2b;
  --footer-text: #959292; /* web #8c8989, zosvetlené na kontrast 4,5 */
  --img-border: #eaeaea;
  --font-body: "PT Sans", Arial, Helvetica, sans-serif;
  --font-heading: "Roboto Slab", Georgia, serif;
  --tabbar-h: 62px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --press: transform 160ms var(--ease-out);
  --metal: #444444;
  --site-w: 1160px;
  --gutter: 10px;
}

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

html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

body {
  margin: 0;
  background: var(--metal);
  color: var(--text);
  font: 400 15px/1.5 var(--font-body);
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  overflow-wrap: break-word;
}

/* Perforovaný brúsený kov z webu (boxed layout Avady). Pevná vrstva cez ::before,
   lebo background-attachment: fixed iOS Safari ignoruje. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    url("/img/kov-diery.svg") center top / 36px 36px,
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(255, 255, 255, .16), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 40%, transparent 45%, rgba(0, 0, 0, .55)),
    url("/img/kov-brus.svg") 0 0 / 320px 320px,
    var(--metal);
}

/* Biely box obsahu s tieňom nad kovom */
.page {
  max-width: var(--site-w);
  margin: 0 var(--gutter);
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 4px 12px rgba(0, 0, 0, .35), 0 0 40px 4px rgba(0, 0, 0, .35);
}
@media (min-width: 1200px) { .page { margin: 0 auto; } }

a { color: var(--accent); text-decoration: none; }
/* Odkaz v odseku sa musí odlíšiť od textu aj inak než farbou. */
main p a:not(.btn) { text-decoration: underline; text-underline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--heading);
}
h1 { font-size: 28px; line-height: 1.4; margin: 0 0 20px; }
h2 { font-size: 24px; line-height: 1.5; margin: 0 0 12px; }
h3 { font-size: 16px; line-height: 1.5; margin: 0; }
h5 { font-size: 14px; line-height: 1.5; margin: 0; }
p { margin: 0 0 20px; }

/* Horný pruh + hlavička */
.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 8px;
  padding: 8px 16px;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  border-bottom: 1px solid var(--sep);
}
.topbar a { color: var(--text); }
.topbar-tag { flex-basis: 100%; }

.header {
  display: flex;
  justify-content: center;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
.header { flex-direction: column; align-items: center; gap: 2px; }
.powered { padding: 5px 8px; font-size: 11px; line-height: 1.4; letter-spacing: .02em; color: var(--text); }
@media (hover: hover) and (pointer: fine) { .powered:hover { color: var(--accent); } }

.titlebar {
  background: var(--titlebar-bg);
  border-bottom: 1px solid var(--border);
  padding: 22px 16px;
}
.titlebar h1 { font-size: 15px; line-height: 1.5; margin: 0; }

main { padding: 30px 16px 10px; max-width: 1100px; margin: 0 auto; }

.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  padding: 18px 16px;
}

.footer-powered { display: block; width: fit-content; margin: 6px auto 0; padding: 4px 8px; font-size: 11px; letter-spacing: .02em; color: inherit; }
@media (hover: hover) and (pointer: fine) { .footer-powered:hover { color: #fff; } }

/* Nadpis s čiarou (Avada title-sep) */
.sep-title { display: flex; align-items: center; gap: 12px; }
.sep-title::after { content: ""; flex: 1; border-bottom: 1px solid var(--sep); }

.block { margin-bottom: 30px; }

/* Úvod: okrúhle dlaždice */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 16px;
  margin-bottom: 40px;
}
.tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; -webkit-tap-highlight-color: transparent; }
.tile h5 { order: 1; min-height: 42px; display: flex; align-items: flex-start; }
.tile-img {
  display: block;
  width: 100%;
  max-width: 200px;
  border: 2px solid var(--img-border);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 3px rgba(0, 0, 0, .3);
  transition: var(--press);
}
.tile:active .tile-img { transform: scale(0.97); }
@media (min-width: 768px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Checklist s modrými krúžkami */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  position: relative;
  padding-left: 42px;
  margin-bottom: 12px;
  font-size: 20px;
  line-height: 1.7;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat;
}

/* Otváracie hodiny */
.hours { list-style: none; margin: 20px 0 0; padding: 0; }
.hours li { font-family: var(--font-heading); color: var(--heading); font-size: 24px; line-height: 1.5; margin-bottom: 8px; }

.partners { text-align: center; }

/* Tabuľky */
.table-lead, .table-note { margin: 0; }
.price-table, .waste-table { width: 100%; border-collapse: collapse; margin: 0 0 20px; }
.price-table td, .price-table th { padding: 3px 4px 3px 0; text-align: left; vertical-align: top; }
.price-table tr.cat th { padding-top: 14px; font-weight: 700; }
.price-table .price { white-space: nowrap; padding-left: 8px; font-variant-numeric: tabular-nums; }
.price-table .unit { width: 1%; padding-left: 8px; }

.waste-table { font-size: 14px; }
.waste-table th, .waste-table td { padding: 6px 6px 6px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--sep); }
.waste-table thead th { font-weight: 700; }
.waste-table tr.cat th { padding-top: 18px; }
.waste-table td:nth-child(2) { white-space: nowrap; }

/* Rozcestník podstránok výkupu */
.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 30px;
}
.link-grid a {
  padding: 12px 10px;
  border: 1px solid var(--border);
  background: var(--titlebar-bg);
  font: 400 15px/1.3 var(--font-heading);
  color: var(--heading);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: var(--press);
}
.link-grid a:active { border-color: var(--accent); color: var(--accent); transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .link-grid a:hover { border-color: var(--accent); color: var(--accent); }
}
.call { margin-top: 10px; }

/* Kontakt */
.map {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 300px;
  background: var(--titlebar-bg);
  border: 1px solid var(--border);
}
.map iframe { width: 100%; height: 100%; border: 0; }

.contact-form label { display: block; margin-bottom: 16px; }
.contact-form input, .contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid #d2d2d2;
  border-radius: 0;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: #fff;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.btn {
  display: inline-block;
  padding: 12px 26px;
  border: 0;
  border-radius: 2px;
  background: var(--accent);
  color: #fff;
  font: 700 14px/1 var(--font-body);
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: var(--press);
}
.btn:active { transform: scale(0.97); }

.about h2 { font-size: 22px; }

/* Spodná navigačná lišta */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border-top: 1px solid var(--sep);
  box-shadow: 0 -2px 6px rgba(0, 0, 0, .06);
}
@media (prefers-reduced-transparency: reduce) {
  .tabbar { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  padding: 0 2px;
  border: 0;
  border-top: 3px solid transparent;
  background: none;
  color: var(--heading);
  font: 400 10.5px/1.15 var(--font-heading);
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tab:focus-visible { outline-offset: -2px; }
/* Tlačí sa ikona s popisom, nie celá karta – modrý pruh aktívnej karty ostane na mieste. */
.tab > * { transition: var(--press); }
.tab:active > * { transform: scale(0.92); }
.tab svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tab.is-active, .more-toggle[aria-expanded="true"] { color: var(--accent-tab); border-top-color: var(--accent-tab); }

/* Panel „Viac“ – vysúva sa spod lišty a rovnakou cestou zasúva späť. */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 15;
  visibility: hidden;
  transition: visibility 0s 260ms;
}
.sheet.is-open { visibility: visible; transition: visibility 0s; }
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  opacity: 0;
  transition: opacity 260ms var(--ease-out);
}
.sheet.is-open .sheet-backdrop { opacity: 1; }
.sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  background: #fff;
  border-top: 1px solid var(--sep);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .08);
  padding: 6px 0;
  overscroll-behavior: contain;
  transform: translateY(100%);
  transition: transform 260ms var(--ease-drawer);
}
.sheet.is-open .sheet-panel { transform: translateY(0); }
.sheet-panel a {
  display: block;
  padding: 14px 20px;
  font: 400 16px/1.4 var(--font-heading);
  color: var(--heading);
  border-bottom: 1px solid var(--sep);
  -webkit-tap-highlight-color: transparent;
}
.sheet-panel a:last-child { border-bottom: 0; }
.sheet-panel a:focus-visible { outline-offset: -2px; }
.sheet-panel a:active { background: var(--titlebar-bg); }
.sheet-panel a[aria-current="page"] { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .tile-img, .btn, .link-grid a, .tab > * { transition: none; }
  .sheet-panel { transform: none; opacity: 0; transition: opacity 200ms ease; }
  .sheet.is-open .sheet-panel { opacity: 1; }
}
