* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  line-height: 1.6;
  color: #747783;
  font-family: 'Nunito', sans-serif;
  background: #fff;
  margin: 0;
  padding: 0;
}

header {
  background: #ffffff;
  color: #747783;
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

nav .logo {
  height: 40px;
  color: #747783;
}

nav ul.nav-menu {
  display: flex;
  list-style: none;
}

nav ul.nav-menu li {
  margin-left: 20px;
}

nav ul.nav-menu li:first-child {
  margin-left: 0;
}

nav ul.nav-menu li a {
  color: #747783;
  background: #fafafa;
  text-decoration: none;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  display: inline-block;
  transition: transform 0.3s, background 0.3s, color 0.3s;
}

nav ul.nav-menu li a:hover {
  background: #f9f9f9;
  color: #b91f27;
  transform: scale(1.1);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  width: 100%;
  height: 3px;
  background: #747783;
  transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

section {
  padding: 5rem 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.full-width {
  width: 100%;
  background: #f9f9f9;
}

.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, #ffffff, #d0d0d0, #ffffff);
  margin: 2rem 0;
}

.hero {
  height: 100vh;
  position: relative;
  overflow: hidden;
  margin: 60px 0 0 0;
  padding: 0;
  width: 100%;
  max-width: none;
}

.hero img {
  width: 100%;
  height: 120%; /* Nieco większa wysokość dla płynnego efektu paralaksy */
  object-fit: cover;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  min-width: 100%;
  z-index: -1;
  transform: translateY(0); /* Początkowa pozycja dla paralaksy */
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.5);
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  color: white;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 1px 1px 1px #000;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 1px #000;
}

.action-link {
  color: #e2001a;
  text-decoration: none;
  font-size: 1rem;
  transition: background 0.3s, color 0.3s;
  position: relative;
  display: inline-block;
  text-transform: uppercase;
  background: #fff;
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.action-link::before {
  content: '>';
  margin-right: 0.5rem;
}

.action-link:hover {
  color: #c20017;
  background: #f0f0f0;
}

section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: #e2001a;
}

section h3 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: #747783;
}

section ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

section ul li {
  margin-bottom: 0.5rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, auto);
  gap: 2rem;
  text-align: center;
}

.service-card {
  padding: 2rem;
  background: #f9f9f9;
  border-radius: 10px;
  transition: transform 0.3s, background 0.3s;
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-5px);
  background: #f0f0f0;
}

.service-card:hover .service-icon {
  stroke: #e2001a;
  fill: #e2001a;
}

.service-card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.service-card h3 {
  margin-bottom: 1rem;
  color: #666;
}

.service-icon {
  width: 40px;
  height: 40px;
  display: block;
  margin: 0 auto 1rem;
  transition: stroke 0.3s, fill 0.3s;
}

.contact-container {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: stretch;
}

.contact-map {
  flex: 0 0 60%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.contact-details {
  flex: 0 0 40%;
  font-size: 1rem;
  color: #747783;
  display: flex;
  flex-direction: column;
}

.contact-details p {
  margin-bottom: 0.5rem;
}

.contact-details a {
  color: #22528D;
  text-decoration: none;
  transition: color 0.3s;
}

.contact-details a:hover {
  color: #2a67b3;
}

footer {
  background: #f0efef;
  color: #747783;
  text-align: center;
  padding: 2rem 0;
}

footer p {
  margin-bottom: 1rem;
}

footer .copyright {
  color: #e2001a;
  font-size: 15px;
}

footer nav ul {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  list-style: none;
  margin-bottom: 1rem;
  border-top: none;
  padding-top: 0;
}

footer nav ul li a {
  color: #747783;
  text-decoration: none;
  transition: color 0.3s;
  font-size: 14px;
}

footer nav ul li a:hover {
  color: #e2001a;
}

.back-to-top {
  display: inline-block;
  margin-top: 1rem;
  transition: transform 0.3s;
}

.back-to-top:hover {
  transform: scale(1.2);
}

.back-to-top svg {
  width: 30px;
  height: 30px;
  fill: #666;
}

#cookiePopup {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 5px;
  display: none;
  z-index: 1000;
  max-width: 90%;
  text-align: center;
}

#cookiePopup p {
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

#cookiePopup button {
  background: #22528D;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

#cookiePopup button:hover {
  background: #2a67b3;
}

#service-header {
  padding: 3rem 20px;
  background: #f9f9f9;
  text-align: center;
  margin-top: 60px;
}

#service-header .hero-content {
  position: static;
  transform: none;
  background: none;
  color: #747783;
  padding: 0;
}

#service-header .hero-content h1 {
  font-size: 2.5rem;
  text-shadow: none;
  color: #e2001a;
}

#service-header .hero-content p {
  font-size: 1.2rem;
  text-shadow: none;
  margin-bottom: 2rem;
}

#order-form {
  padding: 3rem 20px;
  text-align: left;
}

#order-form form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #747783;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  font-family: 'Nunito', sans-serif;
}

.form-group textarea {
  resize: vertical;
}

.form-group .error {
  color: #e2001a;
  font-size: 0.9rem;
  display: block;
  margin-top: 0.25rem;
}

.action-button {
  background: #e2001a;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-size: 1rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.action-button:hover {
  background: #c20017;
  transform: scale(1.1);
}

.image-container {
  float: right;
  margin: 0 0 20px 20px;
  max-width: 400px;
}

.service-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  margin: auto;
  display: block;
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.image-gallery {
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: 2rem auto;
  gap: 20px;
  padding: 0 20px;
}

.gallery-item {
  flex: 1;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.gallery-item:hover {
  transform: scale(1.05);
}

.gallery-image {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  border-radius: 8px;
}

@media (max-width: 768px) {
  nav ul.nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: #ffffff;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  nav ul.nav-menu.active {
    display: flex;
  }

  nav ul.nav-menu li {
    margin: 10px 0;
  }

  nav ul.nav-menu li a {
    width: 100%;
    text-align: center;
  }

  .hamburger {
    display: flex;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .contact-container {
    flex-direction: column;
  }

  .contact-details {
    margin-bottom: 2rem;
  }

  footer nav ul {
    flex-direction: column;
    gap: 10px;
    justify-content: flex-end;
  }

  #cookiePopup {
    padding: 1rem;
    max-width: 95%;
  }

  #cookiePopup p {
    font-size: 0.8rem;
  }

  #cookiePopup button {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }

  #service-header .hero-content h1 {
    font-size: 2rem;
  }

  #service-header .hero-content p {
    font-size: 1rem;
  }

  #order-form {
    padding: 2rem 10px;
  }

  #order-form form {
    max-width: 100%;
  }

  .image-container {
    float: none;
    margin: 20px auto;
    text-align: center;
  }

  .image-gallery {
    flex-direction: column;
    gap: 20px;
  }

  .gallery-item {
    margin-bottom: 20px;
  }
}
/* Modal Styling */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1000; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0, 0, 0, 0.8); /* Black background with opacity */
}

/* Modal Content (Image) */
.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Close Button */
.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

/* Ensure images are clickable */
img[alt*="Certyfikat ISO"] {
  cursor: pointer;
}