/* ==========================================================================
   Servis domácností – štýly
   ========================================================================== */

:root {
  --brand: #614c47;
  --brand-dark: #4d3c38;
  --accent: #d4b48d;
  --green: #7ed321;
  --text: #252525;
  --muted: #878787;
  --heading: #293340;
  --contact-text: rgba(70, 72, 85, 0.8);
  --bg: #ffffff;
  --bg-soft: #f7f5f4;
  --header-h: 80px;
  --container: 1140px;
  --font: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

/* --- Základ --------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font);
  line-height: 1.3;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sprite {
  display: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--brand);
  color: #fff;
}

.skip-link:focus {
  top: 16px;
  color: #fff;
}

/* --- Horná lišta ---------------------------------------------------------- */

.topbar {
  background: var(--brand);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
  padding: 8px 0;
}

.topbar a {
  color: rgba(255, 255, 255, 0.72);
}

.topbar a:hover,
.topbar a:focus-visible {
  color: var(--accent);
}

.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
}

.topbar__social,
.topbar__contact {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
}

.topbar__social a {
  display: inline-flex;
  font-size: 1rem;
}

.topbar__contact li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* --- Hlavička ------------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  transition: box-shadow 0.3s;
}

.header.is-scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.header__logo img {
  height: 50px;
  width: auto;
}

.nav__list {
  list-style: none;
  display: flex;
  gap: 4px;
}

.nav__list a {
  display: block;
  padding: 0 15px;
  line-height: var(--header-h);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.nav__list a:hover,
.nav__list a:focus-visible,
.nav__list a.is-active {
  color: var(--brand);
}

.nav__list a.is-active {
  box-shadow: inset 0 -3px 0 var(--accent);
}

.nav-toggle {
  display: none;
  padding: 8px;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 26px;
  cursor: pointer;
}

.nav-toggle:hover {
  color: var(--brand);
}

.nav-toggle .icon {
  display: block;
}

/* --- Mobilné menu --------------------------------------------------------- */

.offcanvas-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s;
}

.offcanvas-overlay.is-open {
  opacity: 1;
}

.offcanvas {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 201;
  width: min(300px, 85vw);
  padding: 70px 30px 30px;
  background: #fff;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0s linear 0.3s;
}

.offcanvas.is-open {
  transform: none;
  visibility: visible;
  transition: transform 0.3s ease;
}

.offcanvas__close {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 6px;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}

.offcanvas__close .icon {
  display: block;
}

.offcanvas__list {
  list-style: none;
}

.offcanvas__list a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
}

.offcanvas__list a:hover,
.offcanvas__list a:focus-visible {
  color: var(--brand);
}

body.menu-open {
  overflow: hidden;
}

/* --- Slider --------------------------------------------------------------- */

.slider {
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
  background: #e9dcc6;
}

.slider__viewport {
  overflow: hidden;
  touch-action: pan-y;
}

.slider__track {
  display: flex;
  transition: transform 0.6s ease;
}

.slider__slide {
  flex: 0 0 100%;
  aspect-ratio: 2560 / 800;
}

.slider__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.slider__arrow {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s, background 0.2s;
}

.slider:hover .slider__arrow,
.slider__arrow:focus-visible {
  opacity: 1;
}

.slider__arrow:hover {
  background: var(--brand);
}

.slider__arrow--prev {
  left: 20px;
}

.slider__arrow--next {
  right: 20px;
}

.slider__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.slider__dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: background 0.2s;
}

.slider__dots button[aria-current="true"] {
  background: #fff;
}

/* --- Pomoc pri nehodách --------------------------------------------------- */

.help {
  padding: 40px 0;
  text-align: center;
}

.help__kicker {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.help__title {
  margin-bottom: 70px;
  color: var(--heading);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.5;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 60px;
  padding: 0 30px;
}

.feature {
  color: var(--muted);
}

.feature__icon {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: var(--green);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature h3 {
  margin: 30px 0 10px;
  color: var(--heading);
  font-size: 20px;
  line-height: 1.3;
}

.feature p {
  font-size: 16px;
  line-height: 26px;
}

/* --- Výzva (CTA) ---------------------------------------------------------- */

.cta {
  position: relative;
  margin-top: 40px;
  padding: 152px 0;
  text-align: center;
  color: #fff;
  background:
    linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
    url("../images/pozadie-kontakt.webp") 50% 0 / cover no-repeat;
}

@media (hover: hover) and (min-width: 992px) {
  .cta {
    background-attachment: scroll, fixed;
  }
}

.cta__kicker {
  font-size: 26px;
  line-height: 1.2;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.cta__title {
  margin: 20px 0 0;
  font-size: 40px;
  line-height: 1.2;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.cta__title a {
  color: #fff;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.cta__title a:hover,
.cta__title a:focus-visible {
  color: #fff;
  border-bottom-color: var(--accent);
}

/* --- Služby --------------------------------------------------------------- */

.services {
  padding: 140px 0 40px;
}

.service {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 30px;
}

.service + .service {
  margin-top: 80px;
}

.service--reverse .service__text {
  order: 2;
}

.service__text {
  padding: 0 15px;
}

.service h3 {
  margin-bottom: 18px;
  color: var(--heading);
  font-size: 24px;
}

.service ul {
  list-style: circle;
  padding-left: 22px;
}

.service li {
  margin: 4px 0;
  color: #444;
}

.service li::marker {
  color: var(--brand);
}

.service__image img {
  width: 100%;
  border-radius: 2px;
}

.service:last-child .service__image img {
  max-width: 618px;
  margin: 0 auto;
}

/* --- Kontakt + mapa ------------------------------------------------------- */

.map__frame {
  padding: 10px;
  background: #fdfdfd;
  box-shadow: 0 0 10px 0 #d4d4d4;
}

.map__frame iframe {
  display: block;
  width: 100%;
  height: 400px;
  border: 0;
}

.contact {
  padding: 60px 0 70px;
}

.contact__grid {
  margin-top: 70px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.contact__item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding-left: 50px;
  color: var(--contact-text);
}

.contact__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact h3 {
  margin-bottom: 4px;
  color: #4a4a4a;
  font-size: 18px;
  line-height: 24px;
}

.contact address,
.contact p {
  font-style: normal;
  font-size: 16px;
  line-height: 26px;
}

.contact a {
  color: var(--contact-text);
}

.contact a:hover,
.contact a:focus-visible {
  color: var(--brand);
}

/* --- Pätička -------------------------------------------------------------- */

.footer {
  padding: 22px 0;
  background: var(--brand);
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  text-align: center;
}

.footer a {
  color: rgba(255, 255, 255, 0.9);
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--accent);
}

/* --- Tlačidlo hore -------------------------------------------------------- */

.scroll-up {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: rgba(97, 76, 71, 0.85);
  color: #fff;
  font-size: 22px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s;
}

.scroll-up.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.scroll-up:hover,
.scroll-up:focus-visible {
  color: #fff;
  background: var(--brand);
}

/* --- Animácie pri scrollovaní -------------------------------------------- */

.reveal {
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-hidden {
  opacity: 0;
  transform: translateY(30px);
}

.feature.reveal.is-hidden {
  transform: translateX(40px);
}

.features .feature:nth-child(2) {
  transition-delay: 0.1s;
}

.features .feature:nth-child(3) {
  transition-delay: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* --- Responzívne ---------------------------------------------------------- */

@media (max-width: 991px) {
  :root {
    --header-h: 64px;
  }

  .header__logo img {
    height: 40px;
  }

  .nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .topbar__inner {
    justify-content: center;
  }

  .features {
    gap: 30px;
    padding: 0;
  }

  .cta {
    padding: 100px 0;
  }

  .cta__title {
    font-size: 30px;
  }

  .services {
    padding-top: 90px;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .contact__item {
    padding-left: 0;
  }
}

@media (max-width: 767px) {
  .slider {
    margin-bottom: 10px;
  }

  .slider__arrow {
    display: none;
  }

  .slider__dots {
    bottom: 6px;
  }

  .slider__dots button {
    width: 10px;
    height: 10px;
  }

  .help__kicker {
    font-size: 16px;
  }

  .help__title {
    margin-bottom: 40px;
    font-size: 22px;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .feature h3 {
    margin-top: 16px;
  }

  .cta {
    padding: 50px 0;
  }

  .cta__kicker {
    font-size: 20px;
  }

  .cta__title {
    font-size: 24px;
  }

  .services {
    padding: 50px 0 20px;
  }

  .service {
    grid-template-columns: 1fr;
  }

  .service + .service {
    margin-top: 50px;
  }

  .service--reverse .service__text {
    order: 0;
  }

  .service__text {
    padding: 0;
  }

  .map__frame iframe {
    height: 320px;
  }

  .contact {
    padding: 40px 0 50px;
  }

  .contact__grid {
    margin-top: 50px;
  }
}

@media (max-width: 480px) {
  .topbar__contact {
    justify-content: center;
    gap: 4px 14px;
  }

  .topbar__social {
    display: none;
  }
}
