html {
  scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
body {
  font-family: Arial, sans-serif;
  background: #000;
  color: #fff;
  font-size: 1rem;
}

main > h2 {
  font-size: 1.5rem;
  text-align: center;
}

nav {
  background: #111;
  display: flex;
  justify-content: center;
}
nav a {
  color: #fff;
  margin: 0 15px;
  text-decoration: none;
  position: relative;
}
nav a:hover::after, nav .aktivne::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: red;
  bottom: -2px;
  left: 0;
}


/* Základná štýlovaná navigácia */
.main-nav {
  position: relative;
  z-index: 3;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 999;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background-color: #fff; /* biela ikonka */
  transition: all 0.3s ease;
}

.hamburger::before {
  margin-top: 8px;
}
.hamburger::after {
  margin-top: 5px;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}

.nav-links li a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  transition: color 0.3s;
}
.nav-links li {
  font-size: 1.1rem;
}



header {
  background-image: url('img/bmw4.webp'), radial-gradient(rgba(80, 80, 80, 0.26), #000);
  background-size: cover;
  background-position-x: center;
  background-position-y: 0px;
  background-repeat: no-repeat;
  padding: 180px 20px;
  text-align: center;
  position: relative;
  max-width: 1100px;
  margin-inline: auto;
}
header:before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
}
header h1 {
  font-size: 40px;
  margin-bottom: 20px;
}
header h1, header a {
  position: relative;
  z-index: 1;
}
a { color: #fff; }
.btn {
  background: #c00;
  color: #fff;
  padding: 12px 24px;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
  text-decoration: none;
}
.btn:hover {
  background: #a00;
}

main {
  max-width: 1100px;
  margin-inline: auto;
  position: relative;
}
main:before {
  content: "";
  width: 100%;
  display: block;
  box-shadow: 0px 17px 31px 35px #000;
}

.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 40px 0;
}
.service {
  background: #111;
  border: 2px solid #c00;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s;
  text-decoration: none;
  color: #fff;
}
.service img:not(.bez_pozadia) {
  background: #fff;
}
.service img {
  max-height: 3.5rem;
}
.service:hover {
  transform: translateY(-5px);
}


#kontakt {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-column-gap: 2rem;
}
.kontakt:first-child img {
  height: 1rem;
}
#kontakt p {
  line-height: 1.5;
  margin: 0.4rem 0;
}
.kontakt > section {
  margin-bottom: 2rem;
}
.kontakt h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.contact {
  padding: 40px 0;
}
#kontakt a:hover {
  text-decoration-color: red;
}
#qr {
  width: 13rem;
  height: auto;
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
input, textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: #111111;
  color: #fff;
}

input:focus, textarea:focus {
  border-color: red;
  outline: none;
}



footer {
  padding: 20px;
  text-align: center;
  font-size: 14px;
  background: #111;
}



@media all and (max-width: 1150px) {
  main {
    padding: 0 1rem;
  }
}

@media all and (min-width: 650px) {
  .main-nav {
    padding-block: 0.5rem;
  }
}


@media all and (max-width: 503px) {
  header {
    background-position-x: -190px;
  }
}


/* Mobilné pravidlá (max. 900px) */
@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
    position: absolute;
    top: 1rem;
    right: 1rem;
  }

  nav li {
    margin-top: 0.5rem;
  }
  nav li:last-of-type {
    margin-bottom: 0.5rem;
  }

  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    background-color: #111;
    flex-direction: column;
    align-items: center;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  .nav-links.active {
    max-height: 300px;
  }

  /* Animácia hamburgeru */
  .menu-toggle.active .hamburger {
    background-color: transparent;
  }

  .menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
  }

  .menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
    margin-top: -2px;
  }

  .services {
    grid-template-columns: 1fr;
  }
  #mobilni__myti .services:nth-of-type(2) {
    max-width: 500px;
    margin-inline: auto;
  }

  #kontakt {
    grid-template-columns: 1fr;
  }

.kontakt:first-child {
    margin-bottom: 2rem;
    text-align: center;
  }
}



#keramicka .services {
  grid-template-columns: repeat(3, 1fr);
}



/* myti */
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

#uvodne_sluzby {
  grid-template-columns: repeat(3, 1fr);
}
#mobilni__myti .services:not(:nth-of-type(1)) p {
  margin-top: 1rem;
}
#mobilni__myti .services:nth-of-type(3) {
  justify-content: center;
}
.na_stred_jeden {
  grid-template-columns: none;
  display: flex;
  gap: 20px;
  justify-content: center;
}
.na_stred_jeden .service {
  width: 50%;
}

@media and (max-width: 1040px) {
  #uvodne_sluzby.services:first-of-type {
    grid-template-columns: repeat(2, 1fr);
  }
}

#mapa_prahy {
  max-width: 100%;
  margin-top: 2rem;
}



.services h3, .services h2 {
  font-size: 1.5rem;
  font-weight: bold;
  text-transform: uppercase;
}
.services ul {
  text-align: left;
  margin: 1rem 0;
}
ul {
  padding-left: 1rem;
}
main > p {
  margin-top: 1rem;
}

@media all and (max-width: 1040px) {
  #uvodne_sluzby.services {
    grid-template-columns: 1fr 1fr;
  }
  #hlavne_sluzby.services, .grid-3 {
    grid-template-columns: 1fr;
  }
  #hlavne_sluzby, .grid-3 {
    max-width: 450px;
    margin-inline: auto;
  }
}

@media all and (max-width: 700px) {
  #uvodne_sluzby.services {
    grid-template-columns: 1fr;
  }
}


/* keram ochr */
#keramicka .services p {
  margin-top: 1rem;
}

#keramicka section:nth-of-type(2) p {
  margin-top: 0.4rem;
}

#keramicka section:nth-of-type(2) h3 {
  font-size: 1.5rem;
}


/*O nas*/
#onas p {
  margin-top: 1rem;
}

#onas p:first-of-type {
  margin-top: 0.7rem;
}

#onas p:not(:last-of-type) {
  margin-bottom: 1rem;
}

hr { margin: 2rem 0 }

#onas .services p:last-of-type {
  text-align: left;
}

#onas h3 { margin-bottom: .5rem }

#onas main > section:first-of-type, #onas main > section:nth-of-type(2) {
  margin-bottom: 3rem;
}


/* modalne okno */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.modal-content {
  background: #000;
  padding: 20px;
  border-radius: 10px;
  max-width: 300px;
  text-align: center;
  font-size: 16px;
  border: 2px solid #c00;
}
#modal-text {
  margin-bottom: 1rem;
}


/* oznam */
#oznam {
  background-color: #c00;
  font-size: 1.1rem;
  padding: 0.2rem 0;
  height: 1.7rem;
  position: relative;
  overflow: hidden;
}

.presun p:first-of-type {
  animation: presun linear infinite;
}
@keyframes presun {
  from { transform: translate(0, -50%); }
  to { transform: translate(-100vw, -50%); }
}

#oznam p {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 30s;
  width: 300px;
}
.presun p:last-of-type {
  animation: presun2 linear infinite;
}
@keyframes presun2 {
  from { transform: translate(100vw, -50%); }
  to { transform: translate(0, -50%); }
}

@media all and (max-width: 1000px) {
  #oznam p {
    animation-duration: 20s;
  }
}

@media all and (max-width: 450px) {
  .presun p:last-of-type {
    display: none;
  }
  .presun p:first-of-type {
    animation: none;
  }
}


#parneri p {
  text-align: center;
}
#parneri section {
  margin-block: 2rem 4rem;
}