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

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    overflow-x: hidden;
    box-sizing: border-box;
    width: 100%;
}

header {
    background-color: #000000;
    color: white;
    padding: 20px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    padding: 0;
}

nav a {
    color: white;
    text-decoration: none;
}

main {
    padding: 20px;
}

footer {
    background-color: #222;
    color: white;
    text-align: center;
    padding: 10px;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 120px; /* dopasuj do rozmiaru logo */
    width: auto;
    margin-left: 90px;
}
.quad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.quad-box {
    background-color: white;
    padding: 15px;
    border: 1px solid #ccc;
    text-align: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;

    position: relative;
    overflow: hidden;
    
}

.quad-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 170, 0, 0.8),
        rgba(255, 60, 0, 0.8)
    );

    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}
.quad-box:hover::before {
    opacity: 1;
}
.quad-box:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  z-index: 2;
}
.quad-box img {
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
}
.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
    
}

.car-box {
    background-color: white;
    padding: 15px;
    border: 1px solid #ccc;
    text-align: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
.car-box:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.car-box img {
  width: 80%;
  height: 300px; /* lub inna wysokość boxa */
  object-fit: contain;
  background-color: #fff; /* lub inny kolor, np. szary */
  border-radius: 8px;
  padding: 10px;
}

.quad-box img,
.quad-box h2,
.quad-box h3,
.quad-box p,
.quad-box a {
    position: relative;
    z-index: 1;
}
.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 20px;
}

.contact-info, .contact-form {
    flex: 1 1 300px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.contact-form form {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: bold;
}

.contact-form input,
.contact-form textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.contact-form button {
    margin-top: 15px;
    padding: 10px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.contact-form button:hover {
    background-color: #555;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin: 40px auto;
  max-width: 1000px;
}

.gallery img {
  width: 100%;
  max-width: 300px; /* ustal szerokość zdjęcia */
  height: 200px; /* ustal wysokość ramki */
  object-fit: contain; /* ZACHOWUJE CAŁE ZDJĘCIE, NIC NIE UCINA */
  border-radius: 8px;
  background-color: #f5f5f5; /* tło w razie pustych miejsc */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.03);
}


.slider {
  position: relative;
  height: 500px;
  width: 90%;
  max-width: 700px;
  margin: 40px auto;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.slides {
  height: 100%;
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.slides img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: white;
  flex-shrink: 0;
}

.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 12px;
  cursor: pointer;
  border-radius: 50%;
  font-size: 20px;
  z-index: 2;
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

#naglowek{
  color:#000000;
  margin-top: 0;
  margin-bottom: 20px;
}


.otomoto-link {
  margin-top: 20px;
  text-align: center;
}

.otomoto-link a {
  display: inline-block;
  background-color: #ff4d00; /* kolor otomoto */
  color: white;
  padding: 12px 24px;
  font-size: 18px;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.otomoto-link a:hover {
  background-color: #cc3c00;
}

/* Lightbox – pełnoekranowe zdjęcie */
#lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
}

#lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  transition: 0.3s;
  object-fit: contain;
  background: white;
  padding: 10px;
  border: 2px solid white;
  cursor: default;
}
/* --- NAGŁÓWEK --- */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background-color: #000000; /* lub kolor dopasowany do logo */
  color: #fff;

  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo-container {
  flex-shrink: 0;
}

.logo {
  height: 60px; /* Dostosuj do swojego SVG */
  width: auto;
}

/* Nawigacja */
.main-nav ul {
  display: flex;
  gap: 25px;
  list-style: none;
  margin: 0;
  padding: 0;
  margin-right: 90px;
}

.main-nav a {
  color: rgb(255, 255, 255);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

.main-nav a:hover {
  color: #fbb034; /* kolor hover, np. żółty */
}

/* --- BANER --- */
.main-banner {
  width: 100vw;
  height: auto; /* cała wysokość okna przeglądarki */
  overflow: hidden;
  position: relative;
}

.main-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* dopasuj bez rozciągania */
  display: block;
}

.dark-body {
  background-color: #ffffff;
  color: #fff;
}


/* Mobile responsive */
@media (max-width: 768px) {

  body {
    overflow-x: hidden; /* zabezpieczenie przed przesuwaniem całej strony w bok */
  }
  .main-banner img {
    width: 100%; /* zamiast 100vw */
    height: auto; /* jak wcześniej miałeś */
    object-fit: cover;
  }

  .header {
    flex-direction: row; /* logo i nawigacja w rzędzie */
    justify-content: flex-start; /* wszystko do lewej */
    padding: 0 20px; /* mniejsze odsunięcie */
    overflow-x: hidden; /* jeśli nav siedzi w headerze */
  }

  .logo {
    margin-right: auto; /* odsuń nawigację na prawo */
    font-size: 20px;
  }
  .main-header {
    flex-direction: row;
    justify-content: flex-start;
    padding: 15px 20px;
  }

  .logo-container {
    margin-right: 20px;
  }

  .main-nav ul {
    flex-direction: column;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    margin: 0;
    list-style: none;
    gap: 10px;
    max-width: 100%; /* nie rozpycha poza ekran */
    box-sizing: border-box;
  }

  .main-banner {
    height: auto; /* jak wcześniej miałeś */
  }

  nav {
    display: flex;
    flex-wrap: wrap; /* pozwala na łamanie linii */
    justify-content: center;
    padding: 8px;
    overflow-x: hidden; /* ukrywa nadmiar poziomy */
  }

  nav a {
    font-size: 11px;        /* zmniejszamy czcionkę */
    padding: 6px 8px;       /* mniejsze odstępy */
    white-space:normal;    /* zapobiega zawijaniu się tekstu wewnątrz linków */
    flex-shrink: 1; 
    font-weight: bold;
  }

  


}
.tylko-mobile {
  display: none;
}

@media screen and (max-width: 767px) {
  .tylko-mobile {
    display: flex;
  }
}

.phone-button {
    position: fixed;
    right: 20px;
    bottom: 25px;

    width: 65px;
    height: 65px;

    background: #ff4d00;
    color: white;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 34px;
    text-decoration: none;

    box-shadow: 0 5px 20px rgba(0,0,0,0.4);

    z-index: 99999;

    animation: ring 3s infinite;
}


.phone-button span {
    display: block;
}


/* ruch słuchawki */
@keyframes ring {

    0%, 70%, 100% {
        transform: rotate(0deg);
    }

    75% {
        transform: rotate(-20deg);
    }

    80% {
        transform: rotate(20deg);
    }

    85% {
        transform: rotate(-15deg);
    }

    90% {
        transform: rotate(15deg);
    }

    95% {
        transform: rotate(0deg);
    }
}


/* pulsująca fala */
.phone-button::before {
    content: "";
    position: absolute;

    width: 100%;
    height: 100%;

    border-radius: 50%;
    background: #ff4d00;

    z-index: -1;

    animation: pulse 2s infinite;
}


@keyframes pulse {

    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

