/* Podstawowe style */
body {
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  background: #f4f4f4;
  color: #333;
}

/* Kontener centralizujący zawartość */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Pasek nawigacyjny */
.navbar {
  background: #333;
  color: #fff;
  padding: 1rem 0;
}
.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.navbar .logo a {
  color: #fff;
  text-decoration: none;
  font-size: 1.5rem;
}
.navbar .nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
}
.navbar .nav-links li {
  margin-left: 20px;
}
.navbar .nav-links li a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}
.navbar .nav-links li a:hover {
  color: #ddd;
}

/* Hamburger menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}
.hamburger span {
  height: 3px;
  width: 25px;
  background: #fff;
  margin-bottom: 4px;
  border-radius: 3px;
}

/* Sekcja hero */
.hero {
  height: 60vh;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
}
.hero-text {
  position: relative;
  color: #fff;
  text-align: center;
}
.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.btn-hero {
  display: inline-block;
  padding: 0.8rem 1.2rem;
  background: #fff;
  color: #333;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.3s;
}
.btn-hero:hover {
  background: #ddd;
}

/* Sekcje */
.section {
  padding: 4rem 0;
  background: #fff;
  margin-bottom: 2rem;
}
.section:nth-child(even) {
  background: #f9f9f9;
}
.section .container h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
}
.section .container p {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

/* Usługi */
.services {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}
.service {
  background: #fff;
  padding: 1.5rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  flex: 1 1 calc(33.33% - 2rem);
  max-width: calc(33.33% - 2rem);
  text-align: center;
  transition: transform 0.3s ease;
  /* Możesz dodać także drobny cień, który wzmocni efekt */
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.service:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.service img {
  max-width: 100%;
  border-radius: 5px;
  height: auto;
}
.service h3 {
  margin-top: 1rem;
  font-size: 1.5rem;
}

/* Galeria */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}
.gallery img {
  width: 100%;
  display: block;
  border-radius: 5px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
/* AOS doda opacity i transform, dlatego można nie powielać stylów tutaj */

/* Link powrotny */
.back {
  text-align: center;
  margin-top: 2rem;
}
.back-link {
  text-decoration: none;
  padding: 0.8rem 1.2rem;
  background: #333;
  color: #fff;
  border-radius: 5px;
  transition: background 0.3s;
}
.back-link:hover {
  background: #555;
}

/* Formularz kontaktowy */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin: 2rem auto 0;
}
.contact-form input,
.contact-form textarea {
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}
.contact-form button {
  padding: 1rem;
  border: none;
  background: #333;
  color: #fff;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}
.contact-form button:hover {
  background: #555;
}

/* Stopka */
.footer {
  background: #333;
  padding: 1rem 0;
  color: #fff;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar .hamburger {
    display: flex;
  }
  .navbar .nav-links {
    position: absolute;
    top: 60px;
    right: 0;
    background: #333;
    flex-direction: column;
    width: 200px;
    display: none;
  }
  .navbar .nav-links li {
    margin: 0;
  }
  .navbar .nav-links li a {
    padding: 1rem;
    display: block;
  }
  .navbar.active .nav-links {
    display: flex;
  }
  .services {
    flex-direction: column;
  }
  .service {
    max-width: 100%;
    flex: 1 1 100%;
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  body {
    background: #121212;
    color: #e0e0e0;
  }
  .navbar {
    background: #1f1f1f;
  }
  .navbar .nav-links li a {
    color: #e0e0e0;
  }
  .hero-text h1,
  .hero-text p {
    color: #fff;
  }
  .section {
    background: #1f1f1f;
  }
  .container p,
  .container h2,
  .service h3 {
    color: #e0e0e0;
  }
  .footer {
    background: #1f1f1f;
  }
}


/* ... dotychczasowe style ... */

/* Modal (background) */
.modal {
  display: none; /* Ukryty domyślnie */
  position: fixed;
  z-index: 1000; /* Nad wszystkim */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9); /* Czarne tło z przezroczystością */
}

/* Modal Content (zdjęcie) */
.modal-content {
  margin: auto;
  display: block;
  max-width: 80%;
  max-height: 80%;
}

/* Przycisk zamknięcia modalu */
.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}
.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
}


/* Modal (lightbox) – widoczny zawsze, ale ukryty przez opacity i brak interakcji */
.modal {
  display: block; /* modal cały czas w drzewie DOM */
  position: fixed;
  z-index: 1000; /* Nad wszystkimi elementami strony */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9); /* Czarne tło z przezroczystością */
  opacity: 0;
  pointer-events: none;  /* Wyłącza interakcję, gdy modal jest niewidoczny */
  
  /* Przypisanie vendor prefixów */
  -webkit-transition: opacity 0.5s ease;
  -moz-transition: opacity 0.5s ease;
  -o-transition: opacity 0.5s ease;
  transition: opacity 0.5s ease;
}

/* Aktywny modal */
.modal.active {
  opacity: 1;
  pointer-events: auto;
}

/* Zdjęcie wewnątrz modalu – płynna animacja skalowania */
.modal .modal-content {
  margin: auto;
  display: block;
  max-width: 80%;
  max-height: 80%;
  
  /* Vendor prefixy dla transformacji */
  -webkit-transition: -webkit-transform 0.5s ease;
  -moz-transition: -moz-transform 0.5s ease;
  -o-transition: -o-transform 0.5s ease;
  transition: transform 0.5s ease;
  
  /* Początkowe skalowanie - zdjęcie jest lekko pomniejszone */
  -webkit-transform: scale(0.95);
  -moz-transform: scale(0.95);
  -o-transform: scale(0.95);
  transform: scale(0.95);
}

/* Po aktywacji modalu zdjęcie wraca do pełnej skali */
.modal.active .modal-content {
  -webkit-transform: scale(1);
  -moz-transform: scale(1);
  -o-transform: scale(1);
  transform: scale(1);
}

/* Przycisk zamknięcia modalu */
.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}
.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
}
