body {
  font-family: "Lato", sans-serif;
  margin: 0;
  color: whitesmoke;
  background-image: url('../images/bg.webp');
  background-attachment: fixed;
}

* {
  box-sizing: border-box;
}

a, a:link, a:visited, a:hover, a:active {
  color: whitesmoke !important;
}

a:hover {
  text-decoration: underline;
}

header {
  background: #d62828;
  color: white;
  text-align: center;
  padding: 1rem;
}

h1 {
  margin: 0;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
}

h2 {
  font-size: clamp(1.3rem, 4vw, 2rem);
}

.baner {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 5728 / 2363;
  object-fit: cover;
}

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}

.category {
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin-bottom: 1.5rem;
  text-align: center;
  /* Animacja fade-in */
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
}

/* Animacje fade-in dla kolejnych kategorii */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.category:nth-child(1) { animation-delay: 0.1s; }
.category:nth-child(2) { animation-delay: 0.2s; }
.category:nth-child(3) { animation-delay: 0.3s; }
.category:nth-child(4) { animation-delay: 0.4s; }
.category:nth-child(5) { animation-delay: 0.5s; }
.category:nth-child(6) { animation-delay: 0.6s; }
.category:nth-child(7) { animation-delay: 0.7s; }

.category h2 {
  border-bottom: 2px solid #d62828;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.category h3 {
  margin: 0.5rem 0;
}

.category p {
  margin: 0.3rem 0;
}

.category p:last-child {
  font-size: 1.1rem;
  color: #ffcb2e;
}


.item {
  display: flex;
  justify-content: center;   /* wyśrodkowanie główne */
  align-items: center;
  margin: 0.5rem 0;
  position: relative;        /* pozwala na absolutne pozycjonowanie ceny */
}

.item span:first-child {
  flex: 1;                   /* nazwa zajmuje środek */
  text-align: center;        /* wyśrodkowanie tekstu */
  font-weight: 500;
}

.item span:last-child, .item-cena {
  display: block;
  position: static;
  text-align: right;
  margin: 0.2rem 0 0.2rem auto;
  font-weight: bold;
  color: #ffcb2e;
  background: none;
  padding-left: 0;
  word-break: break-word;
}

@media (min-width: 600px) {
  .item span:last-child, .item-cena {
    position: absolute;
    right: 10px;
    top: 0;
    text-align: right;
    margin-right: 30px;
    padding-left: 10px;
    font-weight: bold;
    color: #ffcb2e;
  }
}


table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

th, td {
  border: 1px solid #ddd;
  padding: 6px;
  text-align: center;
}

th {
  background: #f4f4f4;
}

footer {
  text-align: center;
  padding: 1rem;
  background: #333;
  color: white;
}

footer a, footer a:link, footer a:visited, footer a:hover, footer a:active {
  color: white !important;
}

.status-message {
  text-align: center;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  margin-bottom: 1rem;
  color: #ffcb2e;
}

/* Kontener pizzy */

.pizza-box {
  display: block;
  text-align: center;
  position: relative;
  margin-bottom: 0.3rem;
}

/* Nazwa pizzy */
.pizza-title {
  margin: 0.5rem 0 0.2rem 0;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  position: relative;
  word-break: break-word;
}

/* Składniki pod nazwą */
.pizza-skladniki {
  margin: 0;
  font-style: italic;
  color: #555;
  text-align: center;
  font-size: 0.8rem !important;
}

/* Ceny wyrównane do prawej */
.pizza-ceny {
  display: block;
  position: static;
  text-align: right;
  margin: 0.2rem 0 0.2rem auto;
  font-weight: bold;
  color: #ffcb2e;
  background: none;
  padding-left: 0;
  word-break: break-word;
  max-width: 100%;
  overflow-wrap: break-word;
  white-space: normal;
  box-sizing: border-box;
}

@media (min-width: 600px) {
  .pizza-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
  }
  .pizza-ceny {
    position: absolute;
    right: 0;
    top: 0.5rem;
    text-align: right;
    margin-right: 30px;
    background: white;
    padding-left: 10px;
    font-weight: bold;
    color: #ffcb2e;
  }
  
  .item span:last-child, .item-cena {
    position: absolute;
    right: 10px;
    top: 0;
    text-align: right;
    margin-right: 30px;
    padding-left: 10px;
    font-weight: bold;
    color: #ffcb2e;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mobile first responsive */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  
  main {
    padding: 0.75rem;
  }
  
  .category {
    padding: 0.75rem;
  }
}

@media (min-width: 768px) {
  body {
    font-size: 16px;
  }
  
  main {
    padding: 1.5rem;
  }
}

/* Floating Call Button na mobile */
.floating-call {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: #d62828;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(214, 40, 40, 0.4);
  z-index: 1000;
  text-decoration: none !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.floating-call:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(214, 40, 40, 0.6);
}

.floating-call svg {
  width: 28px;
  height: 28px;
  fill: white;
}

@media (max-width: 768px) {
  .floating-call {
    display: flex;
  }
}

/* Lepszy kontrast tekstu */
main h2 {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.item, .pizza-box {
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

footer {
  background: rgba(0, 0, 0, 0.85);
}
