*{
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: sans-serif;
    background-color: rgb(100, 100, 98);
    background-image: url('../img/bg-flames.png');
    color: rgb(228, 227, 224);
    font-size: large;
}
header {
    position: sticky;
    top: 0;
    right: 0;
    margin: 20px;
    height: 100px;
    z-index: 100;
    
}
#nav {
    background-color: rgb(155, 45, 45);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    border-radius: 20px;
    background-image: url('https://ciszewski.eu/images/red-flames.png');
      transition: transform 1s ease, opacity 1.5s ease;
}

#nav.hide {
  transform: translateY(-100%);
  opacity: 0;
}

.logo {
    margin-right: 20px;
}

.logo img {
    height: 30px; /* Dostosuj wysokość logo */
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    margin-left: 50px;
}

.nav-links li {
    margin-right: 20px;
    position: relative; /* Dla pozycjonowania maski */
}

.nav-links li:last-child {
    margin-right: 0;
}

.nav-links a {
    text-decoration: none;
    color: white;
    position: relative;
    padding-top: 30px; /* Zwiększamy padding, aby zmieścić "płomień" */
    z-index: 1; /* Tekst nad maską */
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #ffcc00; /* Zmiana koloru tekstu po najechaniu */
}

.flame-mask {
    position: absolute;
    top: -5px; /* Pozycja maski nad tekstem */
    left: 50%;
    transform: translateX(-50%) scale(0); /* Początkowo ukryta */
    width: 60px; /* Dostosuj szerokość maski */
    height: 50px; /* Dostosuj wysokość maski */
    background: linear-gradient(to bottom, orange 30%, red 70%); /* Kolory "ognia" */
    mask-image: url('./img/flames.png'); /* Używamy obrazka jako maski */
    mask-size: contain; /* Dopasowujemy rozmiar maski */
    mask-repeat: no-repeat; /* Bez powtarzania maski */
    opacity: 0;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
    z-index: 0; /* Pod tekstem */
}

.nav-links li:hover .flame-mask {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

.nav-links .dropdown {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #627581;
    display: none;
    padding: 10px;
    border-radius: 5px;
}

.nav-links li:hover .dropdown {
    display: block;
}

.dropdown li {
    margin-bottom: 5px;
}

.dropdown a {
    background: none;
    color: white;
    padding: 5px;
}

#akt{
    
    padding: 10px;
    margin: 50px;
    border-radius: 20px;
}
#akt h2{
    text-align: center;
}


#akt2 {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-start; /* <== KLUCZOWE */
}


.ab{

  animation: pulse 2s infinite;

    align-self: flex-start;
    height: auto;
      flex-grow: 0;
    margin: 10px;
    padding: 5px;
    background-color: #3b3b3b;
    border-radius: 20px;
    width: 350px;
    height: auto;
    /*height: 350px;*/
    border: #cc0000 2px double;
    background-image: url("https://as2.ftcdn.net/v2/jpg/09/02/32/77/1000_F_902327767_7xfutTOUyO5S8C3Emn4L9pAk5xBpUkJU.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}
.ab h3{
    text-align: center;
}
.ab p {
    /*display: none;*/
    padding: 15px;
}
.abk {
    width:100%;
    height: auto;
    max-height: none;
    overflow: visible;
}

/*.ab:hover p, .ab.active p {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}*/

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gallery-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 5px;
}

.gallery-img {
    width: 100px;
    height: 60px;
    cursor: pointer;
    border-radius: 20px;
    transition: transform 0.3s;
}

.gallery-img:hover {
    transform: scale(1.1);
}



#boxoferty{
   
    
    padding: 20px;
    
    margin: 50px;
    text-align: center;
    border-radius: 25px;
}
#oferty{
    display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}


.din ul{
    text-align: center;
    list-style: none;
}
.din ul li a {
    display: block;
    margin-top: 5px;
    color: orangered;
    text-decoration: none;
}

.din{
      display: flex;
  flex-direction: column;
  justify-content: space-between;
    margin: 10px;
    background-color: #3b3b3b;
    border-left: #cc0000 5px solid;
    border-radius: 20px;
    float: left;
    width: 23%;
    box-shadow: #ff3333 2px 5px 12px;
    animation: pulsujacyCien 5s linear infinite;
    /*height: 320px;*/
      background-image: url("https://png.pngtree.com/thumb_back/fh260/background/20231024/pngtree-erupting-volcanic-texture-striking-black-and-orange-magma-background-image_13707024.png");
  background-repeat: no-repeat;
  background-position: center;
}
.din:hover {
  animation-play-state: paused; /* zatrzymujemy animację podczas hover */
  box-shadow: 0 0 30px 5px #ff6600; /* mocniejszy, pomarańczowy cień */
  transform: scale(1.05); /* lekko powiększamy box */
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.din a{
    background-color: black;
    padding: 5px;
    width: 25%;
    text-decoration: none;
    color: #fff;
    align-self:center;
    margin-bottom: 10px;
    border-radius: 15px;
}
@keyframes glowPulse {
  0%, 100% {
    box-shadow:
      0 0 5px orangered,
      0 0 10px orangered,
      0 0 20px orangered,
      0 0 30px orangered;
  }
  50% {
    box-shadow:
      0 0 10px orangered,
      0 0 20px orangered,
      0 0 30px orangered,
      0 0 50px orangered;
  }
}

.din a:hover {
  animation: glowPulse 1.5s infinite ease-in-out;
}

@keyframes pulsujacyCien {
    0% {
      box-shadow: 5px 0 15px 0 #ff3333;
    }
    12.5% {
      box-shadow: 3px 3px 15px 0 #ff3333;
    }
    25% {
      box-shadow: 0 5px 15px 0 #ff3333;
    }
    37.5% {
      box-shadow: -3px 3px 15px 0 #ff3333;
    }
    50% {
      box-shadow: -5px 0 15px 0 #ff3333;
    }
    62.5% {
      box-shadow: -3px -3px 15px 0 #ff3333;
    }
    75% {
      box-shadow: 0 -5px 15px 0 #ff3333;
    }
    87.5% {
      box-shadow: 3px -3px 15px 0 #ff3333;
    }
    100% {
      box-shadow: 5px 0 15px 0 #ff3333;
    }
  }


#chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    user-select: none;
}

/* Przycisk toggle - okrągły, z efektem hover */
#chatbot-toggle {
    background-color: #4a90e2;
    cursor: pointer;
    font-size: 26px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
        line-height: 50px;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(74,144,226,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
#chatbot-toggle:hover {
    background-color: #357abd;
    box-shadow: 0 6px 16px rgba(53,122,189,0.7);
}

/* Okno chatbota */
#chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    max-height: 450px;
    background: #2c2f33;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    padding: 15px;
    display: none;
    flex-direction: column;
    color: #e1e1e1;
    font-size: 14px;
    animation: fadeInUp 0.4s ease forwards;
}

/* Animacja pojawiania się */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sekcja z wiadomościami */
#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    border-radius: 10px;
    background-color: #23272a;
    margin-bottom: 10px;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.3);
}

/* Wiadomości od użytkownika */
.message.user {
    background-color: #7289da;
    color: white;
    padding: 8px 12px;
    border-radius: 15px 15px 0 15px;
    margin-bottom: 8px;
    max-width: 80%;
    align-self: flex-end;
}

/* Wiadomości od bota */
.message.bot {
    background-color: #99aab5;
    color: #222;
    padding: 8px 12px;
    border-radius: 15px 15px 15px 0;
    margin-bottom: 8px;
    max-width: 80%;
    align-self: flex-start;
}

/* Kontener inputa i przycisku */
#chat-input-container {
    display: flex;
    gap: 10px;
}

/* Pole tekstowe */
#chat-input {
    flex: 1;
    padding: 10px 15px;
    border-radius: 25px;
    border: none;
    font-size: 14px;
    outline: none;
    background-color: #40444b;
    color: white;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.6);
    transition: background-color 0.3s ease;
}
#chat-input::placeholder {
    color: #b9bbbe;
}
#chat-input:focus {
    background-color: #2f3136;
}

/* Przycisk wyślij */
#send-message {
    padding: 0 20px;
    background-color: #43b581;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(67,181,129,0.6);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
#send-message:hover {
    background-color: #389e6b;
    box-shadow: 0 6px 15px rgba(56,158,107,0.8);
}

/* Scrollbar dla wiadomości */
#chat-messages::-webkit-scrollbar {
    width: 6px;
}
#chat-messages::-webkit-scrollbar-thumb {
    background-color: #5865f2;
    border-radius: 3px;
}
.chat-offset {
  margin-right: 60px;
}

#scrollTopLink {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    background-color: #ff3333;
    color: white;
    text-align: center;
    text-decoration: none;
    font-size: 26px;
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 50%;
    box-shadow: 0 0 10px black;
    z-index: 999;
    transition: opacity 0.3s ease;
}
  
#scrollTopLink:hover {
    background-color: #cc0000;
}

footer {
    opacity: 0.7;
    background-color: grey;
    width: 100%;
    text-align: center;
    height: 300px;
    color: black;
}
#stopka{
    display: flex;
      gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
footer h3{
    padding-top: 25px;
}
footer #adres{
    background-color: rgb(182, 181, 181);
    border-radius: 15px;
    float: left;
    height: 200px;
    width: 20%;
}
footer iframe{
    border-radius: 15px;
    width: 20%;
    height: 200px;
}
#mapafot {
    float: left;

}
footer #media{
    float: left;
    background-color: rgb(182, 181, 181);
    width: 20%;
    height: 200px;
    border-radius: 15px;
}
footer #emialtel{
    float: right;
    width: 20%;
    height: 200px;
    background-color: rgb(182, 181, 181);
    border-radius: 15px;
}
#media a{
    text-decoration: none;
    color: #cc0000;
}

.opis-wrapper {
  position: relative;
  max-height: 13em; /* ok. 3 linie */
  overflow: hidden;
}

.opis {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 10;
  line-clamp: 10;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1em;
  margin-left: 10px;
  margin-right: 10px;
  background: linear-gradient(to bottom, transparent, white); /* dopasuj tło */
  pointer-events: none;
}

.toggle {
  position: absolute;
  bottom: 0;
  right: 0;
  background: white;
  color: rgb(56, 56, 63);
  border: none;
  cursor: pointer;
  font-size: 0.9em;
  padding: 0.2em 0.5em;
}

/* Animacje wejścia z różnych kierunków */
@keyframes slideFromLeft {
  from { opacity: 0; transform: translateX(-80px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideFromRight {
  from { opacity: 0; transform: translateX(80px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideFromTop {
  from { opacity: 0; transform: translateY(-80px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideFromBottom {
  from { opacity: 0; transform: translateY(80px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Przypisanie klas do animacji */
.from-left   { 
      animation-iteration-count: 1;
  animation-timing-function: ease;
    animation-name: slideFromLeft; }
.from-right  { 
      animation-iteration-count: 1;
  animation-timing-function: ease;
    animation-name: slideFromRight; }
.from-top    { 
      animation-iteration-count: 1;
  animation-timing-function: ease;
    animation-name: slideFromTop; }
.from-bottom { 
      animation-iteration-count: 1;
  animation-timing-function: ease;
    animation-name: slideFromBottom; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(219, 52, 52, 0.5); }
  50% { box-shadow: 0 0 20px rgb(219, 52, 52); }
}


@keyframes fadeScaleIn {
  0% {
    opacity: 0;
    transform: scale(0.4);
    transform: translateY(30px);
    transform: rotate(90deg);
     filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    transform: translateY(0);
    transform: rotate(0deg);
     filter: blur(0);
  }
}

.element-load {
  animation: fadeScaleIn 2s ease forwards;
}

footer{

    animation: stopkaanim 1.5s ease-in forwards;
}
@keyframes stopkanim {
    0%{
        transform: translateY(100px);
    }
    100%{
        transform: translateY(0);
    }
}


/* Dla ekranów max-width 600px — smartfony */
@media (max-width: 600px) {
  header {
    margin: 10px;
    height: 80px;
  }
    .nav-links {
    flex-direction: column;
  }
  
  .nav-links li {
    position: relative; /* żeby pseudo elementy działały */
  }

  /* ukryj tradycyjne dropdowny */
  .nav-links li .dropdown {
    position: static; /* ważne! usuń absolute */
    display: none; /* domyślnie ukryte */
    background-color: #627581;
    margin-top: 5px;
    padding: 10px;
    border-radius: 5px;
  }

  /* dodaj przycisk/ikonę rozwijania */
  .nav-links li.has-submenu > a::after {
    content: "▼";
    float: right;
    margin-left: 10px;
    font-size: 0.8em;
    cursor: pointer;
  }

  /* po kliknięciu aktywnego elementu pokaż submenu */
  .nav-links li.open > .dropdown {
    display: block;
  }

  #nav {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 15px;
    margin: 10px;
    border-radius: 10px;
    background-repeat: no-repeat;
    background-size: cover;
  }

  .nav-links {
    flex-direction: column;
    margin-left: 0;
    width: 100%;
  }

  .nav-links li {
    margin-right: 0;
    margin-bottom: 10px;
  }

  .nav-links a {
    padding-top: 10px;
    font-size: 18px;
  }

  #akt, #boxoferty {
    margin: 15px 10px;
  }

  #akt2 {
    flex-direction: column;
    gap: 10px;
  }

  .din {
    width: 100%;
    margin: 10px 0;
  }

  footer #adres, footer iframe, footer #media, footer #emialtel {
    width: 90%;
    height: auto;
    margin-bottom: 15px;
    float: none;
  }

  #chatbot-window {
    width: 90vw;
    max-height: 60vh;
    right: 5vw;
    bottom: 70px;
  }
}


.brand-bar {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.brand {
  width: 300px;
  height: 300px;
  background-color: #ddd;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  color: #555;
  transition: transform 0.3s, background-color 0.3s, color 0.3s;
}

.brand.active {
  background-color: #ff0000;
  color: white;
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}