body {
  margin: 0;
  padding: 0;
  background-size: cover;
  font-family: "Geomanist", "Roboto", sans-serif;
  width: 100vw;
  overflow-x: hidden;
}

hr {
  border: none;
  height: 5px;
  background-color: #5c93c9;
  width: 80%;
  margin: 40px auto;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 70px;
  position: fixed;
  top: 0;
  width: 100%;
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  box-sizing: border-box;
}
.logo-carousel {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  width: max-content;
  animation: scroll-logos 20s linear infinite;
}

.carousel-track img {
  height: 60px;
  margin-right: 50px;
  flex-shrink: 0;
}

@keyframes scroll-logos {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.brand-name {
  margin: 0;
  padding: 0;
  margin-left: 1%;
  display: flex;
  align-items: center;
  height: 100px;
  width: 200px;
}

.brand-name a {
  margin: 0;
  padding: 0;
  display: inline-block;
}

.brand-name img {
  scale: 0.8;
  height: 100%;
  width: 100%;
  object-fit: contain;
  display: block;
}

.top-nav img {
  scale: 0.8;
  height: 50px;
  width: 100%;
  object-fit: contain;
  display: block;
}

.nav-links {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  display: flex;
  gap: 40px;
  white-space: nowrap;
  flex-grow: 1;
  justify-content: center;
  list-style: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.icon {
  width: 25px;
  height: 25px;
}

.nav-links li a {
  color: rgba(85, 84, 84, 0.989);
  font-size: 20px;
  padding: 5px;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.nav-links li a:hover {
  transform: scale(1.1);
  color: black;
}

.nav-links li .dropdown-item:hover {
  font-size: 1.2em;
  color: black;
  cursor: pointer;
}

.dropdown {
  position: relative;
}

.arrow-oferta {
  margin-left: 5px;
  font-size: 16px;
}

.dropdown-bar {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  background: white;
  border: 1px solid #ccc;
  display: none;
  flex-direction: column;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1001;
}

.dropdown:hover .dropdown-bar {
  display: flex;
}

.dropdown-bar .dropdown-item {
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid #eee;
  font-size: 18px;
  color: rgba(85, 84, 84, 0.989);
}
.dropdown-bar .dropdown-item:last-child {
  border-bottom: none;
}

.top-nav-logo {
  display: flex;
  align-items: center;
  height: 40px;
  width: auto;
}
.top-nav-logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
}

.top-nav-allegro {
  display: flex;
  align-items: center;
  height: 40px;
}
.top-nav-allegro img {
  height: 30px;
  width: auto;
  display: block;
}

.allegro {
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 100%;
}

.allegro img {
  height: 30px;
  width: auto;
  display: block;
}

.slider {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  margin: 30px auto;
  background-color: #ffffff;
}

.slide-caption {
  position: absolute;
  bottom: 0px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 45px;
  font-weight: 700;
  background: linear-gradient(to right, #000000cc, #555555cc);
  color: white;
  padding: 10px 0;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  transition: transform 1s ease;
  z-index: 0;
  overflow: hidden;
}

.slide.active {
  z-index: 1;
}

.slide img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  transform: translate(-50%, -50%);
}

@media (min-width: 768px) {
  .slide:nth-of-type(2) img {
    transform: translate(-50%, -50%) scale(1.1);
  }
}


.two-rows {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin: 40px auto;
  max-width: 80%;
}

.two-rows .row {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 30px;
  border: 2px solid #8ba9d2;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}
.two-rows .row:hover {
  transform: scale(1.03);
}
.two-rows .row img {
  width: 500px;
  height: auto;
  border-radius: 10px;
}
.two-rows .row .description {
  flex: 1;
}
.two-rows .row h3 {
  margin: 0;
  font-size: 46px;
  color: #222;
}
.two-rows .row p {
  margin: 8px 0 0;
  color: #555;
  font-size: 24px;
  line-height: 1.5;
}

.scroll-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #8ba9d2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  padding: 80px 10px 10px 10px;
  overflow: hidden;
}

#nowosci-container {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 10px;
}

.tile {
    display: flex;
    /* ← dodane */
    flex-direction: column;
    /* ← dodane */
    justify-content: flex-start;

    flex: 0 0 auto;
    width: 315px;
    padding: 20px;
    border: 2px solid #8ba9d2;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.tile:hover {
    transform: scale(1.03);
}

.tile img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    object-position: center;
}

/* opis jako FLEX */
.tile .description {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /* ← umożliwia p rozepchnąć dół */
}

.tile .description h3 {
    margin-top: 15px;
    font-size: 28px;
    color: #222;
}

/* samo p idzie NA DÓŁ */
.tile .description p {
    margin-top: auto;
    /* ← klucz! */
    color: #555;
    font-size: 18px;
    line-height: 1.5;
}
.arrow {
  background-color: #8ba9d2;
  border: none;
  color: #fff;
  font-size: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 60%;
  transform: translateY(-50%);
  opacity: 0.8;
  z-index: 10;
}
.arrow:hover {
  opacity: 1;
}

.arrow.left {
  left: 5px;
}
.arrow.right {
  right: 5px;
}

#nowosci-container::-webkit-scrollbar {
  display: none;
}
#nowosci-container {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.nowosci-header {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  text-align: center;
}

.nowosci-header h2 {
  margin: 0;
  font-size: 46px;
  color: rgb(34, 34, 34);
}

.footer {
  background: #1a1a1a;
  color: white;
  padding: 30px 20%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: bold;
  color: #509fc3;
  margin-bottom: 30px;
  width: 100%;
}
.footer-heading .line {
  flex-grow: 1;
  height: 2px;
  background-color: #509fc3;
  margin: 0 20px;
}
.footer-heading .title {
  white-space: nowrap;
  font-weight: 500;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  width: 60%;
  max-width: 800px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.footer-logo {
  align-self: flex-start;
}
.footer-logo img {
  max-height: 50px;
  width: auto;
  object-fit: contain;
}

.footer-allegro {
  position: relative;
  top: -10px;
}

.footer-allegro img {
  max-height: 40px;
  width: auto;
  object-fit: contain;
}

.contact-section {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-left: 55%;
  align-items: flex-start;
}
.contact-btn {
  background-color: #509fc3;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  align-self: flex-start;
  margin-bottom: 20px;
}
.contact-info {
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}
.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.contact-item a {
  text-decoration: none;
  color: inherit;
}
.icon {
  margin-right: 8px;
  display: flex;
  align-items: center;
}
.contact-info a {
  color: white;
  text-decoration: none;
}

.navbar {
  height: 150px;
  background-color: #f0eeee;
  display: flex;
  align-items: center;
  padding: 0 10px;
  justify-content: space-between;
}

.navbar img {
  height: 80px;
  scale: 0.9;
}

#wtryskarki,
#komponenty,
#akcesoria {
  display: none;
}

#wtryskarki .tile-container,
#komponenty .tile-container,
#akcesoria .tile-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  padding: 30px;
  max-width: 80%;
  margin: 50px auto 0 auto;
}

#wtryskarki .tile,
#komponenty .tile,
#akcesoria .tile {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  width: 90%;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#wtryskarki .tile:hover,
#komponenty .tile:hover,
#akcesoria .tile:hover {
  transform: translateY(-5px);
  scale: 1.05;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

#wtryskarki .tile img,
#komponenty .tile img,
#akcesoria .tile img {
  width: 100%;
  height: 300px;
  object-fit: contain;
  display: block;
}

#wtryskarki .tile p,
#komponenty .tile p,
#akcesoria .tile p {
  margin: 15px 0;
  font-size: 2.2em;
  color: #333;
  font-weight: 400;
}

#details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 90%;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
  margin-bottom: 50px;
  margin-top: 105px;
}

#details.no-products,
#details .no-products {
  font-size: 2.5rem;
  color: #555;
  min-height: calc(100vh - 450px);
  text-align: center;
}

.machine-card { background-color: #f9f9f9; border: 1px solid #ddd; border-radius: 8px; padding: 15px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); transition: transform 0.3s ease, box-shadow 0.3s ease; box-sizing: border-box; width: 100%; min-height: calc(100vh - 450px); height:100%; cursor: pointer; } .machine-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); }

.machine-header h2 {
  font-size: 1.5em;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.machine-image img.main-image {
  width: 100%;
  height: 400px;
  object-fit: contain;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.machine-gallery {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.machine-gallery img.thumbnail {
  width: 60px;
  height: 60px;
  object-fit: contain;
  background-color: #fff;
  cursor: pointer;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: transform 0.3s ease;
}

.machine-gallery img.thumbnail:hover {
  transform: scale(1.05);
}

.machine-description {
  font-size: 1em;
  color: #555;
}

.status-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.available {
  color: #218838;
}

.tel {
  text-align: right;
}

.serwis-container {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 16px;
  width: 80%;
  margin: 50px auto 0;
  box-sizing: border-box;
  display: none;
  flex-wrap: nowrap;
  gap: 20px;
  align-items: stretch;
}

.serwis-left {
  flex: 1.5;
  min-width: 300px;
  height: auto;
}

.serwis-left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.serwis-right {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.serwis-right .description h3 {
  font-size: 30px;
  color: #1c3b80;
  margin-bottom: 10px;
  margin-top: 5px;
}

.serwis-right .description p {
  color: #333;
  text-align: justify;
  margin-bottom: 20px;
  line-height: 1.8;
}

.serwis-right > p {
  margin-bottom: 20px;
  color: #333;
}

.serwis-form {
  text-align: left;
}

.serwis-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #2c3e50;
}

.serwis-form input,
.serwis-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
}

.serwis-form button {
  background-color: #1c3b80;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: block;
  margin-top: 20px;
}

.serwis-form button:hover {
  background-color: #16306d;
}

.kontakt-box {
  max-width: 1200px;
  margin: 80px auto;
  padding: 40px 60px 60px 60px;
  background-color: #fff;
  border-radius: 24px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.1);
  border: 1px solid #d0dbe5;
  box-sizing: border-box;
  display: none;
}

.kontakt-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  margin-top: -10px;
}

.kontakt-header h2 {
  font-size: 2.8rem;
  color: #1c3b80;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 0;
}

.kontakt-header span {
  flex: 1;
  height: 2px;
  background-color: #1c3b80;
  max-width: 180px;
}

.kontakt-content {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.kontakt-lewo {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 260px;
}

.kontakt-item {
  display: flex;
  margin-right: auto;
  gap: 15px;
  align-items: center;
}


.kontakt-item .icon {
  font-size: 1.8rem;
  color: #000;
  margin-top: 3px;
}

.kontakt-item p {
  margin: 0;
  font-size: 1.1rem;
  color: #333;
  line-height: 1.8;
}

.kontakt-item a {
  color: #1c3b80;
  text-decoration: none;
}

.kontakt-item a:hover {
  text-decoration: underline;
}

.kontakt-item-2 {
  display: flex;
  margin-right: 0;
  gap: 15px;
  align-items: center;
}

.kontakt-item-2 .icon {
  font-size: 1.8rem;
  color: #000;
  margin-top: 3px;
}

.kontakt-item-2 p {
  margin: 0;
  font-size: 1.1rem;
  color: #333;
  line-height: 1.8;
}

.kontakt-item-2 a {
  color: #1c3b80;
  text-decoration: none;
}

.kontakt-item-2 a:hover {
  text-decoration: underline;
}

.kontakt-formularz {
  flex: 1;
  min-width: 280px;
}

.kontakt-formularz label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #2c3e50;
}

.kontakt-formularz input,
.kontakt-formularz textarea {
  width: 100%;
  padding: 16px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 12px;
  font-size: 1.05rem;
  box-sizing: border-box;
}

.kontakt-formularz button {
  background-color: #1c3b80;
  color: white;
  border: none;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.kontakt-formularz button:hover {
  background-color: #16306d;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
}

.nav-links {
  transition: transform 0.3s ease;
}

@media (min-width: 1100px) and (max-width: 1440px) {
  .fa-envelope{
    margin-left:-5px;
  }
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .navbar {
    justify-content: space-around;
    overflow-x: auto;
  }

  .nav-links {
    column-gap: 40px;
    scale: 0.9;
  }

  .top-nav-allegro {
    scale: 0.8;
  }

  .dropdown-bar {
    margin-left: 3vh;
  }

  .kontakt-item {
    gap: 5px;
    scale: 0.9;
  }

  .slider {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 300px;
  }

  .slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
  }

  .slider .slide.active {
    opacity: 1;
    z-index: 1;
  }

  #nowosci-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 10px;
    padding: 5px;
  }

  #details {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
  }

  .machine-gallery {
    margin-bottom: 10px;
  }

  .serwis-container {
    display: flex;
    width: 100%;
    padding: 20px;
  }

  .serwis-left,
  .serwis-right,
  .kontakt-lewo,
  .kontakt-formularz {
    width: 100%;
    min-width: unset;
  }

  .kontakt-box {
    width: 100%;
    padding: 20px;
  }

  .kontakt-content {
    gap: 20px;
  }

  .footer-content {
    width: 90%;
  }

  .footer-left {
    margin-left: 0;
  }

  .contact-section {
    align-items: center;
  }

  hr:first-of-type {
    margin-top: 0px;
  }
}
@media (max-width: 600px) {
      
    #details {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}
@media (min-width: 600px)  and (max-width: 1100px){
   
    #details {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (min-width: 480px) and (max-width: 1100px) {
  #details {
        grid-template-columns: repeat(1, 1fr) !important;
    }
  .machine{
    grid-column: 1 !important;
  }
  .fa-envelope {
      margin-left: -5px;
    }
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .navbar {
    justify-content: space-around;
    overflow-x: auto;
  }

  .top-nav {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 70px;
    position: relative;
  }

  .top-nav-logo img {
    height: 45px;
    width: auto;
  }

  .menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
  }

  .top-nav-allegro {
    scale: 0.8;
    display: none;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background-color: white;
    z-index: 1000;
    padding: 10px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    gap: 0;
  }

  .nav-links.open {
    display: flex;
    transform: scaleY(1);
    opacity: 1;
  }

  .nav-links li {
    text-align: center;
    border-bottom: 1px solid #eee;
    padding: 12px 20px;
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links li a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    display: block;
  }

  .nav-links li a:hover {
    background-color: #f5f5f5;
    border-radius: 4px;
  }

  .dropdown {
    padding: 0;
  }

  .dropdown-bar {
    display: none !important;
    flex-direction: column;
    background-color: white;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    border-radius: 0 0 5px 5px;
    margin-top: 5px;
    position: relative;
    z-index: 999;
  }

  .dropdown-bar.active {
    display: flex !important;
  }

  .dropdown-item {
    padding: 10px 20px;
    cursor: pointer;
    text-align: left;
  }

  .dropdown-item:hover {
    background-color: #f5f5f5;
  }

  .tile-container {
    margin-top: 0 !important;
  }

  .machine-gallery {
    margin-bottom: 10px;
  }

  .nowosci-header h2 {
    font-size: 36px;
    white-space: nowrap;
  }

  #nowosci-container {
    padding: 5px;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 10px;
  }

  #details {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    margin-top: 10px !important;
  }

  #kontakt {
    margin-top: 10px !important;
  }

  #tel {
    display: none;
  }

  .slider {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 300px;
    margin-top: 0;
  }

  .slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
  }

  .slider .slide.active {
    opacity: 1;
    z-index: 1;
  }

  .serwis-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 20px;
    margin-top: 0;
  }

  .serwis-left,
  .serwis-right,
  .kontakt-lewo,
  .kontakt-formularz {
    width: 100%;
    min-width: unset;
  }

  .kontakt-box {
    width: 100%;
    padding: 20px;
  }

  .kontakt-content {
    gap: 20px;
  }

  .kontakt-item {
    gap: 5px;
    scale: 0.9;
  }

  .footer {
    padding: 30px 1%;
  }

  .footer-content {
    width: 90%;
  }

  .footer-left {
    margin-left: 0;
  }

  .contact-section {
    align-items: center;
    margin-left: 10%;
  }

  hr:first-of-type {
    margin-top: 0;
  }

  .two-rows {
    max-width: 90%;
  }

  .two-rows .row h3 {
    font-size: 36px;
  }

  .two-rows .row p {
    font-size: 3vw;
  }

  .two-rows .row img {
    height: auto;
    width: 50vw;
  }
}

@media screen and (max-width: 480px) {
  .machine{
    grid-column: 1 !important;
  }
  .fa-envelope {
      margin-left: -5px;
    }
  .contact-section {
    align-items: center;
    margin-left: 0;
  }

  .dropdown {
    padding: 0;
  }

  .dropdown-bar {
    background-color: white;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: none !important;
    flex-direction: column;
    margin-top: 5px;
    padding: 10px 0;
    position: relative;
    width: 100%;
    z-index: 999;
  }

  .dropdown-bar.active {
    display: flex !important;
  }

  .dropdown-item {
    cursor: pointer;
    padding: 10px 20px;
    text-align: left;
  }

  .dropdown-item:hover {
    background-color: #f5f5f5;
  }

  .footer {
    padding: 30px 1%;
  }

  .footer-content {
    width: 90%;
  }

  .footer-left {
    margin-left: 0;
  }

  .kontakt-box,
  .serwis-container {
    padding: 20px;
    width: 100%;
  }

  .kontakt-content {
    gap: 20px;
  }

  .kontakt-formularz,
  .kontakt-lewo,
  .serwis-left,
  .serwis-right {
    min-width: unset;
    width: 100%;
  }

  .kontakt-item {
    gap: 10px;
    scale: 0.9;
  }

  .machine-gallery {
    margin-bottom: 10px;
  }

  .menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: block;
    font-size: 1.6rem;
  }

  .navbar {
    justify-content: space-around;
    overflow-x: auto;
  }

  .nav-links {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    gap: 0px;
    left: 0;
    opacity: 0;
    padding: 10px 0;
    position: absolute;
    top: 60px;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease, opacity 0.3s ease;
    width: 100%;
    z-index: 1000;
  }

  .nav-links li {
    border-bottom: 1px solid #eee;
    padding: 12px 20px;
    text-align: center;
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links li a {
    color: #333;
    display: block;
    font-weight: 500;
    text-decoration: none;
  }

  .nav-links li a:hover {
    background-color: #f5f5f5;
    border-radius: 4px;
  }

  .nav-links.open {
    display: flex;
    opacity: 1;
    transform: scaleY(1);
  }

  .nowosci-header h2 {
    font-size: 36px;
    white-space: nowrap;
  }

  .serwis-container {
    display: flex;
    flex-direction: column;
    margin-top: 0px;
    padding: 20px;
    width: 100%;
  }

  .slider {
    height: 300px;
    margin-top: 0px;
    overflow: hidden;
    position: relative;
    width: 100%;
  }

  .slider .slide {
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    transition: transform 0.6s ease;
    width: 100%;
  }

  .slider .slide.active {
    opacity: 1;
    z-index: 1;
  }

  .slider .slide img {
    height: 100%;
    width: 100%;
    object-fit: cover;
  }

.slide:first-child img {
  object-fit: scale-down;
  transform: translate(-50%, -50%) scaleY(4) scaleX(2.2);
}

.slide:nth-of-type(2) img {
  object-fit: scale-down;
  transform: translate(-50%, -60%) scaleY(3.5) scaleX(3);
}

  .tile,
  .tile-container {
    box-sizing: border-box;
  }

  .top-nav {
    align-items: center;
    flex-direction: row;
    height: 70px;
    justify-content: space-between;
    padding: 0 20px;
    position: relative;
  }

  .top-nav-allegro {
    display: none;
    scale: 0.8;
  }

  .top-nav-logo img {
    height: 45px;
    width: auto;
  }

  .two-rows {
    max-width: 90%;
  }

  .two-rows .row {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    text-align: center;
  }

  .two-rows .row h3 {
    font-size: 36px;
  }

  .two-rows .row img {
    height: auto;
    width: 100%;
  }

  #akcesoria,
  #komponenty,
  #wtryskarki {
    display: none;
  }

  #akcesoria.active,
  #komponenty.active,
  #wtryskarki.active {
    display: block;
  }

  #akcesoria .tile,
  #komponenty .tile,
  #wtryskarki .tile {
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
  }

  #akcesoria .tile:hover,
  #komponenty .tile:hover,
  #wtryskarki .tile:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: none;
  }

  #akcesoria .tile-container,
  #komponenty .tile-container,
  #wtryskarki .tile-container {
    box-sizing: border-box;
    display: grid;
    gap: 15px;
    grid-template-columns: 1fr;
    margin: 20px auto 0 auto;
    max-width: 100%;
    padding: 15px;
  }

  #akcesoria .tile img,
  #komponenty .tile img,
  #wtryskarki .tile img {
    height: auto;
    object-fit: contain;
    width: 100%;
  }

  #akcesoria .tile p,
  #komponenty .tile p,
  #wtryskarki .tile p {
    color: #333;
    font-size: 1.4em;
    font-weight: 400;
    margin: 10px 0;
    text-align: center;
  }

  #details {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    margin-top: 10px !important;
  }

  #kontakt {
    margin-top: 10px !important;
  }

  #kontakt .kontakt-item {
    margin-right: auto;
  }

  #nowosci-container {
    display: flex;
    overflow-x: auto;
    padding: 5px;
    scroll-padding: 10px;
    scroll-snap-type: x mandatory;
  }
    #nowosci-container .tile{
      scale:0.9;
    }
  #tel {
    display: none;
  }

  body,
  html {
    max-width: 100%;
    overflow-x: hidden;
  }

  hr:first-of-type {
    margin-top: 0px;
  }

  .icon {
    margin-right: 0;
  }
  .contact-item a:last-child{
    word-break: break-word;
    overflow-wrap: break-word;
  }

.footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-left,
  .contact-section {
    flex: 1 1 100%;
  }

  .footer-logo img,
  .footer-allegro img {
    width:100%;
    height: auto;
  }

    .footer-allegro img{
        margin-top:30px;
        margin-left:-5px;
    }
  .contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .contact-item {
    margin: 8px 0;
  }

  .contact-btn{
    margin-left:20%;
    margin-top:5px;
  }
  .slide-caption {
    font-size: 6vw;
  }

}




/* Overlay */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

/* Pokazywanie overlay */
.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Obraz powiększony */
.lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    transition: transform 0.3s;
    cursor: zoom-out;
}

/* Krzyżyk do zamykania */
#lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    z-index: 1010;
    user-select: none;
}
/* Kursor lupy przy hover na dużym obrazku */
.machine-image .main-image {
    cursor: zoom-in; /* lupka w standardzie */
    transition: transform 0.2s;
}

/* Opcjonalnie: lekkie powiększenie przy hover */
.machine-image .main-image:hover {
    transform: scale(1.05);
}